git conflict resolved

preferencesAboutTextFull
Ivan Ilin 13 years ago
commit 34646dab0b
  1. 4
      src/board/UBBoardController.cpp
  2. 10
      src/domain/UBGraphicsScene.cpp
  3. 13
      src/frameworks/UBCoreGraphicsScene.cpp
  4. 3
      src/frameworks/UBCoreGraphicsScene.h
  5. 12
      src/gui/UBTeacherBarWidget.cpp
  6. 2
      src/gui/UBTeacherBarWidget.h

@ -1212,7 +1212,9 @@ void UBBoardController::ClearUndoStack()
QGraphicsItem* item = itUniq.next();
UBGraphicsScene *scene = (UBGraphicsScene*)item->scene();
if(!scene)
delete item;
{
bool retCode = mActiveScene->deleteItem(item);
}
}
}

@ -158,28 +158,22 @@ void UBGraphicsScene::selectionChangedProcessing()
QList<QGraphicsItem *> allItemsList = items();
qreal maxZ = 0.;
for( int i = 0; i < allItemsList.size(); i++ )
{
for( int i = 0; i < allItemsList.size(); i++ ) {
QGraphicsItem *nextItem = allItemsList.at(i);
//Temporary stub. Due to ugly z-order implementation I need to do this (sankore 360)
//z-order behavior should be reimplemented and this stub should be deleted
if (nextItem == mBackgroundObject)
continue;
//Temporary stub end (sankore 360)
// qreal zValue = nextItem->zValue();
if (nextItem->zValue() > maxZ)
maxZ = nextItem->zValue();
nextItem->setZValue(nextItem->data(UBGraphicsItemData::ItemOwnZValue).toReal());
// nextItem->setZValue(qreal(1));
}
QList<QGraphicsItem *> selItemsList = selectedItems();
// QGraphicsItem *nextItem;
for( int i = 0; i < selItemsList.size(); i++ )
{
for( int i = 0; i < selItemsList.size(); i++ ) {
QGraphicsItem *nextItem = selItemsList.at(i);
nextItem->setZValue(maxZ + 0.0001);
// qDebug() << QString(" >>> %1 <<< ").arg(i) << QString(" >>> %1 <<< ").arg(zValue);
}
}

@ -53,3 +53,16 @@ void UBCoreGraphicsScene::removeItem(QGraphicsItem* item, bool forceDelete)
delete item;
}
}
bool UBCoreGraphicsScene::deleteItem(QGraphicsItem* item)
{
if(mItemsToDelete.contains(item))
{
mItemsToDelete.remove(item);
delete item;
return true;
}
else
return false;
}

@ -28,6 +28,9 @@ class UBCoreGraphicsScene : public QGraphicsScene
virtual void removeItem(QGraphicsItem* item, bool forceDelete = false);
virtual bool deleteItem(QGraphicsItem* item);
private:
QSet<QGraphicsItem*> mItemsToDelete;
};

@ -62,6 +62,7 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
mpTitleLabel->setAlignment(Qt::AlignRight);
mpTitle = new QLineEdit(mpContainer);
mpTitle->setObjectName("DockPaletteWidgetLineEdit");
connect(mpTitle, SIGNAL(textChanged(const QString&)), this, SLOT(onTitleTextChanged(const QString&)));
mpTitleLayout = new QHBoxLayout();
mpTitleLayout->addWidget(mpTitleLabel, 0);
mpTitleLayout->addWidget(mpTitle, 1);
@ -95,6 +96,7 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
mpEquipmentLabel->setAlignment(Qt::AlignRight);
mpEquipment = new QLineEdit(mpContainer);
mpEquipment->setObjectName("DockPaletteWidgetLineEdit");
connect(mpEquipment, SIGNAL(textChanged(const QString&)), this, SLOT(onEquipmentTextChanged(const QString&)));
mpEquipmentLayout = new QHBoxLayout();
mpEquipmentLayout->addWidget(mpEquipmentLabel, 0);
mpEquipmentLayout->addWidget(mpEquipment, 1);
@ -319,6 +321,16 @@ void UBTeacherBarWidget::loadContent()
mpAction3->setStudentText(nextInfos.action3Student);
}
void UBTeacherBarWidget::onTitleTextChanged(const QString& text)
{
mpTitle->setToolTip(text);
}
void UBTeacherBarWidget::onEquipmentTextChanged(const QString& text)
{
mpEquipment->setToolTip(text);
}
UBTeacherStudentAction::UBTeacherStudentAction(int actionNumber, QWidget *parent, const char *name):QWidget(parent)
, mpActionLabel(NULL)
, mpTeacherLabel(NULL)

@ -48,6 +48,8 @@ private slots:
void saveContent();
void loadContent();
void onValueChanged();
void onTitleTextChanged(const QString& text);
void onEquipmentTextChanged(const QString& text);
private:
void populateCombos();

Loading…
Cancel
Save