viel zeugs usw.
git-svn-id: http://svn.lsim.tuxzone.org/trunk@11 4bec179b-ab65-46ed-a5f8-55b8b5c735d0
This commit is contained in:
Binary file not shown.
29
lsim.kdevses
29
lsim.kdevses
@@ -1,7 +1,7 @@
|
||||
<?xml version = '1.0' encoding = 'UTF-8'?>
|
||||
<!DOCTYPE KDevPrjSession>
|
||||
<KDevPrjSession>
|
||||
<DocsAndViews NumberOfDocuments="23" >
|
||||
<DocsAndViews NumberOfDocuments="24" >
|
||||
<Doc0 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/homoefielditem.cpp" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
</Doc0>
|
||||
@@ -9,7 +9,7 @@
|
||||
<View0 Encoding="" Type="Source" />
|
||||
</Doc1>
|
||||
<Doc2 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/graphicsellipseitem.h" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
<View0 Encoding="" line="30" Type="Source" />
|
||||
</Doc2>
|
||||
<Doc3 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/simulscene.cpp" >
|
||||
<View0 Encoding="UTF-8" Type="Source" />
|
||||
@@ -18,25 +18,25 @@
|
||||
<View0 Encoding="" Type="Source" />
|
||||
</Doc4>
|
||||
<Doc5 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/homoefielditem.h" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
<View0 Encoding="" line="31" Type="Source" />
|
||||
</Doc5>
|
||||
<Doc6 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/lsim.cpp" >
|
||||
<View0 Encoding="" line="171" Type="Source" />
|
||||
<View0 Encoding="" Type="Source" />
|
||||
</Doc6>
|
||||
<Doc7 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/simulscene.h" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
<View0 Encoding="" line="81" Type="Source" />
|
||||
</Doc7>
|
||||
<Doc8 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/lsim.h" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
<View0 Encoding="" line="41" Type="Source" />
|
||||
</Doc8>
|
||||
<Doc9 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/probechargewidget.cpp" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
</Doc9>
|
||||
<Doc10 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/probechargewidget.h" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
<View0 Encoding="" line="31" Type="Source" />
|
||||
</Doc10>
|
||||
<Doc11 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/homoefieldwidget.h" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
<View0 Encoding="" line="33" Type="Source" />
|
||||
</Doc11>
|
||||
<Doc12 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/homoefieldwidget.cpp" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
@@ -45,10 +45,10 @@
|
||||
<View0 Encoding="" Type="Source" />
|
||||
</Doc13>
|
||||
<Doc14 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/graphicsview.h" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
<View0 Encoding="" line="15" Type="Source" />
|
||||
</Doc14>
|
||||
<Doc15 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/expdoublespinbox.cpp" >
|
||||
<View0 Encoding="" line="110" Type="Source" />
|
||||
<View0 Encoding="" Type="Source" />
|
||||
</Doc15>
|
||||
<Doc16 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/fielditem.h" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
@@ -60,17 +60,20 @@
|
||||
<View0 Encoding="" Type="Source" />
|
||||
</Doc18>
|
||||
<Doc19 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/homobfielditem.h" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
<View0 Encoding="" line="29" Type="Source" />
|
||||
</Doc19>
|
||||
<Doc20 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/homobfieldwidget.h" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
</Doc20>
|
||||
<Doc21 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/graphicsview.cpp" >
|
||||
<View0 Encoding="" line="4" Type="Source" />
|
||||
<View0 Encoding="" line="36" Type="Source" />
|
||||
</Doc21>
|
||||
<Doc22 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/expdoublespinbox.h" >
|
||||
<View0 Encoding="" line="49" Type="Source" />
|
||||
<View0 Encoding="" Type="Source" />
|
||||
</Doc22>
|
||||
<Doc23 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/homobfielditem.cpp" >
|
||||
<View0 Encoding="" line="32" Type="Source" />
|
||||
</Doc23>
|
||||
</DocsAndViews>
|
||||
<pluginList>
|
||||
<kdevdebugger>
|
||||
|
||||
@@ -38,7 +38,10 @@ ExpDoubleSpinBox::~ExpDoubleSpinBox() {
|
||||
|
||||
|
||||
double ExpDoubleSpinBox::valueFromText ( const QString& text ) const {
|
||||
return text.toDouble();
|
||||
QString myText(text);
|
||||
myText.chop(suffix().size());
|
||||
myText.remove(prefix().size());
|
||||
return myText.toDouble();
|
||||
}
|
||||
|
||||
QString ExpDoubleSpinBox::textFromValue ( double val ) const {
|
||||
@@ -58,13 +61,17 @@ QString ExpDoubleSpinBox::textFromValue ( double val ) const {
|
||||
}
|
||||
|
||||
QValidator::State ExpDoubleSpinBox::validate ( QString & input, int & pos ) const {
|
||||
QString myInput(input);
|
||||
myInput.chop(suffix().size());
|
||||
myInput.remove(prefix().size());
|
||||
|
||||
QLocale loc;
|
||||
QChar decpoint = loc.decimalPoint(); //Locale abhaengiger dezimaltrenner
|
||||
QString regExpString =QString("[\\-,\\+]?\\d*\\%1?\\d+([e,E][\\-,\\+]\\d+)?").arg(decpoint);
|
||||
QRegExp regExp(regExpString);
|
||||
QValidator *validator = new QRegExpValidator(regExp, 0);
|
||||
//qDebug() << validator->validate(input,pos);
|
||||
return validator->validate(input,pos);
|
||||
return validator->validate(myInput,pos);
|
||||
}
|
||||
|
||||
QDoubleSpinBox::StepEnabled ExpDoubleSpinBox::stepEnabled () const {
|
||||
|
||||
@@ -33,9 +33,10 @@ GraphicsEllipseItem::GraphicsEllipseItem() {
|
||||
setFlag(ItemIsFocusable);
|
||||
//setCacheMode(QGraphicsItem::DeviceCoordinateCache);
|
||||
//startTimer(100);
|
||||
myProbeChargeWidget = new ProbeChargeWidget(0,0,this);
|
||||
setMasse(9.10938188e-31);
|
||||
setCharge(-1.6e-19);
|
||||
myProbeChargeWidget = new ProbeChargeWidget(0,0,this);
|
||||
|
||||
currProbePath = new QList<QPointF>;
|
||||
speedListX = new QList<double>;
|
||||
speedListY = new QList<double>;
|
||||
@@ -54,12 +55,23 @@ void GraphicsEllipseItem::mousePressEvent ( QGraphicsSceneMouseEvent *event ) {
|
||||
//QGraphicsEllipseItem::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void GraphicsEllipseItem::handleSceneChange(const QList<QRectF> & /*region*/) {
|
||||
if (myScenePos != scenePos()) {
|
||||
myScenePos = scenePos();
|
||||
emit ScenePosChanged(myScenePos);
|
||||
emit ScenePosXChanged(myScenePos.x());
|
||||
emit ScenePosYChanged(myScenePos.y());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\fn GraphicsEllipseItem::calculateProbePath()
|
||||
*/
|
||||
void GraphicsEllipseItem::calculateProbePath(QPointF startPoint, double startSpeedX , double startSpeedY) {
|
||||
void GraphicsEllipseItem::calculateProbePath(QPointF startPoint) {
|
||||
double startSpeedX = getStartSpeedX();
|
||||
double startSpeedY = getStartSpeedY();
|
||||
SimulScene* myScene = dynamic_cast<SimulScene*>(scene());
|
||||
//wenn noch zu keiner scene gehoerend abbruch
|
||||
if (myScene == 0) return;
|
||||
@@ -137,7 +149,7 @@ double GraphicsEllipseItem::getCharge() const {
|
||||
}
|
||||
|
||||
|
||||
void GraphicsEllipseItem::setCharge ( const long double& theValue ) {
|
||||
void GraphicsEllipseItem::setCharge ( const double& theValue ) {
|
||||
if (charge == theValue) return;
|
||||
charge = theValue;
|
||||
emit chargeChanged(theValue);
|
||||
@@ -174,3 +186,21 @@ void GraphicsEllipseItem::setStartSpeedY ( double theValue ) {
|
||||
startSpeedY = theValue;
|
||||
emit startSpeedYChanged(theValue);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\fn GraphicsEllipseItem::setScenePosY(double posY)
|
||||
*/
|
||||
void GraphicsEllipseItem::setScenePosY(double newPosY)
|
||||
{
|
||||
moveBy(0, newPosY - scenePos().y());
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\fn GraphicsEllipseItem::setScenePosX(double posX)
|
||||
*/
|
||||
void GraphicsEllipseItem::setScenePosX(double newPosX)
|
||||
{
|
||||
moveBy(newPosX - scenePos().x(),0 );
|
||||
}
|
||||
|
||||
@@ -71,25 +71,33 @@ class GraphicsEllipseItem : public QObject , public QGraphicsEllipseItem {
|
||||
///Startgeschwindigkeit des teilchens in y-Richtung
|
||||
double startSpeedY;
|
||||
|
||||
QPointF myScenePos;
|
||||
|
||||
|
||||
public slots:
|
||||
//! Berechnet die Bewegung der Probeladung
|
||||
/*!
|
||||
\param steps Anzahl der auszufürenden Schriite
|
||||
*/
|
||||
void calculateProbePath (QPointF startPoint = QPointF(0,0) , double startSpeedX = 0, double startSpeedY = 0);
|
||||
void calculateProbePath (QPointF startPoint = QPointF(0,0));
|
||||
|
||||
void setMasse ( const double& theValue );
|
||||
|
||||
void setCharge ( const long double& theValue );
|
||||
void setCharge ( const double& theValue );
|
||||
|
||||
void setStartSpeedX ( double theValue );
|
||||
void setStartSpeedY ( double theValue );
|
||||
void setScenePosY(double newPosY);
|
||||
void setScenePosX(double newPosX);
|
||||
void handleSceneChange(const QList<QRectF> & /*region*/);
|
||||
signals:
|
||||
void startSpeedXChanged(double speed);
|
||||
void startSpeedYChanged(double speed);
|
||||
void masseChanged(double masse);
|
||||
void chargeChanged(double Charge);
|
||||
void ScenePosChanged(QPointF newpos);
|
||||
void ScenePosXChanged(double newX);
|
||||
void ScenePosYChanged(double newY);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -87,8 +87,9 @@ void HomoBFieldWidget::createWidget() {
|
||||
ExpDoubleSpinBox* fieldFluxDensityBox = new ExpDoubleSpinBox;
|
||||
fieldFluxDensityBox->setRange(-1e+200,1e+200);
|
||||
fieldFluxDensityBox->setDecimals(40);
|
||||
fieldFluxDensityBox->setDisplayDecimals(2);
|
||||
fieldFluxDensityBox->setDisplayDecimals(3);
|
||||
fieldFluxDensityBox->setKeyboardTracking(false);
|
||||
fieldFluxDensityBox->setSuffix(" T");
|
||||
connect(homoBField ,SIGNAL(fluxDensityChanged(double)),fieldFluxDensityBox, SLOT(setValue(double)) );
|
||||
connect(fieldFluxDensityBox, SIGNAL(valueChanged(double)),homoBField ,SLOT(setFluxDensity(double)) );
|
||||
|
||||
|
||||
@@ -112,14 +112,16 @@ void HomoEFieldWidget::createWidget()
|
||||
fieldPowerBox->setDecimals(35);
|
||||
fieldPowerBox->setDisplayDecimals(3);
|
||||
fieldPowerBox->setKeyboardTracking(false);
|
||||
fieldPowerBox->setSuffix(" V/m");
|
||||
connect(homoEField ,SIGNAL(fieldPowerChanged(double)),fieldPowerBox, SLOT(setValue(double)) );
|
||||
connect(fieldPowerBox, SIGNAL(valueChanged(double)),homoEField ,SLOT(setFieldPower(double)) );
|
||||
|
||||
ExpDoubleSpinBox* voltageBox = new ExpDoubleSpinBox;
|
||||
voltageBox->setRange(-1e+200,1e+200);
|
||||
fieldPowerBox->setDecimals(35);
|
||||
fieldPowerBox->setDisplayDecimals(3);
|
||||
voltageBox->setDecimals(35);
|
||||
voltageBox->setDisplayDecimals(3);
|
||||
voltageBox->setKeyboardTracking(false);
|
||||
voltageBox->setSuffix(" V");
|
||||
|
||||
QGridLayout* constGridLayout = new QGridLayout;
|
||||
//constGridLayout->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <QLabel>
|
||||
|
||||
ProbeChargeWidget::ProbeChargeWidget ( QWidget* parent, Qt::WindowFlags f, GraphicsEllipseItem* ellipse ) : QWidget (parent, f ) {
|
||||
ellipseItem = ellipse;
|
||||
createWidget();
|
||||
}
|
||||
|
||||
@@ -43,72 +44,90 @@ void ProbeChargeWidget::createWidget()
|
||||
rotationDial->setWrapping(true);
|
||||
|
||||
|
||||
QDoubleSpinBox *heightBox = new QDoubleSpinBox;
|
||||
ExpDoubleSpinBox *startSpeedYBox = new ExpDoubleSpinBox;
|
||||
startSpeedYBox->setDecimals(50);
|
||||
startSpeedYBox->setDisplayDecimals(3);
|
||||
startSpeedYBox->setRange(-3e+8, 3e+8);
|
||||
startSpeedYBox->setKeyboardTracking(false);
|
||||
connect(startSpeedYBox, SIGNAL(valueChanged(double)), ellipseItem, SLOT(setStartSpeedY(double)) );
|
||||
connect(ellipseItem, SIGNAL(startSpeedYChanged(double)), startSpeedYBox, SLOT(setValue(double)) );
|
||||
|
||||
|
||||
|
||||
QDoubleSpinBox *widthBox = new QDoubleSpinBox;
|
||||
ExpDoubleSpinBox *startSpeedXBox = new ExpDoubleSpinBox;
|
||||
startSpeedXBox->setDecimals(50);
|
||||
startSpeedXBox->setDisplayDecimals(3);
|
||||
startSpeedXBox->setRange(-3e+8, 3e+8);
|
||||
startSpeedXBox->setKeyboardTracking(false);
|
||||
connect(startSpeedXBox, SIGNAL(valueChanged(double)), ellipseItem, SLOT(setStartSpeedX(double)) );
|
||||
connect(ellipseItem, SIGNAL(startSpeedXChanged(double)), startSpeedXBox, SLOT(setValue(double)) );
|
||||
|
||||
|
||||
|
||||
QLabel* xLabel = new QLabel(tr("x:"));
|
||||
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:"));
|
||||
QLabel* startSpeedYLabel = new QLabel(tr("Startgeschwindigkeit y:"));
|
||||
QLabel* startSpeedXLabel = new QLabel(tr("Startgeschwindigkeit x:"));
|
||||
|
||||
QDoubleSpinBox *posXBox = new QDoubleSpinBox;
|
||||
posXBox->setRange(-5000, 5000);
|
||||
posXBox->setKeyboardTracking(false);
|
||||
connect(posXBox, SIGNAL(valueChanged(double)), ellipseItem, SLOT(setScenePosX(double)) );
|
||||
connect(ellipseItem, SIGNAL(ScenePosXChanged(double)), posXBox, SLOT(setValue(double)) );
|
||||
|
||||
|
||||
QDoubleSpinBox *posYBox = new QDoubleSpinBox;
|
||||
posYBox->setRange(-5000, 5000);
|
||||
|
||||
|
||||
QSpinBox* rotationBox = new QSpinBox;
|
||||
rotationBox->setRange(0,359);
|
||||
rotationBox->setSuffix("\260");
|
||||
rotationBox->setWrapping(true);
|
||||
|
||||
posYBox->setKeyboardTracking(false);
|
||||
connect(posYBox, SIGNAL(valueChanged(double)), ellipseItem, SLOT(setScenePosY(double)) );
|
||||
connect(ellipseItem, SIGNAL(ScenePosYChanged(double)), posYBox, SLOT(setValue(double)) );
|
||||
|
||||
|
||||
QGridLayout* geomGridLayout = new QGridLayout;
|
||||
//geomGridLayout->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
geomGridLayout->addWidget(heightBox,4,1);
|
||||
geomGridLayout->addWidget(rotationBox,0,1);
|
||||
geomGridLayout->addWidget(startSpeedYBox,4,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(startSpeedYLabel,4,0,Qt::AlignRight);
|
||||
geomGridLayout->addWidget(startSpeedXLabel,3,0,Qt::AlignRight);
|
||||
geomGridLayout->addWidget(startSpeedXBox,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:"));
|
||||
QLabel* chargeLabel = new QLabel(tr("Ladung:"));
|
||||
QLabel* masseLabel = new QLabel(tr("Masse:"));
|
||||
|
||||
ExpDoubleSpinBox* fieldPowerBox = new ExpDoubleSpinBox;
|
||||
fieldPowerBox->setRange(-1e+200,1e+200);
|
||||
ExpDoubleSpinBox* chargeBox = new ExpDoubleSpinBox;
|
||||
chargeBox->setRange(-1e+200,1e+200);
|
||||
chargeBox->setDecimals(50);
|
||||
chargeBox->setDisplayDecimals(3);
|
||||
chargeBox->setKeyboardTracking(false);
|
||||
chargeBox->setSuffix(" As");
|
||||
connect(chargeBox, SIGNAL(valueChanged(double)), ellipseItem, SLOT(setCharge(double)) );
|
||||
connect(ellipseItem, SIGNAL(chargeChanged(double)), chargeBox, SLOT(setValue(double)) );
|
||||
|
||||
|
||||
ExpDoubleSpinBox* voltageBox = new ExpDoubleSpinBox;
|
||||
voltageBox->setRange(-1e+200,1e+200);
|
||||
ExpDoubleSpinBox* masseBox = new ExpDoubleSpinBox;
|
||||
masseBox->setRange(-1e+200,1e+200);
|
||||
masseBox->setDecimals(50);
|
||||
masseBox->setDisplayDecimals(3);
|
||||
masseBox->setKeyboardTracking(false);
|
||||
masseBox->setSuffix(" kg");
|
||||
connect(masseBox, SIGNAL(valueChanged(double)), ellipseItem, SLOT(setMasse(double)) );
|
||||
connect(ellipseItem, SIGNAL(masseChanged(double)), masseBox, SLOT(setValue(double)) );
|
||||
|
||||
QGridLayout* constGridLayout = new QGridLayout;
|
||||
//constGridLayout->setSizeConstraint(QLayout::SetFixedSize);
|
||||
constGridLayout->addWidget(fieldPowerBox,0,1);
|
||||
constGridLayout->addWidget(voltageBox,1,1);
|
||||
constGridLayout->addWidget(fieldPowerLabel,0,0,Qt::AlignRight);
|
||||
constGridLayout->addWidget(voltageLabel,1,0,Qt::AlignRight);
|
||||
constGridLayout->addWidget(chargeBox,0,1);
|
||||
constGridLayout->addWidget(masseBox,1,1);
|
||||
constGridLayout->addWidget(chargeLabel,0,0,Qt::AlignRight);
|
||||
constGridLayout->addWidget(masseLabel,1,0,Qt::AlignRight);
|
||||
|
||||
QGroupBox* fieldConstantsBox = new QGroupBox(tr("Feldkonstanten"));
|
||||
QGroupBox* fieldConstantsBox = new QGroupBox(tr("Konstanten"));
|
||||
fieldConstantsBox->setLayout(constGridLayout);
|
||||
|
||||
|
||||
@@ -117,10 +136,9 @@ void ProbeChargeWidget::createWidget()
|
||||
mainLayout -> addWidget(fieldConstantsBox);
|
||||
mainLayout -> addStretch();
|
||||
|
||||
QWidget::setTabOrder (rotationBox, posXBox);
|
||||
QWidget::setTabOrder (posXBox, posYBox);
|
||||
QWidget::setTabOrder (posYBox, widthBox);
|
||||
QWidget::setTabOrder (widthBox, heightBox);
|
||||
QWidget::setTabOrder (posYBox, startSpeedYBox);
|
||||
QWidget::setTabOrder (startSpeedYBox, startSpeedXBox);
|
||||
|
||||
this -> setLayout(mainLayout);
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ SimulScene::SimulScene ( QObject* parent ) : QGraphicsScene ( parent ) {
|
||||
ellipse1->setZValue(1);
|
||||
//ellipse1->scale(4,4);
|
||||
ellipse1->setAcceptDrops(true);
|
||||
connect(this,SIGNAL(changed(QList<QRectF>)),ellipse1,SLOT(handleSceneChange(QList<QRectF>)));
|
||||
|
||||
|
||||
addItem(ellipse1);
|
||||
@@ -629,9 +630,9 @@ double SimulScene::getPowerAt(QPointF point, double charge, double speedX, doubl
|
||||
|
||||
double PowerRadAngle; //Winkel des Lorentzkraftvektors zur x-Achse im Bogenmass
|
||||
if (myHomoBFieldItem->getIsDirectionIntoPlane()) {
|
||||
PowerRadAngle = speedRadAngle - PI/2.0;
|
||||
} else {
|
||||
PowerRadAngle = speedRadAngle + PI/2.0;
|
||||
} else {
|
||||
PowerRadAngle = speedRadAngle - PI/2.0;
|
||||
}
|
||||
//qDebug()<< PowerRadAngle;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user