Show the active file's name as tab tooltip instead of in the title bar.
[kdbg.git] / kdbg / dbgmainwnd.h
blobcac766b301a791a1806f0c9e135d7414bc3183fd
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 slotAddWatch();
86 void slotAddWatch(const QString& text);
87 void slotNewFileLoaded();
88 void slotNewStatusMsg();
89 void slotDebuggerStarting();
90 void slotToggleBreak(const QString&, int, const DbgAddr&, bool);
91 void slotEnaDisBreak(const QString&, int, const DbgAddr&);
92 void slotTermEmuExited();
93 void slotProgramStopped();
94 void slotBackTimer();
95 void slotRecentExec(const KURL& url);
96 void slotLocalsPopup(QListViewItem*, const QPoint& pt);
97 void slotLocalsToWatch();
98 void slotEditValue();
100 void slotFileOpen();
101 void slotFileExe();
102 void slotFileCore();
103 void slotFileGlobalSettings();
104 void slotFileProgSettings();
105 void slotViewStatusbar();
106 void slotExecUntil();
107 void slotExecAttach();
108 void slotExecArgs();
109 void intoBackground();
110 void slotConfigureKeys();
113 #endif // DBGMAINWND_H