mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
* move hotkey settings in own GUI component -> easier adjustments * some fixes for dock widgets when tab widget is shown without names (unrelated but found + fixed in same step)
66 lines
1.7 KiB
C++
66 lines
1.7 KiB
C++
/* Copyright (C) 2015
|
|
* swift project Community / Contributors
|
|
*
|
|
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
|
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
|
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
|
* contained in the LICENSE file.
|
|
*/
|
|
|
|
//! \file
|
|
|
|
#ifndef BLACKGUI_COMPONENTS_SETTINGSHOTKEYCOMPONENT_H
|
|
#define BLACKGUI_COMPONENTS_SETTINGSHOTKEYCOMPONENT_H
|
|
|
|
#include "blackgui/blackguiexport.h"
|
|
#include "blackgui/components/enableforruntime.h"
|
|
#include <QFrame>
|
|
|
|
namespace Ui { class CSettingsHotkeyComponent; }
|
|
|
|
namespace BlackGui
|
|
{
|
|
namespace Components
|
|
{
|
|
|
|
//! Define hotkeys
|
|
class BLACKGUI_EXPORT CSettingsHotkeyComponent :
|
|
public QFrame,
|
|
public CEnableForRuntime
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
//! Constructor
|
|
explicit CSettingsHotkeyComponent(QWidget *parent = nullptr);
|
|
|
|
//! Destructor
|
|
~CSettingsHotkeyComponent();
|
|
|
|
//! Reload settings
|
|
void reloadSettings();
|
|
|
|
protected:
|
|
//! \copydoc CRuntimeBasedComponent::runtimeHasBeenSet
|
|
virtual void runtimeHasBeenSet() override;
|
|
|
|
private slots:
|
|
|
|
//! Settings have been changed
|
|
void ps_changedSettings(uint typeValue);
|
|
|
|
//! Save the Hotkeys
|
|
void ps_saveHotkeys();
|
|
|
|
//! Clear single hotkey
|
|
void ps_clearHotkey();
|
|
|
|
private:
|
|
QScopedPointer<Ui::CSettingsHotkeyComponent> ui;
|
|
};
|
|
|
|
} // ns
|
|
} // ns
|
|
|
|
#endif // guard
|