edit mode/simul mode
git-svn-id: http://svn.lsim.tuxzone.org/trunk@23 4bec179b-ab65-46ed-a5f8-55b8b5c735d0
This commit is contained in:
Binary file not shown.
25
lsim.kdevses
25
lsim.kdevses
@@ -1,28 +1,37 @@
|
||||
<?xml version = '1.0' encoding = 'UTF-8'?>
|
||||
<!DOCTYPE KDevPrjSession>
|
||||
<KDevPrjSession>
|
||||
<DocsAndViews NumberOfDocuments="7" >
|
||||
<DocsAndViews NumberOfDocuments="10" >
|
||||
<Doc0 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/simulscene.h" >
|
||||
<View0 Encoding="" line="55" Type="Source" />
|
||||
<View0 Encoding="" line="45" Type="Source" />
|
||||
</Doc0>
|
||||
<Doc1 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/simulscene.cpp" >
|
||||
<View0 Encoding="" line="312" Type="Source" />
|
||||
<View0 Encoding="" line="116" Type="Source" />
|
||||
</Doc1>
|
||||
<Doc2 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/graphicsellipseitem.h" >
|
||||
<View0 Encoding="" line="32" Type="Source" />
|
||||
<View0 Encoding="" Type="Source" />
|
||||
</Doc2>
|
||||
<Doc3 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/graphicsellipseitem.cpp" >
|
||||
<View0 Encoding="" line="134" Type="Source" />
|
||||
<View0 Encoding="" line="126" Type="Source" />
|
||||
</Doc3>
|
||||
<Doc4 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/lsim.h" >
|
||||
<View0 Encoding="" Type="Source" />
|
||||
<View0 Encoding="" line="61" Type="Source" />
|
||||
</Doc4>
|
||||
<Doc5 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/lsim.cpp" >
|
||||
<View0 Encoding="" line="387" Type="Source" />
|
||||
<View0 Encoding="" line="241" Type="Source" />
|
||||
</Doc5>
|
||||
<Doc6 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/probechargewidget.cpp" >
|
||||
<View0 Encoding="" line="24" Type="Source" />
|
||||
<View0 Encoding="" line="114" Type="Source" />
|
||||
</Doc6>
|
||||
<Doc7 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/stopperitem.h" >
|
||||
<View0 Encoding="" line="31" Type="Source" />
|
||||
</Doc7>
|
||||
<Doc8 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/stopperitem.cpp" >
|
||||
<View0 Encoding="" line="33" Type="Source" />
|
||||
</Doc8>
|
||||
<Doc9 NumberOfViews="1" URL="file:///mnt/sdb1/c%2B%2B/lsim/src/constants.h" >
|
||||
<View0 Encoding="" line="26" Type="Source" />
|
||||
</Doc9>
|
||||
</DocsAndViews>
|
||||
<pluginList>
|
||||
<kdevdebugger>
|
||||
|
||||
@@ -124,12 +124,14 @@ void GraphicsEllipseItem::calculateProbePath(QPointF startPoint) {
|
||||
|
||||
QPointF newPoint(currProbePath->at(i-1).x() + deltaDistX/meterPerPx ,currProbePath->at(i-1).y() + deltaDistY/meterPerPx);
|
||||
|
||||
if (myScene->stopsHere(currProbePath->at(i-1),newPoint)) break;
|
||||
|
||||
currProbePath->append(newPoint);
|
||||
speedListX->append(newspeedX);
|
||||
speedListY->append(newspeedY);
|
||||
|
||||
if (i%path_entry_step == 0 || i==steps) flightPath.lineTo(newPoint);
|
||||
if (myScene->stopsHere(currProbePath->at(i-1),newPoint)) break;
|
||||
|
||||
|
||||
}
|
||||
qDebug()<< difftime(time(0),start_time);
|
||||
|
||||
218
src/lsim.cpp
218
src/lsim.cpp
@@ -48,6 +48,7 @@ lsim::lsim() {
|
||||
createToolBars();
|
||||
createStatusBar();
|
||||
createDocks();
|
||||
setMode(EditMode);
|
||||
}
|
||||
|
||||
void lsim::closeEvent (QCloseEvent *event) {
|
||||
@@ -161,6 +162,24 @@ void lsim::createActions() {
|
||||
connect (modeChangeActGroup, SIGNAL (triggered(QAction*)), this, SLOT (actModeSwitcher(QAction*)));
|
||||
connect (simulscene, SIGNAL(sceneModeChanged(int)) , this, SLOT(setSceneMode(int)));
|
||||
|
||||
|
||||
//Window Mode
|
||||
acts.editModeAct = new QAction (tr ("Edit Mode"), this);
|
||||
acts.editModeAct->setStatusTip (tr ("Edit Mode"));
|
||||
acts.editModeAct->setCheckable(true);
|
||||
acts.editModeAct->setData(QVariant(lsim::EditMode));
|
||||
|
||||
acts.simulationModeAct = new QAction (tr ("Simulation Mode"), this);
|
||||
acts.simulationModeAct->setStatusTip (tr ("Simulation Mode"));
|
||||
acts.simulationModeAct->setCheckable(true);
|
||||
acts.simulationModeAct->setData(QVariant(lsim::SimulationMode));
|
||||
|
||||
windowModeActGroup = new QActionGroup(this);
|
||||
windowModeActGroup->addAction(acts.editModeAct);
|
||||
windowModeActGroup->addAction(acts.simulationModeAct);
|
||||
connect (windowModeActGroup, SIGNAL (triggered(QAction*)), this, SLOT (actWindowModeSwitcher(QAction*)));
|
||||
//connect (simulscene, SIGNAL(sceneModeChanged(int)) , this, SLOT(setSceneMode(int)));
|
||||
|
||||
}
|
||||
|
||||
void lsim::createMenus() {
|
||||
@@ -183,28 +202,76 @@ void lsim::createMenus() {
|
||||
}
|
||||
|
||||
void lsim::createToolBars() {
|
||||
fileToolBar = addToolBar (tr ("File"));
|
||||
fileToolBar->addAction(acts.calculate);
|
||||
fileToolBar->addSeparator();
|
||||
fileToolBar->addAction(acts.timerStart);
|
||||
fileToolBar->addAction(acts.timerStop);
|
||||
windowModeBar = new QToolBar(tr("Modus"));
|
||||
windowModeBar->addAction(acts.editModeAct);
|
||||
windowModeBar->addAction(acts.simulationModeAct);
|
||||
|
||||
editToolBar = addToolBar (tr ("Edit"));
|
||||
timerControlBar = new QToolBar (tr ("Timer"));
|
||||
timerControlBar->addAction(acts.timerStart);
|
||||
timerControlBar->addAction(acts.timerStop);
|
||||
|
||||
editToolBar->addAction(acts.itemEditModeAct);
|
||||
editToolBar->addAction(acts.insertEFieldItemAct);
|
||||
editToolBar->addAction(acts.insertBFieldItemAct);
|
||||
editToolBar->addAction(acts.insertStopperItemAct);
|
||||
editToolBar->addAction(acts.probeChargeItemPlaceAct);
|
||||
sceneModeBar = new QToolBar (tr ("Edit"));
|
||||
sceneModeBar->addAction(acts.itemEditModeAct);
|
||||
sceneModeBar->addAction(acts.insertEFieldItemAct);
|
||||
sceneModeBar->addAction(acts.insertBFieldItemAct);
|
||||
sceneModeBar->addAction(acts.insertStopperItemAct);
|
||||
sceneModeBar->addAction(acts.probeChargeItemPlaceAct);
|
||||
|
||||
upDownToolBar=addToolBar(tr("updown"));
|
||||
upDownToolBar->addAction(acts.moveItemOnBottom);
|
||||
upDownToolBar->addAction(acts.moveItemDown);
|
||||
upDownToolBar->addAction(acts.moveItemUp);
|
||||
upDownToolBar->addAction(acts.moveItemOnTop);
|
||||
upDownBar = new QToolBar(tr("Feldanordnungsreihenfolge"));
|
||||
upDownBar->addAction(acts.moveItemOnBottom);
|
||||
upDownBar->addAction(acts.moveItemDown);
|
||||
upDownBar->addAction(acts.moveItemUp);
|
||||
upDownBar->addAction(acts.moveItemOnTop);
|
||||
|
||||
addToolBar(windowModeBar);
|
||||
|
||||
}
|
||||
|
||||
void lsim::initWindowMode(WindowMode newMode) {
|
||||
removeToolBar(timerControlBar);
|
||||
removeToolBar(sceneModeBar);
|
||||
removeToolBar(upDownBar);
|
||||
removeDockWidget(fieldItemEditDock);
|
||||
removeDockWidget(probeItemDock);
|
||||
removeDockWidget(sceneDock);
|
||||
removeDockWidget(simulOptDock);
|
||||
gview->setDragMode(QGraphicsView::NoDrag);
|
||||
gview->setInteractive(true);
|
||||
if (newMode == lsim::EditMode) {
|
||||
simulscene->clearFlightPath();
|
||||
acts.timerStop->trigger();
|
||||
sceneModeBar->setVisible(true);
|
||||
upDownBar->setVisible(true);
|
||||
fieldItemEditDock->setVisible(true);
|
||||
probeItemDock->setVisible(true);
|
||||
sceneDock->setVisible(true);
|
||||
|
||||
addToolBar(sceneModeBar);
|
||||
addToolBar(upDownBar);
|
||||
addDockWidget(Qt::LeftDockWidgetArea,fieldItemEditDock);
|
||||
addDockWidget(Qt::LeftDockWidgetArea,probeItemDock);
|
||||
addDockWidget(Qt::LeftDockWidgetArea,sceneDock);
|
||||
tabifyDockWidget(probeItemDock,fieldItemEditDock);
|
||||
tabifyDockWidget(fieldItemEditDock, sceneDock);
|
||||
|
||||
} else if (newMode == lsim::SimulationMode) {
|
||||
timerControlBar->setVisible(true);
|
||||
addToolBar(timerControlBar);
|
||||
gview->setDragMode(QGraphicsView::ScrollHandDrag);
|
||||
gview->setInteractive (false);
|
||||
|
||||
addDockWidget(Qt::LeftDockWidgetArea,simulOptDock);
|
||||
simulOptDock->setVisible(true);
|
||||
|
||||
acts.itemEditModeAct->trigger();
|
||||
simulscene->clearSelection();
|
||||
acts.calculate->trigger();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void lsim::createStatusBar() {
|
||||
statusBar()->showMessage (tr ("Willkommen zu lsim"));
|
||||
}
|
||||
@@ -247,6 +314,41 @@ void lsim::createDocks() {
|
||||
connect(meter_per_px_box, SIGNAL(valueChanged(double)),simulscene, SLOT(setMeterPerPx(double)));
|
||||
connect(simulscene, SIGNAL(meterPerPxChanged(double)),meter_per_px_box, SLOT(setValue( double )));
|
||||
|
||||
//description labels
|
||||
QLabel *time_per_step_label = new QLabel(tr("Zeit pro Schritt:"));
|
||||
QLabel *steps_label = new QLabel(tr("Schritte:"));
|
||||
QLabel *meter_per_pixel_label = new QLabel(tr("Ein Pixel entspricht:"));
|
||||
|
||||
//Scene settings Layout
|
||||
QGridLayout *sceneGridLayout = new QGridLayout;
|
||||
sceneGridLayout->addWidget(steps_label,0,0,Qt::AlignRight);
|
||||
sceneGridLayout->addWidget(steps_box,0,1);
|
||||
sceneGridLayout->addWidget(time_per_step_label,1,0,Qt::AlignRight);
|
||||
sceneGridLayout->addWidget(time_step_box,1,1);
|
||||
sceneGridLayout->addWidget(meter_per_pixel_label,2,0,Qt::AlignRight);
|
||||
sceneGridLayout->addWidget(meter_per_px_box,2,1);
|
||||
|
||||
|
||||
QGroupBox *sceneGroupBox = new QGroupBox(tr("Allgemeines"));
|
||||
sceneGroupBox->setLayout(sceneGridLayout);
|
||||
|
||||
QVBoxLayout *allgVBoxLayout = new QVBoxLayout();
|
||||
allgVBoxLayout->addWidget(sceneGroupBox);
|
||||
allgVBoxLayout->addStretch();
|
||||
|
||||
QWidget *allgWidget = new QWidget;
|
||||
allgWidget->setLayout(allgVBoxLayout);
|
||||
|
||||
sceneDock = new QDockWidget(tr("Allgemeines"), this);
|
||||
sceneDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea);
|
||||
sceneDock->setWidget((allgWidget));
|
||||
//sceneDock->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||
//addDockWidget(Qt::LeftDockWidgetArea, sceneDock);
|
||||
|
||||
//**************************************************************************
|
||||
|
||||
|
||||
|
||||
//FlugbahnAnzeigeBox
|
||||
QCheckBox *flight_path_box = new QCheckBox("");
|
||||
flight_path_box->setChecked(simulscene->isFlightPathVisible());
|
||||
@@ -264,49 +366,39 @@ void lsim::createDocks() {
|
||||
|
||||
|
||||
//description labels
|
||||
QLabel *time_per_step_label = new QLabel(tr("Zeit pro Schritt:"));
|
||||
QLabel *steps_label = new QLabel(tr("Schritte:"));
|
||||
QLabel *meter_per_pixel_label = new QLabel(tr("Ein Pixel entspricht:"));
|
||||
QLabel *flight_path_label = new QLabel(tr("Flugbahn anzeigen:"));
|
||||
QLabel *timer_label = new QLabel(tr("L\344nge der Animation:"));
|
||||
|
||||
//Scene settings Layout
|
||||
QGridLayout *sceneGridLayout = new QGridLayout;
|
||||
sceneGridLayout->addWidget(steps_label,0,0,Qt::AlignRight);
|
||||
sceneGridLayout->addWidget(steps_box,0,1);
|
||||
sceneGridLayout->addWidget(time_per_step_label,1,0,Qt::AlignRight);
|
||||
sceneGridLayout->addWidget(time_step_box,1,1);
|
||||
sceneGridLayout->addWidget(meter_per_pixel_label,2,0,Qt::AlignRight);
|
||||
sceneGridLayout->addWidget(meter_per_px_box,2,1);
|
||||
sceneGridLayout->addWidget(flight_path_label,3,0,Qt::AlignRight);
|
||||
sceneGridLayout->addWidget(flight_path_box,3,1);
|
||||
sceneGridLayout->addWidget(timer_label,4,0,Qt::AlignRight);
|
||||
sceneGridLayout->addWidget(timer_box,4,1);
|
||||
//grid layout
|
||||
QGridLayout *simulOptGridLayout = new QGridLayout;
|
||||
simulOptGridLayout->addWidget(flight_path_label,3,0,Qt::AlignRight);
|
||||
simulOptGridLayout->addWidget(flight_path_box,3,1);
|
||||
simulOptGridLayout->addWidget(timer_label,4,0,Qt::AlignRight);
|
||||
simulOptGridLayout->addWidget(timer_box,4,1);
|
||||
|
||||
QGroupBox *sceneGroupBox = new QGroupBox(tr("Allgemeines"));
|
||||
sceneGroupBox->setLayout(sceneGridLayout);
|
||||
QGroupBox *simulOptGroupBox = new QGroupBox(tr("Allgemeines"));
|
||||
simulOptGroupBox->setLayout(simulOptGridLayout);
|
||||
|
||||
QVBoxLayout *allgVBoxLayout = new QVBoxLayout();
|
||||
allgVBoxLayout->addWidget(sceneGroupBox);
|
||||
allgVBoxLayout->addStretch();
|
||||
QVBoxLayout *simulOptVBoxLayout = new QVBoxLayout();
|
||||
simulOptVBoxLayout->addWidget(simulOptGroupBox);
|
||||
simulOptVBoxLayout->addStretch();
|
||||
|
||||
QWidget *allgWidget = new QWidget;
|
||||
allgWidget->setLayout(allgVBoxLayout);
|
||||
|
||||
sceneDock = new QDockWidget(tr("Allgemeines"), this);
|
||||
sceneDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea);
|
||||
sceneDock->setWidget((allgWidget));
|
||||
//sceneDock->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||
addDockWidget(Qt::LeftDockWidgetArea, sceneDock);
|
||||
QWidget *simulOptWidget = new QWidget;
|
||||
simulOptWidget->setLayout(simulOptVBoxLayout);
|
||||
|
||||
simulOptDock = new QDockWidget(tr("Allgemeines"), this);
|
||||
simulOptDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea);
|
||||
simulOptDock->setWidget(simulOptWidget);
|
||||
|
||||
//************************************************************************
|
||||
|
||||
//**************************************************************************
|
||||
|
||||
|
||||
fieldItemEditDock = new QDockWidget(tr("Feldeinstellungen"), this);
|
||||
fieldItemEditDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea);
|
||||
fieldItemEditDock->setWidget(new QWidget);
|
||||
//fieldItemEditDock->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||
addDockWidget(Qt::LeftDockWidgetArea, fieldItemEditDock);
|
||||
//addDockWidget(Qt::LeftDockWidgetArea, fieldItemEditDock);
|
||||
connect (simulscene, SIGNAL(selectionChanged ()) , this, SLOT(updateDockFieldWidget()));
|
||||
updateDockFieldWidget();
|
||||
|
||||
@@ -314,12 +406,12 @@ void lsim::createDocks() {
|
||||
probeItemDock = new QDockWidget(tr("Probleladung"), this);
|
||||
probeItemDock->setWidget(simulscene->getProbeDockWidget());
|
||||
//probeItemDock->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||
addDockWidget(Qt::LeftDockWidgetArea, probeItemDock);
|
||||
//addDockWidget(Qt::LeftDockWidgetArea, probeItemDock);
|
||||
|
||||
|
||||
|
||||
tabifyDockWidget(probeItemDock,fieldItemEditDock);
|
||||
tabifyDockWidget(fieldItemEditDock, sceneDock);
|
||||
//tabifyDockWidget(probeItemDock,fieldItemEditDock);
|
||||
//tabifyDockWidget(fieldItemEditDock, sceneDock);
|
||||
setDockOptions(QMainWindow::VerticalTabs);
|
||||
|
||||
}
|
||||
@@ -328,6 +420,10 @@ void lsim::actModeSwitcher(QAction *action) {
|
||||
simulscene->setSceneMode((SimulScene::SceneMode)action->data().toInt());
|
||||
}
|
||||
|
||||
void lsim::actWindowModeSwitcher(QAction *action) {
|
||||
setMode((lsim::WindowMode)action->data().toInt());
|
||||
}
|
||||
|
||||
void lsim::setSceneMode(int mode) {
|
||||
for (int i=0;i < modeChangeActGroup->actions().count();++i){ //nur das aktuelle checked setzen
|
||||
if(modeChangeActGroup->actions().at(i)->data().toInt() == mode) {
|
||||
@@ -337,6 +433,8 @@ void lsim::setSceneMode(int mode) {
|
||||
modeChangeActGroup->actions().at(i)->setChecked(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
//Problem mit resizeRects, warum auch immer :(
|
||||
//je nach sceneMode den cursor eintellen
|
||||
@@ -425,4 +523,24 @@ void lsim::handleUpDownActionChanges() {
|
||||
acts.moveItemDown->setEnabled(true);
|
||||
acts.moveItemOnBottom->setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lsim::WindowMode lsim::getMode() const {
|
||||
return myMode;
|
||||
}
|
||||
|
||||
|
||||
void lsim::setMode ( const WindowMode& theValue ) {
|
||||
//if(myMode == theValue) return;
|
||||
myMode = theValue;
|
||||
initWindowMode(theValue);
|
||||
for (int i=0;i < windowModeActGroup->actions().count();++i){ //nur das aktuelle checked setzen
|
||||
if(windowModeActGroup->actions().at(i)->data().toInt() == myMode) {
|
||||
windowModeActGroup->actions().at(i)->setChecked(true);
|
||||
}
|
||||
else {
|
||||
windowModeActGroup->actions().at(i)->setChecked(false);
|
||||
}
|
||||
}
|
||||
emit windowModeChanged(theValue);
|
||||
}
|
||||
|
||||
25
src/lsim.h
25
src/lsim.h
@@ -43,21 +43,30 @@ class lsim: public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum WindowMode {EditMode,SimulationMode};
|
||||
lsim();
|
||||
~lsim();
|
||||
|
||||
void setMode ( const WindowMode& theValue );
|
||||
|
||||
|
||||
lsim::WindowMode getMode() const;
|
||||
|
||||
|
||||
protected:
|
||||
void closeEvent (QCloseEvent *event);
|
||||
|
||||
private slots:
|
||||
void about();
|
||||
void actModeSwitcher(QAction *action);
|
||||
void actWindowModeSwitcher(QAction *action);
|
||||
void setSceneMode(int mode);
|
||||
void updateDockFieldWidget();
|
||||
void startCalculation();
|
||||
void startTimer();
|
||||
void handleDockLocationChange();
|
||||
void handleUpDownActionChanges();
|
||||
void initWindowMode(WindowMode newMode);
|
||||
|
||||
private:
|
||||
void createActions();
|
||||
@@ -74,9 +83,10 @@ class lsim: public QMainWindow {
|
||||
QMenu *helpMenu;
|
||||
QMenu *viewMenu;
|
||||
|
||||
QToolBar *fileToolBar;
|
||||
QToolBar *editToolBar;
|
||||
QToolBar *upDownToolBar;
|
||||
QToolBar *timerControlBar;
|
||||
QToolBar *sceneModeBar;
|
||||
QToolBar *upDownBar;
|
||||
QToolBar *windowModeBar;
|
||||
|
||||
struct Actions {
|
||||
QAction *aboutAct;
|
||||
@@ -93,6 +103,9 @@ class lsim: public QMainWindow {
|
||||
QAction *moveItemOnTop;
|
||||
QAction *moveItemOnBottom;
|
||||
|
||||
QAction *editModeAct;
|
||||
QAction *simulationModeAct;
|
||||
|
||||
QAction *itemEditModeAct;
|
||||
QAction *insertEFieldItemAct;
|
||||
QAction *insertBFieldItemAct;
|
||||
@@ -102,14 +115,20 @@ class lsim: public QMainWindow {
|
||||
Actions acts;
|
||||
|
||||
QActionGroup *modeChangeActGroup;
|
||||
QActionGroup *windowModeActGroup;
|
||||
|
||||
|
||||
|
||||
QDockWidget *fieldItemEditDock;
|
||||
QDockWidget *probeItemDock;
|
||||
QDockWidget *sceneDock;
|
||||
QDockWidget *simulOptDock;
|
||||
|
||||
SimulScene *simulscene;
|
||||
|
||||
WindowMode myMode;
|
||||
signals:
|
||||
void windowModeChanged(WindowMode mode);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -114,6 +114,7 @@ void SimulScene::startTimer() {
|
||||
timer->start();
|
||||
}
|
||||
void SimulScene::stopTimer() {
|
||||
timer->setCurrentTime(0);
|
||||
timer->stop();
|
||||
}
|
||||
|
||||
@@ -750,7 +751,7 @@ void SimulScene::startCalculation() {
|
||||
stopTimer();
|
||||
|
||||
//leeren Pfad setezen
|
||||
pathItem1->setPath(QPainterPath());
|
||||
clearFlightPath();
|
||||
|
||||
//Feld Item Listen erzeugen (viel schneller, als jedes mal items(point) durchlaufen)
|
||||
calcEFieldList.clear();
|
||||
@@ -1043,3 +1044,7 @@ void SimulScene::moveSelectedFieldItemOnBottom() {
|
||||
GraphicsEllipseItem* SimulScene::getProbeChargeItem() {
|
||||
return ellipse1;
|
||||
}
|
||||
|
||||
void SimulScene::clearFlightPath() {
|
||||
pathItem1->setPath(QPainterPath());
|
||||
}
|
||||
|
||||
@@ -79,6 +79,8 @@ class SimulScene : public QGraphicsScene {
|
||||
|
||||
GraphicsEllipseItem* getProbeChargeItem();
|
||||
|
||||
void clearFlightPath();
|
||||
|
||||
public slots:
|
||||
void setSceneMode(SceneMode mode);
|
||||
void startTimer();
|
||||
|
||||
Reference in New Issue
Block a user