forked from qt-creator/qt-creator
QmlDesigner: moving CrumbleBar and ComponentAction
Moving the CrumbleBar and the ComponentAction out of the FormEditor into the DesignModeWidget. These widgets are about document navigation and do not belong to the FormEditor. Change-Id: I5cd177d70f7c8f9cc2913c8c3c640d62fefd718d Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This commit is contained in:
@@ -6,6 +6,7 @@ SOURCES += modelnodecontextmenu_helper.cpp
|
|||||||
SOURCES += selectioncontext.cpp
|
SOURCES += selectioncontext.cpp
|
||||||
SOURCES += designeractionmanager.cpp
|
SOURCES += designeractionmanager.cpp
|
||||||
SOURCES += modelnodeoperations.cpp
|
SOURCES += modelnodeoperations.cpp
|
||||||
|
SOURCES += crumblebar.cpp
|
||||||
|
|
||||||
HEADERS += modelnodecontextmenu.h
|
HEADERS += modelnodecontextmenu.h
|
||||||
HEADERS += defaultdesigneraction.h
|
HEADERS += defaultdesigneraction.h
|
||||||
@@ -15,3 +16,4 @@ HEADERS += componentcore_constants.h
|
|||||||
HEADERS += designeractionmanager.h
|
HEADERS += designeractionmanager.h
|
||||||
HEADERS += modelnodeoperations.h
|
HEADERS += modelnodeoperations.h
|
||||||
HEADERS += abstractdesigneraction.h
|
HEADERS += abstractdesigneraction.h
|
||||||
|
HEADERS += crumblebar.h
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "formeditorcrumblebar.h"
|
#include "crumblebar.h"
|
||||||
|
|
||||||
#include "qmldesignerplugin.h"
|
#include "qmldesignerplugin.h"
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
FormEditorCrumbleBar::FormEditorCrumbleBar(QObject *parent) :
|
CrumbleBar::CrumbleBar(QObject *parent) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
m_isInternalCalled(false),
|
m_isInternalCalled(false),
|
||||||
m_crumblePath(new Utils::CrumblePath)
|
m_crumblePath(new Utils::CrumblePath)
|
||||||
@@ -47,7 +47,7 @@ FormEditorCrumbleBar::FormEditorCrumbleBar(QObject *parent) :
|
|||||||
SLOT(onCrumblePathElementClicked(QVariant)));
|
SLOT(onCrumblePathElementClicked(QVariant)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorCrumbleBar::pushFile(const QString &fileName)
|
void CrumbleBar::pushFile(const QString &fileName)
|
||||||
{
|
{
|
||||||
if (m_isInternalCalled == false) {
|
if (m_isInternalCalled == false) {
|
||||||
crumblePath()->clear();
|
crumblePath()->clear();
|
||||||
@@ -72,7 +72,7 @@ static DesignDocument *currentDesignDocument()
|
|||||||
return QmlDesignerPlugin::instance()->documentManager().currentDesignDocument();
|
return QmlDesignerPlugin::instance()->documentManager().currentDesignDocument();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorCrumbleBar::pushInFileComponent(const QString &componentId)
|
void CrumbleBar::pushInFileComponent(const QString &componentId)
|
||||||
{
|
{
|
||||||
CrumbleBarInfo crumbleBarInfo;
|
CrumbleBarInfo crumbleBarInfo;
|
||||||
crumbleBarInfo.componentId = componentId;
|
crumbleBarInfo.componentId = componentId;
|
||||||
@@ -88,17 +88,17 @@ void FormEditorCrumbleBar::pushInFileComponent(const QString &componentId)
|
|||||||
m_isInternalCalled = false;
|
m_isInternalCalled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorCrumbleBar::nextFileIsCalledInternally()
|
void CrumbleBar::nextFileIsCalledInternally()
|
||||||
{
|
{
|
||||||
m_isInternalCalled = true;
|
m_isInternalCalled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::CrumblePath *FormEditorCrumbleBar::crumblePath()
|
Utils::CrumblePath *CrumbleBar::crumblePath()
|
||||||
{
|
{
|
||||||
return m_crumblePath;
|
return m_crumblePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorCrumbleBar::onCrumblePathElementClicked(const QVariant &data)
|
void CrumbleBar::onCrumblePathElementClicked(const QVariant &data)
|
||||||
{
|
{
|
||||||
CrumbleBarInfo clickedCrumbleBarInfo = data.value<CrumbleBarInfo>();
|
CrumbleBarInfo clickedCrumbleBarInfo = data.value<CrumbleBarInfo>();
|
||||||
|
|
@@ -35,11 +35,11 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
class FormEditorCrumbleBar : public QObject
|
class CrumbleBar : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit FormEditorCrumbleBar(QObject *parent = 0);
|
explicit CrumbleBar(QObject *parent = 0);
|
||||||
|
|
||||||
void pushFile(const QString &fileName);
|
void pushFile(const QString &fileName);
|
||||||
void pushInFileComponent(const QString &componentId);
|
void pushInFileComponent(const QString &componentId);
|
@@ -30,7 +30,6 @@ SOURCES += formeditoritem.cpp \
|
|||||||
formeditorgraphicsview.cpp \
|
formeditorgraphicsview.cpp \
|
||||||
numberseriesaction.cpp \
|
numberseriesaction.cpp \
|
||||||
lineeditaction.cpp \
|
lineeditaction.cpp \
|
||||||
formeditorcrumblebar.cpp \
|
|
||||||
abstractcustomtool.cpp
|
abstractcustomtool.cpp
|
||||||
HEADERS += formeditorscene.h \
|
HEADERS += formeditorscene.h \
|
||||||
formeditorwidget.h \
|
formeditorwidget.h \
|
||||||
@@ -63,6 +62,5 @@ HEADERS += formeditorscene.h \
|
|||||||
formeditorgraphicsview.h \
|
formeditorgraphicsview.h \
|
||||||
numberseriesaction.h \
|
numberseriesaction.h \
|
||||||
lineeditaction.h \
|
lineeditaction.h \
|
||||||
formeditorcrumblebar.h \
|
|
||||||
abstractcustomtool.h
|
abstractcustomtool.h
|
||||||
RESOURCES += formeditor.qrc
|
RESOURCES += formeditor.qrc
|
||||||
|
@@ -230,11 +230,6 @@ void FormEditorWidget::setFocus()
|
|||||||
m_graphicsView->setFocus(Qt::OtherFocusReason);
|
m_graphicsView->setFocus(Qt::OtherFocusReason);
|
||||||
}
|
}
|
||||||
|
|
||||||
FormEditorCrumbleBar *FormEditorWidget::formEditorCrumbleBar() const
|
|
||||||
{
|
|
||||||
return toolBox()->formEditorCrumbleBar();
|
|
||||||
}
|
|
||||||
|
|
||||||
ZoomAction *FormEditorWidget::zoomAction() const
|
ZoomAction *FormEditorWidget::zoomAction() const
|
||||||
{
|
{
|
||||||
return m_zoomAction.data();
|
return m_zoomAction.data();
|
||||||
|
@@ -32,8 +32,6 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include "formeditorcrumblebar.h"
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QActionGroup;
|
class QActionGroup;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
@@ -79,8 +77,6 @@ public:
|
|||||||
|
|
||||||
void setFocus();
|
void setFocus();
|
||||||
|
|
||||||
FormEditorCrumbleBar *formEditorCrumbleBar() const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void wheelEvent(QWheelEvent *event);
|
void wheelEvent(QWheelEvent *event);
|
||||||
QActionGroup *toolActionGroup() const;
|
QActionGroup *toolActionGroup() const;
|
||||||
|
@@ -39,39 +39,19 @@ namespace QmlDesigner {
|
|||||||
ToolBox::ToolBox(QWidget *parentWidget)
|
ToolBox::ToolBox(QWidget *parentWidget)
|
||||||
: Utils::StyledBar(parentWidget),
|
: Utils::StyledBar(parentWidget),
|
||||||
m_leftToolBar(new QToolBar("LeftSidebar", this)),
|
m_leftToolBar(new QToolBar("LeftSidebar", this)),
|
||||||
m_rightToolBar(new QToolBar("RightSidebar", this)),
|
m_rightToolBar(new QToolBar("RightSidebar", this))
|
||||||
m_formEditorCrumbleBar(new FormEditorCrumbleBar(this))
|
|
||||||
{
|
{
|
||||||
setMaximumHeight(44);
|
setMaximumHeight(22);
|
||||||
setSingleRow(false);
|
|
||||||
QFrame *frame = new QFrame(this);
|
|
||||||
frame->setStyleSheet("background-color: #4e4e4e;");
|
|
||||||
frame->setFrameShape(QFrame::NoFrame);
|
|
||||||
QHBoxLayout *layout = new QHBoxLayout(frame);
|
|
||||||
layout->setMargin(0);
|
|
||||||
layout->setSpacing(0);
|
|
||||||
frame->setLayout(layout);
|
|
||||||
layout->addWidget(m_formEditorCrumbleBar->crumblePath());
|
|
||||||
frame->setProperty("panelwidget", true);
|
|
||||||
frame->setProperty("panelwidget_singlerow", false);
|
|
||||||
QVBoxLayout *verticalLayout = new QVBoxLayout(this);
|
|
||||||
verticalLayout->setMargin(0);
|
|
||||||
verticalLayout->setSpacing(0);
|
|
||||||
|
|
||||||
QHBoxLayout *horizontalLayout = new QHBoxLayout();
|
|
||||||
verticalLayout->addLayout(horizontalLayout);
|
|
||||||
verticalLayout->addWidget(frame);
|
|
||||||
horizontalLayout->setMargin(0);
|
|
||||||
horizontalLayout->setSpacing(0);
|
|
||||||
|
|
||||||
m_leftToolBar->setFloatable(true);
|
m_leftToolBar->setFloatable(true);
|
||||||
m_leftToolBar->setMovable(true);
|
m_leftToolBar->setMovable(true);
|
||||||
m_leftToolBar->setOrientation(Qt::Horizontal);
|
m_leftToolBar->setOrientation(Qt::Horizontal);
|
||||||
m_leftToolBar->setIconSize(QSize(24, 24));
|
m_leftToolBar->setIconSize(QSize(24, 24));
|
||||||
|
|
||||||
QToolBar *stretchToolbar = new QToolBar(this);
|
QHBoxLayout *horizontalLayout = new QHBoxLayout(this);
|
||||||
|
horizontalLayout->setMargin(0);
|
||||||
|
horizontalLayout->setSpacing(0);
|
||||||
|
|
||||||
setSingleRow(false);
|
QToolBar *stretchToolbar = new QToolBar(this);
|
||||||
|
|
||||||
m_leftToolBar->setProperty("panelwidget", true);
|
m_leftToolBar->setProperty("panelwidget", true);
|
||||||
m_leftToolBar->setProperty("panelwidget_singlerow", false);
|
m_leftToolBar->setProperty("panelwidget_singlerow", false);
|
||||||
@@ -121,9 +101,4 @@ QList<QAction*> ToolBox::actions() const
|
|||||||
return QList<QAction*>() << m_leftToolBar->actions() << m_rightToolBar->actions();
|
return QList<QAction*>() << m_leftToolBar->actions() << m_rightToolBar->actions();
|
||||||
}
|
}
|
||||||
|
|
||||||
FormEditorCrumbleBar *ToolBox::formEditorCrumbleBar() const
|
|
||||||
{
|
|
||||||
return m_formEditorCrumbleBar;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
@@ -32,8 +32,6 @@
|
|||||||
|
|
||||||
#include "utils/styledbar.h"
|
#include "utils/styledbar.h"
|
||||||
|
|
||||||
#include "formeditorcrumblebar.h"
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QToolBar;
|
class QToolBar;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
@@ -53,12 +51,10 @@ public:
|
|||||||
void addLeftSideAction(QAction *action);
|
void addLeftSideAction(QAction *action);
|
||||||
void addRightSideAction(QAction *action);
|
void addRightSideAction(QAction *action);
|
||||||
QList<QAction*> actions() const;
|
QList<QAction*> actions() const;
|
||||||
FormEditorCrumbleBar *formEditorCrumbleBar() const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QToolBar *m_leftToolBar;
|
QToolBar *m_leftToolBar;
|
||||||
QToolBar *m_rightToolBar;
|
QToolBar *m_rightToolBar;
|
||||||
FormEditorCrumbleBar *m_formEditorCrumbleBar;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
#include <propertyeditor.h>
|
#include <propertyeditor.h>
|
||||||
#include <componentview.h>
|
#include <componentview.h>
|
||||||
#include <debugview.h>
|
#include <debugview.h>
|
||||||
|
#include <QWidgetAction>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
@@ -79,12 +80,15 @@ public:
|
|||||||
void disableWidgets();
|
void disableWidgets();
|
||||||
void enableWidgets();
|
void enableWidgets();
|
||||||
|
|
||||||
void pushFileOnCrambleBar(const QString &fileName);
|
void pushFileOnCrumbleBar(const QString &fileName);
|
||||||
void pushInFileComponentOnCrambleBar(const QString &componentId);
|
void pushInFileComponentOnCrambleBar(const QString &componentId);
|
||||||
|
|
||||||
void nextFileIsCalledInternally();
|
void nextFileIsCalledInternally();
|
||||||
|
|
||||||
NodeInstanceView *nodeInstanceView();
|
NodeInstanceView *nodeInstanceView();
|
||||||
|
|
||||||
|
QWidgetAction *componentViewAction();
|
||||||
|
|
||||||
private: // functions
|
private: // functions
|
||||||
Q_DISABLE_COPY(ViewManager)
|
Q_DISABLE_COPY(ViewManager)
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
#include "viewmanager.h"
|
#include "viewmanager.h"
|
||||||
|
|
||||||
#include "componentaction.h"
|
#include "componentaction.h"
|
||||||
#include "formeditorwidget.h"
|
|
||||||
#include "toolbox.h"
|
|
||||||
#include "designeractionmanager.h"
|
#include "designeractionmanager.h"
|
||||||
|
#include "designmodewidget.h"
|
||||||
|
#include "crumblebar.h"
|
||||||
|
|
||||||
#include <qmldesigner/qmldesignerplugin.h>
|
#include <qmldesigner/qmldesignerplugin.h>
|
||||||
|
|
||||||
@@ -12,11 +12,13 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
|
|
||||||
|
static CrumbleBar *crumbleBar() {
|
||||||
|
return QmlDesignerPlugin::instance()->mainWidget()->crumbleBar();
|
||||||
|
}
|
||||||
|
|
||||||
ViewManager::ViewManager()
|
ViewManager::ViewManager()
|
||||||
{
|
{
|
||||||
//QObject::connect(&m_nodeInstanceView, SIGNAL(qmlPuppetCrashed()), designModeWidget, SLOT(qmlPuppetCrashed()));
|
|
||||||
//QObject::connect(m_formEditorView.crumblePath(), SIGNAL(elementClicked(QVariant)), designModeWidget, SLOT(onCrumblePathElementClicked(QVariant)));
|
|
||||||
m_formEditorView.formEditorWidget()->toolBox()->addLeftSideAction(m_componentView.action()); // ugly hack
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewManager::~ViewManager()
|
ViewManager::~ViewManager()
|
||||||
@@ -206,20 +208,20 @@ void ViewManager::enableWidgets()
|
|||||||
widgetInfo.widget->setEnabled(true);
|
widgetInfo.widget->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewManager::pushFileOnCrambleBar(const QString &fileName)
|
void ViewManager::pushFileOnCrumbleBar(const QString &fileName)
|
||||||
{
|
{
|
||||||
m_formEditorView.formEditorWidget()->formEditorCrumbleBar()->pushFile(fileName);
|
crumbleBar()->pushFile(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewManager::pushInFileComponentOnCrambleBar(const QString &componentId)
|
void ViewManager::pushInFileComponentOnCrambleBar(const QString &componentId)
|
||||||
|
|
||||||
{
|
{
|
||||||
m_formEditorView.formEditorWidget()->formEditorCrumbleBar()->pushInFileComponent(componentId);
|
crumbleBar()->pushInFileComponent(componentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewManager::nextFileIsCalledInternally()
|
void ViewManager::nextFileIsCalledInternally()
|
||||||
{
|
{
|
||||||
m_formEditorView.formEditorWidget()->formEditorCrumbleBar()->nextFileIsCalledInternally();
|
crumbleBar()->nextFileIsCalledInternally();
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeInstanceView *ViewManager::nodeInstanceView()
|
NodeInstanceView *ViewManager::nodeInstanceView()
|
||||||
@@ -227,6 +229,11 @@ NodeInstanceView *ViewManager::nodeInstanceView()
|
|||||||
return &m_nodeInstanceView;
|
return &m_nodeInstanceView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QWidgetAction *ViewManager::componentViewAction()
|
||||||
|
{
|
||||||
|
return m_componentView.action();
|
||||||
|
}
|
||||||
|
|
||||||
Model *ViewManager::currentModel() const
|
Model *ViewManager::currentModel() const
|
||||||
{
|
{
|
||||||
return currentDesignDocument()->currentModel();
|
return currentDesignDocument()->currentModel();
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#include "designmodewidget.h"
|
#include "designmodewidget.h"
|
||||||
#include "styledoutputpaneplaceholder.h"
|
#include "styledoutputpaneplaceholder.h"
|
||||||
#include "qmldesignerplugin.h"
|
#include "qmldesignerplugin.h"
|
||||||
|
#include "crumblebar.h"
|
||||||
|
|
||||||
#include <rewriterview.h>
|
#include <rewriterview.h>
|
||||||
#include <itemlibrarywidget.h>
|
#include <itemlibrarywidget.h>
|
||||||
@@ -51,6 +52,7 @@
|
|||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QTabWidget>
|
#include <QTabWidget>
|
||||||
|
#include <QToolBar>
|
||||||
|
|
||||||
using Core::MiniSplitter;
|
using Core::MiniSplitter;
|
||||||
using Core::IEditor;
|
using Core::IEditor;
|
||||||
@@ -170,6 +172,8 @@ void DocumentWarningWidget::goToError()
|
|||||||
DesignModeWidget::DesignModeWidget(QWidget *parent) :
|
DesignModeWidget::DesignModeWidget(QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
m_mainSplitter(0),
|
m_mainSplitter(0),
|
||||||
|
m_toolBar(Core::EditorManager::createToolBar(this)),
|
||||||
|
m_crumbleBar(new CrumbleBar(this)),
|
||||||
m_isDisabled(false),
|
m_isDisabled(false),
|
||||||
m_showSidebars(true),
|
m_showSidebars(true),
|
||||||
m_initStatus(NotInitialized),
|
m_initStatus(NotInitialized),
|
||||||
@@ -332,7 +336,10 @@ void DesignModeWidget::setup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
m_toolBar = Core::EditorManager::createToolBar(this);
|
QToolBar *toolBar = new QToolBar(m_toolBar);
|
||||||
|
|
||||||
|
toolBar->addAction(viewManager().componentViewAction());
|
||||||
|
m_toolBar->addCenterToolBar(toolBar);
|
||||||
|
|
||||||
m_mainSplitter = new MiniSplitter(this);
|
m_mainSplitter = new MiniSplitter(this);
|
||||||
m_mainSplitter->setObjectName("mainSplitter");
|
m_mainSplitter->setObjectName("mainSplitter");
|
||||||
@@ -524,8 +531,9 @@ QWidget *DesignModeWidget::createCenterWidget()
|
|||||||
QVBoxLayout *rightLayout = new QVBoxLayout(centerWidget);
|
QVBoxLayout *rightLayout = new QVBoxLayout(centerWidget);
|
||||||
rightLayout->setMargin(0);
|
rightLayout->setMargin(0);
|
||||||
rightLayout->setSpacing(0);
|
rightLayout->setSpacing(0);
|
||||||
rightLayout->addWidget(m_toolBar);
|
|
||||||
|
|
||||||
|
rightLayout->addWidget(m_toolBar);
|
||||||
|
rightLayout->addWidget(createCrumbleBarFrame());
|
||||||
|
|
||||||
//### we now own these here
|
//### we now own these here
|
||||||
QList<WidgetInfo> topWidgetInfos;
|
QList<WidgetInfo> topWidgetInfos;
|
||||||
@@ -561,6 +569,22 @@ QWidget *DesignModeWidget::createCenterWidget()
|
|||||||
return centerWidget;
|
return centerWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QWidget *DesignModeWidget::createCrumbleBarFrame()
|
||||||
|
{
|
||||||
|
QFrame *frame = new QFrame(this);
|
||||||
|
frame->setStyleSheet("background-color: #4e4e4e;");
|
||||||
|
frame->setFrameShape(QFrame::NoFrame);
|
||||||
|
QHBoxLayout *layout = new QHBoxLayout(frame);
|
||||||
|
layout->setMargin(0);
|
||||||
|
layout->setSpacing(0);
|
||||||
|
frame->setLayout(layout);
|
||||||
|
layout->addWidget(m_crumbleBar->crumblePath());
|
||||||
|
frame->setProperty("panelwidget", true);
|
||||||
|
frame->setProperty("panelwidget_singlerow", false);
|
||||||
|
|
||||||
|
return frame;
|
||||||
|
}
|
||||||
|
|
||||||
void DesignModeWidget::showErrorMessage(const QList<RewriterView::Error> &errors)
|
void DesignModeWidget::showErrorMessage(const QList<RewriterView::Error> &errors)
|
||||||
{
|
{
|
||||||
Q_ASSERT(!errors.isEmpty());
|
Q_ASSERT(!errors.isEmpty());
|
||||||
@@ -569,6 +593,11 @@ void DesignModeWidget::showErrorMessage(const QList<RewriterView::Error> &errors
|
|||||||
m_warningWidget->move(width() / 2, height() / 2);
|
m_warningWidget->move(width() / 2, height() / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CrumbleBar *DesignModeWidget::crumbleBar() const
|
||||||
|
{
|
||||||
|
return m_crumbleBar;
|
||||||
|
}
|
||||||
|
|
||||||
QString DesignModeWidget::contextHelpId() const
|
QString DesignModeWidget::contextHelpId() const
|
||||||
{
|
{
|
||||||
if (currentDesignDocument())
|
if (currentDesignDocument())
|
||||||
|
@@ -58,6 +58,7 @@ namespace Core {
|
|||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
class ItemLibraryWidget;
|
class ItemLibraryWidget;
|
||||||
|
class CrumbleBar;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -110,6 +111,8 @@ public:
|
|||||||
void disableWidgets();
|
void disableWidgets();
|
||||||
void showErrorMessage(const QList<RewriterView::Error> &errors);
|
void showErrorMessage(const QList<RewriterView::Error> &errors);
|
||||||
|
|
||||||
|
CrumbleBar* crumbleBar() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateErrorStatus(const QList<RewriterView::Error> &errors);
|
void updateErrorStatus(const QList<RewriterView::Error> &errors);
|
||||||
void restoreDefaultView();
|
void restoreDefaultView();
|
||||||
@@ -139,12 +142,14 @@ private: // functions
|
|||||||
QmlDesigner::ModelNode nodeForPosition(int cursorPos) const;
|
QmlDesigner::ModelNode nodeForPosition(int cursorPos) const;
|
||||||
void addNavigatorHistoryEntry(const QString &fileName);
|
void addNavigatorHistoryEntry(const QString &fileName);
|
||||||
QWidget *createCenterWidget();
|
QWidget *createCenterWidget();
|
||||||
|
QWidget *createCrumbleBarFrame();
|
||||||
|
|
||||||
private: // variables
|
private: // variables
|
||||||
QSplitter *m_mainSplitter;
|
QSplitter *m_mainSplitter;
|
||||||
QScopedPointer<Core::SideBar> m_leftSideBar;
|
QScopedPointer<Core::SideBar> m_leftSideBar;
|
||||||
QScopedPointer<Core::SideBar> m_rightSideBar;
|
QScopedPointer<Core::SideBar> m_rightSideBar;
|
||||||
Core::EditorToolBar *m_toolBar;
|
Core::EditorToolBar *m_toolBar;
|
||||||
|
CrumbleBar *m_crumbleBar;
|
||||||
Core::OutputPanePlaceHolder *m_outputPanePlaceholder;
|
Core::OutputPanePlaceHolder *m_outputPanePlaceholder;
|
||||||
Core::MiniSplitter *m_outputPlaceholderSplitter;
|
Core::MiniSplitter *m_outputPlaceholderSplitter;
|
||||||
bool m_isDisabled;
|
bool m_isDisabled;
|
||||||
|
@@ -189,7 +189,7 @@ void QmlDesignerPlugin::showDesigner()
|
|||||||
if (m_documentManager.hasCurrentDesignDocument()) {
|
if (m_documentManager.hasCurrentDesignDocument()) {
|
||||||
activateAutoSynchronization();
|
activateAutoSynchronization();
|
||||||
m_shortCutManager.updateActions(currentDesignDocument()->textEditor());
|
m_shortCutManager.updateActions(currentDesignDocument()->textEditor());
|
||||||
m_viewManager.pushFileOnCrambleBar(m_documentManager.currentDesignDocument()->fileName());
|
m_viewManager.pushFileOnCrumbleBar(m_documentManager.currentDesignDocument()->fileName());
|
||||||
}
|
}
|
||||||
|
|
||||||
m_shortCutManager.updateUndoActions(currentDesignDocument());
|
m_shortCutManager.updateUndoActions(currentDesignDocument());
|
||||||
@@ -231,7 +231,7 @@ void QmlDesignerPlugin::changeEditor()
|
|||||||
|
|
||||||
if (m_documentManager.hasCurrentDesignDocument()) {
|
if (m_documentManager.hasCurrentDesignDocument()) {
|
||||||
activateAutoSynchronization();
|
activateAutoSynchronization();
|
||||||
m_viewManager.pushFileOnCrambleBar(m_documentManager.currentDesignDocument()->fileName());
|
m_viewManager.pushFileOnCrumbleBar(m_documentManager.currentDesignDocument()->fileName());
|
||||||
}
|
}
|
||||||
|
|
||||||
m_shortCutManager.updateUndoActions(currentDesignDocument());
|
m_shortCutManager.updateUndoActions(currentDesignDocument());
|
||||||
|
Reference in New Issue
Block a user