moab
CropToolpopup.cpp
Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'CropToolpopup.ui'
00003 **
00004 ** Created: Wed Aug 22 09:12:41 2007
00005 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.7   edited Aug 31 2005 $)
00006 **
00007 ** WARNING! All changes made in this file will be lost!
00008 ****************************************************************************/
00009 
00010 #include "CropToolpopup.h"
00011 
00012 #include <qvariant.h>
00013 #include <qlabel.h>
00014 #include <qcombobox.h>
00015 #include <qspinbox.h>
00016 #include <qcheckbox.h>
00017 #include <qlayout.h>
00018 #include <qtooltip.h>
00019 #include <qwhatsthis.h>
00020 #include <qimage.h>
00021 #include <qpixmap.h>
00022 
00023 #include "CropTool.hpp"
00024 #include "QVTKWidget.h"
00025 #include "vtkRenderWindow.h"
00026 #include "CropToolpopup.ui.h"
00027 /*
00028  *  Constructs a CropToolPopup as a child of 'parent', with the
00029  *  name 'name' and widget flags set to 'f'.
00030  *
00031  *  The dialog will by default be modeless, unless you set 'modal' to
00032  *  TRUE to construct a modal dialog.
00033  */
00034 CropToolPopup::CropToolPopup( QWidget* parent, const char* name, bool modal, WFlags fl )
00035     : QDialog( parent, name, modal, fl )
00036 {
00037     if ( !name )
00038     setName( "CropToolPopup" );
00039     setFocusPolicy( QDialog::StrongFocus );
00040 
00041     textLabel1_2 = new QLabel( this, "textLabel1_2" );
00042     textLabel1_2->setGeometry( QRect( 260, 10, 20, 21 ) );
00043 
00044     textLabel1 = new QLabel( this, "textLabel1" );
00045     textLabel1->setGeometry( QRect( 190, 10, 20, 21 ) );
00046 
00047     textLabel1_3_2_2_2 = new QLabel( this, "textLabel1_3_2_2_2" );
00048     textLabel1_3_2_2_2->setGeometry( QRect( 10, 10, 37, 21 ) );
00049 
00050     textLabel1_3 = new QLabel( this, "textLabel1_3" );
00051     textLabel1_3->setGeometry( QRect( 330, 10, 20, 21 ) );
00052 
00053     CropToolType2 = new QComboBox( FALSE, this, "CropToolType2" );
00054     CropToolType2->setGeometry( QRect( 0, 100, 90, 21 ) );
00055 
00056     CropToolType3 = new QComboBox( FALSE, this, "CropToolType3" );
00057     CropToolType3->setGeometry( QRect( 0, 160, 90, 21 ) );
00058 
00059     Yval1 = new QSpinBox( this, "Yval1" );
00060     Yval1->setGeometry( QRect( 240, 40, 59, 21 ) );
00061     Yval1->setMaxValue( 10000 );
00062     Yval1->setMinValue( -10000 );
00063 
00064     Zval1 = new QSpinBox( this, "Zval1" );
00065     Zval1->setGeometry( QRect( 310, 40, 59, 21 ) );
00066     Zval1->setMaxValue( 10000 );
00067     Zval1->setMinValue( -10000 );
00068 
00069     Xval2 = new QSpinBox( this, "Xval2" );
00070     Xval2->setGeometry( QRect( 170, 100, 59, 21 ) );
00071     Xval2->setMaxValue( 10000 );
00072     Xval2->setMinValue( -10000 );
00073 
00074     Yval2 = new QSpinBox( this, "Yval2" );
00075     Yval2->setGeometry( QRect( 240, 100, 59, 21 ) );
00076     Yval2->setMaxValue( 10000 );
00077     Yval2->setMinValue( -10000 );
00078 
00079     Zval2 = new QSpinBox( this, "Zval2" );
00080     Zval2->setGeometry( QRect( 310, 100, 59, 21 ) );
00081     Zval2->setMaxValue( 10000 );
00082     Zval2->setMinValue( -10000 );
00083 
00084     Xval3 = new QSpinBox( this, "Xval3" );
00085     Xval3->setGeometry( QRect( 170, 160, 59, 21 ) );
00086     Xval3->setMaxValue( 10000 );
00087     Xval3->setMinValue( -10000 );
00088 
00089     Yval3 = new QSpinBox( this, "Yval3" );
00090     Yval3->setGeometry( QRect( 240, 160, 59, 21 ) );
00091     Yval3->setMaxValue( 10000 );
00092     Yval3->setMinValue( -10000 );
00093 
00094     Zval3 = new QSpinBox( this, "Zval3" );
00095     Zval3->setGeometry( QRect( 310, 160, 59, 21 ) );
00096     Zval3->setMaxValue( 10000 );
00097     Zval3->setMinValue( -10000 );
00098 
00099     textLabel1_3_2 = new QLabel( this, "textLabel1_3_2" );
00100     textLabel1_3_2->setGeometry( QRect( 400, 10, 37, 21 ) );
00101 
00102     textLabel1_3_2_3 = new QLabel( this, "textLabel1_3_2_3" );
00103     textLabel1_3_2_3->setGeometry( QRect( 460, 10, 37, 21 ) );
00104 
00105     Rev1 = new QCheckBox( this, "Rev1" );
00106     Rev1->setGeometry( QRect( 470, 40, 20, 20 ) );
00107 
00108     Rev2 = new QCheckBox( this, "Rev2" );
00109     Rev2->setGeometry( QRect( 470, 100, 20, 20 ) );
00110 
00111     Rev3 = new QCheckBox( this, "Rev3" );
00112     Rev3->setGeometry( QRect( 470, 160, 20, 20 ) );
00113 
00114     radius3 = new QSpinBox( this, "radius3" );
00115     radius3->setGeometry( QRect( 100, 160, 59, 21 ) );
00116     radius3->setMaxValue( 10000 );
00117     radius3->setMinValue( 0 );
00118     radius3->setValue( 1 );
00119 
00120     radius2 = new QSpinBox( this, "radius2" );
00121     radius2->setGeometry( QRect( 100, 100, 59, 21 ) );
00122     radius2->setMaxValue( 10000 );
00123     radius2->setMinValue( 0 );
00124     radius2->setValue( 1 );
00125 
00126     radius1 = new QSpinBox( this, "radius1" );
00127     radius1->setGeometry( QRect( 100, 40, 59, 21 ) );
00128     radius1->setMaxValue( 10000 );
00129     radius1->setMinValue( 0 );
00130     radius1->setValue( 1 );
00131 
00132     textLabel1_3_2_2 = new QLabel( this, "textLabel1_3_2_2" );
00133     textLabel1_3_2_2->setGeometry( QRect( 110, 10, 30, 21 ) );
00134 
00135     CropToolType1 = new QComboBox( FALSE, this, "CropToolType1" );
00136     CropToolType1->setGeometry( QRect( 0, 40, 90, 21 ) );
00137 
00138     Xval1 = new QSpinBox( this, "Xval1" );
00139     Xval1->setGeometry( QRect( 170, 40, 59, 21 ) );
00140     Xval1->setMaxValue( 10000 );
00141     Xval1->setMinValue( -10000 );
00142 
00143     Rot1a = new QSpinBox( this, "Rot1a" );
00144     Rot1a->setGeometry( QRect( 390, 40, 59, 21 ) );
00145     Rot1a->setMaxValue( 180 );
00146     Rot1a->setMinValue( -180 );
00147     Rot1a->setLineStep( 5 );
00148 
00149     Rot1b = new QSpinBox( this, "Rot1b" );
00150     Rot1b->setGeometry( QRect( 390, 60, 59, 21 ) );
00151     Rot1b->setMaxValue( 180 );
00152     Rot1b->setMinValue( -180 );
00153     Rot1b->setLineStep( 5 );
00154 
00155     Rot2a = new QSpinBox( this, "Rot2a" );
00156     Rot2a->setGeometry( QRect( 390, 100, 59, 21 ) );
00157     Rot2a->setMaxValue( 180 );
00158     Rot2a->setMinValue( -180 );
00159     Rot2a->setLineStep( 5 );
00160 
00161     Rot2b = new QSpinBox( this, "Rot2b" );
00162     Rot2b->setGeometry( QRect( 390, 120, 59, 21 ) );
00163     Rot2b->setMaxValue( 180 );
00164     Rot2b->setMinValue( -180 );
00165     Rot2b->setLineStep( 5 );
00166 
00167     Rot3a = new QSpinBox( this, "Rot3a" );
00168     Rot3a->setGeometry( QRect( 390, 160, 59, 21 ) );
00169     Rot3a->setMaxValue( 180 );
00170     Rot3a->setMinValue( -180 );
00171     Rot3a->setLineStep( 5 );
00172 
00173     Rot3b = new QSpinBox( this, "Rot3b" );
00174     Rot3b->setGeometry( QRect( 390, 180, 59, 21 ) );
00175     Rot3b->setMaxValue( 180 );
00176     Rot3b->setMinValue( -180 );
00177     Rot3b->setLineStep( 5 );
00178     languageChange();
00179     resize( QSize(511, 220).expandedTo(minimumSizeHint()) );
00180     clearWState( WState_Polished );
00181 
00182     // signals and slots connections
00183     connect( radius1, SIGNAL( valueChanged(int) ), this, SLOT( radius1_valueChanged(int) ) );
00184     connect( Xval1, SIGNAL( valueChanged(int) ), this, SLOT( Xval1_valueChanged(int) ) );
00185     connect( Yval1, SIGNAL( valueChanged(int) ), this, SLOT( Yval1_valueChanged(int) ) );
00186     connect( Zval1, SIGNAL( valueChanged(int) ), this, SLOT( Zval1_valueChanged(int) ) );
00187     connect( Rot1a, SIGNAL( valueChanged(int) ), this, SLOT( Rot1a_valueChanged(int) ) );
00188     connect( Rot1b, SIGNAL( valueChanged(int) ), this, SLOT( Rot1b_valueChanged(int) ) );
00189     connect( radius2, SIGNAL( valueChanged(int) ), this, SLOT( radius2_valueChanged(int) ) );
00190     connect( Xval2, SIGNAL( valueChanged(int) ), this, SLOT( Xval2_valueChanged(int) ) );
00191     connect( Yval2, SIGNAL( valueChanged(int) ), this, SLOT( Yval2_valueChanged(int) ) );
00192     connect( Zval2, SIGNAL( valueChanged(int) ), this, SLOT( Zval2_valueChanged(int) ) );
00193     connect( Rot2a, SIGNAL( valueChanged(int) ), this, SLOT( Rot2a_valueChanged(int) ) );
00194     connect( Rot2b, SIGNAL( valueChanged(int) ), this, SLOT( Rot2b_valueChanged(int) ) );
00195     connect( radius3, SIGNAL( valueChanged(int) ), this, SLOT( radius3_valueChanged(int) ) );
00196     connect( Xval3, SIGNAL( valueChanged(int) ), this, SLOT( Xval3_valueChanged(int) ) );
00197     connect( Yval3, SIGNAL( valueChanged(int) ), this, SLOT( Yval3_valueChanged(int) ) );
00198     connect( Zval3, SIGNAL( valueChanged(int) ), this, SLOT( Zval3_valueChanged(int) ) );
00199     connect( Rot3a, SIGNAL( valueChanged(int) ), this, SLOT( Rot3a_valueChanged(int) ) );
00200     connect( Rot3b, SIGNAL( valueChanged(int) ), this, SLOT( Rot3b_valueChanged(int) ) );
00201     connect( Rev1, SIGNAL( toggled(bool) ), this, SLOT( Rev1_toggled(bool) ) );
00202     connect( Rev2, SIGNAL( toggled(bool) ), this, SLOT( Rev2_toggled(bool) ) );
00203     connect( Rev3, SIGNAL( toggled(bool) ), this, SLOT( Rev3_toggled(bool) ) );
00204     connect( CropToolType1, SIGNAL( highlighted(int) ), this, SLOT( CropToolType1_highlighted(int) ) );
00205     connect( CropToolType2, SIGNAL( highlighted(int) ), this, SLOT( CropToolType2_highlighted(int) ) );
00206     connect( CropToolType3, SIGNAL( highlighted(int) ), this, SLOT( CropToolType3_highlighted(int) ) );
00207     init();
00208 }
00209 
00210 /*
00211  *  Destroys the object and frees any allocated resources
00212  */
00213 CropToolPopup::~CropToolPopup()
00214 {
00215     destroy();
00216     // no need to delete child widgets, Qt does it all for us
00217 }
00218 
00219 /*
00220  *  Sets the strings of the subwidgets using the current
00221  *  language.
00222  */
00223 void CropToolPopup::languageChange()
00224 {
00225     setCaption( tr( "Crop" ) );
00226     textLabel1_2->setText( tr( "Y" ) );
00227     textLabel1->setText( tr( "X" ) );
00228     textLabel1_3_2_2_2->setText( tr( "Type" ) );
00229     textLabel1_3->setText( tr( "Z" ) );
00230     CropToolType2->clear();
00231     CropToolType2->insertItem( tr( "None" ) );
00232     CropToolType2->insertItem( tr( "Plane" ) );
00233     CropToolType2->insertItem( tr( "Cylinder" ) );
00234     CropToolType2->insertItem( tr( "Sphere" ) );
00235     CropToolType3->clear();
00236     CropToolType3->insertItem( tr( "None" ) );
00237     CropToolType3->insertItem( tr( "Plane" ) );
00238     CropToolType3->insertItem( tr( "Cylinder" ) );
00239     CropToolType3->insertItem( tr( "Sphere" ) );
00240     textLabel1_3_2->setText( tr( "Rot" ) );
00241     textLabel1_3_2_3->setText( tr( "Rev" ) );
00242     Rev1->setText( tr( "checkBox1" ) );
00243     Rev2->setText( tr( "checkBox1" ) );
00244     Rev3->setText( tr( "checkBox1" ) );
00245     textLabel1_3_2_2->setText( tr( "Rad" ) );
00246     CropToolType1->clear();
00247     CropToolType1->insertItem( tr( "None" ) );
00248     CropToolType1->insertItem( tr( "PlaneX" ) );
00249     CropToolType1->insertItem( tr( "PlaneY" ) );
00250     CropToolType1->insertItem( tr( "PlaneZ" ) );
00251     CropToolType1->insertItem( tr( "Cylinder" ) );
00252     CropToolType1->insertItem( tr( "Sphere" ) );
00253 }
00254 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines