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)
|
if (!m_statesEditorWidget)
|
||||||
m_statesEditorWidget = new StatesEditorWidget(this, m_statesEditorModel.data());
|
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*/)
|
void StatesEditorView::rootNodeTypeChanged(const QString &/*type*/, int /*majorVersion*/, int /*minorVersion*/)
|
||||||
|
|||||||
@@ -94,9 +94,9 @@ public:
|
|||||||
NoPane,
|
NoPane,
|
||||||
LeftPane,
|
LeftPane,
|
||||||
RightPane,
|
RightPane,
|
||||||
|
BottomPane,
|
||||||
TopPane, // not used
|
TopPane, // not used
|
||||||
BottomPane, // not used
|
CentralPane
|
||||||
CentralPane // not used
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QString uniqueId;
|
QString uniqueId;
|
||||||
|
|||||||
@@ -179,8 +179,8 @@ void DesignModeWidget::toggleSidebars()
|
|||||||
m_leftSideBar->setVisible(m_showSidebars);
|
m_leftSideBar->setVisible(m_showSidebars);
|
||||||
if (m_rightSideBar)
|
if (m_rightSideBar)
|
||||||
m_rightSideBar->setVisible(m_showSidebars);
|
m_rightSideBar->setVisible(m_showSidebars);
|
||||||
if (m_topSideBar)
|
if (m_bottomSideBar)
|
||||||
m_topSideBar->setVisible(m_showSidebars);
|
m_bottomSideBar->setVisible(m_showSidebars);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesignModeWidget::readSettings()
|
void DesignModeWidget::readSettings()
|
||||||
@@ -455,12 +455,12 @@ static QTabWidget *createWidgetsInTabWidget(const QList<WidgetInfo> &widgetInfos
|
|||||||
return tabWidget;
|
return tabWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QWidget *createTopSideBarWidget(const QList<WidgetInfo> &widgetInfos)
|
static QWidget *createbottomSideBarWidget(const QList<WidgetInfo> &widgetInfos)
|
||||||
{
|
{
|
||||||
//### we now own these here
|
//### we now own these here
|
||||||
QList<WidgetInfo> topWidgetInfos;
|
QList<WidgetInfo> topWidgetInfos;
|
||||||
foreach (const WidgetInfo &widgetInfo, widgetInfos) {
|
foreach (const WidgetInfo &widgetInfo, widgetInfos) {
|
||||||
if (widgetInfo.placementHint == widgetInfo.TopPane)
|
if (widgetInfo.placementHint == widgetInfo.BottomPane)
|
||||||
topWidgetInfos.append(widgetInfo);
|
topWidgetInfos.append(widgetInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -518,14 +518,14 @@ QWidget *DesignModeWidget::createCenterWidget()
|
|||||||
horizontalLayout->addWidget(m_toolBar);
|
horizontalLayout->addWidget(m_toolBar);
|
||||||
horizontalLayout->addWidget(createCrumbleBarFrame());
|
horizontalLayout->addWidget(createCrumbleBarFrame());
|
||||||
|
|
||||||
m_topSideBar = createTopSideBarWidget(viewManager().widgetInfos());
|
|
||||||
horizontalLayout->addWidget(m_topSideBar.data());
|
|
||||||
|
|
||||||
Core::MiniSplitter *centralSplitter = createCentralSplitter(viewManager().widgetInfos());
|
Core::MiniSplitter *centralSplitter = createCentralSplitter(viewManager().widgetInfos());
|
||||||
m_centralTabWidget = centralSplitter->findChild<QTabWidget*>("centralTabWidget");
|
m_centralTabWidget = centralSplitter->findChild<QTabWidget*>("centralTabWidget");
|
||||||
Q_ASSERT(m_centralTabWidget);
|
Q_ASSERT(m_centralTabWidget);
|
||||||
horizontalLayout->addWidget(centralSplitter);
|
horizontalLayout->addWidget(centralSplitter);
|
||||||
|
|
||||||
|
m_bottomSideBar = createbottomSideBarWidget(viewManager().widgetInfos());
|
||||||
|
horizontalLayout->addWidget(m_bottomSideBar.data());
|
||||||
|
|
||||||
return centerWidget;
|
return centerWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ private: // variables
|
|||||||
|
|
||||||
QScopedPointer<Core::SideBar> m_leftSideBar;
|
QScopedPointer<Core::SideBar> m_leftSideBar;
|
||||||
QScopedPointer<Core::SideBar> m_rightSideBar;
|
QScopedPointer<Core::SideBar> m_rightSideBar;
|
||||||
QPointer<QWidget> m_topSideBar;
|
QPointer<QWidget> m_bottomSideBar;
|
||||||
Core::EditorToolBar *m_toolBar;
|
Core::EditorToolBar *m_toolBar;
|
||||||
CrumbleBar *m_crumbleBar;
|
CrumbleBar *m_crumbleBar;
|
||||||
bool m_isDisabled = false;
|
bool m_isDisabled = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user