NavigationWidget: Add menu to split button

This is more consistent with the split button that we have for the
editors, and the default split behavior, which duplicated the current
view, seldomly resulted in what was wanted anyhow.

Change-Id: Iaba62151edbf11f6bbfaf45d68371532bff48dd5
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
Eike Ziller
2014-12-04 13:07:01 +01:00
parent 95c13a230e
commit a1f8be4471
4 changed files with 29 additions and 6 deletions

View File

@@ -36,6 +36,7 @@
#include <QList>
QT_BEGIN_NAMESPACE
class QMenu;
class QToolButton;
QT_END_NAMESPACE
@@ -71,15 +72,18 @@ public:
Command *command(const QString &title) const;
signals:
void splitMe();
void splitMe(int factoryIndex);
void closeMe();
private slots:
void comboBoxIndexChanged(int);
private:
void populateSplitMenu();
NavigationWidget *m_parentWidget;
QComboBox *m_navigationComboBox;
QMenu *m_splitMenu;
QWidget *m_navigationWidget;
INavigationWidgetFactory *m_navigationWidgetFactory;
Utils::StyledBar *m_toolBar;