diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kplato/kptresourcedialog.cc | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kplato/kptresourcedialog.cc')
-rw-r--r-- | kplato/kptresourcedialog.cc | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/kplato/kptresourcedialog.cc b/kplato/kptresourcedialog.cc index 56d79482..b67116a1 100644 --- a/kplato/kptresourcedialog.cc +++ b/kplato/kptresourcedialog.cc @@ -24,17 +24,17 @@ #include "kptresource.h" #include "kptcalendar.h" -#include <qpushbutton.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qdatetimeedit.h> -#include <qdatetime.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qptrlist.h> -#include <qstringlist.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqdatetimeedit.h> +#include <tqdatetime.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqptrlist.h> +#include <tqstringlist.h> #include <kabc/addressee.h> #include <kabc/addresseedialog.h> @@ -49,27 +49,27 @@ namespace KPlato { -ResourceDialogImpl::ResourceDialogImpl (QWidget *parent) - : ResourceDialogBase(parent) +ResourceDialogImpl::ResourceDialogImpl (TQWidget *tqparent) + : ResourceDialogBase(tqparent) { - connect(type, SIGNAL(activated(int)), SLOT(slotChanged())); - connect(units, SIGNAL(valueChanged(int)), SLOT(slotChanged())); - connect(nameEdit, SIGNAL(textChanged(const QString&)), SLOT(slotChanged())); - connect(initialsEdit, SIGNAL(textChanged(const QString&)), SLOT(slotChanged())); - connect(emailEdit, SIGNAL(textChanged(const QString&)), SLOT(slotChanged())); + connect(type, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChanged())); + connect(units, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged())); + connect(nameEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged())); + connect(initialsEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged())); + connect(emailEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged())); - connect(calendarList, SIGNAL(activated(int)), SLOT(slotChanged())); + connect(calendarList, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChanged())); - connect(rateEdit, SIGNAL(textChanged(const QString&)), SLOT(slotChanged())); - connect(overtimeEdit, SIGNAL(textChanged(const QString&)), SLOT(slotChanged())); + connect(rateEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged())); + connect(overtimeEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged())); - connect(chooseBtn, SIGNAL(clicked()), SLOT(slotChooseResource())); + connect(chooseBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotChooseResource())); - connect(availableFrom, SIGNAL(valueChanged(const QDateTime&)), SLOT(slotChanged())); - connect(availableUntil, SIGNAL(valueChanged(const QDateTime&)), SLOT(slotChanged())); - connect(availableFrom, SIGNAL(valueChanged(const QDateTime&)), SLOT(slotAvailableFromChanged(const QDateTime&))); - connect(availableUntil, SIGNAL(valueChanged(const QDateTime&)), SLOT(slotAvailableUntilChanged(const QDateTime&))); + connect(availableFrom, TQT_SIGNAL(valueChanged(const TQDateTime&)), TQT_SLOT(slotChanged())); + connect(availableUntil, TQT_SIGNAL(valueChanged(const TQDateTime&)), TQT_SLOT(slotChanged())); + connect(availableFrom, TQT_SIGNAL(valueChanged(const TQDateTime&)), TQT_SLOT(slotAvailableFromChanged(const TQDateTime&))); + connect(availableUntil, TQT_SIGNAL(valueChanged(const TQDateTime&)), TQT_SLOT(slotAvailableUntilChanged(const TQDateTime&))); } @@ -77,25 +77,25 @@ void ResourceDialogImpl::slotChanged() { emit changed(); } -void ResourceDialogImpl::slotAvailableFromChanged(const QDateTime&) { +void ResourceDialogImpl::slotAvailableFromChanged(const TQDateTime&) { if (availableUntil->dateTime() < availableFrom->dateTime()) { - disconnect(availableUntil, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(slotAvailableUntilChanged(const QDateTime&))); + disconnect(availableUntil, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(slotAvailableUntilChanged(const TQDateTime&))); //kdDebug()<<"From: "<<availableFrom->dateTime().toString()<<" until="<<availableUntil->dateTime().toString()<<endl; availableUntil->setDateTime(availableFrom->dateTime()); - connect(availableUntil, SIGNAL(valueChanged(const QDateTime&)), SLOT(slotAvailableUntilChanged(const QDateTime&))); + connect(availableUntil, TQT_SIGNAL(valueChanged(const TQDateTime&)), TQT_SLOT(slotAvailableUntilChanged(const TQDateTime&))); } } -void ResourceDialogImpl::slotAvailableUntilChanged(const QDateTime&) { +void ResourceDialogImpl::slotAvailableUntilChanged(const TQDateTime&) { if (availableFrom->dateTime() > availableUntil->dateTime()) { - disconnect(availableFrom, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(slotAvailableFromChanged(const QDateTime&))); + disconnect(availableFrom, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(slotAvailableFromChanged(const TQDateTime&))); //kdDebug()<<"Until: "<<availableUntil->dateTime().toString()<<" from="<<availableFrom->dateTime().toString()<<endl; availableFrom->setDateTime(availableUntil->dateTime()); - connect(availableFrom, SIGNAL(valueChanged(const QDateTime&)), SLOT(slotAvailableFromChanged(const QDateTime&))); + connect(availableFrom, TQT_SIGNAL(valueChanged(const TQDateTime&)), TQT_SLOT(slotAvailableFromChanged(const TQDateTime&))); } } -void ResourceDialogImpl::slotCalculationNeeded(const QString&) { +void ResourceDialogImpl::slotCalculationNeeded(const TQString&) { emit calculate(); emit changed(); } @@ -106,9 +106,9 @@ void ResourceDialogImpl::slotChooseResource() if (!a.isEmpty()) { nameEdit->setText(a.assembledName()); emailEdit->setText(a.preferredEmail()); - QStringList l = QStringList::split(' ', a.assembledName()); - QString in; - QStringList::Iterator it = l.begin(); + TQStringList l = TQStringList::split(' ', a.assembledName()); + TQString in; + TQStringList::Iterator it = l.begin(); for (/*int i = 0*/; it != l.end(); ++it) { in += (*it)[0]; } @@ -118,8 +118,8 @@ void ResourceDialogImpl::slotChooseResource() ////////////////// ResourceDialog //////////////////////// -ResourceDialog::ResourceDialog(Project &project, Resource *resource, QWidget *parent, const char *name) - : KDialogBase( Swallow, i18n("Resource Settings"), Ok|Cancel, Ok, parent, name, true, true), +ResourceDialog::ResourceDialog(Project &project, Resource *resource, TQWidget *tqparent, const char *name) + : KDialogBase( Swallow, i18n("Resource Settings"), Ok|Cancel, Ok, tqparent, name, true, true), m_original(resource), m_resource(resource), m_calculationNeeded(false) @@ -141,8 +141,8 @@ ResourceDialog::ResourceDialog(Project &project, Resource *resource, QWidget *pa int cal = 0; dia->calendarList->insertItem(i18n("None")); m_calendars.insert(0, 0); - QPtrList<Calendar> list = project.calendars(); - QPtrListIterator<Calendar> cit = list; + TQPtrList<Calendar> list = project.calendars(); + TQPtrListIterator<Calendar> cit = list; for(int i=1; cit.current(); ++cit, ++i) { dia->calendarList->insertItem(cit.current()->name(), i); m_calendars.insert(i, cit.current()); @@ -151,9 +151,9 @@ ResourceDialog::ResourceDialog(Project &project, Resource *resource, QWidget *pa } dia->calendarList->setCurrentItem(cal); - connect(dia, SIGNAL(changed()), SLOT(enableButtonOk())); - connect(dia, SIGNAL(calculate()), SLOT(slotCalculationNeeded())); - connect(dia->calendarList, SIGNAL(activated(int)), SLOT(slotCalendarChanged(int))); + connect(dia, TQT_SIGNAL(changed()), TQT_SLOT(enableButtonOk())); + connect(dia, TQT_SIGNAL(calculate()), TQT_SLOT(slotCalculationNeeded())); + connect(dia->calendarList, TQT_SIGNAL(activated(int)), TQT_SLOT(slotCalendarChanged(int))); } @@ -192,7 +192,7 @@ KCommand *ResourceDialog::buildCommand(Part *part) { // static KCommand *ResourceDialog::buildCommand(Resource *original, Resource &resource, Part *part) { KMacroCommand *m=0; - QString n = i18n("Modify Resource"); + TQString n = i18n("Modify Resource"); if (resource.name() != original->name()) { if (!m) m = new KMacroCommand(n); m->addCommand(new ModifyResourceNameCmd(part, original, resource.name())); |