--- 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"));
}
//
|