mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
* order, first add items to combobox, then connect signal (->no signals during setup) * renamed driver to plugin * improved plugin finding
43 lines
1.0 KiB
C++
43 lines
1.0 KiB
C++
#ifndef BLACKGUI_SETTINGSSIMULATORCOMPONENT_H
|
|
#define BLACKGUI_SETTINGSSIMULATORCOMPONENT_H
|
|
|
|
#include "runtimebasedcomponent.h"
|
|
#include <QFrame>
|
|
|
|
namespace Ui { class CSettingsSimulatorComponent; }
|
|
|
|
namespace BlackGui
|
|
{
|
|
/*!
|
|
* All simulator settings component (GUI)
|
|
*/
|
|
class CSettingsSimulatorComponent : public QFrame, public CRuntimeBasedComponent
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
//! Constructor
|
|
explicit CSettingsSimulatorComponent(QWidget *parent = nullptr);
|
|
|
|
//! Destructor
|
|
~CSettingsSimulatorComponent();
|
|
|
|
protected:
|
|
//! \copydoc CRuntimeBasedComponent::runtimeHasBeenSet()
|
|
virtual void runtimeHasBeenSet() override;
|
|
|
|
private slots:
|
|
//! Driver changed
|
|
void pluginHasChanged(int index);
|
|
|
|
private:
|
|
Ui::CSettingsSimulatorComponent *ui; //!< UI
|
|
|
|
//! Smarter way to set current driver, avoids unnecessary signals and less formatting dependend
|
|
void setCurrentPlugin(const BlackSim::CSimulatorInfo &driver);
|
|
|
|
};
|
|
|
|
} // namespace
|
|
#endif // guard
|