OSSP CVS Repository

ossp - Check-in [3890]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3890
Date: 2002-Dec-17 15:08:33 (local)
2002-Dec-17 14:08:33 (UTC)
User:ms
Branch:
Comment: Fix some hard to find bad saving problems, add file extension filter, and make file op exception strings more descriptive.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/TODO      1.48 -> 1.49     3 inserted, 0 deleted
ossp-pkg/as/as-gui/as_const.h      1.29 -> 1.30     1 inserted, 1 deleted
ossp-pkg/as/as-gui/as_dataop.cpp      1.26 -> 1.27     3 inserted, 3 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.66 -> 1.67     6 inserted, 5 deleted

ossp-pkg/as/as-gui/TODO 1.48 -> 1.49

--- TODO 2002/12/16 17:37:39     1.48
+++ TODO 2002/12/17 14:08:33     1.49
@@ -14,6 +14,7 @@
 Q_CHECK_PTR
 public/private
 Implement an unlimited and generic undo and redo buffer class
+Add optional automatic file personal data file backup
 configure soll ueberpruefen ob libqt[-mt] threads braucht,
   dann wenn so, soll den LIBS -pthread hardgecodet haben
 Ensure rethrows from second loadData on upwards
@@ -36,6 +37,8 @@
 Make edit control window optional through preferences
 Add customizable column ordering by click and drag
 Method refreshDisplay is too expensive to process
+Soll mehr intuitive, mit sekondaer/dritte Keycolumn
+Be consistent with szQString vs QString var names
 
 Preferences
 -----------


ossp-pkg/as/as-gui/as_const.h 1.29 -> 1.30

--- as_const.h   2002/12/16 17:37:39     1.29
+++ as_const.h   2002/12/17 14:08:33     1.30
@@ -84,7 +84,7 @@
 #define TITRAQ_PREFFRAMEWIDTH   "framewidth"
 #define TITRAQ_DEFFRAMEWIDTH    640
 #define TITRAQ_PREFFRAMEHEIGHT  "frameheight"
-#define TITRAQ_DEFFRAMEHEIGHT   480
+#define TITRAQ_DEFFRAMEHEIGHT   400
 
 // Column width preferences
 #define TITRAQ_PREFSTATCOLWIDTH   "statcolwidth"


ossp-pkg/as/as-gui/as_dataop.cpp 1.26 -> 1.27

--- as_dataop.cpp        2002/12/16 17:13:17     1.26
+++ as_dataop.cpp        2002/12/17 14:08:33     1.27
@@ -56,7 +56,7 @@
     }
     else {
         if (!Fileobj.open(IO_ReadOnly)) // Try to open file
-            throw Genexcept("Could not open account file.");
+            throw Genexcept("Could not open account file for reading.");
         else
             Fileobj.flush();                // Begin processing file cleanly
             QTextStream Account(&Fileobj);  // Convert data to stream
@@ -122,7 +122,7 @@
     }
     else {
         if (!Fileobj.open(IO_ReadOnly)) // Try to open file
-            throw Genexcept("Could not open personal data file.");
+            throw Genexcept("Could not open personal data file for reading.");
         else
             Fileobj.flush();                // Begin processing file cleanly
             QTextStream Asentry(&Fileobj);  // Convert data to stream
@@ -287,7 +287,7 @@
     }
     else {
         if (!Fileobj.open(IO_WriteOnly)) // Try to open file
-            throw Genexcept("Could not write open accounting file.");
+            throw Genexcept("Could not open personal data file for writing.");
         QTextStream Asentry(&Fileobj);  // Convert data to stream
         this->saveData(Asentry);        // Pass off to do the real work
         Fileobj.close();                // Finish fileop by closing


ossp-pkg/as/as-gui/as_slot.cpp 1.66 -> 1.67

--- as_slot.cpp  2002/12/16 17:37:39     1.66
+++ as_slot.cpp  2002/12/17 14:08:33     1.67
@@ -98,7 +98,7 @@
             m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0')));
 
         // Do basic data validation to warn against missing fields
-        for (int nIter = 0; nIter <= nRows; nIter++)
+        for (int nIter = 0; nIter < nRows; nIter++)
             this->validateData(m_pMaintable->currentRow() + nIter, 0);
     }
 
@@ -137,7 +137,7 @@
             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXGUID, ".");
             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXCRC, ".");
             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXREV, ".");
-            m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXDATE, trUtf8(TITRAQ_DATEZERO));
+            m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXDATE, QDate::currentDate().toString("yyyy.MM.dd"));
             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXSTART, "00:00");
             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXFINISH, "00:00");
             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXAMOUNT, "00:00");
@@ -158,7 +158,7 @@
             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXGUID, ".");
             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXCRC, ".");
             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXREV, ".");
-            m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXDATE, trUtf8(TITRAQ_DATEZERO));
+            m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXDATE, QDate::currentDate().toString("yyyy.MM.dd"));
             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXSTART, "00:00");
             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXFINISH, "00:00");
             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXAMOUNT, "00:00");
@@ -325,7 +325,7 @@
 void Titraqform::openDoc(void)
 {
     int nResult = 0;    // Holds return value from save first messagebox
-    QString Filestring = QFileDialog::getOpenFileName("/e/dev/as", QString::null, this, trUtf8("Chooser Dialog"), trUtf8("Choose a file to open"));
+    QString Filestring = QFileDialog::getOpenFileName(m_pPrefs->getString(TITRAQ_PREFASFILE, TITRAQ_DEFASFILE), trUtf8("Accounting Data (*.as);;Text files (*.txt);;All Files (*)"), this, trUtf8("ChooserDialog"), trUtf8("Choose a file to open"), NULL, false);
 
     if (!Filestring.isEmpty()) {
         QFile Filetemp(Filestring); // File to load
@@ -458,7 +458,8 @@
     int nResult = 0; // For checking user's answer
 
     // First get the selected file name to save to
-    QString Filestring = QFileDialog::getSaveFileName(QString::null, QString::null, this);
+    QString Filestring =
+    QFileDialog::getSaveFileName(m_pPrefs->getString(TITRAQ_PREFASFILE, TITRAQ_DEFASFILE), trUtf8("Accounting Data (*.as);;Text files (*.txt);;All Files (*)"), this, trUtf8("ChooserDialog"), trUtf8("Choose a file to save"), NULL, false);
     if (!Filestring.isEmpty()) {
         *m_szFilename = Filestring;
         if (QFile::exists(*m_szFilename)) {

CVSTrac 2.0.1