# HG changeset patch # User Hasan Yavuz Ă–ZDERYA # Date 2016-08-28 16:18:39 # Node ID 21c0962ff02fccc953982a303ccba21985e772d4 # Parent 2f04c80c72e384266f12c2fbc1c829a59f12365b completely removed now-old plot widget diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -50,20 +50,13 @@ MainWindow::MainWindow(QWidget *parent) 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"); diff --git a/src/mainwindow.h b/src/mainwindow.h --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -70,24 +70,17 @@ private: unsigned int numOfSamples; QList curves; - // Note: FrameBuffer s are owned by their respective QwtPlotCurve s. - // QList 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); diff --git a/src/mainwindow.ui b/src/mainwindow.ui --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -16,7 +16,7 @@ - + 0 @@ -90,7 +90,7 @@ 0 0 653 - 27 + 20 @@ -201,12 +201,6 @@ - Plot - QWidget -
plot.h
- 1 -
- HidableTabWidget QTabWidget
hidabletabwidget.h