// $Header$
#include "VisuGUI_VectorsDlg.h"
+
+#include "VisuGUI.h"
+//#include "VisuGUI_Selection.h"
+#include "VisuGUI_Tools.h"
+
#include "VISU_Vectors_i.hh"
-#include "QAD_Application.h"
-#include "QAD_Desktop.h"
+#include "SalomeApp_Module.h"
+#include "SUIT_Desktop.h"
#include <qlayout.h>
#include <qcolordialog.h>
/*!
Constructor
*/
-VisuGUI_VectorsDlg::VisuGUI_VectorsDlg()
- : QDialog( QAD_Application::getDesktop(), "VisuGUI_VectorsDlg", true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
+VisuGUI_VectorsDlg::VisuGUI_VectorsDlg (SalomeApp_Module* theModule)
+ : QDialog(VISU::GetDesktop(theModule), "VisuGUI_VectorsDlg", true,
+ WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{
- setCaption( tr( "Vector Field Representation" ) );
- setSizeGripEnabled( TRUE );
+ setCaption(tr("DLG_TITLE"));
+ setSizeGripEnabled(TRUE);
QVBoxLayout* TopLayout = new QVBoxLayout( this );
TopLayout->setSpacing( 6 );
TopGroupLayout->setMargin( 11 );
// Scale factor
- ScaleLabel = new QLabel( tr( "Scale factor:" ), TopGroup, "ScaleLabel" );
+ ScaleLabel = new QLabel (tr("LBL_SCALE_FACTOR"), TopGroup, "ScaleLabel");
- ScalFact = new QAD_SpinBoxDbl( TopGroup, 1e-20, 1.0E+38, 0.1, 5);
+ ScalFact = new QtxDblSpinBox( 1e-20, 1.0E+38, 0.1, TopGroup );
+ ScalFact->setPrecision( 5 );
ScalFact->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
ScalFact->setValue( 0.1 );
TopGroupLayout->addWidget( ScalFact, 0, 1 );
// Line width
- LineWidLabel = new QLabel( tr( "Line width:" ), TopGroup, "LineWidLabel" );
+ LineWidLabel = new QLabel (tr("LBL_LINE_WIDTH"), TopGroup, "LineWidLabel");
LinWid = new QSpinBox( 1, 10, 1, TopGroup, "LinWid" );
LinWid->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
TopGroupLayout->addWidget( LinWid, 1, 1 );
// Color
- UseMagn = new QCheckBox( tr( "Magnitude coloring" ), TopGroup, "UseMagn" );
- UseMagn->setText( tr( "Magnitude coloring" ) );
- SelColor = new QPushButton( tr( "Select Color" ), TopGroup, "SelColor" );
+ UseMagn = new QCheckBox (tr("MAGNITUDE_COLORING_CHK"), TopGroup, "UseMagn");
+ //UseMagn->setText(tr("MAGNITUDE_COLORING_CHK"));
+ SelColor = new QPushButton (tr("SEL_COLOR_BTN"), TopGroup, "SelColor");
/* ColorLab = new QLabel( TopGroup, "ColorLab" );
ColorLab->setFixedSize( SelColor->sizeHint().height(), SelColor->sizeHint().height() );
ColorLab->setFrameStyle( QLabel::Plain | QLabel::Box );
- */
+ */
TopGroupLayout->addWidget( UseMagn, 2, 0 );
//TopGroupLayout->addWidget( ColorLab, 2, 1 );
TopGroupLayout->addWidget( SelColor, 2, 1 );
// Gliphs
- UseGlyph = new QCheckBox( tr( "Use glyphs" ), TopGroup, "UseGlyph" );
+ UseGlyph = new QCheckBox (tr("USE_GLYPHS_CHK"), TopGroup, "UseGlyph");
- TypeGlyph = new QButtonGroup( tr( "Glyph type" ), TopGroup, "TypeGlyph" );
+ TypeGlyph = new QButtonGroup (tr("GLYPH_TYPE_GRP"), TopGroup, "TypeGlyph");
TypeGlyph->setColumnLayout(0, Qt::Vertical );
TypeGlyph->layout()->setSpacing( 0 );
TypeGlyph->layout()->setMargin( 0 );
TypeGlyphLayout->setSpacing( 6 );
TypeGlyphLayout->setMargin( 11 );
- RBArrows = new QRadioButton( tr( "Arrows" ), TypeGlyph, "RBArrows" );
+ RBArrows = new QRadioButton (tr("ARROWS_BTN") , TypeGlyph, "RBArrows");
TypeGlyphLayout->addWidget( RBArrows, 0, 0 );
- RBCones2 = new QRadioButton( tr( "Cones (2)" ), TypeGlyph, "RBCones2" );
+ RBCones2 = new QRadioButton (tr("CONES2_BTN"), TypeGlyph, "RBCones2");
TypeGlyphLayout->addWidget( RBCones2, 1, 0 );
- RBCones6 = new QRadioButton( tr( "Cones (6)" ), TypeGlyph, "RBCones6" );
+ RBCones6 = new QRadioButton (tr("CONES6_BTN"), TypeGlyph, "RBCones6");
TypeGlyphLayout->addWidget( RBCones6, 2, 0 );
- PosGlyph = new QButtonGroup( tr( "Glyph position" ), TopGroup, "PosGlyph" );
+ PosGlyph = new QButtonGroup (tr("GLYPH_POSITION_GRP"), TopGroup, "PosGlyph");
PosGlyph->setColumnLayout(0, Qt::Vertical );
PosGlyph->layout()->setSpacing( 0 );
PosGlyph->layout()->setMargin( 0 );
PosGlyphLayout->setSpacing( 6 );
PosGlyphLayout->setMargin( 11 );
- RBTail = new QRadioButton( tr( "Tail" ), PosGlyph, "RBTail" );
+ RBTail = new QRadioButton (tr("TAIL_BTN" ), PosGlyph, "RBTail");
PosGlyphLayout->addWidget( RBTail, 0, 0 );
- RBCent = new QRadioButton( tr( "Center" ), PosGlyph, "RBCent" );
+ RBCent = new QRadioButton (tr("CENTER_BTN"), PosGlyph, "RBCent");
PosGlyphLayout->addWidget( RBCent, 1, 0 );
- RBHead = new QRadioButton( tr( "Head" ), PosGlyph, "RBHead" );
+ RBHead = new QRadioButton (tr("HEAD_BTN" ), PosGlyph, "RBHead");
PosGlyphLayout->addWidget( RBHead, 2, 0 );
TopGroupLayout->addMultiCellWidget( UseGlyph, 3, 3, 0, 2 );