summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/outputpane.h
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2009-01-26 14:13:15 +0100
committerhjk <qtc-committer@nokia.com>2009-01-26 14:13:15 +0100
commitf68d6cf0a041f266508b1e25894352bfe0dbdaf0 (patch)
tree2dd120f2c3104584d6d65c04c40744bcab4ee2ad /src/plugins/coreplugin/outputpane.h
parenta0a4cec8a874f6291a3a8f80297e3f9268f6c44b (diff)
downloadqt-creator-f68d6cf0a041f266508b1e25894352bfe0dbdaf0.tar.gz
Fixes: rename OutputPane into OutputPaneManager
RevBy: dt Details: also clean up the class interface a bit
Diffstat (limited to 'src/plugins/coreplugin/outputpane.h')
-rw-r--r--src/plugins/coreplugin/outputpane.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/plugins/coreplugin/outputpane.h b/src/plugins/coreplugin/outputpane.h
index 8505b34bfa..3d105e377e 100644
--- a/src/plugins/coreplugin/outputpane.h
+++ b/src/plugins/coreplugin/outputpane.h
@@ -47,21 +47,20 @@ class QStackedWidget;
class QPushButton;
QT_END_NAMESPACE
-namespace ExtensionSystem { class PluginManager; }
-
namespace Core {
class IMode;
class IOutputPane;
namespace Internal {
-class OutputPane;
+class OutputPaneManager;
+class MainWindow;
}
class CORE_EXPORT OutputPanePlaceHolder : public QWidget
{
- friend class Core::Internal::OutputPane; // needs to set m_visible and thus access m_current
+ friend class Core::Internal::OutputPaneManager; // needs to set m_visible and thus access m_current
Q_OBJECT
public:
OutputPanePlaceHolder(Core::IMode *mode, QWidget *parent = 0);
@@ -80,17 +79,13 @@ private:
namespace Internal {
-class OutputPane
- : public QWidget
+class OutputPaneManager : public QWidget
{
Q_OBJECT
public:
- OutputPane(const QList<int> &context, QWidget *parent = 0);
- ~OutputPane();
- void init(ExtensionSystem::PluginManager *pm);
- static OutputPane *instance();
- const QList<int> &context() const { return m_context; }
+ void init();
+ static OutputPaneManager *instance();
void setCloseable(bool b);
bool closeable();
QWidget *buttonsWidget();
@@ -103,7 +98,7 @@ public slots:
protected:
void focusInEvent(QFocusEvent *e);
-private slots:;
+private slots:
void changePage();
void showPage(bool focus);
void togglePage(bool focus);
@@ -112,17 +107,23 @@ private slots:;
void buttonTriggered();
private:
+ // the only class that is allowed to create and destroy
+ friend class MainWindow;
+
+ static void create();
+ static void destroy();
+
+ OutputPaneManager(QWidget *parent = 0);
+ ~OutputPaneManager();
+
void showPage(int idx, bool focus);
void ensurePageVisible(int idx);
int findIndexForPage(IOutputPane *out);
- const QList<int> m_context;
QComboBox *m_widgetComboBox;
QToolButton *m_clearButton;
QToolButton *m_closeButton;
QAction *m_closeAction;
- ExtensionSystem::PluginManager *m_pluginManager;
-
QMap<int, Core::IOutputPane*> m_pageMap;
int m_lastIndex;
@@ -132,7 +133,7 @@ private:
QMap<int, QPushButton *> m_buttons;
QMap<QAction *, int> m_actions;
- static OutputPane *m_instance;
+ static OutputPaneManager *m_instance;
};
} // namespace Internal