diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /korganizer/koeditorgeneralevent.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/koeditorgeneralevent.cpp')
-rw-r--r-- | korganizer/koeditorgeneralevent.cpp | 210 |
1 files changed, 105 insertions, 105 deletions
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp index e9bc44d6d..24e8b4ca2 100644 --- a/korganizer/koeditorgeneralevent.cpp +++ b/korganizer/koeditorgeneralevent.cpp @@ -22,19 +22,19 @@ without including the source code for Qt in the source distribution. */ -#include <qtooltip.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qvgroupbox.h> -#include <qwidgetstack.h> -#include <qspinbox.h> -#include <qdatetime.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> +#include <tqtooltip.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqbuttongroup.h> +#include <tqvgroupbox.h> +#include <tqwidgetstack.h> +#include <tqspinbox.h> +#include <tqdatetime.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> #include <kdebug.h> #include <kglobal.h> @@ -56,14 +56,14 @@ #include "koeditorgeneralevent.h" #include "koeditorgeneralevent.moc" -KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent, +KOEditorGeneralEvent::KOEditorGeneralEvent(TQObject* parent, const char* name) : KOEditorGeneral( parent, name) { - connect( this, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & )), - SLOT( setDuration() ) ); - connect( this, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & )), - SLOT( emitDateTimeStr() )); + connect( this, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & )), + TQT_SLOT( setDuration() ) ); + connect( this, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & )), + TQT_SLOT( emitDateTimeStr() )); } KOEditorGeneralEvent::~KOEditorGeneralEvent() @@ -72,46 +72,46 @@ KOEditorGeneralEvent::~KOEditorGeneralEvent() void KOEditorGeneralEvent::finishSetup() { - QWidget::setTabOrder( mSummaryEdit, mLocationEdit ); - QWidget::setTabOrder( mLocationEdit, mStartDateEdit ); - QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit ); - QWidget::setTabOrder( mStartTimeEdit, mEndDateEdit ); - QWidget::setTabOrder( mEndDateEdit, mEndTimeEdit ); - QWidget::setTabOrder( mEndTimeEdit, mAlldayEventCheckbox ); - QWidget::setTabOrder( mAlldayEventCheckbox, mAlarmButton ); - QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit ); - QWidget::setTabOrder( mAlarmTimeEdit, mAlarmIncrCombo ); -// QWidget::setTabOrder( mAlarmIncrCombo, mAlarmSoundButton ); - QWidget::setTabOrder( mAlarmIncrCombo, mAlarmEditButton ); -// QWidget::setTabOrder( mAlarmSoundButton, mAlarmProgramButton ); -// QWidget::setTabOrder( mAlarmProgramButton, mFreeTimeCombo ); - QWidget::setTabOrder( mAlarmEditButton, mFreeTimeCombo ); - QWidget::setTabOrder( mFreeTimeCombo, mDescriptionEdit ); - QWidget::setTabOrder( mDescriptionEdit, mCategoriesButton ); - QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo ); -// QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit ); + TQWidget::setTabOrder( mSummaryEdit, mLocationEdit ); + TQWidget::setTabOrder( mLocationEdit, mStartDateEdit ); + TQWidget::setTabOrder( mStartDateEdit, mStartTimeEdit ); + TQWidget::setTabOrder( mStartTimeEdit, mEndDateEdit ); + TQWidget::setTabOrder( mEndDateEdit, mEndTimeEdit ); + TQWidget::setTabOrder( mEndTimeEdit, mAlldayEventCheckbox ); + TQWidget::setTabOrder( mAlldayEventCheckbox, mAlarmButton ); + TQWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit ); + TQWidget::setTabOrder( mAlarmTimeEdit, mAlarmIncrCombo ); +// TQWidget::setTabOrder( mAlarmIncrCombo, mAlarmSoundButton ); + TQWidget::setTabOrder( mAlarmIncrCombo, mAlarmEditButton ); +// TQWidget::setTabOrder( mAlarmSoundButton, mAlarmProgramButton ); +// TQWidget::setTabOrder( mAlarmProgramButton, mFreeTimeCombo ); + TQWidget::setTabOrder( mAlarmEditButton, mFreeTimeCombo ); + TQWidget::setTabOrder( mFreeTimeCombo, mDescriptionEdit ); + TQWidget::setTabOrder( mDescriptionEdit, mCategoriesButton ); + TQWidget::setTabOrder( mCategoriesButton, mSecrecyCombo ); +// TQWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit ); mSummaryEdit->setFocus(); } -void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneralEvent::initTime(TQWidget *parent,TQBoxLayout *topLayout) { - QBoxLayout *timeLayout = new QVBoxLayout(topLayout); + TQBoxLayout *timeLayout = new TQVBoxLayout(topLayout); - QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, + TQGroupBox *timeGroupBox = new TQGroupBox(1,TQGroupBox::Horizontal, i18n("Date && Time"),parent); - QWhatsThis::add( timeGroupBox, + TQWhatsThis::add( timeGroupBox, i18n("Sets options related to the date and time of the " "event or to-do.") ); timeLayout->addWidget(timeGroupBox); - QFrame *timeBoxFrame = new QFrame(timeGroupBox); + TQFrame *timeBoxFrame = new TQFrame(timeGroupBox); - QGridLayout *layoutTimeBox = new QGridLayout( timeBoxFrame ); + TQGridLayout *layoutTimeBox = new TQGridLayout( timeBoxFrame ); layoutTimeBox->setSpacing(topLayout->spacing()); layoutTimeBox->setColStretch( 3, 1 ); - mStartDateLabel = new QLabel(i18n("&Start:"),timeBoxFrame); + mStartDateLabel = new TQLabel(i18n("&Start:"),timeBoxFrame); layoutTimeBox->addWidget(mStartDateLabel,0,0); mStartDateEdit = new KDateEdit(timeBoxFrame); @@ -122,7 +122,7 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) layoutTimeBox->addWidget(mStartTimeEdit,0,2); - mEndDateLabel = new QLabel(i18n("&End:"),timeBoxFrame); + mEndDateLabel = new TQLabel(i18n("&End:"),timeBoxFrame); layoutTimeBox->addWidget(mEndDateLabel,1,0); mEndDateEdit = new KDateEdit(timeBoxFrame); @@ -132,87 +132,87 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) mEndTimeEdit = new KTimeEdit(timeBoxFrame); layoutTimeBox->addWidget(mEndTimeEdit,1,2); - mAlldayEventCheckbox = new QCheckBox(i18n("All-&day"),timeBoxFrame); + mAlldayEventCheckbox = new TQCheckBox(i18n("All-&day"),timeBoxFrame); layoutTimeBox->addWidget( mAlldayEventCheckbox, 0, 3 ); - connect(mAlldayEventCheckbox, SIGNAL(toggled(bool)),SLOT(associateTime(bool))); + connect(mAlldayEventCheckbox, TQT_SIGNAL(toggled(bool)),TQT_SLOT(associateTime(bool))); - mDurationLabel = new QLabel( timeBoxFrame ); + mDurationLabel = new TQLabel( timeBoxFrame ); layoutTimeBox->addWidget( mDurationLabel, 1, 3 ); // time widgets are checked if they contain a valid time - connect(mStartTimeEdit, SIGNAL(timeChanged(QTime)), - this, SLOT(startTimeChanged(QTime))); - connect(mEndTimeEdit, SIGNAL(timeChanged(QTime)), - this, SLOT(endTimeChanged(QTime))); + connect(mStartTimeEdit, TQT_SIGNAL(timeChanged(TQTime)), + this, TQT_SLOT(startTimeChanged(TQTime))); + connect(mEndTimeEdit, TQT_SIGNAL(timeChanged(TQTime)), + this, TQT_SLOT(endTimeChanged(TQTime))); // date widgets are checked if they contain a valid date - connect(mStartDateEdit, SIGNAL(dateChanged(const QDate&)), - this, SLOT(startDateChanged(const QDate&))); - connect(mEndDateEdit, SIGNAL(dateChanged(const QDate&)), - this, SLOT(endDateChanged(const QDate&))); + connect(mStartDateEdit, TQT_SIGNAL(dateChanged(const TQDate&)), + this, TQT_SLOT(startDateChanged(const TQDate&))); + connect(mEndDateEdit, TQT_SIGNAL(dateChanged(const TQDate&)), + this, TQT_SLOT(endDateChanged(const TQDate&))); - QBoxLayout *recLayout = new QHBoxLayout(); + TQBoxLayout *recLayout = new TQHBoxLayout(); layoutTimeBox->addMultiCellLayout( recLayout, 2, 2, 1, 4 ); - mRecurrenceSummary = new QLabel( QString(), timeBoxFrame ); + mRecurrenceSummary = new TQLabel( TQString(), timeBoxFrame ); recLayout->addWidget( mRecurrenceSummary ); - QPushButton *recEditButton = new QPushButton( i18n("Edit..."), timeBoxFrame ); + TQPushButton *recEditButton = new TQPushButton( i18n("Edit..."), timeBoxFrame ); recLayout->addWidget( recEditButton ); - connect( recEditButton, SIGNAL(clicked()), SIGNAL(editRecurrence()) ); + connect( recEditButton, TQT_SIGNAL(clicked()), TQT_SIGNAL(editRecurrence()) ); recLayout->addStretch( 1 ); - QLabel *label = new QLabel( i18n("Reminder:"), timeBoxFrame ); + TQLabel *label = new TQLabel( i18n("Reminder:"), timeBoxFrame ); layoutTimeBox->addWidget( label, 3, 0 ); - QBoxLayout *alarmLineLayout = new QHBoxLayout(); + TQBoxLayout *alarmLineLayout = new TQHBoxLayout(); layoutTimeBox->addMultiCellLayout( alarmLineLayout, 3, 3, 1, 4 ); initAlarm( timeBoxFrame, alarmLineLayout ); alarmLineLayout->addStretch( 1 ); - QBoxLayout *secLayout = new QHBoxLayout(); + TQBoxLayout *secLayout = new TQHBoxLayout(); layoutTimeBox->addLayout( secLayout, 0, 4 ); initSecrecy( timeBoxFrame, secLayout ); - QBoxLayout *classLayout = new QHBoxLayout(); + TQBoxLayout *classLayout = new TQHBoxLayout(); layoutTimeBox->addLayout( classLayout, 1, 4 ); initClass( timeBoxFrame, classLayout ); } -void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneralEvent::initClass(TQWidget *parent,TQBoxLayout *topLayout) { - QBoxLayout *classLayout = new QHBoxLayout(topLayout); + TQBoxLayout *classLayout = new TQHBoxLayout(topLayout); - QLabel *freeTimeLabel = new QLabel(i18n("S&how time as:"),parent); - QString whatsThis = i18n("Sets how this time will appear on your Free/Busy " + TQLabel *freeTimeLabel = new TQLabel(i18n("S&how time as:"),parent); + TQString whatsThis = i18n("Sets how this time will appear on your Free/Busy " "information."); - QWhatsThis::add( freeTimeLabel, whatsThis ); + TQWhatsThis::add( freeTimeLabel, whatsThis ); classLayout->addWidget(freeTimeLabel); - mFreeTimeCombo = new QComboBox(false, parent); - QWhatsThis::add( mFreeTimeCombo, whatsThis ); + mFreeTimeCombo = new TQComboBox(false, parent); + TQWhatsThis::add( mFreeTimeCombo, whatsThis ); mFreeTimeCombo->insertItem(i18n("Busy")); mFreeTimeCombo->insertItem(i18n("Free")); classLayout->addWidget(mFreeTimeCombo); freeTimeLabel->setBuddy( mFreeTimeCombo ); } -void KOEditorGeneralEvent::initInvitationBar(QWidget * parent, QBoxLayout * layout) +void KOEditorGeneralEvent::initInvitationBar(TQWidget * parent, TQBoxLayout * layout) { - QBoxLayout *topLayout = new QHBoxLayout( layout ); - mInvitationBar = new QFrame( parent ); + TQBoxLayout *topLayout = new TQHBoxLayout( layout ); + mInvitationBar = new TQFrame( parent ); mInvitationBar->setPaletteBackgroundColor( KGlobalSettings::alternateBackgroundColor() ); topLayout->addWidget( mInvitationBar ); - QBoxLayout *barLayout = new QHBoxLayout( mInvitationBar ); + TQBoxLayout *barLayout = new TQHBoxLayout( mInvitationBar ); barLayout->setSpacing( layout->spacing() ); - QLabel *label = new QLabel( i18n("You have not yet definitely responded to this invitation." ), mInvitationBar ); + TQLabel *label = new TQLabel( i18n("You have not yet definitely responded to this invitation." ), mInvitationBar ); barLayout->addWidget( label ); barLayout->addStretch( 1 ); - QPushButton *button = new QPushButton( i18n("Accept"), mInvitationBar ); - connect( button, SIGNAL(clicked()), SIGNAL(acceptInvitation()) ); - connect( button, SIGNAL(clicked()), mInvitationBar, SLOT(hide()) ); + TQPushButton *button = new TQPushButton( i18n("Accept"), mInvitationBar ); + connect( button, TQT_SIGNAL(clicked()), TQT_SIGNAL(acceptInvitation()) ); + connect( button, TQT_SIGNAL(clicked()), mInvitationBar, TQT_SLOT(hide()) ); barLayout->addWidget( button ); - button = new QPushButton( i18n("Decline"), mInvitationBar ); - connect( button, SIGNAL(clicked()), SIGNAL(declineInvitation()) ); - connect( button, SIGNAL(clicked()), mInvitationBar, SLOT(hide()) ); + button = new TQPushButton( i18n("Decline"), mInvitationBar ); + connect( button, TQT_SIGNAL(clicked()), TQT_SIGNAL(declineInvitation()) ); + connect( button, TQT_SIGNAL(clicked()), mInvitationBar, TQT_SLOT(hide()) ); barLayout->addWidget( button ); mInvitationBar->hide(); @@ -234,7 +234,7 @@ void KOEditorGeneralEvent::associateTime(bool time) allDayChanged(time); } -void KOEditorGeneralEvent::setDateTimes( const QDateTime &start, const QDateTime &end ) +void KOEditorGeneralEvent::setDateTimes( const TQDateTime &start, const TQDateTime &end ) { // kdDebug(5850) << "KOEditorGeneralEvent::setDateTimes(): Start DateTime: " << start.toString() << endl; @@ -253,7 +253,7 @@ void KOEditorGeneralEvent::setDateTimes( const QDateTime &start, const QDateTime emitDateTimeStr(); } -void KOEditorGeneralEvent::startTimeChanged( QTime newtime ) +void KOEditorGeneralEvent::startTimeChanged( TQTime newtime ) { kdDebug(5850) << "KOEditorGeneralEvent::startTimeChanged() " << newtime.toString() << endl; @@ -269,17 +269,17 @@ void KOEditorGeneralEvent::startTimeChanged( QTime newtime ) emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); } -void KOEditorGeneralEvent::endTimeChanged( QTime newtime ) +void KOEditorGeneralEvent::endTimeChanged( TQTime newtime ) { // kdDebug(5850) << "KOEditorGeneralEvent::endTimeChanged " << newtime.toString() << endl; - QDateTime newdt(mCurrEndDateTime.date(), newtime); + TQDateTime newdt(mCurrEndDateTime.date(), newtime); mCurrEndDateTime = newdt; emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); } -void KOEditorGeneralEvent::startDateChanged( const QDate &newdate ) +void KOEditorGeneralEvent::startDateChanged( const TQDate &newdate ) { if ( !newdate.isValid() ) return; @@ -295,19 +295,19 @@ void KOEditorGeneralEvent::startDateChanged( const QDate &newdate ) emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); } -void KOEditorGeneralEvent::endDateChanged( const QDate &newdate ) +void KOEditorGeneralEvent::endDateChanged( const TQDate &newdate ) { if ( !newdate.isValid() ) return; - QDateTime newdt(newdate, mCurrEndDateTime.time()); + TQDateTime newdt(newdate, mCurrEndDateTime.time()); mCurrEndDateTime = newdt; emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); } -void KOEditorGeneralEvent::setDefaults( const QDateTime &from, - const QDateTime &to, bool allDay) +void KOEditorGeneralEvent::setDefaults( const TQDateTime &from, + const TQDateTime &to, bool allDay) { KOEditorGeneral::setDefaults(allDay); @@ -319,7 +319,7 @@ void KOEditorGeneralEvent::setDefaults( const QDateTime &from, void KOEditorGeneralEvent::readEvent( Event *event, Calendar *calendar, bool tmpl ) { - QString tmpStr; + TQString tmpStr; mAlldayEventCheckbox->setChecked(event->doesFloat()); timeStuffDisable(event->doesFloat()); @@ -357,12 +357,12 @@ void KOEditorGeneralEvent::writeEvent(Event *event) writeIncidence(event); - QDate tmpDate; - QTime tmpTime; - QDateTime tmpDT; + TQDate tmpDate; + TQTime tmpTime; + TQDateTime tmpDT; // temp. until something better happens. - QString tmpStr; + TQString tmpStr; if (mAlldayEventCheckbox->isChecked()) { event->setFloats(true); @@ -405,7 +405,7 @@ void KOEditorGeneralEvent::writeEvent(Event *event) void KOEditorGeneralEvent::setDuration() { - QString tmpStr, catStr; + TQString tmpStr, catStr; int hourdiff, minutediff; // end<date is an accepted temporary state while typing, but don't show // any duration if this happens @@ -443,7 +443,7 @@ void KOEditorGeneralEvent::setDuration() } } mDurationLabel->setText(tmpStr); - QWhatsThis::add( mDurationLabel, + TQWhatsThis::add( mDurationLabel, i18n("Shows the duration of the event or to-do with the " "current start and end dates and times.") ); } @@ -452,7 +452,7 @@ void KOEditorGeneralEvent::emitDateTimeStr() { KLocale *l = KGlobal::locale(); - QString from,to; + TQString from,to; if (mAlldayEventCheckbox->isChecked()) { from = l->formatDate(mCurrStartDateTime.date()); to = l->formatDate(mCurrEndDateTime.date()); @@ -461,7 +461,7 @@ void KOEditorGeneralEvent::emitDateTimeStr() to = l->formatDateTime(mCurrEndDateTime); } - QString str = i18n("From: %1 To: %2 %3").arg(from).arg(to) + TQString str = i18n("From: %1 To: %2 %3").arg(from).arg(to) .arg(mDurationLabel->text()); emit dateTimeStrChanged(str); @@ -475,14 +475,14 @@ bool KOEditorGeneralEvent::validateInput() if (!mStartTimeEdit->inputIsValid()) { KMessageBox::sorry( 0, i18n("Please specify a valid start time, for example '%1'.") - .arg( KGlobal::locale()->formatTime( QTime::currentTime() ) ) ); + .arg( KGlobal::locale()->formatTime( TQTime::currentTime() ) ) ); return false; } if (!mEndTimeEdit->inputIsValid()) { KMessageBox::sorry( 0, i18n("Please specify a valid end time, for example '%1'.") - .arg( KGlobal::locale()->formatTime( QTime::currentTime() ) ) ); + .arg( KGlobal::locale()->formatTime( TQTime::currentTime() ) ) ); return false; } } @@ -490,18 +490,18 @@ bool KOEditorGeneralEvent::validateInput() if (!mStartDateEdit->date().isValid()) { KMessageBox::sorry( 0, i18n("Please specify a valid start date, for example '%1'.") - .arg( KGlobal::locale()->formatDate( QDate::currentDate() ) ) ); + .arg( KGlobal::locale()->formatDate( TQDate::currentDate() ) ) ); return false; } if (!mEndDateEdit->date().isValid()) { KMessageBox::sorry( 0, i18n("Please specify a valid end date, for example '%1'.") - .arg( KGlobal::locale()->formatDate( QDate::currentDate() ) ) ); + .arg( KGlobal::locale()->formatDate( TQDate::currentDate() ) ) ); return false; } - QDateTime startDt,endDt; + TQDateTime startDt,endDt; startDt.setDate(mStartDateEdit->date()); endDt.setDate(mEndDateEdit->date()); if (!mAlldayEventCheckbox->isChecked()) { @@ -518,7 +518,7 @@ bool KOEditorGeneralEvent::validateInput() return KOEditorGeneral::validateInput(); } -void KOEditorGeneralEvent::updateRecurrenceSummary(const QString & summary) +void KOEditorGeneralEvent::updateRecurrenceSummary(const TQString & summary) { mRecurrenceSummary->setText( summary ); } |