Changeset - 21c0962ff02f
[Not reviewed]
plot-manager
0 3 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2016-08-28 16:18:39
hy@ozderya.net
completely removed now-old plot widget
3 files changed with 7 insertions and 27 deletions:
0 comments (0 inline, 0 general)
src/mainwindow.cpp
Show inline comments
 
@@ -47,26 +47,19 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugi
 
MainWindow::MainWindow(QWidget *parent) :
 
    QMainWindow(parent),
 
    ui(new Ui::MainWindow),
 
    aboutDialog(this),
 
    portControl(&serialPort),
 
    channelMan(1, 1, this),
 
    snapshotMan(this, &channelMan),
 
    commandPanel(&serialPort),
 
    dataFormatPanel(&serialPort, &channelMan),
 
    snapshotMan(this, &channelMan)
 
    dataFormatPanel(&serialPort, &channelMan)
 
{
 

	
 
    ui->setupUi(this);
 
    ui->plot->setParent(NULL);
 
    ui->plot->show();
 

	
 
    ((QVBoxLayout*) ui->centralWidget->layout())->insertWidget(0, &plotArea);
 
    plotMan = new PlotManager(&plotArea);
 

	
 
    // test code
 
    // plotArea.show();
 
    plotMan = new PlotManager(ui->plotArea);
 

	
 
    ui->tabWidget->insertTab(0, &portControl, "Port");
 
    ui->tabWidget->insertTab(1, &dataFormatPanel, "Data Format");
 
    ui->tabWidget->insertTab(2, &plotControlPanel, "Plot");
 
    ui->tabWidget->insertTab(3, &commandPanel, "Commands");
 
    ui->tabWidget->setCurrentIndex(0);
src/mainwindow.h
Show inline comments
 
@@ -67,30 +67,23 @@ private:
 
    QSerialPort serialPort;
 
    PortControl portControl;
 

	
 
    unsigned int numOfSamples;
 

	
 
    QList<QwtPlotCurve*> curves;
 
    // Note: FrameBuffer s are owned by their respective QwtPlotCurve s.
 
    // QList<FrameBuffer*> channelBuffers;
 
    ChannelManager channelMan;
 
    PlotManager* plotMan;
 
    SnapshotManager snapshotMan;
 

	
 
    QLabel spsLabel;
 

	
 
    CommandPanel commandPanel;
 
    DataFormatPanel dataFormatPanel;
 
    PlotControlPanel plotControlPanel;
 

	
 
    SnapshotManager snapshotMan;
 

	
 
    bool isDemoRunning();
 

	
 
    // test widget
 
    QWidget plotArea;
 
    PlotManager* plotMan;
 

	
 
private slots:
 
    void onPortToggled(bool open);
 
    void onPortError(QSerialPort::SerialPortError error);
 

	
 
    void onNumOfSamplesChanged(int value);
 
    void onNumOfChannelsChanged(unsigned value);
src/mainwindow.ui
Show inline comments
 
@@ -13,13 +13,13 @@
 
  <property name="windowTitle">
 
   <string>SerialPlot</string>
 
  </property>
 
  <widget class="QWidget" name="centralWidget">
 
   <layout class="QVBoxLayout" name="verticalLayout_2">
 
    <item>
 
     <widget class="Plot" name="plot" native="true">
 
     <widget class="QWidget" name="plotArea" native="true">
 
      <property name="sizePolicy">
 
       <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
 
        <horstretch>0</horstretch>
 
        <verstretch>0</verstretch>
 
       </sizepolicy>
 
      </property>
 
@@ -87,13 +87,13 @@
 
  <widget class="QMenuBar" name="menuBar">
 
   <property name="geometry">
 
    <rect>
 
     <x>0</x>
 
     <y>0</y>
 
     <width>653</width>
 
     <height>27</height>
 
     <height>20</height>
 
    </rect>
 
   </property>
 
   <widget class="QMenu" name="menuHelp">
 
    <property name="title">
 
     <string>Help</string>
 
    </property>
 
@@ -198,18 +198,12 @@
 
   </property>
 
  </action>
 
 </widget>
 
 <layoutdefault spacing="6" margin="11"/>
 
 <customwidgets>
 
  <customwidget>
 
   <class>Plot</class>
 
   <extends>QWidget</extends>
 
   <header>plot.h</header>
 
   <container>1</container>
 
  </customwidget>
 
  <customwidget>
 
   <class>HidableTabWidget</class>
 
   <extends>QTabWidget</extends>
 
   <header>hidabletabwidget.h</header>
 
   <container>1</container>
 
  </customwidget>
 
 </customwidgets>
0 comments (0 inline, 0 general)