OSSP CVS Repository

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

Check-in Number: 2870
Date: 2002-Nov-22 22:14:27 (local)
2002-Nov-22 21:14:27 (UTC)
User:ms
Branch:
Comment: Improved account table viewing and movement, fixed whatsthis text and images, refitted columns to new text dimensions.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/TODO      1.10 -> 1.11     4 inserted, 2 deleted
ossp-pkg/as/as-gui/as_assist.cpp      1.9 -> 1.10     31 inserted, 28 deleted
ossp-pkg/as/as-gui/as_dataop.cpp      1.3 -> 1.4     10 inserted, 1 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.8 -> 1.9     2 inserted, 2 deleted
ossp-pkg/titraq/TODO      1.10 -> 1.11     4 inserted, 2 deleted
ossp-pkg/titraq/tidatops.cpp      1.3 -> 1.4     10 inserted, 1 deleted
ossp-pkg/titraq/titassist.cpp      1.9 -> 1.10     31 inserted, 28 deleted
ossp-pkg/titraq/titslot.cpp      1.8 -> 1.9     2 inserted, 2 deleted

ossp-pkg/as/as-gui/TODO 1.10 -> 1.11

--- TODO 2002/11/22 19:42:25     1.10
+++ TODO 2002/11/22 21:14:27     1.11
@@ -16,8 +16,10 @@
 QWhatsThis::add(m_pAddbutton, trUtf8("Para soltar la pepa"));
 configure soll ueberpruefen ob libqt[-mt] threads braucht,
   dann wenn so, soll den LIBS -pthread hardgecodet haben
-Report errors in all slot code and tidatops by throwing exceptions
-Make sure that exception is rethrown from second loadData on upwards
+Ensure rethrows from second loadData on upwards
+Report errors in all slot code
+Add preferences file format XML
+Read username from Betriebsysteme
 
 Dreams
 ------


ossp-pkg/as/as-gui/as_assist.cpp 1.9 -> 1.10

--- as_assist.cpp        2002/11/22 19:42:25     1.9
+++ as_assist.cpp        2002/11/22 21:14:27     1.10
@@ -102,10 +102,11 @@
     if (m_pFilenewact == NULL) // Sanity check
         throw Genexcept("Main window file new action creation failed.");
     connect(m_pFilenewact, SIGNAL(activated()), this, SLOT(newDoc()));
-    const char *kszFilenewtext = trUtf8("<p><img source=\"filenew\"> "
-                                 "Click this button to make a <em>blank file</em>."
-                                 "You can also select the <b>New</b> command "
-                                 "from the <b>File</b> menu.</p>");
+    const char *kszFilenewtext = "<p><img source=\"filenew\"> "
+                                        "Click this button to make<br>a "
+                                        "<em>blank file</em>. You can also<br>"
+                                        "select the <b>New</b> command<br>from "
+                                        "the <b>File</b> menu.</p>";
     m_pFilenewact->setWhatsThis(kszFilenewtext);
 
     // File open action
@@ -113,10 +114,11 @@
     if (m_pFileopenact == NULL) // Sanity check
         throw Genexcept("Main window file open action creation failed.");
     connect(m_pFileopenact, SIGNAL(activated()), this, SLOT(chooseFile()));
-    const char *kszFileopentext = trUtf8("<p><img source=\"fileopen\"> "
-                                  "Click this button to open a <em>new file</em>."
-                                  "You can also select the <b>Open</b> command "
-                                  "from the <b>File</b> menu.</p>");
+    const char *kszFileopentext = "<p><img source=\"fileopen\"> "
+                                  "Click this button to open<br>a "
+                                  "<em>new file</em>. You can also select<br>"
+                                  "the <b>Open</b> command from the<br>"
+                                  "<b>File</b> menu.</p>";
     m_pFileopenact->setWhatsThis(kszFileopentext);
 
     // File save current action
@@ -124,11 +126,12 @@
     if (m_pFilesaveact == NULL) // Sanity check
         throw Genexcept("Main window file save action creation failed.");
     connect(m_pFilesaveact, SIGNAL(activated()), this, SLOT(saveFile()));
-    const char *kszFilesavetext = trUtf8("<p><img source=\"filesave\"> "
-                                  "Click this button to <em>save</em> the file you "
-                                  "are editing. You will be prompted for a file name.\n"
-                                  "You can also select the <b>Save</b> command "
-                                  "from the <b>File</b> menu.</p>");
+    const char *kszFilesavetext = "<p><img source=\"filesave\"> "
+                                  "Click this button to <em>save</em><br>"
+                                  "the file you are editing. You<br>will be "
+                                  "prompted for a file<br>name. You can also "
+                                  "select<br>the<b> Save</b> command from<br>"
+                                  "the <b>File</b> menu.</p>";
     m_pFilesaveact->setWhatsThis(kszFilesavetext);
 
     // File save selected action
@@ -155,10 +158,10 @@
     if (m_pAddrowact == NULL) // Sanity check
         throw Genexcept("Main window add row action creation failed.");
     connect(m_pAddrowact, SIGNAL(activated()), this, SLOT(addEntry()));
-    const char *kszAddrowtext = trUtf8("<p><img source=\"ossplogo\"> "
+    const char *kszAddrowtext = "<p><img source=\"ossplogo\"> "
                                 "Click this button to add a <em>new row</em>."
-                                "You can also select the <b>Add row</b> command "
-                                "from the <b>Accounting</b> menu.</p>");
+                                "You can also select the <b>Add</b> command "
+                                "from the <b>Edit</b> menu.</p>";
     m_pAddrowact->setWhatsThis(kszAddrowtext);
 
     // Delete data row action
@@ -166,10 +169,10 @@
     if (m_pDeleterowact == NULL) // Sanity check
         throw Genexcept("Main window delete row action creation failed.");
     connect(m_pDeleterowact, SIGNAL(activated()), this, SLOT(delEntry()));
-    const char *kszDeleterowtext = trUtf8("<p><img source=\"ossplogo\"> "
+    const char *kszDeleterowtext = "<p><img source=\"ossplogo\"> "
                                    "Click this button to delete a <em>row</em>."
-                                   "You can also select the <b>Delete row</b> command "
-                                   "from the <b>Accounting</b> menu.</p>");
+                                   "You can also select the <b>Delete</b> command "
+                                   "from the <b>Edit</b> menu.</p>";
     m_pDeleterowact->setWhatsThis(kszDeleterowtext);
 
     // Write data action
@@ -177,10 +180,10 @@
     if (m_pWritedataact == NULL) // Sanity check
         throw Genexcept("Main window write data action creation failed.");
     connect(m_pWritedataact, SIGNAL(activated()), this, SLOT(writeEntry()));
-    const char *kszWritedatatext = trUtf8("<p><img source=\"ossplogo\"> "
+    const char *kszWritedatatext = "<p><img source=\"ossplogo\"> "
                                    "Click this button to <em>write out</em> your accounting data."
-                                   "You can also select the <b>Write data</b> command "
-                                   "from the <b>Accounting</b> menu.</p>");
+                                   "You can also select the <b>Save</b> command "
+                                   "from the <b>File</b> menu.</p>";
     m_pWritedataact->setWhatsThis(kszWritedatatext);
 }
 
@@ -256,18 +259,18 @@
     m_pMaintable->setSelectionMode(QTable::MultiRow);   // Multi row selection
     m_pMaintable->setLeftMargin(0);             // Get rid of the vertical header
     m_pMaintable->verticalHeader()->hide();     // by hiding it with a margin of 0
-    m_pMaintable->horizontalHeader()->setResizeEnabled(false);
+    m_pMaintable->horizontalHeader()->setResizeEnabled(true);
     m_pMaintable->setColumnStretchable(g_knCols - 1, true);
     m_pMaintable->setSorting(false);
 
     // Table header row
     m_pTablehead = m_pMaintable->horizontalHeader();
     m_pMaintable->setHScrollBarMode(QScrollView::AlwaysOff);
-    m_pTablehead->setLabel(0, QObject::trUtf8("Date"), 96);
-    m_pTablehead->setLabel(1, QObject::trUtf8("Begin"), 80);
-    m_pTablehead->setLabel(2, QObject::trUtf8("End"), 80);
-    m_pTablehead->setLabel(3, QObject::trUtf8("Amount"), 52);
-    m_pTablehead->setLabel(4, QObject::trUtf8("Task"), 70);
+    m_pTablehead->setLabel(0, QObject::trUtf8("Date"), 76);
+    m_pTablehead->setLabel(1, QObject::trUtf8("Begin"), 48);
+    m_pTablehead->setLabel(2, QObject::trUtf8("End"), 48);
+    m_pTablehead->setLabel(3, QObject::trUtf8("Amount"), 48);
+    m_pTablehead->setLabel(4, QObject::trUtf8("Task"), 96);
     m_pTablehead->setLabel(5, QObject::trUtf8("Remark"));
 
     m_pPackagelayout->addWidget(m_pMaintable);  // Finally add the damn table


ossp-pkg/as/as-gui/as_dataop.cpp 1.3 -> 1.4

--- as_dataop.cpp        2002/11/22 19:49:19     1.3
+++ as_dataop.cpp        2002/11/22 21:14:27     1.4
@@ -29,10 +29,14 @@
 void Titraqform::loadData(QTextStream &Tstream)
 {
     bool bValid = true; // Used to warn on invalid accounting data
+    int i = 0;          // Iterator used in loop and also as a count
+
+    // Optimize viewing by repainting cells only once after processing
+    m_pMaintable->setUpdatesEnabled(false);
 
     // Set the table text by linewise reading from the input stream
     // and parsing date, time, account, and other columns out of it
-    for (int i = 0; !Tstream.atEnd(); i++) {
+    while (!Tstream.atEnd()) {
         QString Date, Account, Amount, Remark;      // Fields of a valid AS file
 
         QString Temp;                               // Used for linewise editing
@@ -66,8 +70,13 @@
         Remark = Asline.read(); // Copy the remark field
         if (Remark != NULL)
             m_pMaintable->setText(i, 5, Remark);
+
+        i++; // The big increment
     }
 
+    m_pMaintable->setUpdatesEnabled(true);  // Repaint all
+    m_pMaintable->setNumRows(i);    // Trim unneeded rows
+    m_pMaintable->repaint();        // Force repaint
     m_pRemark->setText(trUtf8("Loaded text goes here"));
     m_pRemark->setEdited(false);    // Reset widget
 


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

--- as_slot.cpp  2002/11/22 19:42:25     1.8
+++ as_slot.cpp  2002/11/22 21:14:27     1.9
@@ -52,8 +52,8 @@
 void Titraqform::newDoc(void)
 {
     // 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
+    m_pMaintable->setNumRows(0);    // Get rid of any data in table
+    m_pMaintable->setNumRows(1);    // ...and then add them back in
 }
 
 //





CVSTrac 2.0.1