From 4c6bb8e3f6bbb3ec85afe2ef7d4cf51f9b1d4c28 Mon Sep 17 00:00:00 2001 From: catdog2 Date: Wed, 15 Oct 2008 20:23:41 +0000 Subject: [PATCH] HomoBFieldWidget soweit erstmal fertig git-svn-id: http://svn.lsim.tuxzone.org/trunk@8 4bec179b-ab65-46ed-a5f8-55b8b5c735d0 --- lsim.tag | 543 ++++++++++++++++++++++++++++++++++++++- src/homobfielditem.cpp | 16 +- src/homobfielditem.h | 12 +- src/homobfieldwidget.cpp | 79 +++--- src/homobfieldwidget.h | 2 +- src/homoefieldwidget.cpp | 2 +- 6 files changed, 598 insertions(+), 56 deletions(-) diff --git a/lsim.tag b/lsim.tag index 667d78f..7a3f672 100644 --- a/lsim.tag +++ b/lsim.tag @@ -1,5 +1,24 @@ + + constants.h + /mnt/sdb1/c++/lsim/src/ + constants_8h + + const double + PI + constants_8h.html + 952eac791b596a61bba0a133a3bb439f + + + + const double + SPEED_OF_LIGHT + constants_8h.html + a9d062184e1c09d26080c7fe53b33b9e + + + editcopy.xpm /mnt/sdb1/c++/lsim/src/ @@ -54,6 +73,7 @@ fielditem_8cpp fielditem.h homoefielditem.h + homobfielditem.h fielditem.h @@ -102,6 +122,9 @@ /mnt/sdb1/c++/lsim/src/ graphicsellipseitem_8cpp graphicsellipseitem.h + simulscene.h + probechargewidget.h + constants.h graphicsellipseitem.h @@ -121,6 +144,35 @@ graphicsview_8h GraphicsView + + homobfielditem.cpp + /mnt/sdb1/c++/lsim/src/ + homobfielditem_8cpp + homobfielditem.h + homobfieldwidget.h + + + homobfielditem.h + /mnt/sdb1/c++/lsim/src/ + homobfielditem_8h + fielditem.h + HomoBFieldItem + + + homobfieldwidget.cpp + /mnt/sdb1/c++/lsim/src/ + homobfieldwidget_8cpp + homobfieldwidget.h + homobfielditem.h + expdoublespinbox.h + + + homobfieldwidget.h + /mnt/sdb1/c++/lsim/src/ + homobfieldwidget_8h + homobfielditem.h + HomoBFieldWidget + homoefielditem.cpp /mnt/sdb1/c++/lsim/src/ @@ -220,6 +272,46 @@ [] + + moc_homobfielditem.cpp + /mnt/sdb1/c++/lsim/src/ + moc__homobfielditem_8cpp + homobfielditem.h + + static QT_BEGIN_MOC_NAMESPACE const uint + qt_meta_data_HomoBFieldItem + moc__homobfielditem_8cpp.html + 42817f20f0f9f4726f380c4037d9bb59 + [] + + + static const char + qt_meta_stringdata_HomoBFieldItem + moc__homobfielditem_8cpp.html + 687cd76a32f706421c88f6662da6a49c + [] + + + + moc_homobfieldwidget.cpp + /mnt/sdb1/c++/lsim/src/ + moc__homobfieldwidget_8cpp + homobfieldwidget.h + + static QT_BEGIN_MOC_NAMESPACE const uint + qt_meta_data_HomoBFieldWidget + moc__homobfieldwidget_8cpp.html + 0fe7a2ba5e287a5eaac7a0e6eafe02b9 + [] + + + static const char + qt_meta_stringdata_HomoBFieldWidget + moc__homobfieldwidget_8cpp.html + 50985451b56f23a63ea0be20e72042df + [] + + moc_homoefielditem.cpp /mnt/sdb1/c++/lsim/src/ @@ -280,6 +372,26 @@ [] + + moc_probechargewidget.cpp + /mnt/sdb1/c++/lsim/src/ + moc__probechargewidget_8cpp + probechargewidget.h + + static QT_BEGIN_MOC_NAMESPACE const uint + qt_meta_data_ProbeChargeWidget + moc__probechargewidget_8cpp.html + b85448fa3e5e4c15ba85c29b8dc12730 + [] + + + static const char + qt_meta_stringdata_ProbeChargeWidget + moc__probechargewidget_8cpp.html + e2c4a1bd3c300fa8da24293fa3d36fe2 + [] + + moc_simulscene.cpp /mnt/sdb1/c++/lsim/src/ @@ -300,6 +412,20 @@ [] + + probechargewidget.cpp + /mnt/sdb1/c++/lsim/src/ + probechargewidget_8cpp + probechargewidget.h + graphicsellipseitem.h + expdoublespinbox.h + + + probechargewidget.h + /mnt/sdb1/c++/lsim/src/ + probechargewidget_8h + ProbeChargeWidget + qrc_application.cpp /mnt/sdb1/c++/lsim/src/ @@ -358,9 +484,11 @@ simulscene.cpp /mnt/sdb1/c++/lsim/src/ simulscene_8cpp + constants.h simulscene.h graphicsellipseitem.h homoefielditem.h + homobfielditem.h simulscene.h @@ -621,6 +749,13 @@ 6c45aa9a52b2dc4f916272e651fb8092 () const =0 + + int + getRotation + classFieldItem.html + 3632ac0ad8751fc2f411fbe8377d995c + () + static bool isFieldItem @@ -657,8 +792,36 @@ void calculateProbePath classGraphicsEllipseItem.html - c96e624b90b7acabd1fd979c35abdc1e - (int steps) + 2cdad5fc83d96af73ae8c136b53e5fe1 + (QPointF startPoint=QPointF(0, 0), double startSpeedX=0, double startSpeedY=0) + + + void + setMasse + classGraphicsEllipseItem.html + 7230ec257dd669949e9d3ada7a51923a + (const double &theValue) + + + double + getMasse + classGraphicsEllipseItem.html + edd61d768890e05097cac9285ff63aba + (double speed) + + + void + setCharge + classGraphicsEllipseItem.html + fb65dbef1a6c2a46d43957655e6c3942 + (const long double &theValue) + + + long double + getCharge + classGraphicsEllipseItem.html + 1f873b91eb795f77342cba8430bc0dd5 + () const @@ -667,6 +830,13 @@ a138c72fbdabc4a52940d164f956464e () + + QWidget * + getDockWidget + classGraphicsEllipseItem.html + dd6be0eb221b26f3f2767dd09fa8b06f + () const + ~GraphicsEllipseItem @@ -674,6 +844,13 @@ 4bf7a078c964d2d7d616841c0e22805a () + + QList< QPointF > * + getCurrProbePath + classGraphicsEllipseItem.html + 130f0b45e6fe641c29928e51b468418b + () + void mousePressEvent @@ -716,6 +893,20 @@ ef680fb6a88e6a0951886582a333f3fc + + double + charge + classGraphicsEllipseItem.html + cc3f4ede3f3cbf9f0870cb6b847c2a50 + + + + ProbeChargeWidget * + myProbeChargeWidget + classGraphicsEllipseItem.html + afa81f63289aa4d4624f38015b37d643 + + GraphicsView @@ -749,6 +940,187 @@ () + + HomoBFieldItem + classHomoBFieldItem.html + FieldItem + + Type + classHomoBFieldItem.html + de7662346826fc693c1df0104beece8db2251571941e0d52c90d01f6935b721f + + + + MinimumWidth + classHomoBFieldItem.html + 82c82f81414a9cdc70c10614710848dbbd258cb4a1f24a088a0b87eb97a62ed9 + + + + MinimumHeight + classHomoBFieldItem.html + 4cdb83c9920345343ebc1e070e865b1cf270b5cf347a956567f8b7018bf4b281 + + + + void + setOuterPenWidth + classHomoBFieldItem.html + 4f81af38c564f80cd4f7a7303710f214 + (double theValue) + + + void + setFieldLineDistance + classHomoBFieldItem.html + 81d5f13b2c67523f0f33ebbf7fac6149 + (int theValue) + + + void + setIsDirectionIntoPlane + classHomoBFieldItem.html + 6a5ecd467c67a3a358bfe853dd19335f + (bool theValue) + + + void + directionChanged + classHomoBFieldItem.html + 432f975078b7fddcf1e2a470491d8e10 + (bool theValue) + + + + HomoBFieldItem + classHomoBFieldItem.html + 2859a8d37de27ad6856ff3fc1203e7bf + (QRectF sizeRect) + + + virtual + ~HomoBFieldItem + classHomoBFieldItem.html + d52f0735f31a5eba3fdd3366a14d7af2 + () + + + virtual QRectF + boundingRect + classHomoBFieldItem.html + 4623b5ba50822936ae567035a0151f7d + () const + + + virtual QRectF + getRectF + classHomoBFieldItem.html + 6e2cd02c416572978490459d460346ef + () const + + + virtual void + paint + classHomoBFieldItem.html + 52c1a5efd250fed63efd055863b27b93 + (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) + + + int + type + classHomoBFieldItem.html + 6be754db08dd08e2c084d77a06e72233 + () const + + + int + getFieldLineDistance + classHomoBFieldItem.html + 59314fbdf49390ef1cbd56a400bb0817 + () const + + + QWidget * + getDockWidget + classHomoBFieldItem.html + 0ba66aad18f70f9e4136834d78c93bc8 + () const + + + double + getOuterPenWidth + classHomoBFieldItem.html + 68cf2733c9aa5b9c4e9d13c17638af58 + () const + + + bool + getIsDirectionIntoPlane + classHomoBFieldItem.html + efb3cf5f1132b110f698519878afdc76 + () const + + + int + fieldLineDistance + classHomoBFieldItem.html + e62c6d52ad26691c9741fef40d913651 + + + + double + outerPenWidth + classHomoBFieldItem.html + 376c9df0aa2db22fc54d824c9bcb15fd + + + + bool + isDirectionIntoPlane + classHomoBFieldItem.html + 09f1e6b6fd45ad28060f3a147c611f5a + + + + HomoBFieldWidget * + dockWidget + classHomoBFieldItem.html + 35bec97190b75fa64b7876533c4ef8a5 + + + + + HomoBFieldWidget + classHomoBFieldWidget.html + + + HomoBFieldWidget + classHomoBFieldWidget.html + edd9fbd94988a261a1faf09786759453 + (QWidget *parent, Qt::WindowFlags f, HomoBFieldItem *bField) + + + + ~HomoBFieldWidget + classHomoBFieldWidget.html + c9dbb4d967d9dea4328af260a0580bad + () + + + void + createWidget + classHomoBFieldWidget.html + bb251dad6df577569d6f59e0cb119718 + () + + + HomoBFieldItem * + homoBField + classHomoBFieldWidget.html + 1c59f4d196b38f8c8ae8d5db7d862d39 + + + HomoEFieldItem classHomoEFieldItem.html @@ -756,21 +1128,49 @@ Type classHomoEFieldItem.html - d89d0d82fbd2689c40ae29528fa91393c06fd10fb3badd77a822f5601903df34 + d2ef8acf5a7c2307b1e4dad2645a7a46c06fd10fb3badd77a822f5601903df34 MinimumWidth classHomoEFieldItem.html - 5f72ae86d8bfd602169fc1bef881b34fcba84afb53a55c8e2c0daf52eed72d25 + 7715932096a60de784db03d550a57fdccba84afb53a55c8e2c0daf52eed72d25 MinimumHeight classHomoEFieldItem.html - 3cc84ab5f5c6f443d425fb9581e9b16f60030e8b43da40d39fbad3b5f8ac59d1 + 549c692b4298c8cd7328cf6a32dcb81f60030e8b43da40d39fbad3b5f8ac59d1 + + void + setFieldPower + classHomoEFieldItem.html + f6fea5d0d7d6055a3ee894a49dd15c25 + (double fieldPower) + + + void + setOuterPenWidth + classHomoEFieldItem.html + 3587e6994b7797227638d666fe56e0d8 + (double theValue) + + + double + getOuterPenWidth + classHomoEFieldItem.html + 0bcefbec64ba7552fe9f941fe9da1907 + () const + + + void + fieldPowerChanged + classHomoEFieldItem.html + 52327482fd0d273ae2c5e19c6e12dd4e + (double fieldPower) + HomoEFieldItem @@ -820,6 +1220,13 @@ 9e852d12ede674be0390d63144f43385 (int pixel) + + double + getFieldPower + classHomoEFieldItem.html + cebd0e26d96ef0a916198f8c05c4bc78 + () const + int fieldLineDistance @@ -828,10 +1235,10 @@ - qreal + double outerPenWidth classHomoEFieldItem.html - cfb50de7491e749ebe97d999a52c87f8 + 4840f70bbff810d577f0e12d02cad3c5 @@ -841,6 +1248,13 @@ 61ec658ae8e92cb5788193673e26e2c6 + + double + fieldPower + classHomoEFieldItem.html + a7f1fc2b7bd25a6d809b6b0f6c87a61d + + HomoEFieldWidget @@ -1031,6 +1445,13 @@ 89e420be0bf3e0024f670c672ec7fcac + + QDockWidget * + probeItemDock + classlsim.html + d5c9b1bcfd7d20398c928feaf7287341 + + QDockWidget * dock_2 @@ -1106,6 +1527,45 @@ 0fa3737ce6c6e20dfc83695d8201ad80 + + QAction * + insertBFieldItemAct + structlsim_1_1Actions.html + 96d1e49194d341c87f3b65c5a2966e1b + + + + + ProbeChargeWidget + classProbeChargeWidget.html + + + ProbeChargeWidget + classProbeChargeWidget.html + e88c444c117432b7666b7e6b3c719e09 + (QWidget *parent, Qt::WindowFlags f, GraphicsEllipseItem *ellipse) + + + virtual + ~ProbeChargeWidget + classProbeChargeWidget.html + 92bfc7bf9830202cf8af20dcd225c0f7 + () + + + void + createWidget + classProbeChargeWidget.html + de5cf27832e81631793f84acee49fd37 + () + + + GraphicsEllipseItem * + ellipseItem + classProbeChargeWidget.html + bb1a19fcd6b3b7fd541dd05f20e0b687 + + SimulScene @@ -1128,6 +1588,12 @@ 9a5e7fd2816ae007a43df2587bcbb93cbd43d167a779e8b894de1426d29673c7 + + HomoBFieldItemInsert + classSimulScene.html + 9a5e7fd2816ae007a43df2587bcbb93c0246be3b5ff9623c764e0c268856efa8 + + ItemType classSimulScene.html @@ -1182,6 +1648,20 @@ c4fa7c31f3b54b3652316c8a5ca11af5 (int steps) + + void + setMeterPerPx + classSimulScene.html + a37dfa5639e4aa0535d50b337ec19532 + (double theValue) + + + double + getMeterPerPx + classSimulScene.html + 501a15eebf6fdb98bff8984a370c3197 + () const + void sceneModeChanged @@ -1203,6 +1683,13 @@ b0f32d8ad757b9901a4b86b6e3f75e5a (double timePerStep) + + void + meterPerPxChanged + classSimulScene.html + e2a1abff3b5f2b7f1fdc7d97d39a7e41 + (double meterPerPx) + SimulScene @@ -1240,17 +1727,17 @@ double - getPowerXAt + getPowerAt classSimulScene.html - 01214a21cfac1d40199b56c9dda0e2d2 - (QPointF point) + 31ffa4052da42a3b5b193e9dde0e1e1c + (QPointF point, double charge, char xy) - double - getPowerYAt + QWidget * + getProbeDockWidget classSimulScene.html - 0ed98fb4a8da5049481e9d4e220954e4 - (QPointF point) + db0106ca0245b674a71c50c93e901df3 + () const void @@ -1336,6 +1823,13 @@ e315ef1c3adb6c3964b039a6479a351d + + double + meterPerPx + classSimulScene.html + 31eca12990de4da6232736388bdb2f58 + + HomoEFieldItem * currHomoEfieldInsertItem @@ -1350,6 +1844,20 @@ 44b79f0338746c6a3ff19a785921749d + + HomoBFieldItem * + currHomoBfieldInsertItem + classSimulScene.html + 8e4f218fe3cd75c2d6f753da5775a4f0 + + + + HomoBFieldItem * + currHomoBfieldEditItem + classSimulScene.html + 83ea5fb292382dcb28e4379f37bcc72c + + QGraphicsItem * pressedResizeItem @@ -1364,6 +1872,13 @@ 0b90514f60d295d61d991c35381e5623 + + QGraphicsItemAnimation * + ani + classSimulScene.html + fbc2ba594bd06cb4581d4c649ddf9efb + + resizeRects reRects diff --git a/src/homobfielditem.cpp b/src/homobfielditem.cpp index 7a2b668..a049e6b 100644 --- a/src/homobfielditem.cpp +++ b/src/homobfielditem.cpp @@ -31,8 +31,9 @@ HomoBFieldItem::HomoBFieldItem(QRectF sizeRect): FieldItem() { setFlag(ItemIsSelectable); setFlag(ItemIsFocusable); setOuterPenWidth (2); - setIsDirectionIntoPlane(true); dockWidget = new HomoBFieldWidget(0,0,this); + setIsDirectionIntoPlane(true); + setFluxDensity(233); } @@ -172,6 +173,19 @@ bool HomoBFieldItem::getIsDirectionIntoPlane() const { void HomoBFieldItem::setIsDirectionIntoPlane ( bool theValue ) { if(isDirectionIntoPlane == theValue) return; + prepareGeometryChange(); isDirectionIntoPlane = theValue; emit directionChanged(theValue); } + + +double HomoBFieldItem::getFluxDensity() const { + return fluxDensity; +} + + +void HomoBFieldItem::setFluxDensity ( double theValue ) { + if(fluxDensity == theValue) return; + fluxDensity = theValue; + emit fluxDensityChanged(theValue); +} diff --git a/src/homobfielditem.h b/src/homobfielditem.h index 528c8a6..cdcc2aa 100644 --- a/src/homobfielditem.h +++ b/src/homobfielditem.h @@ -48,12 +48,17 @@ class HomoBFieldItem : public FieldItem { double getOuterPenWidth() const; bool getIsDirectionIntoPlane() const; + double getFluxDensity() const; public slots: void setOuterPenWidth ( double theValue ); void setFieldLineDistance ( int theValue ); void setIsDirectionIntoPlane ( bool theValue ); + void setFluxDensity ( double theValue ); + + signals: void directionChanged(bool theValue); + void fluxDensityChanged(double theValue); private: //! Abstand der Feldlinien in der Zeichnung @@ -61,10 +66,15 @@ class HomoBFieldItem : public FieldItem { double outerPenWidth; - //! Gibt an, ob das Feld in die Ebene Zeigt oder heraus (true == in die Ebene) + //! Gibt an, ob das Feld in die Ebene Zeigt oder heraus (true == in die Ebene hinein) bool isDirectionIntoPlane; HomoBFieldWidget* dockWidget; + + ///! Enthät die Magnetische Flussdichte B in Tesla + double fluxDensity; + + }; diff --git a/src/homobfieldwidget.cpp b/src/homobfieldwidget.cpp index 44daf46..123d212 100644 --- a/src/homobfieldwidget.cpp +++ b/src/homobfieldwidget.cpp @@ -25,7 +25,8 @@ #include #include #include - +#include +#include HomoBFieldWidget::HomoBFieldWidget(QWidget* parent, Qt::WindowFlags f, HomoBFieldItem* bField):QWidget(parent, f) { homoBField = bField; @@ -33,11 +34,6 @@ HomoBFieldWidget::HomoBFieldWidget(QWidget* parent, Qt::WindowFlags f, HomoBFiel } void HomoBFieldWidget::createWidget() { - QDial *rotationDial = new QDial; - rotationDial->setRange(0,359); - rotationDial->setNotchesVisible(true); - rotationDial->setWrapping(true); - QDoubleSpinBox *heightBox = new QDoubleSpinBox; heightBox->setRange(HomoBFieldItem::MinimumHeight, 5000); @@ -53,7 +49,6 @@ void HomoBFieldWidget::createWidget() { QLabel* yLabel = new QLabel(tr("y:")); QLabel* widthLabel = new QLabel(tr("Breite(l):")); QLabel* heightLabel = new QLabel(tr("H\366he(d):")); - QLabel* rotationLabel = new QLabel(tr("Rotation:")); QDoubleSpinBox *posXBox = new QDoubleSpinBox; posXBox->setRange(-5000, 5000); @@ -65,60 +60,68 @@ void HomoBFieldWidget::createWidget() { connect(homoBField ,SIGNAL(ScenePosYChanged(double)),posYBox, SLOT(setValue(double)) ); connect(posYBox, SIGNAL(valueChanged(double)),homoBField ,SLOT(setScenePosY(double)) ); - QSpinBox* rotationBox = new QSpinBox; - rotationBox->setRange(0,359); - rotationBox->setSuffix("\260"); - rotationBox->setWrapping(true); - //connect(rotationDial, SIGNAL(valueChanged(int)),rotationBox ,SIGNAL(valueChanged(int)) ); - //connect(rotationDial, SIGNAL(valueChanged(int)),rotationBox,SLOT(setValue(int)) ); - //connect(rotationBox, SIGNAL(valueChanged(int)),homoEField ,SLOT(setRotation(int)) ); - //connect(rotationBox, SIGNAL(valueChanged(int)),rotationDial ,SLOT(setValue(int)) ); - QGridLayout* geomGridLayout = new QGridLayout; //geomGridLayout->setSizeConstraint(QLayout::SetFixedSize); + geomGridLayout->addWidget(heightBox,3,1); + geomGridLayout->addWidget(posYBox,1,1); + geomGridLayout->addWidget(posXBox,0,1); + geomGridLayout->addWidget(xLabel,0,0,Qt::AlignRight); + geomGridLayout->addWidget(yLabel,1,0,Qt::AlignRight); + geomGridLayout->addWidget(heightLabel,3,0,Qt::AlignRight); + geomGridLayout->addWidget(widthLabel,2,0,Qt::AlignRight); + geomGridLayout->addWidget(widthBox,2,1); + - geomGridLayout->addWidget(heightBox,4,1); - geomGridLayout->addWidget(rotationBox,0,1); - geomGridLayout->addWidget(posYBox,2,1); - geomGridLayout->addWidget(posXBox,1,1); - geomGridLayout->addWidget(xLabel,1,0,Qt::AlignRight); - geomGridLayout->addWidget(yLabel,2,0,Qt::AlignRight); - geomGridLayout->addWidget(heightLabel,4,0,Qt::AlignRight); - geomGridLayout->addWidget(widthLabel,3,0,Qt::AlignRight); - geomGridLayout->addWidget(rotationLabel,0,0,Qt::AlignRight); - geomGridLayout->addWidget(widthBox,3,1); - //geomGridLayout->addWidget(rotationDial, 1,0,2,2); QGroupBox* geometryBox = new QGroupBox(tr("Geometrie")); geometryBox->setLayout(geomGridLayout); - QLabel* fieldPowerLabel = new QLabel(tr("Feldst\344rke:")); - QLabel* voltageLabel = new QLabel(tr("Spannung:")); - - ExpDoubleSpinBox* fieldPowerBox = new ExpDoubleSpinBox; - fieldPowerBox->setRange(-1e+200,1e+200); - connect(homoBField ,SIGNAL(fieldPowerChanged(double)),fieldPowerBox, SLOT(setValue(double)) ); - connect(fieldPowerBox, SIGNAL(valueChanged(double)),homoBField ,SLOT(setFieldPower(double)) ); - + QLabel* fieldFluxDensityLabel = new QLabel(tr("Flussdichte(B):")); + ExpDoubleSpinBox* fieldFluxDensityBox = new ExpDoubleSpinBox; + fieldFluxDensityBox->setRange(-1e+200,1e+200); + connect(homoBField ,SIGNAL(fluxDensityChanged(double)),fieldFluxDensityBox, SLOT(setValue(double)) ); + connect(fieldFluxDensityBox, SIGNAL(valueChanged(double)),homoBField ,SLOT(setFluxDensity(double)) ); QGridLayout* constGridLayout = new QGridLayout; //constGridLayout->setSizeConstraint(QLayout::SetFixedSize); - constGridLayout->addWidget(fieldPowerBox,0,1); - constGridLayout->addWidget(fieldPowerLabel,0,0,Qt::AlignRight); + constGridLayout->addWidget(fieldFluxDensityBox,0,1); + constGridLayout->addWidget(fieldFluxDensityLabel,0,0,Qt::AlignRight); QGroupBox* fieldConstantsBox = new QGroupBox(tr("Feldkonstanten")); fieldConstantsBox->setLayout(constGridLayout); + + QRadioButton* intoPlaneButton = new QRadioButton(tr("in die Ebene hinein")); + QRadioButton* outOfPlaneButton = new QRadioButton(tr("aus der Ebene heraus")); + connect(homoBField ,SIGNAL(directionChanged(bool)),intoPlaneButton, SLOT(setChecked(bool)) ); + connect(intoPlaneButton, SIGNAL(toggled(bool)),homoBField ,SLOT(setIsDirectionIntoPlane(bool)) ); + + QButtonGroup* directionGroup = new QButtonGroup(); + directionGroup->addButton(intoPlaneButton); + directionGroup->addButton(outOfPlaneButton); + + + QGridLayout* directionGridLayout = new QGridLayout; + directionGridLayout->addWidget(intoPlaneButton,0,0); + directionGridLayout->addWidget(outOfPlaneButton,1,0); + + QGroupBox* fieldDirectionBox = new QGroupBox(tr("Feldrichtung")); + fieldDirectionBox->setLayout(directionGridLayout); + + + + + QVBoxLayout * mainLayout = new QVBoxLayout(this); mainLayout -> addWidget(geometryBox); + mainLayout -> addWidget(fieldDirectionBox); mainLayout -> addWidget(fieldConstantsBox); mainLayout -> addStretch(); - QWidget::setTabOrder (rotationBox, posXBox); QWidget::setTabOrder (posXBox, posYBox); QWidget::setTabOrder (posYBox, widthBox); QWidget::setTabOrder (widthBox, heightBox); diff --git a/src/homobfieldwidget.h b/src/homobfieldwidget.h index 5fbc09a..beac649 100644 --- a/src/homobfieldwidget.h +++ b/src/homobfieldwidget.h @@ -38,7 +38,7 @@ class HomoBFieldWidget : public QWidget /*! \param parent Parent Widget, see Qt Documentaion \param f Window Flags, see Qt Documentaion - \param eField HomoBFieldItem, zu dem das HomoBFieldWidget zugeordnet werden soll + \param bField HomoBFieldItem, zu dem das HomoBFieldWidget zugeordnet werden soll */ HomoBFieldWidget(QWidget* parent, Qt::WindowFlags f, HomoBFieldItem* bField); diff --git a/src/homoefieldwidget.cpp b/src/homoefieldwidget.cpp index dfd62e5..a821207 100644 --- a/src/homoefieldwidget.cpp +++ b/src/homoefieldwidget.cpp @@ -105,7 +105,7 @@ void HomoEFieldWidget::createWidget() geometryBox->setLayout(geomGridLayout); - QLabel* fieldPowerLabel = new QLabel(tr("Feldst\344rke:")); + QLabel* fieldPowerLabel = new QLabel(tr("Feldst\344rke(E):")); QLabel* voltageLabel = new QLabel(tr("Spannung:")); ExpDoubleSpinBox* fieldPowerBox = new ExpDoubleSpinBox;