Commit bb56d0ee authored by Denis Khachko's avatar Denis Khachko

Vodoley mutex lock

parent 706d76b0
......@@ -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": "50",
"default": "100",
"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": {
......
......@@ -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
......
......@@ -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()
......
......@@ -66,6 +66,7 @@ public slots:
private:
void createGui();
QMutex mutex;
void createRescentMenu();
Vodoley *MainWindow;
ExtensionSystem::SettingsPtr my_settings;
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment