Index: ossp-pkg/as/as-gui/TODO RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v rcsdiff -q -kk '-r1.82' '-r1.83' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v' 2>/dev/null --- TODO 2003/02/08 18:10:09 1.82 +++ TODO 2003/02/11 14:19:57 1.83 @@ -34,6 +34,7 @@ Verify routine consistently scans all fields on load and new entries Remove all exception raises from slot code New doc, new entry, change text in table, close... No verify save! +Might not need classes Amount and Tableitem at all Bugs (? = unverified) --------------------- @@ -50,6 +51,7 @@ Zeitabzug moeglicherweise falsch wenn 23:00-01:00=? Statustext soll nicht neben Pixmaps erscheinen Loesch mal alle Text vom Task Editctrl, dann drueck mal Obentaste +Memory leak in vector as_panel Nice to have ------------ @@ -68,8 +70,6 @@ Screwey user notes ;-) ---------------------- -rse: use left alignment for Task field because accounts are hierarchical left-to-right anyway -rse: Amount field: HH:MM in list, but "MM minutes" at bottom -> inconsistent, so use "HH:MM" on bottom cs: 'd' should not delete at once but flag the record as deleted. Use '$' to sync (similar to mutt) cs: first 'TAB' should complete (if possible), second 'TAB' should open selection box (similar to bash) cs: line numberscould be referenced when entering accounts ala bash history ('!4' = record #4) 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.98' '-r1.99' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v' 2>/dev/null --- as_assist.cpp 2003/02/06 15:55:01 1.98 +++ as_assist.cpp 2003/02/11 14:19:57 1.99 @@ -800,7 +800,17 @@ QToolTip::add(m_pEndtime, trUtf8("Task Ending Time")); m_pEditlayout->addWidget(m_pEndtime); // Finally add the end editor - // Make the amount selector + // Make the total time amount selector + m_pAmount = new QTimeEdit(m_pCenframe, "TotalAmount"); + if (m_pAmount == NULL) // Sanity check + throw Genexcept("Main window amount creation failed."); // Spew errors + + // Configure attributes + m_pAmount->setDisplay(QTimeEdit::Hours | QTimeEdit::Minutes); + m_pAmount->setAutoAdvance(true); + m_pAmount->setEnabled(false); + +/* // Make the amount selector 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 @@ -809,7 +819,7 @@ m_pAmount->setButtonSymbols(QSpinBox::PlusMinus); m_pAmount->setSuffix(trUtf8(" Mins")); m_pAmount->setEnabled(false); -// m_pAmount->setSpecialValueText(trUtf8("In progress")); +// m_pAmount->setSpecialValueText(trUtf8("In progress"));*/ // Whatsthis info for the amount editor const char *kszAmount = "Edit the task amount by clicking on " @@ -880,7 +890,7 @@ connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), this, SLOT(validateData(void))); connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), this, SLOT(validateData(void))); connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), this, SLOT(validateData(void))); - connect(m_pAmount, SIGNAL(valueChanged(const QString &)), this, SLOT(validateData(void))); + connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), this, SLOT(validateData(void))); connect(m_pTasks, SIGNAL(textChanged(const QString &)), this, SLOT(validateData(void))); connect(m_pRemark, SIGNAL(textChanged(const QString &)), this, SLOT(validateData(void))); @@ -893,7 +903,7 @@ connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), this, SLOT(updateDate(const QDate &))); connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), this, SLOT(updateStart(const QTime &))); connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), this, SLOT(updateFinish(const QTime &))); - connect(m_pAmount, SIGNAL(valueChanged(const QString &)), this, SLOT(updateAmount(const QString &))); + connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), this, SLOT(updateAmount(const QTime &))); connect(m_pTasks, SIGNAL(textChanged(const QString &)), this, SLOT(updateTask(const QString &))); connect(m_pRemark, SIGNAL(textChanged(const QString &)), this, SLOT(updateRemark(const QString &))); @@ -902,7 +912,7 @@ connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), this, SLOT(calcCrc(void))); connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), this, SLOT(calcCrc(void))); connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), this, SLOT(calcCrc(void))); - connect(m_pAmount, SIGNAL(valueChanged(const QString &)), this, SLOT(calcCrc(void))); + connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), this, SLOT(calcCrc(void))); connect(m_pTasks, SIGNAL(textChanged(const QString &)), this, SLOT(calcCrc(void))); connect(m_pRemark, SIGNAL(textChanged(const QString &)), this, SLOT(calcCrc(void))); } 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.48' '-r1.49' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_const.h,v' 2>/dev/null --- as_const.h 2003/02/04 19:30:31 1.48 +++ as_const.h 2003/02/11 14:19:57 1.49 @@ -102,13 +102,13 @@ #define TITRAQ_PREFREVCOLWIDTH "revcolwidth" #define TITRAQ_DEFREVCOLWIDTH 32 #define TITRAQ_PREFDCOLWIDTH "datecolwidth" -#define TITRAQ_DEFDCOLWIDTH 96 +#define TITRAQ_DEFDCOLWIDTH 98 #define TITRAQ_PREFSTARTCOLWIDTH "startcolwidth" -#define TITRAQ_DEFSTARTCOLWIDTH 80 +#define TITRAQ_DEFSTARTCOLWIDTH 60 #define TITRAQ_PREFFCOLWIDTH "finishcolwidth" -#define TITRAQ_DEFFCOLWIDTH 80 +#define TITRAQ_DEFFCOLWIDTH 60 #define TITRAQ_PREFACOLWIDTH "amountcolwidth" -#define TITRAQ_DEFACOLWIDTH 72 +#define TITRAQ_DEFACOLWIDTH 60 #define TITRAQ_PREFTCOLWIDTH "taskcolwidth" #define TITRAQ_DEFTCOLWIDTH 148 #define TITRAQ_PREFREMCOLWIDTH "remarkcolwidth" 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.45' '-r1.46' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_dataop.cpp,v' 2>/dev/null --- as_dataop.cpp 2003/02/06 15:27:39 1.45 +++ as_dataop.cpp 2003/02/11 14:19:57 1.46 @@ -262,7 +262,9 @@ if (!Account.isEmpty()) { QTableItem *pOld = m_pMaintable->item(nIter, TITRAQ_IDXTASK); delete(pOld); // Get rid of the old before going with the new - m_pMaintable->setItem(nIter, TITRAQ_IDXTASK, new RtTableItem(m_pMaintable, QTableItem::WhenCurrent, Account)); + RtTableItem *pSwapitem = new RtTableItem(m_pMaintable, QTableItem::WhenCurrent, Account); + pSwapitem->setAlignment(AlignLeft | AlignVCenter); + m_pMaintable->setItem(nIter, TITRAQ_IDXTASK, pSwapitem); } else bValid = false; @@ -524,7 +526,9 @@ // Change out old item and replace with new task data pItem = m_pMaintable->item(nCurrentrow + nIter, TITRAQ_IDXTASK); delete(pItem); // Get rid of the old before going with the new - m_pMaintable->setItem(nCurrentrow + nIter, TITRAQ_IDXTASK, new RtTableItem(m_pMaintable, QTableItem::WhenCurrent, Task)); + RtTableItem *pSwapitem = new RtTableItem(m_pMaintable, QTableItem::WhenCurrent, Task); + pSwapitem->setAlignment(AlignLeft | AlignVCenter); + m_pMaintable->setItem(nCurrentrow + nIter, TITRAQ_IDXTASK, pSwapitem); // Continue with field processing business as usual m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXREMARK, Remark.simplifyWhiteSpace()); 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.71' '-r1.72' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_gui.h,v' 2>/dev/null --- as_gui.h 2003/02/06 15:55:01 1.71 +++ as_gui.h 2003/02/11 14:19:57 1.72 @@ -222,7 +222,8 @@ Daydatedit *m_pDateedit; // Control to edit date QTimeEdit *m_pStarttime; // Control to edit start time QTimeEdit *m_pEndtime; // Control to edit finish time - AmountBox *m_pAmount; // Control to edit total time + QTimeEdit *m_pAmount; // Control to edit total time +// AmountBox *m_pAmount; // Control to edit total time QComboBox *m_pTasks; // Control to choose a task QLineEdit *m_pRemark; // Control to edit remark @@ -263,7 +264,7 @@ void updateDate(const QDate &); // Update date column void updateStart(const QTime &); // Update start column void updateFinish(const QTime &); // Update finish column - void updateAmount(const QString &); // Update amount column + void updateAmount(const QTime &); // Update amount column void updateTask(const QString &); // Update task column void updateRemark(const QString &); // Update remark column void confirmEdit(void); // Confirm whole row edition Index: ossp-pkg/as/as-gui/as_panel.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_panel.cpp,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_panel.cpp,v' 2>/dev/null --- as_panel.cpp 2003/02/10 22:46:06 1.2 +++ as_panel.cpp 2003/02/11 14:19:57 1.3 @@ -71,47 +71,6 @@ m_pVlayout = new QVBoxLayout(this, 11, 6, "Formlayout"); m_pTabselect = new QTabWidget(this, "Tabselector"); - m_pGeneralpage = new QWidget(m_pTabselect, "Generalpage"); - m_pGenlayout = new QHBoxLayout(m_pGeneralpage, 11, 6, "Genlayout"); - m_pGenbox = new QGroupBox(m_pGeneralpage, "Groupboxlayout"); - - m_pGenbox->setColumnLayout(0, Qt::Vertical); - m_pGenbox->layout()->setSpacing(6); - m_pGenbox->layout()->setMargin(11); - m_pGenboxlay = new QHBoxLayout(m_pGenbox->layout()); - m_pGenboxlay->setAlignment(Qt::AlignTop); - - // Start of text entry preferences UI pieces - m_pGeninner = new QGridLayout(0, 6, 2, 0, 12, "Innergrid"); - m_pAcctlabel = new QLabel(m_pGenbox, "Accfilelabel"); - m_pGeninner->addWidget(m_pAcctlabel, 0, 0); - m_pAcctline = new QLineEdit(m_pGenbox, "Accountline"); - m_pGeninner->addWidget(m_pAcctline, 0, 1); - m_pEventlabel = new QLabel(m_pGenbox, "Evntfilelabel"); - m_pGeninner->addWidget(m_pEventlabel, 1, 0); - m_pEventline = new QLineEdit(m_pGenbox, "Eventline"); - m_pGeninner->addWidget(m_pEventline, 1, 1); - m_pUserlabel = new QLabel(m_pGenbox, "Userlabel"); - m_pGeninner->addWidget(m_pUserlabel, 2, 0); - m_pUserline = new QLineEdit(m_pGenbox, "Userline"); - m_pGeninner->addWidget(m_pUserline, 2, 1); - m_pHomelabel = new QLabel(m_pGenbox, "Homelabel"); - m_pGeninner->addWidget(m_pHomelabel, 3, 0); - m_pHomeline = new QLineEdit(m_pGenbox, "Homeline"); - m_pGeninner->addWidget(m_pHomeline, 3, 1); - m_pCorbalabel = new QLabel(m_pGenbox, "Corbalabel"); - m_pGeninner->addWidget(m_pCorbalabel, 4, 0); - m_pCorbaline = new QLineEdit(m_pGenbox, "Corbaline"); - m_pGeninner->addWidget(m_pCorbaline, 4, 1); - m_pSoaplabel = new QLabel(m_pGenbox, "Soaplabel"); - m_pGeninner->addWidget(m_pSoaplabel, 5, 0); - m_pSoapline = new QLineEdit(m_pGenbox, "Soapline"); - m_pGeninner->addWidget(m_pSoapline, 5, 1); - m_pGenboxlay->addLayout(m_pGeninner); - - m_pGenlayout->addWidget(m_pGenbox); - m_pTabselect->insertTab(m_pGeneralpage, ""); - // Start of style chooser UI pieces m_pBoolpage = new QWidget(m_pTabselect, "Tabpage"); m_pBoolayout = new QHBoxLayout(m_pBoolpage, 11, 6, "Genlayout"); @@ -171,6 +130,74 @@ m_pBoolayout->addWidget(m_pSwitchgroup); m_pTabselect->insertTab(m_pBoolpage, ""); + + // Start of paths page UI pieces + m_pGeneralpage = new QWidget(m_pTabselect, "Generalpage"); + m_pGenlayout = new QHBoxLayout(m_pGeneralpage, 11, 6, "Genlayout"); + m_pGenbox = new QGroupBox(m_pGeneralpage, "Groupboxlayout"); + + m_pGenbox->setColumnLayout(0, Qt::Vertical); + m_pGenbox->layout()->setSpacing(6); + m_pGenbox->layout()->setMargin(11); + m_pGenboxlay = new QHBoxLayout(m_pGenbox->layout()); + m_pGenboxlay->setAlignment(Qt::AlignTop); + + // Start of path text entry preferences UI pieces + m_pGeninner = new QGridLayout(0, 4, 2, 0, 16, "Innergrid"); + m_pAcctlabel = new QLabel(m_pGenbox, "Accfilelabel"); + m_pGeninner->addWidget(m_pAcctlabel, 0, 0); + m_pAcctline = new QLineEdit(m_pGenbox, "Accountline"); + m_pGeninner->addWidget(m_pAcctline, 0, 1); + m_pEventlabel = new QLabel(m_pGenbox, "Evntfilelabel"); + m_pGeninner->addWidget(m_pEventlabel, 1, 0); + m_pEventline = new QLineEdit(m_pGenbox, "Eventline"); + m_pGeninner->addWidget(m_pEventline, 1, 1); + m_pUserlabel = new QLabel(m_pGenbox, "Userlabel"); + m_pGeninner->addWidget(m_pUserlabel, 2, 0); + m_pUserline = new QLineEdit(m_pGenbox, "Userline"); + m_pGeninner->addWidget(m_pUserline, 2, 1); + m_pHomelabel = new QLabel(m_pGenbox, "Homelabel"); + m_pGeninner->addWidget(m_pHomelabel, 3, 0); + m_pHomeline = new QLineEdit(m_pGenbox, "Homeline"); + m_pGeninner->addWidget(m_pHomeline, 3, 1); + m_pGenboxlay->addLayout(m_pGeninner); + + m_pGenlayout->addWidget(m_pGenbox); + m_pTabselect->insertTab(m_pGeneralpage, ""); + + // Start of remote page UI pieces + m_pRemotepage = new QWidget(m_pTabselect, "Remotepage"); + m_pRemlayout = new QHBoxLayout(m_pRemotepage, 11, 6, "Remlayout"); + m_pRembox = new QGroupBox(m_pRemotepage, "Remoteboxlayout"); + + m_pRembox->setColumnLayout(0, Qt::Vertical); + m_pRembox->layout()->setSpacing(6); + m_pRembox->layout()->setMargin(11); + m_pRemboxlay = new QHBoxLayout(m_pRembox->layout()); + m_pRemboxlay->setAlignment(Qt::AlignTop); + + // Start of RPC preferences UI pieces + m_pReminner = new QGridLayout(0, 5, 2, 0, 12, "Innergrid"); + m_pCorbalabel = new QLabel(m_pRembox, "Corbalabel"); + m_pReminner->addWidget(m_pCorbalabel, 0, 0); + m_pCorbaline = new QLineEdit(m_pRembox, "Corbaline"); + m_pReminner->addWidget(m_pCorbaline, 0, 1); + m_pCorbacheck = new QCheckBox(m_pRembox, "Corbacheckbox"); + m_pReminner->addWidget(m_pCorbacheck, 1, 1); + QSpacerItem *Spacey = new QSpacerItem(6, 12, QSizePolicy::Minimum, QSizePolicy::Minimum); + m_pReminner->addItem(Spacey, 2, 0); + m_pSoaplabel = new QLabel(m_pRembox, "Soaplabel"); + m_pReminner->addWidget(m_pSoaplabel, 3, 0); + m_pSoapline = new QLineEdit(m_pRembox, "Soapline"); + m_pReminner->addWidget(m_pSoapline, 3, 1); + m_pSoapcheck = new QCheckBox(m_pRembox, "Corbacheckbox"); + m_pReminner->addWidget(m_pSoapcheck, 4, 1); + m_pRemboxlay->addLayout(m_pReminner); + + m_pRemlayout->addWidget(m_pRembox); + m_pTabselect->insertTab(m_pRemotepage, ""); + + // Finally add the damn pages to the tab selector widget! m_pVlayout->addWidget(m_pTabselect); // Start of bottom buttons for aknowlegement and commital of changes @@ -210,8 +237,9 @@ { this->setCaption(tr("AS Applicate Preferences", "Personal preferences are persistent across sessions")); - m_pTabselect->changeTab(m_pGeneralpage, tr("General")); m_pTabselect->changeTab(m_pBoolpage, tr("Styles")); + m_pTabselect->changeTab(m_pGeneralpage, tr("Paths")); + m_pTabselect->changeTab(m_pRemotepage, tr("Remote")); m_pOkaybutton->setText(tr("Okay", "Comment for Okaybutton")); QToolTip::add(m_pOkaybutton, tr("Applies and saves changes", "Comment for tooltip Okaybutton")); @@ -225,20 +253,30 @@ QToolTip::add(m_pCancelbutton, tr("Cancel any changes", "Comment for toolTip Cancelbutton")); QWhatsThis::add(m_pCancelbutton, tr("The cancel button cancels any changes", "Comment for whatsThis Cancelbutton")); - m_pGenbox->setTitle(tr("Names and numbers", "Comment for Genbox")); + m_pGenbox->setTitle(tr("File and directory paths", "Comment for Genbox")); m_pAcctlabel->setText(tr("Accounts path", "Comment for Acctlabel")); m_pEventlabel->setText(tr("Events path", "Comment for Eventlabel")); m_pUserlabel->setText(tr("User name", "Comment for Userlabel")); m_pHomelabel->setText(tr("Home directory", "Comment for Homelabel")); - m_pCorbalabel->setText(tr("CORBA host", "Comment for Corbalabel")); - m_pSoaplabel->setText(tr("SOAP host", "Comment for Soaplabel")); QToolTip::add(m_pAcctline, tr("The accounts file pathname", "Comment for toolTip Acctline")); QToolTip::add(m_pEventline, tr("The events file pathname", "Comment for toolTip Eventline")); QToolTip::add(m_pUserline, tr("The user name", "Comment for toolTip Userline")); QToolTip::add(m_pHomeline, tr("The home directory", "Comment for toolTip Homeline")); + + m_pRembox->setTitle(tr("Remote host names", "Comment for Genbox")); + m_pCorbalabel->setText(tr("CORBA host", "Comment for Corbalabel")); + m_pSoaplabel->setText(tr("SOAP host", "Comment for Soaplabel")); QToolTip::add(m_pCorbaline, tr("The CORBA host name", "Comment for toolTip Corbaline")); QToolTip::add(m_pSoapline, tr("The SOAP host name", "Comment for toolTip Soapline")); + m_pCorbacheck->setText(tr("Enable IIOP transmission", "Comment for Corbacheck")); + QToolTip::add(m_pCorbacheck, tr("Will enable transmission over IIOP", "Comment for toolTip Corbacheck")); + QWhatsThis::add(m_pCorbacheck, tr("Check this box to enable transmission to a CORBA host", "Comment whatsThis for Corbacheck")); + + m_pSoapcheck->setText(tr("Enable SOAP transmission", "Comment for Soapcheck")); + QToolTip::add(m_pSoapcheck, tr("Will enable transmission over SOAP", "Comment for toolTip Soapcheck")); + QWhatsThis::add(m_pSoapcheck, tr("Check this box to enable transmission over to a SOAP host", "Comment whatsThis for Soapcheck")); + m_pStylegroup->setTitle(tr("Available styles", "Comment for Stylebuttons")); // QToolTip::add(m_pStylegroup, tr("Tooltip for Stylebutton", "Comment for toolTip Stylebutton")); // QWhatsThis::add(m_pStylegroup, tr("Whatsthis for Stylebutton", "Comment for whatsThis Stylebuttons")); Index: ossp-pkg/as/as-gui/as_panel.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_panel.h,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_panel.h,v' 2>/dev/null --- as_panel.h 2003/02/10 22:46:06 1.2 +++ as_panel.h 2003/02/11 14:19:57 1.3 @@ -59,14 +59,14 @@ Prefpanel(QWidget *pParent = 0, const char *kszName = 0, bool bModal = true, WFlags Flags = 0); // ~Prefpanel(void); // No need to destroy widgets, because qt does it for us - QGroupBox *m_pGenbox; + QGroupBox *m_pGenbox, *m_pRembox; QVBoxLayout *m_pStylelay, *m_pSwitchlay; QVBoxLayout *m_pVlayout; - QHBoxLayout *m_pGenlayout, *m_pBoolayout; - QHBoxLayout *m_pGenboxlay; - QGridLayout *m_pGeninner; + QHBoxLayout *m_pBoolayout, *m_pGenlayout, *m_pRemlayout; + QHBoxLayout *m_pGenboxlay, *m_pRemboxlay; + QGridLayout *m_pGeninner, *m_pReminner; - QWidget *m_pGeneralpage, *m_pBoolpage; + QWidget *m_pBoolpage, *m_pGeneralpage, *m_pRemotepage; QHBoxLayout *m_pButtlay; QPushButton *m_pOkaybutton; @@ -80,6 +80,7 @@ QLineEdit *m_pAcctline, *m_pEventline; QLineEdit *m_pUserline, *m_pHomeline; QLineEdit *m_pCorbaline, *m_pSoapline; + QCheckBox *m_pCorbacheck, *m_pSoapcheck; QButtonGroup *m_pStylegroup, *m_pSwitchgroup; QCheckBox *m_pBackupcheck, *m_pExtendcheck; 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.116' '-r1.117' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v' 2>/dev/null --- as_slot.cpp 2003/02/08 18:10:09 1.116 +++ as_slot.cpp 2003/02/11 14:19:57 1.117 @@ -871,7 +871,6 @@ // QRegExp Shorten("/(\\w+)$"); // For stripping prefix off the current task // Texttask.remove(0, Shorten.search(Texttask) + 1); // Strip leading slash - m_pAmount->setText(Textamount); m_pRemark->setText(Textremark); m_pTasks->setCurrentText(Texttask); @@ -902,12 +901,12 @@ // Amount time not suitable for empty string text if (Textamount == ".") { int nDifference = m_pStarttime->time().secsTo(m_pEndtime->time()); - m_pAmount->setText(QTime(0, 0).addSecs(nDifference).toString("hh:mm")); + m_pAmount->setTime(QTime(0, 0).addSecs(nDifference)); } else if (Textamount.isEmpty()) - m_pAmount->setText(QString("00:00")); + m_pAmount->setTime(QTime::QTime(0, 0)); else - m_pAmount->setText(Textamount); + m_pAmount->setTime(QTime::fromString(Textamount, Qt::ISODate)); } } @@ -1055,10 +1054,9 @@ // // Update the current amount column item // -void Titraqform::updateAmount(const QString &Amountup) +void Titraqform::updateAmount(const QTime &Amountup) { - // Ignore incoming data and use widget managed data because its easier - m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, m_pAmount->text()); + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, Amountup.toString("hh:mm")); } // @@ -1094,7 +1092,7 @@ m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXDATE, m_pDateedit->date().toString(Qt::ISODate)); m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXSTART, m_pStarttime->time().toString(Qt::ISODate)); m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXFINISH, m_pEndtime->time().toString(Qt::ISODate)); - m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, m_pAmount->text()); + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, m_pAmount->time().toString(Qt::ISODate)); // Specially handle task fields pTask = static_cast(m_pMaintable->item(m_pMaintable->currentRow(), TITRAQ_IDXTASK));