Remove DebuggerMainWndBase: slotDebuggerStarting.
[kdbg.git] / kdbg / mainwndbase.h
blob5344305040443548ef63360eae5cc1606f72181e
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 MAINWNDBASE_H
8 #define MAINWNDBASE_H
10 #include <qstring.h>
11 #include "watchwindow.h"
13 // forward declarations
14 class KDebugger;
15 class KProcess;
16 class DebuggerDriver;
17 class QListBox;
19 class DebuggerMainWndBase
21 public:
22 DebuggerMainWndBase();
23 virtual ~DebuggerMainWndBase();
25 /**
26 * Sets the command to invoke the terminal that displays the program
27 * output. If cmd is the empty string, the default is substituted.
29 void setTerminalCmd(const QString& cmd);
30 /**
31 * Sets the command to invoke the debugger.
33 void setDebuggerCmdStr(const QString& cmd);
34 /**
35 * Specifies the file where to write the transcript.
37 void setTranscript(const QString& name);
38 /**
39 * Starts to debug the specified program using the specified language
40 * driver.
42 bool debugProgram(const QString& executable, QString lang, QWidget* parent);
43 /**
44 * Specifies the process to attach to after the program is loaded.
46 void setAttachPid(const QString& pid);
48 // the following are needed to handle program arguments
49 void setCoreFile(const QString& corefile);
50 void setRemoteDevice(const QString &remoteDevice);
51 void overrideProgramArguments(const QString& args);
52 /** invokes the global options dialog */
53 virtual void doGlobalOptions(QWidget* parent);
55 protected:
56 // settings
57 virtual void saveSettings(KConfig*);
58 virtual void restoreSettings(KConfig*);
60 // output window
61 QString m_outputTermCmdStr;
62 QString m_outputTermKeepScript;
63 KProcess* m_outputTermProc;
64 int m_ttyLevel;
65 virtual QString createOutputWindow(); /* returns terminal name */
66 void shutdownTermWindow();
68 QString m_transcriptFile; /* where gdb dialog is logged */
70 bool m_popForeground; /* whether main wnd raises when prog stops */
71 int m_backTimeout; /* when wnd goes back */
72 int m_tabWidth; /* tab width in characters (can be 0) */
73 QString m_sourceFilter;
74 QString m_headerFilter;
76 // the debugger proper
77 QString m_debuggerCmdStr;
78 KDebugger* m_debugger;
79 void setupDebugger(QWidget* parent,
80 ExprWnd* localVars,
81 ExprWnd* watchVars,
82 QListBox* backtrace);
83 DebuggerDriver* driverFromLang(QString lang);
84 /**
85 * This function derives a driver name from the contents of the named
86 * file.
88 QString driverNameFromFile(const QString& exe);
91 #endif // MAINWNDBASE_H