mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
refs #617, CActionItem supports icon
* standard paths for applications * support for Qt::DecorationRole * QMap<QString, QPixmap> m_availableActions * Constructor for icon only * only leafs support actions
This commit is contained in:
committed by
Mathew Sutcliffe
parent
6a96d14baa
commit
a34be02e07
@@ -19,6 +19,7 @@
|
||||
#include "blackmisc/input/actionhotkey.h"
|
||||
#include "blackmisc/input/actionhotkeylist.h"
|
||||
#include "blackmisc/settingscache.h"
|
||||
#include "blackmisc/icons.h"
|
||||
|
||||
#include <QFrame>
|
||||
#include <QObject>
|
||||
@@ -60,7 +61,7 @@ namespace BlackGui
|
||||
QScopedPointer<Ui::CSettingsHotkeyComponent> ui;
|
||||
BlackGui::Models::CActionHotkeyListModel m_model;
|
||||
BlackMisc::CSetting<BlackCore::Application::TActionHotkeys> m_actionHotkeys { this };
|
||||
BlackCore::CActionBind m_action { "/Test/Message", this, &CSettingsHotkeyComponent::ps_hotkeySlot };
|
||||
BlackCore::CActionBind m_action { "/Test/Message", BlackMisc::CIcons::wrench16(), this, &CSettingsHotkeyComponent::ps_hotkeySlot };
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -60,7 +60,8 @@ namespace BlackGui
|
||||
setupCompleter();
|
||||
|
||||
// hotkeys
|
||||
m_hotkeyBindings.append(CGuiActionBindHandler::bindButton(ui->pb_ActivateWeather, "Weather/Toggle weather", true));
|
||||
const QString swift(CGuiActionBindHandler::pathSwiftPilotClient());
|
||||
m_hotkeyBindings.append(CGuiActionBindHandler::bindButton(ui->pb_ActivateWeather, swift + "Weather/Toggle weather", true));
|
||||
|
||||
// Set interval to 5 min
|
||||
m_weatherUpdateTimer.setInterval(1000 * 60 * 5);
|
||||
|
||||
Reference in New Issue
Block a user