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

Vodoley redraw timer

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