Commit b8894e29 authored by Victor Yacovlev's avatar Victor Yacovlev

Merge branch 'master' of /var/opt/gitlab/git-data/repositories/niisi/kumir2

parents 5a755dfe c550fa93
......@@ -748,7 +748,7 @@ namespace ActorRobot {
Items.clear();
}
RoboField::RoboField(QWidget *parent)
RoboField::RoboField(QWidget *parent,RobotModule* actor)
: QGraphicsScene(parent)
......@@ -772,7 +772,7 @@ namespace ActorRobot {
this->setItemIndexMethod(NoIndex);
robot=NULL;
markMode=true;
Actor=actor;
wasEdit=false;
showWall=new QGraphicsLineItem(0,0,0,0);
this->addItem(showWall);
......@@ -3312,7 +3312,7 @@ namespace ActorRobot {
RoboField* RoboField::Clone()
{
RoboField* clone=new RoboField(0);
RoboField* clone=new RoboField(0,Actor);
clone->setFieldItems(Items);
clone->robo_x=robo_x;
clone->robo_y=robo_y;
......@@ -3538,7 +3538,7 @@ RobotModule::RobotModule(ExtensionSystem::KPlugin * parent)
void RobotModule::createGui()
{
field=new RoboField(0);
field=new RoboField(0,this);
//field->editField();
field->createField(7,7);
......@@ -3610,6 +3610,7 @@ void RobotModule::copyFromPult(QString log)
// The source should be ready-to-read QIODevice like QBuffer or QFile
qDebug()<<"Load env";
if(field->loadFromDataStream(source)!=0)return ;
m_pultWidget->clearLog();
m_mainWidget->setWindowTitle(trUtf8("Робот - ")+source->objectName());
startField=field->Clone();
field->dropWasEdit();
......
......@@ -69,7 +69,7 @@ namespace ActorRobot {
#define MAX_ROWS 128
class EditLine;
class RobotModule;
class SimpleRobot:
......@@ -248,7 +248,7 @@ namespace ActorRobot {
{
Q_OBJECT
public:
RoboField(QWidget *parent);
RoboField(QWidget *parent,RobotModule* actor);
RoboField* Clone();
~RoboField();
......@@ -419,6 +419,7 @@ namespace ActorRobot {
QGraphicsProxyWidget *wAddRow,*wAddCol,*wRemCol,*wRemRow;
QToolButton *btnAddRow,*btnAddCol,*btnRemCol,*btnRemRow;
int mode;
RobotModule* Actor;
};
......
......@@ -90,6 +90,7 @@ QString VodoleyModule::initialize(const QStringList &configurationParameters, co
// The source should be ready-to-read QIODevice like QBuffer or QFile
MainWindow->loadIoDevice(source);
MainWindow->pult->pltLogger()->ClearLog();
MainWindow->reset();
}
......
......@@ -154,7 +154,7 @@ bool Plugin::startNewTask(QStringList isps,KumZadanie* task)
return false;
}
//TODO LOAD FIELDS;
QFile* field_data=new QFile(task->field(isps.at(i), field_no));
qDebug()<<"Set field"<<task->field(isps.at(i), field_no);
if(! field_data->open(QIODevice::ReadOnly))return false;
......
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