X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvMainWindow.cxx;h=5266fc15f236f1490d2d0bc40b00cd6510e4f3c8;hb=526a19406ee0edf8f062a9ec3c0c6255e33979c8;hp=456e9bda79a93f4687ad29f0958d5e7a61466c4e;hpb=77ed5552a569a557a4ebbda7477a8f452f7b1dcf;p=clitk.git diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 456e9bd..5266fc1 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -317,6 +317,21 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() if (!CLITK_EXPERIMENTAL) menuExperimental->menuAction()->setVisible(false); + + + QTimer * timerMemory = new QTimer(this); + //timerMemory->setInterval(5); + connect(timerMemory, SIGNAL(timeout()), this, SLOT(UpdateMemoryUsage())); + timerMemory->start(2000); +} +//------------------------------------------------------------------------------ + + +//------------------------------------------------------------------------------ +void vvMainWindow::UpdateMemoryUsage() +{ + // clitk::PrintMemory(true); + infoPanel->setMemoryInMb(QString::number(clitk::GetMemoryUsageInMb())+" MiB"); } //------------------------------------------------------------------------------ @@ -1496,6 +1511,7 @@ void vvMainWindow::CloseImage(QTreeWidgetItem* item, int column) InitDisplay(); } } + ImageInfoChanged(); } //------------------------------------------------------------------------------ @@ -2739,6 +2755,7 @@ vvSlicerManager* vvMainWindow::AddImage(vvImage::Pointer image,std::string filen qApp->processEvents(); // End + ImageInfoChanged(); return slicer_manager; } //------------------------------------------------------------------------------