Commit 74dc664d authored by Denis Khachko's avatar Denis Khachko

Vodoley redraw timer

parent 3972f27a
...@@ -661,8 +661,7 @@ void Vodoley::updateMenzur() ...@@ -661,8 +661,7 @@ void Vodoley::updateMenzur()
Btext->setPos(145,15+(maxSize()-Bsize())*literSize); Btext->setPos(145,15+(maxSize()-Bsize())*literSize);
Ctext->setPos(255,15+(maxSize()-Csize())*literSize); Ctext->setPos(255,15+(maxSize()-Csize())*literSize);
view->update();
scene->update();
mutex.unlock(); mutex.unlock();
...@@ -670,6 +669,13 @@ void Vodoley::updateMenzur() ...@@ -670,6 +669,13 @@ void Vodoley::updateMenzur()
if(Csize()<1)emit CNull();else emit CNotNull(); if(Csize()<1)emit CNull();else emit CNotNull();
}; };
void Vodoley::redraw()
{
mutex.lock();
view->update();
scene->update();
mutex.unlock();
}
void Vodoley::updateNeedBirka() void Vodoley::updateNeedBirka()
{ {
......
...@@ -201,7 +201,7 @@ public slots: ...@@ -201,7 +201,7 @@ public slots:
void FillC(); void FillC();
void MoveFromTo(uint from,uint to); void MoveFromTo(uint from,uint to);
void redraw();
signals: signals:
void Otkaz(QString msg); void Otkaz(QString msg);
......
...@@ -53,6 +53,9 @@ QString VodoleyModule::initialize(const QStringList &configurationParameters, co ...@@ -53,6 +53,9 @@ QString VodoleyModule::initialize(const QStringList &configurationParameters, co
if (!configurationParameters.contains("tablesOnly")) { if (!configurationParameters.contains("tablesOnly")) {
createGui(); createGui();
createRescentMenu(); createRescentMenu();
redrawTimer = new QTimer(this);
connect(redrawTimer,SIGNAL(timeout()), MainWindow, SLOT(redraw()));
} }
return ""; return "";
...@@ -82,6 +85,12 @@ QString VodoleyModule::initialize(const QStringList &configurationParameters, co ...@@ -82,6 +85,12 @@ QString VodoleyModule::initialize(const QStringList &configurationParameters, co
using namespace ExtensionSystem; // not to write "ExtensionSystem::" each time in this method scope using namespace ExtensionSystem; // not to write "ExtensionSystem::" each time in this method scope
Q_UNUSED(old); // Remove this line on implementation Q_UNUSED(old); // Remove this line on implementation
Q_UNUSED(current); // Remove this line on implementation Q_UNUSED(current); // Remove this line on implementation
MainWindow->redraw();
if(current==GlobalState::GS_Running)
{
redrawTimer->start(100);
}else
redrawTimer->stop();
} }
/* public slot */ void VodoleyModule::loadActorData(QIODevice * source) /* public slot */ void VodoleyModule::loadActorData(QIODevice * source)
......
...@@ -71,6 +71,7 @@ private: ...@@ -71,6 +71,7 @@ private:
Vodoley *MainWindow; Vodoley *MainWindow;
ExtensionSystem::SettingsPtr my_settings; ExtensionSystem::SettingsPtr my_settings;
QMenu * rescentMenu; QMenu * rescentMenu;
QTimer *redrawTimer;
}; };
......
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