#include <qlineedit.h>\r
#include <qlabel.h>\r
#include <qobjectlist.h>\r
+#include <qvalidator.h>\r
\r
#include <VTKViewer_ViewFrame.h>\r
#include <SALOME_CubeAxesActor2D.h>\r
aHBox->setSpacing( 5 );\r
aLabel = new QLabel( tr( "NUMBER" ), aHBox );\r
myLabelNumber = new QLineEdit( aHBox );\r
+ myLabelNumber->setValidator(new QIntValidator(0, 25, this));\r
+ myLabelNumber->installEventFilter(this);\r
aLabels.append( aLabel );\r
\r
aHBox = new QHBox( myLabelsGrp );\r
onTicksChecked();\r
}\r
\r
+bool VisuGUI_AxisWg::eventFilter(QObject* o, QEvent* e)\r
+{\r
+ if (e->type() == QEvent::FocusOut) {\r
+ bool isOK = false;\r
+ int k = myLabelNumber->text().toInt(&isOK);\r
+ if (isOK && k > 25) myLabelNumber->setText("25");\r
+ }\r
+ return false;\r
+}\r
+\r
//=======================================================================\r
// name : VisuGUI_AxisWg::onNameChecked\r
// Purpose :\r