Index: ossp-pkg/as/as-gui/Makefile.in RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/Makefile.in,v rcsdiff -q -kk '-r1.16' '-r1.17' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/Makefile.in,v' 2>/dev/null --- Makefile.in 2002/11/24 18:02:43 1.16 +++ Makefile.in 2002/11/25 15:45:04 1.17 @@ -65,9 +65,9 @@ TARGET_PROGS = titraq TARGET_MANS = titraq.1 titraq.conf.5 -SRCS = main.cpp titraq.cpp titassist.cpp titslot.cpp tidatops.cpp titrex.cpp generic.cpp titprefs.cpp titraq_version.c +SRCS = main.cpp titraq.cpp titassist.cpp titslot.cpp tidatops.cpp titrex.cpp generic.cpp titamount.cpp titprefs.cpp titraq_version.c -OBJS = main.o titraq.o titassist.o titslot.o tidatops.o titrex.o generic.o titprefs.o titraq_version.o +OBJS = main.o titraq.o titassist.o titslot.o tidatops.o titrex.o generic.o titamount.o titprefs.o titraq_version.o GRAFX = gfx/ossplogo.xpm Index: ossp-pkg/as/as-gui/TODO RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v rcsdiff -q -kk '-r1.15' '-r1.16' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v' 2>/dev/null --- TODO 2002/11/25 11:23:35 1.15 +++ TODO 2002/11/25 15:45:05 1.16 @@ -27,6 +27,7 @@ Review destruction of all members, compare with setupPrefs Memory optimization needed in tidataops QTable::valueChanged(int row, int col) should be responsible for dirty flag +Remove magic numbers from cpp files to titconst like TITRAQ_INDEXREMARK Dreams ------ Index: ossp-pkg/as/as-gui/as_amount.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_amount.h,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/as/as-gui/as_amount.h,v' | diff -u /dev/null - -L'ossp-pkg/as/as-gui/as_amount.h' 2>/dev/null --- ossp-pkg/as/as-gui/as_amount.h +++ - 2026-04-30 00:46:12.078811224 +0200 @@ -0,0 +1,15 @@ +#ifndef AMOUNTBOX_H +#define AMOUNTBOX_H + +#include + + +class AmountBox : public QSpinBox +{ +public: + AmountBox(int nMinval, int nMaxval, int nStep = 1, QWidget *pParent = 0, const char *szName = 0) : QSpinBox(nMinval, nMaxval, nStep, pParent, szName) {}; + void setText(const QString &); // Sets a text formatted representation + QString text(void) const; // Return a text formatted representation +}; + +#endif // AMOUNTBOX_H 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.15' '-r1.16' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v' 2>/dev/null --- as_assist.cpp 2002/11/25 11:40:07 1.15 +++ as_assist.cpp 2002/11/25 15:45:06 1.16 @@ -15,8 +15,9 @@ #include // User interface -#include "titraq.h" +#include "titraq.h" // Main classes #include "titrex.h" // Exception classes +#include "titamount.h" // AmountBox class // Icon pixel maps #include "gfx/filenew.xpm" // static const char *s_kpcFilenew_xpm[] @@ -345,8 +346,13 @@ m_pDateedit = new QDateEdit(Sylvestre, m_pCenframe, "Date"); if (m_pDateedit == NULL) // Sanity check throw Genexcept("Main window date edit creation failed."); // Spew errors - m_pDatelayout->addWidget(m_pDateedit); // Finally add the date editor + // Configure attributes + m_pDateedit->setOrder(QDateEdit::YMD); + m_pDateedit->setAutoAdvance(true); + m_pDateedit->setSeparator(trUtf8(".")); + + m_pDatelayout->addWidget(m_pDateedit); // Finally add the date editor QToolTip::add(m_pDateedit, trUtf8("Task Date")); // Whatsthis info for the date editor @@ -359,8 +365,11 @@ m_pStarttime = new QTimeEdit(QTime::currentTime(), m_pCenframe, "StartTime"); if (m_pStarttime == NULL) // Sanity check throw Genexcept("Main window start time creation failed."); // Spew errors - m_pDatelayout->addWidget(m_pStarttime); // Finally add the start editor + // Configure attributes + m_pStarttime->setAutoAdvance(true); + + m_pDatelayout->addWidget(m_pStarttime); // Finally add the start editor QToolTip::add(m_pStarttime, trUtf8("Task Starting Time")); // Whatsthis info for the time editor @@ -373,8 +382,8 @@ m_pEndtime = new QTimeEdit(QTime::currentTime(), m_pCenframe, "EndTime"); if (m_pEndtime == NULL) // Sanity check throw Genexcept("Main window end time creation failed."); // Spew errors - m_pDatelayout->addWidget(m_pEndtime); // Finally add the end editor + m_pDatelayout->addWidget(m_pEndtime); // Finally add the end editor QToolTip::add(m_pEndtime, trUtf8("Task Ending Time")); // Whatsthis info for the time editor @@ -384,11 +393,16 @@ QWhatsThis::add(m_pEndtime, kszEndtime); // Make the amount selector - m_pAmount = new QSpinBox(m_pCenframe, "Amount"); + m_pAmount = new AmountBox(TITRAQ_MINAMOUNT, TITRAQ_MAXAMOUNT, TITRAQ_STEPAMOUNT, m_pCenframe, "Amount"); if (m_pAmount == NULL) // Sanity check throw Genexcept("Main window amount creation failed."); // Spew errors - m_pDatelayout->addWidget(m_pAmount); // Finally add the amount editor + // Configure attributes + m_pAmount->setButtonSymbols(QSpinBox::PlusMinus); + m_pAmount->setSuffix(trUtf8(" Minutes")); + m_pAmount->setSpecialValueText(trUtf8("In progress")); + + m_pDatelayout->addWidget(m_pAmount); // Finally add the amount editor QToolTip::add(m_pAmount, trUtf8("Task Amount")); // Whatsthis info for the amount editor @@ -437,6 +451,13 @@ " this line control and typing the remarks you" " have about the task."); QWhatsThis::add(m_pRemark, kszRemarktext); + +// // Signals +// m_pDateedit->valueChanged(const QDate &date); +// m_pStarttime->valueChanged(const QTime &time); +// m_pEndtime->valueChanged(const QTime &time); +// m_pAmount->valueChanged(int value); +// m_pTasks->textChanged(const QString &string); } // Index: ossp-pkg/as/as-gui/as_const.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_const.h,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_const.h,v' 2>/dev/null --- as_const.h 2002/11/24 20:39:32 1.2 +++ as_const.h 2002/11/25 15:45:06 1.3 @@ -11,3 +11,16 @@ #define TITRAQ_DEFREMOTELOG "no" #define TITRAQ_PREFLOCALLOG "loglocal" #define TITRAQ_DEFLOCALLOG "no" + +// Indexes of table columns +#define TITRAQ_INDEXDATE 0 +#define TITRAQ_INDEXSTART 1 +#define TITRAQ_INDEXFINISH 2 +#define TITRAQ_INDEXAMOUNT 3 +#define TITRAQ_INDEXTASK 4 +#define TITRAQ_INDEXREMARK 5 + +// Values +#define TITRAQ_MAXAMOUNT 960 // Maximum valid amount +#define TITRAQ_MINAMOUNT -1 // Minimum valid amount +#define TITRAQ_STEPAMOUNT 15 // Line step interval Index: ossp-pkg/as/as-gui/as_gui.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_gui.h,v rcsdiff -q -kk '-r1.23' '-r1.24' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_gui.h,v' 2>/dev/null --- as_gui.h 2002/11/25 11:40:07 1.23 +++ as_gui.h 2002/11/25 15:45:06 1.24 @@ -16,8 +16,9 @@ #include #include -#include "titprefs.h" -#include "titconst.h" +#include "titconst.h" // For general constants +#include "titprefs.h" // For class Preferences +#include "titamount.h" // For class AmountBox // Intentional no operation #define TITRAQ_NOP ((void)0) @@ -66,7 +67,7 @@ QDateEdit *m_pDateedit; QTimeEdit *m_pStarttime; QTimeEdit *m_pEndtime; - QSpinBox *m_pAmount; + AmountBox *m_pAmount; QComboBox *m_pTasks; QLineEdit *m_pRemark; 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.12' '-r1.13' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v' 2>/dev/null --- as_slot.cpp 2002/11/25 11:40:07 1.12 +++ as_slot.cpp 2002/11/25 15:45:06 1.13 @@ -1,5 +1,7 @@ // Qt headers #include +#include +#include // User interface #include "titraq.h" // Main classes @@ -189,10 +191,22 @@ // // Update the edit controls contents // -void Titraqform::updEdit(int, int) +void Titraqform::updEdit(int nRow, int nCol) { - Prototype Unimp; - Unimp.doMbox(); + QString Tasktext; // For searching through prefixed task text + QRegExp Shorten("/(\\w+)$"); // For stripping prefix off the current task + + m_pDateedit->setDate(QDate::fromString(m_pMaintable->text(nRow, TITRAQ_INDEXDATE), Qt::ISODate)); + m_pStarttime->setTime(QTime::fromString(m_pMaintable->text(nRow, TITRAQ_INDEXAMOUNT), Qt::ISODate)); + m_pEndtime->setTime(QTime::fromString(m_pMaintable->text(nRow, TITRAQ_INDEXAMOUNT), Qt::ISODate)); + m_pAmount->setText(m_pMaintable->text(nRow, TITRAQ_INDEXAMOUNT)); + + // Process the task combo box to compress text length + Tasktext = m_pMaintable->text(nRow, TITRAQ_INDEXTASK); + Tasktext.remove(0, Shorten.search(Tasktext) + 1); // Add one to strip leading slash + + m_pTasks->setCurrentText(Tasktext); + m_pRemark->setText(m_pMaintable->text(nRow, TITRAQ_INDEXREMARK)); } // Index: ossp-pkg/as/as-gui/as_tableitem.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_tableitem.h,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_tableitem.h,v' 2>/dev/null --- as_tableitem.h 2002/11/25 11:23:35 1.2 +++ as_tableitem.h 2002/11/25 15:45:05 1.3 @@ -1,5 +1,7 @@ +#ifndef RTTABLEITEM_H +#define RTTABLEITEM_H + #include -#include class RtTableItem : public QTableItem @@ -12,3 +14,5 @@ private: int m_nOwnalign; }; + +#endif // RTTABLEITEM_H