OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_slot.cpp versions 1.7 and 1.8
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/as/as-gui/as_slot.cpp 1.7 -> 1.8

--- as_slot.cpp  2002/11/22 11:46:32     1.7
+++ as_slot.cpp  2002/11/22 19:42:25     1.8
@@ -3,6 +3,8 @@
 
 // User interface
 #include "titraq.h"             // Main classes
+#include "titrex.h"             // Exception classes
+#include "titabitem.h"          // For our custom table items
 #include "generic.h"            // Generic classes
 
 // Icon pixel maps
@@ -49,10 +51,9 @@
 //
 void Titraqform::newDoc(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
-//    Titraqform *pNewform = new Titraqform;
-//    pNewform->show();
+    // The only way in Qt 3.X to clear rows efficiently
+    m_pMaintable->setNumRows(0);            // Get rid of any data in table
+    m_pMaintable->setNumRows(g_knBlocks);   // ...and then add them back in
 }
 
 //
@@ -62,8 +63,14 @@
 {
     QString Filestring = QFileDialog::getOpenFileName("/export/home/mschloh/tmp/bifftest/ms.txt", QString::null, this, trUtf8("Chooser Dialog"), trUtf8("Choose a file to open"));
     if (!Filestring.isEmpty()) {
-        QFile Filetemp(Filestring); // File to load
-        loadData(Filetemp);         // Pass to helper method
+        m_pMaintable->setNumRows(0);    // Clear out old data
+        QFile Filetemp(Filestring);     // File to load
+        try {
+            loadData(Filetemp);         // Pass to helper method
+        }
+        catch (Genexcept& Genex) {
+            Genex.reportErr();
+        }
         setCaption(Filestring);
         m_pStatbar->message(trUtf8("Loaded document ") + Filestring, 4000);
     }

CVSTrac 2.0.1