summaryrefslogtreecommitdiffstats
path: root/korganizer/koeditorgeneraltodo.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /korganizer/koeditorgeneraltodo.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-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/koeditorgeneraltodo.cpp')
-rw-r--r--korganizer/koeditorgeneraltodo.cpp204
1 files changed, 102 insertions, 102 deletions
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index 89deed4f2..dd2a77b5c 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -22,19 +22,19 @@
without including the source code for Qt in the source distribution.
*/
-#include <qtooltip.h>
-#include <qfiledialog.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qwidgetstack.h>
-#include <qdatetime.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqfiledialog.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqbuttongroup.h>
+#include <tqvgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqdatetime.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -56,7 +56,7 @@
#include "koeditorgeneraltodo.h"
#include "koeditorgeneraltodo.moc"
-KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent,
+KOEditorGeneralTodo::KOEditorGeneralTodo(TQObject* parent,
const char* name)
: KOEditorGeneral( parent, name)
{
@@ -68,142 +68,142 @@ KOEditorGeneralTodo::~KOEditorGeneralTodo()
void KOEditorGeneralTodo::finishSetup()
{
- QWidget::setTabOrder( mSummaryEdit, mLocationEdit );
- QWidget::setTabOrder( mLocationEdit, mStartCheck );
- QWidget::setTabOrder( mStartCheck, mStartDateEdit );
- QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit );
- QWidget::setTabOrder( mStartTimeEdit, mDueCheck );
- QWidget::setTabOrder( mDueCheck, mDueDateEdit );
- QWidget::setTabOrder( mDueDateEdit, mDueTimeEdit );
- QWidget::setTabOrder( mDueTimeEdit, mTimeButton );
- QWidget::setTabOrder( mTimeButton, mCompletedCombo );
- QWidget::setTabOrder( mCompletedCombo, mPriorityCombo );
- QWidget::setTabOrder( mPriorityCombo, mAlarmButton );
- QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit );
- QWidget::setTabOrder( mAlarmTimeEdit, mAlarmIncrCombo );
-// QWidget::setTabOrder( mAlarmIncrCombo, mAlarmSoundButton );
- QWidget::setTabOrder( mAlarmIncrCombo, mAlarmEditButton );
-// QWidget::setTabOrder( mAlarmSoundButton, mAlarmProgramButton );
-// QWidget::setTabOrder( mAlarmProgramButton, mDescriptionEdit );
- QWidget::setTabOrder( mAlarmEditButton, mDescriptionEdit );
- QWidget::setTabOrder( mDescriptionEdit, mCategoriesButton );
- QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo );
-// QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit );
+ TQWidget::setTabOrder( mSummaryEdit, mLocationEdit );
+ TQWidget::setTabOrder( mLocationEdit, mStartCheck );
+ TQWidget::setTabOrder( mStartCheck, mStartDateEdit );
+ TQWidget::setTabOrder( mStartDateEdit, mStartTimeEdit );
+ TQWidget::setTabOrder( mStartTimeEdit, mDueCheck );
+ TQWidget::setTabOrder( mDueCheck, mDueDateEdit );
+ TQWidget::setTabOrder( mDueDateEdit, mDueTimeEdit );
+ TQWidget::setTabOrder( mDueTimeEdit, mTimeButton );
+ TQWidget::setTabOrder( mTimeButton, mCompletedCombo );
+ TQWidget::setTabOrder( mCompletedCombo, mPriorityCombo );
+ TQWidget::setTabOrder( mPriorityCombo, mAlarmButton );
+ TQWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit );
+ TQWidget::setTabOrder( mAlarmTimeEdit, mAlarmIncrCombo );
+// TQWidget::setTabOrder( mAlarmIncrCombo, mAlarmSoundButton );
+ TQWidget::setTabOrder( mAlarmIncrCombo, mAlarmEditButton );
+// TQWidget::setTabOrder( mAlarmSoundButton, mAlarmProgramButton );
+// TQWidget::setTabOrder( mAlarmProgramButton, mDescriptionEdit );
+ TQWidget::setTabOrder( mAlarmEditButton, mDescriptionEdit );
+ TQWidget::setTabOrder( mDescriptionEdit, mCategoriesButton );
+ TQWidget::setTabOrder( mCategoriesButton, mSecrecyCombo );
+// TQWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit );
mSummaryEdit->setFocus();
}
-void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneralTodo::initTime(TQWidget *parent,TQBoxLayout *topLayout)
{
kdDebug(5850) << k_funcinfo << endl;
- 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);
timeLayout->addWidget(timeGroupBox);
- QFrame *timeBoxFrame = new QFrame(timeGroupBox);
- QWhatsThis::add( timeBoxFrame,
+ TQFrame *timeBoxFrame = new TQFrame(timeGroupBox);
+ TQWhatsThis::add( timeBoxFrame,
i18n("Sets options for due and start dates and times "
"for this to-do.") );
- QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,1,1);
+ TQGridLayout *layoutTimeBox = new TQGridLayout(timeBoxFrame,1,1);
layoutTimeBox->setSpacing(topLayout->spacing());
- QString whatsThis = i18n("Sets the start date for this to-do");
- mStartCheck = new QCheckBox(i18n("Sta&rt:"),timeBoxFrame);
- QWhatsThis::add( mStartCheck, whatsThis );
+ TQString whatsThis = i18n("Sets the start date for this to-do");
+ mStartCheck = new TQCheckBox(i18n("Sta&rt:"),timeBoxFrame);
+ TQWhatsThis::add( mStartCheck, whatsThis );
layoutTimeBox->addWidget(mStartCheck,0,0);
- connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool)));
- connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(startDateModified()));
+ connect(mStartCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(enableStartEdit(bool)));
+ connect(mStartCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(startDateModified()));
mStartDateEdit = new KDateEdit(timeBoxFrame);
- QWhatsThis::add( mStartDateEdit, whatsThis );
+ TQWhatsThis::add( mStartDateEdit, whatsThis );
layoutTimeBox->addWidget(mStartDateEdit,0,1);
- connect(mStartDateEdit,SIGNAL(dateChanged(const QDate&)),SLOT(startDateModified()));
+ connect(mStartDateEdit,TQT_SIGNAL(dateChanged(const TQDate&)),TQT_SLOT(startDateModified()));
mStartTimeEdit = new KTimeEdit(timeBoxFrame);
- QWhatsThis::add( mStartTimeEdit,
+ TQWhatsThis::add( mStartTimeEdit,
i18n("Sets the start time for this to-do.") );
layoutTimeBox->addWidget(mStartTimeEdit,0,2);
- connect(mStartTimeEdit,SIGNAL(timeChanged(QTime)),SLOT(startDateModified()));
+ connect(mStartTimeEdit,TQT_SIGNAL(timeChanged(TQTime)),TQT_SLOT(startDateModified()));
whatsThis = i18n("Sets the due date for this to-do.");
- mDueCheck = new QCheckBox(i18n("&Due:"),timeBoxFrame);
- QWhatsThis::add( mDueCheck, whatsThis );
+ mDueCheck = new TQCheckBox(i18n("&Due:"),timeBoxFrame);
+ TQWhatsThis::add( mDueCheck, whatsThis );
layoutTimeBox->addWidget(mDueCheck,1,0);
- connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool)));
- connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm()));
- connect(mDueCheck,SIGNAL(toggled(bool)),SIGNAL(dueDateEditToggle(bool)));
- connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(dateChanged()));
+ connect(mDueCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(enableDueEdit(bool)));
+ connect(mDueCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(showAlarm()));
+ connect(mDueCheck,TQT_SIGNAL(toggled(bool)),TQT_SIGNAL(dueDateEditToggle(bool)));
+ connect(mDueCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(dateChanged()));
mDueDateEdit = new KDateEdit(timeBoxFrame);
- QWhatsThis::add( mDueDateEdit, whatsThis );
+ TQWhatsThis::add( mDueDateEdit, whatsThis );
layoutTimeBox->addWidget(mDueDateEdit,1,1);
- connect(mDueDateEdit,SIGNAL(dateChanged(const QDate&)),SLOT(dateChanged()));
+ connect(mDueDateEdit,TQT_SIGNAL(dateChanged(const TQDate&)),TQT_SLOT(dateChanged()));
mDueTimeEdit = new KTimeEdit(timeBoxFrame);
- QWhatsThis::add( mDueTimeEdit,
+ TQWhatsThis::add( mDueTimeEdit,
i18n("Sets the due time for this to-do.") );
layoutTimeBox->addWidget(mDueTimeEdit,1,2);
- connect(mDueTimeEdit,SIGNAL(timeChanged( QTime )),SLOT(dateChanged()));
+ connect(mDueTimeEdit,TQT_SIGNAL(timeChanged( TQTime )),TQT_SLOT(dateChanged()));
- mTimeButton = new QCheckBox(i18n("Ti&me associated"),timeBoxFrame);
- QWhatsThis::add( mTimeButton,
+ mTimeButton = new TQCheckBox(i18n("Ti&me associated"),timeBoxFrame);
+ TQWhatsThis::add( mTimeButton,
i18n("Sets whether or not this to-do's start and due dates "
"have times associated with them.") );
layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,2);
- connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool)));
- connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(dateChanged()));
+ connect(mTimeButton,TQT_SIGNAL(toggled(bool)),TQT_SLOT(enableTimeEdits(bool)));
+ connect(mTimeButton,TQT_SIGNAL(toggled(bool)),TQT_SLOT(dateChanged()));
// some more layouting
layoutTimeBox->setColStretch(3,1);
- QBoxLayout *secLayout = new QHBoxLayout();
+ TQBoxLayout *secLayout = new TQHBoxLayout();
layoutTimeBox->addLayout( secLayout, 0, 4 );
initSecrecy( timeBoxFrame, secLayout );
}
-void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout)
+void KOEditorGeneralTodo::initCompletion(TQWidget *parent, TQBoxLayout *topLayout)
{
- QString whatsThis = i18n("Sets the current completion status of this to-do "
+ TQString whatsThis = i18n("Sets the current completion status of this to-do "
"as a percentage.");
- mCompletedCombo = new QComboBox(parent);
- QWhatsThis::add( mCompletedCombo, whatsThis );
+ mCompletedCombo = new TQComboBox(parent);
+ TQWhatsThis::add( mCompletedCombo, whatsThis );
for (int i = 0; i <= 100; i+=10) {
// xgettext:no-c-format
- QString label = i18n("Percent complete", "%1 %").arg (i);
+ TQString label = i18n("Percent complete", "%1 %").arg (i);
mCompletedCombo->insertItem(label);
}
- connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int)));
+ connect(mCompletedCombo,TQT_SIGNAL(activated(int)),TQT_SLOT(completedChanged(int)));
topLayout->addWidget(mCompletedCombo);
- mCompletedLabel = new QLabel(i18n("co&mpleted"),parent);
+ mCompletedLabel = new TQLabel(i18n("co&mpleted"),parent);
topLayout->addWidget(mCompletedLabel);
mCompletedLabel->setBuddy( mCompletedCombo );
mCompletionDateEdit = new KDateEdit( parent );
mCompletionDateEdit->hide();
topLayout->addWidget( mCompletionDateEdit );
- mCompletionTimeEdit = new KTimeEdit( parent, QTime() );
+ mCompletionTimeEdit = new KTimeEdit( parent, TQTime() );
mCompletionTimeEdit->hide();
topLayout->addWidget( mCompletionTimeEdit );
}
-void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
+void KOEditorGeneralTodo::initPriority(TQWidget *parent, TQBoxLayout *topLayout)
{
- QString whatsThis = i18n("Sets the priority of this to-do on a scale "
+ TQString whatsThis = i18n("Sets the priority of this to-do on a scale "
"from one to nine, with one being the highest "
"priority, five being a medium priority, and "
"nine being the lowest. In programs that have a "
"different scale, the numbers will be adjusted "
"to match the appropriate scale.");
- QLabel *priorityLabel = new QLabel(i18n("&Priority:"),parent);
+ TQLabel *priorityLabel = new TQLabel(i18n("&Priority:"),parent);
topLayout->addWidget(priorityLabel);
- mPriorityCombo = new QComboBox(parent);
+ mPriorityCombo = new TQComboBox(parent);
mPriorityCombo->insertItem(i18n("unspecified"));
mPriorityCombo->insertItem(i18n("1 (highest)"));
mPriorityCombo->insertItem(i18n("2"));
@@ -218,9 +218,9 @@ void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
priorityLabel->setBuddy( mPriorityCombo );
}
-void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneralTodo::initStatus(TQWidget *parent,TQBoxLayout *topLayout)
{
- QBoxLayout *statusLayout = new QHBoxLayout(topLayout);
+ TQBoxLayout *statusLayout = new TQHBoxLayout(topLayout);
initCompletion( parent, statusLayout );
@@ -229,7 +229,7 @@ void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout)
initPriority( parent, statusLayout );
}
-void KOEditorGeneralTodo::setDefaults( const QDateTime &due, bool allDay )
+void KOEditorGeneralTodo::setDefaults( const TQDateTime &due, bool allDay )
{
kdDebug(5850) << k_funcinfo << due <<endl;
KOEditorGeneral::setDefaults(allDay);
@@ -250,13 +250,13 @@ void KOEditorGeneralTodo::setDefaults( const QDateTime &due, bool allDay )
mDueTimeEdit->setTime( due.time() );
} else {
// Make it due tomorrow.
- mDueDateEdit->setDate( QDate::currentDate().addDays(1) );
- mDueTimeEdit->setTime( QTime::currentTime() );
+ mDueDateEdit->setDate( TQDate::currentDate().addDays(1) );
+ mDueTimeEdit->setTime( TQTime::currentTime() );
}
- if ( !due.isValid() || (QDateTime::currentDateTime() < due) ) {
- mStartDateEdit->setDate( QDate::currentDate() );
- mStartTimeEdit->setTime( QTime::currentTime() );
+ if ( !due.isValid() || (TQDateTime::currentDateTime() < due) ) {
+ mStartDateEdit->setDate( TQDate::currentDate() );
+ mStartTimeEdit->setTime( TQTime::currentTime() );
} else {
mStartDateEdit->setDate( due.date().addDays( -1 ) );
mStartTimeEdit->setTime( due.time() );
@@ -272,7 +272,7 @@ void KOEditorGeneralTodo::readTodo(Todo *todo, Calendar *calendar)
{
KOEditorGeneral::readIncidence(todo, calendar);
- QDateTime dueDT;
+ TQDateTime dueDT;
if (todo->hasDueDate()) {
enableAlarm( true );
@@ -284,8 +284,8 @@ void KOEditorGeneralTodo::readTodo(Todo *todo, Calendar *calendar)
enableAlarm( false );
mDueDateEdit->setEnabled(false);
mDueTimeEdit->setEnabled(false);
- mDueDateEdit->setDate(QDate::currentDate());
- mDueTimeEdit->setTime(QTime::currentTime());
+ mDueDateEdit->setDate(TQDate::currentDate());
+ mDueTimeEdit->setTime(TQTime::currentTime());
mDueCheck->setChecked(false);
}
@@ -296,8 +296,8 @@ void KOEditorGeneralTodo::readTodo(Todo *todo, Calendar *calendar)
} else {
mStartDateEdit->setEnabled(false);
mStartTimeEdit->setEnabled(false);
- mStartDateEdit->setDate(QDate::currentDate());
- mStartTimeEdit->setTime(QTime::currentTime());
+ mStartDateEdit->setDate(TQDate::currentDate());
+ mStartTimeEdit->setTime(TQTime::currentTime());
mStartCheck->setChecked(false);
}
@@ -320,14 +320,14 @@ void KOEditorGeneralTodo::writeTodo(Todo *todo)
KOEditorGeneral::writeIncidence(todo);
// temp. until something better happens.
- QString tmpStr;
+ TQString tmpStr;
todo->setHasDueDate(mDueCheck->isChecked());
todo->setHasStartDate(mStartCheck->isChecked());
- QDate tmpSDate, tmpDDate;
- QTime tmpSTime, tmpDTime;
- QDateTime tmpStartDT, tmpDueDT;
+ TQDate tmpSDate, tmpDDate;
+ TQTime tmpSTime, tmpDTime;
+ TQDateTime tmpStartDT, tmpDueDT;
if ( mTimeButton->isChecked() ) {
todo->setFloats(false);
@@ -380,7 +380,7 @@ void KOEditorGeneralTodo::writeTodo(Todo *todo)
todo->setPercentComplete(mCompletedCombo->currentItem() * 10);
if (mCompletedCombo->currentItem() == 10 && mCompleted.isValid()) {
- QDateTime completed( mCompletionDateEdit->date(),
+ TQDateTime completed( mCompletionDateEdit->date(),
mCompletionTimeEdit->getTime() );
int difference = mCompleted.secsTo( completed );
if ( (difference < 60) && (difference > -60) &&
@@ -473,8 +473,8 @@ bool KOEditorGeneralTodo::validateInput()
}
if (mStartCheck->isChecked() && mDueCheck->isChecked()) {
- QDateTime startDate;
- QDateTime dueDate;
+ TQDateTime startDate;
+ TQDateTime dueDate;
startDate.setDate(mStartDateEdit->date());
dueDate.setDate(mDueDateEdit->date());
if (mTimeButton->isChecked()) {
@@ -494,7 +494,7 @@ bool KOEditorGeneralTodo::validateInput()
void KOEditorGeneralTodo::completedChanged(int index)
{
if (index == 10) {
- mCompleted = QDateTime::currentDateTime();
+ mCompleted = TQDateTime::currentDateTime();
}
setCompletedDate();
}
@@ -502,13 +502,13 @@ void KOEditorGeneralTodo::completedChanged(int index)
void KOEditorGeneralTodo::dateChanged()
{
KLocale *l = KGlobal::locale();
- QString dateTimeStr = "";
+ TQString dateTimeStr = "";
if ( mStartCheck->isChecked() ) {
dateTimeStr += i18n("Start: %1").arg(
l->formatDate( mStartDateEdit->date() ) );
if ( mTimeButton->isChecked() )
- dateTimeStr += QString(" %1").arg(
+ dateTimeStr += TQString(" %1").arg(
l->formatTime( mStartTimeEdit->getTime() ) );
}
@@ -516,12 +516,12 @@ void KOEditorGeneralTodo::dateChanged()
dateTimeStr += i18n(" Due: %1").arg(
l->formatDate( mDueDateEdit->date() ) );
if ( mTimeButton->isChecked() )
- dateTimeStr += QString(" %1").arg(
+ dateTimeStr += TQString(" %1").arg(
l->formatTime( mDueTimeEdit->getTime() ) );
}
emit dateTimeStrChanged( dateTimeStr );
- QDateTime endDt( mDueDateEdit->date(), mDueTimeEdit->getTime() );
+ TQDateTime endDt( mDueDateEdit->date(), mDueTimeEdit->getTime() );
emit signalDateTimeChanged( endDt, endDt );
}