OSDN Git Service

Update license.
[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 (info@qt.nokia.com)
8 **
9 **
10 ** GNU Lesser General Public License Usage
11 **
12 ** This file may be used under the terms of the GNU Lesser General Public
13 ** License version 2.1 as published by the Free Software Foundation and
14 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
15 ** Please review the following information to ensure the GNU Lesser General
16 ** Public License version 2.1 requirements will be met:
17 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 **
19 ** In addition, as a special exception, Nokia gives you certain additional
20 ** rights. These rights are described in the Nokia Qt LGPL Exception
21 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 **
23 ** Other Usage
24 **
25 ** Alternatively, this file may be used in accordance with the terms and
26 ** conditions contained in a signed written agreement between you and Nokia.
27 **
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
30 **
31 **************************************************************************/
32
33 #ifndef ANALYZEROUTPUTPANE_H
34 #define ANALYZEROUTPUTPANE_H
35
36 #include <coreplugin/ioutputpane.h>
37
38 QT_FORWARD_DECLARE_CLASS(QStackedLayout)
39 QT_FORWARD_DECLARE_CLASS(QStackedWidget)
40
41 namespace Utils {
42 class StyledSeparator;
43 }
44
45 namespace Analyzer {
46 class IAnalyzerTool;
47 class IAnalyzerOutputPaneAdapter;
48 namespace Internal {
49
50 class AnalyzerOutputPane : public Core::IOutputPane
51 {
52     Q_OBJECT
53 public:
54     explicit AnalyzerOutputPane(QObject *parent = 0);
55
56     void setTool(IAnalyzerTool *t);
57     // IOutputPane
58     virtual QWidget *outputWidget(QWidget *parent);
59     virtual QList<QWidget*> toolBarWidgets() const;
60     virtual QString displayName() const;
61
62     virtual int priorityInStatusBar() const;
63
64     virtual void clearContents();
65     virtual void visibilityChanged(bool visible);
66
67     virtual void setFocus();
68     virtual bool hasFocus();
69     virtual bool canFocus();
70     virtual bool canNavigate();
71     virtual bool canNext();
72     virtual bool canPrevious();
73     virtual void goToNext();
74     virtual void goToPrev();
75
76 private slots:
77     void slotPopup(bool withFocus);
78     void slotNavigationStatusChanged();
79
80 private:
81     void clearTool();
82     inline int currentIndex() const;
83     inline IAnalyzerOutputPaneAdapter *currentAdapter() const;
84     void setCurrentIndex(int );
85     void add(IAnalyzerOutputPaneAdapter *adapter);
86     void addToWidgets(IAnalyzerOutputPaneAdapter *adapter);
87     void createWidgets(QWidget *paneParent);
88     bool isInitialized() const { return m_paneWidget != 0; }
89
90     QWidget *m_paneWidget;
91     QStackedLayout *m_paneStackedLayout;
92     QList<IAnalyzerOutputPaneAdapter *> m_adapters;
93     QStackedWidget *m_toolbarStackedWidget;
94     Utils::StyledSeparator *m_toolBarSeparator;
95 };
96
97 } // namespace Internal
98 } // namespace Analyzer
99
100 #endif // ANALYZEROUTPUTPANE_H