refs #455 Examples how to register actions

This commit is contained in:
Roland Winklmeier
2015-09-03 16:32:54 +00:00
committed by Mathew Sutcliffe
parent 2636d53b45
commit be7ac1aa74
4 changed files with 19 additions and 1 deletions

View File

@@ -134,5 +134,9 @@ namespace BlackGui
return true;
}
void CSettingsHotkeyComponent::ps_hotkeySlot(bool keyDown)
{
if (keyDown) QMessageBox::information(this, "Test", "Push-To-Talk");
}
} // ns
} // ns

View File

@@ -15,7 +15,7 @@
#include "blackgui/models/actionhotkeylistmodel.h"
#include "blackgui/components/enableforruntime.h"
#include "blackcore/settings/application.h"
#include "blackcore/actionbind.h"
#include <QFrame>
namespace Ui {
@@ -55,6 +55,7 @@ namespace BlackGui
QScopedPointer<Ui::CSettingsHotkeyComponent> ui;
BlackGui::Models::CActionHotkeyListModel m_model;
BlackCore::CSetting<BlackCore::Settings::Application::ActionHotkeys> m_actionHotkeys { this };
BlackCore::CActionBind m_action { "/Test/Message", this, &CSettingsHotkeyComponent::ps_hotkeySlot };
void ps_hotkeySlot(bool keyDown);
};