Merge branch 'maint'
[kdbg.git] / kdbg / dbgmainwnd.h
blobd008f8e4424e8612e4f433f8ad3480aaab0d3a8a
1 /*
2 * Copyright Johannes Sixt
3 * This file is licensed under the GNU General Public License Version 2.
4 * See the file COPYING in the toplevel directory of the source directory.
5 */
7 #ifndef DBGMAINWND_H
8 #define DBGMAINWND_H
10 #include <qtimer.h>
11 #include <kdockwidget.h>
12 #include "mainwndbase.h"
13 #include "regwnd.h"
15 class KRecentFilesAction;
16 class WinStack;
17 class QListBox;
18 class QCString;
19 class ExprWnd;
20 class BreakpointTable;
21 class ThreadList;
22 class MemoryWindow;
23 struct DbgAddr;
25 class DebuggerMainWnd : public KDockMainWindow, public DebuggerMainWndBase
27 Q_OBJECT
28 public:
29 DebuggerMainWnd(const char* name);
30 ~DebuggerMainWnd();
32 bool debugProgram(const QString& exe, const QString& lang);
34 protected:
35 // session properties
36 virtual void saveProperties(KConfig*);
37 virtual void readProperties(KConfig*);
38 // settings
39 void saveSettings(KConfig*);
40 void restoreSettings(KConfig*);
42 void initToolbar();
43 void initKAction();
45 // view windows
46 WinStack* m_filesWindow;
47 QListBox* m_btWindow;
48 ExprWnd* m_localVariables;
49 WatchWindow* m_watches;
50 RegisterView* m_registers;
51 BreakpointTable* m_bpTable;
52 TTYWindow* m_ttyWindow;
53 ThreadList* m_threads;
54 MemoryWindow* m_memoryWindow;
56 QTimer m_backTimer;
58 // recent execs in File menu
59 KRecentFilesAction* m_recentExecAction;
61 protected:
62 virtual bool queryClose();
63 virtual TTYWindow* ttyWindow();
64 virtual QString createOutputWindow();
66 KDockWidget* dockParent(QWidget* w);
67 bool isDockVisible(QWidget* w);
68 bool canChangeDockVisibility(QWidget* w);
69 void dockUpdateHelper(QString action, QWidget* w);
70 void fixDockConfig(KConfig* c, bool upgrade);
72 QString makeSourceFilter();
74 // to avoid flicker when the status bar is updated,
75 // we store the last string that we put there
76 QString m_lastActiveStatusText;
77 bool m_animRunning;
79 signals:
80 void setTabWidth(int tabWidth);
82 public slots:
83 virtual void updateUI();
84 virtual void updateLineItems();
85 void slotFileChanged();
86 void slotAddWatch();
87 void slotAddWatch(const QString& text);
88 void slotNewFileLoaded();
89 void slotNewStatusMsg();
90 void slotDebuggerStarting();
91 void slotToggleBreak(const QString&, int, const DbgAddr&, bool);
92 void slotEnaDisBreak(const QString&, int, const DbgAddr&);
93 void slotTermEmuExited();
94 void slotProgramStopped();
95 void slotBackTimer();
96 void slotRecentExec(const KURL& url);
97 void slotLocalsPopup(QListViewItem*, const QPoint& pt);
98 void slotLocalsToWatch();
99 void slotEditValue();
101 void slotFileOpen();
102 void slotFileExe();
103 void slotFileCore();
104 void slotFileGlobalSettings();
105 void slotFileProgSettings();
106 void slotViewStatusbar();
107 void slotExecUntil();
108 void slotExecAttach();
109 void slotExecArgs();
110 void intoBackground();
111 void slotConfigureKeys();
114 #endif // DBGMAINWND_H