Update the admin/ directory.
[kdbg.git] / kdbg / dbgmainwnd.h
blob30d3d1340a17803bc56f8dcee71e8000b97bbde1
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, QCString 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 // statusbar texts
43 void updateLineStatus(int lineNo); /* zero-based line number */
45 void initToolbar();
46 void initKAction();
48 // view windows
49 WinStack* m_filesWindow;
50 QListBox* m_btWindow;
51 ExprWnd* m_localVariables;
52 WatchWindow* m_watches;
53 RegisterView* m_registers;
54 BreakpointTable* m_bpTable;
55 TTYWindow* m_ttyWindow;
56 ThreadList* m_threads;
57 MemoryWindow* m_memoryWindow;
59 QTimer m_backTimer;
61 // recent execs in File menu
62 KRecentFilesAction* m_recentExecAction;
64 protected:
65 virtual void closeEvent(QCloseEvent* e);
66 virtual TTYWindow* ttyWindow();
67 virtual QString createOutputWindow();
69 KDockWidget* dockParent(QWidget* w);
70 bool isDockVisible(QWidget* w);
71 bool canChangeDockVisibility(QWidget* w);
72 void dockUpdateHelper(QString action, QWidget* w);
73 void fixDockConfig(KConfig* c, bool upgrade);
75 QString makeSourceFilter();
77 // to avoid flicker when the status bar is updated,
78 // we store the last string that we put there
79 QString m_lastActiveStatusText;
80 bool m_animRunning;
82 signals:
83 void setTabWidth(int tabWidth);
85 public slots:
86 virtual void updateUI();
87 virtual void updateLineItems();
88 void slotFileChanged();
89 void slotLineChanged();
90 void slotAddWatch();
91 void slotAddWatch(const QString& text);
92 void slotNewFileLoaded();
93 void slotNewStatusMsg();
94 void slotDebuggerStarting();
95 void slotToggleBreak(const QString&, int, const DbgAddr&, bool);
96 void slotEnaDisBreak(const QString&, int, const DbgAddr&);
97 void slotTermEmuExited();
98 void slotProgramStopped();
99 void slotBackTimer();
100 void slotRecentExec(const KURL& url);
101 void slotLocalsPopup(QListViewItem*, const QPoint& pt);
102 void slotLocalsToWatch();
103 void slotEditValue();
105 void slotFileOpen();
106 void slotFileQuit();
107 void slotFileExe();
108 void slotFileCore();
109 void slotFileGlobalSettings();
110 void slotFileProgSettings();
111 void slotViewToolbar();
112 void slotViewStatusbar();
113 void slotExecUntil();
114 void slotExecAttach();
115 void slotExecArgs();
116 void intoBackground();
117 void slotConfigureKeys();
120 #endif // DBGMAINWND_H