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));
w3cWidgetItem = mActiveScene->addW3CWidget(pUrl, pos);
w3cWidgetItem = mActiveScene->addW3CWidget(newUrl, pos);
if (w3cWidgetItem) {
w3cWidgetItem->setUuid(uuid);

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

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

@ -49,10 +49,16 @@ void UBGraphicsGroupContainerItemDelegate::buildButtons()
mButtons << mDestroyGroupButton;
connect(mDestroyGroupButton, SIGNAL(clicked()), this, SLOT(destroyGroup()));
connect(mDestroyGroupButton, SIGNAL(clicked()), (UBGraphicsGroupContainerItemDelegate*)this, SLOT(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
{
Q_OBJECT
public:
UBGraphicsGroupContainerItemDelegate(QGraphicsItem* pDelegated, QObject * parent = 0);
UBGraphicsGroupContainerItem *delegated();
protected:
@ -17,8 +18,6 @@ protected:
virtual void buildButtons();
private slots:
void destroyGroup();

@ -768,7 +768,7 @@ void UBTeacherGuidePageZeroEditionWidget::switchToMode(tUBTGZeroPageMode mode)
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";
if(mpLicenceBox->currentIndex() < 6){
mpLicenceIcon->setPixmap(licenceIconList.at(mpLicenceBox->currentIndex()));
// mpLicenceIcon->setPixmap(licenceIconList.at(mpLicenceBox->currentIndex()));
mpLicenceIcon->show();
}
mpLicenceValueLabel->show();

Loading…
Cancel
Save