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
5bb5198b
Commit
5bb5198b
authored
Feb 27, 2013
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed aristo
parent
9167cb88
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1 addition
and
1059 deletions
+1
-1059
UBBoardController.cpp
src/board/UBBoardController.cpp
+0
-5
UBBoardView.cpp
src/board/UBBoardView.cpp
+0
-3
UB.h
src/core/UB.h
+0
-1
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+0
-17
UBGraphicsScene.h
src/domain/UBGraphicsScene.h
+0
-1
UBGraphicsAristo.cpp
src/tools/UBGraphicsAristo.cpp
+0
-857
UBGraphicsAristo.h
src/tools/UBGraphicsAristo.h
+0
-161
UBToolsManager.cpp
src/tools/UBToolsManager.cpp
+1
-11
UBToolsManager.h
src/tools/UBToolsManager.h
+0
-1
tools.pri
src/tools/tools.pri
+0
-2
No files found.
src/board/UBBoardController.cpp
View file @
5bb5198b
...
@@ -1421,11 +1421,6 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl
...
@@ -1421,11 +1421,6 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl
mActiveScene
->
addMask
(
pPos
);
mActiveScene
->
addMask
(
pPos
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
}
}
else
if
(
sourceUrl
.
toString
()
==
UBToolsManager
::
manager
()
->
aristo
.
id
)
{
mActiveScene
->
addAristo
(
pPos
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
}
else
else
{
{
showMessage
(
tr
(
"Unknown tool type %1"
).
arg
(
sourceUrl
.
toString
()));
showMessage
(
tr
(
"Unknown tool type %1"
).
arg
(
sourceUrl
.
toString
()));
...
...
src/board/UBBoardView.cpp
View file @
5bb5198b
...
@@ -76,7 +76,6 @@
...
@@ -76,7 +76,6 @@
#include "tools/UBGraphicsCache.h"
#include "tools/UBGraphicsCache.h"
#include "tools/UBGraphicsTriangle.h"
#include "tools/UBGraphicsTriangle.h"
#include "tools/UBGraphicsProtractor.h"
#include "tools/UBGraphicsProtractor.h"
#include "tools/UBGraphicsAristo.h"
#include "core/memcheck.h"
#include "core/memcheck.h"
...
@@ -478,7 +477,6 @@ bool UBBoardView::isCppTool(QGraphicsItem *item)
...
@@ -478,7 +477,6 @@ bool UBBoardView::isCppTool(QGraphicsItem *item)
||
item
->
type
()
==
UBGraphicsItemType
::
RulerItemType
||
item
->
type
()
==
UBGraphicsItemType
::
RulerItemType
||
item
->
type
()
==
UBGraphicsItemType
::
ProtractorItemType
||
item
->
type
()
==
UBGraphicsItemType
::
ProtractorItemType
||
item
->
type
()
==
UBGraphicsItemType
::
TriangleItemType
||
item
->
type
()
==
UBGraphicsItemType
::
TriangleItemType
||
item
->
type
()
==
UBGraphicsItemType
::
AristoItemType
||
item
->
type
()
==
UBGraphicsItemType
::
CurtainItemType
);
||
item
->
type
()
==
UBGraphicsItemType
::
CurtainItemType
);
}
}
...
@@ -557,7 +555,6 @@ Here we determines cases when items should to get mouse press event at pressing
...
@@ -557,7 +555,6 @@ Here we determines cases when items should to get mouse press event at pressing
case
UBGraphicsTriangle
:
:
Type
:
case
UBGraphicsTriangle
:
:
Type
:
case
UBGraphicsCompass
:
:
Type
:
case
UBGraphicsCompass
:
:
Type
:
case
UBGraphicsCache
:
:
Type
:
case
UBGraphicsCache
:
:
Type
:
case
UBGraphicsAristo
:
:
Type
:
return
true
;
return
true
;
case
UBGraphicsDelegateFrame
:
:
Type
:
case
UBGraphicsDelegateFrame
:
:
Type
:
...
...
src/core/UB.h
View file @
5bb5198b
...
@@ -153,7 +153,6 @@ struct UBGraphicsItemType
...
@@ -153,7 +153,6 @@ struct UBGraphicsItemType
TriangleItemType
,
TriangleItemType
,
MagnifierItemType
,
MagnifierItemType
,
cacheItemType
,
cacheItemType
,
AristoItemType
,
groupContainerType
,
groupContainerType
,
ToolWidgetItemType
,
ToolWidgetItemType
,
GraphicsWidgetItemType
,
GraphicsWidgetItemType
,
...
...
src/domain/UBGraphicsScene.cpp
View file @
5bb5198b
...
@@ -47,7 +47,6 @@
...
@@ -47,7 +47,6 @@
#include "tools/UBGraphicsTriangle.h"
#include "tools/UBGraphicsTriangle.h"
#include "tools/UBGraphicsCurtainItem.h"
#include "tools/UBGraphicsCurtainItem.h"
#include "tools/UBGraphicsCache.h"
#include "tools/UBGraphicsCache.h"
#include "tools/UBGraphicsAristo.h"
#include "document/UBDocumentProxy.h"
#include "document/UBDocumentProxy.h"
...
@@ -1955,22 +1954,6 @@ void UBGraphicsScene::addCompass(QPointF center)
...
@@ -1955,22 +1954,6 @@ void UBGraphicsScene::addCompass(QPointF center)
compass
->
setVisible
(
true
);
compass
->
setVisible
(
true
);
}
}
void
UBGraphicsScene
::
addAristo
(
QPointF
center
)
{
UBGraphicsAristo
*
aristo
=
new
UBGraphicsAristo
();
mTools
<<
aristo
;
aristo
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
QVariant
(
UBItemLayerType
::
Tool
));
addItem
(
aristo
);
QPointF
itemSceneCenter
=
aristo
->
sceneBoundingRect
().
center
();
aristo
->
moveBy
(
center
.
x
()
-
itemSceneCenter
.
x
(),
center
.
y
()
-
itemSceneCenter
.
y
());
aristo
->
setVisible
(
true
);
setModified
(
true
);
}
void
UBGraphicsScene
::
addCache
()
void
UBGraphicsScene
::
addCache
()
{
{
UBGraphicsCache
*
cache
=
UBGraphicsCache
::
instance
(
this
);
UBGraphicsCache
*
cache
=
UBGraphicsCache
::
instance
(
this
);
...
...
src/domain/UBGraphicsScene.h
View file @
5bb5198b
...
@@ -224,7 +224,6 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
...
@@ -224,7 +224,6 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
void
addCompass
(
QPointF
center
);
void
addCompass
(
QPointF
center
);
void
addTriangle
(
QPointF
center
);
void
addTriangle
(
QPointF
center
);
void
addMagnifier
(
UBMagnifierParams
params
);
void
addMagnifier
(
UBMagnifierParams
params
);
void
addAristo
(
QPointF
center
);
void
addMask
(
const
QPointF
&
center
=
QPointF
());
void
addMask
(
const
QPointF
&
center
=
QPointF
());
void
addCache
();
void
addCache
();
...
...
src/tools/UBGraphicsAristo.cpp
deleted
100644 → 0
View file @
9167cb88
This diff is collapsed.
Click to expand it.
src/tools/UBGraphicsAristo.h
deleted
100644 → 0
View file @
9167cb88
/*
* Copyright (C) 2012 Webdoc SA
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBGRAPHICSARISTO_H_
#define UBGRAPHICSARISTO_H_
#include "core/UB.h"
#include "domain/UBItem.h"
#include "domain/UBGraphicsScene.h"
#include "tools/UBAbstractDrawRuler.h"
#include <QtGlobal>
#include <QBrush>
#include <QCursor>
#include <QGraphicsPathItem>
#include <QGraphicsSceneHoverEvent>
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsSvgItem>
#include <QObject>
#include <QPainter>
#include <QPainterPath>
#include <QPointF>
#include <QRectF>
#include <QStyleOptionGraphicsItem>
#include <QTransform>
#include <QWidget>
class
UBGraphicsAristo
:
public
UBAbstractDrawRuler
,
public
QGraphicsPathItem
,
public
UBItem
{
Q_OBJECT
public
:
UBGraphicsAristo
();
virtual
~
UBGraphicsAristo
();
enum
{
Type
=
UBGraphicsItemType
::
AristoItemType
};
enum
Tool
{
None
,
Move
,
Resize
,
Rotate
,
Close
,
MoveMarker
,
HorizontalFlip
};
enum
Orientation
{
Bottom
=
0
,
Top
,
Undefined
};
void
setOrientation
(
Orientation
orientation
);
virtual
UBItem
*
deepCopy
()
const
;
virtual
void
copyItemParameters
(
UBItem
*
copy
)
const
;
virtual
void
StartLine
(
const
QPointF
&
scenePos
,
qreal
width
);
virtual
void
DrawLine
(
const
QPointF
&
position
,
qreal
width
);
virtual
void
EndLine
();
virtual
int
type
()
const
{
return
Type
;
}
UBGraphicsScene
*
scene
()
const
;
protected
:
virtual
void
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
styleOption
,
QWidget
*
widget
);
virtual
void
rotateAroundCenter
(
qreal
angle
);
virtual
void
resize
(
qreal
factor
);
virtual
QPointF
rotationCenter
()
const
;
virtual
QRectF
closeButtonRect
()
const
;
QRectF
hFlipRect
()
const
;
QRectF
markerButtonRect
()
const
;
QRectF
resizeButtonRect
()
const
;
QRectF
rotateRect
()
const
;
QCursor
flipCursor
()
const
;
QCursor
markerCursor
()
const
;
QCursor
resizeCursor
()
const
;
virtual
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
hoverEnterEvent
(
QGraphicsSceneHoverEvent
*
event
);
virtual
void
hoverLeaveEvent
(
QGraphicsSceneHoverEvent
*
event
);
virtual
void
hoverMoveEvent
(
QGraphicsSceneHoverEvent
*
event
);
private
:
Tool
toolFromPos
(
QPointF
pos
);
QTransform
calculateRotationTransform
();
void
rotateAroundCenter
(
QTransform
&
transform
,
QPointF
center
);
void
calculatePoints
(
QRectF
bounds
);
QPainterPath
determinePath
();
void
setItemsPos
();
QBrush
fillBrush
()
const
;
void
paintGraduations
(
QPainter
*
painter
);
void
paintMarker
(
QPainter
*
painter
);
void
paintProtractorGraduations
(
QPainter
*
painter
);
void
paintRulerGraduations
(
QPainter
*
painter
);
inline
qreal
radius
()
const
{
return
sqrt
(((
B
.
x
()
-
A
.
x
())
*
(
B
.
x
()
-
A
.
x
()))
+
((
B
.
y
()
-
A
.
y
())
*
(
B
.
y
()
-
A
.
y
())))
*
9
/
16
-
20
;
}
bool
mMarking
;
bool
mResizing
;
bool
mRotating
;
Orientation
mOrientation
;
qreal
mRotatedAngle
;
qreal
mMarkerAngle
;
qreal
mStartAngle
;
qreal
mSpan
;
QGraphicsSvgItem
*
mHFlipSvgItem
;
QGraphicsSvgItem
*
mMarkerSvgItem
;
QGraphicsSvgItem
*
mResizeSvgItem
;
QGraphicsSvgItem
*
mRotateSvgItem
;
QPointF
A
,
B
,
C
;
static
const
int
sArcAngleMargin
=
5
;
static
const
Orientation
sDefaultOrientation
;
static
const
QRectF
sDefaultRect
;
};
#endif
/* UBGRAPHICSARISTO_H_ */
src/tools/UBToolsManager.cpp
View file @
5bb5198b
...
@@ -88,23 +88,13 @@ UBToolsManager::UBToolsManager(QObject *parent)
...
@@ -88,23 +88,13 @@ UBToolsManager::UBToolsManager(QObject *parent)
mToolsIcon
.
insert
(
magnifier
.
id
,
":/images/toolPalette/magnifierTool.png"
);
mToolsIcon
.
insert
(
magnifier
.
id
,
":/images/toolPalette/magnifierTool.png"
);
mDescriptors
<<
magnifier
;
mDescriptors
<<
magnifier
;
// --------------------------------------------------------------------------------
// DO NOT ERASE THIS COMMENTED CODE! IT WILL BE UNCOMMENTED DURING THE NEXT DAYS!!!
// --------------------------------------------------------------------------------
cache
.
id
=
"uniboardTool://uniboard.mnemis.com/cache"
;
cache
.
id
=
"uniboardTool://uniboard.mnemis.com/cache"
;
cache
.
icon
=
QPixmap
(
":/images/toolPalette/cacheTool.png"
);
cache
.
icon
=
QPixmap
(
":/images/toolPalette/cacheTool.png"
);
cache
.
label
=
tr
(
"Cache"
);
cache
.
label
=
tr
(
"Cache"
);
cache
.
version
=
"1.0"
;
cache
.
version
=
"1.0"
;
mToolsIcon
.
insert
(
cache
.
id
,
":/images/toolPalette/cacheTool.png"
);
mToolsIcon
.
insert
(
cache
.
id
,
":/images/toolPalette/cacheTool.png"
);
mDescriptors
<<
cache
;
mDescriptors
<<
cache
;
// --------------------------------------------------------------------------------
// aristo.id = "uniboardTool://uniboard.mnemis.com/aristo";
// aristo.icon = QPixmap(":/images/toolPalette/aristoTool.png");
// aristo.label = tr("Aristo");
// aristo.version = "1.0";
// mToolsIcon.insert(aristo.id, ":/images/toolPalette/aristoTool.png");
// mDescriptors << aristo;
}
}
UBToolsManager
::~
UBToolsManager
()
UBToolsManager
::~
UBToolsManager
()
...
...
src/tools/UBToolsManager.h
View file @
5bb5198b
...
@@ -84,7 +84,6 @@ class UBToolsManager : public QObject
...
@@ -84,7 +84,6 @@ class UBToolsManager : public QObject
UBToolDescriptor
triangle
;
UBToolDescriptor
triangle
;
UBToolDescriptor
magnifier
;
UBToolDescriptor
magnifier
;
UBToolDescriptor
cache
;
UBToolDescriptor
cache
;
UBToolDescriptor
aristo
;
QString
iconFromToolId
(
QString
id
)
{
return
mToolsIcon
.
value
(
id
);}
QString
iconFromToolId
(
QString
id
)
{
return
mToolsIcon
.
value
(
id
);}
...
...
src/tools/tools.pri
View file @
5bb5198b
...
@@ -2,7 +2,6 @@ HEADERS += src/tools/UBGraphicsRuler.h \
...
@@ -2,7 +2,6 @@ HEADERS += src/tools/UBGraphicsRuler.h \
src/tools/UBGraphicsTriangle.h \
src/tools/UBGraphicsTriangle.h \
src/tools/UBGraphicsProtractor.h \
src/tools/UBGraphicsProtractor.h \
src/tools/UBGraphicsCompass.h \
src/tools/UBGraphicsCompass.h \
src/tools/UBGraphicsAristo.h \
src/tools/UBToolsManager.h \
src/tools/UBToolsManager.h \
src/tools/UBGraphicsCurtainItem.h \
src/tools/UBGraphicsCurtainItem.h \
src/tools/UBGraphicsCurtainItemDelegate.h \
src/tools/UBGraphicsCurtainItemDelegate.h \
...
@@ -13,7 +12,6 @@ SOURCES += src/tools/UBGraphicsRuler.cpp \
...
@@ -13,7 +12,6 @@ SOURCES += src/tools/UBGraphicsRuler.cpp \
src/tools/UBGraphicsTriangle.cpp \
src/tools/UBGraphicsTriangle.cpp \
src/tools/UBGraphicsProtractor.cpp \
src/tools/UBGraphicsProtractor.cpp \
src/tools/UBGraphicsCompass.cpp \
src/tools/UBGraphicsCompass.cpp \
src/tools/UBGraphicsAristo.cpp \
src/tools/UBToolsManager.cpp \
src/tools/UBToolsManager.cpp \
src/tools/UBGraphicsCurtainItem.cpp \
src/tools/UBGraphicsCurtainItem.cpp \
src/tools/UBGraphicsCurtainItemDelegate.cpp \
src/tools/UBGraphicsCurtainItemDelegate.cpp \
...
...
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