22 setObjectName( name ? name :
"Go4SetScaleValues");
25 QObject::connect(AutoScaleButton, SIGNAL(toggled(
bool)),
this, SLOT(
AutoscaleChanged(
bool)));
26 QObject::connect(SetButton, SIGNAL(clicked()),
this, SLOT(
ApplyValues()));
27 QObject::connect(XminV, SIGNAL(returnPressed()),
this, SLOT(
ApplyValues()));
28 QObject::connect(XmaxV, SIGNAL(returnPressed()),
this, SLOT(
ApplyValues()));
29 QObject::connect(YminV, SIGNAL(returnPressed()),
this, SLOT(
ApplyValues()));
30 QObject::connect(YmaxV, SIGNAL(returnPressed()),
this, SLOT(
ApplyValues()));
31 QObject::connect(ZminV, SIGNAL(returnPressed()),
this, SLOT(
ApplyValues()));
32 QObject::connect(ZmaxV, SIGNAL(returnPressed()),
this, SLOT(
ApplyValues()));
50 XminV->setModified(
false);
51 XmaxV->setModified(
false);
52 YminV->setModified(
false);
53 YmaxV->setModified(
false);
54 ZminV->setModified(
false);
55 ZmaxV->setModified(
false);
64 setWindowTitle(QString(
"Scale values: ") + panel->objectName());
67 double Xmin=0, Xmax=0, Ymin=0, Ymax=0, Zmin=0, Zmax=0;
70 panel->
GetSelectedRange(ndim, autoscale, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax);
72 AutoScaleButton->setChecked(autoscale);
74 if (!XminV->isModified())
75 XminV->setText(QString::number(Xmin));
76 if (!XmaxV->isModified())
77 XmaxV->setText(QString::number(Xmax));
78 if (!YminV->isModified())
79 YminV->setText(QString::number(Ymin));
80 if (!YmaxV->isModified())
81 YmaxV->setText(QString::number(Ymax));
82 if (!ZminV->isModified())
83 ZminV->setText(QString::number(Zmin));
84 if (!ZmaxV->isModified())
85 ZmaxV->setText(QString::number(Zmax));
90 YminV->setDisabled(autoscale);
91 YmaxV->setDisabled(autoscale);
92 ZminV->setDisabled(
true);
93 ZmaxV->setDisabled(
true);
96 YminV->setDisabled(
false);
97 YmaxV->setDisabled(
false);
98 ZminV->setDisabled(autoscale);
99 ZmaxV->setDisabled(autoscale);
102 YminV->setDisabled(
false);
103 YmaxV->setDisabled(
false);
104 ZminV->setDisabled(
false);
105 ZmaxV->setDisabled(
false);
110 setWindowTitle(QString(
"Scale values: none"));
142 if (panel==0)
return;
144 double Xmin = XminV->text().toDouble();
145 double Xmax = XmaxV->text().toDouble();
146 double Ymin = YminV->text().toDouble();
147 double Ymax = YmaxV->text().toDouble();
148 double Zmin = ZminV->text().toDouble();
149 double Zmax = ZmaxV->text().toDouble();
151 if ((Xmin==0.) && (Xmax==0.)) { Xmin=-1.; Xmax=-1.; }
152 if ((Ymin==0.) && (Ymax==0.)) { Ymin=-1.; Ymax=-1.; }
153 if ((Zmin==0.) && (Zmax==0.)) { Zmin=-1.; Zmax=-1.; }
166 if (panel==0)
return;
virtual void AutoscaleChanged(bool on)
static TGo4MdiArea * Instance()
void refreshView(bool force)
virtual void SetSelectedRange(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
virtual void panelSlot(TGo4ViewPanel *panel, TPad *pad, int signalid)
TGo4ViewPanel * GetActivePanel()
virtual void GetSelectedRange(int &ndim, bool &autoscale, double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax)
TGo4SetScaleValues(QWidget *parent=0, const char *name=0, Qt::WindowFlags fl=Qt::Widget)
virtual void ApplyValues()
virtual void SetAutoScale(bool on, TPad *selpad)