Update Graph on/off switches when adding Clones

This commit is contained in:
Mark Watkins 2014-08-29 21:34:21 +10:00
parent 483c887b90
commit 7ee1c64b97
7 changed files with 104 additions and 3 deletions

View File

@ -2179,6 +2179,7 @@ void gGraphView::onSnapshotGraphToggle()
newgraph->setSnapshot(true);
emit GraphsChanged();
// addGraph(newgraph);
updateScale();
@ -2196,6 +2197,8 @@ void gGraphView::onSnapshotGraphToggle()
updateScale();
timedRedraw(0);
emit GraphsChanged();
}
qDebug() << cmd << name;
}

View File

@ -649,6 +649,7 @@ class gGraphView
signals:
void updateCurrentTime(double);
void updateRange(double,double);
void GraphsChanged();
public slots:
//! \brief Callback from the ScrollBar, to change scroll position

View File

@ -411,6 +411,7 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
connect(GraphView, SIGNAL(updateCurrentTime(double)), this, SLOT(on_LineCursorUpdate(double)));
connect(GraphView, SIGNAL(updateRange(double,double)), this, SLOT(on_RangeUpdate(double,double)));
connect(GraphView, SIGNAL(GraphsChanged()), this, SLOT(updateGraphCombo()));
GraphView->setEmptyImage(QPixmap(":/docs/sheep.png"));
}

View File

@ -273,6 +273,7 @@ private slots:
void on_toggleEvents_clicked(bool checked);
void updateGraphCombo();
protected:
@ -311,7 +312,6 @@ private:
void UpdateEventsTree(QTreeWidget * tree,Day *day);
void updateCube();
void updateGraphCombo();
QString getSessionInformation(Day *);

View File

@ -331,7 +331,7 @@ Overview::Overview(QWidget *parent, gGraphView *shared) :
connect(GraphView, SIGNAL(updateCurrentTime(double)), this, SLOT(on_LineCursorUpdate(double)));
connect(GraphView, SIGNAL(updateRange(double,double)), this, SLOT(on_RangeUpdate(double,double)));
connect(GraphView, SIGNAL(GraphsChanged()), this, SLOT(updateGraphCombo()));
}
Overview::~Overview()
{

View File

@ -70,7 +70,6 @@ class Overview : public QWidget
//! \breif List of SummaryCharts shown on the overview page
QVector<SummaryChart *> OverviewCharts;
void updateGraphCombo();
void ResetGraph(QString name);
public slots:
@ -85,6 +84,7 @@ class Overview : public QWidget
void on_rbLastMonth_clicked();
void on_rbEverything_clicked();
void on_rbDateRange_clicked(); */
void updateGraphCombo();
//! \brief Resets the graph view because the Start date has been changed
void on_dateStart_dateChanged(const QDate &date);

View File

@ -1759,6 +1759,18 @@ background: qlineargradient( x1:0 y1:0, x2:1 y2:0, stop:0 white, stop:1 #cccccc)
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>&amp;Cancel</string>
</property>
@ -1766,6 +1778,18 @@ background: qlineargradient( x1:0 y1:0, x2:1 y2:0, stop:0 white, stop:1 #cccccc)
</item>
<item>
<widget class="QPushButton" name="informationButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>&amp;Information Page</string>
</property>
@ -1773,6 +1797,18 @@ background: qlineargradient( x1:0 y1:0, x2:1 y2:0, stop:0 white, stop:1 #cccccc)
</item>
<item>
<widget class="QPushButton" name="retryButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>&amp;Retry</string>
</property>
@ -1780,6 +1816,18 @@ background: qlineargradient( x1:0 y1:0, x2:1 y2:0, stop:0 white, stop:1 #cccccc)
</item>
<item>
<widget class="QPushButton" name="chooseSessionButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>&amp;Choose Session</string>
</property>
@ -1787,6 +1835,18 @@ background: qlineargradient( x1:0 y1:0, x2:1 y2:0, stop:0 white, stop:1 #cccccc)
</item>
<item>
<widget class="QPushButton" name="stopButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>&amp;End Recording</string>
</property>
@ -1794,6 +1854,18 @@ background: qlineargradient( x1:0 y1:0, x2:1 y2:0, stop:0 white, stop:1 #cccccc)
</item>
<item>
<widget class="QPushButton" name="syncButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>&amp;Sync and Save</string>
</property>
@ -1801,6 +1873,18 @@ background: qlineargradient( x1:0 y1:0, x2:1 y2:0, stop:0 white, stop:1 #cccccc)
</item>
<item>
<widget class="QPushButton" name="saveButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>&amp;Save and Finish</string>
</property>
@ -1808,6 +1892,18 @@ background: qlineargradient( x1:0 y1:0, x2:1 y2:0, stop:0 white, stop:1 #cccccc)
</item>
<item>
<widget class="QPushButton" name="nextButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>&amp;Start</string>
</property>