refs #912, settings hotkey component, added default hotkey entry for PTT

This commit is contained in:
Klaus Basan
2017-03-18 22:51:43 +01:00
committed by Mathew Sutcliffe
parent 142bc82e03
commit 946795a35f
2 changed files with 56 additions and 11 deletions

View File

@@ -16,13 +16,12 @@
#include "blackcore/application/applicationsettings.h"
#include "blackgui/blackguiexport.h"
#include "blackgui/models/actionhotkeylistmodel.h"
#include "blackmisc/input/actionhotkey.h"
#include "blackmisc/input/actionhotkeylist.h"
#include "blackmisc/settingscache.h"
#include "blackmisc/icons.h"
#include <QFrame>
#include <QObject>
#include <QWizardPage>
#include <QScopedPointer>
class QWidget;
@@ -45,6 +44,12 @@ namespace BlackGui
//! Destructor
virtual ~CSettingsHotkeyComponent();
//! Save settings
void saveSettings();
//! Create dummy/emtpy Ptt entry for wizard
void registerDummyPttEntry();
private slots:
void ps_addEntry();
void ps_editEntry();
@@ -63,6 +68,25 @@ namespace BlackGui
BlackMisc::CSetting<BlackCore::Application::TActionHotkeys> m_actionHotkeys { this };
BlackCore::CActionBind m_action { "/Test/Message", BlackMisc::CIcons::wrench16(), this, &CSettingsHotkeyComponent::ps_hotkeySlot };
};
/**
* Wizard page for CConfigSimulatorComponent
*/
class CConfigHotkeyWizardPage : public QWizardPage
{
public:
//! Constructors
using QWizardPage::QWizardPage;
//! Set config
void setConfigComponent(CSettingsHotkeyComponent *config) { m_config = config; }
//! \copydoc QWizardPage::validatePage
virtual bool validatePage() override;
private:
CSettingsHotkeyComponent *m_config = nullptr;
};
} // ns
} // ns