Changeset - 42deb804719e
[Not reviewed]
plot-manager
0 4 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2016-08-25 01:23:49
hy@ozderya.net
added multi plot checkbox to plot panel
4 files changed with 23 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/mainwindow.cpp
Show inline comments
 
@@ -126,6 +126,9 @@ MainWindow::MainWindow(QWidget *parent) 
 
    connect(&plotControlPanel, &PlotControlPanel::scaleChanged,
 
            ui->plot, &Plot::setAxis);
 

	
 
    connect(&plotControlPanel, &PlotControlPanel::multiPlotChanged,
 
            plotMan, &PlotManager::setMulti);
 

	
 
    QObject::connect(ui->actionClear, SIGNAL(triggered(bool)),
 
                     this, SLOT(clearPlot()));
 

	
src/plotcontrolpanel.cpp
Show inline comments
 
@@ -60,6 +60,9 @@ PlotControlPanel::PlotControlPanel(QWidg
 
    connect(ui->spYmin, SIGNAL(valueChanged(double)),
 
            this, SLOT(onYScaleChanged()));
 

	
 
    connect(ui->cbMultiPlot, &QCheckBox::toggled,
 
            this, &PlotControlPanel::multiPlotChanged);
 

	
 
    // init scale range preset list
 
    for (int nbits = 8; nbits <= 24; nbits++) // signed binary formats
 
    {
 
@@ -152,3 +155,8 @@ void PlotControlPanel::setChannelNamesMo
 
{
 
    ui->lvChannelNames->setModel(model);
 
}
 

	
 
bool PlotControlPanel::multiPlot()
 
{
 
    return ui->cbMultiPlot->isChecked();
 
}
src/plotcontrolpanel.h
Show inline comments
 
@@ -39,12 +39,14 @@ public:
 
    bool autoScale();
 
    double yMax();
 
    double yMin();
 
    bool multiPlot(); ///< returns true if multi plot is selected
 

	
 
    void setChannelNamesModel(QAbstractItemModel * model);
 

	
 
signals:
 
    void numOfSamplesChanged(int value);
 
    void scaleChanged(bool autoScaled, double yMin = 0, double yMax = 1);
 
    void multiPlotChanged(bool enabled);
 

	
 
private:
 
    Ui::PlotControlPanel *ui;
src/plotcontrolpanel.ui
Show inline comments
 
@@ -157,6 +157,16 @@
 
       </property>
 
      </widget>
 
     </item>
 
     <item row="5" column="0">
 
      <widget class="QCheckBox" name="cbMultiPlot">
 
       <property name="toolTip">
 
        <string>Plot all channels separately</string>
 
       </property>
 
       <property name="text">
 
        <string>Multi Plot</string>
 
       </property>
 
      </widget>
 
     </item>
 
    </layout>
 
   </item>
 
  </layout>
0 comments (0 inline, 0 general)