2016-07-08 03:45:02 +00:00
|
|
|
#ifndef CSM_PREFS_SHORTCUTSETTING_H
|
|
|
|
#define CSM_PREFS_SHORTCUTSETTING_H
|
|
|
|
|
|
|
|
#include <QKeySequence>
|
|
|
|
|
|
|
|
#include "setting.hpp"
|
|
|
|
|
|
|
|
namespace CSMPrefs
|
|
|
|
{
|
|
|
|
class ShortcutSetting : public Setting
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2016-07-22 05:58:17 +00:00
|
|
|
typedef std::pair<QKeySequence, int> SequenceData;
|
|
|
|
|
2016-07-08 03:45:02 +00:00
|
|
|
ShortcutSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
2016-07-22 05:58:17 +00:00
|
|
|
const std::string& label, const SequenceData& default_);
|
2016-07-08 03:45:02 +00:00
|
|
|
|
|
|
|
// TODO replace with custom page
|
|
|
|
virtual std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent);
|
|
|
|
|
2016-07-22 05:58:17 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
SequenceData mDefault;
|
|
|
|
|
2016-07-08 03:45:02 +00:00
|
|
|
private slots:
|
|
|
|
|
|
|
|
void valueChanged(const QString& text);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|