OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_assist.cpp versions 1.15 and 1.16
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/as/as-gui/as_assist.cpp 1.15 -> 1.16

--- 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 <qcursor.h>
 
 // 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);
 }
 
 //

CVSTrac 2.0.1