daten an aus eingebaut
git-svn-id: http://svn.lsim.tuxzone.org/trunk@66 4bec179b-ab65-46ed-a5f8-55b8b5c735d0
This commit is contained in:
25
src/lsim.cpp
25
src/lsim.cpp
@@ -694,7 +694,32 @@ void lsim::createDocks() {
|
||||
|
||||
|
||||
|
||||
|
||||
//Daten an aus box
|
||||
QCheckBox *data_on_off_box = new QCheckBox("");
|
||||
data_on_off_box->setChecked(simulscene->getScenePosLablesActive());
|
||||
connect(data_on_off_box, SIGNAL(toggled(bool)),simulscene, SLOT(setScenePosLablesActive(bool)));
|
||||
|
||||
//Ausgrauen bei aus
|
||||
ProbePosGroupBox->setEnabled(simulscene->getScenePosLablesActive());
|
||||
ProbeSpeedGroupBox->setEnabled(simulscene->getScenePosLablesActive());
|
||||
connect(data_on_off_box, SIGNAL(toggled(bool)),ProbePosGroupBox, SLOT(setEnabled(bool)));
|
||||
connect(data_on_off_box, SIGNAL(toggled(bool)),ProbeSpeedGroupBox, SLOT(setEnabled(bool)));
|
||||
|
||||
|
||||
connect(simulscene, SIGNAL(scenePosLablesActiveChanged(bool)),data_on_off_box, SLOT(setChecked(bool)));
|
||||
|
||||
QGridLayout *ProbeDisplayGridLayout = new QGridLayout;
|
||||
ProbeDisplayGridLayout->addWidget(new QLabel("Anzeige Aktivieren"),0,0,Qt::AlignCenter);
|
||||
ProbeDisplayGridLayout->addWidget(data_on_off_box,0,1,Qt::AlignCenter);
|
||||
|
||||
QGroupBox *dataDisplayGroupBox = new QGroupBox(tr(""));
|
||||
dataDisplayGroupBox->setLayout(ProbeDisplayGridLayout);
|
||||
|
||||
|
||||
|
||||
QVBoxLayout *simulDataVBoxLayout = new QVBoxLayout();
|
||||
simulDataVBoxLayout->addWidget(dataDisplayGroupBox);
|
||||
simulDataVBoxLayout->addWidget(ProbePosGroupBox);
|
||||
simulDataVBoxLayout->addWidget(ProbeSpeedGroupBox);
|
||||
simulDataVBoxLayout->addStretch();
|
||||
|
||||
@@ -125,6 +125,7 @@ void SimulScene::drawBackground ( QPainter * painter, const QRectF & rect ) {
|
||||
}
|
||||
|
||||
void SimulScene::handleTimeLineValueChange(qreal value ) {
|
||||
if (!getScenePosLablesActive()) return; //abbrechen, wenn deaktiviert da rechenintensiv
|
||||
int step = 0;
|
||||
QList<QPair<qreal, QPointF> > poslist = ani->posList();
|
||||
for(int i = 1;i<poslist.count() ; ++i ) {
|
||||
@@ -161,6 +162,8 @@ void SimulScene::setupVars() {
|
||||
|
||||
setTimeLineDuration(30000);
|
||||
setFlightPathVisible(true);
|
||||
|
||||
setScenePosLablesActive(false);
|
||||
}
|
||||
|
||||
QList<QVariant> SimulScene::getSaveDataList() {
|
||||
@@ -1155,3 +1158,14 @@ void SimulScene::resetScene() {
|
||||
setupVars();
|
||||
ellipse1->resetProbe();
|
||||
}
|
||||
|
||||
|
||||
bool SimulScene::getScenePosLablesActive() const {
|
||||
return scenePosLablesActive;
|
||||
}
|
||||
|
||||
|
||||
void SimulScene::setScenePosLablesActive ( bool theValue ) {
|
||||
scenePosLablesActive = theValue;
|
||||
emit scenePosLablesActiveChanged(theValue);
|
||||
}
|
||||
|
||||
@@ -87,6 +87,8 @@ class SimulScene : public QGraphicsScene {
|
||||
QList<QVariant> getSaveDataList();
|
||||
void setSaveDataList(QList<QVariant> list);
|
||||
void connectNewFieldItem(FieldItem* item);
|
||||
bool getScenePosLablesActive() const;
|
||||
|
||||
|
||||
public slots:
|
||||
void setSceneMode(SceneMode mode);
|
||||
@@ -116,6 +118,9 @@ class SimulScene : public QGraphicsScene {
|
||||
void resetScene();
|
||||
void handleTimeLineValueChange(qreal value);
|
||||
|
||||
void setScenePosLablesActive ( bool theValue );
|
||||
|
||||
|
||||
private slots:
|
||||
void displayResizeRects(bool move = false);
|
||||
///does the same as displayResizeRects(true)
|
||||
@@ -135,9 +140,12 @@ class SimulScene : public QGraphicsScene {
|
||||
void probeSpeedXChanged(QString text);
|
||||
void probespeedYChanged(QString text);
|
||||
void probeSpeedChanged(QString text);
|
||||
void scenePosLablesActiveChanged(bool truefalse);
|
||||
private:
|
||||
QTimeLine *timer;
|
||||
|
||||
bool scenePosLablesActive;
|
||||
|
||||
SceneMode myMode;
|
||||
|
||||
///Zeit pro Step in sekunden
|
||||
|
||||
Reference in New Issue
Block a user