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
e71e5899
Commit
e71e5899
authored
Jan 31, 2014
by
Denis Khachko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Robot pult: fix Cell tab.
parent
9824cdfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
2 deletions
+42
-2
share/kumir2/actors/robot/rc.qml
share/kumir2/actors/robot/rc.qml
+36
-0
src/actors/robot/robotmodule.cpp
src/actors/robot/robotmodule.cpp
+6
-2
No files found.
share/kumir2/actors/robot/rc.qml
View file @
e71e5899
...
...
@@ -19,6 +19,10 @@ Rectangle {
signal
checkFreeRight
signal
checkFreeTop
signal
checkFreeBottom
signal
checkRadiation
signal
checkTemp
signal
checkColored
signal
checkClear
signal
copyTextToKumir
(
string
hjghjgjh
)
property
bool
buttonsLocked
:
false
...
...
@@ -372,6 +376,14 @@ Rectangle {
id
:
image6
source
:
"
btn_temperature.png
"
opacity
:
0
}
onClicked
:
{
if
(
buttonsLocked
)
return
;
buttonsLocked
=
true
;
commandLog
.
text
+=
"
температура
\n
"
;
scroll
.
updateScroll
();
parent
.
checkTemp
();
}
}
...
...
@@ -389,6 +401,14 @@ Rectangle {
source
:
"
btn_radiation.png
"
opacity
:
0
}
onClicked
:
{
if
(
buttonsLocked
)
return
;
buttonsLocked
=
true
;
commandLog
.
text
+=
"
радиация
\n
"
;
scroll
.
updateScroll
();
parent
.
checkRadiation
();
}
}
Button
{
...
...
@@ -404,6 +424,14 @@ Rectangle {
y
:
6
source
:
"
btn_painted.png
"
opacity
:
0
}
onClicked
:
{
if
(
buttonsLocked
)
return
;
buttonsLocked
=
true
;
commandLog
.
text
+=
"
закрашена
\n
"
;
scroll
.
updateScroll
();
parent
.
checkColored
();
}
}
...
...
@@ -421,6 +449,14 @@ Rectangle {
source
:
"
btn_clean.png
"
opacity
:
0
}
onClicked
:
{
if
(
buttonsLocked
)
return
;
buttonsLocked
=
true
;
commandLog
.
text
+=
"
клетка чистая
\n
"
;
scroll
.
updateScroll
();
parent
.
checkClear
();
}
}
Button
{
...
...
src/actors/robot/robotmodule.cpp
View file @
e71e5899
...
...
@@ -3327,6 +3327,10 @@ RobotModule::RobotModule(ExtensionSystem::KPlugin * parent)
connect
(
pult
,
SIGNAL
(
checkFreeRight
()),
this
,
SLOT
(
runIsFreeAtRight
()));
connect
(
pult
,
SIGNAL
(
checkFreeTop
()),
this
,
SLOT
(
runIsFreeAtTop
()));
connect
(
pult
,
SIGNAL
(
checkFreeBottom
()),
this
,
SLOT
(
runIsFreeAtBottom
()));
connect
(
pult
,
SIGNAL
(
checkRadiation
()),
this
,
SLOT
(
runRadiation
()));
connect
(
pult
,
SIGNAL
(
checkTemp
()),
this
,
SLOT
(
runTemperature
()));
connect
(
pult
,
SIGNAL
(
checkColored
()),
this
,
SLOT
(
runIsColor
()));
connect
(
pult
,
SIGNAL
(
checkClear
()),
this
,
SLOT
(
runIsClear
()));
connect
(
pult
,
SIGNAL
(
copyTextToKumir
(
QString
)),
this
,
SLOT
(
copyFromPult
(
QString
)));
connect
(
this
,
SIGNAL
(
sendToPultLog
(
QVariant
)),
pult
,
SLOT
(
addToResultLog
(
QVariant
)));
startField
=
field
->
Clone
();
...
...
@@ -3712,7 +3716,7 @@ bool RobotModule::runIsColor()
};
double
RobotModule
::
runRadiation
(){
double
result
=
field
->
currentCell
()
->
radiation
;
QString
status
=
result
?
trUtf8
(
"да"
)
:
trUtf8
(
"нет"
);
QString
status
=
QString
::
number
(
result
);
if
(
sender
()
&&
qobject_cast
<
QDeclarativeItem
*>
(
sender
()))
{
emit
sendToPultLog
(
status
);
}
...
...
@@ -3720,7 +3724,7 @@ bool RobotModule::runIsColor()
};
int
RobotModule
::
runTemperature
(){
int
result
=
field
->
currentCell
()
->
temperature
;
QString
status
=
result
?
trUtf8
(
"да"
)
:
trUtf8
(
"нет"
);
QString
status
=
QString
::
number
(
result
);
if
(
sender
()
&&
qobject_cast
<
QDeclarativeItem
*>
(
sender
()))
{
emit
sendToPultLog
(
status
);
}
...
...
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