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
bb56d0ee
Commit
bb56d0ee
authored
Sep 19, 2016
by
Denis Khachko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vodoley mutex lock
parent
706d76b0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
23 deletions
+37
-23
src/actors/robot/robot.json
src/actors/robot/robot.json
+9
-9
src/actors/robot/robotmodule.cpp
src/actors/robot/robotmodule.cpp
+7
-7
src/actors/vodoley/vodoleymodule.cpp
src/actors/vodoley/vodoleymodule.cpp
+19
-6
src/actors/vodoley/vodoleymodule.h
src/actors/vodoley/vodoleymodule.h
+1
-0
testing/prg/scripts/kumirutils.pyc
testing/prg/scripts/kumirutils.pyc
+0
-0
testing/scripts/runtest_r.py
testing/scripts/runtest_r.py
+1
-1
No files found.
src/actors/robot/robot.json
View file @
bb56d0ee
...
...
@@ -203,7 +203,7 @@
"order"
:
1
,
"type"
:
"color"
,
"default"
:
"#FFFFFF"
,
"title"
:
{
"ascii"
:
"Text color"
,
"ru_RU"
:
"Цвет с
ми
волов"
}
"title"
:
{
"ascii"
:
"Text color"
,
"ru_RU"
:
"Цвет с
им
волов"
}
},
"LineColor"
:
{
"order"
:
2
,
...
...
@@ -232,50 +232,50 @@
"EditColor"
:
{
"order"
:
6
,
"type"
:
"color"
,
"default"
:
"#
00008C
"
,
"default"
:
"#
6496ff
"
,
"title"
:
{
"ascii"
:
"Background color (edit mode)"
,
"ru_RU"
:
"Цвет поля (редактирование)"
}
},
"LettShift"
:
{
"order"
:
7
,
"type"
:
"int"
,
"default"
:
"
0
"
,
"default"
:
"
2
"
,
"title"
:
{
"ascii"
:
"Letters Shift"
,
"ru_RU"
:
"Сдвиг символов вверх/вниз"
}
},
"MarkShift"
:
{
"order"
:
8
,
"type"
:
"int"
,
"default"
:
"
0
"
,
"default"
:
"
3
"
,
"title"
:
{
"ascii"
:
"Marks Shift"
,
"ru_RU"
:
"Сдвиг точки вверх/вниз"
}
},
"MarkShiftLeft"
:
{
"order"
:
9
,
"type"
:
"int"
,
"default"
:
"
0
"
,
"default"
:
"
6
"
,
"title"
:
{
"ascii"
:
"Letters Shift"
,
"ru_RU"
:
"Сдвиг точки право/лево"
}
},
"ImageSize"
:
{
"order"
:
10
,
"type"
:
"double"
,
"default"
:
"
5
0"
,
"default"
:
"
10
0"
,
"maximum"
:
"5000"
,
"title"
:
{
"ascii"
:
"ImageSize"
,
"ru_RU"
:
"Пикселей/клетку при сохранении картинки"
}
},
"BortW"
:
{
"order"
:
11
,
"type"
:
"int"
,
"default"
:
"
4
"
,
"default"
:
"
6
"
,
"title"
:
{
"ascii"
:
"BortW"
,
"ru_RU"
:
"Толщина борта"
}
},
"StW"
:
{
"order"
:
12
,
"type"
:
"int"
,
"default"
:
"
2
"
,
"default"
:
"
1
"
,
"title"
:
{
"ascii"
:
"BortW"
,
"ru_RU"
:
"Толщина линий"
}
},
"WallW"
:
{
"order"
:
13
,
"type"
:
"int"
,
"default"
:
"
3
"
,
"default"
:
"
4
"
,
"title"
:
{
"ascii"
:
"BortW"
,
"ru_RU"
:
"Толщина стен"
}
},
"FillColor"
:
{
...
...
src/actors/robot/robotmodule.cpp
View file @
bb56d0ee
...
...
@@ -343,7 +343,7 @@ namespace ActorRobot {
if
(
upChar
.
isPrint
()
&&
upChar
!=
' '
)
{
upCharItm
=
Scene
->
addText
(
upChar
,
font
);
upCharItm
->
setDefaultTextColor
(
TextColor
);
float
lettShift
=
sett
->
value
(
"LettShift"
,
"
1
"
).
toFloat
();
float
lettShift
=
sett
->
value
(
"LettShift"
,
"
2
"
).
toFloat
();
upCharItm
->
setPos
(
upLeftCornerX
,
upLeftCornerY
-
2
-
lettShift
);
upCharItm
->
setZValue
(
1
);
}
...
...
@@ -382,8 +382,8 @@ namespace ActorRobot {
delete
markItm
;
markItm
=
NULL
;
}
float
xshift
=
sett
->
value
(
"MarkShiftLeft"
,
"
1
"
).
toFloat
();
float
yshift
=
sett
->
value
(
"MarkShift"
,
"
1
"
).
toFloat
();
float
xshift
=
sett
->
value
(
"MarkShiftLeft"
,
"
6
"
).
toFloat
();
float
yshift
=
sett
->
value
(
"MarkShift"
,
"
3
"
).
toFloat
();
// markItm=Scene->addText(QChar(9787),font);
markItm
=
Scene
->
addText
(
QChar
(
9679
),
font
);
markItm
->
setDefaultTextColor
(
TextColor
);
...
...
@@ -772,7 +772,7 @@ namespace ActorRobot {
LineColor
=
QColor
(
sett
->
value
(
"LineColor"
,
"#C8C800"
).
toString
());
EditLineColor
=
QColor
(
sett
->
value
(
"LineColorEdit"
,
"#C8C800"
).
toString
());
WallColor
=
QColor
(
sett
->
value
(
"WallColor"
,
"#C8C800"
).
toString
());
EditColor
=
QColor
(
sett
->
value
(
"EditColor"
,
"#
00008C
"
).
toString
());
EditColor
=
QColor
(
sett
->
value
(
"EditColor"
,
"#
6496ff
"
).
toString
());
NormalColor
=
QColor
(
sett
->
value
(
"NormalColor"
,
"#289628"
).
toString
());
showLine
=
QPen
(
QColor
(
0
,
255
,
0
,
125
));
showLine
.
setWidth
(
3
);
...
...
@@ -1067,12 +1067,12 @@ namespace ActorRobot {
drawNet
();
BortLine
=
QPen
(
WallColor
,
4
);
BortLine
.
setWidth
(
sett
->
value
(
"BortW"
,
"
4
"
).
toInt
());
BortLine
.
setWidth
(
sett
->
value
(
"BortW"
,
"
6
"
).
toInt
());
StLine
=
QPen
(
gridColor
,
3
);
StLine
.
setWidth
(
sett
->
value
(
"StW"
,
"
2
"
).
toInt
());
StLine
.
setWidth
(
sett
->
value
(
"StW"
,
"
1
"
).
toInt
());
WallLine
=
QPen
(
WallColor
,
3
);
WallLine
.
setWidth
(
sett
->
value
(
"WallW"
,
"
2
"
).
toInt
());
WallLine
.
setWidth
(
sett
->
value
(
"WallW"
,
"
4
"
).
toInt
());
qDebug
()
<<
"Rows"
<<
rows
()
<<
"Cols:"
<<
columns
();
//if(rows()==2)return;
for
(
int
i
=
0
;
i
<
rows
();
i
++
)
//Cikl po kletkam
...
...
src/actors/vodoley/vodoleymodule.cpp
View file @
bb56d0ee
...
...
@@ -182,69 +182,82 @@ private:
{
/* алг вылей A */
// TODO implement me
mutex
.
lock
();
MainWindow
->
MoveFromTo
(
0
,
3
);
//Move water from A to ....
mutex
.
unlock
();
}
/* public slot */
void
VodoleyModule
::
runEmptyB
()
{
/* алг вылей B */
// TODO implement me
mutex
.
lock
();
MainWindow
->
MoveFromTo
(
1
,
3
);
mutex
.
unlock
();
}
/* public slot */
void
VodoleyModule
::
runEmptyC
()
{
/* алг вылей C */
// TODO implement me
mutex
.
lock
();
MainWindow
->
MoveFromTo
(
1
,
3
);
mutex
.
unlock
();
}
/* public slot */
void
VodoleyModule
::
runFromAToB
()
{
/* алг перелей из A в B */
// TODO implement me
mutex
.
lock
();
MainWindow
->
MoveFromTo
(
0
,
1
);
mutex
.
unlock
();
}
/* public slot */
void
VodoleyModule
::
runFromAToC
()
{
/* алг перелей из A в C */
// TODO implement me
mutex
.
lock
();
MainWindow
->
MoveFromTo
(
0
,
2
);
mutex
.
unlock
();
}
/* public slot */
void
VodoleyModule
::
runFromBToA
()
{
/* алг перелей из B в A */
// TODO implement me
mutex
.
lock
();
MainWindow
->
MoveFromTo
(
1
,
0
);
mutex
.
unlock
();
}
/* public slot */
void
VodoleyModule
::
runFromBToC
()
{
/* алг перелей из B в C */
// TODO implement me
mutex
.
lock
();
MainWindow
->
MoveFromTo
(
1
,
2
);
mutex
.
unlock
();
}
/* public slot */
void
VodoleyModule
::
runFromCToB
()
{
/* алг перелей из C в B */
// TODO implement me
mutex
.
lock
();
MainWindow
->
MoveFromTo
(
2
,
1
);
mutex
.
unlock
();
}
/* public slot */
void
VodoleyModule
::
runFromCToA
()
{
/* алг перелей из C в A */
// TODO implement me
mutex
.
lock
();
MainWindow
->
MoveFromTo
(
2
,
0
);
mutex
.
unlock
();
}
/* public slot */
bool
VodoleyModule
::
runTaskComplited
()
...
...
src/actors/vodoley/vodoleymodule.h
View file @
bb56d0ee
...
...
@@ -66,6 +66,7 @@ public slots:
private:
void
createGui
();
QMutex
mutex
;
void
createRescentMenu
();
Vodoley
*
MainWindow
;
ExtensionSystem
::
SettingsPtr
my_settings
;
...
...
testing/prg/scripts/kumirutils.pyc
View file @
bb56d0ee
No preview for this file type
testing/scripts/runtest_r.py
View file @
bb56d0ee
...
...
@@ -7,7 +7,7 @@ import os.path
import
os
import
kumirutils
TEST_DIRS
=
[
"
tLeonovKarpov
"
,
"tErrors"
,
"tKushnirenko"
,
"tKushnirenko_Nov"
,
"tOur"
,
"tTOS"
]
TEST_DIRS
=
[
"
../prg/tOurNew
"
,
"tErrors"
,
"tKushnirenko"
,
"tKushnirenko_Nov"
,
"tOur"
,
"tTOS"
]
out
=
sys
.
stdout
...
...
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