forked from qt-creator/qt-creator
debugger: progress on action generalization
mostly renamings
This commit is contained in:
@@ -42,17 +42,17 @@ class QSettings;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
|
||||
enum ApplyMode { ImmediateApply, DeferedApply };
|
||||
|
||||
class DebuggerAction : public QAction
|
||||
class SavedAction : public QAction
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DebuggerAction(QObject *parent = 0);
|
||||
SavedAction(QObject *parent = 0);
|
||||
|
||||
virtual QVariant value() const;
|
||||
Q_SLOT virtual void setValue(const QVariant &value, bool doemit = true);
|
||||
@@ -103,20 +103,27 @@ private:
|
||||
ApplyMode m_applyMode;
|
||||
};
|
||||
|
||||
class DebuggerSettingsGroup
|
||||
class SavedActionSet
|
||||
{
|
||||
public:
|
||||
DebuggerSettingsGroup() {}
|
||||
~DebuggerSettingsGroup() {}
|
||||
SavedActionSet() {}
|
||||
~SavedActionSet() {}
|
||||
|
||||
void insert(DebuggerAction *action, QWidget *widget);
|
||||
void insert(SavedAction *action, QWidget *widget);
|
||||
void apply(QSettings *settings);
|
||||
void finish();
|
||||
void clear() { m_list.clear(); }
|
||||
|
||||
private:
|
||||
QList<DebuggerAction *> m_list;
|
||||
QList<SavedAction *> m_list;
|
||||
};
|
||||
|
||||
} // namespace Utils
|
||||
} // namespace Core
|
||||
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class DebuggerSettings : public QObject
|
||||
{
|
||||
@@ -126,8 +133,8 @@ public:
|
||||
DebuggerSettings(QObject *parent = 0);
|
||||
~DebuggerSettings();
|
||||
|
||||
void insertItem(int code, DebuggerAction *item);
|
||||
DebuggerAction *item(int code);
|
||||
void insertItem(int code, Core::Utils::SavedAction *item);
|
||||
Core::Utils::SavedAction *item(int code);
|
||||
|
||||
QString dump();
|
||||
|
||||
@@ -136,7 +143,7 @@ public slots:
|
||||
void writeSettings(QSettings *settings);
|
||||
|
||||
private:
|
||||
QHash<int, DebuggerAction *> m_items;
|
||||
QHash<int, Core::Utils::SavedAction *> m_items;
|
||||
};
|
||||
|
||||
|
||||
@@ -199,7 +206,7 @@ enum DebuggerActionCode
|
||||
|
||||
// singleton access
|
||||
DebuggerSettings *theDebuggerSettings();
|
||||
DebuggerAction *theDebuggerAction(int code);
|
||||
Core::Utils::SavedAction *theDebuggerAction(int code);
|
||||
|
||||
// convienience
|
||||
bool theDebuggerBoolSetting(int code);
|
||||
|
||||
Reference in New Issue
Block a user