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
e99a2eed
Commit
e99a2eed
authored
Jul 04, 2011
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graphics Triangle Tool
parent
91af7748
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
122 deletions
+42
-122
Sankore 3.1.iss
Sankore 3.1.iss
+0
-89
triangleTool.png
resources/images/toolPalette/triangleTool.png
+0
-0
UBGraphicsTriangle.cpp
src/tools/UBGraphicsTriangle.cpp
+40
-31
UBGraphicsTriangle.h
src/tools/UBGraphicsTriangle.h
+2
-2
No files found.
Sankore 3.1.iss
deleted
100644 → 0
View file @
91af7748
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{E63D17F8-D9DA-479D-B9B5-0D101A03703B}
AppName=Sankore 3.1
AppVerName=Sankore 3.1
AppPublisher=Mnemis
AppPublisherURL=http://www.getuniboard.com
AppSupportURL=http://support.getuniboard.com
AppUpdatesURL=http://www.getuniboard.com
DefaultDirName={pf}\Sankore 3.1
DefaultGroupName=Sankore 3.1
OutputDir=.\install\win32\
OutputBaseFilename=Sankore 3.1 setup
SetupIconFile=.\resources\win\uniboard.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[InstallDelete]
Type: files ; Name: "{app}\Sankore 3.1.pdb"
Type: filesandordirs ; Name: "{app}\library"
Type: filesandordirs ; Name: "{app}\Microsoft.VC90.CRT"
Type: filesandordirs ; Name: "{app}\plugins"
Type: filesandordirs ; Name: "{app}\i18n"
Type: files ; Name: "{app}\*.dll"
[Files]
Source: ".\build\win32\release\product\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: ".\runtime\windows\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: ".\resources\win\plugins\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\Sankore 3.1"; Filename: "{app}\Sankore 3.1.exe"
;Name: "{group}\{cm:ProgramOnTheWeb,Sankore 3.1}"; Filename: "http://www.getuniboard.com/"
Name: "{group}\{cm:UninstallProgram,Sankore 3.1}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\Sankore 3.1"; Filename: "{app}\Sankore 3.1.exe"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Sankore 3.1"; Filename: "{app}\Sankore 3.1.exe"; Tasks: quicklaunchicon
Name: "{group}\Printing Preferences"; Filename: "{app}\properties.exe"; WorkingDir: {app}
[Registry]
Root: HKCR; Subkey: ".ubz"; ValueType: string; ValueName: ""; ValueData: "SankoreFile"; Flags: uninsdeletevalue
Root: HKCR; Subkey: "SankoreFile"; ValueType: string; ValueName: ""; ValueData: "Sankore 3.1 document"; Flags: uninsdeletekey
Root: HKCR; Subkey: "SankoreFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\Sankore 3.1.exe,1"
Root: HKCR; Subkey: "SankoreFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\Sankore 3.1.exe"" ""%1"""
Root: HKLM; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: string; ValueName: "Client application"; ValueData: "{app}\Sankore 3.1.exe"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: dword; ValueName: "Transfer mode"; ValueData: "0"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: dword; ValueName: "EMF: Hide page"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Sankore 3.1\Defaults"; ValueType: dword; ValueName: "PDF: Enabled"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: string; ValueName: "Client application"; ValueData: "{app}\Sankore 3.1.exe"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: dword; ValueName: "Transfer mode"; ValueData: "0"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: dword; ValueName: "EMF: Hide page"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore 3.1\Defaults"; ValueType: dword; ValueName: "PDF: Enabled"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorX64
[Run]
Filename: "{app}\Sankore 3.1.exe"; Description: "{cm:LaunchProgram,Sankore 3.1}"; Flags: nowait postinstall
[UninstallDelete]
; cleanup and delete whole installation directory
Name: {app}; Type: filesandordirs
[Code]
function isProcessorX64: Boolean;
begin
Result := (ProcessorArchitecture = paX64);
end;
function isProcessorNotX64: Boolean;
begin
Result := not isProcessorX64;
end;
resources/images/toolPalette/triangleTool.png
View replaced file @
91af7748
View file @
e99a2eed
11.1 KB
|
W:
|
H:
9.39 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/tools/UBGraphicsTriangle.cpp
View file @
e99a2eed
...
...
@@ -73,6 +73,8 @@ void UBGraphicsTriangle::setRect(qreal x, qreal y, qreal w, qreal h, UBGraphicsT
void
UBGraphicsTriangle
::
setOrientation
(
UBGraphicsTriangleOrientation
orientation
)
{
if
(
mOrientation
!=
orientation
)
{
mOrientation
=
orientation
;
QTransform
t
;
switch
(
orientation
)
...
...
@@ -91,8 +93,10 @@ void UBGraphicsTriangle::setOrientation(UBGraphicsTriangleOrientation orientatio
break
;
}
rotateAroundCenter
(
t
);
this
->
angle
=
-
this
->
angle
;
rotateAroundCenter
(
t
,
rotationCenter
());
setTransform
(
t
);
}
}
UBGraphicsScene
*
UBGraphicsTriangle
::
scene
()
const
...
...
@@ -236,17 +240,19 @@ void UBGraphicsTriangle::paintGraduations(QPainter *painter)
void
UBGraphicsTriangle
::
rotateAroundCenter
(
qreal
angle
)
{
qreal
oldAngle
=
this
->
angle
;
this
->
angle
=
angle
;
QTransform
transform
;
rotateAroundCenter
(
transform
);
rotateAroundCenter
(
transform
,
rotationCenter
()
);
setTransform
(
transform
,
true
);
this
->
angle
=
oldAngle
+
angle
;
// We have to store absolute value for FLIP case
}
void
UBGraphicsTriangle
::
rotateAroundCenter
(
QTransform
&
transform
)
void
UBGraphicsTriangle
::
rotateAroundCenter
(
QTransform
&
transform
,
QPointF
center
)
{
transform
.
translate
(
rotationCenter
().
x
(),
rotationCenter
()
.
y
());
transform
.
translate
(
center
.
x
(),
center
.
y
());
transform
.
rotate
(
angle
);
transform
.
translate
(
-
rotationCenter
().
x
(),
-
rotationCenter
()
.
y
());
transform
.
translate
(
-
center
.
x
(),
-
center
.
y
());
}
...
...
@@ -388,11 +394,11 @@ void UBGraphicsTriangle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
else
{
setRect
(
setRect
(
QRectF
(
rect
().
left
()
-
delta
.
x
(),
rect
().
top
(),
rect
().
width
()
+
delta
.
x
(),
rect
().
height
(),
rect
().
height
()
)
,
mOrientation
);
}
...
...
@@ -400,15 +406,18 @@ void UBGraphicsTriangle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
if
(
mResizing2
)
{
QPointF
delta
=
event
->
pos
()
-
event
->
lastPos
();
if
(
rect
().
height
()
+
delta
.
y
()
<
sMinHeight
)
if
(
rect
().
height
()
-
delta
.
y
()
<
sMinHeight
)
delta
.
setY
(
sMinHeight
-
rect
().
height
());
qDebug
()
<<
delta
;
setRect
(
QRect
(
qDebug
()
<<
event
->
pos
()
<<
event
->
lastPos
()
<<
delta
;
QRectF
r
(
rect
().
left
(),
rect
().
top
()
+
delta
.
y
(),
rect
().
width
(),
rect
().
height
()
-
delta
.
y
()),
mOrientation
);
rect
().
height
()
-
delta
.
y
());
qDebug
()
<<
r
;
setRect
(
r
,
mOrientation
);
}
if
(
mRotating
)
{
...
...
src/tools/UBGraphicsTriangle.h
View file @
e99a2eed
...
...
@@ -94,7 +94,7 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
QTransform
calculateRotationTransform
();
qreal
angle
;
void
rotateAroundCenter
(
QTransform
&
transform
);
void
rotateAroundCenter
(
QTransform
&
transform
,
QPointF
center
);
bool
mResizing1
;
bool
mResizing2
;
...
...
@@ -115,7 +115,7 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
static
const
int
d
=
70
;
// width of triangle border
static
const
int
sArrowLength
=
30
;
static
const
int
sMinWidth
=
200
;
static
const
int
sMinHeight
=
15
0
;
static
const
int
sMinHeight
=
20
0
;
};
#endif
/* UBGRAPHICSTRIANGLE_H_ */
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