summaryrefslogtreecommitdiffstats
path: root/kmail/rulewidgethandlermanager.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 /kmail/rulewidgethandlermanager.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 'kmail/rulewidgethandlermanager.cpp')
-rw-r--r--kmail/rulewidgethandlermanager.cpp680
1 files changed, 340 insertions, 340 deletions
diff --git a/kmail/rulewidgethandlermanager.cpp b/kmail/rulewidgethandlermanager.cpp
index c965db35b..016b8a577 100644
--- a/kmail/rulewidgethandlermanager.cpp
+++ b/kmail/rulewidgethandlermanager.cpp
@@ -42,11 +42,11 @@
#include <kdebug.h>
#include <kiconloader.h>
-#include <qwidgetstack.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qobject.h>
-#include <qobjectlist.h>
+#include <tqwidgetstack.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
#include <assert.h>
@@ -62,33 +62,33 @@ namespace {
TextRuleWidgetHandler() : KMail::RuleWidgetHandler() {}
~TextRuleWidgetHandler() {}
- QWidget * createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const;
- QWidget * createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const;
- KMSearchRule::Function function( const QCString & field,
- const QWidgetStack *functionStack ) const;
- QString value( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- QString prettyValue( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- bool handlesField( const QCString & field ) const;
- void reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
- bool setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ TQWidget * createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const;
+ TQWidget * createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const;
+ KMSearchRule::Function function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const;
+ TQString value( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ TQString prettyValue( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ bool handlesField( const TQCString & field ) const;
+ void reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
+ bool setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const;
- bool update( const QCString & field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
+ bool update( const TQCString & field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
private:
- KMSearchRule::Function currentFunction( const QWidgetStack *functionStack ) const;
- QString currentValue( const QWidgetStack *valueStack,
+ KMSearchRule::Function currentFunction( const TQWidgetStack *functionStack ) const;
+ TQString currentValue( const TQWidgetStack *valueStack,
KMSearchRule::Function func ) const;
};
@@ -97,33 +97,33 @@ namespace {
MessageRuleWidgetHandler() : KMail::RuleWidgetHandler() {}
~MessageRuleWidgetHandler() {}
- QWidget * createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const;
- QWidget * createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const;
- KMSearchRule::Function function( const QCString & field,
- const QWidgetStack *functionStack ) const;
- QString value( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- QString prettyValue( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- bool handlesField( const QCString & field ) const;
- void reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
- bool setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ TQWidget * createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const;
+ TQWidget * createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const;
+ KMSearchRule::Function function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const;
+ TQString value( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ TQString prettyValue( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ bool handlesField( const TQCString & field ) const;
+ void reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
+ bool setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const;
- bool update( const QCString & field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
+ bool update( const TQCString & field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
private:
- KMSearchRule::Function currentFunction( const QWidgetStack *functionStack ) const;
- QString currentValue( const QWidgetStack *valueStack,
+ KMSearchRule::Function currentFunction( const TQWidgetStack *functionStack ) const;
+ TQString currentValue( const TQWidgetStack *valueStack,
KMSearchRule::Function func ) const;
};
@@ -133,33 +133,33 @@ namespace {
StatusRuleWidgetHandler() : KMail::RuleWidgetHandler() {}
~StatusRuleWidgetHandler() {}
- QWidget * createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const;
- QWidget * createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const;
- KMSearchRule::Function function( const QCString & field,
- const QWidgetStack *functionStack ) const;
- QString value( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- QString prettyValue( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- bool handlesField( const QCString & field ) const;
- void reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
- bool setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ TQWidget * createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const;
+ TQWidget * createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const;
+ KMSearchRule::Function function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const;
+ TQString value( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ TQString prettyValue( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ bool handlesField( const TQCString & field ) const;
+ void reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
+ bool setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const;
- bool update( const QCString & field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
+ bool update( const TQCString & field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
private:
- KMSearchRule::Function currentFunction( const QWidgetStack *functionStack ) const;
- int currentStatusValue( const QWidgetStack *valueStack ) const;
+ KMSearchRule::Function currentFunction( const TQWidgetStack *functionStack ) const;
+ int currentStatusValue( const TQWidgetStack *valueStack ) const;
};
class NumericRuleWidgetHandler : public KMail::RuleWidgetHandler {
@@ -167,33 +167,33 @@ namespace {
NumericRuleWidgetHandler() : KMail::RuleWidgetHandler() {}
~NumericRuleWidgetHandler() {}
- QWidget * createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const;
- QWidget * createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const;
- KMSearchRule::Function function( const QCString & field,
- const QWidgetStack *functionStack ) const;
- QString value( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- QString prettyValue( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- bool handlesField( const QCString & field ) const;
- void reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
- bool setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ TQWidget * createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const;
+ TQWidget * createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const;
+ KMSearchRule::Function function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const;
+ TQString value( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ TQString prettyValue( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ bool handlesField( const TQCString & field ) const;
+ void reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
+ bool setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const;
- bool update( const QCString & field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
+ bool update( const TQCString & field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
private:
- KMSearchRule::Function currentFunction( const QWidgetStack *functionStack ) const;
- QString currentValue( const QWidgetStack *valueStack ) const;
+ KMSearchRule::Function currentFunction( const TQWidgetStack *functionStack ) const;
+ TQString currentValue( const TQWidgetStack *valueStack ) const;
};
}
@@ -231,9 +231,9 @@ namespace {
/** Returns the number of immediate children of parent with the given object
name. Used by RuleWidgetHandlerManager::createWidgets().
*/
- int childCount( const QObject *parent, const char *objName )
+ int childCount( const TQObject *parent, const char *objName )
{
- QObjectList *list = parent->queryList( 0, objName, false, false );
+ TQObjectList *list = parent->queryList( 0, objName, false, false );
if ( !list )
return 0;
const int count = list->count();
@@ -242,12 +242,12 @@ namespace {
}
}
-void KMail::RuleWidgetHandlerManager::createWidgets( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
- const QObject *receiver ) const
+void KMail::RuleWidgetHandlerManager::createWidgets( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const
{
for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) {
- QWidget *w = 0;
+ TQWidget *w = 0;
for ( int i = 0;
( w = (*it)->createFunctionWidget( i, functionStack, receiver ) );
++i ) {
@@ -281,8 +281,8 @@ void KMail::RuleWidgetHandlerManager::createWidgets( QWidgetStack *functionStack
}
}
-KMSearchRule::Function KMail::RuleWidgetHandlerManager::function( const QCString& field,
- const QWidgetStack *functionStack ) const
+KMSearchRule::Function KMail::RuleWidgetHandlerManager::function( const TQCString& field,
+ const TQWidgetStack *functionStack ) const
{
for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) {
const KMSearchRule::Function func = (*it)->function( field,
@@ -293,32 +293,32 @@ KMSearchRule::Function KMail::RuleWidgetHandlerManager::function( const QCString
return KMSearchRule::FuncNone;
}
-QString KMail::RuleWidgetHandlerManager::value( const QCString& field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const
+TQString KMail::RuleWidgetHandlerManager::value( const TQCString& field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const
{
for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) {
- const QString val = (*it)->value( field, functionStack, valueStack );
+ const TQString val = (*it)->value( field, functionStack, valueStack );
if ( !val.isEmpty() )
return val;
}
- return QString::null;
+ return TQString::null;
}
-QString KMail::RuleWidgetHandlerManager::prettyValue( const QCString& field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const
+TQString KMail::RuleWidgetHandlerManager::prettyValue( const TQCString& field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const
{
for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) {
- const QString val = (*it)->prettyValue( field, functionStack, valueStack );
+ const TQString val = (*it)->prettyValue( field, functionStack, valueStack );
if ( !val.isEmpty() )
return val;
}
- return QString::null;
+ return TQString::null;
}
-void KMail::RuleWidgetHandlerManager::reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+void KMail::RuleWidgetHandlerManager::reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) {
(*it)->reset( functionStack, valueStack );
@@ -326,8 +326,8 @@ void KMail::RuleWidgetHandlerManager::reset( QWidgetStack *functionStack,
update( "", functionStack, valueStack );
}
-void KMail::RuleWidgetHandlerManager::setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+void KMail::RuleWidgetHandlerManager::setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const
{
assert( rule );
@@ -338,9 +338,9 @@ void KMail::RuleWidgetHandlerManager::setRule( QWidgetStack *functionStack,
}
}
-void KMail::RuleWidgetHandlerManager::update( const QCString &field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+void KMail::RuleWidgetHandlerManager::update( const TQCString &field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
//kdDebug(5006) << "RuleWidgetHandlerManager::update( \"" << field
// << "\", ... )" << endl;
@@ -354,18 +354,18 @@ void KMail::RuleWidgetHandlerManager::update( const QCString &field,
namespace {
// FIXME (Qt >= 4.0):
- // This is a simplified and constified copy of QObject::child(). According
- // to a comment in qobject.h QObject::child() will be made const in Qt 4.0.
+ // This is a simplified and constified copy of TQObject::child(). According
+ // to a comment in tqobject.h TQObject::child() will be made const in Qt 4.0.
// So once we require Qt 4.0 this can be removed.
- QObject* QObject_child_const( const QObject *parent,
+ TQObject* QObject_child_const( const TQObject *parent,
const char *objName )
{
- const QObjectList *list = parent->children();
+ const TQObjectList *list = parent->children();
if ( !list )
return 0;
- QObjectListIterator it( *list );
- QObject *obj;
+ TQObjectListIterator it( *list );
+ TQObject *obj;
while ( ( obj = it.current() ) ) {
++it;
if ( !objName || qstrcmp( objName, obj->name() ) == 0 )
@@ -387,8 +387,8 @@ using KMail::RegExpLineEdit;
#include <klocale.h>
#include <knuminput.h>
-#include <qcombobox.h>
-#include <qlabel.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
//=============================================================================
//
@@ -419,48 +419,48 @@ namespace {
//---------------------------------------------------------------------------
- QWidget * TextRuleWidgetHandler::createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const
+ TQWidget * TextRuleWidgetHandler::createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const
{
if ( number != 0 )
return 0;
- QComboBox *funcCombo = new QComboBox( functionStack, "textRuleFuncCombo" );
+ TQComboBox *funcCombo = new TQComboBox( functionStack, "textRuleFuncCombo" );
for ( int i = 0; i < TextFunctionCount; ++i ) {
funcCombo->insertItem( i18n( TextFunctions[i].displayName ) );
}
funcCombo->adjustSize();
- QObject::connect( funcCombo, SIGNAL( activated( int ) ),
- receiver, SLOT( slotFunctionChanged() ) );
+ TQObject::connect( funcCombo, TQT_SIGNAL( activated( int ) ),
+ receiver, TQT_SLOT( slotFunctionChanged() ) );
return funcCombo;
}
//---------------------------------------------------------------------------
- QWidget * TextRuleWidgetHandler::createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const
+ TQWidget * TextRuleWidgetHandler::createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const
{
if ( number == 0 ) {
RegExpLineEdit *lineEdit =
new RegExpLineEdit( valueStack, "regExpLineEdit" );
- QObject::connect( lineEdit, SIGNAL( textChanged( const QString & ) ),
- receiver, SLOT( slotValueChanged() ) );
+ TQObject::connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ receiver, TQT_SLOT( slotValueChanged() ) );
return lineEdit;
}
- // blank QLabel to hide value widget for in-address-book rule
+ // blank TQLabel to hide value widget for in-address-book rule
if ( number == 1 ) {
- return new QLabel( valueStack, "textRuleValueHider" );
+ return new TQLabel( valueStack, "textRuleValueHider" );
}
if ( number == 2 ) {
- QComboBox *combo = new QComboBox( valueStack, "categoryCombo" );
- QStringList categories = KabcBridge::categories();
+ TQComboBox *combo = new TQComboBox( valueStack, "categoryCombo" );
+ TQStringList categories = KabcBridge::categories();
combo->insertStringList( categories );
- QObject::connect( combo, SIGNAL( activated( int ) ),
- receiver, SLOT( slotValueChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated( int ) ),
+ receiver, TQT_SLOT( slotValueChanged() ) );
return combo;
}
@@ -469,13 +469,13 @@ namespace {
//---------------------------------------------------------------------------
- KMSearchRule::Function TextRuleWidgetHandler::currentFunction( const QWidgetStack *functionStack ) const
+ KMSearchRule::Function TextRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const
{
- const QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( QObject_child_const( functionStack,
+ const TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( QObject_child_const( functionStack,
"textRuleFuncCombo" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
- // dynamic_cast<QComboBox*>( functionStack->child( "textRuleFuncCombo",
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
+ // dynamic_cast<TQComboBox*>( functionStack->child( "textRuleFuncCombo",
// 0, false ) );
if ( funcCombo ) {
return TextFunctions[funcCombo->currentItem()].id;
@@ -488,25 +488,25 @@ namespace {
//---------------------------------------------------------------------------
- KMSearchRule::Function TextRuleWidgetHandler::function( const QCString &,
- const QWidgetStack *functionStack ) const
+ KMSearchRule::Function TextRuleWidgetHandler::function( const TQCString &,
+ const TQWidgetStack *functionStack ) const
{
return currentFunction( functionStack );
}
//---------------------------------------------------------------------------
- QString TextRuleWidgetHandler::currentValue( const QWidgetStack *valueStack,
+ TQString TextRuleWidgetHandler::currentValue( const TQWidgetStack *valueStack,
KMSearchRule::Function func ) const
{
// here we gotta check the combobox which contains the categories
if ( func == KMSearchRule::FuncIsInCategory ||
func == KMSearchRule::FuncIsNotInCategory ) {
- const QComboBox *combo=
- dynamic_cast<QComboBox*>( QObject_child_const( valueStack,
+ const TQComboBox *combo=
+ dynamic_cast<TQComboBox*>( QObject_child_const( valueStack,
"categoryCombo" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
- // dynamic_cast<QComboBox*>( valueStack->child( "categoryCombo",
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
+ // dynamic_cast<TQComboBox*>( valueStack->child( "categoryCombo",
// 0, false ) );
if ( combo ) {
return combo->currentText();
@@ -514,7 +514,7 @@ namespace {
else {
kdDebug(5006) << "TextRuleWidgetHandler::currentValue: "
"categoryCombo not found." << endl;
- return QString::null;
+ return TQString::null;
}
}
@@ -522,7 +522,7 @@ namespace {
const RegExpLineEdit *lineEdit =
dynamic_cast<RegExpLineEdit*>( QObject_child_const( valueStack,
"regExpLineEdit" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
// dynamic_cast<RegExpLineEdit*>( valueStack->child( "regExpLineEdit",
// 0, false ) );
if ( lineEdit ) {
@@ -533,14 +533,14 @@ namespace {
"regExpLineEdit not found." << endl;
// or anything else, like addressbook
- return QString::null;
+ return TQString::null;
}
//---------------------------------------------------------------------------
- QString TextRuleWidgetHandler::value( const QCString &,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const
+ TQString TextRuleWidgetHandler::value( const TQCString &,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const
{
KMSearchRule::Function func = currentFunction( functionStack );
if ( func == KMSearchRule::FuncIsInAddressbook )
@@ -553,9 +553,9 @@ namespace {
//---------------------------------------------------------------------------
- QString TextRuleWidgetHandler::prettyValue( const QCString &,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const
+ TQString TextRuleWidgetHandler::prettyValue( const TQCString &,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const
{
KMSearchRule::Function func = currentFunction( functionStack );
if ( func == KMSearchRule::FuncIsInAddressbook )
@@ -568,19 +568,19 @@ namespace {
//---------------------------------------------------------------------------
- bool TextRuleWidgetHandler::handlesField( const QCString & ) const
+ bool TextRuleWidgetHandler::handlesField( const TQCString & ) const
{
return true; // we handle all fields (as fallback)
}
//---------------------------------------------------------------------------
- void TextRuleWidgetHandler::reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ void TextRuleWidgetHandler::reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
// reset the function combo box
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "textRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "textRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -600,8 +600,8 @@ namespace {
valueStack->raiseWidget( lineEdit );
}
- QComboBox *combo =
- dynamic_cast<QComboBox*>( valueStack->child( "categoryCombo",
+ TQComboBox *combo =
+ dynamic_cast<TQComboBox*>( valueStack->child( "categoryCombo",
0, false ) );
if (combo) {
combo->blockSignals( true );
@@ -612,8 +612,8 @@ namespace {
//---------------------------------------------------------------------------
- bool TextRuleWidgetHandler::setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ bool TextRuleWidgetHandler::setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const
{
if ( !rule ) {
@@ -626,8 +626,8 @@ namespace {
for ( ; i < TextFunctionCount; ++i )
if ( func == TextFunctions[i].id )
break;
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "textRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "textRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -645,15 +645,15 @@ namespace {
if ( func == KMSearchRule::FuncIsInAddressbook ||
func == KMSearchRule::FuncIsNotInAddressbook ) {
- QWidget *w =
- static_cast<QWidget*>( valueStack->child( "textRuleValueHider",
+ TQWidget *w =
+ static_cast<TQWidget*>( valueStack->child( "textRuleValueHider",
0, false ) );
valueStack->raiseWidget( w );
}
else if ( func == KMSearchRule::FuncIsInCategory ||
func == KMSearchRule::FuncIsNotInCategory) {
- QComboBox *combo =
- static_cast<QComboBox*>( valueStack->child( "categoryCombo",
+ TQComboBox *combo =
+ static_cast<TQComboBox*>( valueStack->child( "categoryCombo",
0, false ) );
combo->blockSignals( true );
for ( i = 0; i < combo->count(); ++i )
@@ -686,13 +686,13 @@ namespace {
//---------------------------------------------------------------------------
- bool TextRuleWidgetHandler::update( const QCString &,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ bool TextRuleWidgetHandler::update( const TQCString &,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
// raise the correct function widget
functionStack->raiseWidget(
- static_cast<QWidget*>( functionStack->child( "textRuleFuncCombo",
+ static_cast<TQWidget*>( functionStack->child( "textRuleFuncCombo",
0, false ) ) );
// raise the correct value widget
@@ -700,13 +700,13 @@ namespace {
if ( func == KMSearchRule::FuncIsInAddressbook ||
func == KMSearchRule::FuncIsNotInAddressbook ) {
valueStack->raiseWidget(
- static_cast<QWidget*>( valueStack->child( "textRuleValueHider",
+ static_cast<TQWidget*>( valueStack->child( "textRuleValueHider",
0, false ) ) );
}
else if ( func == KMSearchRule::FuncIsInCategory ||
func == KMSearchRule::FuncIsNotInCategory) {
valueStack->raiseWidget(
- static_cast<QWidget*>( valueStack->child( "categoryCombo",
+ static_cast<TQWidget*>( valueStack->child( "categoryCombo",
0, false ) ) );
}
else {
@@ -750,40 +750,40 @@ namespace {
//---------------------------------------------------------------------------
- QWidget * MessageRuleWidgetHandler::createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const
+ TQWidget * MessageRuleWidgetHandler::createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const
{
if ( number != 0 )
return 0;
- QComboBox *funcCombo = new QComboBox( functionStack, "messageRuleFuncCombo" );
+ TQComboBox *funcCombo = new TQComboBox( functionStack, "messageRuleFuncCombo" );
for ( int i = 0; i < MessageFunctionCount; ++i ) {
funcCombo->insertItem( i18n( MessageFunctions[i].displayName ) );
}
funcCombo->adjustSize();
- QObject::connect( funcCombo, SIGNAL( activated( int ) ),
- receiver, SLOT( slotFunctionChanged() ) );
+ TQObject::connect( funcCombo, TQT_SIGNAL( activated( int ) ),
+ receiver, TQT_SLOT( slotFunctionChanged() ) );
return funcCombo;
}
//---------------------------------------------------------------------------
- QWidget * MessageRuleWidgetHandler::createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const
+ TQWidget * MessageRuleWidgetHandler::createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const
{
if ( number == 0 ) {
RegExpLineEdit *lineEdit =
new RegExpLineEdit( valueStack, "regExpLineEdit" );
- QObject::connect( lineEdit, SIGNAL( textChanged( const QString & ) ),
- receiver, SLOT( slotValueChanged() ) );
+ TQObject::connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ receiver, TQT_SLOT( slotValueChanged() ) );
return lineEdit;
}
- // blank QLabel to hide value widget for has-attachment rule
+ // blank TQLabel to hide value widget for has-attachment rule
if ( number == 1 ) {
- return new QLabel( valueStack, "textRuleValueHider" );
+ return new TQLabel( valueStack, "textRuleValueHider" );
}
return 0;
@@ -791,13 +791,13 @@ namespace {
//---------------------------------------------------------------------------
- KMSearchRule::Function MessageRuleWidgetHandler::currentFunction( const QWidgetStack *functionStack ) const
+ KMSearchRule::Function MessageRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const
{
- const QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( QObject_child_const( functionStack,
+ const TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( QObject_child_const( functionStack,
"messageRuleFuncCombo" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
- // dynamic_cast<QComboBox*>( functionStack->child( "messageRuleFuncCombo",
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
+ // dynamic_cast<TQComboBox*>( functionStack->child( "messageRuleFuncCombo",
// 0, false ) );
if ( funcCombo ) {
return MessageFunctions[funcCombo->currentItem()].id;
@@ -810,8 +810,8 @@ namespace {
//---------------------------------------------------------------------------
- KMSearchRule::Function MessageRuleWidgetHandler::function( const QCString & field,
- const QWidgetStack *functionStack ) const
+ KMSearchRule::Function MessageRuleWidgetHandler::function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const
{
if ( !handlesField( field ) )
return KMSearchRule::FuncNone;
@@ -821,13 +821,13 @@ namespace {
//---------------------------------------------------------------------------
- QString MessageRuleWidgetHandler::currentValue( const QWidgetStack *valueStack,
+ TQString MessageRuleWidgetHandler::currentValue( const TQWidgetStack *valueStack,
KMSearchRule::Function ) const
{
const RegExpLineEdit *lineEdit =
dynamic_cast<RegExpLineEdit*>( QObject_child_const( valueStack,
"regExpLineEdit" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
// dynamic_cast<RegExpLineEdit*>( valueStack->child( "regExpLineEdit",
// 0, false ) );
if ( lineEdit ) {
@@ -837,17 +837,17 @@ namespace {
kdDebug(5006) << "MessageRuleWidgetHandler::currentValue: "
"regExpLineEdit not found." << endl;
- return QString::null;
+ return TQString::null;
}
//---------------------------------------------------------------------------
- QString MessageRuleWidgetHandler::value( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const
+ TQString MessageRuleWidgetHandler::value( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
- return QString::null;
+ return TQString::null;
KMSearchRule::Function func = currentFunction( functionStack );
if ( func == KMSearchRule::FuncHasAttachment )
@@ -860,12 +860,12 @@ namespace {
//---------------------------------------------------------------------------
- QString MessageRuleWidgetHandler::prettyValue( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const
+ TQString MessageRuleWidgetHandler::prettyValue( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
- return QString::null;
+ return TQString::null;
KMSearchRule::Function func = currentFunction( functionStack );
if ( func == KMSearchRule::FuncHasAttachment )
@@ -878,19 +878,19 @@ namespace {
//---------------------------------------------------------------------------
- bool MessageRuleWidgetHandler::handlesField( const QCString & field ) const
+ bool MessageRuleWidgetHandler::handlesField( const TQCString & field ) const
{
return ( field == "<message>" );
}
//---------------------------------------------------------------------------
- void MessageRuleWidgetHandler::reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ void MessageRuleWidgetHandler::reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
// reset the function combo box
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "messageRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "messageRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -913,8 +913,8 @@ namespace {
//---------------------------------------------------------------------------
- bool MessageRuleWidgetHandler::setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ bool MessageRuleWidgetHandler::setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const
{
if ( !rule || !handlesField( rule->field() ) ) {
@@ -927,8 +927,8 @@ namespace {
for ( ; i < MessageFunctionCount; ++i )
if ( func == MessageFunctions[i].id )
break;
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "messageRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "messageRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -946,8 +946,8 @@ namespace {
if ( func == KMSearchRule::FuncHasAttachment ||
func == KMSearchRule::FuncHasNoAttachment ) {
- QWidget *w =
- static_cast<QWidget*>( valueStack->child( "textRuleValueHider",
+ TQWidget *w =
+ static_cast<TQWidget*>( valueStack->child( "textRuleValueHider",
0, false ) );
valueStack->raiseWidget( w );
}
@@ -970,23 +970,23 @@ namespace {
//---------------------------------------------------------------------------
- bool MessageRuleWidgetHandler::update( const QCString & field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ bool MessageRuleWidgetHandler::update( const TQCString & field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
return false;
// raise the correct function widget
functionStack->raiseWidget(
- static_cast<QWidget*>( functionStack->child( "messageRuleFuncCombo",
+ static_cast<TQWidget*>( functionStack->child( "messageRuleFuncCombo",
0, false ) ) );
// raise the correct value widget
KMSearchRule::Function func = currentFunction( functionStack );
if ( func == KMSearchRule::FuncHasAttachment ||
func == KMSearchRule::FuncHasNoAttachment ) {
- QWidget *w =
- static_cast<QWidget*>( valueStack->child( "textRuleValueHider",
+ TQWidget *w =
+ static_cast<TQWidget*>( valueStack->child( "textRuleValueHider",
0, false ) );
valueStack->raiseWidget( w );
}
@@ -1025,53 +1025,53 @@ namespace {
//---------------------------------------------------------------------------
- QWidget * StatusRuleWidgetHandler::createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const
+ TQWidget * StatusRuleWidgetHandler::createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const
{
if ( number != 0 )
return 0;
- QComboBox *funcCombo = new QComboBox( functionStack,
+ TQComboBox *funcCombo = new TQComboBox( functionStack,
"statusRuleFuncCombo" );
for ( int i = 0; i < StatusFunctionCount; ++i ) {
funcCombo->insertItem( i18n( StatusFunctions[i].displayName ) );
}
funcCombo->adjustSize();
- QObject::connect( funcCombo, SIGNAL( activated( int ) ),
- receiver, SLOT( slotFunctionChanged() ) );
+ TQObject::connect( funcCombo, TQT_SIGNAL( activated( int ) ),
+ receiver, TQT_SLOT( slotFunctionChanged() ) );
return funcCombo;
}
//---------------------------------------------------------------------------
- QWidget * StatusRuleWidgetHandler::createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const
+ TQWidget * StatusRuleWidgetHandler::createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const
{
if ( number != 0 )
return 0;
- QComboBox *statusCombo = new QComboBox( valueStack,
+ TQComboBox *statusCombo = new TQComboBox( valueStack,
"statusRuleValueCombo" );
for ( int i = 0; i < KMail::StatusValueCountWithoutHidden; ++i ) {
statusCombo->insertItem( UserIcon( KMail::StatusValues[ i ].icon ), i18n( KMail::StatusValues[ i ].text ) );
}
statusCombo->adjustSize();
- QObject::connect( statusCombo, SIGNAL( activated( int ) ),
- receiver, SLOT( slotValueChanged() ) );
+ TQObject::connect( statusCombo, TQT_SIGNAL( activated( int ) ),
+ receiver, TQT_SLOT( slotValueChanged() ) );
return statusCombo;
}
//---------------------------------------------------------------------------
- KMSearchRule::Function StatusRuleWidgetHandler::currentFunction( const QWidgetStack *functionStack ) const
+ KMSearchRule::Function StatusRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const
{
- const QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( QObject_child_const( functionStack,
+ const TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( QObject_child_const( functionStack,
"statusRuleFuncCombo" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
- // dynamic_cast<QComboBox*>( functionStack->child( "statusRuleFuncCombo",
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
+ // dynamic_cast<TQComboBox*>( functionStack->child( "statusRuleFuncCombo",
// 0, false ) );
if ( funcCombo ) {
return StatusFunctions[funcCombo->currentItem()].id;
@@ -1084,8 +1084,8 @@ namespace {
//---------------------------------------------------------------------------
- KMSearchRule::Function StatusRuleWidgetHandler::function( const QCString & field,
- const QWidgetStack *functionStack ) const
+ KMSearchRule::Function StatusRuleWidgetHandler::function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const
{
if ( !handlesField( field ) )
return KMSearchRule::FuncNone;
@@ -1095,13 +1095,13 @@ namespace {
//---------------------------------------------------------------------------
- int StatusRuleWidgetHandler::currentStatusValue( const QWidgetStack *valueStack ) const
+ int StatusRuleWidgetHandler::currentStatusValue( const TQWidgetStack *valueStack ) const
{
- const QComboBox *statusCombo =
- dynamic_cast<QComboBox*>( QObject_child_const( valueStack,
+ const TQComboBox *statusCombo =
+ dynamic_cast<TQComboBox*>( QObject_child_const( valueStack,
"statusRuleValueCombo" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
- // dynamic_cast<QComboBox*>( valueStack->child( "statusRuleValueCombo",
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
+ // dynamic_cast<TQComboBox*>( valueStack->child( "statusRuleValueCombo",
// 0, false ) );
if ( statusCombo ) {
return statusCombo->currentItem();
@@ -1114,51 +1114,51 @@ namespace {
//---------------------------------------------------------------------------
- QString StatusRuleWidgetHandler::value( const QCString & field,
- const QWidgetStack *,
- const QWidgetStack *valueStack ) const
+ TQString StatusRuleWidgetHandler::value( const TQCString & field,
+ const TQWidgetStack *,
+ const TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
- return QString::null;
+ return TQString::null;
const int status = currentStatusValue( valueStack );
if ( status != -1 )
- return QString::fromLatin1( KMail::StatusValues[ status ].text );
+ return TQString::fromLatin1( KMail::StatusValues[ status ].text );
else
- return QString::null;
+ return TQString::null;
}
//---------------------------------------------------------------------------
- QString StatusRuleWidgetHandler::prettyValue( const QCString & field,
- const QWidgetStack *,
- const QWidgetStack *valueStack ) const
+ TQString StatusRuleWidgetHandler::prettyValue( const TQCString & field,
+ const TQWidgetStack *,
+ const TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
- return QString::null;
+ return TQString::null;
const int status = currentStatusValue( valueStack );
if ( status != -1 )
return i18n( KMail::StatusValues[ status ].text );
else
- return QString::null;
+ return TQString::null;
}
//---------------------------------------------------------------------------
- bool StatusRuleWidgetHandler::handlesField( const QCString & field ) const
+ bool StatusRuleWidgetHandler::handlesField( const TQCString & field ) const
{
return ( field == "<status>" );
}
//---------------------------------------------------------------------------
- void StatusRuleWidgetHandler::reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ void StatusRuleWidgetHandler::reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
// reset the function combo box
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "statusRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "statusRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -1167,8 +1167,8 @@ namespace {
}
// reset the status value combo box
- QComboBox *statusCombo =
- dynamic_cast<QComboBox*>( valueStack->child( "statusRuleValueCombo",
+ TQComboBox *statusCombo =
+ dynamic_cast<TQComboBox*>( valueStack->child( "statusRuleValueCombo",
0, false ) );
if ( statusCombo ) {
statusCombo->blockSignals( true );
@@ -1179,8 +1179,8 @@ namespace {
//---------------------------------------------------------------------------
- bool StatusRuleWidgetHandler::setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ bool StatusRuleWidgetHandler::setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const
{
if ( !rule || !handlesField( rule->field() ) ) {
@@ -1194,8 +1194,8 @@ namespace {
for ( ; funcIndex < StatusFunctionCount; ++funcIndex )
if ( func == StatusFunctions[funcIndex].id )
break;
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "statusRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "statusRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -1212,14 +1212,14 @@ namespace {
}
// set the value
- const QString value = rule->contents();
+ const TQString value = rule->contents();
int valueIndex = 0;
for ( ; valueIndex < KMail::StatusValueCountWithoutHidden; ++valueIndex )
- if ( value == QString::fromLatin1(
+ if ( value == TQString::fromLatin1(
KMail::StatusValues[ valueIndex ].text ) )
break;
- QComboBox *statusCombo =
- dynamic_cast<QComboBox*>( valueStack->child( "statusRuleValueCombo",
+ TQComboBox *statusCombo =
+ dynamic_cast<TQComboBox*>( valueStack->child( "statusRuleValueCombo",
0, false ) );
if ( statusCombo ) {
statusCombo->blockSignals( true );
@@ -1240,21 +1240,21 @@ namespace {
//---------------------------------------------------------------------------
- bool StatusRuleWidgetHandler::update( const QCString &field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ bool StatusRuleWidgetHandler::update( const TQCString &field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
return false;
// raise the correct function widget
functionStack->raiseWidget(
- static_cast<QWidget*>( functionStack->child( "statusRuleFuncCombo",
+ static_cast<TQWidget*>( functionStack->child( "statusRuleFuncCombo",
0, false ) ) );
// raise the correct value widget
valueStack->raiseWidget(
- static_cast<QWidget*>( valueStack->child( "statusRuleValueCombo",
+ static_cast<TQWidget*>( valueStack->child( "statusRuleValueCombo",
0, false ) ) );
return true;
}
@@ -1285,48 +1285,48 @@ namespace {
//---------------------------------------------------------------------------
- QWidget * NumericRuleWidgetHandler::createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const
+ TQWidget * NumericRuleWidgetHandler::createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const
{
if ( number != 0 )
return 0;
- QComboBox *funcCombo = new QComboBox( functionStack,
+ TQComboBox *funcCombo = new TQComboBox( functionStack,
"numericRuleFuncCombo" );
for ( int i = 0; i < NumericFunctionCount; ++i ) {
funcCombo->insertItem( i18n( NumericFunctions[i].displayName ) );
}
funcCombo->adjustSize();
- QObject::connect( funcCombo, SIGNAL( activated( int ) ),
- receiver, SLOT( slotFunctionChanged() ) );
+ TQObject::connect( funcCombo, TQT_SIGNAL( activated( int ) ),
+ receiver, TQT_SLOT( slotFunctionChanged() ) );
return funcCombo;
}
//---------------------------------------------------------------------------
- QWidget * NumericRuleWidgetHandler::createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const
+ TQWidget * NumericRuleWidgetHandler::createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const
{
if ( number != 0 )
return 0;
KIntNumInput *numInput = new KIntNumInput( valueStack, "KIntNumInput" );
- QObject::connect( numInput, SIGNAL( valueChanged( int ) ),
- receiver, SLOT( slotValueChanged() ) );
+ TQObject::connect( numInput, TQT_SIGNAL( valueChanged( int ) ),
+ receiver, TQT_SLOT( slotValueChanged() ) );
return numInput;
}
//---------------------------------------------------------------------------
- KMSearchRule::Function NumericRuleWidgetHandler::currentFunction( const QWidgetStack *functionStack ) const
+ KMSearchRule::Function NumericRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const
{
- const QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( QObject_child_const( functionStack,
+ const TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( QObject_child_const( functionStack,
"numericRuleFuncCombo" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
- // dynamic_cast<QComboBox*>( functionStack->child( "numericRuleFuncCombo",
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
+ // dynamic_cast<TQComboBox*>( functionStack->child( "numericRuleFuncCombo",
// 0, false ) );
if ( funcCombo ) {
return NumericFunctions[funcCombo->currentItem()].id;
@@ -1339,8 +1339,8 @@ namespace {
//---------------------------------------------------------------------------
- KMSearchRule::Function NumericRuleWidgetHandler::function( const QCString & field,
- const QWidgetStack *functionStack ) const
+ KMSearchRule::Function NumericRuleWidgetHandler::function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const
{
if ( !handlesField( field ) )
return KMSearchRule::FuncNone;
@@ -1350,62 +1350,62 @@ namespace {
//---------------------------------------------------------------------------
- QString NumericRuleWidgetHandler::currentValue( const QWidgetStack *valueStack ) const
+ TQString NumericRuleWidgetHandler::currentValue( const TQWidgetStack *valueStack ) const
{
const KIntNumInput *numInput =
dynamic_cast<KIntNumInput*>( QObject_child_const( valueStack,
"KIntNumInput" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
// dynamic_cast<KIntNumInput*>( valueStack->child( "KIntNumInput",
// 0, false ) );
if ( numInput ) {
- return QString::number( numInput->value() );
+ return TQString::number( numInput->value() );
}
else
kdDebug(5006) << "NumericRuleWidgetHandler::currentValue: "
"KIntNumInput not found." << endl;
- return QString::null;
+ return TQString::null;
}
//---------------------------------------------------------------------------
- QString NumericRuleWidgetHandler::value( const QCString & field,
- const QWidgetStack *,
- const QWidgetStack *valueStack ) const
+ TQString NumericRuleWidgetHandler::value( const TQCString & field,
+ const TQWidgetStack *,
+ const TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
- return QString::null;
+ return TQString::null;
return currentValue( valueStack );
}
//---------------------------------------------------------------------------
- QString NumericRuleWidgetHandler::prettyValue( const QCString & field,
- const QWidgetStack *,
- const QWidgetStack *valueStack ) const
+ TQString NumericRuleWidgetHandler::prettyValue( const TQCString & field,
+ const TQWidgetStack *,
+ const TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
- return QString::null;
+ return TQString::null;
return currentValue( valueStack );
}
//---------------------------------------------------------------------------
- bool NumericRuleWidgetHandler::handlesField( const QCString & field ) const
+ bool NumericRuleWidgetHandler::handlesField( const TQCString & field ) const
{
return ( field == "<size>" || field == "<age in days>" );
}
//---------------------------------------------------------------------------
- void NumericRuleWidgetHandler::reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ void NumericRuleWidgetHandler::reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
// reset the function combo box
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "numericRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "numericRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -1426,7 +1426,7 @@ namespace {
//---------------------------------------------------------------------------
- void initNumInput( KIntNumInput *numInput, const QCString &field )
+ void initNumInput( KIntNumInput *numInput, const TQCString &field )
{
if ( field == "<size>" ) {
numInput->setMinValue( 0 );
@@ -1440,8 +1440,8 @@ namespace {
//---------------------------------------------------------------------------
- bool NumericRuleWidgetHandler::setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ bool NumericRuleWidgetHandler::setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const
{
if ( !rule || !handlesField( rule->field() ) ) {
@@ -1455,8 +1455,8 @@ namespace {
for ( ; funcIndex < NumericFunctionCount; ++funcIndex )
if ( func == NumericFunctions[funcIndex].id )
break;
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "numericRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "numericRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -1493,16 +1493,16 @@ namespace {
//---------------------------------------------------------------------------
- bool NumericRuleWidgetHandler::update( const QCString &field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ bool NumericRuleWidgetHandler::update( const TQCString &field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
return false;
// raise the correct function widget
functionStack->raiseWidget(
- static_cast<QWidget*>( functionStack->child( "numericRuleFuncCombo",
+ static_cast<TQWidget*>( functionStack->child( "numericRuleFuncCombo",
0, false ) ) );
// raise the correct value widget