Implemented the reload button functionality. Closes: #34
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 17 Oct 2011 20:26:47 +0000 (20:26 +0000)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 17 Oct 2011 20:26:47 +0000 (20:26 +0000)
src/gui/mainwindow.cpp
src/gui/mainwindow.ui

index a9748a7..8373041 100644 (file)
@@ -139,7 +139,12 @@ void MainWindow::on_aboutAction_triggered()
 
 
 void MainWindow::on_reloadAction_triggered() {
-
+    int confId = Conference::activeConference();
+    if (confId== -1) return;
+    Conference active = Conference::getById(confId);
+    if (active.url().isEmpty()) return;
+    importFromNetwork(active.url());
+    setEnabled(false);
 }
 
 
@@ -296,6 +301,7 @@ void MainWindow::networkQueryFinished(QNetworkReply *aReply)
     {
         importData(aReply->readAll(), aReply->url().toEncoded());
     }
+    setEnabled(true);
 }
 
 void MainWindow::importData(const QByteArray &aData, const QString& url)
index 49eacca..16e4ebd 100644 (file)
     </hint>
    </hints>
   </connection>
-  <connection>
-   <sender>reloadAction</sender>
-   <signal>triggered()</signal>
-   <receiver>MainWindow</receiver>
-   <slot>close()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>-1</x>
-     <y>-1</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>451</x>
-     <y>248</y>
-    </hint>
-   </hints>
-  </connection>
  </connections>
 </ui>