Fix Qt3 compilation of kdepim

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227976 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 vuotta sitten
vanhempi 1c93fca14d
commit 2d0cd39429

@ -54,7 +54,7 @@
#include <tqstringlist.h>
#include <tqtimer.h>
#include <tqwidgetlist.h>
#include <private/tqucomextra_p.h>
#include <tqucomextra_p.h>
#include <cerrno>
#include <sys/types.h>

@ -222,7 +222,7 @@ View::View( Part *part, TQWidget *tqparent, ActionManagerImpl* actionManager, co
m_shuttingDown = false;
m_displayingAboutPage = false;
m_currentFrame = 0L;
setFocusPolicy(Qt::StrongFocus);
setFocusPolicy(TQ_StrongFocus);
TQVBoxLayout *lt = new TQVBoxLayout( this );

@ -55,7 +55,7 @@
#include <tqmetaobject.h>
#include <tqpen.h>
#include <tqpainter.h>
#include <private/tqucomextra_p.h>
#include <tqucomextra_p.h>
#include <tqtimer.h>

@ -53,7 +53,7 @@
#include <tqscrollview.h>
#include <tqstring.h>
#include <tqvaluelist.h>
#include <private/tqucomextra_p.h>
#include <tqucomextra_p.h>
#include <cstdlib>
using std::abs;

@ -51,7 +51,7 @@ KAddressbookPart::KAddressbookPart( TQWidget *tqparentWidget, const char *widget
// create a canvas to insert our widget
TQWidget *canvas = new TQWidget( tqparentWidget, widgetName );
canvas->setFocusPolicy( Qt::ClickFocus );
canvas->setFocusPolicy( TQ_ClickFocus );
setWidget( canvas );
TQVBoxLayout *topLayout = new TQVBoxLayout( canvas );

@ -587,7 +587,7 @@ CardView::CardView( TQWidget *tqparent, const char *name )
viewport()->setMouseTracking( true );
viewport()->setFocusProxy( this );
viewport()->setFocusPolicy(Qt::WheelFocus );
viewport()->setFocusPolicy(TQ_WheelFocus );
viewport()->setBackgroundMode( PaletteBase );
connect( d->mTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( tryShowFullText() ) );

@ -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

@ -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

@ -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();
}

@ -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

@ -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));
}

@ -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();
}

@ -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
};

@ -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();
}

@ -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

@ -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

@ -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);

@ -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);
}
/******************************************************************************

@ -88,7 +88,7 @@ xQGanttBarViewPort::xQGanttBarViewPort(KGanttItem* toplevelitem,
recalc(); adjustSize();
setFocusPolicy(Qt::StrongFocus);
setFocusPolicy(TQ_StrongFocus);
_mode = Init;
}

@ -46,7 +46,7 @@ KWidgetList::KWidgetList( TQWidget *tqparent, const char *name )
addChild( d->mBox );
setResizePolicy( AutoOneFit );
setFocusPolicy( Qt::StrongFocus );
setFocusPolicy( TQ_StrongFocus );
viewport()->setFocus();
}
@ -264,7 +264,7 @@ KWidgetListItem::KWidgetListItem( KWidgetList *tqparent, const char *name )
mSelectionForegroundColor = KGlobalSettings::highlightedTextColor();
mSelectionBackgroundColor = KGlobalSettings::highlightColor();
setFocusPolicy( Qt::StrongFocus );
setFocusPolicy( TQ_StrongFocus );
}
KWidgetListItem::~KWidgetListItem()

@ -57,7 +57,7 @@ FolderRequester::FolderRequester( TQWidget *tqparent, KMFolderTree *tree )
tqsetSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
TQSizePolicy::Fixed ) );
setFocusPolicy( Qt::StrongFocus );
setFocusPolicy( TQ_StrongFocus );
}
//-----------------------------------------------------------------------------

@ -100,7 +100,7 @@ KMailPart::KMailPart(TQWidget *tqparentWidget, const char *widgetName,
// create a canvas to insert our widget
TQWidget *canvas = new TQWidget(tqparentWidget, widgetName);
canvas->setFocusPolicy(Qt::ClickFocus);
canvas->setFocusPolicy(TQ_ClickFocus);
setWidget(canvas);
KGlobal::iconLoader()->addAppDir("kmail");
#if 0
@ -125,7 +125,7 @@ KMailPart::KMailPart(TQWidget *tqparentWidget, const char *widgetName,
kapp->config());
TQVBoxLayout *topLayout = new TQVBoxLayout(canvas);
topLayout->addWidget(mainWidget);
mainWidget->setFocusPolicy(Qt::ClickFocus);
mainWidget->setFocusPolicy(TQ_ClickFocus);
mStatusBar = new KMailStatusBarExtension(this);
mStatusBar->addStatusBarItem( mainWidget->vacationScriptIndicator(), 2, false );

@ -250,10 +250,10 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
TQToolTip::add( mBtnCc, tip );
TQToolTip::add( mBtnBcc, tip );
mBtnTo->setFocusPolicy(Qt::NoFocus);
mBtnCc->setFocusPolicy(Qt::NoFocus);
mBtnBcc->setFocusPolicy(Qt::NoFocus);
//mBtnFrom->setFocusPolicy(Qt::NoFocus);
mBtnTo->setFocusPolicy(TQ_NoFocus);
mBtnCc->setFocusPolicy(TQ_NoFocus);
mBtnBcc->setFocusPolicy(TQ_NoFocus);
//mBtnFrom->setFocusPolicy(TQ_NoFocus);
connect(mBtnTo,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddrBookTo()));
connect(mBtnCc,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddrBookTo()));
@ -386,10 +386,10 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
setCaption( i18n("Composer") );
setMinimumSize(200,200);
mBtnIdentity->setFocusPolicy(Qt::NoFocus);
mBtnFcc->setFocusPolicy(Qt::NoFocus);
mBtnTransport->setFocusPolicy(Qt::NoFocus);
mBtnDictionary->setFocusPolicy( Qt::NoFocus );
mBtnIdentity->setFocusPolicy(TQ_NoFocus);
mBtnFcc->setFocusPolicy(TQ_NoFocus);
mBtnTransport->setFocusPolicy(TQ_NoFocus);
mBtnDictionary->setFocusPolicy( TQ_NoFocus );
mAtmListView = new AttachmentListView( this, mSplitter,
"attachment list view" );
@ -888,7 +888,7 @@ void KMComposeWin::slotView(void)
//This sucks awfully, but no, I cannot get an activated(int id) from
// actionContainer()
if (!TQT_TQOBJECT(sender())->isA("KToggleAction"))
if (!TQT_TQOBJECT_CONST(sender())->isA("KToggleAction"))
return;
KToggleAction *act = (KToggleAction *) sender();

@ -144,7 +144,7 @@ KMHeaders::KMHeaders(KMMainWidget *aOwner, TQWidget *tqparent,
connect(mPopup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotToggleColumn(int)));
setShowSortIndicator(true);
setFocusPolicy( Qt::WheelFocus );
setFocusPolicy( TQ_WheelFocus );
if (!pixmapsLoaded)
{

@ -2367,11 +2367,11 @@ void KMMessage::setHeaderField( const TQCString& aName, const TQString& bValue,
kdDebug(5006) << "aValue: \"" << aValue << "\"" << endl;
#endif
}
str = TQString(aName);
str = aName.data();
if (str[str.length()-1] != ':') str += ": ";
else str += ' ';
if ( !aValue.isEmpty() )
str += TQString(aValue);
str += aValue.data();
if (str[str.length()-1] != '\n') str += '\n';
field = new DwField(str, mMsg);
@ -3261,8 +3261,8 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart)
iM = parAV.tqfind('=');
if( -1 < iM )
{
parA = TQString(parAV.left( iM ));
parV = TQString(parAV.right( parAV.length() - iM - 1 ));
parA = parAV.left( iM ).data();
parV = parAV.right( parAV.length() - iM - 1 ).data();
if( ('"' == parV.at(0)) && ('"' == parV.at(parV.length()-1)) )
{
parV.erase( 0, 1);
@ -3271,7 +3271,7 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart)
}
else
{
parA = TQString(parAV);
parA = parAV.data();
parV = "";
}
DwParameter *param;

@ -988,7 +988,7 @@ void KMReaderWin::writeConfig( bool sync ) const {
//-----------------------------------------------------------------------------
void KMReaderWin::initHtmlWidget(void)
{
mViewer->widget()->setFocusPolicy(Qt::WheelFocus);
mViewer->widget()->setFocusPolicy(TQ_WheelFocus);
// Let's better be paranoid and disable plugins (it defaults to enabled):
mViewer->setPluginsEnabled(false);
mViewer->setJScriptEnabled(false); // just make this explicit

@ -1952,7 +1952,7 @@ bool MessageComposer::processStructuringInfo( const TQString bugURL,
//kdDebug(5006) << "processStructuringInfo: mainHeader=" << mainHeader << endl;
DwString mainDwStr;
mainDwStr = TQString(mainHeader + "\n\n");
mainDwStr = TQCString(mainHeader + "\n\n").data();
DwBodyPart mainDwPa( mainDwStr, 0 );
mainDwPa.Parse();
KMMessage::bodyPart( &mainDwPa, &resultingPart );

@ -1047,21 +1047,21 @@ namespace KMail {
const TQCString delimZ2("--__--__--\n\n_____________");
const TQCString delimZ1("--__--__--\r\n\r\n_____________");
TQCString partStr, digestHeaderStr;
int thisDelim = cstr.tqfind(TQString(delim1), 0, false);
int thisDelim = cstr.tqfind(delim1.data(), 0, false);
if ( thisDelim == -1 )
thisDelim = cstr.tqfind(TQString(delim2), 0, false);
thisDelim = cstr.tqfind(delim2.data(), 0, false);
if ( thisDelim == -1 ) {
kdDebug(5006) << " Sorry: Old style Mailman message but no delimiter found." << endl;
return false;
}
int nextDelim = cstr.tqfind(TQString(delim1), thisDelim+1, false);
int nextDelim = cstr.tqfind(delim1.data(), thisDelim+1, false);
if ( -1 == nextDelim )
nextDelim = cstr.tqfind(TQString(delim2), thisDelim+1, false);
nextDelim = cstr.tqfind(delim2.data(), thisDelim+1, false);
if ( -1 == nextDelim )
nextDelim = cstr.tqfind(TQString(delimZ1), thisDelim+1, false);
nextDelim = cstr.tqfind(delimZ1.data(), thisDelim+1, false);
if ( -1 == nextDelim )
nextDelim = cstr.tqfind(TQString(delimZ2), thisDelim+1, false);
nextDelim = cstr.tqfind(delimZ2.data(), thisDelim+1, false);
if ( nextDelim < 0)
return false;
@ -1101,7 +1101,7 @@ namespace KMail {
partStr += cstr.mid( thisDelim, nextDelim-thisDelim );
TQCString subject("embedded message");
TQCString subSearch("\nSubject:");
int subPos = partStr.tqfind(TQString(subSearch), 0, false);
int subPos = partStr.tqfind(subSearch.data(), 0, false);
if ( -1 < subPos ){
subject = partStr.mid(subPos+subSearch.length());
thisEoL = subject.tqfind('\n');
@ -1114,13 +1114,13 @@ namespace KMail {
subject, true );
//mReader->queueHtml("<br><hr><br>");
thisDelim = nextDelim+1;
nextDelim = cstr.tqfind(TQString(delim1), thisDelim, false);
nextDelim = cstr.tqfind(delim1.data(), thisDelim, false);
if ( -1 == nextDelim )
nextDelim = cstr.tqfind(TQString(delim2), thisDelim, false);
nextDelim = cstr.tqfind(delim2.data(), thisDelim, false);
if ( -1 == nextDelim )
nextDelim = cstr.tqfind(TQString(delimZ1), thisDelim, false);
nextDelim = cstr.tqfind(delimZ1.data(), thisDelim, false);
if ( -1 == nextDelim )
nextDelim = cstr.tqfind(TQString(delimZ2), thisDelim, false);
nextDelim = cstr.tqfind(delimZ2.data(), thisDelim, false);
}
// reset curent node's Content-Type
curNode->setType( DwMime::kTypeText );

@ -98,13 +98,13 @@ ArticleWidget::ArticleWidget( TQWidget *tqparent,
TQHBoxLayout *box = new TQHBoxLayout( this );
mViewer = new KHTMLPart( this, "mViewer" );
box->addWidget( mViewer->widget() );
mViewer->widget()->setFocusPolicy( Qt::WheelFocus );
mViewer->widget()->setFocusPolicy( TQ_WheelFocus );
mViewer->setPluginsEnabled( false );
mViewer->setJScriptEnabled( false );
mViewer->setJavaEnabled( false );
mViewer->setMetaRefreshEnabled( false );
mViewer->setOnlyLocalReferences( true );
mViewer->view()->setFocusPolicy( Qt::WheelFocus );
mViewer->view()->setFocusPolicy( TQ_WheelFocus );
connect( mViewer->browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL&, const KParts::URLArgs&)),
TQT_SLOT(slotURLClicked(const KURL&)) );
connect( mViewer, TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)),

@ -177,7 +177,7 @@ void KNGroupDialog::setButtonDirection(arrowButton b, arrowDirection d)
void KNGroupDialog::slotItemSelected(TQListViewItem *it)
{
const TQObject *s=TQT_TQOBJECT(sender());
const TQObject *s=TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()));
if(TQT_BASE_OBJECT_CONST(s)==TQT_BASE_OBJECT(subView)) {

@ -114,7 +114,7 @@ TQString KNGroupSelectDialog::selectedGroups()const
void KNGroupSelectDialog::slotItemSelected(TQListViewItem *it)
{
const TQObject *s=TQT_TQOBJECT(sender());
const TQObject *s=TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()));
if(TQT_BASE_OBJECT_CONST(s)==TQT_BASE_OBJECT(groupView)) {
selView->clearSelection();

@ -68,13 +68,13 @@ KNodePart::KNodePart(TQWidget *tqparentWidget, const char *widgetName,
// create a canvas to insert our widget
TQWidget *canvas = new TQWidget(tqparentWidget, widgetName);
canvas->setFocusPolicy(Qt::ClickFocus);
canvas->setFocusPolicy(TQ_ClickFocus);
setWidget(canvas);
mainWidget = new KNMainWidget( this, false, canvas, "knode_widget" );
TQVBoxLayout *topLayout = new TQVBoxLayout(canvas);
topLayout->addWidget(mainWidget);
mainWidget->setFocusPolicy(Qt::ClickFocus);
mainWidget->setFocusPolicy(TQ_ClickFocus);
kapp->dcopClient()->resume(); // Ok. We are ready for DCOP requests.

@ -410,7 +410,7 @@ TQString KNHelper::rewrapStringList(TQStringList text, int wrapAt, TQChar quoteC
if (!alwaysSpace && (thisLine[0]==quoteChar))
thisLine.prepend(quoteChar); // second quote level without space
else
thisLine.prepend(quoteChar+TQString(' '));
thisLine.prepend(TQString(quoteChar)+' ');
thisPrefix=TQString();
TQChar c;

@ -33,7 +33,7 @@
KNoteButton::KNoteButton( const TQString& icon, TQWidget *tqparent, const char *name )
: TQPushButton( tqparent, name )
{
setFocusPolicy( Qt::NoFocus );
setFocusPolicy( TQ_NoFocus );
tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
m_flat = true;

@ -488,7 +488,7 @@ void KNotesApp::mousePressEvent( TQMouseEvent* e )
void KNotesApp::slotShowNote()
{
// tell the WM to give this note focus
showNote( TQString::fromUtf8( TQT_TQOBJECT(sender())->name() ) );
showNote( TQString::fromUtf8( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() ) );
}
void KNotesApp::slotWalkThroughNotes()

@ -364,7 +364,7 @@ void SummaryViewPart::initGUI( Kontact::Core *core )
mMainWidget = new TQFrame( sv->viewport() );
sv->addChild( mMainWidget );
mMainWidget->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
sv->setFocusPolicy( Qt::StrongFocus );
sv->setFocusPolicy( TQ_StrongFocus );
setWidget( sv );
mMainLayout = new TQVBoxLayout( mMainWidget,KDialog::marginHint(),

@ -265,7 +265,7 @@ Navigator::Navigator( IconSidePane *tqparent, const char *name )
setHScrollBarMode( TQScrollView::AlwaysOff );
setAcceptDrops( true );
setFocusPolicy( Qt::NoFocus );
setFocusPolicy( TQ_NoFocus );
connect( this, TQT_SIGNAL( selectionChanged( TQListBoxItem* ) ),
TQT_SLOT( slotExecuted( TQListBoxItem* ) ) );

@ -313,7 +313,7 @@ void MainWindow::initAboutScreen()
mPartsStack->addWidget( introbox );
mPartsStack->raiseWidget( introbox );
mIntroPart = new KHTMLPart( introbox );
mIntroPart->widget()->setFocusPolicy( Qt::WheelFocus );
mIntroPart->widget()->setFocusPolicy( TQ_WheelFocus );
// Let's better be paranoid and disable plugins (it defaults to enabled):
mIntroPart->setPluginsEnabled( false );
mIntroPart->setJScriptEnabled( false ); // just make this explicit

@ -255,7 +255,7 @@ void KOAgenda::init()
// Grab key strokes for keyboard navigation of agenda. Seems to have no
// effect. Has to be fixed.
setFocusPolicy( Qt::WheelFocus );
setFocusPolicy( TQ_WheelFocus );
connect( &mScrollUpTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( scrollUp() ) );
connect( &mScrollDownTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( scrollDown() ) );
@ -291,7 +291,7 @@ void KOAgenda::init()
viewport()->update();
viewport()->setBackgroundMode( NoBackground );
viewport()->setFocusPolicy( Qt::WheelFocus );
viewport()->setFocusPolicy( TQ_WheelFocus );
setMinimumSize( 30, int( mGridSpacingY + 1 ) );
// setMaximumHeight(mGridSpacingY * mRows + 5);

@ -81,7 +81,7 @@ KOrganizerPart::KOrganizerPart( TQWidget *tqparentWidget, const char *widgetName
// create a canvas to insert our widget
TQWidget *canvas = new TQWidget( tqparentWidget, widgetName );
canvas->setFocusPolicy( Qt::ClickFocus );
canvas->setFocusPolicy( TQ_ClickFocus );
setWidget( canvas );
mView = new CalendarView( canvas );

@ -217,7 +217,7 @@ void qt_leave_modal( TQWidget *widget );
void ResourceGroupwareBase::enter_loop()
{
TQWidget dummy(0,0,WType_Dialog | WShowModal);
dummy.setFocusPolicy( Qt::NoFocus );
dummy.setFocusPolicy( TQ_NoFocus );
qt_enter_modal(&dummy);
tqApp->enter_loop();
qt_leave_modal(&dummy);

@ -1133,11 +1133,11 @@ FreeBusy *ICalFormatImpl::readFreeBusy(icalcomponent *vfreebusy)
while ( param ) {
if ( strncmp( icalparameter_get_xname( param ), "X-SUMMARY", 9 ) == 0 ) {
period.setSummary( TQString::fromUtf8(
KCodecs::base64Decode( TQByteArray( icalparameter_get_xvalue( param ) ) ) ) );
KCodecs::base64Decode( TQCString( icalparameter_get_xvalue( param ) ) ) ) );
}
if ( strncmp( icalparameter_get_xname( param ), "X-LOCATION", 10 ) == 0 ) {
period.setLocation( TQString::fromUtf8(
KCodecs::base64Decode( TQByteArray( icalparameter_get_xvalue( param ) ) ) ) );
KCodecs::base64Decode( TQCString( icalparameter_get_xvalue( param ) ) ) ) );
}
param = icalproperty_get_next_parameter( p, ICAL_X_PARAMETER );
}

@ -225,12 +225,12 @@ CompletionOrderEditor::CompletionOrderEditor( KPIM::LdapSearch* ldapSearch,
mUpButton = new KPushButton( upDownBox, "mUpButton" );
mUpButton->setIconSet( BarIconSet( "up", KIcon::SizeSmall ) );
mUpButton->setEnabled( false ); // b/c no item is selected yet
mUpButton->setFocusPolicy( Qt::StrongFocus );
mUpButton->setFocusPolicy( TQ_StrongFocus );
mDownButton = new KPushButton( upDownBox, "mDownButton" );
mDownButton->setIconSet( BarIconSet( "down", KIcon::SizeSmall ) );
mDownButton->setEnabled( false ); // b/c no item is selected yet
mDownButton->setFocusPolicy( Qt::StrongFocus );
mDownButton->setFocusPolicy( TQ_StrongFocus );
TQWidget* spacer = new TQWidget( upDownBox );
upDownBox->setStretchFactor( spacer, 100 );

@ -249,7 +249,7 @@ void KIncidenceChooser::showIncidence1()
void KIncidenceChooser::detailsDialogClosed()
{
KDialogBase* dialog = static_cast<KDialogBase *>( const_cast<TQWidget *>( TQT_TQWIDGET(sender()) ) );
KDialogBase* dialog = static_cast<KDialogBase *>( TQT_TQWIDGET( const_cast<TQT_BASE_OBJECT_NAME*>(sender()) ) );
if ( dialog == mTbL )
mShowDetails1->setText( i18n( "Show details..." ) );
else

@ -126,7 +126,7 @@ KTimeEdit::KTimeEdit( TQWidget *tqparent, TQTime qt, const char *name )
insertItem( KGlobal::locale()->formatTime( TQTime( 23, 59, 59 ) ) );
updateText();
setFocusPolicy(Qt::StrongFocus);
setFocusPolicy(TQ_StrongFocus);
connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(active(int)));
connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(hilit(int)));

Ladataan…
Peruuta
Tallenna