summaryrefslogtreecommitdiffstats
path: root/kdbg/dbgmainwnd.h
blob: 67173906871fc2789daa4e1ad9d2aef77124953b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/*
 * Copyright Johannes Sixt
 * This file is licensed under the GNU General Public License Version 2.
 * See the file COPYING in the toplevel directory of the source directory.
 */

#ifndef DBGMAINWND_H
#define DBGMAINWND_H

#include <tqtimer.h>
#include <kdockwidget.h>
#include "mainwndbase.h"
#include "regwnd.h"

class TDERecentFilesAction;
class WinStack;
class TQListBox;
class TQCString;
class ExprWnd;
class BreakpointTable;
class ThreadList;
class MemoryWindow;
struct DbgAddr;

class DebuggerMainWnd : public KDockMainWindow, public DebuggerMainWndBase
{
    Q_OBJECT
public:
    DebuggerMainWnd(const char* name);
    ~DebuggerMainWnd();

    bool debugProgram(const TQString& exe, const TQString& lang);

protected:
    // session properties
    virtual void saveProperties(TDEConfig*);
    virtual void readProperties(TDEConfig*);
    // settings
    void saveSettings(TDEConfig*);
    void restoreSettings(TDEConfig*);

    void initToolbar();
    void initKAction();

    // view windows
    WinStack* m_filesWindow;
    TQListBox* m_btWindow;
    ExprWnd* m_localVariables;
    WatchWindow* m_watches;
    RegisterView* m_registers;
    BreakpointTable* m_bpTable;
    TTYWindow* m_ttyWindow;
    ThreadList* m_threads;
    MemoryWindow* m_memoryWindow;

    TQTimer m_backTimer;

    // recent execs in File menu
    TDERecentFilesAction* m_recentExecAction;

protected:
    virtual bool queryClose();
    virtual TTYWindow* ttyWindow();
    virtual TQString createOutputWindow();

    KDockWidget* dockParent(TQWidget* w);
    bool isDockVisible(TQWidget* w);
    bool canChangeDockVisibility(TQWidget* w);
    void dockUpdateHelper(TQString action, TQWidget* w);
    void fixDockConfig(TDEConfig* c, bool upgrade);

    TQString makeSourceFilter();

    // to avoid flicker when the status bar is updated,
    // we store the last string that we put there
    TQString m_lastActiveStatusText;
    bool m_animRunning;

signals:
    void setTabWidth(int tabWidth);

public slots:
    virtual void updateUI();
    virtual void updateLineItems();
    void slotAddWatch();
    void slotAddWatch(const TQString& text);
    void slotNewFileLoaded();
    void slotNewStatusMsg();
    void slotDebuggerStarting();
    void slotToggleBreak(const TQString&, int, const DbgAddr&, bool);
    void slotEnaDisBreak(const TQString&, int, const DbgAddr&);
    void slotTermEmuExited();
    void slotProgramStopped();
    void slotBackTimer();
    void slotRecentExec(const KURL& url);
    void slotLocalsPopup(TQListViewItem*, const TQPoint& pt);
    void slotLocalsToWatch();
    void slotEditValue();

    void slotFileOpen();
    void slotFileExe();
    void slotFileCore();
    void slotFileGlobalSettings();
    void slotFileProgSettings();
    void slotViewStatusbar();
    void slotExecUntil();
    void slotExecAttach();
    void slotExecArgs();
    void intoBackground();
    void slotConfigureKeys();
};

#endif // DBGMAINWND_H