Diffstat (limited to 'libopie/orecurrancewidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/orecurrancewidget.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libopie/orecurrancewidget.cpp b/libopie/orecurrancewidget.cpp index be8ec30..d81851e 100644 --- a/libopie/orecurrancewidget.cpp +++ b/libopie/orecurrancewidget.cpp @@ -1,102 +1,100 @@ #include <qapplication.h> #include <qlabel.h> -#include <qpopupmenu.h> #include <qspinbox.h> -#include <qpe/timestring.h> #include "orecurrancewidget.h" // Global Templates for use in setting up the repeat label... // the problem is these strings get initialized before QPEApplication can install the translator -zecke namespace { QString strDayTemplate; QString strYearTemplate; QString strMonthDateTemplate; QString strMonthDayTemplate; QString strWeekTemplate; QString dayLabel[7]; } /* * static linkage to not polute the symbol table... * The problem is that const and static linkage are resolved prior to installing a translator * leading to that the above strings are translted but to the original we delay the init of these strings... * -zecke */ static void fillStrings() { strDayTemplate = QObject::tr("Every"); strYearTemplate = QObject::tr("%1 %2 every "); strMonthDateTemplate = QObject::tr("The %1 every "); strMonthDayTemplate = QObject::tr("The %1 %2 of every"); strWeekTemplate = QObject::tr("Every "); dayLabel[0] = QObject::tr("Monday"); dayLabel[1] = QObject::tr("Tuesday"); dayLabel[2] = QObject::tr("Wednesday"); dayLabel[3] = QObject::tr("Thursday"); dayLabel[4] = QObject::tr("Friday"); dayLabel[5] = QObject::tr("Saturday"); dayLabel[6] = QObject::tr("Sunday"); } static QString numberPlacing( int x ); // return the proper word format for // x (1st, 2nd, etc) static int week( const QDate &dt ); // what week in the month is dt? /** * Constructs the Widget * @param startOnMonday Does the week start on monday * @param newStart The start date of the recurrence * @param parent The parent widget * @param name the name of object * @param modal if the dialog should be modal * @param fl Additional window flags */ ORecurranceWidget::ORecurranceWidget( bool startOnMonday, const QDate& newStart, QWidget* parent, const char* name, bool modal, WFlags fl ) : ORecurranceBase( parent, name, modal, fl ), start( newStart ), currInterval( None ), startWeekOnMonday( startOnMonday ) { if (strDayTemplate.isEmpty() ) fillStrings(); init(); fraType->setButton( currInterval ); chkNoEnd->setChecked( TRUE ); setupNone(); } /** * Different constructor * @param startOnMonday Does the week start on monday? * @param rp Already set ORecur object * @param startDate The start date * @param parent The parent widget * @param name The name of the object * @param modal * @param fl The flags for window */ ORecurranceWidget::ORecurranceWidget( bool startOnMonday, const ORecur& rp, const QDate& startDate, QWidget* parent, const char* name, bool modal, WFlags fl) : ORecurranceBase( parent, name, modal, fl ), start( startDate ), end( rp.endDate() ), startWeekOnMonday( startOnMonday ) { if (strDayTemplate.isEmpty() ) fillStrings(); // do some stuff with the repeat pattern init(); setRecurrence( rp ); } ORecurranceWidget::~ORecurranceWidget() { } |