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
023550e6
Commit
023550e6
authored
Dec 08, 2011
by
Ivan Ilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sankore-413
parent
33533e50
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
12 deletions
+13
-12
UBBoardView.cpp
src/board/UBBoardView.cpp
+1
-1
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+2
-4
UBGraphicsScene.h
src/domain/UBGraphicsScene.h
+2
-2
UBGraphicsTextItem.cpp
src/domain/UBGraphicsTextItem.cpp
+6
-5
UBItem.h
src/domain/UBItem.h
+2
-0
No files found.
src/board/UBBoardView.cpp
View file @
023550e6
...
@@ -554,7 +554,7 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event)
...
@@ -554,7 +554,7 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event)
{
{
QRect
rubberRect
=
mRubberBand
->
geometry
();
QRect
rubberRect
=
mRubberBand
->
geometry
();
UBGraphicsTextItem
*
textItem
=
scene
()
->
addText
(
""
,
mapToScene
(
rubberRect
.
topLeft
()));
UBGraphicsTextItem
*
textItem
=
scene
()
->
addTextHtml
(
""
,
mapToScene
(
rubberRect
.
topLeft
()));
event
->
accept
();
event
->
accept
();
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
...
...
src/domain/UBGraphicsScene.cpp
View file @
023550e6
...
@@ -1321,7 +1321,7 @@ UBGraphicsTextItem* UBGraphicsScene::addTextWithFont(const QString& pString, con
...
@@ -1321,7 +1321,7 @@ UBGraphicsTextItem* UBGraphicsScene::addTextWithFont(const QString& pString, con
return
textItem
;
return
textItem
;
}
}
UBGraphicsTextItem
*
UBGraphicsScene
::
addTextHtml
(
const
QString
&
pString
)
UBGraphicsTextItem
*
UBGraphicsScene
::
addTextHtml
(
const
QString
&
pString
,
const
QPointF
&
pTopLeft
)
{
{
UBGraphicsTextItem
*
textItem
=
new
UBGraphicsTextItem
();
UBGraphicsTextItem
*
textItem
=
new
UBGraphicsTextItem
();
textItem
->
setPlainText
(
""
);
textItem
->
setPlainText
(
""
);
...
@@ -1341,6 +1341,7 @@ UBGraphicsTextItem *UBGraphicsScene::addTextHtml(const QString &pString)
...
@@ -1341,6 +1341,7 @@ UBGraphicsTextItem *UBGraphicsScene::addTextHtml(const QString &pString)
textItem
->
setFocus
();
textItem
->
setFocus
();
setDocumentUpdated
();
setDocumentUpdated
();
textItem
->
setPos
(
pTopLeft
);
return
textItem
;
return
textItem
;
}
}
...
@@ -1356,7 +1357,6 @@ void UBGraphicsScene::addItem(QGraphicsItem* item)
...
@@ -1356,7 +1357,6 @@ void UBGraphicsScene::addItem(QGraphicsItem* item)
mFastAccessItems
<<
item
;
mFastAccessItems
<<
item
;
}
}
void
UBGraphicsScene
::
addItems
(
const
QSet
<
QGraphicsItem
*>&
items
)
void
UBGraphicsScene
::
addItems
(
const
QSet
<
QGraphicsItem
*>&
items
)
{
{
setModified
(
true
);
setModified
(
true
);
...
@@ -1369,7 +1369,6 @@ void UBGraphicsScene::addItems(const QSet<QGraphicsItem*>& items)
...
@@ -1369,7 +1369,6 @@ void UBGraphicsScene::addItems(const QSet<QGraphicsItem*>& items)
mFastAccessItems
+=
items
.
toList
();
mFastAccessItems
+=
items
.
toList
();
}
}
void
UBGraphicsScene
::
removeItem
(
QGraphicsItem
*
item
)
void
UBGraphicsScene
::
removeItem
(
QGraphicsItem
*
item
)
{
{
setModified
(
true
);
setModified
(
true
);
...
@@ -1427,7 +1426,6 @@ QGraphicsItem* UBGraphicsScene::setAsBackgroundObject(QGraphicsItem* item, bool
...
@@ -1427,7 +1426,6 @@ QGraphicsItem* UBGraphicsScene::setAsBackgroundObject(QGraphicsItem* item, bool
item
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
UBItemLayerType
::
FixedBackground
);
item
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
UBItemLayerType
::
FixedBackground
);
item
->
setZValue
(
backgroundLayerStart
);
item
->
setZValue
(
backgroundLayerStart
);
UBApplication
::
showMessage
(
"ZValue of the background is "
+
QString
::
number
(
item
->
zValue
(),
'f'
));
if
(
pAdaptTransformation
)
if
(
pAdaptTransformation
)
{
{
...
...
src/domain/UBGraphicsScene.h
View file @
023550e6
...
@@ -89,9 +89,9 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
...
@@ -89,9 +89,9 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
UBGraphicsSvgItem
*
addSvg
(
const
QUrl
&
pSvgFileUrl
,
const
QPointF
&
pPos
=
QPointF
(
0
,
0
));
UBGraphicsSvgItem
*
addSvg
(
const
QUrl
&
pSvgFileUrl
,
const
QPointF
&
pPos
=
QPointF
(
0
,
0
));
UBGraphicsTextItem
*
addText
(
const
QString
&
pString
,
const
QPointF
&
pTopLeft
=
QPointF
(
0
,
0
));
UBGraphicsTextItem
*
addText
(
const
QString
&
pString
,
const
QPointF
&
pTopLeft
=
QPointF
(
0
,
0
));
UBGraphicsTextItem
*
addTextWithFont
(
const
QString
&
pString
,
const
QPointF
&
pTopLeft
=
QPointF
(
0
,
0
)
UBGraphicsTextItem
*
addTextWithFont
(
const
QString
&
pString
,
const
QPointF
&
pTopLeft
=
QPointF
(
0
,
0
)
,
int
pointSize
=
-
1
,
const
QString
&
fontFamily
=
""
,
bool
bold
=
false
,
bool
italic
=
false
);
,
int
pointSize
=
-
1
,
const
QString
&
fontFamily
=
""
,
bool
bold
=
false
,
bool
italic
=
false
);
UBGraphicsTextItem
*
addTextHtml
(
const
QString
&
pString
=
QString
());
UBGraphicsTextItem
*
addTextHtml
(
const
QString
&
pString
=
QString
()
,
const
QPointF
&
pTopLeft
=
QPointF
(
0
,
0
)
);
UBGraphicsW3CWidgetItem
*
addOEmbed
(
const
QUrl
&
pContentUrl
,
const
QPointF
&
pPos
=
QPointF
(
0
,
0
));
UBGraphicsW3CWidgetItem
*
addOEmbed
(
const
QUrl
&
pContentUrl
,
const
QPointF
&
pPos
=
QPointF
(
0
,
0
));
...
...
src/domain/UBGraphicsTextItem.cpp
View file @
023550e6
...
@@ -203,7 +203,7 @@ UBItem* UBGraphicsTextItem::deepCopy() const
...
@@ -203,7 +203,7 @@ UBItem* UBGraphicsTextItem::deepCopy() const
{
{
UBGraphicsTextItem
*
copy
=
new
UBGraphicsTextItem
();
UBGraphicsTextItem
*
copy
=
new
UBGraphicsTextItem
();
copy
->
set
PlainText
(
this
->
toPlainText
());
copy
->
set
Html
(
toHtml
());
copy
->
setPos
(
this
->
pos
());
copy
->
setPos
(
this
->
pos
());
copy
->
setZValue
(
this
->
zValue
());
copy
->
setZValue
(
this
->
zValue
());
copy
->
setTransform
(
this
->
transform
());
copy
->
setTransform
(
this
->
transform
());
...
@@ -211,10 +211,11 @@ UBItem* UBGraphicsTextItem::deepCopy() const
...
@@ -211,10 +211,11 @@ UBItem* UBGraphicsTextItem::deepCopy() const
copy
->
setFlag
(
QGraphicsItem
::
ItemIsSelectable
,
true
);
copy
->
setFlag
(
QGraphicsItem
::
ItemIsSelectable
,
true
);
copy
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
this
->
data
(
UBGraphicsItemData
::
ItemLayerType
));
copy
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
this
->
data
(
UBGraphicsItemData
::
ItemLayerType
));
copy
->
setData
(
UBGraphicsItemData
::
ItemLocked
,
this
->
data
(
UBGraphicsItemData
::
ItemLocked
));
copy
->
setData
(
UBGraphicsItemData
::
ItemLocked
,
this
->
data
(
UBGraphicsItemData
::
ItemLocked
));
copy
->
setDefaultTextColor
(
this
->
defaultTextColor
());
copy
->
setData
(
UBGraphicsItemData
::
ItemEditable
,
data
(
UBGraphicsItemData
::
ItemEditable
).
toBool
());
copy
->
setFont
(
this
->
font
());
// copy->setDefaultTextColor(this->defaultTextColor());
copy
->
setColorOnDarkBackground
(
this
->
colorOnDarkBackground
());
// copy->setFont(this->font());
copy
->
setColorOnLightBackground
(
this
->
colorOnLightBackground
());
// copy->setColorOnDarkBackground(this->colorOnDarkBackground());
// copy->setColorOnLightBackground(this->colorOnLightBackground());
copy
->
setTextWidth
(
this
->
textWidth
());
copy
->
setTextWidth
(
this
->
textWidth
());
copy
->
setTextHeight
(
this
->
textHeight
());
copy
->
setTextHeight
(
this
->
textHeight
());
...
...
src/domain/UBItem.h
View file @
023550e6
...
@@ -99,7 +99,9 @@ protected:
...
@@ -99,7 +99,9 @@ protected:
}
}
public
:
public
:
virtual
UBGraphicsItemDelegate
*
Delegate
()
const
=
0
;
virtual
UBGraphicsItemDelegate
*
Delegate
()
const
=
0
;
virtual
void
remove
()
=
0
;
virtual
void
remove
()
=
0
;
};
};
...
...
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