Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
34646dab
Commit
34646dab
authored
Dec 15, 2011
by
Ivan Ilin
Browse files
Options
Browse Files
Download
Plain Diff
git conflict resolved
parents
a34fcbd5
e2539163
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
10 deletions
+36
-10
UBBoardController.cpp
src/board/UBBoardController.cpp
+3
-1
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+3
-9
UBCoreGraphicsScene.cpp
src/frameworks/UBCoreGraphicsScene.cpp
+13
-0
UBCoreGraphicsScene.h
src/frameworks/UBCoreGraphicsScene.h
+3
-0
UBTeacherBarWidget.cpp
src/gui/UBTeacherBarWidget.cpp
+12
-0
UBTeacherBarWidget.h
src/gui/UBTeacherBarWidget.h
+2
-0
No files found.
src/board/UBBoardController.cpp
View file @
34646dab
...
...
@@ -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
);
}
}
}
...
...
src/domain/UBGraphicsScene.cpp
View file @
34646dab
...
...
@@ -152,34 +152,28 @@ UBGraphicsScene::~UBGraphicsScene()
void
UBGraphicsScene
::
selectionChangedProcessing
()
{
if
(
selectedItems
().
count
())
if
(
selectedItems
().
count
())
UBApplication
::
showMessage
(
"ZValue is "
+
QString
::
number
(
selectedItems
().
first
()
->
zValue
(),
'f'
));
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);
}
}
...
...
src/frameworks/UBCoreGraphicsScene.cpp
View file @
34646dab
...
...
@@ -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
;
}
src/frameworks/UBCoreGraphicsScene.h
View file @
34646dab
...
...
@@ -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
;
};
...
...
src/gui/UBTeacherBarWidget.cpp
View file @
34646dab
...
...
@@ -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
)
...
...
src/gui/UBTeacherBarWidget.h
View file @
34646dab
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment