OSDN Git Service

debugger: add a 'break at main' checkbox in the 'start and debug external' dialog
[qt-creator-jp/qt-creator-jp.git] / src / plugins / debugger / breakwindow.h
1 /**************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
6 **
7 ** Contact:  Qt Software Information (qt-info@nokia.com)
8 **
9 ** Commercial Usage
10 **
11 ** Licensees holding valid Qt Commercial licenses may use this file in
12 ** accordance with the Qt Commercial License Agreement provided with the
13 ** Software or, alternatively, in accordance with the terms contained in
14 ** a written agreement between you and Nokia.
15 **
16 ** GNU Lesser General Public License Usage
17 **
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file.  Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** If you are unsure which license is appropriate for your use, please
26 ** contact the sales department at qt-sales@nokia.com.
27 **
28 **************************************************************************/
29
30 #ifndef DEBUGGER_BREAKWINDOW_H
31 #define DEBUGGER_BREAKWINDOW_H
32
33 #include <QtGui/QTreeView>
34
35 namespace Debugger {
36 namespace Internal {
37
38 class BreakWindow : public QTreeView
39 {
40     Q_OBJECT
41
42 public:
43     BreakWindow(QWidget *parent = 0);
44
45 public slots:
46     void resizeColumnsToContents();
47     void setAlwaysResizeColumnsToContents(bool on);
48
49 signals:
50     void breakpointDeleted(int index);
51     void breakpointActivated(int index);
52     void breakpointSynchronizationRequested();
53     void breakByFunctionRequested(const QString &functionName);
54     void breakByFunctionMainRequested();
55
56 private slots:
57     void rowActivated(const QModelIndex &index);
58     void setAlternatingRowColorsHelper(bool on) { setAlternatingRowColors(on); }
59
60 protected:
61     void resizeEvent(QResizeEvent *ev);
62     void contextMenuEvent(QContextMenuEvent *ev);
63     void keyPressEvent(QKeyEvent *ev);
64
65 private:
66     void deleteBreakpoint(const QModelIndex &idx);
67     void editCondition(const QModelIndex &idx);
68
69     bool m_alwaysResizeColumnsToContents;
70 };
71
72
73 } // namespace Internal
74 } // namespace Debugger
75
76 #endif // DEBUGGER_BREAKWINDOW
77