Ref T292, Ref T285 moved setToConnectedSimulator into simulator selector so it can be used elsewhere

This commit is contained in:
Klaus Basan
2018-07-26 21:40:30 +02:00
parent 94e3b89479
commit 7a58cc2222
4 changed files with 72 additions and 44 deletions

View File

@@ -15,6 +15,7 @@
#include "blackgui/blackguiexport.h"
#include "blackmisc/simulation/simulatorinfo.h"
#include "blackmisc/simulation/data/modelcaches.h"
#include "blackmisc/digestsignal.h"
#include <QFrame>
#include <QObject>
@@ -63,6 +64,12 @@ namespace BlackGui
//! Set to last selection
void setToLastSelection();
//! Set to the connected simulator
void setToConnectedSimulator(bool makeReadOnly = true);
//! Set to the connected simulator but deferred
void setToConnectedSimulator(int deferredMs, bool makeReadOnly = true);
//! Set all, only making sense with checkboxes
void checkAll();
@@ -119,10 +126,14 @@ namespace BlackGui
//! Trigger CSimulatorSelector::setToLastSelection
void triggerSetToLastSelection();
//! Emit the CSimulatorSelector::changed signal
void emitChangedSignal();
QScopedPointer<Ui::CSimulatorSelector> ui;
Mode m_mode = CheckBoxes;
bool m_noSelectionMeansAll = false; //!< for filters, no selection means all
bool m_rememberSelection = false; //!< remember last selection
BlackMisc::CDigestSignal m_digestButtonsChanged { this, &CSimulatorSelector::emitChangedSignal, 250, 3 };
BlackMisc::CData<BlackMisc::Simulation::Data::TSimulatorLastSelection> m_currentSimulator { this, &CSimulatorSelector::changedLastSelectionRb }; //!< current simulator (used with radio buttons)
BlackMisc::CData<BlackMisc::Simulation::Data::TSimulatorLastSelections> m_currentSimulators { this, &CSimulatorSelector::changedLastSelectionCb }; //!< current simulators (used with multiple checkboxes)
};