Index: ossp-pkg/as/as-gui/TODO RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v rcsdiff -q -kk '-r1.41' '-r1.42' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v' 2>/dev/null --- TODO 2002/12/13 11:46:38 1.41 +++ TODO 2002/12/13 17:44:42 1.42 @@ -41,6 +41,7 @@ Preserve main window geo and dock pos with << operators Make edit control window dockable anywhere Give configure a location to place and look for conf file +Add customizable column ordering by click and drag Beim Editmodus --------------- 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.64' '-r1.65' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v' 2>/dev/null --- as_assist.cpp 2002/12/12 21:24:07 1.64 +++ as_assist.cpp 2002/12/13 17:44:42 1.65 @@ -675,9 +675,10 @@ throw Genexcept("Main window start time creation failed."); // Spew errors // Configure attributes + m_pStarttime->setDisplay(QTimeEdit::Hours | QTimeEdit::Minutes); m_pStarttime->setAutoAdvance(true); - m_pEditlayout->addWidget(m_pStarttime); // Finally add the start editor + m_pEditlayout->addWidget(m_pStarttime); // Finally add the start editor QToolTip::add(m_pStarttime, trUtf8("Task Starting Time")); // Whatsthis info for the time editor @@ -688,10 +689,14 @@ // Make the end time selector m_pEndtime = new QTimeEdit(m_pCenframe, "EndTime"); - if (m_pEndtime == NULL) // Sanity check - throw Genexcept("Main window end time creation failed."); // Spew errors + if (m_pEndtime == NULL) // Sanity check + throw Genexcept("Main window end time creation failed."); // Spew errors - m_pEditlayout->addWidget(m_pEndtime); // Finally add the end editor + // Configure attributes + m_pEndtime->setDisplay(QTimeEdit::Hours | QTimeEdit::Minutes); + m_pEndtime->setAutoAdvance(true); + + m_pEditlayout->addWidget(m_pEndtime); // Finally add the end editor QToolTip::add(m_pEndtime, trUtf8("Task Ending Time")); // Whatsthis info for the time editor 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.56' '-r1.57' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v' 2>/dev/null --- as_slot.cpp 2002/12/13 11:46:38 1.56 +++ as_slot.cpp 2002/12/13 17:44:42 1.57 @@ -114,10 +114,10 @@ m_pMaintable->ensureCellVisible(m_pMaintable->numRows() - 1, 0); // Scroll please } -// updateDate(*m_pDatezero); -// updateStart(QTime::QTime(0, 0)); -// updateFinish(QTime::QTime(0, 0)); -// updateAmount(trUtf8("00:00")); + updateDate(*m_pDatezero); + updateStart(QTime::QTime(0, 0)); + updateFinish(QTime::QTime(0, 0)); + updateAmount(trUtf8("00:00")); // char szGuitext[37]; // uuid_t Guid; @@ -514,33 +514,32 @@ // Reset the edition state member m_pMaintable->setEdition(); - if (!Textstat.isEmpty()) - m_pStatusedit->setText(Textstat); - if (!Textline.isEmpty()) - m_pLineedit->setText(Textline); - if (!Textuser.isEmpty()) - m_pUseredit->setText(Textuser); - if (!Textguid.isEmpty()) - m_pGuidedit->setText(Textguid); - if (!Textcrc.isEmpty()) - m_pCrcedit->setText(Textcrc); - if (!Textrev.isEmpty()) - m_pRevedit->setText(Textrev); + // Set text of member edit controls + m_pStatusedit->setText(Textstat); + m_pLineedit->setText(Textline); + m_pUseredit->setText(Textuser); + m_pGuidedit->setText(Textguid); + m_pCrcedit->setText(Textcrc); + m_pRevedit->setText(Textrev); + + m_pAmount->setText(Textamount); +// Texttask.remove(0, Shorten.search(Texttask) + 1); // Strip leading slash + m_pTasks->setCurrentText(Texttask); + m_pRemark->setText(Textremark); + + // Members not suitable for empty string text if (!Textdate.isEmpty()) m_pDateedit->setDate(QDate::fromString(Textdate, Qt::ISODate)); + else + m_pDateedit->setDate(*m_pDatezero); if (!Textstart.isEmpty()) m_pStarttime->setTime(QTime::fromString(Textstart, Qt::ISODate)); + else + m_pStarttime->setTime(QTime::QTime(0, 0)); if (!Textfinish.isEmpty()) m_pEndtime->setTime(QTime::fromString(Textfinish, Qt::ISODate)); - if (!Textamount.isNull()) - m_pAmount->setText(Textamount); - if (!Texttask.isNull()) { // Process task combo box to compress text length -// Texttask.remove(0, Shorten.search(Texttask) + 1); // Strip leading slash - m_pTasks->setCurrentText(Texttask); - } - - if (!Textremark.isNull()) - m_pRemark->setText(Textremark); + else + m_pEndtime->setTime(QTime::QTime(0, 0)); } // @@ -607,7 +606,7 @@ // void Titraqform::updateStart(const QTime &Startup) { - m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXSTART, Startup.toString(Qt::ISODate)); + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXSTART, Startup.toString("hh:mm")); } // @@ -615,7 +614,7 @@ // void Titraqform::updateFinish(const QTime &Finishup) { - m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXFINISH, Finishup.toString(Qt::ISODate)); + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXFINISH, Finishup.toString("hh:mm")); } // Index: ossp-pkg/as/as-gui/as_table.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_table.cpp,v rcsdiff -q -kk '-r1.9' '-r1.10' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_table.cpp,v' 2>/dev/null --- as_table.cpp 2002/12/12 16:20:15 1.9 +++ as_table.cpp 2002/12/13 17:44:42 1.10 @@ -44,7 +44,7 @@ ((QMouseEvent *)pEvent)->button() == QMouseEvent::MidButton) return true; else if (pEvent->type() == QEvent::KeyPress) { - if (((QKeyEvent *)pEvent)->key() == Qt::Key_Tab) { // Handle tab key + if (((QKeyEvent *)pEvent)->key() == Qt::Key_Tab) { // Handle tab key if (this->getEdition() >= 0) { int nColadvance = ((currentColumn() + 1) % TITRAQ_IDXTAIL); if (nColadvance == 0) // Advance the column and possibly the row too @@ -52,6 +52,20 @@ else this->setCurrentCell(currentRow(), nColadvance); this->setReadOnly(false); + this->editCell(currentRow(), currentColumn()); + this->setEdition(currentColumn()); + this->setReadOnly(true); + } + return true; // Handled the tab key event and cancel its progress + } + else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Backtab) { // Handle shift tab key + if (this->getEdition() >= 0) { + int nColadvance = ((currentColumn() - 1) % TITRAQ_IDXTAIL); + if (nColadvance == 0) // Advance the column and possibly the row too + this->setCurrentCell(currentRow() - 1, nColadvance); + else + this->setCurrentCell(currentRow(), nColadvance); + this->setReadOnly(false); this->editCell(currentRow(), currentColumn()); this->setEdition(currentColumn()); this->setReadOnly(true);