Biomechanical Joint Model
 Author: Anderson Maciel

modeljoint.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'modeljoint.ui'
00003 **
00004 ** Created: Mon Jun 13 20:14:42 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 "modeljoint.h"
00011 
00012 #include <qvariant.h>
00013 #include <come_modeljointqglwidget.h>
00014 #include <qgroupbox.h>
00015 #include <qcombobox.h>
00016 #include <qslider.h>
00017 #include <qtextedit.h>
00018 #include <qlabel.h>
00019 #include <qspinbox.h>
00020 #include <qcheckbox.h>
00021 #include <qbuttongroup.h>
00022 #include <qradiobutton.h>
00023 #include <qsplitter.h>
00024 #include <qtabwidget.h>
00025 #include <qwidget.h>
00026 #include <qlcdnumber.h>
00027 #include <qpushbutton.h>
00028 #include <qlineedit.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 "modeljoint.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 modeljoint as a child of 'parent', with the
00216  *  name 'name' and widget flags set to 'f'.
00217  *
00218  */
00219 modeljoint::modeljoint( 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( "modeljoint" );
00228     setCentralWidget( new QWidget( this, "qt_central_widget" ) );
00229 
00230     groupBox2_2 = new QGroupBox( centralWidget(), "groupBox2_2" );
00231     groupBox2_2->setGeometry( QRect( 10, 390, 200, 80 ) );
00232 
00233     cbNumIntegration = new QComboBox( FALSE, groupBox2_2, "cbNumIntegration" );
00234     cbNumIntegration->setGeometry( QRect( 10, 26, 171, 31 ) );
00235 
00236     groupBox5 = new QGroupBox( centralWidget(), "groupBox5" );
00237     groupBox5->setGeometry( QRect( 10, 320, 201, 70 ) );
00238 
00239     sliderScale = new QSlider( groupBox5, "sliderScale" );
00240     sliderScale->setGeometry( QRect( 20, 30, 160, 24 ) );
00241     sliderScale->setMinValue( 1 );
00242     sliderScale->setMaxValue( 100 );
00243     sliderScale->setValue( 100 );
00244     sliderScale->setOrientation( QSlider::Horizontal );
00245 
00246     groupBox2 = new QGroupBox( centralWidget(), "groupBox2" );
00247     groupBox2->setGeometry( QRect( 10, 620, 200, 100 ) );
00248 
00249     textEdit1 = new QTextEdit( groupBox2, "textEdit1" );
00250     textEdit1->setGeometry( QRect( 10, 20, 180, 72 ) );
00251 
00252     groupBox13 = new QGroupBox( centralWidget(), "groupBox13" );
00253     groupBox13->setGeometry( QRect( 10, 470, 200, 150 ) );
00254 
00255     textLabel2_3_2 = new QLabel( groupBox13, "textLabel2_3_2" );
00256     textLabel2_3_2->setGeometry( QRect( 11, 52, 59, 22 ) );
00257 
00258     textLabel2_3_4 = new QLabel( groupBox13, "textLabel2_3_4" );
00259     textLabel2_3_4->setGeometry( QRect( 141, 24, 54, 22 ) );
00260 
00261     sbStepScale = new QSpinBox( groupBox13, "sbStepScale" );
00262     sbStepScale->setGeometry( QRect( 82, 50, 55, 24 ) );
00263     sbStepScale->setMaxValue( 10000 );
00264     sbStepScale->setValue( 110 );
00265 
00266     textLabel2_3_3_2 = new QLabel( groupBox13, "textLabel2_3_3_2" );
00267     textLabel2_3_3_2->setGeometry( QRect( 141, 80, 54, 22 ) );
00268 
00269     textLabel2_3_3 = new QLabel( groupBox13, "textLabel2_3_3" );
00270     textLabel2_3_3->setGeometry( QRect( 11, 80, 59, 22 ) );
00271 
00272     textLabel2_3 = new QLabel( groupBox13, "textLabel2_3" );
00273     textLabel2_3->setGeometry( QRect( 11, 24, 59, 22 ) );
00274 
00275     textLabel2_3_2_2 = new QLabel( groupBox13, "textLabel2_3_2_2" );
00276     textLabel2_3_2_2->setGeometry( QRect( 141, 52, 54, 22 ) );
00277 
00278     sbStepRotate = new QSpinBox( groupBox13, "sbStepRotate" );
00279     sbStepRotate->setGeometry( QRect( 82, 80, 55, 24 ) );
00280     sbStepRotate->setMaxValue( 360 );
00281     sbStepRotate->setMinValue( 0 );
00282     sbStepRotate->setValue( 2 );
00283 
00284     sbStepTranslate = new QSpinBox( groupBox13, "sbStepTranslate" );
00285     sbStepTranslate->setGeometry( QRect( 83, 20, 55, 24 ) );
00286     sbStepTranslate->setMaxValue( 10000 );
00287     sbStepTranslate->setValue( 5 );
00288 
00289     tlNominal = new QLabel( groupBox13, "tlNominal" );
00290     tlNominal->setGeometry( QRect( 160, 118, 30, 20 ) );
00291     QFont tlNominal_font(  tlNominal->font() );
00292     tlNominal->setFont( tlNominal_font ); 
00293     tlNominal->setFrameShape( QLabel::ToolBarPanel );
00294     tlNominal->setFrameShadow( QLabel::Plain );
00295     tlNominal->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
00296 
00297     sliderNominal = new QSlider( groupBox13, "sliderNominal" );
00298     sliderNominal->setGeometry( QRect( 12, 116, 140, 24 ) );
00299     sliderNominal->setFocusPolicy( QSlider::ClickFocus );
00300     sliderNominal->setMinValue( -100 );
00301     sliderNominal->setMaxValue( 100 );
00302     sliderNominal->setLineStep( 1 );
00303     sliderNominal->setPageStep( 10 );
00304     sliderNominal->setOrientation( QSlider::Horizontal );
00305     sliderNominal->setTickmarks( QSlider::Both );
00306     sliderNominal->setTickInterval( 10 );
00307 
00308     groupBox2_2_2 = new QGroupBox( centralWidget(), "groupBox2_2_2" );
00309     groupBox2_2_2->setGeometry( QRect( 10, 0, 200, 90 ) );
00310 
00311     cb2ndPass = new QCheckBox( groupBox2_2_2, "cb2ndPass" );
00312     cb2ndPass->setGeometry( QRect( 10, 62, 102, 22 ) );
00313 
00314     cbCollisionTreatment = new QComboBox( FALSE, groupBox2_2_2, "cbCollisionTreatment" );
00315     cbCollisionTreatment->setGeometry( QRect( 10, 26, 171, 31 ) );
00316 
00317     gbColor = new QButtonGroup( centralWidget(), "gbColor" );
00318     gbColor->setGeometry( QRect( 10, 230, 201, 90 ) );
00319 
00320     rbCollision = new QRadioButton( gbColor, "rbCollision" );
00321     rbCollision->setGeometry( QRect( 20, 58, 103, 22 ) );
00322 
00323     rbStress = new QRadioButton( gbColor, "rbStress" );
00324     rbStress->setGeometry( QRect( 20, 38, 103, 22 ) );
00325 
00326     rbMaterial = new QRadioButton( gbColor, "rbMaterial" );
00327     rbMaterial->setGeometry( QRect( 20, 18, 103, 22 ) );
00328     rbMaterial->setChecked( TRUE );
00329 
00330     groupBox1 = new QGroupBox( centralWidget(), "groupBox1" );
00331     groupBox1->setGeometry( QRect( 10, 90, 200, 140 ) );
00332 
00333     cbNormals = new QCheckBox( groupBox1, "cbNormals" );
00334     cbNormals->setGeometry( QRect( 100, 28, 80, 22 ) );
00335 
00336     cbMesh = new QCheckBox( groupBox1, "cbMesh" );
00337     cbMesh->setGeometry( QRect( 20, 28, 60, 22 ) );
00338     cbMesh->setChecked( TRUE );
00339 
00340     cbTexture = new QCheckBox( groupBox1, "cbTexture" );
00341     cbTexture->setGeometry( QRect( 100, 53, 70, 22 ) );
00342 
00343     cbCollisionVolume = new QCheckBox( groupBox1, "cbCollisionVolume" );
00344     cbCollisionVolume->setGeometry( QRect( 99, 75, 95, 22 ) );
00345 
00346     cbProximities = new QCheckBox( groupBox1, "cbProximities" );
00347     cbProximities->setGeometry( QRect( 20, 100, 80, 20 ) );
00348 
00349     cbSpheres = new QCheckBox( groupBox1, "cbSpheres" );
00350     cbSpheres->setGeometry( QRect( 20, 52, 70, 22 ) );
00351     cbSpheres->setChecked( TRUE );
00352 
00353     cbLinks = new QCheckBox( groupBox1, "cbLinks" );
00354     cbLinks->setGeometry( QRect( 20, 75, 50, 22 ) );
00355     cbLinks->setChecked( FALSE );
00356 
00357     splitter1 = new QSplitter( centralWidget(), "splitter1" );
00358     splitter1->setGeometry( QRect( 214, -2, 810, 750 ) );
00359     splitter1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, splitter1->sizePolicy().hasHeightForWidth() ) );
00360     splitter1->setOrientation( QSplitter::Vertical );
00361 
00362     openglArea = new COME_ModelJointQGLWidget( splitter1, "openglArea" );
00363 
00364     tabSimulation = new QTabWidget( splitter1, "tabSimulation" );
00365     tabSimulation->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, tabSimulation->sizePolicy().hasHeightForWidth() ) );
00366     tabSimulation->setAcceptDrops( FALSE );
00367 
00368     tab = new QWidget( tabSimulation, "tab" );
00369 
00370     lcdForceClock = new QLCDNumber( tab, "lcdForceClock" );
00371     lcdForceClock->setGeometry( QRect( 681, 54, 100, 23 ) );
00372     lcdForceClock->setFrameShape( QLCDNumber::MenuBarPanel );
00373     lcdForceClock->setFrameShadow( QLCDNumber::Raised );
00374     lcdForceClock->setSmallDecimalPoint( FALSE );
00375     lcdForceClock->setNumDigits( 6 );
00376     lcdForceClock->setSegmentStyle( QLCDNumber::Flat );
00377     lcdForceClock->setProperty( "value", 0 );
00378     lcdForceClock->setProperty( "intValue", 0 );
00379 
00380     pbPause = new QPushButton( tab, "pbPause" );
00381     pbPause->setGeometry( QRect( 750, 80, 30, 25 ) );
00382     pbPause->setToggleButton( FALSE );
00383 
00384     sbFPS = new QSpinBox( tab, "sbFPS" );
00385     sbFPS->setGeometry( QRect( 50, 28, 70, 24 ) );
00386     sbFPS->setMaxValue( 99999 );
00387     sbFPS->setMinValue( 1 );
00388     sbFPS->setValue( 500 );
00389 
00390     leTimeStep = new QLineEdit( tab, "leTimeStep" );
00391     leTimeStep->setGeometry( QRect( 200, 28, 70, 24 ) );
00392     leTimeStep->setAlignment( int( QLineEdit::AlignRight ) );
00393 
00394     bpStartForce = new QPushButton( tab, "bpStartForce" );
00395     bpStartForce->setEnabled( TRUE );
00396     bpStartForce->setGeometry( QRect( 650, 80, 90, 25 ) );
00397     bpStartForce->setToggleButton( FALSE );
00398     bpStartForce->setOn( FALSE );
00399 
00400     textLabel2 = new QLabel( tab, "textLabel2" );
00401     textLabel2->setGeometry( QRect( 357, 32, 100, 20 ) );
00402 
00403     textLabel3_3_2 = new QLabel( tab, "textLabel3_3_2" );
00404     textLabel3_3_2->setGeometry( QRect( 584, 58, 55, 20 ) );
00405 
00406     textLabel3_2 = new QLabel( tab, "textLabel3_2" );
00407     textLabel3_2->setGeometry( QRect( 523, 7, 20, 20 ) );
00408 
00409     leForceX = new QLineEdit( tab, "leForceX" );
00410     leForceX->setGeometry( QRect( 458, 28, 60, 24 ) );
00411     leForceX->setAlignment( int( QLineEdit::AlignRight ) );
00412 
00413     leFadeOutForce = new QLineEdit( tab, "leFadeOutForce" );
00414     leFadeOutForce->setGeometry( QRect( 580, 78, 60, 24 ) );
00415     leFadeOutForce->setAlignment( int( QLineEdit::AlignRight ) );
00416 
00417     textLabel4_2 = new QLabel( tab, "textLabel4_2" );
00418     textLabel4_2->setGeometry( QRect( 407, 80, 50, 20 ) );
00419 
00420     cbShowForce = new QCheckBox( tab, "cbShowForce" );
00421     cbShowForce->setGeometry( QRect( 648, 28, 100, 22 ) );
00422 
00423     leFadeInForce = new QLineEdit( tab, "leFadeInForce" );
00424     leFadeInForce->setGeometry( QRect( 458, 78, 60, 24 ) );
00425     leFadeInForce->setAlignment( int( QLineEdit::AlignRight ) );
00426 
00427     leForceZ = new QLineEdit( tab, "leForceZ" );
00428     leForceZ->setGeometry( QRect( 580, 28, 60, 24 ) );
00429     leForceZ->setAlignment( int( QLineEdit::AlignRight ) );
00430 
00431     leForceY = new QLineEdit( tab, "leForceY" );
00432     leForceY->setGeometry( QRect( 519, 28, 60, 24 ) );
00433     leForceY->setAlignment( int( QLineEdit::AlignRight ) );
00434 
00435     leKeepForce = new QLineEdit( tab, "leKeepForce" );
00436     leKeepForce->setGeometry( QRect( 519, 78, 60, 24 ) );
00437     leKeepForce->setAlignment( int( QLineEdit::AlignRight ) );
00438 
00439     textLabel3 = new QLabel( tab, "textLabel3" );
00440     textLabel3->setGeometry( QRect( 460, 6, 20, 20 ) );
00441 
00442     textLabel3_3 = new QLabel( tab, "textLabel3_3" );
00443     textLabel3_3->setGeometry( QRect( 584, 8, 20, 20 ) );
00444 
00445     textLabel3_2_2 = new QLabel( tab, "textLabel3_2_2" );
00446     textLabel3_2_2->setGeometry( QRect( 523, 57, 32, 20 ) );
00447 
00448     textLabel3_4 = new QLabel( tab, "textLabel3_4" );
00449     textLabel3_4->setGeometry( QRect( 462, 57, 46, 20 ) );
00450 
00451     cbExportPrecalculation = new QCheckBox( tab, "cbExportPrecalculation" );
00452     cbExportPrecalculation->setGeometry( QRect( 20, 64, 170, 20 ) );
00453 
00454     textLabel6 = new QLabel( tab, "textLabel6" );
00455     textLabel6->setGeometry( QRect( 19, 31, 30, 20 ) );
00456 
00457     textLabel7 = new QLabel( tab, "textLabel7" );
00458     textLabel7->setGeometry( QRect( 140, 30, 52, 20 ) );
00459 
00460     cbMakeMovie = new QCheckBox( tab, "cbMakeMovie" );
00461     cbMakeMovie->setGeometry( QRect( 247, 86, 90, 22 ) );
00462 
00463     leAnimationResolution = new QLineEdit( tab, "leAnimationResolution" );
00464     leAnimationResolution->setEnabled( FALSE );
00465     leAnimationResolution->setGeometry( QRect( 140, 86, 80, 22 ) );
00466     leAnimationResolution->setAlignment( int( QLineEdit::AlignRight ) );
00467 
00468     tlAnimationResolution = new QLabel( tab, "tlAnimationResolution" );
00469     tlAnimationResolution->setEnabled( FALSE );
00470     tlAnimationResolution->setGeometry( QRect( 20, 87, 115, 20 ) );
00471 
00472     cbStressLimit = new QCheckBox( tab, "cbStressLimit" );
00473     cbStressLimit->setGeometry( QRect( 20, 120, 150, 20 ) );
00474     tabSimulation->insertTab( tab, QString("") );
00475 
00476     // actions
00477     fileOpenAction = new QAction( this, "fileOpenAction" );
00478     fileOpenAction->setIconSet( QIconSet( image1 ) );
00479     fileExportAsAction = new QAction( this, "fileExportAsAction" );
00480     fileExportAsAction->setIconSet( QIconSet( image2 ) );
00481     fileExitAction = new QAction( this, "fileExitAction" );
00482     helpAboutAction = new QAction( this, "helpAboutAction" );
00483     helpAboutAction->setIconSet( QIconSet( image3 ) );
00484     fileLoad_sceneAction = new QAction( this, "fileLoad_sceneAction" );
00485     fileLoad_sceneAction->setIconSet( QIconSet(  ) );
00486 
00487 
00488     // toolbars
00489     toolBar = new QToolBar( QString(""), this, DockTop ); 
00490 
00491     fileOpenAction->addTo( toolBar );
00492     fileExportAsAction->addTo( toolBar );
00493     fileExitAction->addTo( toolBar );
00494 
00495 
00496     // menubar
00497     MenuBar = new QMenuBar( this, "MenuBar" );
00498 
00499     MenuBar->setGeometry( QRect( 0, 0, 1034, 23 ) );
00500 
00501     fileMenu = new QPopupMenu( this );
00502     fileOpenAction->addTo( fileMenu );
00503     fileExportAsAction->addTo( fileMenu );
00504     fileMenu->insertSeparator();
00505     fileExitAction->addTo( fileMenu );
00506     fileLoad_sceneAction->addTo( fileMenu );
00507     MenuBar->insertItem( QString(""), fileMenu, 2 );
00508 
00509     helpMenu = new QPopupMenu( this );
00510     helpAboutAction->addTo( helpMenu );
00511     MenuBar->insertItem( QString(""), helpMenu, 3 );
00512 
00513     languageChange();
00514     resize( QSize(1034, 837).expandedTo(minimumSizeHint()) );
00515     clearWState( WState_Polished );
00516 
00517     // signals and slots connections
00518     connect( fileOpenAction, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
00519     connect( fileExitAction, SIGNAL( activated() ), this, SLOT( fileExit() ) );
00520     connect( helpAboutAction, SIGNAL( activated() ), this, SLOT( helpAbout() ) );
00521     connect( fileExportAsAction, SIGNAL( activated() ), this, SLOT( fileExportAs() ) );
00522     connect( cbSpheres, SIGNAL( stateChanged(int) ), this, SLOT( viewOptions() ) );
00523     connect( bpStartForce, SIGNAL( clicked() ), this, SLOT( clickedStartSim() ) );
00524     connect( sbFPS, SIGNAL( valueChanged(int) ), this, SLOT( fpsChange() ) );
00525     connect( leTimeStep, SIGNAL( lostFocus() ), this, SLOT( timestepChanged() ) );
00526     connect( fileLoad_sceneAction, SIGNAL( activated() ), this, SLOT( fileLoad_scene() ) );
00527     connect( cbNumIntegration, SIGNAL( activated(int) ), this, SLOT( changedNumIntegration() ) );
00528     connect( cbCollisionTreatment, SIGNAL( activated(int) ), this, SLOT( changedCollisionTreatment() ) );
00529     connect( cbMesh, SIGNAL( stateChanged(int) ), this, SLOT( viewOptions() ) );
00530     connect( cbNormals, SIGNAL( stateChanged(int) ), this, SLOT( viewOptions() ) );
00531     connect( cbLinks, SIGNAL( stateChanged(int) ), this, SLOT( viewOptions() ) );
00532     connect( cbTexture, SIGNAL( stateChanged(int) ), this, SLOT( viewOptions() ) );
00533     connect( pbPause, SIGNAL( clicked() ), this, SLOT( pauseSim() ) );
00534     connect( leFadeInForce, SIGNAL( lostFocus() ), this, SLOT( durationChange() ) );
00535     connect( leKeepForce, SIGNAL( lostFocus() ), this, SLOT( durationChange() ) );
00536     connect( leFadeOutForce, SIGNAL( lostFocus() ), this, SLOT( durationChange() ) );
00537     connect( cb2ndPass, SIGNAL( stateChanged(int) ), this, SLOT( changed2ndPass() ) );
00538     connect( sliderNominal, SIGNAL( sliderReleased() ), this, SLOT( sliderNominalReleased() ) );
00539     connect( sliderNominal, SIGNAL( sliderMoved(int) ), tlNominal, SLOT( setNum(int) ) );
00540     connect( cbExportPrecalculation, SIGNAL( stateChanged(int) ), this, SLOT( exportPrecalculationChanged() ) );
00541     connect( leAnimationResolution, SIGNAL( lostFocus() ), this, SLOT( animationResolutionChanged() ) );
00542     init();
00543 }
00544 
00545 /*
00546  *  Destroys the object and frees any allocated resources
00547  */
00548 modeljoint::~modeljoint()
00549 {
00550     // no need to delete child widgets, Qt does it all for us
00551 }
00552 
00553 /*
00554  *  Sets the strings of the subwidgets using the current
00555  *  language.
00556  */
00557 void modeljoint::languageChange()
00558 {
00559     setCaption( tr( "Joint modeler v0.2" ) );
00560     groupBox2_2->setTitle( tr( "Numerical integration" ) );
00561     cbNumIntegration->clear();
00562     cbNumIntegration->insertItem( tr( "Euler" ) );
00563     cbNumIntegration->insertItem( tr( "Runge-Kutta 4" ) );
00564     groupBox5->setTitle( tr( "Spheres view scale" ) );
00565     groupBox2->setTitle( tr( "Report" ) );
00566     groupBox13->setTitle( tr( "Transformations" ) );
00567     QToolTip::add( groupBox13, tr( "Use keyboard to apply on selected object." ) );
00568     textLabel2_3_2->setText( tr( "Scale" ) );
00569     QToolTip::add( textLabel2_3_2, tr( "Alt+Arrows/PgUpDown" ) );
00570     textLabel2_3_4->setText( tr( "Pixels" ) );
00571     QToolTip::add( textLabel2_3_4, tr( "Ctrl+Arrows/PgUpDown" ) );
00572     QToolTip::add( sbStepScale, tr( "Alt+Arrows/PgUpDown" ) );
00573     textLabel2_3_3_2->setText( tr( "Degrees" ) );
00574     QToolTip::add( textLabel2_3_3_2, tr( "Shift+Arrows/PgUpDown" ) );
00575     textLabel2_3_3->setText( tr( "Rotate" ) );
00576     QToolTip::add( textLabel2_3_3, tr( "Shift+Arrows/PgUpDown" ) );
00577     textLabel2_3->setText( tr( "Translate" ) );
00578     QToolTip::add( textLabel2_3, tr( "Ctrl+Arrows/PgUpDown" ) );
00579     textLabel2_3_2_2->setText( tr( "%" ) );
00580     QToolTip::add( textLabel2_3_2_2, tr( "Alt+Arrows/PgUpDown" ) );
00581     QToolTip::add( sbStepRotate, tr( "Shift+Arrows/PgUpDown" ) );
00582     QToolTip::add( sbStepTranslate, tr( "Ctrl+arrows/PgUpDown" ) );
00583     tlNominal->setText( tr( "0" ) );
00584     groupBox2_2_2->setTitle( tr( "Collision treatment" ) );
00585     cb2ndPass->setText( tr( "2nd pass" ) );
00586     cbCollisionTreatment->clear();
00587     cbCollisionTreatment->insertItem( tr( "Spheres" ) );
00588     cbCollisionTreatment->insertItem( tr( "Mesh" ) );
00589     cbCollisionTreatment->insertItem( tr( "Hybrid" ) );
00590     cbCollisionTreatment->insertItem( tr( "Displacement" ) );
00591     cbCollisionTreatment->insertItem( tr( "No Collision Detection" ) );
00592     cbCollisionTreatment->insertItem( tr( "Neighbors" ) );
00593     cbCollisionTreatment->insertItem( tr( "Spherical sliding" ) );
00594     cbCollisionTreatment->setCurrentItem( 3 );
00595     gbColor->setTitle( tr( "Color" ) );
00596     rbCollision->setText( tr( "Collisions" ) );
00597     rbStress->setText( tr( "Stress" ) );
00598     rbMaterial->setText( tr( "Material" ) );
00599     groupBox1->setTitle( tr( "Display options" ) );
00600     cbNormals->setText( tr( "Normals" ) );
00601     cbMesh->setText( tr( "Mesh" ) );
00602     cbTexture->setText( tr( "Texture" ) );
00603     cbCollisionVolume->setText( tr( "Collision vol" ) );
00604     cbProximities->setText( tr( "Proximities" ) );
00605     cbSpheres->setText( tr( "Spheres" ) );
00606     cbLinks->setText( tr( "Links" ) );
00607     pbPause->setText( tr( "||" ) );
00608     leTimeStep->setText( tr( "0.002" ) );
00609     bpStartForce->setText( tr( "Start" ) );
00610     textLabel2->setText( tr( "Force vector (N):" ) );
00611     textLabel3_3_2->setText( tr( "Fade out" ) );
00612     textLabel3_2->setText( tr( "y" ) );
00613     leForceX->setText( tr( "0.0" ) );
00614     leFadeOutForce->setText( tr( "0.0" ) );
00615     textLabel4_2->setText( tr( "Time (s):" ) );
00616     cbShowForce->setText( tr( "Show vector" ) );
00617     leFadeInForce->setText( tr( "0.0" ) );
00618     leForceZ->setText( tr( "1.0" ) );
00619     leForceY->setText( tr( "0.0" ) );
00620     leKeepForce->setText( tr( "1.0" ) );
00621     textLabel3->setText( tr( "x" ) );
00622     textLabel3_3->setText( tr( "z" ) );
00623     textLabel3_2_2->setText( tr( "Keep" ) );
00624     textLabel3_4->setText( tr( "Fade in" ) );
00625     cbExportPrecalculation->setText( tr( "Export Pre-calculated Data" ) );
00626     textLabel6->setText( tr( "FPS:" ) );
00627     textLabel7->setText( tr( "Timestep:" ) );
00628     cbMakeMovie->setText( tr( "Export video" ) );
00629     leAnimationResolution->setText( tr( "1.0" ) );
00630     tlAnimationResolution->setText( tr( "Frame rate to export:" ) );
00631     cbStressLimit->setText( tr( "Limit ROM by Stress" ) );
00632     tabSimulation->changeTab( tab, tr( "Simulation parameters" ) );
00633     fileOpenAction->setText( tr( "&Open..." ) );
00634     fileOpenAction->setMenuText( tr( "&Open..." ) );
00635     fileOpenAction->setAccel( tr( "Ctrl+O" ) );
00636     fileExportAsAction->setText( tr( "Export As" ) );
00637     fileExportAsAction->setMenuText( tr( "Export &As..." ) );
00638     fileExportAsAction->setAccel( QString::null );
00639     fileExitAction->setText( tr( "E&xit" ) );
00640     fileExitAction->setMenuText( tr( "E&xit" ) );
00641     fileExitAction->setAccel( QString::null );
00642     helpAboutAction->setText( tr( "About" ) );
00643     fileLoad_sceneAction->setText( tr( "&Load scene" ) );
00644     fileLoad_sceneAction->setMenuText( tr( "&Load scene" ) );
00645     toolBar->setLabel( tr( "Tools" ) );
00646     MenuBar->findItem( 2 )->setText( tr( "&File" ) );
00647     MenuBar->findItem( 3 )->setText( tr( "&Help" ) );
00648 }
00649 

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