]> Devoid-pointer.net GitWeb - anyanka.git/commitdiff
Determine whetner the "Single signal" view mode is active from states of
authorMichal Malý <madcatxster@devoid-pointer.net>
Sat, 28 Feb 2015 18:28:22 +0000 (19:28 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Sat, 28 Feb 2015 18:28:22 +0000 (19:28 +0100)
other widgets instead of storing the state in a variable.

gui/mainwindow.cpp
gui/mainwindow.h

index f41973cfcb678e4747c58f9551c96f2f03ad56cc..c4982b022baf14ce979b4f002d61c11e3e7d7b14 100644 (file)
@@ -29,7 +29,7 @@
 
 MainWindow::MainWindow(QWidget *parent) :
   QMainWindow(parent),
-  m_singleSignalView(false),
+  //m_singleSignalView(false),
   ui(new Ui::MainWindow)
 {
   ui->setupUi(this);
@@ -190,15 +190,23 @@ void MainWindow::onSWFullSizeToggle()
   QWidget* sender = qobject_cast<QWidget*>(QObject::sender());
 
   for (int idx = 0; idx < m_dashboard->count(); idx++) {
-    if (m_dashboard->widget(idx) != sender) {
+    /*if (m_dashboard->widget(idx) != sender) {
       if (!m_singleSignalView)
         m_dashboard->widget(idx)->hide();
       else
         m_dashboard->widget(idx)->show();
+    }*/
+    QWidget* w = m_dashboard->widget(idx);
+
+    if (w != sender) {
+      if (w->isHidden())
+        w->show();
+      else
+        w->hide();
     }
   }
 
-  m_singleSignalView = !m_singleSignalView;
+  //m_singleSignalView = !m_singleSignalView;
 }
 
 void MainWindow::onZoomSelected()
index b3f5da554bcaa294df7e37124b0778b2f0ec73b3..50b7bf1c9f4dcdb2ff85d00551f569099ad65b5a 100644 (file)
@@ -58,7 +58,7 @@ private:
   //std::vector<SignalView*> m_itemsOnDashboard;
   QSplitter* m_dashboard;
   QFileDialog* m_loadDataFileDialog;
-  bool m_singleSignalView;
+  //bool m_singleSignalView;
   Ui::MainWindow *ui;
 
 public slots: