ossp-pkg/as/as-gui/as_amount.cpp 1.5 -> 1.6
--- as_amount.cpp 2002/12/02 13:25:36 1.5
+++ as_amount.cpp 2003/02/17 13:38:22 1.6
@@ -29,42 +29,42 @@
// titamount.cpp: ISO C++ implementation
//
-#include <qregexp.h>
+//#include <qregexp.h>
-#include "as_amount.h"
-#include "as_const.h"
+//#include "as_amount.h"
+//#include "as_const.h"
-// Sets a text formatted representation
-void AmountBox::setText(const QString &Strval)
-{
- int nTotal = 0; // The total amount of minutes
- QRegExp Strexpr("(\\d+):(\\d+)"); // Pattern in amount text
- QString Stramount = QRegExp::escape(Strval); // Incoming string escaped
-
- if (Strval.isEmpty()) { // Shortcircuit in the
- this->setValue(0); // case of empty string
- }
- else { // Do the real work then
- Strexpr.search(Stramount);
- nTotal = Strexpr.cap(Strexpr.numCaptures() - 1).toInt() * TITRAQ_MINSINHOUR;
- nTotal += Strexpr.cap(Strexpr.numCaptures()).toInt();
- this->setValue(nTotal);
- }
-}
-
-// Return a text formatted representation
-QString AmountBox::text(void) const
-{
- QString Strfirst, Strsecond;
- int nHours = 0;
- int nMins = this->value();
-
- nHours = nMins / TITRAQ_MINSINHOUR; // Calculate total hours
- nMins = nMins % TITRAQ_MINSINHOUR; // Calculate total minutes
- Strfirst = trUtf8("%1:").arg(nHours); // Format the first part
- Strsecond = trUtf8("%1").arg(nMins); // Format the second part
-
- // Pad the resulting concatination before sending it out the back
- return Strfirst.rightJustify(3, '0') + Strsecond.rightJustify(2, '0');
-}
+//// Sets a text formatted representation
+//void AmountBox::setText(const QString &Strval)
+//{
+// int nTotal = 0; // The total amount of minutes
+// QRegExp Strexpr("(\\d+):(\\d+)"); // Pattern in amount text
+// QString Stramount = QRegExp::escape(Strval); // Incoming string escaped
+//
+// if (Strval.isEmpty()) { // Shortcircuit in the
+// this->setValue(0); // case of empty string
+// }
+// else { // Do the real work then
+// Strexpr.search(Stramount);
+// nTotal = Strexpr.cap(Strexpr.numCaptures() - 1).toInt() * TITRAQ_MINSINHOUR;
+// nTotal += Strexpr.cap(Strexpr.numCaptures()).toInt();
+// this->setValue(nTotal);
+// }
+//}
+
+//// Return a text formatted representation
+//QString AmountBox::text(void) const
+//{
+// QString Strfirst, Strsecond;
+// int nHours = 0;
+// int nMins = this->value();
+//
+// nHours = nMins / TITRAQ_MINSINHOUR; // Calculate total hours
+// nMins = nMins % TITRAQ_MINSINHOUR; // Calculate total minutes
+// Strfirst = trUtf8("%1:").arg(nHours); // Format the first part
+// Strsecond = trUtf8("%1").arg(nMins); // Format the second part
+//
+// // Pad the resulting concatination before sending it out the back
+// return Strfirst.rightJustify(3, '0') + Strsecond.rightJustify(2, '0');
+//}
|
|