From 4bc6f3cceba9b49b3f21bcb661e75600e8bfe158 Mon Sep 17 00:00:00 2001 From: Ilia Ryabokon Date: Fri, 3 May 2013 10:58:25 +0300 Subject: [PATCH] Init commented --- src/domain/UBGraphicsItemDelegate.cpp | 80 +++++++++++++-------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/src/domain/UBGraphicsItemDelegate.cpp b/src/domain/UBGraphicsItemDelegate.cpp index 64564a4a..3e8d6acf 100644 --- a/src/domain/UBGraphicsItemDelegate.cpp +++ b/src/domain/UBGraphicsItemDelegate.cpp @@ -179,51 +179,51 @@ UBGraphicsItemDelegate::UBGraphicsItemDelegate(QGraphicsItem* pDelegated, QObjec void UBGraphicsItemDelegate::init() { - if (mToolBarUsed) - mToolBarItem = new UBGraphicsToolBarItem(mDelegated); - - mFrame = new UBGraphicsDelegateFrame(this, QRectF(0, 0, 0, 0), mFrameWidth, mRespectRatio); - mFrame->hide(); - mFrame->setFlag(QGraphicsItem::ItemIsSelectable, true); - - mDeleteButton = new DelegateButton(":/images/close.svg", mDelegated, mFrame, Qt::TopLeftSection); - mButtons << mDeleteButton; - connect(mDeleteButton, SIGNAL(clicked()), this, SLOT(remove())); - if (canDuplicate()){ - mDuplicateButton = new DelegateButton(":/images/duplicate.svg", mDelegated, mFrame, Qt::TopLeftSection); - connect(mDuplicateButton, SIGNAL(clicked(bool)), this, SLOT(duplicate())); - mButtons << mDuplicateButton; - } - mMenuButton = new DelegateButton(":/images/menu.svg", mDelegated, mFrame, Qt::TopLeftSection); - connect(mMenuButton, SIGNAL(clicked()), this, SLOT(showMenu())); - mButtons << mMenuButton; +// if (mToolBarUsed) +// mToolBarItem = new UBGraphicsToolBarItem(mDelegated); + +// mFrame = new UBGraphicsDelegateFrame(this, QRectF(0, 0, 0, 0), mFrameWidth, mRespectRatio); +// mFrame->hide(); +// mFrame->setFlag(QGraphicsItem::ItemIsSelectable, true); + +// mDeleteButton = new DelegateButton(":/images/close.svg", mDelegated, mFrame, Qt::TopLeftSection); +// mButtons << mDeleteButton; +// connect(mDeleteButton, SIGNAL(clicked()), this, SLOT(remove())); +// if (canDuplicate()){ +// mDuplicateButton = new DelegateButton(":/images/duplicate.svg", mDelegated, mFrame, Qt::TopLeftSection); +// connect(mDuplicateButton, SIGNAL(clicked(bool)), this, SLOT(duplicate())); +// mButtons << mDuplicateButton; +// } +// mMenuButton = new DelegateButton(":/images/menu.svg", mDelegated, mFrame, Qt::TopLeftSection); +// connect(mMenuButton, SIGNAL(clicked()), this, SLOT(showMenu())); +// mButtons << mMenuButton; - mZOrderUpButton = new DelegateButton(":/images/z_layer_up.svg", mDelegated, mFrame, Qt::BottomLeftSection); - mZOrderUpButton->setShowProgressIndicator(true); - connect(mZOrderUpButton, SIGNAL(clicked()), this, SLOT(increaseZLevelUp())); - connect(mZOrderUpButton, SIGNAL(longClicked()), this, SLOT(increaseZlevelTop())); - mButtons << mZOrderUpButton; +// mZOrderUpButton = new DelegateButton(":/images/z_layer_up.svg", mDelegated, mFrame, Qt::BottomLeftSection); +// mZOrderUpButton->setShowProgressIndicator(true); +// connect(mZOrderUpButton, SIGNAL(clicked()), this, SLOT(increaseZLevelUp())); +// connect(mZOrderUpButton, SIGNAL(longClicked()), this, SLOT(increaseZlevelTop())); +// mButtons << mZOrderUpButton; - mZOrderDownButton = new DelegateButton(":/images/z_layer_down.svg", mDelegated, mFrame, Qt::BottomLeftSection); - mZOrderDownButton->setShowProgressIndicator(true); - connect(mZOrderDownButton, SIGNAL(clicked()), this, SLOT(increaseZLevelDown())); - connect(mZOrderDownButton, SIGNAL(longClicked()), this, SLOT(increaseZlevelBottom())); - mButtons << mZOrderDownButton; +// mZOrderDownButton = new DelegateButton(":/images/z_layer_down.svg", mDelegated, mFrame, Qt::BottomLeftSection); +// mZOrderDownButton->setShowProgressIndicator(true); +// connect(mZOrderDownButton, SIGNAL(clicked()), this, SLOT(increaseZLevelDown())); +// connect(mZOrderDownButton, SIGNAL(longClicked()), this, SLOT(increaseZlevelBottom())); +// mButtons << mZOrderDownButton; - buildButtons(); +// buildButtons(); - foreach(DelegateButton* button, mButtons) - { - if (button->getSection() != Qt::TitleBarArea) - { - button->hide(); - button->setFlag(QGraphicsItem::ItemIsSelectable, true); - } - } +// foreach(DelegateButton* button, mButtons) +// { +// if (button->getSection() != Qt::TitleBarArea) +// { +// button->hide(); +// button->setFlag(QGraphicsItem::ItemIsSelectable, true); +// } +// } - //Wrapper function. Use it to set correct data() to QGraphicsItem as well - setFlippable(false); - setRotatable(false); +// //Wrapper function. Use it to set correct data() to QGraphicsItem as well +// setFlippable(false); +// setRotatable(false); } void UBGraphicsItemDelegate::createControls()