forked from qt-creator/qt-creator
QmlDesigner: Move states view to the bottom
Change-Id: I9c46c41d1ac42377c7b552cb8b518ed277e28a0b Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -66,7 +66,7 @@ WidgetInfo StatesEditorView::widgetInfo()
|
||||
if (!m_statesEditorWidget)
|
||||
m_statesEditorWidget = new StatesEditorWidget(this, m_statesEditorModel.data());
|
||||
|
||||
return createWidgetInfo(m_statesEditorWidget.data(), 0, QLatin1String("StatesEditor"), WidgetInfo::TopPane, 0, tr("States Editor"));
|
||||
return createWidgetInfo(m_statesEditorWidget.data(), 0, QLatin1String("StatesEditor"), WidgetInfo::BottomPane, 0, tr("States Editor"));
|
||||
}
|
||||
|
||||
void StatesEditorView::rootNodeTypeChanged(const QString &/*type*/, int /*majorVersion*/, int /*minorVersion*/)
|
||||
|
||||
@@ -94,9 +94,9 @@ public:
|
||||
NoPane,
|
||||
LeftPane,
|
||||
RightPane,
|
||||
BottomPane,
|
||||
TopPane, // not used
|
||||
BottomPane, // not used
|
||||
CentralPane // not used
|
||||
CentralPane
|
||||
};
|
||||
|
||||
QString uniqueId;
|
||||
|
||||
@@ -179,8 +179,8 @@ void DesignModeWidget::toggleSidebars()
|
||||
m_leftSideBar->setVisible(m_showSidebars);
|
||||
if (m_rightSideBar)
|
||||
m_rightSideBar->setVisible(m_showSidebars);
|
||||
if (m_topSideBar)
|
||||
m_topSideBar->setVisible(m_showSidebars);
|
||||
if (m_bottomSideBar)
|
||||
m_bottomSideBar->setVisible(m_showSidebars);
|
||||
}
|
||||
|
||||
void DesignModeWidget::readSettings()
|
||||
@@ -455,12 +455,12 @@ static QTabWidget *createWidgetsInTabWidget(const QList<WidgetInfo> &widgetInfos
|
||||
return tabWidget;
|
||||
}
|
||||
|
||||
static QWidget *createTopSideBarWidget(const QList<WidgetInfo> &widgetInfos)
|
||||
static QWidget *createbottomSideBarWidget(const QList<WidgetInfo> &widgetInfos)
|
||||
{
|
||||
//### we now own these here
|
||||
QList<WidgetInfo> topWidgetInfos;
|
||||
foreach (const WidgetInfo &widgetInfo, widgetInfos) {
|
||||
if (widgetInfo.placementHint == widgetInfo.TopPane)
|
||||
if (widgetInfo.placementHint == widgetInfo.BottomPane)
|
||||
topWidgetInfos.append(widgetInfo);
|
||||
}
|
||||
|
||||
@@ -518,14 +518,14 @@ QWidget *DesignModeWidget::createCenterWidget()
|
||||
horizontalLayout->addWidget(m_toolBar);
|
||||
horizontalLayout->addWidget(createCrumbleBarFrame());
|
||||
|
||||
m_topSideBar = createTopSideBarWidget(viewManager().widgetInfos());
|
||||
horizontalLayout->addWidget(m_topSideBar.data());
|
||||
|
||||
Core::MiniSplitter *centralSplitter = createCentralSplitter(viewManager().widgetInfos());
|
||||
m_centralTabWidget = centralSplitter->findChild<QTabWidget*>("centralTabWidget");
|
||||
Q_ASSERT(m_centralTabWidget);
|
||||
horizontalLayout->addWidget(centralSplitter);
|
||||
|
||||
m_bottomSideBar = createbottomSideBarWidget(viewManager().widgetInfos());
|
||||
horizontalLayout->addWidget(m_bottomSideBar.data());
|
||||
|
||||
return centerWidget;
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ private: // variables
|
||||
|
||||
QScopedPointer<Core::SideBar> m_leftSideBar;
|
||||
QScopedPointer<Core::SideBar> m_rightSideBar;
|
||||
QPointer<QWidget> m_topSideBar;
|
||||
QPointer<QWidget> m_bottomSideBar;
|
||||
Core::EditorToolBar *m_toolBar;
|
||||
CrumbleBar *m_crumbleBar;
|
||||
bool m_isDisabled = false;
|
||||
|
||||
Reference in New Issue
Block a user