]> git.cworth.org Git - apitrace/blobdiff - gui/mainwindow.cpp
Switch the gui to the on-demand-loader.
[apitrace] / gui / mainwindow.cpp
index 591c557e55567eda81a93c1341eadf7cc727aa7a..e5f6d9b2a4b7852a71d375fac33055940e6cbf8c 100644 (file)
@@ -647,7 +647,7 @@ void MainWindow::initObjects()
     m_ui.callView->setContextMenuPolicy(Qt::CustomContextMenu);
 
     m_progressBar = new QProgressBar();
-    m_progressBar->setRange(0, 0);
+    m_progressBar->setRange(0, 100);
     statusBar()->addPermanentWidget(m_progressBar);
     m_progressBar->hide();
 
@@ -682,6 +682,8 @@ void MainWindow::initConnections()
 {
     connect(m_trace, SIGNAL(startedLoadingTrace()),
             this, SLOT(startedLoadingTrace()));
+    connect(m_trace, SIGNAL(loaded(int)),
+            this, SLOT(loadProgess(int)));
     connect(m_trace, SIGNAL(finishedLoadingTrace()),
             this, SLOT(finishedLoadingTrace()));
     connect(m_trace, SIGNAL(startedSaving()),
@@ -1159,4 +1161,9 @@ void MainWindow::saveSelectedSurface()
     statusBar()->showMessage( tr("Saved '%1'").arg(fileName), 5000);
 }
 
+void MainWindow::loadProgess(int percent)
+{
+    m_progressBar->setValue(percent);
+}
+
 #include "mainwindow.moc"