Biomechanical Joint Model
 Author: Anderson Maciel

mechatester.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'mechatester.ui'
00003 **
00004 ** Created: Tue Jun 14 16:55:27 2005
00005 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.2.3   edited May 19 14:22 $)
00006 **
00007 ** WARNING! All changes made in this file will be lost!
00008 ****************************************************************************/
00009 
00010 #include "mechatester.h"
00011 
00012 #include <qvariant.h>
00013 #include <come_mechatestqglwidget.h>
00014 #include <qgroupbox.h>
00015 #include <qpushbutton.h>
00016 #include <qcombobox.h>
00017 #include <qcheckbox.h>
00018 #include <qspinbox.h>
00019 #include <qlabel.h>
00020 #include <qslider.h>
00021 #include <qsplitter.h>
00022 #include <qtabwidget.h>
00023 #include <qwidget.h>
00024 #include <qlineedit.h>
00025 #include <qlcdnumber.h>
00026 #include <qtable.h>
00027 #include <qlistbox.h>
00028 #include <qframe.h>
00029 #include <qlayout.h>
00030 #include <qtooltip.h>
00031 #include <qwhatsthis.h>
00032 #include <qaction.h>
00033 #include <qmenubar.h>
00034 #include <qpopupmenu.h>
00035 #include <qtoolbar.h>
00036 #include <qimage.h>
00037 #include <qpixmap.h>
00038 
00039 #include "mechatester.ui.h"
00040 static const char* const image1_data[] = { 
00041 "22 22 5 1",
00042 ". c None",
00043 "# c #000000",
00044 "c c #848200",
00045 "a c #ffff00",
00046 "b c #ffffff",
00047 "......................",
00048 "......................",
00049 "......................",
00050 "............####....#.",
00051 "...........#....##.##.",
00052 "..................###.",
00053 ".................####.",
00054 ".####...........#####.",
00055 "#abab##########.......",
00056 "#babababababab#.......",
00057 "#ababababababa#.......",
00058 "#babababababab#.......",
00059 "#ababab###############",
00060 "#babab##cccccccccccc##",
00061 "#abab##cccccccccccc##.",
00062 "#bab##cccccccccccc##..",
00063 "#ab##cccccccccccc##...",
00064 "#b##cccccccccccc##....",
00065 "###cccccccccccc##.....",
00066 "##cccccccccccc##......",
00067 "###############.......",
00068 "......................"};
00069 
00070 static const char* const image2_data[] = { 
00071 "22 22 5 1",
00072 ". c None",
00073 "# c #000000",
00074 "a c #848200",
00075 "b c #c1c1c1",
00076 "c c #cab5d1",
00077 "......................",
00078 ".####################.",
00079 ".#aa#bbbbbbbbbbbb#bb#.",
00080 ".#aa#bbbbbbbbbbbb#bb#.",
00081 ".#aa#bbbbbbbbbcbb####.",
00082 ".#aa#bbbccbbbbbbb#aa#.",
00083 ".#aa#bbbccbbbbbbb#aa#.",
00084 ".#aa#bbbbbbbbbbbb#aa#.",
00085 ".#aa#bbbbbbbbbbbb#aa#.",
00086 ".#aa#bbbbbbbbbbbb#aa#.",
00087 ".#aa#bbbbbbbbbbbb#aa#.",
00088 ".#aaa############aaa#.",
00089 ".#aaaaaaaaaaaaaaaaaa#.",
00090 ".#aaaaaaaaaaaaaaaaaa#.",
00091 ".#aaa#############aa#.",
00092 ".#aaa#########bbb#aa#.",
00093 ".#aaa#########bbb#aa#.",
00094 ".#aaa#########bbb#aa#.",
00095 ".#aaa#########bbb#aa#.",
00096 ".#aaa#########bbb#aa#.",
00097 "..##################..",
00098 "......................"};
00099 
00100 static const char* const image3_data[] = { 
00101 "22 22 88 2",
00102 "Qt c None",
00103 ".n c #403c3c",
00104 "#p c #a4989a",
00105 ".s c #a5989b",
00106 ".k c #d90026",
00107 ".S c #d90126",
00108 ".B c #d90127",
00109 ".y c #d90227",
00110 ".K c #d90228",
00111 ".H c #da0429",
00112 ".8 c #da042a",
00113 ".V c #da072c",
00114 ".j c #da082d",
00115 ".u c #da092e",
00116 ".R c #dc1135",
00117 ".p c #dc1336",
00118 "#a c #dd1c3e",
00119 "#e c #dd1d3f",
00120 ".5 c #de2243",
00121 ".z c #de2344",
00122 ".7 c #de2445",
00123 ".l c #de2747",
00124 ".L c #df2b4a",
00125 "#b c #df2d4d",
00126 ".d c #e02c4b",
00127 "## c #e02e4d",
00128 ".c c #e03352",
00129 ".e c #e03452",
00130 ".A c #e13755",
00131 ".X c #e13856",
00132 "#t c #e13a58",
00133 "#s c #e23f5c",
00134 ".T c #e2415e",
00135 ".b c #e24561",
00136 "#k c #e34662",
00137 ".6 c #e34b66",
00138 ".J c #e4506a",
00139 ".i c #e45a72",
00140 ".Q c #e54e68",
00141 ".P c #e5506a",
00142 "#j c #e5526b",
00143 ".M c #e5536d",
00144 ".9 c #e5546d",
00145 ".v c #e55c74",
00146 ".0 c #e6556e",
00147 ".G c #e65770",
00148 ".f c #e65d75",
00149 "#u c #e6657c",
00150 ".q c #e7687e",
00151 "#r c #e76d82",
00152 ".t c #ea798d",
00153 ".C c #ea7a8e",
00154 ".Z c #ea8093",
00155 "#h c #ec8194",
00156 ".a c #ec8497",
00157 "#. c #ed8597",
00158 ".O c #ee8a9c",
00159 ".W c #ee8c9d",
00160 "#g c #ee91a2",
00161 ".x c #ef93a3",
00162 ".o c #ef94a4",
00163 ".4 c #f09baa",
00164 ".3 c #f09dab",
00165 ".1 c #f19ead",
00166 ".E c #f1a1af",
00167 ".m c #f2a8b4",
00168 "#c c #f2aab6",
00169 "#v c #f2afba",
00170 ".I c #f3bbc4",
00171 ".g c #f4b6c0",
00172 "#q c #f4bbc4",
00173 ".N c #f5bdc7",
00174 ".D c #f6c4cd",
00175 ".h c #f6c8d0",
00176 ".Y c #f6ccd4",
00177 "#o c #f7ccd3",
00178 ".U c #f7cdd4",
00179 "#m c #f8cfd7",
00180 "#l c #f8d2d9",
00181 ".# c #f8d4da",
00182 "#n c #f8d4db",
00183 ".2 c #f9dae0",
00184 ".r c #f9dde2",
00185 ".w c #fae0e5",
00186 "#f c #fbe4e8",
00187 "#i c #fbe5e9",
00188 "#d c #fce8eb",
00189 ".F c #ffffff",
00190 "QtQtQtQtQtQtQt.#.a.b.c.d.e.f.gQtQtQtQtQtQtQt",
00191 "QtQtQtQtQt.h.i.j.k.k.k.k.k.k.k.l.mQtQtQtQtQt",
00192 "QtQtQt.n.o.p.k.k.k.k.k.k.k.k.k.k.k.q.rQtQtQt",
00193 "QtQt.s.t.u.k.k.k.k.k.k.k.k.k.k.k.k.k.v.wQtQt",
00194 "QtQt.x.k.k.k.k.k.k.k.k.k.y.z.A.p.B.k.k.CQtQt",
00195 "Qt.D.p.k.k.k.k.k.k.k.k.k.j.E.F.G.H.k.k.u.IQt",
00196 "Qt.J.k.k.k.k.k.k.k.k.K.L.M.N.F.O.P.Q.R.S.TQt",
00197 ".U.j.k.k.k.k.k.k.k.k.V.W.F.F.F.F.F.F.X.K.k.Y",
00198 ".Z.k.k.k.k.k.k.k.k.k.H.0.1.2.F.N.3.4.5.B.k.Z",
00199 ".6.k.k.k.k.k.k.k.k.k.k.k.j.E.F.G.H.k.k.k.k.6",
00200 ".7.k.k.k.k.k.k.k.k.k.k.k.8.9#.##.K.k.k.k.k.7",
00201 "#a.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k#a",
00202 "#b.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k#b",
00203 ".f.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.f",
00204 "#c.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.E",
00205 "#d.l.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k#e#f",
00206 "Qt#g.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k#hQt",
00207 "Qt#i#j.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k#k.wQt",
00208 "QtQt#l.A.k.k.k.k.k.k.k.k.k.k.k.k.k.k.A#mQtQt",
00209 "QtQtQt#n.v.k.k.k.k.k.k.k.k.k.k.k.k#j#oQtQtQt",
00210 "QtQtQtQt#p.E.c.k.k.k.k.k.k.k.k.l#g#iQtQtQtQt",
00211 "QtQtQtQtQtQtQt#q#r#s.d.c#t#u#v#dQtQtQtQtQtQt"};
00212 
00213 
00214 /*
00215  *  Constructs a mechatester as a child of 'parent', with the
00216  *  name 'name' and widget flags set to 'f'.
00217  *
00218  */
00219 mechatester::mechatester( QWidget* parent, const char* name, WFlags fl )
00220     : QMainWindow( parent, name, fl ),
00221       image1( (const char **) image1_data ),
00222       image2( (const char **) image2_data ),
00223       image3( (const char **) image3_data )
00224 {
00225     (void)statusBar();
00226     if ( !name )
00227         setName( "mechatester" );
00228     setCentralWidget( new QWidget( this, "qt_central_widget" ) );
00229 
00230     groupBox3 = new QGroupBox( centralWidget(), "groupBox3" );
00231     groupBox3->setGeometry( QRect( 10, 0, 200, 100 ) );
00232 
00233     pbResetPositions = new QPushButton( groupBox3, "pbResetPositions" );
00234     pbResetPositions->setGeometry( QRect( 20, 60, 160, 25 ) );
00235 
00236     pbCheckPositions = new QPushButton( groupBox3, "pbCheckPositions" );
00237     pbCheckPositions->setGeometry( QRect( 20, 30, 160, 25 ) );
00238 
00239     groupBox2 = new QGroupBox( centralWidget(), "groupBox2" );
00240     groupBox2->setGeometry( QRect( 10, 312, 200, 120 ) );
00241 
00242     cbNumIntegration = new QComboBox( FALSE, groupBox2, "cbNumIntegration" );
00243     cbNumIntegration->setGeometry( QRect( 10, 26, 171, 31 ) );
00244 
00245     groupBox1 = new QGroupBox( centralWidget(), "groupBox1" );
00246     groupBox1->setGeometry( QRect( 10, 110, 200, 120 ) );
00247 
00248     cbSpheres = new QCheckBox( groupBox1, "cbSpheres" );
00249     cbSpheres->setGeometry( QRect( 20, 60, 93, 22 ) );
00250     cbSpheres->setChecked( TRUE );
00251 
00252     cbLinks = new QCheckBox( groupBox1, "cbLinks" );
00253     cbLinks->setGeometry( QRect( 20, 90, 94, 22 ) );
00254     cbLinks->setChecked( TRUE );
00255 
00256     cbNormals = new QCheckBox( groupBox1, "cbNormals" );
00257     cbNormals->setGeometry( QRect( 114, 28, 80, 22 ) );
00258 
00259     cbMesh = new QCheckBox( groupBox1, "cbMesh" );
00260     cbMesh->setGeometry( QRect( 20, 28, 94, 22 ) );
00261     cbMesh->setChecked( TRUE );
00262 
00263     groupBox13 = new QGroupBox( centralWidget(), "groupBox13" );
00264     groupBox13->setGeometry( QRect( 10, 440, 200, 130 ) );
00265 
00266     sbStepScale = new QSpinBox( groupBox13, "sbStepScale" );
00267     sbStepScale->setGeometry( QRect( 82, 60, 55, 24 ) );
00268     sbStepScale->setMaxValue( 10000 );
00269     sbStepScale->setValue( 110 );
00270 
00271     sbStepTranslate = new QSpinBox( groupBox13, "sbStepTranslate" );
00272     sbStepTranslate->setGeometry( QRect( 82, 30, 55, 24 ) );
00273     sbStepTranslate->setMaxValue( 10000 );
00274     sbStepTranslate->setValue( 1 );
00275 
00276     sbStepRotate = new QSpinBox( groupBox13, "sbStepRotate" );
00277     sbStepRotate->setGeometry( QRect( 82, 90, 55, 24 ) );
00278     sbStepRotate->setMaxValue( 360 );
00279     sbStepRotate->setMinValue( 0 );
00280     sbStepRotate->setValue( 90 );
00281 
00282     textLabel2_3_4 = new QLabel( groupBox13, "textLabel2_3_4" );
00283     textLabel2_3_4->setGeometry( QRect( 141, 34, 54, 22 ) );
00284 
00285     textLabel2_3_2_2 = new QLabel( groupBox13, "textLabel2_3_2_2" );
00286     textLabel2_3_2_2->setGeometry( QRect( 141, 62, 54, 22 ) );
00287 
00288     textLabel2_3_3_2 = new QLabel( groupBox13, "textLabel2_3_3_2" );
00289     textLabel2_3_3_2->setGeometry( QRect( 141, 90, 54, 22 ) );
00290 
00291     textLabel2_3_3 = new QLabel( groupBox13, "textLabel2_3_3" );
00292     textLabel2_3_3->setGeometry( QRect( 11, 90, 59, 22 ) );
00293 
00294     textLabel2_3_2 = new QLabel( groupBox13, "textLabel2_3_2" );
00295     textLabel2_3_2->setGeometry( QRect( 11, 62, 59, 22 ) );
00296 
00297     textLabel2_3 = new QLabel( groupBox13, "textLabel2_3" );
00298     textLabel2_3->setGeometry( QRect( 11, 34, 59, 22 ) );
00299 
00300     groupBox5 = new QGroupBox( centralWidget(), "groupBox5" );
00301     groupBox5->setGeometry( QRect( 10, 238, 201, 70 ) );
00302 
00303     sliderScale = new QSlider( groupBox5, "sliderScale" );
00304     sliderScale->setGeometry( QRect( 20, 30, 160, 24 ) );
00305     sliderScale->setMinValue( 1 );
00306     sliderScale->setMaxValue( 100 );
00307     sliderScale->setValue( 100 );
00308     sliderScale->setOrientation( QSlider::Horizontal );
00309 
00310     cbMakeMovie = new QCheckBox( centralWidget(), "cbMakeMovie" );
00311     cbMakeMovie->setGeometry( QRect( 20, 580, 110, 22 ) );
00312 
00313     splitter3 = new QSplitter( centralWidget(), "splitter3" );
00314     splitter3->setGeometry( QRect( 220, 0, 750, 890 ) );
00315     splitter3->setOrientation( QSplitter::Vertical );
00316 
00317     openglArea = new COME_MechatestQGLWidget( splitter3, "openglArea" );
00318 
00319     tabSimulation = new QTabWidget( splitter3, "tabSimulation" );
00320 
00321     tab = new QWidget( tabSimulation, "tab" );
00322 
00323     textLabel4_2 = new QLabel( tab, "textLabel4_2" );
00324     textLabel4_2->setGeometry( QRect( 20, 80, 66, 20 ) );
00325 
00326     textLabel2 = new QLabel( tab, "textLabel2" );
00327     textLabel2->setGeometry( QRect( 18, 32, 109, 20 ) );
00328 
00329     textLabel3_4 = new QLabel( tab, "textLabel3_4" );
00330     textLabel3_4->setGeometry( QRect( 142, 57, 46, 20 ) );
00331 
00332     textLabel3 = new QLabel( tab, "textLabel3" );
00333     textLabel3->setGeometry( QRect( 140, 6, 20, 20 ) );
00334 
00335     textLabel3_3_2 = new QLabel( tab, "textLabel3_3_2" );
00336     textLabel3_3_2->setGeometry( QRect( 264, 58, 55, 20 ) );
00337 
00338     textLabel3_2_2 = new QLabel( tab, "textLabel3_2_2" );
00339     textLabel3_2_2->setGeometry( QRect( 203, 57, 32, 20 ) );
00340 
00341     textLabel3_3 = new QLabel( tab, "textLabel3_3" );
00342     textLabel3_3->setGeometry( QRect( 264, 8, 20, 20 ) );
00343 
00344     cbShowForce = new QCheckBox( tab, "cbShowForce" );
00345     cbShowForce->setGeometry( QRect( 328, 28, 100, 22 ) );
00346 
00347     textLabel3_2 = new QLabel( tab, "textLabel3_2" );
00348     textLabel3_2->setGeometry( QRect( 203, 7, 20, 20 ) );
00349 
00350     bpStartForce = new QPushButton( tab, "bpStartForce" );
00351     bpStartForce->setGeometry( QRect( 380, 80, 101, 25 ) );
00352 
00353     leForceY = new QLineEdit( tab, "leForceY" );
00354     leForceY->setGeometry( QRect( 199, 28, 60, 24 ) );
00355     leForceY->setAlignment( int( QLineEdit::AlignRight ) );
00356 
00357     lcdForceClock = new QLCDNumber( tab, "lcdForceClock" );
00358     lcdForceClock->setGeometry( QRect( 381, 54, 100, 23 ) );
00359     lcdForceClock->setFrameShape( QLCDNumber::MenuBarPanel );
00360     lcdForceClock->setFrameShadow( QLCDNumber::Raised );
00361     lcdForceClock->setSmallDecimalPoint( FALSE );
00362     lcdForceClock->setNumDigits( 6 );
00363     lcdForceClock->setSegmentStyle( QLCDNumber::Flat );
00364     lcdForceClock->setProperty( "value", 0 );
00365     lcdForceClock->setProperty( "intValue", 0 );
00366 
00367     leFadeOutForce = new QLineEdit( tab, "leFadeOutForce" );
00368     leFadeOutForce->setGeometry( QRect( 260, 78, 60, 24 ) );
00369     leFadeOutForce->setAlignment( int( QLineEdit::AlignRight ) );
00370 
00371     leForceX = new QLineEdit( tab, "leForceX" );
00372     leForceX->setGeometry( QRect( 138, 28, 60, 24 ) );
00373     leForceX->setAlignment( int( QLineEdit::AlignRight ) );
00374 
00375     leFadeInForce = new QLineEdit( tab, "leFadeInForce" );
00376     leFadeInForce->setGeometry( QRect( 138, 78, 60, 24 ) );
00377     leFadeInForce->setAlignment( int( QLineEdit::AlignRight ) );
00378 
00379     leForceZ = new QLineEdit( tab, "leForceZ" );
00380     leForceZ->setGeometry( QRect( 260, 28, 60, 24 ) );
00381     leForceZ->setAlignment( int( QLineEdit::AlignRight ) );
00382 
00383     leKeepForce = new QLineEdit( tab, "leKeepForce" );
00384     leKeepForce->setGeometry( QRect( 199, 78, 60, 24 ) );
00385     leKeepForce->setAlignment( int( QLineEdit::AlignRight ) );
00386     tabSimulation->insertTab( tab, QString("") );
00387 
00388     tab_2 = new QWidget( tabSimulation, "tab_2" );
00389 
00390     textLabel4_2_2 = new QLabel( tab_2, "textLabel4_2_2" );
00391     textLabel4_2_2->setGeometry( QRect( 20, 80, 66, 20 ) );
00392 
00393     textLabel2_2 = new QLabel( tab_2, "textLabel2_2" );
00394     textLabel2_2->setGeometry( QRect( 16, 32, 116, 20 ) );
00395 
00396     textLabel3_5 = new QLabel( tab_2, "textLabel3_5" );
00397     textLabel3_5->setGeometry( QRect( 140, 6, 20, 20 ) );
00398 
00399     textLabel3_2_2_2 = new QLabel( tab_2, "textLabel3_2_2_2" );
00400     textLabel3_2_2_2->setGeometry( QRect( 203, 57, 32, 20 ) );
00401 
00402     textLabel3_2_3 = new QLabel( tab_2, "textLabel3_2_3" );
00403     textLabel3_2_3->setGeometry( QRect( 203, 7, 20, 20 ) );
00404 
00405     textLabel3_4_2 = new QLabel( tab_2, "textLabel3_4_2" );
00406     textLabel3_4_2->setGeometry( QRect( 142, 57, 46, 20 ) );
00407 
00408     cbShowXXX = new QCheckBox( tab_2, "cbShowXXX" );
00409     cbShowXXX->setGeometry( QRect( 328, 28, 100, 22 ) );
00410 
00411     textLabel3_3_2_2 = new QLabel( tab_2, "textLabel3_3_2_2" );
00412     textLabel3_3_2_2->setGeometry( QRect( 264, 58, 55, 20 ) );
00413 
00414     textLabel3_3_3 = new QLabel( tab_2, "textLabel3_3_3" );
00415     textLabel3_3_3->setGeometry( QRect( 264, 8, 20, 20 ) );
00416 
00417     bpStartDisp = new QPushButton( tab_2, "bpStartDisp" );
00418     bpStartDisp->setGeometry( QRect( 380, 80, 101, 25 ) );
00419 
00420     leDispX = new QLineEdit( tab_2, "leDispX" );
00421     leDispX->setGeometry( QRect( 138, 28, 60, 24 ) );
00422     leDispX->setAlignment( int( QLineEdit::AlignRight ) );
00423 
00424     leDispY = new QLineEdit( tab_2, "leDispY" );
00425     leDispY->setGeometry( QRect( 199, 28, 60, 24 ) );
00426     leDispY->setAlignment( int( QLineEdit::AlignRight ) );
00427 
00428     leDispZ = new QLineEdit( tab_2, "leDispZ" );
00429     leDispZ->setGeometry( QRect( 260, 28, 60, 24 ) );
00430     leDispZ->setAlignment( int( QLineEdit::AlignRight ) );
00431 
00432     leFadeInDisp = new QLineEdit( tab_2, "leFadeInDisp" );
00433     leFadeInDisp->setGeometry( QRect( 138, 78, 60, 24 ) );
00434     leFadeInDisp->setAlignment( int( QLineEdit::AlignRight ) );
00435 
00436     leKeepDisp = new QLineEdit( tab_2, "leKeepDisp" );
00437     leKeepDisp->setGeometry( QRect( 199, 78, 60, 24 ) );
00438     leKeepDisp->setAlignment( int( QLineEdit::AlignRight ) );
00439 
00440     leFadeOutDisp = new QLineEdit( tab_2, "leFadeOutDisp" );
00441     leFadeOutDisp->setGeometry( QRect( 260, 78, 60, 24 ) );
00442     leFadeOutDisp->setAlignment( int( QLineEdit::AlignRight ) );
00443 
00444     lcdDispClock = new QLCDNumber( tab_2, "lcdDispClock" );
00445     lcdDispClock->setGeometry( QRect( 380, 54, 100, 23 ) );
00446     lcdDispClock->setFrameShape( QLCDNumber::MenuBarPanel );
00447     lcdDispClock->setFrameShadow( QLCDNumber::Raised );
00448     lcdDispClock->setSmallDecimalPoint( FALSE );
00449     lcdDispClock->setNumDigits( 6 );
00450     lcdDispClock->setSegmentStyle( QLCDNumber::Flat );
00451     lcdDispClock->setProperty( "value", 0 );
00452     lcdDispClock->setProperty( "intValue", 0 );
00453     tabSimulation->insertTab( tab_2, QString("") );
00454 
00455     splitter4 = new QSplitter( centralWidget(), "splitter4" );
00456     splitter4->setGeometry( QRect( 980, 0, 279, 780 ) );
00457     splitter4->setOrientation( QSplitter::Vertical );
00458 
00459     gbMaterials = new QGroupBox( splitter4, "gbMaterials" );
00460 
00461     tMaterials = new QTable( gbMaterials, "tMaterials" );
00462     tMaterials->setNumCols( tMaterials->numCols() + 1 );
00463     tMaterials->horizontalHeader()->setLabel( tMaterials->numCols() - 1, tr( "Value" ) );
00464     tMaterials->setNumCols( tMaterials->numCols() + 1 );
00465     tMaterials->horizontalHeader()->setLabel( tMaterials->numCols() - 1, tr( "Unity" ) );
00466     tMaterials->setNumCols( tMaterials->numCols() + 1 );
00467     tMaterials->horizontalHeader()->setLabel( tMaterials->numCols() - 1, tr( "Range" ) );
00468     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00469     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Color R" ) );
00470     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00471     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Color G" ) );
00472     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00473     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Color B" ) );
00474     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00475     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Damping" ) );
00476     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00477     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Density" ) );
00478     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00479     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Permeability" ) );
00480     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00481     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Liquid Rate" ) );
00482     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00483     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Medium" ) );
00484     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00485     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Elasticity" ) );
00486     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00487     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Shear" ) );
00488     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00489     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Hook's (x)" ) );
00490     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00491     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Hook's (y)" ) );
00492     tMaterials->setNumRows( tMaterials->numRows() + 1 );
00493     tMaterials->verticalHeader()->setLabel( tMaterials->numRows() - 1, tr( "Hook's (z)" ) );
00494     tMaterials->setGeometry( QRect( 10, 240, 260, 320 ) );
00495     tMaterials->setFrameShape( QTable::StyledPanel );
00496     tMaterials->setFrameShadow( QTable::Sunken );
00497     tMaterials->setMargin( 0 );
00498     tMaterials->setVScrollBarMode( QTable::AlwaysOff );
00499     tMaterials->setHScrollBarMode( QTable::AlwaysOn );
00500     tMaterials->setNumRows( 13 );
00501     tMaterials->setNumCols( 3 );
00502     tMaterials->setSelectionMode( QTable::SingleRow );
00503 
00504     listMaterials = new QListBox( gbMaterials, "listMaterials" );
00505     listMaterials->setGeometry( QRect( 10, 20, 260, 130 ) );
00506     listMaterials->setAcceptDrops( TRUE );
00507 
00508     pbAssociate = new QPushButton( gbMaterials, "pbAssociate" );
00509     pbAssociate->setGeometry( QRect( 9, 200, 260, 31 ) );
00510 
00511     pbDelete = new QPushButton( gbMaterials, "pbDelete" );
00512     pbDelete->setGeometry( QRect( 150, 160, 120, 31 ) );
00513 
00514     pbNew = new QPushButton( gbMaterials, "pbNew" );
00515     pbNew->setGeometry( QRect( 10, 160, 130, 31 ) );
00516 
00517     frame4 = new QFrame( splitter4, "frame4" );
00518     frame4->setFrameShape( QFrame::StyledPanel );
00519     frame4->setFrameShadow( QFrame::Raised );
00520 
00521     textLabel6 = new QLabel( frame4, "textLabel6" );
00522     textLabel6->setGeometry( QRect( 20, 93, 30, 20 ) );
00523 
00524     sbFPS = new QSpinBox( frame4, "sbFPS" );
00525     sbFPS->setGeometry( QRect( 50, 89, 70, 24 ) );
00526     sbFPS->setMaxValue( 99999 );
00527     sbFPS->setMinValue( 1 );
00528     sbFPS->setValue( 500 );
00529 
00530     textLabel7 = new QLabel( frame4, "textLabel7" );
00531     textLabel7->setGeometry( QRect( 125, 93, 66, 20 ) );
00532 
00533     leTimeStep = new QLineEdit( frame4, "leTimeStep" );
00534     leTimeStep->setGeometry( QRect( 192, 89, 70, 24 ) );
00535     leTimeStep->setAlignment( int( QLineEdit::AlignRight ) );
00536 
00537     textLabel7_2 = new QLabel( frame4, "textLabel7_2" );
00538     textLabel7_2->setGeometry( QRect( 124, 121, 66, 20 ) );
00539 
00540     cbConfigure = new QCheckBox( frame4, "cbConfigure" );
00541     cbConfigure->setGeometry( QRect( 19, 120, 94, 22 ) );
00542     cbConfigure->setChecked( TRUE );
00543 
00544     lePrecision = new QLineEdit( frame4, "lePrecision" );
00545     lePrecision->setGeometry( QRect( 191, 117, 70, 24 ) );
00546     lePrecision->setAlignment( int( QLineEdit::AlignRight ) );
00547 
00548     textLabel4 = new QLabel( frame4, "textLabel4" );
00549     textLabel4->setGeometry( QRect( 89, 34, 16, 20 ) );
00550     QFont textLabel4_font(  textLabel4->font() );
00551     textLabel4_font.setPointSize( 15 );
00552     textLabel4->setFont( textLabel4_font ); 
00553 
00554     tlElasticity = new QLabel( frame4, "tlElasticity" );
00555     tlElasticity->setGeometry( QRect( 5, 28, 80, 30 ) );
00556     QFont tlElasticity_font(  tlElasticity->font() );
00557     tlElasticity_font.setPointSize( 13 );
00558     tlElasticity->setFont( tlElasticity_font ); 
00559     tlElasticity->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
00560 
00561     tlElasticity_2 = new QLabel( frame4, "tlElasticity_2" );
00562     tlElasticity_2->setGeometry( QRect( 158, 154, 20, 30 ) );
00563     QFont tlElasticity_2_font(  tlElasticity_2->font() );
00564     tlElasticity_2->setFont( tlElasticity_2_font ); 
00565     tlElasticity_2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
00566 
00567     textLabel4_3 = new QLabel( frame4, "textLabel4_3" );
00568     textLabel4_3->setGeometry( QRect( 182, 160, 16, 20 ) );
00569     QFont textLabel4_3_font(  textLabel4_3->font() );
00570     textLabel4_3->setFont( textLabel4_3_font ); 
00571 
00572     line1_2 = new QFrame( frame4, "line1_2" );
00573     line1_2->setGeometry( QRect( 198, 162, 60, 16 ) );
00574     line1_2->setFrameShape( QFrame::HLine );
00575     line1_2->setFrameShadow( QFrame::Sunken );
00576     line1_2->setFrameShape( QFrame::HLine );
00577 
00578     tlDenominator_2 = new QLabel( frame4, "tlDenominator_2" );
00579     tlDenominator_2->setGeometry( QRect( 200, 170, 58, 24 ) );
00580     QFont tlDenominator_2_font(  tlDenominator_2->font() );
00581     tlDenominator_2->setFont( tlDenominator_2_font ); 
00582     tlDenominator_2->setAlignment( int( QLabel::AlignCenter ) );
00583 
00584     tlNumerator_2 = new QLabel( frame4, "tlNumerator_2" );
00585     tlNumerator_2->setGeometry( QRect( 198, 150, 60, 17 ) );
00586     QFont tlNumerator_2_font(  tlNumerator_2->font() );
00587     tlNumerator_2->setFont( tlNumerator_2_font ); 
00588     tlNumerator_2->setAlignment( int( QLabel::AlignCenter ) );
00589 
00590     tlNumerator = new QLabel( frame4, "tlNumerator" );
00591     tlNumerator->setGeometry( QRect( 105, 12, 160, 30 ) );
00592     QFont tlNumerator_font(  tlNumerator->font() );
00593     tlNumerator_font.setPointSize( 12 );
00594     tlNumerator->setFont( tlNumerator_font ); 
00595     tlNumerator->setAlignment( int( QLabel::AlignCenter ) );
00596 
00597     tlDenominator = new QLabel( frame4, "tlDenominator" );
00598     tlDenominator->setGeometry( QRect( 107, 50, 160, 24 ) );
00599     QFont tlDenominator_font(  tlDenominator->font() );
00600     tlDenominator_font.setPointSize( 12 );
00601     tlDenominator->setFont( tlDenominator_font ); 
00602     tlDenominator->setAlignment( int( QLabel::AlignCenter ) );
00603 
00604     line1 = new QFrame( frame4, "line1" );
00605     line1->setGeometry( QRect( 105, 34, 160, 20 ) );
00606     line1->setFrameShape( QFrame::HLine );
00607     line1->setFrameShadow( QFrame::Sunken );
00608     line1->setFrameShape( QFrame::HLine );
00609 
00610     // actions
00611     fileOpenAction = new QAction( this, "fileOpenAction" );
00612     fileOpenAction->setIconSet( QIconSet( image1 ) );
00613     fileExportAsAction = new QAction( this, "fileExportAsAction" );
00614     fileExportAsAction->setIconSet( QIconSet( image2 ) );
00615     fileExitAction = new QAction( this, "fileExitAction" );
00616     helpAboutAction = new QAction( this, "helpAboutAction" );
00617     helpAboutAction->setIconSet( QIconSet( image3 ) );
00618 
00619 
00620     // toolbars
00621     toolBar = new QToolBar( QString(""), this, DockTop ); 
00622 
00623     fileOpenAction->addTo( toolBar );
00624     fileExportAsAction->addTo( toolBar );
00625     fileExitAction->addTo( toolBar );
00626 
00627 
00628     // menubar
00629     MenuBar = new QMenuBar( this, "MenuBar" );
00630 
00631     MenuBar->setGeometry( QRect( 0, 0, 1271, 23 ) );
00632 
00633     fileMenu = new QPopupMenu( this );
00634     fileOpenAction->addTo( fileMenu );
00635     fileExportAsAction->addTo( fileMenu );
00636     fileMenu->insertSeparator();
00637     fileExitAction->addTo( fileMenu );
00638     MenuBar->insertItem( QString(""), fileMenu, 2 );
00639 
00640     helpMenu = new QPopupMenu( this );
00641     helpAboutAction->addTo( helpMenu );
00642     MenuBar->insertItem( QString(""), helpMenu, 3 );
00643 
00644     languageChange();
00645     resize( QSize(1271, 967).expandedTo(minimumSizeHint()) );
00646     clearWState( WState_Polished );
00647 
00648     // signals and slots connections
00649     connect( fileOpenAction, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
00650     connect( fileExitAction, SIGNAL( activated() ), this, SLOT( fileExit() ) );
00651     connect( helpAboutAction, SIGNAL( activated() ), this, SLOT( helpAbout() ) );
00652     connect( fileExportAsAction, SIGNAL( activated() ), this, SLOT( fileExportAs() ) );
00653     connect( cbSpheres, SIGNAL( stateChanged(int) ), this, SLOT( viewOptions() ) );
00654     connect( listMaterials, SIGNAL( selectionChanged() ), this, SLOT( selectMaterial() ) );
00655     connect( tMaterials, SIGNAL( valueChanged(int,int) ), this, SLOT( materialChanged(int,int) ) );
00656     connect( pbNew, SIGNAL( clicked() ), this, SLOT( clickedNewMaterial() ) );
00657     connect( pbDelete, SIGNAL( clicked() ), this, SLOT( clickedDelMaterial() ) );
00658     connect( pbAssociate, SIGNAL( clicked() ), this, SLOT( clickedAssociate() ) );
00659     connect( bpStartDisp, SIGNAL( clicked() ), this, SLOT( clickedStartSim() ) );
00660     connect( bpStartForce, SIGNAL( clicked() ), this, SLOT( clickedStartSim() ) );
00661     connect( sbFPS, SIGNAL( valueChanged(int) ), this, SLOT( fpsChange() ) );
00662     connect( leTimeStep, SIGNAL( lostFocus() ), this, SLOT( timestepChanged() ) );
00663     connect( cbNumIntegration, SIGNAL( activated(int) ), this, SLOT( changedNumIntegration() ) );
00664     connect( pbCheckPositions, SIGNAL( clicked() ), this, SLOT( clickedCheck() ) );
00665     connect( pbResetPositions, SIGNAL( clicked() ), this, SLOT( clickedReset() ) );
00666     init();
00667 }
00668 
00669 /*
00670  *  Destroys the object and frees any allocated resources
00671  */
00672 mechatester::~mechatester()
00673 {
00674     // no need to delete child widgets, Qt does it all for us
00675 }
00676 
00677 /*
00678  *  Sets the strings of the subwidgets using the current
00679  *  language.
00680  */
00681 void mechatester::languageChange()
00682 {
00683     setCaption( tr( "Mechatester v1.0" ) );
00684     groupBox3->setTitle( tr( "Molecules positions" ) );
00685     pbResetPositions->setText( tr( "Reset" ) );
00686     QToolTip::add( pbResetPositions, tr( "Click to reset positions to last chack point." ) );
00687     pbCheckPositions->setText( tr( "Set check point" ) );
00688     QToolTip::add( pbCheckPositions, tr( "Click to set current positions as intitial and be able to restore them." ) );
00689     groupBox2->setTitle( tr( "Numerical integration" ) );
00690     cbNumIntegration->clear();
00691     cbNumIntegration->insertItem( tr( "Euler" ) );
00692     cbNumIntegration->insertItem( tr( "Runge-Kutta 4" ) );
00693     groupBox1->setTitle( tr( "Display options" ) );
00694     cbSpheres->setText( tr( "Spheres" ) );
00695     cbLinks->setText( tr( "Links" ) );
00696     cbNormals->setText( tr( "Normals" ) );
00697     cbMesh->setText( tr( "Mesh" ) );
00698     groupBox13->setTitle( tr( "Transformations" ) );
00699     QToolTip::add( groupBox13, tr( "Use keyboard to apply on selected object." ) );
00700     QToolTip::add( sbStepScale, tr( "Alt+Arrows/PgUpDown" ) );
00701     QToolTip::add( sbStepTranslate, tr( "Ctrl+arrows/PgUpDown" ) );
00702     QToolTip::add( sbStepRotate, tr( "Shift+Arrows/PgUpDown" ) );
00703     textLabel2_3_4->setText( tr( "Pixels" ) );
00704     QToolTip::add( textLabel2_3_4, tr( "Ctrl+Arrows/PgUpDown" ) );
00705     textLabel2_3_2_2->setText( tr( "%" ) );
00706     QToolTip::add( textLabel2_3_2_2, tr( "Alt+Arrows/PgUpDown" ) );
00707     textLabel2_3_3_2->setText( tr( "Degrees" ) );
00708     QToolTip::add( textLabel2_3_3_2, tr( "Shift+Arrows/PgUpDown" ) );
00709     textLabel2_3_3->setText( tr( "Rotate" ) );
00710     QToolTip::add( textLabel2_3_3, tr( "Shift+Arrows/PgUpDown" ) );
00711     textLabel2_3_2->setText( tr( "Scale" ) );
00712     QToolTip::add( textLabel2_3_2, tr( "Alt+Arrows/PgUpDown" ) );
00713     textLabel2_3->setText( tr( "Translate" ) );
00714     QToolTip::add( textLabel2_3, tr( "Ctrl+Arrows/PgUpDown" ) );
00715     groupBox5->setTitle( tr( "Spheres view scale" ) );
00716     cbMakeMovie->setText( tr( "Export video" ) );
00717     textLabel4_2->setText( tr( "Time (s):" ) );
00718     textLabel2->setText( tr( "Force vector (N):" ) );
00719     textLabel3_4->setText( tr( "Fade in" ) );
00720     textLabel3->setText( tr( "x" ) );
00721     textLabel3_3_2->setText( tr( "Fade out" ) );
00722     textLabel3_2_2->setText( tr( "Keep" ) );
00723     textLabel3_3->setText( tr( "z" ) );
00724     cbShowForce->setText( tr( "Show vector" ) );
00725     textLabel3_2->setText( tr( "y" ) );
00726     bpStartForce->setText( tr( "Start" ) );
00727     leForceY->setText( tr( "0.0" ) );
00728     leFadeOutForce->setText( tr( "0.0" ) );
00729     leForceX->setText( tr( "0.0" ) );
00730     leFadeInForce->setText( tr( "0.0" ) );
00731     leForceZ->setText( tr( "1.0" ) );
00732     leKeepForce->setText( tr( "4.0" ) );
00733     tabSimulation->changeTab( tab, tr( "Force test" ) );
00734     textLabel4_2_2->setText( tr( "Time (s):" ) );
00735     textLabel2_2->setText( tr( "Displacement (m):" ) );
00736     textLabel3_5->setText( tr( "x" ) );
00737     textLabel3_2_2_2->setText( tr( "Keep" ) );
00738     textLabel3_2_3->setText( tr( "y" ) );
00739     textLabel3_4_2->setText( tr( "Fade in" ) );
00740     cbShowXXX->setText( tr( "Show XXX" ) );
00741     textLabel3_3_2_2->setText( tr( "Fade out" ) );
00742     textLabel3_3_3->setText( tr( "z" ) );
00743     bpStartDisp->setText( tr( "Start" ) );
00744     leDispX->setText( tr( "0.0" ) );
00745     leDispY->setText( tr( "0.0" ) );
00746     leDispZ->setText( tr( "-1.0" ) );
00747     leFadeInDisp->setText( tr( "0.0" ) );
00748     leKeepDisp->setText( tr( "2.0" ) );
00749     leFadeOutDisp->setText( tr( "0.0" ) );
00750     tabSimulation->changeTab( tab_2, tr( "Displacement test" ) );
00751     gbMaterials->setTitle( tr( "Materials" ) );
00752     tMaterials->horizontalHeader()->setLabel( 0, tr( "Value" ) );
00753     tMaterials->horizontalHeader()->setLabel( 1, tr( "Unity" ) );
00754     tMaterials->horizontalHeader()->setLabel( 2, tr( "Range" ) );
00755     tMaterials->verticalHeader()->setLabel( 0, tr( "Color R" ) );
00756     tMaterials->verticalHeader()->setLabel( 1, tr( "Color G" ) );
00757     tMaterials->verticalHeader()->setLabel( 2, tr( "Color B" ) );
00758     tMaterials->verticalHeader()->setLabel( 3, tr( "Damping" ) );
00759     tMaterials->verticalHeader()->setLabel( 4, tr( "Density" ) );
00760     tMaterials->verticalHeader()->setLabel( 5, tr( "Permeability" ) );
00761     tMaterials->verticalHeader()->setLabel( 6, tr( "Liquid Rate" ) );
00762     tMaterials->verticalHeader()->setLabel( 7, tr( "Medium" ) );
00763     tMaterials->verticalHeader()->setLabel( 8, tr( "Elasticity" ) );
00764     tMaterials->verticalHeader()->setLabel( 9, tr( "Shear" ) );
00765     tMaterials->verticalHeader()->setLabel( 10, tr( "Hook's (x)" ) );
00766     tMaterials->verticalHeader()->setLabel( 11, tr( "Hook's (y)" ) );
00767     tMaterials->verticalHeader()->setLabel( 12, tr( "Hook's (z)" ) );
00768     listMaterials->setCurrentItem( -1 );
00769     pbAssociate->setText( tr( "Associate material to object" ) );
00770     QToolTip::add( pbAssociate, tr( "Associate selected object to selected material." ) );
00771     pbDelete->setText( tr( "Del material" ) );
00772     pbNew->setText( tr( "New material" ) );
00773     textLabel6->setText( tr( "FPS:" ) );
00774     textLabel7->setText( tr( "Timestep:" ) );
00775     leTimeStep->setText( tr( "0.002" ) );
00776     textLabel7_2->setText( tr( "Precision:" ) );
00777     cbConfigure->setText( tr( "Configure" ) );
00778     lePrecision->setText( tr( "1" ) );
00779     textLabel4->setText( tr( "=" ) );
00780     tlElasticity->setText( tr( "E" ) );
00781     tlElasticity_2->setText( tr( "E" ) );
00782     textLabel4_3->setText( tr( "=" ) );
00783     tlDenominator_2->setText( tr( "deltal * A" ) );
00784     tlNumerator_2->setText( tr( "F * lo" ) );
00785     tlNumerator->setText( tr( "F * lo" ) );
00786     tlDenominator->setText( tr( "deltal * A" ) );
00787     fileOpenAction->setText( tr( "Open" ) );
00788     fileOpenAction->setMenuText( tr( "&Open..." ) );
00789     fileOpenAction->setAccel( tr( "Ctrl+O" ) );
00790     fileExportAsAction->setText( tr( "Export As" ) );
00791     fileExportAsAction->setMenuText( tr( "Export &As..." ) );
00792     fileExportAsAction->setAccel( QString::null );
00793     fileExitAction->setText( tr( "E&xit" ) );
00794     fileExitAction->setMenuText( tr( "E&xit" ) );
00795     fileExitAction->setAccel( QString::null );
00796     helpAboutAction->setText( tr( "About" ) );
00797     toolBar->setLabel( tr( "Tools" ) );
00798     MenuBar->findItem( 2 )->setText( tr( "&File" ) );
00799     MenuBar->findItem( 3 )->setText( tr( "&Help" ) );
00800 }
00801 

Generated on Thu Dec 1 10:13:38 2005 for COME - Biomechanical Joint Model by  doxygen 1.4.5