diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-15 01:44:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-15 01:44:26 +0000 |
commit | 2d0cd394291d27533313adaf3dfdcd2eb92f61da (patch) | |
tree | f54a0d39f384783af4982dc9b153d1ab563261e3 /kalarm | |
parent | 1c93fca14d9ce37499bcfdf994c660186a0b6f17 (diff) | |
download | tdepim-2d0cd394291d27533313adaf3dfdcd2eb92f61da.tar.gz tdepim-2d0cd394291d27533313adaf3dfdcd2eb92f61da.zip |
Fix Qt3 compilation of kdepim
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227976 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm')
-rw-r--r-- | kalarm/dcophandler.cpp | 305 | ||||
-rw-r--r-- | kalarm/dcophandler.h | 13 | ||||
-rw-r--r-- | kalarm/lib/checkbox.cpp | 2 | ||||
-rw-r--r-- | kalarm/lib/checkbox.h | 2 | ||||
-rw-r--r-- | kalarm/lib/label.cpp | 2 | ||||
-rw-r--r-- | kalarm/lib/pushbutton.cpp | 2 | ||||
-rw-r--r-- | kalarm/lib/pushbutton.h | 2 | ||||
-rw-r--r-- | kalarm/lib/radiobutton.cpp | 2 | ||||
-rw-r--r-- | kalarm/lib/radiobutton.h | 2 | ||||
-rw-r--r-- | kalarm/lib/spinbox2.cpp | 2 | ||||
-rw-r--r-- | kalarm/messagewin.cpp | 6 | ||||
-rw-r--r-- | kalarm/recurrenceedit.cpp | 2 |
12 files changed, 12 insertions, 330 deletions
diff --git a/kalarm/dcophandler.cpp b/kalarm/dcophandler.cpp index c76f2a7fb..7f49ca573 100644 --- a/kalarm/dcophandler.cpp +++ b/kalarm/dcophandler.cpp @@ -36,9 +36,6 @@ #include "dcophandler.moc" static const char* DCOP_OBJECT_NAME = "request"; // DCOP name of KAlarm's request interface -#ifdef OLD_DCOP -static const char* DCOP_OLD_OBJECT_NAME = "display"; -#endif /*============================================================================= @@ -465,305 +462,3 @@ bool DcopHandler::convertRecurrence(KARecurrence& recurrence, const DateTime& st recurrence.set(type, recurInterval, recurCount, start, end); return true; } - - -#ifdef OLD_DCOP -/*============================================================================= -= DcopHandlerOld -= This class's function is simply to act as a receiver for DCOP requests. -=============================================================================*/ -DcopHandlerOld::DcopHandlerOld() - : TQWidget(), - DCOPObject(DCOP_OLD_OBJECT_NAME) -{ - kdDebug(5950) << "DcopHandlerOld::DcopHandlerOld()\n"; -} - -/****************************************************************************** -* Process a DCOP request. -*/ -bool DcopHandlerOld::process(const TQCString& func, const TQByteArray& data, TQCString& replyType, TQByteArray&) -{ - kdDebug(5950) << "DcopHandlerOld::process(): " << func << endl; - enum - { - OPERATION = 0x0007, // tqmask for main operation - HANDLE = 0x0001, - CANCEL = 0x0002, - TRIGGER = 0x0003, - SCHEDULE = 0x0004, - ALARM_TYPE = 0x00F0, // tqmask for SCHEDULE alarm type - MESSAGE = 0x0010, - FILE = 0x0020, - COMMAND = 0x0030, - EMAIL = 0x0040, - SCH_FLAGS = 0x0F00, // tqmask for SCHEDULE flags - REP_COUNT = 0x0100, - REP_END = 0x0200, - FONT = 0x0400, - PRE_096 = 0x1000, // old-style pre-0.9.6 deprecated method - PRE_091 = 0x2000 | PRE_096 // old-style pre-0.9.1 deprecated method - }; - replyType = "void"; - int function; - if (func == "handleEvent(const TQString&,const TQString&)" - || func == "handleEvent(TQString,TQString)") - function = HANDLE; - else if (func == "cancelEvent(const TQString&,const TQString&)" - || func == "cancelEvent(TQString,TQString)") - function = CANCEL; - else if (func == "triggerEvent(const TQString&,const TQString&)" - || func == "triggerEvent(TQString,TQString)") - function = TRIGGER; - - // scheduleMessage(message, dateTime, colour, colourfg, flags, audioURL, reminder, recurrence) - else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,const TQString&)" - || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQColor,TQ_UINT32,TQString,TQ_UINT32,TQString)") - function = SCHEDULE | MESSAGE; - // scheduleMessage(message, dateTime, colour, colourfg, font, flags, audioURL, reminder, recurrence) - else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQColor&,const TQFont&,TQ_UINT32,const TQString&,TQ_INT32,const TQString&)" - || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQColor,TQFont,TQ_UINT32,TQString,TQ_UINT32,TQString)") - function = SCHEDULE | MESSAGE | FONT; - // scheduleFile(URL, dateTime, colour, flags, audioURL, reminder, recurrence) - else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,TQ_INT32,const TQString&)" - || func == "scheduleFile(TQString,TQDateTime,TQColor,TQ_UINT32,TQString,TQ_UINT32,TQString)") - function = SCHEDULE | FILE; - // scheduleCommand(commandLine, dateTime, flags, recurrence) - else if (func == "scheduleCommand(const TQString&,const TQDateTime&,TQ_UINT32,const TQString&)" - || func == "scheduleCommand(TQString,TQDateTime,TQ_UINT32,TQString)") - function = SCHEDULE | COMMAND; - // scheduleEmail(addresses, subject, message, attachments, dateTime, flags, recurrence) - else if (func == "scheduleEmail(const TQString&,const TQString&,const TQString&,const TQString&,const TQDateTime&,TQ_UINT32,const TQString&)" - || func == "scheduleEmail(TQString,TQString,TQString,TQString,TQDateTime,TQ_UINT32,TQString)") - function = SCHEDULE | EMAIL; - - // scheduleMessage(message, dateTime, colour, colourfg, flags, audioURL, reminder, recurType, interval, recurCount) - else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,TQ_INT32,TQ_INT32,TQ_INT32)" - || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQColor,TQ_UINT32,TQString,TQ_INT32,TQ_INT32,TQ_INT32,TQ_INT32)") - function = SCHEDULE | MESSAGE | REP_COUNT; - // scheduleFile(URL, dateTime, colour, flags, audioURL, reminder, recurType, interval, recurCount) - else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,TQ_INT32,TQ_INT32,TQ_INT32)" - || func == "scheduleFile(TQString,TQDateTime,TQColor,TQ_UINT32,TQString,TQ_INT32,TQ_INT32,TQ_INT32,TQ_INT32)") - function = SCHEDULE | FILE | REP_COUNT; - // scheduleCommand(commandLine, dateTime, flags, recurType, interval, recurCount) - else if (func == "scheduleCommand(const TQString&,const TQDateTime&,TQ_UINT32,TQ_INT32,TQ_INT32,TQ_INT32)" - || func == "scheduleCommand(TQString,TQDateTime,TQ_UINT32,TQ_INT32,TQ_INT32,TQ_INT32)") - function = SCHEDULE | COMMAND | REP_COUNT; - // scheduleEmail(addresses, subject, message, attachments, dateTime, flags, recurType, interval, recurCount) - else if (func == "scheduleEmail(const TQString&,const TQString&,const TQString&,const TQString&,const TQDateTime&,TQ_UINT32,TQ_INT32,TQ_INT32,TQ_INT32)" - || func == "scheduleEmail(TQString,TQString,TQString,TQString,TQDateTime,TQ_UINT32,TQ_INT32,TQ_INT32,TQ_INT32)") - function = SCHEDULE | EMAIL | REP_COUNT; - - // scheduleMessage(message, dateTime, colour, colourfg, flags, audioURL, reminder, recurType, interval, endTime) - else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,TQ_INT32,TQ_INT32,const TQDateTime&)" - || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQColor,TQ_UINT32,TQString,TQ_INT32,TQ_INT32,TQ_INT32,TQDateTime)") - function = SCHEDULE | MESSAGE | REP_END; - // scheduleFile(URL, dateTime, colour, flags, audioURL, reminder, recurType, interval, endTime) - else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,TQ_INT32,TQ_INT32,const TQDateTime&)" - || func == "scheduleFile(TQString,TQDateTime,TQColor,TQ_UINT32,TQString,TQ_INT32,TQ_INT32,TQ_INT32,TQDateTime)") - function = SCHEDULE | FILE | REP_END; - // scheduleCommand(commandLine, dateTime, flags, recurType, interval, endTime) - else if (func == "scheduleCommand(const TQString&,const TQDateTime&,TQ_UINT32,TQ_INT32,TQ_INT32,const TQDateTime&)" - || func == "scheduleCommand(TQString,TQDateTime,TQ_UINT32,TQ_INT32,TQ_INT32,TQDateTime)") - function = SCHEDULE | COMMAND | REP_END; - // scheduleEmail(addresses, subject, message, attachments, dateTime, flags, recurType, interval, endTime) - else if (func == "scheduleEmail(const TQString&,const TQString&,const TQString&,const TQString&,const TQDateTime&,TQ_UINT32,TQ_INT32,TQ_INT32,const TQDateTime&)" - || func == "scheduleEmail(TQString,TQString,TQString,TQString,TQDateTime,TQ_UINT32,TQ_INT32,TQ_INT32,TQDateTime)") - function = SCHEDULE | EMAIL | REP_END; - - // Deprecated methods: backwards compatibility with KAlarm pre-0.9.6 - // scheduleMessage(message, dateTime, colour, flags, audioURL, reminder, recurrence) - else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,const TQString&)" - || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQ_UINT32,TQString,TQ_UINT32,TQString)") - function = SCHEDULE | MESSAGE | PRE_096; - // scheduleMessage(message, dateTime, colour, font, flags, audioURL, reminder, recurrence) - else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQFont&,TQ_UINT32,const TQString&,TQ_INT32,const TQString&)" - || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQFont,TQ_UINT32,TQString,TQ_UINT32,TQString)") - function = SCHEDULE | MESSAGE | FONT | PRE_096; - // scheduleMessage(message, dateTime, colour, flags, audioURL, reminder, recurType, interval, recurCount) - else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,TQ_INT32,TQ_INT32,TQ_INT32)" - || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQ_UINT32,TQString,TQ_INT32,TQ_INT32,TQ_INT32,TQ_INT32)") - function = SCHEDULE | MESSAGE | REP_COUNT | PRE_096; - // scheduleMessage(message, dateTime, colour, flags, audioURL, reminder, recurType, interval, endTime) - else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,TQ_INT32,TQ_INT32,const TQDateTime&)" - || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQ_UINT32,TQString,TQ_INT32,TQ_INT32,TQ_INT32,TQDateTime)") - function = SCHEDULE | MESSAGE | REP_END | PRE_096; - - // Deprecated methods: backwards compatibility with KAlarm pre-0.9.1 - // scheduleMessage(message, dateTime, colour, flags, audioURL) - else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,const TQString&)" - || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQ_UINT32,TQString)") - function = SCHEDULE | MESSAGE | PRE_091; - // scheduleFile(URL, dateTime, colour, flags, audioURL) - else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,const TQString&)" - || func == "scheduleFile(TQString,TQDateTime,TQColor,TQ_UINT32,TQString)") - function = SCHEDULE | FILE | PRE_091; - // scheduleMessage(message, dateTime, colour, flags, audioURL, recurType, interval, recurCount) - else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,TQ_INT32,TQ_INT32)" - || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQ_UINT32,TQString,TQ_INT32,TQ_INT32,TQ_INT32)") - function = SCHEDULE | MESSAGE | REP_COUNT | PRE_091; - // scheduleFile(URL, dateTime, colour, flags, audioURL, recurType, interval, recurCount) - else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,TQ_INT32,TQ_INT32)" - || func == "scheduleFile(TQString,TQDateTime,TQColor,TQ_UINT32,TQString,TQ_INT32,TQ_INT32,TQ_INT32)") - function = SCHEDULE | FILE | REP_COUNT | PRE_091; - // scheduleMessage(message, dateTime, colour, flags, audioURL, recurType, interval, endTime) - else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,TQ_INT32,const TQDateTime&)" - || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQ_UINT32,TQString,TQ_INT32,TQ_INT32,TQDateTime)") - function = SCHEDULE | MESSAGE | REP_END | PRE_091; - // scheduleFile(URL, dateTime, colour, flags, audioURL, recurType, interval, endTime) - else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,const TQString&,TQ_INT32,TQ_INT32,const TQDateTime&)" - || func == "scheduleFile(TQString,TQDateTime,TQColor,TQ_UINT32,TQString,TQ_INT32,TQ_INT32,TQDateTime)") - function = SCHEDULE | FILE | REP_END | PRE_091; - - // Obsolete methods: backwards compatibility with KAlarm pre-0.7 - else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,TQ_INT32,TQ_INT32)" - || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQ_UINT32,TQ_INT32,TQ_INT32)" - || func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,TQ_UINT32,TQ_INT32,TQ_INT32)" - || func == "scheduleFile(TQString,TQDateTime,TQColor,TQ_UINT32,TQ_INT32,TQ_INT32)" - || func == "scheduleCommand(const TQString&,const TQDateTime&,TQ_UINT32,TQ_INT32,TQ_INT32)" - || func == "scheduleCommand(TQString,TQDateTime,TQ_UINT32,TQ_INT32,TQ_INT32)" - // Obsolete methods: backwards compatibility with KAlarm pre-0.6 - || func == "cancelMessage(const TQString&,const TQString&)" - || func == "cancelMessage(TQString,TQString)" - || func == "displayMessage(const TQString&,const TQString&)" - || func == "displayMessage(TQString,TQString)") - { - kdError(5950) << "DcopHandlerOld::process(): obsolete DCOP function call: '" << func << "'" << endl; - return false; - } - else - { - kdError(5950) << "DcopHandlerOld::process(): unknown DCOP function" << endl; - return false; - } - - switch (function & OPERATION) - { - case HANDLE: // trigger or cancel event with specified ID from calendar file - case CANCEL: // cancel event with specified ID from calendar file - case TRIGGER: // trigger event with specified ID in calendar file - { - - TQDataStream arg(data, IO_ReadOnly); - TQString urlString, vuid; - arg >> urlString >> vuid; - switch (function) - { - case HANDLE: - return theApp()->handleEvent(urlString, vuid); - case CANCEL: - return theApp()->deleteEvent(urlString, vuid); - case TRIGGER: - return theApp()->triggerEvent(urlString, vuid); - } - break; - } - case SCHEDULE: // schedule a new event - { - KAEvent::Action action; - switch (function & ALARM_TYPE) - { - case MESSAGE: action = KAEvent::MESSAGE; break; - case FILE: action = KAEvent::FILE; break; - case COMMAND: action = KAEvent::COMMAND; break; - case EMAIL: action = KAEvent::EMAIL; break; - default: return false; - } - TQDataStream arg(data, IO_ReadOnly); - TQString text, audioFile, mailSubject; - float audioVolume = -1; - EmailAddressList mailAddresses; - TQStringList mailAttachments; - TQDateTime dateTime, endTime; - TQColor bgColour; - TQColor fgColour(TQt::black); - TQFont font; - TQ_UINT32 flags; - int lateCancel = 0; - KARecurrence recurrence; - TQ_INT32 reminderMinutes = 0; - if (action == KAEvent::EMAIL) - { - TQString addresses, attachments; - arg >> addresses >> mailSubject >> text >> attachments; - TQString bad = KAMail::convertAddresses(addresses, mailAddresses); - if (!bad.isEmpty()) - { - kdError(5950) << "DcopHandlerOld::process(): invalid email addresses: " << bad << endl; - return false; - } - if (mailAddresses.isEmpty()) - { - kdError(5950) << "DcopHandlerOld::process(): no email address\n"; - return false; - } - bad = KAMail::convertAttachments(attachments, mailAttachments); - if (!bad.isEmpty()) - { - kdError(5950) << "DcopHandlerOld::process(): invalid email attachment: " << bad << endl; - return false; - } - } - else - arg >> text; - arg.readRawBytes((char*)&dateTime, sizeof(dateTime)); - if (action != KAEvent::COMMAND) - arg.readRawBytes((char*)&bgColour, sizeof(bgColour)); - if (action == KAEvent::MESSAGE && !(function & PRE_096)) - arg.readRawBytes((char*)&fgColour, sizeof(fgColour)); - if (function & FONT) - { - arg.readRawBytes((char*)&font, sizeof(font)); - arg >> flags; - } - else - { - arg >> flags; - flags |= KAEvent::DEFAULT_FONT; - } - if (flags & KAEvent::LATE_CANCEL) - lateCancel = 1; - if (action == KAEvent::MESSAGE || action == KAEvent::FILE) - { - arg >> audioFile; - if (!(function & PRE_091)) - arg >> reminderMinutes; - } - if (function & (REP_COUNT | REP_END)) - { - KARecurrence::Type recurType; - TQ_INT32 recurCount = 0; - TQ_INT32 recurInterval; - TQ_INT32 type; - arg >> type >> recurInterval; - switch (type) - { - case 1: recurType = KARecurrence::MINUTELY; break; - case 3: recurType = KARecurrence::DAILY; break; - case 4: recurType = KARecurrence::WEEKLY; break; - case 6: recurType = KARecurrence::MONTHLY_DAY; break; - case 7: recurType = KARecurrence::ANNUAL_DATE; break; - default: - kdError(5950) << "DcopHandlerOld::process(): invalid simple repetition type: " << type << endl; - return false; - } - if (function & REP_COUNT) - arg >> recurCount; - else - arg.readRawBytes((char*)&endTime, sizeof(endTime)); - recurrence.set(recurType, recurInterval, recurCount, - DateTime(dateTime, flags & KAEvent::ANY_TIME), endTime); - } - else if (!(function & PRE_091)) - { - TQString rule; - arg >> rule; - recurrence.set(rule); - } - return theApp()->scheduleEvent(action, text, dateTime, lateCancel, flags, bgColour, fgColour, font, audioFile, - audioVolume, reminderMinutes, recurrence, 0, 0, 0, mailAddresses, mailSubject, mailAttachments); - } - } - return false; -} -#endif // OLD_DCOP diff --git a/kalarm/dcophandler.h b/kalarm/dcophandler.h index 42a36d6a6..5dd791d7d 100644 --- a/kalarm/dcophandler.h +++ b/kalarm/dcophandler.h @@ -92,17 +92,4 @@ class DcopHandler : public TQWidget, virtual public KAlarmIface static bool convertRecurrence(KARecurrence&, const DateTime& start, int recurType, int recurInterval, int recurCount, const TQDateTime& end); }; - -#ifdef OLD_DCOP -class DcopHandlerOld : public TQWidget, public DCOPObject -{ - Q_OBJECT - TQ_OBJECT - public: - DcopHandlerOld(); - ~DcopHandlerOld() { } - virtual bool process(const TQCString& func, const TQByteArray& data, TQCString& replyType, TQByteArray& replyData); -}; -#endif - #endif // DCOPHANDLER_H diff --git a/kalarm/lib/checkbox.cpp b/kalarm/lib/checkbox.cpp index 1d9cabffb..b5bfde0ee 100644 --- a/kalarm/lib/checkbox.cpp +++ b/kalarm/lib/checkbox.cpp @@ -44,7 +44,7 @@ void CheckBox::setReadOnly(bool ro) if ((int)ro != (int)mReadOnly) { mReadOnly = ro; - setFocusPolicy(ro ? Qt::NoFocus : mFocusPolicy); + setFocusPolicy(ro ? TQ_NoFocus : mFocusPolicy); if (ro) clearFocus(); } diff --git a/kalarm/lib/checkbox.h b/kalarm/lib/checkbox.h index e535d4eab..61d6a1276 100644 --- a/kalarm/lib/checkbox.h +++ b/kalarm/lib/checkbox.h @@ -80,7 +80,7 @@ class CheckBox : public TQCheckBox protected slots: void slotClicked(); private: - Qt::FocusPolicy mFocusPolicy; // default focus policy for the TQCheckBox + TQ_FocusPolicy mFocusPolicy; // default focus policy for the TQCheckBox TQWidget* mFocusWidget; // widget to receive focus when button is clicked on bool mFocusWidgetEnable; // enable focus widget before setting focus bool mReadOnly; // value cannot be changed diff --git a/kalarm/lib/label.cpp b/kalarm/lib/label.cpp index d532b67e3..f4e6941ea 100644 --- a/kalarm/lib/label.cpp +++ b/kalarm/lib/label.cpp @@ -106,7 +106,7 @@ void Label::activated() LabelFocusWidget::LabelFocusWidget(TQWidget* tqparent, const char* name) : TQWidget(tqparent, name) { - setFocusPolicy(Qt::ClickFocus); + setFocusPolicy(TQ_ClickFocus); setFixedSize(TQSize(1,1)); } diff --git a/kalarm/lib/pushbutton.cpp b/kalarm/lib/pushbutton.cpp index c251fa3c5..883ad1812 100644 --- a/kalarm/lib/pushbutton.cpp +++ b/kalarm/lib/pushbutton.cpp @@ -44,7 +44,7 @@ void PushButton::setReadOnly(bool ro) if ((int)ro != (int)mReadOnly) { mReadOnly = ro; - setFocusPolicy(ro ? Qt::NoFocus : mFocusPolicy); + setFocusPolicy(ro ? TQ_NoFocus : mFocusPolicy); if (ro) clearFocus(); } diff --git a/kalarm/lib/pushbutton.h b/kalarm/lib/pushbutton.h index d0f4b0652..52c761bce 100644 --- a/kalarm/lib/pushbutton.h +++ b/kalarm/lib/pushbutton.h @@ -71,7 +71,7 @@ class PushButton : public TQPushButton virtual void keyPressEvent(TQKeyEvent*); virtual void keyReleaseEvent(TQKeyEvent*); private: - Qt::FocusPolicy mFocusPolicy; // default focus policy for the TQPushButton + TQ_FocusPolicy mFocusPolicy; // default focus policy for the TQPushButton bool mReadOnly; // value cannot be changed }; diff --git a/kalarm/lib/radiobutton.cpp b/kalarm/lib/radiobutton.cpp index f34a574e3..6331c06f5 100644 --- a/kalarm/lib/radiobutton.cpp +++ b/kalarm/lib/radiobutton.cpp @@ -44,7 +44,7 @@ void RadioButton::setReadOnly(bool ro) if ((int)ro != (int)mReadOnly) { mReadOnly = ro; - setFocusPolicy(ro ? Qt::NoFocus : mFocusPolicy); + setFocusPolicy(ro ? TQ_NoFocus : mFocusPolicy); if (ro) clearFocus(); } diff --git a/kalarm/lib/radiobutton.h b/kalarm/lib/radiobutton.h index baa7cba39..2f924b24d 100644 --- a/kalarm/lib/radiobutton.h +++ b/kalarm/lib/radiobutton.h @@ -80,7 +80,7 @@ class RadioButton : public TQRadioButton protected slots: void slotClicked(); private: - Qt::FocusPolicy mFocusPolicy; // default focus policy for the TQRadioButton + TQ_FocusPolicy mFocusPolicy; // default focus policy for the TQRadioButton TQWidget* mFocusWidget; // widget to receive focus when button is clicked on bool mFocusWidgetEnable; // enable focus widget before setting focus bool mReadOnly; // value cannot be changed diff --git a/kalarm/lib/spinbox2.cpp b/kalarm/lib/spinbox2.cpp index 3d7cde021..197e83bd6 100644 --- a/kalarm/lib/spinbox2.cpp +++ b/kalarm/lib/spinbox2.cpp @@ -85,7 +85,7 @@ void SpinBox2::init() mSpinbox->setSelectOnStep(false); // default mUpdown2->setSelectOnStep(false); // always false setFocusProxy(mSpinbox); - mUpdown2->setFocusPolicy(Qt::NoFocus); + mUpdown2->setFocusPolicy(TQ_NoFocus); mSpinMirror = new SpinMirror(mUpdown2, mUpdown2Frame, this); if (!mirrorStyle(tqstyle())) mSpinMirror->hide(); // hide mirrored spin buttons when they are inappropriate diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp index 7bf51b0a6..30cac9789 100644 --- a/kalarm/messagewin.cpp +++ b/kalarm/messagewin.cpp @@ -510,7 +510,7 @@ void MessageWin::initView() mOkButton = new KPushButton(KStdGuiItem::close(), topWidget); // Prevent accidental acknowledgement of the message if the user is typing when the window appears mOkButton->clearFocus(); - mOkButton->setFocusPolicy(Qt::ClickFocus); // don't allow keyboard selection + mOkButton->setFocusPolicy(TQ_ClickFocus); // don't allow keyboard selection mOkButton->setFixedSize(mOkButton->tqsizeHint()); connect(mOkButton, TQT_SIGNAL(clicked()), TQT_SLOT(close())); grid->addWidget(mOkButton, 0, gridIndex++, AlignHCenter); @@ -520,7 +520,7 @@ void MessageWin::initView() { // Edit button mEditButton = new TQPushButton(i18n("&Edit..."), topWidget); - mEditButton->setFocusPolicy(Qt::ClickFocus); // don't allow keyboard selection + mEditButton->setFocusPolicy(TQ_ClickFocus); // don't allow keyboard selection mEditButton->setFixedSize(mEditButton->tqsizeHint()); connect(mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit())); grid->addWidget(mEditButton, 0, gridIndex++, AlignHCenter); @@ -531,7 +531,7 @@ void MessageWin::initView() { // Defer button mDeferButton = new TQPushButton(i18n("&Defer..."), topWidget); - mDeferButton->setFocusPolicy(Qt::ClickFocus); // don't allow keyboard selection + mDeferButton->setFocusPolicy(TQ_ClickFocus); // don't allow keyboard selection mDeferButton->setFixedSize(mDeferButton->tqsizeHint()); connect(mDeferButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefer())); grid->addWidget(mDeferButton, 0, gridIndex++, AlignHCenter); diff --git a/kalarm/recurrenceedit.cpp b/kalarm/recurrenceedit.cpp index e360ef49c..264824b3c 100644 --- a/kalarm/recurrenceedit.cpp +++ b/kalarm/recurrenceedit.cpp @@ -619,7 +619,7 @@ void RecurrenceEdit::enableExceptionButtons() mChangeExceptionButton->setEnabled(enable); // Prevent the exceptions list box receiving keyboard focus is it's empty - mExceptionDateList->setFocusPolicy(mExceptionDateList->count() ? Qt::WheelFocus : Qt::NoFocus); + mExceptionDateList->setFocusPolicy(mExceptionDateList->count() ? TQ_WheelFocus : TQ_NoFocus); } /****************************************************************************** |