13 #include "vtkCallbackCommand.h"
14 #include "vtkCoordinate.h"
15 #include "vtkObjectFactory.h"
16 #include "vtkRenderWindow.h"
17 #include "vtkRenderWindowInteractor.h"
18 #include "vtkRenderer.h"
19 #include "vtkScalarBarActor.h"
20 #include "vtkScalarBarRepresentation.h"
21 #include "vtkTextProperty.h"
22 #include "vtkWidgetCallbackMapper.h"
23 #include "vtkWidgetEvent.h"
30 this->Repositionable = 1;
33 this->CallbackMapper->SetCallbackMethod(vtkCommand::MouseMoveEvent,
34 vtkWidgetEvent::Move,
this,
35 Superclass::MoveAction);
43 vtkScalarBarRepresentation* rep) {
44 this->SetWidgetRepresentation(rep);
55 if (rep->GetScalarBarActor() != actor) {
56 rep->SetScalarBarActor(actor);
69 return rep->GetScalarBarActor();
74 if (!this->WidgetRep) {
77 rep->SetWindowLocation(
86 lut_actor->SetTitle(
"");
87 lut_actor->SetOrientationToVertical();
89 prop->SetFontSize(10);
90 lut_actor->SetLabelTextProperty(prop);
91 lut_actor->SetTitleTextProperty(prop);
98 this->Superclass::PrintSelf(os, indent);
100 os << indent <<
"Repositionable: " << this->Repositionable <<
endl;
static vtkContext2DScalarBarActor * New()
static vtkScalarBarRepresentationCustom * New()
QTextStream & endl(QTextStream &stream)