debuggeractions.h 4.21 KB
Newer Older
hjk's avatar
hjk committed
1 2 3 4 5 6
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
7
** Contact: Nokia Corporation (qt-info@nokia.com)
hjk's avatar
hjk committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
hjk's avatar
hjk committed
26
** contact the sales department at http://qt.nokia.com/contact.
hjk's avatar
hjk committed
27 28 29 30 31 32
**
**************************************************************************/

#ifndef DEBUGGER_ACTIONS_H
#define DEBUGGER_ACTIONS_H

33
#include <QtCore/QHash>
34

35
#include <utils/savedaction.h>
36

37 38 39
QT_BEGIN_NAMESPACE
class QActionGroup;
QT_END_NAMESPACE
40

41 42
namespace Debugger {
namespace Internal {
43

hjk's avatar
hjk committed
44
class DebuggerSettings : public QObject
45 46 47
{
    Q_OBJECT
public:
hjk's avatar
hjk committed
48 49
    DebuggerSettings(QObject *parent = 0);
    ~DebuggerSettings();
dt's avatar
dt committed
50

51 52
    void insertItem(int code, Utils::SavedAction *item);
    Utils::SavedAction *item(int code) const;
53

54
    QString dump() const;
55

56 57
    static DebuggerSettings *instance();

58 59
public slots:
    void readSettings(QSettings *settings);
60
    void writeSettings(QSettings *settings) const;
61 62

private:
63
    QHash<int, Utils::SavedAction *> m_items;
64 65 66 67 68
};


///////////////////////////////////////////////////////////

hjk's avatar
hjk committed
69
enum DebuggerActionCode
hjk's avatar
hjk committed
70 71 72 73 74
{
    // General
    SettingsDialog,
    AdjustColumnWidths,
    AlwaysAdjustColumnWidths,
75
    UseAlternatingRowColors,
76
    UseMessageBoxForSignals,
hjk's avatar
hjk committed
77
    AutoQuit,
hjk's avatar
hjk committed
78
    LockView,
79
    LogTimeStamps,
80
    VerboseLog,
81
    OperateByInstruction,
82
    AutoDerefPointers,
hjk's avatar
hjk committed
83

84 85 86 87 88
    RecheckDebuggingHelpers,
    UseDebuggingHelpers,
    UseCustomDebuggingHelperLocation,
    CustomDebuggingHelperLocation,
    DebugDebuggingHelpers,
89 90

    UseCodeModel,
91

92 93 94 95 96 97 98
    UseToolTipsInMainEditor,
    UseToolTipsInLocalsView,
    UseToolTipsInBreakpointsView,
    UseToolTipsInStackView,
    UseAddressInBreakpointsView,
    UseAddressInStackView,

hjk's avatar
hjk committed
99 100 101 102
    // Gdb
    GdbLocation,
    GdbEnvironment,
    GdbScriptFile,
103
    ExecuteCommand,
104
    GdbWatchdogTimeout,
hjk's avatar
hjk committed
105

106 107
    // Stack
    MaximalStackDepth,
108
    ExpandStack,
109

hjk's avatar
hjk committed
110 111
    // Watchers & Locals
    WatchExpression,
112
    WatchExpressionInWindow,
hjk's avatar
hjk committed
113
    RemoveWatchExpression,
114
    WatchPoint,
hjk's avatar
hjk committed
115
    AssignValue,
hjk's avatar
hjk committed
116
    AssignType,
117 118
    ShowStdNamespace,
    ShowQtNamespace,
hjk's avatar
hjk committed
119

hjk's avatar
hjk committed
120 121 122 123
    // Source List
    ListSourceFiles,

    // Running
124
    SkipKnownFrames,
125
    EnableReverseDebugging,
hjk's avatar
hjk committed
126 127 128 129 130 131 132

    // Breakpoints
    SynchronizeBreakpoints,
    AllPluginBreakpoints,
    SelectedPluginBreakpoints,
    NoPluginBreakpoints,
    SelectedPluginBreakpointsPattern,
133 134 135
    UsePreciseBreakpoints,
    BreakOnThrow,
    BreakOnCatch
136
};
hjk's avatar
hjk committed
137

138
// singleton access
139
Utils::SavedAction *theDebuggerAction(int code);
hjk's avatar
hjk committed
140

141
// convenience
hjk's avatar
hjk committed
142 143
bool theDebuggerBoolSetting(int code);
QString theDebuggerStringSetting(int code);
hjk's avatar
hjk committed
144

145 146
struct DebuggerManagerActions
{
147 148 149 150 151
    QAction *continueAction;
    QAction *stopAction;
    QAction *resetAction; // FIXME: Should not be needed in a stable release
    QAction *stepAction;
    QAction *stepOutAction;
152 153
    QAction *runToLineAction1; // in the Debug menu
    QAction *runToLineAction2; // in the text editor context menu
154
    QAction *runToFunctionAction;
155 156
    QAction *jumpToLineAction1; // in the Debug menu
    QAction *jumpToLineAction2; // in the text editor context menu
157
    QAction *nextAction;
158
    QAction *snapshotAction;
159 160
    QAction *watchAction1; // in the Debug menu
    QAction *watchAction2; // in the text editor context menu
161 162 163 164 165
    QAction *breakAction;
    QAction *sepAction;
    QAction *reverseDirectionAction;
};

hjk's avatar
hjk committed
166 167 168 169
} // namespace Internal
} // namespace Debugger

#endif // DEBUGGER_WATCHWINDOW_H