Index: ossp-pkg/as/as-gui/TODO RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v rcsdiff -q -kk '-r1.10' '-r1.11' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v' 2>/dev/null --- 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 ------ Index: ossp-pkg/as/as-gui/as_assist.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v rcsdiff -q -kk '-r1.9' '-r1.10' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v' 2>/dev/null --- 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("

" - "Click this button to make a blank file." - "You can also select the New command " - "from the File menu.

"); + const char *kszFilenewtext = "

" + "Click this button to make
a " + "blank file. You can also
" + "select the New command
from " + "the File menu.

"; 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("

" - "Click this button to open a new file." - "You can also select the Open command " - "from the File menu.

"); + const char *kszFileopentext = "

" + "Click this button to open
a " + "new file. You can also select
" + "the Open command from the
" + "File menu.

"; 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("

" - "Click this button to save the file you " - "are editing. You will be prompted for a file name.\n" - "You can also select the Save command " - "from the File menu.

"); + const char *kszFilesavetext = "

" + "Click this button to save
" + "the file you are editing. You
will be " + "prompted for a file
name. You can also " + "select
the Save command from
" + "the File menu.

"; 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("

" + const char *kszAddrowtext = "

" "Click this button to add a new row." - "You can also select the Add row command " - "from the Accounting menu.

"); + "You can also select the Add command " + "from the Edit menu.

"; 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("

" + const char *kszDeleterowtext = "

" "Click this button to delete a row." - "You can also select the Delete row command " - "from the Accounting menu.

"); + "You can also select the Delete command " + "from the Edit menu.

"; 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("

" + const char *kszWritedatatext = "

" "Click this button to write out your accounting data." - "You can also select the Write data command " - "from the Accounting menu.

"); + "You can also select the Save command " + "from the File menu.

"; 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 Index: ossp-pkg/as/as-gui/as_dataop.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_dataop.cpp,v rcsdiff -q -kk '-r1.3' '-r1.4' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_dataop.cpp,v' 2>/dev/null --- 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 Index: ossp-pkg/as/as-gui/as_slot.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v rcsdiff -q -kk '-r1.8' '-r1.9' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v' 2>/dev/null --- 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 } //