2017-07-19 23:20:32 +02:00
|
|
|
#pragma once
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
#include "lc_commands.h"
|
|
|
|
|
2015-09-27 09:02:57 +02:00
|
|
|
class lcKeyboardShortcuts
|
2013-08-09 06:57:18 +02:00
|
|
|
{
|
2015-09-27 09:02:57 +02:00
|
|
|
public:
|
|
|
|
void Reset();
|
|
|
|
bool Save(const QString& FileName);
|
|
|
|
bool Save(QTextStream& Stream);
|
|
|
|
bool Load(const QString& FileName);
|
|
|
|
bool Load(QTextStream& Stream);
|
|
|
|
|
|
|
|
QString mShortcuts[LC_NUM_COMMANDS];
|
2013-08-09 06:57:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern lcKeyboardShortcuts gKeyboardShortcuts;
|
|
|
|
|
|
|
|
void lcLoadDefaultKeyboardShortcuts();
|
|
|
|
void lcSaveDefaultKeyboardShortcuts();
|
|
|
|
void lcResetDefaultKeyboardShortcuts();
|
|
|
|
|
2016-04-23 02:17:33 +02:00
|
|
|
class lcMouseShortcuts
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void Reset();
|
2020-08-23 03:47:03 +02:00
|
|
|
bool Save(const QString& FileName);
|
2016-04-30 21:40:46 +02:00
|
|
|
bool Save(QStringList& Shortcuts);
|
2020-08-23 03:47:03 +02:00
|
|
|
bool Load(const QString& FileName);
|
2016-04-30 21:40:46 +02:00
|
|
|
bool Load(const QStringList& Shortcuts);
|
2020-08-23 03:47:03 +02:00
|
|
|
|
2016-04-23 02:17:33 +02:00
|
|
|
lcTool GetTool(Qt::MouseButton Button, Qt::KeyboardModifiers Modifiers) const;
|
|
|
|
|
2020-12-05 00:38:49 +01:00
|
|
|
struct lcToolShortcut
|
2016-04-23 02:17:33 +02:00
|
|
|
{
|
2017-07-11 23:25:06 +02:00
|
|
|
Qt::KeyboardModifiers Modifiers1;
|
|
|
|
Qt::MouseButton Button1;
|
|
|
|
Qt::KeyboardModifiers Modifiers2;
|
|
|
|
Qt::MouseButton Button2;
|
2020-12-05 00:38:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
lcToolShortcut mShortcuts[static_cast<int>(lcTool::Count)];
|
2016-04-23 02:17:33 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern lcMouseShortcuts gMouseShortcuts;
|
|
|
|
|
|
|
|
void lcLoadDefaultMouseShortcuts();
|
|
|
|
void lcSaveDefaultMouseShortcuts();
|
|
|
|
void lcResetDefaultMouseShortcuts();
|
|
|
|
|