OSDN Git Service

8773d5205c11e29baa124c7657a24c768fc2bea6
[qt-creator-jp/qt-creator-jp.git] / src / plugins / analyzerbase / analyzeroutputpane.h
1 /**************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
6 **
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
8 **
9 ** No Commercial Usage
10 **
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
14 ** this package.
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 ** In addition, as a special exception, Nokia gives you certain additional
26 ** rights.  These rights are described in the Nokia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** If you have questions regarding the use of this file, please contact
30 ** Nokia at qt-info@nokia.com.
31 **
32 **************************************************************************/
33
34 #ifndef ANALYZEROUTPUTPANE_H
35 #define ANALYZEROUTPUTPANE_H
36
37 #include <coreplugin/ioutputpane.h>
38
39 QT_FORWARD_DECLARE_CLASS(QStackedLayout)
40 QT_FORWARD_DECLARE_CLASS(QStackedWidget)
41
42 namespace Utils {
43 class StyledSeparator;
44 }
45
46 namespace Analyzer {
47 class IAnalyzerTool;
48 class IAnalyzerOutputPaneAdapter;
49 namespace Internal {
50
51 class AnalyzerOutputPane : public Core::IOutputPane
52 {
53     Q_OBJECT
54 public:
55     explicit AnalyzerOutputPane(QObject *parent = 0);
56
57     void setTool(IAnalyzerTool *t);
58     // IOutputPane
59     virtual QWidget *outputWidget(QWidget *parent);
60     virtual QList<QWidget*> toolBarWidgets() const;
61     virtual QString displayName() const;
62
63     virtual int priorityInStatusBar() const;
64
65     virtual void clearContents();
66     virtual void visibilityChanged(bool visible);
67
68     virtual void setFocus();
69     virtual bool hasFocus();
70     virtual bool canFocus();
71     virtual bool canNavigate();
72     virtual bool canNext();
73     virtual bool canPrevious();
74     virtual void goToNext();
75     virtual void goToPrev();
76
77 private slots:
78     void slotPopup(bool withFocus);
79     void slotNavigationStatusChanged();
80
81 private:
82     void clearTool();
83     inline int currentIndex() const;
84     inline IAnalyzerOutputPaneAdapter *currentAdapter() const;
85     void setCurrentIndex(int );
86     void add(IAnalyzerOutputPaneAdapter *adapter);
87     void addToWidgets(IAnalyzerOutputPaneAdapter *adapter);
88     void createWidgets(QWidget *paneParent);
89     bool isInitialized() const { return m_paneWidget != 0; }
90
91     QWidget *m_paneWidget;
92     QStackedLayout *m_paneStackedLayout;
93     QList<IAnalyzerOutputPaneAdapter *> m_adapters;
94     QStackedWidget *m_toolbarStackedWidget;
95     Utils::StyledSeparator *m_toolBarSeparator;
96 };
97
98 } // namespace Internal
99 } // namespace Analyzer
100
101 #endif // ANALYZEROUTPUTPANE_H