forked from qt-creator/qt-creator
QmlJSDebugger: Code cosmetics
This commit is contained in:
@@ -96,11 +96,9 @@ bool LiveSelectionTool::alreadySelected(const QList<QGraphicsItem*> &itemList) c
|
||||
if (selectedItems.isEmpty())
|
||||
return false;
|
||||
|
||||
foreach(QGraphicsItem *item, itemList) {
|
||||
if (selectedItems.contains(item)) {
|
||||
foreach (QGraphicsItem *item, itemList)
|
||||
if (selectedItems.contains(item))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -305,7 +303,6 @@ void LiveSelectionTool::mouseReleaseEvent(QMouseEvent *event)
|
||||
|
||||
void LiveSelectionTool::mouseDoubleClickEvent(QMouseEvent * /*event*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void LiveSelectionTool::keyPressEvent(QKeyEvent *event)
|
||||
@@ -373,7 +370,6 @@ void LiveSelectionTool::setSelectOnlyContentItems(bool selectOnlyContentItems)
|
||||
|
||||
void LiveSelectionTool::itemsAboutToRemoved(const QList<QGraphicsItem*> &/*itemList*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void LiveSelectionTool::clear()
|
||||
|
@@ -43,7 +43,7 @@
|
||||
|
||||
namespace QmlJSDebugger {
|
||||
|
||||
QmlToolbar::QmlToolbar(QWidget *parent)
|
||||
QmlToolBar::QmlToolBar(QWidget *parent)
|
||||
: QToolBar(parent)
|
||||
, m_emitSignals(true)
|
||||
, m_isRunning(false)
|
||||
@@ -150,40 +150,40 @@ QmlToolbar::QmlToolbar(QWidget *parent)
|
||||
connect(ui->fromQml, SIGNAL(triggered()), SLOT(activateFromQml()));
|
||||
}
|
||||
|
||||
QmlToolbar::~QmlToolbar()
|
||||
QmlToolBar::~QmlToolBar()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void QmlToolbar::activateColorPicker()
|
||||
void QmlToolBar::activateColorPicker()
|
||||
{
|
||||
m_emitSignals = false;
|
||||
activateColorPickerOnClick();
|
||||
m_emitSignals = true;
|
||||
}
|
||||
|
||||
void QmlToolbar::activateSelectTool()
|
||||
void QmlToolBar::activateSelectTool()
|
||||
{
|
||||
m_emitSignals = false;
|
||||
activateSelectToolOnClick();
|
||||
m_emitSignals = true;
|
||||
}
|
||||
|
||||
void QmlToolbar::activateMarqueeSelectTool()
|
||||
void QmlToolBar::activateMarqueeSelectTool()
|
||||
{
|
||||
m_emitSignals = false;
|
||||
activateMarqueeSelectToolOnClick();
|
||||
m_emitSignals = true;
|
||||
}
|
||||
|
||||
void QmlToolbar::activateZoom()
|
||||
void QmlToolBar::activateZoom()
|
||||
{
|
||||
m_emitSignals = false;
|
||||
activateZoomOnClick();
|
||||
m_emitSignals = true;
|
||||
}
|
||||
|
||||
void QmlToolbar::setAnimationSpeed(qreal slowdownFactor)
|
||||
void QmlToolBar::setAnimationSpeed(qreal slowdownFactor)
|
||||
{
|
||||
m_emitSignals = false;
|
||||
if (slowdownFactor != 0) {
|
||||
@@ -209,38 +209,38 @@ void QmlToolbar::setAnimationSpeed(qreal slowdownFactor)
|
||||
m_emitSignals = true;
|
||||
}
|
||||
|
||||
void QmlToolbar::changeToDefaultAnimSpeed()
|
||||
void QmlToolBar::changeToDefaultAnimSpeed()
|
||||
{
|
||||
m_animationSpeed = 1.0f;
|
||||
updatePlayAction();
|
||||
}
|
||||
|
||||
void QmlToolbar::changeToHalfAnimSpeed()
|
||||
void QmlToolBar::changeToHalfAnimSpeed()
|
||||
{
|
||||
m_animationSpeed = 2.0f;
|
||||
updatePlayAction();
|
||||
}
|
||||
|
||||
void QmlToolbar::changeToFourthAnimSpeed()
|
||||
void QmlToolBar::changeToFourthAnimSpeed()
|
||||
{
|
||||
m_animationSpeed = 4.0f;
|
||||
updatePlayAction();
|
||||
}
|
||||
|
||||
void QmlToolbar::changeToEighthAnimSpeed()
|
||||
void QmlToolBar::changeToEighthAnimSpeed()
|
||||
{
|
||||
m_animationSpeed = 8.0f;
|
||||
updatePlayAction();
|
||||
}
|
||||
|
||||
void QmlToolbar::changeToTenthAnimSpeed()
|
||||
void QmlToolBar::changeToTenthAnimSpeed()
|
||||
{
|
||||
m_animationSpeed = 10.0f;
|
||||
updatePlayAction();
|
||||
}
|
||||
|
||||
|
||||
void QmlToolbar::setDesignModeBehavior(bool inDesignMode)
|
||||
void QmlToolBar::setDesignModeBehavior(bool inDesignMode)
|
||||
{
|
||||
m_emitSignals = false;
|
||||
ui->designmode->setChecked(inDesignMode);
|
||||
@@ -248,7 +248,7 @@ void QmlToolbar::setDesignModeBehavior(bool inDesignMode)
|
||||
m_emitSignals = true;
|
||||
}
|
||||
|
||||
void QmlToolbar::setDesignModeBehaviorOnClick(bool checked)
|
||||
void QmlToolBar::setDesignModeBehaviorOnClick(bool checked)
|
||||
{
|
||||
ui->play->setEnabled(checked);
|
||||
ui->select->setEnabled(checked);
|
||||
@@ -262,12 +262,12 @@ void QmlToolbar::setDesignModeBehaviorOnClick(bool checked)
|
||||
emit designModeBehaviorChanged(checked);
|
||||
}
|
||||
|
||||
void QmlToolbar::setColorBoxColor(const QColor &color)
|
||||
void QmlToolBar::setColorBoxColor(const QColor &color)
|
||||
{
|
||||
ui->colorBox->setColor(color);
|
||||
}
|
||||
|
||||
void QmlToolbar::activatePlayOnClick()
|
||||
void QmlToolBar::activatePlayOnClick()
|
||||
{
|
||||
if (m_isRunning) {
|
||||
updatePauseAction();
|
||||
@@ -276,7 +276,7 @@ void QmlToolbar::activatePlayOnClick()
|
||||
}
|
||||
}
|
||||
|
||||
void QmlToolbar::updatePlayAction()
|
||||
void QmlToolBar::updatePlayAction()
|
||||
{
|
||||
m_isRunning = true;
|
||||
ui->play->setIcon(ui->pauseIcon);
|
||||
@@ -287,7 +287,7 @@ void QmlToolbar::updatePlayAction()
|
||||
emit animationSpeedChanged(m_animationSpeed);
|
||||
}
|
||||
|
||||
void QmlToolbar::updatePauseAction()
|
||||
void QmlToolBar::updatePauseAction()
|
||||
{
|
||||
m_isRunning = false;
|
||||
ui->play->setIcon(ui->playIcon);
|
||||
@@ -295,7 +295,7 @@ void QmlToolbar::updatePauseAction()
|
||||
emit animationSpeedChanged(0.0f);
|
||||
}
|
||||
|
||||
void QmlToolbar::activateColorPickerOnClick()
|
||||
void QmlToolBar::activateColorPickerOnClick()
|
||||
{
|
||||
ui->zoom->setChecked(false);
|
||||
ui->select->setChecked(false);
|
||||
@@ -309,7 +309,7 @@ void QmlToolbar::activateColorPickerOnClick()
|
||||
}
|
||||
}
|
||||
|
||||
void QmlToolbar::activateSelectToolOnClick()
|
||||
void QmlToolBar::activateSelectToolOnClick()
|
||||
{
|
||||
ui->zoom->setChecked(false);
|
||||
ui->selectMarquee->setChecked(false);
|
||||
@@ -323,7 +323,7 @@ void QmlToolbar::activateSelectToolOnClick()
|
||||
}
|
||||
}
|
||||
|
||||
void QmlToolbar::activateMarqueeSelectToolOnClick()
|
||||
void QmlToolBar::activateMarqueeSelectToolOnClick()
|
||||
{
|
||||
ui->zoom->setChecked(false);
|
||||
ui->select->setChecked(false);
|
||||
@@ -337,7 +337,7 @@ void QmlToolbar::activateMarqueeSelectToolOnClick()
|
||||
}
|
||||
}
|
||||
|
||||
void QmlToolbar::activateZoomOnClick()
|
||||
void QmlToolBar::activateZoomOnClick()
|
||||
{
|
||||
ui->select->setChecked(false);
|
||||
ui->selectMarquee->setChecked(false);
|
||||
@@ -351,13 +351,13 @@ void QmlToolbar::activateZoomOnClick()
|
||||
}
|
||||
}
|
||||
|
||||
void QmlToolbar::activateFromQml()
|
||||
void QmlToolBar::activateFromQml()
|
||||
{
|
||||
if (m_emitSignals)
|
||||
emit applyChangesFromQmlFileSelected();
|
||||
}
|
||||
|
||||
void QmlToolbar::activateToQml()
|
||||
void QmlToolBar::activateToQml()
|
||||
{
|
||||
if (m_emitSignals)
|
||||
emit applyChangesToQmlFileSelected();
|
||||
|
@@ -43,13 +43,13 @@ namespace QmlJSDebugger {
|
||||
|
||||
class ToolBarColorBox;
|
||||
|
||||
class QmlToolbar : public QToolBar
|
||||
class QmlToolBar : public QToolBar
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QmlToolbar(QWidget *parent = 0);
|
||||
~QmlToolbar();
|
||||
explicit QmlToolBar(QWidget *parent = 0);
|
||||
~QmlToolBar();
|
||||
|
||||
public slots:
|
||||
void setDesignModeBehavior(bool inDesignMode);
|
||||
|
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
QDeclarativeView *declarativeView();
|
||||
|
||||
QToolBar *toolbar() const;
|
||||
QToolBar *toolBar() const;
|
||||
static QString idStringForObject(QObject *obj);
|
||||
QRectF adjustToScreenBoundaries(const QRectF &boundingRectInSceneSpace);
|
||||
|
||||
|
@@ -65,7 +65,7 @@ QDeclarativeViewObserverPrivate::QDeclarativeViewObserverPrivate(QDeclarativeVie
|
||||
showAppOnTop(false),
|
||||
executionPaused(false),
|
||||
slowdownFactor(1.0f),
|
||||
toolbar(0)
|
||||
toolBar(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -145,11 +145,10 @@ void QDeclarativeViewObserver::setObserverContext(int contextIndex)
|
||||
{
|
||||
if (data->subcomponentEditorTool->contextIndex() != contextIndex) {
|
||||
QGraphicsObject *object = data->subcomponentEditorTool->setContext(contextIndex);
|
||||
if (object) {
|
||||
if (object)
|
||||
setSelectedItems(QList<QGraphicsItem*>() << object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QDeclarativeViewObserverPrivate::_q_reloadView()
|
||||
{
|
||||
@@ -163,9 +162,9 @@ void QDeclarativeViewObserverPrivate::setViewport(QWidget *widget)
|
||||
if (viewport.data() == widget)
|
||||
return;
|
||||
|
||||
if (viewport) {
|
||||
if (viewport)
|
||||
viewport.data()->removeEventFilter(q);
|
||||
}
|
||||
|
||||
viewport = widget;
|
||||
if (viewport) {
|
||||
// make sure we get mouse move events
|
||||
@@ -297,18 +296,17 @@ bool QDeclarativeViewObserver::mouseReleaseEvent(QMouseEvent *event)
|
||||
|
||||
bool QDeclarativeViewObserver::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
if (!data->designModeBehavior) {
|
||||
if (!data->designModeBehavior)
|
||||
return false;
|
||||
}
|
||||
|
||||
data->currentTool->keyPressEvent(event);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QDeclarativeViewObserver::keyReleaseEvent(QKeyEvent *event)
|
||||
{
|
||||
if (!data->designModeBehavior) {
|
||||
if (!data->designModeBehavior)
|
||||
return false;
|
||||
}
|
||||
|
||||
switch(event->key()) {
|
||||
case Qt::Key_V:
|
||||
@@ -366,11 +364,10 @@ void QDeclarativeViewObserverPrivate::_q_createQmlObject(const QString &qml, QOb
|
||||
newObject->setParent(parent);
|
||||
QDeclarativeItem *parentItem = qobject_cast<QDeclarativeItem*>(parent);
|
||||
QDeclarativeItem *newItem = qobject_cast<QDeclarativeItem*>(newObject);
|
||||
if (parentItem && newItem) {
|
||||
if (parentItem && newItem)
|
||||
newItem->setParentItem(parentItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QDeclarativeViewObserverPrivate::_q_reparentQmlObject(QObject *object, QObject *newParent)
|
||||
{
|
||||
@@ -380,10 +377,9 @@ void QDeclarativeViewObserverPrivate::_q_reparentQmlObject(QObject *object, QObj
|
||||
object->setParent(newParent);
|
||||
QDeclarativeItem *newParentItem = qobject_cast<QDeclarativeItem*>(newParent);
|
||||
QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(object);
|
||||
if (newParentItem && item) {
|
||||
if (newParentItem && item)
|
||||
item->setParentItem(newParentItem);
|
||||
}
|
||||
}
|
||||
|
||||
void QDeclarativeViewObserverPrivate::_q_clearComponentCache()
|
||||
{
|
||||
@@ -393,9 +389,8 @@ void QDeclarativeViewObserverPrivate::_q_clearComponentCache()
|
||||
void QDeclarativeViewObserverPrivate::_q_removeFromSelection(QObject *obj)
|
||||
{
|
||||
QList<QGraphicsItem*> items = selectedItems();
|
||||
if (QGraphicsItem *item = dynamic_cast<QGraphicsItem*>(obj)) {
|
||||
if (QGraphicsItem *item = dynamic_cast<QGraphicsItem*>(obj))
|
||||
items.removeOne(item);
|
||||
}
|
||||
setSelectedItems(items);
|
||||
}
|
||||
|
||||
@@ -430,11 +425,9 @@ bool QDeclarativeViewObserver::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
data->subcomponentEditorTool->mouseDoubleClickEvent(event);
|
||||
|
||||
if ((event->buttons() & Qt::LeftButton) && itemToEnter) {
|
||||
QGraphicsObject *objectToEnter = itemToEnter->toGraphicsObject();
|
||||
if (objectToEnter) {
|
||||
if (QGraphicsObject *objectToEnter = itemToEnter->toGraphicsObject())
|
||||
setSelectedItems(QList<QGraphicsItem*>() << objectToEnter);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -461,7 +454,7 @@ void QDeclarativeViewObserver::setDesignModeBehavior(bool value)
|
||||
{
|
||||
emit designModeBehaviorChanged(value);
|
||||
|
||||
data->toolbar->setDesignModeBehavior(value);
|
||||
data->toolBar->setDesignModeBehavior(value);
|
||||
data->debugService->setDesignModeBehavior(value);
|
||||
|
||||
data->designModeBehavior = value;
|
||||
@@ -495,11 +488,11 @@ void QDeclarativeViewObserver::setShowAppOnTop(bool appOnTop)
|
||||
while (rootWidget->parentWidget())
|
||||
rootWidget = rootWidget->parentWidget();
|
||||
Qt::WindowFlags flags = rootWidget->windowFlags();
|
||||
if (appOnTop) {
|
||||
if (appOnTop)
|
||||
flags |= Qt::WindowStaysOnTopHint;
|
||||
} else {
|
||||
else
|
||||
flags &= ~Qt::WindowStaysOnTopHint;
|
||||
}
|
||||
|
||||
rootWidget->setWindowFlags(flags);
|
||||
rootWidget->show();
|
||||
}
|
||||
@@ -538,8 +531,7 @@ void QDeclarativeViewObserverPrivate::setSelectedItemsForTools(QList<QGraphicsIt
|
||||
|
||||
foreach (QGraphicsItem *item, items) {
|
||||
if (item) {
|
||||
QGraphicsObject *obj = item->toGraphicsObject();
|
||||
if (obj) {
|
||||
if (QGraphicsObject *obj = item->toGraphicsObject()) {
|
||||
QObject::connect(obj, SIGNAL(destroyed(QObject*)),
|
||||
this, SLOT(_q_removeFromSelection(QObject*)));
|
||||
currentSelection.append(obj);
|
||||
@@ -714,12 +706,11 @@ void QDeclarativeViewObserver::changeAnimationSpeed(qreal slowdownFactor)
|
||||
{
|
||||
data->slowdownFactor = slowdownFactor;
|
||||
|
||||
if (data->slowdownFactor != 0) {
|
||||
if (data->slowdownFactor != 0)
|
||||
continueExecution(data->slowdownFactor);
|
||||
} else {
|
||||
else
|
||||
pauseExecution();
|
||||
}
|
||||
}
|
||||
|
||||
void QDeclarativeViewObserver::continueExecution(qreal slowdownFactor)
|
||||
{
|
||||
@@ -751,7 +742,6 @@ void QDeclarativeViewObserver::pauseExecution()
|
||||
|
||||
void QDeclarativeViewObserverPrivate::_q_applyChangesFromClient()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -820,8 +810,7 @@ void QDeclarativeViewObserverPrivate::_q_onCurrentObjectsChanged(QList<QObject*>
|
||||
QDeclarativeItem* declarativeItem = qobject_cast<QDeclarativeItem*>(obj);
|
||||
if (declarativeItem) {
|
||||
items << declarativeItem;
|
||||
QGraphicsObject *gfxObj = declarativeItem->toGraphicsObject();
|
||||
if (gfxObj)
|
||||
if (QGraphicsObject *gfxObj = declarativeItem->toGraphicsObject())
|
||||
gfxObjects << gfxObj;
|
||||
}
|
||||
}
|
||||
@@ -842,71 +831,68 @@ QRectF QDeclarativeViewObserver::adjustToScreenBoundaries(const QRectF &bounding
|
||||
{
|
||||
int marginFromEdge = 1;
|
||||
QRectF boundingRect(boundingRectInSceneSpace);
|
||||
if (qAbs(boundingRect.left()) - 1 < 2) {
|
||||
if (qAbs(boundingRect.left()) - 1 < 2)
|
||||
boundingRect.setLeft(marginFromEdge);
|
||||
}
|
||||
|
||||
QRect rect = data->view->rect();
|
||||
if (boundingRect.right() >= rect.right() ) {
|
||||
|
||||
if (boundingRect.right() >= rect.right())
|
||||
boundingRect.setRight(rect.right() - marginFromEdge);
|
||||
}
|
||||
|
||||
if (qAbs(boundingRect.top()) - 1 < 2) {
|
||||
if (qAbs(boundingRect.top()) - 1 < 2)
|
||||
boundingRect.setTop(marginFromEdge);
|
||||
}
|
||||
|
||||
if (boundingRect.bottom() >= rect.bottom() ) {
|
||||
if (boundingRect.bottom() >= rect.bottom())
|
||||
boundingRect.setBottom(rect.bottom() - marginFromEdge);
|
||||
}
|
||||
|
||||
return boundingRect;
|
||||
}
|
||||
|
||||
QToolBar *QDeclarativeViewObserver::toolbar() const
|
||||
QToolBar *QDeclarativeViewObserver::toolBar() const
|
||||
{
|
||||
return data->toolbar;
|
||||
return data->toolBar;
|
||||
}
|
||||
|
||||
void QDeclarativeViewObserverPrivate::createToolBox()
|
||||
{
|
||||
toolbar = new QmlToolbar;
|
||||
toolBar = new QmlToolBar;
|
||||
QObject::connect(q, SIGNAL(selectedColorChanged(QColor)),
|
||||
toolbar, SLOT(setColorBoxColor(QColor)));
|
||||
toolBar, SLOT(setColorBoxColor(QColor)));
|
||||
|
||||
QObject::connect(q, SIGNAL(designModeBehaviorChanged(bool)),
|
||||
toolbar, SLOT(setDesignModeBehavior(bool)));
|
||||
toolBar, SLOT(setDesignModeBehavior(bool)));
|
||||
|
||||
QObject::connect(toolbar, SIGNAL(designModeBehaviorChanged(bool)),
|
||||
QObject::connect(toolBar, SIGNAL(designModeBehaviorChanged(bool)),
|
||||
q, SLOT(setDesignModeBehavior(bool)));
|
||||
QObject::connect(toolbar, SIGNAL(animationSpeedChanged(qreal)),
|
||||
QObject::connect(toolBar, SIGNAL(animationSpeedChanged(qreal)),
|
||||
q, SLOT(changeAnimationSpeed(qreal)));
|
||||
QObject::connect(toolbar, SIGNAL(colorPickerSelected()), this, SLOT(_q_changeToColorPickerTool()));
|
||||
QObject::connect(toolbar, SIGNAL(zoomToolSelected()), this, SLOT(_q_changeToZoomTool()));
|
||||
QObject::connect(toolbar, SIGNAL(selectToolSelected()), this, SLOT(_q_changeToSingleSelectTool()));
|
||||
QObject::connect(toolbar, SIGNAL(marqueeSelectToolSelected()),
|
||||
QObject::connect(toolBar, SIGNAL(colorPickerSelected()), this, SLOT(_q_changeToColorPickerTool()));
|
||||
QObject::connect(toolBar, SIGNAL(zoomToolSelected()), this, SLOT(_q_changeToZoomTool()));
|
||||
QObject::connect(toolBar, SIGNAL(selectToolSelected()), this, SLOT(_q_changeToSingleSelectTool()));
|
||||
QObject::connect(toolBar, SIGNAL(marqueeSelectToolSelected()),
|
||||
this, SLOT(_q_changeToMarqueeSelectTool()));
|
||||
|
||||
QObject::connect(toolbar, SIGNAL(applyChangesFromQmlFileSelected()),
|
||||
QObject::connect(toolBar, SIGNAL(applyChangesFromQmlFileSelected()),
|
||||
this, SLOT(_q_applyChangesFromClient()));
|
||||
|
||||
QObject::connect(q, SIGNAL(executionStarted(qreal)), toolbar, SLOT(setAnimationSpeed(qreal)));
|
||||
QObject::connect(q, SIGNAL(executionPaused()), toolbar, SLOT(setAnimationSpeed()));
|
||||
QObject::connect(q, SIGNAL(executionStarted(qreal)), toolBar, SLOT(setAnimationSpeed(qreal)));
|
||||
QObject::connect(q, SIGNAL(executionPaused()), toolBar, SLOT(setAnimationSpeed()));
|
||||
|
||||
QObject::connect(q, SIGNAL(selectToolActivated()), toolbar, SLOT(activateSelectTool()));
|
||||
QObject::connect(q, SIGNAL(selectToolActivated()), toolBar, SLOT(activateSelectTool()));
|
||||
|
||||
// disabled features
|
||||
//connect(d->m_toolbar, SIGNAL(applyChangesToQmlFileSelected()), SLOT(applyChangesToClient()));
|
||||
//connect(q, SIGNAL(resizeToolActivated()), d->m_toolbar, SLOT(activateSelectTool()));
|
||||
//connect(q, SIGNAL(moveToolActivated()), d->m_toolbar, SLOT(activateSelectTool()));
|
||||
//connect(d->m_toolBar, SIGNAL(applyChangesToQmlFileSelected()), SLOT(applyChangesToClient()));
|
||||
//connect(q, SIGNAL(resizeToolActivated()), d->m_toolBar, SLOT(activateSelectTool()));
|
||||
//connect(q, SIGNAL(moveToolActivated()), d->m_toolBar, SLOT(activateSelectTool()));
|
||||
|
||||
QObject::connect(q, SIGNAL(colorPickerActivated()), toolbar, SLOT(activateColorPicker()));
|
||||
QObject::connect(q, SIGNAL(zoomToolActivated()), toolbar, SLOT(activateZoom()));
|
||||
QObject::connect(q, SIGNAL(colorPickerActivated()), toolBar, SLOT(activateColorPicker()));
|
||||
QObject::connect(q, SIGNAL(zoomToolActivated()), toolBar, SLOT(activateZoom()));
|
||||
QObject::connect(q, SIGNAL(marqueeSelectToolActivated()),
|
||||
toolbar, SLOT(activateMarqueeSelectTool()));
|
||||
toolBar, SLOT(activateMarqueeSelectTool()));
|
||||
|
||||
QVBoxLayout *verticalLayout = new QVBoxLayout;
|
||||
verticalLayout->setMargin(0);
|
||||
verticalLayout->addWidget(toolbar);
|
||||
verticalLayout->addWidget(toolBar);
|
||||
|
||||
QWidget *toolBox = new QWidget(q->declarativeView(), Qt::Tool);
|
||||
toolBox->setWindowFlags(toolBox->windowFlags() & ~Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint);
|
||||
|
@@ -50,7 +50,7 @@ class ColorPickerTool;
|
||||
class LiveLayerItem;
|
||||
class BoundingRectHighlighter;
|
||||
class SubcomponentEditorTool;
|
||||
class QmlToolbar;
|
||||
class QmlToolBar;
|
||||
class CrumblePath;
|
||||
class AbstractLiveEditTool;
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
bool executionPaused;
|
||||
qreal slowdownFactor;
|
||||
|
||||
QmlToolbar *toolbar;
|
||||
QmlToolBar *toolBar;
|
||||
|
||||
void setViewport(QWidget *widget);
|
||||
|
||||
|
@@ -313,7 +313,8 @@ private:
|
||||
int getUniqueId();
|
||||
void writeVersionsIntoSettings();
|
||||
void addNewVersionsFromInstaller();
|
||||
void updateSystemVersion(); void updateDocumentation();
|
||||
void updateSystemVersion();
|
||||
void updateDocumentation();
|
||||
|
||||
static int indexOfVersionInList(const QtVersion * const version, const QList<QtVersion *> &list);
|
||||
void updateUniqueIdToIndexMap();
|
||||
|
Reference in New Issue
Block a user