Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kumir
kumir2
Commits
5205aab9
Commit
5205aab9
authored
Sep 30, 2016
by
Denis Khachko
Committed by
Victor Yacovlev
Oct 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Draw settings
parent
e1629d6e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
src/actors/draw/draw.json
src/actors/draw/draw.json
+4
-4
src/actors/draw/drawmodule.cpp
src/actors/draw/drawmodule.cpp
+6
-6
src/actors/draw/drawmodule.h
src/actors/draw/drawmodule.h
+1
-1
No files found.
src/actors/draw/draw.json
View file @
5205aab9
...
...
@@ -73,17 +73,17 @@
"settings"
:
{
"BackColor"
:
{
"type"
:
"color"
,
"default"
:
"#
FFFFFF
"
,
"default"
:
"#
99FF99
"
,
"title"
:
{
"ascii"
:
"Background color"
,
"ru_RU"
:
"Цвет фона"
}
},
"LineColor"
:
{
"type"
:
"color"
,
"default"
:
"#
C8C800
"
,
"default"
:
"#
669966
"
,
"title"
:
{
"ascii"
:
"Grid color"
,
"ru_RU"
:
"Цвет сетки"
}
},
"AxisColor"
:
{
"type"
:
"color"
,
"default"
:
"#
C8C8
00"
,
"default"
:
"#
9999
00"
,
"title"
:
{
"ascii"
:
"Axis color"
,
"ru_RU"
:
"Цвет осей"
}
},
"AxisWidth"
:
{
...
...
@@ -98,7 +98,7 @@
},
"LineWidth"
:
{
"type"
:
"int"
,
"default"
:
"
1
"
,
"default"
:
"
4
"
,
"title"
:
{
"ascii"
:
"Line width"
,
"ru_RU"
:
"Толщина линий"
}
}
...
...
src/actors/draw/drawmodule.cpp
View file @
5205aab9
...
...
@@ -782,7 +782,7 @@ void DrawModule::createGui()
netStepX
=
1
;
netStepY
=
1
;
autoNet
=
true
;
netColor
=
QColor
(
"
999999
"
);
netColor
=
QColor
(
"
#669966
"
);
penIsDrawing
=
false
;
CurScene
=
new
DrawScene
(
CurView
);
navigator
=
new
DrawNavigator
(
CurView
);
...
...
@@ -829,7 +829,7 @@ void DrawModule::createGui()
CurView
->
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
CurView
->
setVerticalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
QBrush
curBackground
=
QBrush
(
QColor
(
DrawSettings
()
->
value
(
"Draw/BackColor"
,
"
lightgreen
"
).
toString
()));
QBrush
curBackground
=
QBrush
(
QColor
(
DrawSettings
()
->
value
(
"Draw/BackColor"
,
"
#99FF99
"
).
toString
()));
CurScene
->
setBackgroundBrush
(
curBackground
);
Color
Black
;
...
...
@@ -965,10 +965,10 @@ void DrawModule::showNavigator(bool state)
// Updates setting on module load, workspace change or appliyng settings dialog.
// If @param keys is empty -- should reload all settings, otherwise load only setting specified by @param keys
// TODO implement me
QBrush
curBackground
=
QBrush
(
QColor
(
settings
->
value
(
"BackColor"
,
"
lightgreen
"
).
toString
()));
QBrush
curBackground
=
QBrush
(
QColor
(
settings
->
value
(
"BackColor"
,
"
#99FF99
"
).
toString
()));
CurScene
->
setBackgroundBrush
(
curBackground
);
netColor
=
QColor
(
settings
->
value
(
"LineColor"
,
"
gray
"
).
toString
());
netColor
=
QColor
(
settings
->
value
(
"LineColor"
,
"
#669966
"
).
toString
());
drawNet
();
Q_UNUSED
(
keys
);
}
...
...
@@ -1044,7 +1044,7 @@ void DrawModule::showNavigator(bool state)
mPen
->
setPos
(
x
,
-
y
);
if
(
penIsDrawing
)
{
CurScene
->
addDrawLine
(
QLineF
(
start
,
mPen
->
pos
()),
QColor
(
penColor
.
r
,
penColor
.
g
,
penColor
.
b
,
penColor
.
a
),
mySettings
()
->
value
(
"LineWidth"
,
1
).
toFloat
());
CurScene
->
addDrawLine
(
QLineF
(
start
,
mPen
->
pos
()),
QColor
(
penColor
.
r
,
penColor
.
g
,
penColor
.
b
,
penColor
.
a
),
mySettings
()
->
value
(
"LineWidth"
,
4
).
toFloat
());
}
CurView
->
resetCachedContent
();
CurView
->
update
();
...
...
@@ -1061,7 +1061,7 @@ void DrawModule::showNavigator(bool state)
mPen
->
moveBy
(
dX
,
-
dY
);
if
(
penIsDrawing
)
{
CurScene
->
addDrawLine
(
QLineF
(
start
,
mPen
->
pos
()),
QColor
(
penColor
.
r
,
penColor
.
g
,
penColor
.
b
,
penColor
.
a
),
mySettings
()
->
value
(
"LineWidth"
,
1
).
toFloat
());
CurScene
->
addDrawLine
(
QLineF
(
start
,
mPen
->
pos
()),
QColor
(
penColor
.
r
,
penColor
.
g
,
penColor
.
b
,
penColor
.
a
),
mySettings
()
->
value
(
"LineWidth"
,
4
).
toFloat
());
}
CurView
->
update
();
if
(
animate
)
redrawPicture
();
...
...
src/actors/draw/drawmodule.h
View file @
5205aab9
...
...
@@ -187,7 +187,7 @@ public /* methods */:
static
ExtensionSystem
::
SettingsPtr
DrawSettings
();
QColor
axisColor
()
{
return
QColor
(
DrawSettings
()
->
value
(
"AxisColor"
,
"
blue
"
).
toString
());
return
QColor
(
DrawSettings
()
->
value
(
"AxisColor"
,
"
#999900
"
).
toString
());
}
void
redrawPicture
()
{
...
...
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