Disabling grouping items

preferencesAboutTextFull
Ivan Ilin 13 years ago
parent b5cfcfd9ee
commit 09f1c235e5
  1. 2
      src/board/UBBoardController.cpp
  2. 1
      src/domain/UBAppleWidget.cpp
  3. 3
      src/domain/UBGraphicsItemDelegate.h
  4. 10
      src/domain/ubgraphicsgroupcontaineritemdelegate.cpp
  5. 5
      src/domain/ubgraphicsgroupcontaineritemdelegate.h
  6. 2
      src/gui/UBTeacherGuideWidget.cpp

@ -1809,7 +1809,7 @@ UBGraphicsWidgetItem *UBBoardController::addW3cWidget(const QUrl &pUrl, const QP
newUrl = QUrl::fromLocalFile(UBPersistenceManager::persistenceManager()->addGraphicsWidgteToDocument(mActiveDocument, pUrl.toLocalFile(), uuid)); newUrl = QUrl::fromLocalFile(UBPersistenceManager::persistenceManager()->addGraphicsWidgteToDocument(mActiveDocument, pUrl.toLocalFile(), uuid));
w3cWidgetItem = mActiveScene->addW3CWidget(pUrl, pos); w3cWidgetItem = mActiveScene->addW3CWidget(newUrl, pos);
if (w3cWidgetItem) { if (w3cWidgetItem) {
w3cWidgetItem->setUuid(uuid); w3cWidgetItem->setUuid(uuid);

@ -64,7 +64,6 @@ UBAppleWidget::UBAppleWidget(const QUrl& pWidgetUrl, QWidget *parent)
mNominalSize = defaultPixmap.size(); mNominalSize = defaultPixmap.size();
} }
UBAppleWidget::~UBAppleWidget() UBAppleWidget::~UBAppleWidget()
{ {
// NOOP // NOOP

@ -184,15 +184,12 @@ class UBGraphicsItemDelegate : public QObject
QList<DelegateButton*> mButtons; QList<DelegateButton*> mButtons;
protected slots: protected slots:
virtual void gotoContentSource(bool checked); virtual void gotoContentSource(bool checked);
private: private:
void updateFrame(); void updateFrame();
void updateButtons(bool showUpdated = false); void updateButtons(bool showUpdated = false);
QPointF mOffset; QPointF mOffset;
QTransform mPreviousTransform; QTransform mPreviousTransform;
QPointF mPreviousPosition; QPointF mPreviousPosition;

@ -49,10 +49,16 @@ void UBGraphicsGroupContainerItemDelegate::buildButtons()
mButtons << mDestroyGroupButton; mButtons << mDestroyGroupButton;
connect(mDestroyGroupButton, SIGNAL(clicked()), this, SLOT(destroyGroup())); connect(mDestroyGroupButton, SIGNAL(clicked()), (UBGraphicsGroupContainerItemDelegate*)this, SLOT(destroyGroup()));
} }
void UBGraphicsGroupContainerItemDelegate::destroyGroup() void UBGraphicsGroupContainerItemDelegate::destroyGroup()
{ {
castUBGraphicsScene()->destroyItemGroup(delegated()); qDebug() << "got an event";
foreach (QGraphicsItem *item, delegated()->childItems()) {
delegated()->removeFromGroup(item);
item->setFlag(QGraphicsItem::ItemIsSelectable, true);
}
remove(true);
} }

@ -7,9 +7,10 @@ class UBGraphicsGroupContainerItem;
class UBGraphicsGroupContainerItemDelegate : public UBGraphicsItemDelegate class UBGraphicsGroupContainerItemDelegate : public UBGraphicsItemDelegate
{ {
Q_OBJECT
public: public:
UBGraphicsGroupContainerItemDelegate(QGraphicsItem* pDelegated, QObject * parent = 0); UBGraphicsGroupContainerItemDelegate(QGraphicsItem* pDelegated, QObject * parent = 0);
UBGraphicsGroupContainerItem *delegated(); UBGraphicsGroupContainerItem *delegated();
protected: protected:
@ -17,8 +18,6 @@ protected:
virtual void buildButtons(); virtual void buildButtons();
private slots: private slots:
void destroyGroup(); void destroyGroup();

@ -768,7 +768,7 @@ void UBTeacherGuidePageZeroEditionWidget::switchToMode(tUBTGZeroPageMode mode)
QStringList licenceIconList; QStringList licenceIconList;
licenceIconList << ":images/licenses/ccby.png" << ":images/licenses/ccbynd.png" << ":images/licenses/ccbysa.png" << ":images/licenses/ccbync.png" << ":images/licenses/ccbyncnd.png" << ":images/licenses/ccbyncsa.png"; licenceIconList << ":images/licenses/ccby.png" << ":images/licenses/ccbynd.png" << ":images/licenses/ccbysa.png" << ":images/licenses/ccbync.png" << ":images/licenses/ccbyncnd.png" << ":images/licenses/ccbyncsa.png";
if(mpLicenceBox->currentIndex() < 6){ if(mpLicenceBox->currentIndex() < 6){
mpLicenceIcon->setPixmap(licenceIconList.at(mpLicenceBox->currentIndex())); // mpLicenceIcon->setPixmap(licenceIconList.at(mpLicenceBox->currentIndex()));
mpLicenceIcon->show(); mpLicenceIcon->show();
} }
mpLicenceValueLabel->show(); mpLicenceValueLabel->show();

Loading…
Cancel
Save