OSSP CVS Repository

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

ossp-pkg/as/as-gui/as_slot.cpp 1.5 -> 1.6

--- as_slot.cpp  2002/11/20 11:06:32     1.5
+++ as_slot.cpp  2002/11/21 15:37:08     1.6
@@ -28,7 +28,7 @@
 }
 
 //
-// Choose a file using a handy file dialog
+// Delete a row entry from the current data window
 //
 void Titraqform::delEntry(void)
 {
@@ -59,11 +59,11 @@
 //
 // Choose a file using a handy file dialog
 //
-void Titraqform::choose(void)
+void Titraqform::chooseFile(void)
 {
-    QString Filestring = QFileDialog::getOpenFileName(QString::null, QString::null, this);
+    QString Filestring = QFileDialog::getOpenFileName("/e/dev/as", QString::null, this, trUtf8("Chooser Dialog"), trUtf8("Choose a file to open"));
     if (!Filestring.isEmpty())
-        load(Filestring);
+        loadData(Filestring);
     else
         m_pStatbar->message(trUtf8("Loading aborted"), 4000);
 }
@@ -71,7 +71,7 @@
 //
 // Load accounting data into main window
 //
-void Titraqform::load(const QString &Filestring)
+void Titraqform::loadData(const QString &Filestring)
 {
     QFile Filetemp(Filestring);         // File to load
 
@@ -88,7 +88,7 @@
 //
 // Serialize current state to the current file
 //
-void Titraqform::save(void)
+void Titraqform::saveFile(void)
 {
     // First time saves are really just saveAs in disguise
     if (m_szFilename->isEmpty()) {
@@ -96,8 +96,7 @@
         return;
     }
 
-    // Try to read the status text, and write it to a file
-    QString Statustext = m_pRemark->text();
+    // Try to open a file for writing to
     QFile Filetemp(*m_szFilename);
     if (!Filetemp.open(IO_WriteOnly)) {
         m_pStatbar->message(QString(trUtf8("Could not write to %1")).arg(*m_szFilename), 4000);
@@ -106,7 +105,7 @@
 
     // Serialize file contents and write to text line
     QTextStream Filestream(&Filetemp);
-    Filestream << Statustext;
+    Filestream << m_pRemark->text();
     Filetemp.close();
 
     // Reset the text line, and give output to main window
@@ -125,8 +124,7 @@
     QString Filestring = QFileDialog::getSaveFileName(QString::null, QString::null, this);
     if (!Filestring.isEmpty()) {
         *m_szFilename = Filestring;
-        m_pRemark->setText(*m_szFilename);
-        save(); // Finish off by calling the save action
+        saveFile(); // Finish off by calling the save action
     }
     else {
         // User did not select a valid file and push okay button
@@ -150,7 +148,7 @@
         trUtf8("The document has been\nchanged since the last save.")),
         trUtf8("Save Now"), trUtf8("Cancel"), trUtf8("Leave Anyway"), 0, 1) {
     case 0:
-        save();
+        saveFile();
         pClosit->accept();
         break;
     case 1:

CVSTrac 2.0.1