Skip to content
Snippets Groups Projects
Commit cfa703c6 authored by hjk's avatar hjk Committed by hjk
Browse files

outputpanemanager: rework


Replace "title combobox" and add a "manage" button.

Change-Id: I5453197b207000e6987b7dffd1858facb4b7f32e
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent fa188e1f
No related branches found
No related tags found
No related merge requests found
...@@ -71,5 +71,6 @@ ...@@ -71,5 +71,6 @@
<file>images/splitbutton_closeright.png</file> <file>images/splitbutton_closeright.png</file>
<file>images/splitbutton_closetop.png</file> <file>images/splitbutton_closetop.png</file>
<file>images/splitbutton_vertical.png</file> <file>images/splitbutton_vertical.png</file>
<file>images/panel_manage_button.png</file>
</qresource> </qresource>
</RCC> </RCC>
src/plugins/coreplugin/images/panel_manage_button.png

1.06 KiB

This diff is collapsed.
...@@ -33,14 +33,17 @@ ...@@ -33,14 +33,17 @@
#ifndef OUTPUTPANEMANAGER_H #ifndef OUTPUTPANEMANAGER_H
#define OUTPUTPANEMANAGER_H #define OUTPUTPANEMANAGER_H
#include <coreplugin/id.h>
#include <QMap> #include <QMap>
#include <QToolButton> #include <QToolButton>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QAction; class QAction;
class QComboBox; class QComboBox;
class QStackedWidget; class QLabel;
class QSplitter; class QSplitter;
class QStackedWidget;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { namespace Core {
...@@ -48,11 +51,9 @@ namespace Core { ...@@ -48,11 +51,9 @@ namespace Core {
class IOutputPane; class IOutputPane;
namespace Internal { namespace Internal {
class OutputPaneManager;
class MainWindow;
}
namespace Internal { class MainWindow;
class OutputPaneManageButton;
class OutputPaneManager : public QWidget class OutputPaneManager : public QWidget
{ {
...@@ -77,16 +78,18 @@ protected: ...@@ -77,16 +78,18 @@ protected:
void focusInEvent(QFocusEvent *e); void focusInEvent(QFocusEvent *e);
private slots: private slots:
void changePage();
void showPage(bool focus, bool ensureSizeHint); void showPage(bool focus, bool ensureSizeHint);
void togglePage(bool focus); void togglePage(bool focus);
void clearPage(); void clearPage();
void buttonTriggered(); void buttonTriggered();
void updateNavigateState(); void updateNavigateState();
void popupMenu();
void saveSettings() const;
private: private:
// the only class that is allowed to create and destroy // the only class that is allowed to create and destroy
friend class MainWindow; friend class MainWindow;
friend class OutputPaneManageButton;
static void create(); static void create();
static void destroy(); static void destroy();
...@@ -97,7 +100,13 @@ private: ...@@ -97,7 +100,13 @@ private:
void showPage(int idx, bool focus); void showPage(int idx, bool focus);
void ensurePageVisible(int idx); void ensurePageVisible(int idx);
int findIndexForPage(IOutputPane *out); int findIndexForPage(IOutputPane *out);
QComboBox *m_widgetComboBox; int currentIndex() const;
void setCurrentIndex(int idx);
void buttonTriggered(int idx);
void readSettings();
QLabel *m_titleLabel;
OutputPaneManageButton *m_manageButton;
QAction *m_clearAction; QAction *m_clearAction;
QToolButton *m_clearButton; QToolButton *m_clearButton;
QToolButton *m_closeButton; QToolButton *m_closeButton;
...@@ -111,14 +120,14 @@ private: ...@@ -111,14 +120,14 @@ private:
QToolButton *m_nextToolButton; QToolButton *m_nextToolButton;
QWidget *m_toolBar; QWidget *m_toolBar;
QMap<int, Core::IOutputPane*> m_pageMap; QList<IOutputPane *> m_panes;
int m_lastIndex; QVector<QToolButton *> m_buttons;
QVector<QAction *> m_actions;
QVector<Id> m_ids;
QStackedWidget *m_outputWidgetPane; QStackedWidget *m_outputWidgetPane;
QStackedWidget *m_opToolBarWidgets; QStackedWidget *m_opToolBarWidgets;
QWidget *m_buttonsWidget; QWidget *m_buttonsWidget;
QMap<int, QToolButton *> m_buttons;
QMap<QAction *, int> m_actions;
QPixmap m_minimizeIcon; QPixmap m_minimizeIcon;
QPixmap m_maximizeIcon; QPixmap m_maximizeIcon;
bool m_maximised; bool m_maximised;
...@@ -142,6 +151,15 @@ private: ...@@ -142,6 +151,15 @@ private:
QAction *m_action; QAction *m_action;
}; };
class OutputPaneManageButton : public QToolButton
{
Q_OBJECT
public:
OutputPaneManageButton();
QSize sizeHint() const;
void paintEvent(QPaintEvent *event);
};
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Core
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment