mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #455 Examples how to register actions
This commit is contained in:
committed by
Mathew Sutcliffe
parent
2636d53b45
commit
be7ac1aa74
@@ -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
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user