summaryrefslogtreecommitdiffstats
path: root/kmyfirewall/ruleoptionplugins/tos_target_option
diff options
context:
space:
mode:
Diffstat (limited to 'kmyfirewall/ruleoptionplugins/tos_target_option')
-rw-r--r--kmyfirewall/ruleoptionplugins/tos_target_option/kmfruleeditortos.cpp66
-rw-r--r--kmyfirewall/ruleoptionplugins/tos_target_option/kmfruleeditortos.h25
-rw-r--r--kmyfirewall/ruleoptionplugins/tos_target_option/kmfruletargetoptionedittos.cpp40
-rw-r--r--kmyfirewall/ruleoptionplugins/tos_target_option/kmfruletargetoptionedittos.h20
-rw-r--r--kmyfirewall/ruleoptionplugins/tos_target_option/kmyfirewallruleeditortos.ui26
5 files changed, 90 insertions, 87 deletions
diff --git a/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruleeditortos.cpp b/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruleeditortos.cpp
index c552000..0ccb582 100644
--- a/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruleeditortos.cpp
+++ b/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruleeditortos.cpp
@@ -16,11 +16,11 @@
#include "kmfruleeditortos.h"
// QT includes
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
// kde includes
#include <klocale.h>
@@ -39,12 +39,12 @@
#include "../../core/kmfundoengine.h"
namespace KMF {
-KMFRuleEditorTos::KMFRuleEditorTos( QWidget *parent, const char *name, WFlags fl ) : KMyFirewallRuleEditorTos( parent, name, fl ) {
+KMFRuleEditorTos::KMFRuleEditorTos( TQWidget *tqparent, const char *name, WFlags fl ) : KMyFirewallRuleEditorTos( tqparent, name, fl ) {
m_option_type = "SETTOS";
}
KMFRuleEditorTos::~KMFRuleEditorTos() {}
-void KMFRuleEditorTos::setType( const QString& type ) {
+void KMFRuleEditorTos::setType( const TQString& type ) {
m_option_type = type;
if ( m_option_type == "SETTOS" ) {
gb_title->setTitle( i18n( "Set Type of Service" ) );
@@ -68,8 +68,8 @@ void KMFRuleEditorTos::loadRule( IPTRule* rule ) {
setItems();
IPTRuleOption* opt = rule->getOptionForName("target_set_tos_opt");
if ( ! opt ->isEmpty()) {
- QStringList values = opt->getValues();
- QString val = *values.at(0);
+ TQStringList values = opt->getValues();
+ TQString val = *values.at(0);
if ( val != XML::Undefined_Value) {
c_use_tos->setChecked( true );
int index = getItemNum( val );
@@ -85,8 +85,8 @@ void KMFRuleEditorTos::loadRule( IPTRule* rule ) {
setItems();
IPTRuleOption* opt = rule->getOptionForName("tos_opt");
if ( ! opt ->isEmpty() ) {
- QStringList values = opt->getValues();
- QString val = *values.at(0);
+ TQStringList values = opt->getValues();
+ TQString val = *values.at(0);
if ( val != XML::Undefined_Value) {
c_use_tos->setChecked( true );
int index = getItemNum( val );
@@ -102,8 +102,8 @@ void KMFRuleEditorTos::loadRule( IPTRule* rule ) {
setItems();
IPTRuleOption* opt = rule->getOptionForName("target_reject_type_opt");
if ( ! opt ->isEmpty() ) {
- QStringList values = opt->getValues();
- QString val = *values.at(0);
+ TQStringList values = opt->getValues();
+ TQString val = *values.at(0);
if ( val != XML::Undefined_Value) {
c_use_tos->setChecked( true );
int index = getItemNum( val );
@@ -123,17 +123,17 @@ void KMFRuleEditorTos::loadRule( IPTRule* rule ) {
void KMFRuleEditorTos::accept() {
KMFUndoEngine::instance()->startTransaction(
m_rule,
- i18n("Edit Rule: %1 TOS Target Option").arg( m_rule->name() )
+ i18n("Edit Rule: %1 TOS Target Option").tqarg( m_rule->name() )
);
if ( m_option_type == "SETTOS" ) {
bool use_tos = c_use_tos->isChecked();
- QPtrList<QString>* options = new QPtrList<QString>;
- QString* name = new QString( "target_set_tos_opt" );
+ TQPtrList<TQString>* options = new TQPtrList<TQString>;
+ TQString* name = new TQString( "target_set_tos_opt" );
if ( use_tos ) {
- QString val = cb_tos->currentText();
- options->append( new QString( val ) );
+ TQString val = cb_tos->currentText();
+ options->append( new TQString( val ) );
} else {
- options->append( new QString( XML::BoolOff_Value) );
+ options->append( new TQString( XML::BoolOff_Value) );
}
// emit sigAddTargetOpt( name, options );
m_rule->addTargetOption( *name, *options );
@@ -141,13 +141,13 @@ void KMFRuleEditorTos::accept() {
emit sigDocumentChanged();
} else if ( m_option_type == "CHECKTOS" ) {
bool use_tos = c_use_tos->isChecked();
- QPtrList<QString>* options = new QPtrList<QString>;
- QString* name = new QString( "tos_opt" );
+ TQPtrList<TQString>* options = new TQPtrList<TQString>;
+ TQString* name = new TQString( "tos_opt" );
if ( use_tos ) {
- QString val = cb_tos->currentText();
- options->append( new QString( val ) );
+ TQString val = cb_tos->currentText();
+ options->append( new TQString( val ) );
} else {
- options->append( new QString( XML::BoolOff_Value) );
+ options->append( new TQString( XML::BoolOff_Value) );
}
// emit sigAddRuleOpt( name, options );
m_rule->addRuleOption( *name, *options );
@@ -156,13 +156,13 @@ void KMFRuleEditorTos::accept() {
} else if ( m_option_type == "REJECTTYPE" ) {
bool use_tos = c_use_tos->isChecked();
- QPtrList<QString>* options = new QPtrList<QString>;
- QString* name = new QString( "target_reject_type_opt" );
+ TQPtrList<TQString>* options = new TQPtrList<TQString>;
+ TQString* name = new TQString( "target_reject_type_opt" );
if ( use_tos ) {
- QString val = cb_tos->currentText();
- options->append( new QString( val ) );
+ TQString val = cb_tos->currentText();
+ options->append( new TQString( val ) );
} else {
- options->append( new QString( XML::BoolOff_Value) );
+ options->append( new TQString( XML::BoolOff_Value) );
}
// emit sigAddTargetOpt( name, options );
m_rule->addTargetOption( *name, *options );
@@ -172,7 +172,7 @@ void KMFRuleEditorTos::accept() {
}
void KMFRuleEditorTos::setItems() {
- kdDebug() << "void KMFRuleEditorTos::setItems(const QString& type)" << endl;
+ kdDebug() << "void KMFRuleEditorTos::setItems(const TQString& type)" << endl;
cb_tos->clear();
if ( m_option_type == "SETTOS" || m_option_type == "CHECKTOS" ) {
cb_tos->insertItem( "Normal-Service" );
@@ -190,11 +190,11 @@ void KMFRuleEditorTos::setItems() {
}
}
-int KMFRuleEditorTos::getItemNum( const QString& option ) {
- kdDebug() << "int KMFRuleEditorTos::getItemNum(const QString& option)" << endl;
+int KMFRuleEditorTos::getItemNum( const TQString& option ) {
+ kdDebug() << "int KMFRuleEditorTos::getItemNum(const TQString& option)" << endl;
int index = -1;
for ( int i = 0; i < cb_tos->count(); i++ ) {
- QString tmp_item = cb_tos->text( i );
+ TQString tmp_item = cb_tos->text( i );
if ( tmp_item == option ) {
index = i;
}
diff --git a/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruleeditortos.h b/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruleeditortos.h
index 7f5e732..63307da 100644
--- a/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruleeditortos.h
+++ b/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruleeditortos.h
@@ -17,9 +17,9 @@
#define KMFRULEEDITORTOS_H
#include "kmyfirewallruleeditortos.h"
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
namespace KMF {
class IPTRule;
@@ -29,13 +29,14 @@ class IPTRule;
class KMFRuleEditorTos : public KMyFirewallRuleEditorTos {
Q_OBJECT
+ TQ_OBJECT
public:
- KMFRuleEditorTos( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 );
+ KMFRuleEditorTos( TQWidget *tqparent = 0, const char *name = 0, WFlags fl = 0 );
~KMFRuleEditorTos();
- QPtrList<QString>* options;
+ TQPtrList<TQString>* options;
void loadRule( IPTRule* );
- void setType( const QString& type );
+ void setType( const TQString& type );
public slots:
void accept();
@@ -43,15 +44,15 @@ public slots:
void slotHelp();
private: // data
- QString m_option_type;
+ TQString m_option_type;
IPTRule *m_rule;
void setItems();
- int getItemNum( const QString& option );
+ int getItemNum( const TQString& option );
signals:
-/* void sigAddRuleOpt( QString *, QPtrList<QString> * );
- void sigDelRuleOpt( QString * );
- void sigAddTargetOpt( QString*, QPtrList<QString>* );
- void sigDelTargetOpt( QString * );*/
+/* void sigAddRuleOpt( TQString *, TQPtrList<TQString> * );
+ void sigDelRuleOpt( TQString * );
+ void sigAddTargetOpt( TQString*, TQPtrList<TQString>* );
+ void sigDelTargetOpt( TQString * );*/
void sigDocumentChanged();
void sigHideMe();
};
diff --git a/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruletargetoptionedittos.cpp b/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruletargetoptionedittos.cpp
index ebbda47..f66db52 100644
--- a/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruletargetoptionedittos.cpp
+++ b/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruletargetoptionedittos.cpp
@@ -13,7 +13,7 @@
// QT includes
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes
#include <kdebug.h>
@@ -25,37 +25,37 @@
#include "kmfruleeditortos.h"
namespace KMF {
-KMFRuleTargetOptionEditTos::KMFRuleTargetOptionEditTos(QObject *parent, const char *name)
- : KMFRuleTargetOptionEditInterface(parent, name) {
- kdDebug() <<"KMFRuleTargetOptionEditTos::KMFRuleTargetOptionEditTos(QObject *parent, const char *name)" << endl;
+KMFRuleTargetOptionEditTos::KMFRuleTargetOptionEditTos(TQObject *tqparent, const char *name)
+ : KMFRuleTargetOptionEditInterface(tqparent, name) {
+ kdDebug() <<"KMFRuleTargetOptionEditTos::KMFRuleTargetOptionEditTos(TQObject *tqparent, const char *name)" << endl;
m_managedTargets << "TOS" << "REJECT";
- kdDebug() << "Parent has Type: " << parent->className() << endl;
+ kdDebug() << "Parent has Type: " << tqparent->className() << endl;
m_edit = new KMFRuleEditorTos( 0 , "Edit", 0 );
m_edit->hide();
- connect( m_edit,SIGNAL(sigHideMe() ),
- this,SLOT( slotShowOverview() ) );
+ connect( m_edit,TQT_SIGNAL(sigHideMe() ),
+ this,TQT_SLOT( slotShowOverview() ) );
}
KMFRuleTargetOptionEditTos::~KMFRuleTargetOptionEditTos() {}
void KMFRuleTargetOptionEditTos::slotShowOverview() {
- if ( KMFRuleEditInterface* ruleedit = dynamic_cast<KMFRuleEditInterface*> ( parent() ) ) {
+ if ( KMFRuleEditInterface* ruleedit = dynamic_cast<KMFRuleEditInterface*> ( tqparent() ) ) {
ruleedit->showOverview();
} else {
- kdDebug() << "KMFRuleTargetOptionEditTos::slotShowOverview(): parent() not of type KMFRuleEditInterface" << endl;
+ kdDebug() << "KMFRuleTargetOptionEditTos::slotShowOverview(): tqparent() not of type KMFRuleEditInterface" << endl;
}
}
-const QString& KMFRuleTargetOptionEditTos::optionEditName() const {
- return *( new QString( i18n("Protocol Option") ) );
+const TQString& KMFRuleTargetOptionEditTos::optionEditName() const {
+ return *( new TQString( i18n("Protocol Option") ) );
}
-const QString& KMFRuleTargetOptionEditTos::description() const {
- return *( new QString( i18n("This plugin manages the Protocol based options of iptables.") ) );
+const TQString& KMFRuleTargetOptionEditTos::description() const {
+ return *( new TQString( i18n("This plugin manages the Protocol based options of iptables.") ) );
}
void KMFRuleTargetOptionEditTos::loadRule( IPTRule* rule ) {
@@ -69,7 +69,7 @@ void KMFRuleTargetOptionEditTos::loadRule( IPTRule* rule ) {
}
-QWidget* KMFRuleTargetOptionEditTos::editWidget() {
+TQWidget* KMFRuleTargetOptionEditTos::editWidget() {
if ( ! m_edit ) {
kdDebug() << "KMFRuleTargetOptionEditTos::editWidget() - m_edit == 0" << endl;
return 0;
@@ -77,7 +77,7 @@ QWidget* KMFRuleTargetOptionEditTos::editWidget() {
return m_edit;
}
-bool KMFRuleTargetOptionEditTos::setTarget( const QString& target ){
+bool KMFRuleTargetOptionEditTos::setTarget( const TQString& target ){
if ( ! manageTarget( target ) ) {
return false;
}
@@ -98,14 +98,14 @@ bool KMFRuleTargetOptionEditTos::setTarget( const QString& target ){
// KInstance* KMFRuleTargetOptionEditTosFactory::s_instance = 0L;
// KAboutData* KMFRuleTargetOptionEditTosFactory::s_about = 0L;
-KMFRuleTargetOptionEditTosFactory::KMFRuleTargetOptionEditTosFactory( QObject* parent, const char* name )
- : KLibFactory( parent, name ) {
+KMFRuleTargetOptionEditTosFactory::KMFRuleTargetOptionEditTosFactory( TQObject* tqparent, const char* name )
+ : KLibFactory( tqparent, name ) {
// s_instance = new KInstance( "KMFRuleTargetOptionEditTosFactory" );
}
-QObject* KMFRuleTargetOptionEditTosFactory::createObject( QObject* parent, const char* name,
- const char*, const QStringList & ) {
- QObject * obj = new KMFRuleTargetOptionEditTos( parent, name );
+TQObject* KMFRuleTargetOptionEditTosFactory::createObject( TQObject* tqparent, const char* name,
+ const char*, const TQStringList & ) {
+ TQObject * obj = new KMFRuleTargetOptionEditTos( tqparent, name );
emit objectCreated( obj );
return obj;
}
diff --git a/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruletargetoptionedittos.h b/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruletargetoptionedittos.h
index ba44c3a..8d77da9 100644
--- a/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruletargetoptionedittos.h
+++ b/kmyfirewall/ruleoptionplugins/tos_target_option/kmfruletargetoptionedittos.h
@@ -28,15 +28,16 @@ class KMFRuleEditorTos;
*/
class KMFRuleTargetOptionEditTos : public KMFRuleTargetOptionEditInterface {
Q_OBJECT
+ TQ_OBJECT
public:
- KMFRuleTargetOptionEditTos(QObject *parent = 0, const char *name = 0);
+ KMFRuleTargetOptionEditTos(TQObject *tqparent = 0, const char *name = 0);
~KMFRuleTargetOptionEditTos();
void loadRule( IPTRule* rule );
- QWidget* editWidget();
- const QString& optionEditName() const;
- const QString& description() const;
- bool setTarget( const QString& );
+ TQWidget* editWidget();
+ const TQString& optionEditName() const;
+ const TQString& description() const;
+ bool setTarget( const TQString& );
private slots:
void slotShowOverview();
@@ -51,14 +52,15 @@ private:
class KMFRuleTargetOptionEditTosFactory : public KLibFactory {
Q_OBJECT
+ TQ_OBJECT
public:
- KMFRuleTargetOptionEditTosFactory( QObject *parent = 0, const char *name = 0 );
+ KMFRuleTargetOptionEditTosFactory( TQObject *tqparent = 0, const char *name = 0 );
virtual ~KMFRuleTargetOptionEditTosFactory() {
/* delete s_instance; */
};
- virtual QObject* createObject( QObject* parent = 0, const char* pname = 0,
- const char* name = "QObject",
- const QStringList &args = QStringList() );
+ virtual TQObject* createObject( TQObject* tqparent = 0, const char* pname = 0,
+ const char* name = TQOBJECT_OBJECT_NAME_STRING,
+ const TQStringList &args = TQStringList() );
/* static KInstance* instance(); */
/*private:
diff --git a/kmyfirewall/ruleoptionplugins/tos_target_option/kmyfirewallruleeditortos.ui b/kmyfirewall/ruleoptionplugins/tos_target_option/kmyfirewallruleeditortos.ui
index 66ffd74..c070a02 100644
--- a/kmyfirewall/ruleoptionplugins/tos_target_option/kmyfirewallruleeditortos.ui
+++ b/kmyfirewall/ruleoptionplugins/tos_target_option/kmyfirewallruleeditortos.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>KMyFirewallRuleEditorTos</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KMyFirewallRuleEditorTos</cstring>
</property>
@@ -25,7 +25,7 @@
<property name="spacing">
<number>2</number>
</property>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>gb_title</cstring>
</property>
@@ -36,7 +36,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QComboBox" row="1" column="0">
+ <widget class="TQComboBox" row="1" column="0">
<item>
<property name="text">
<string>Normal-Service</string>
@@ -75,7 +75,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>c_use_tos</cstring>
</property>
@@ -83,15 +83,15 @@
<string>TOS</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="3" column="0">
+ <widget class="TQLayoutWidget" row="3" column="0">
<property name="name">
- <cstring>layout30</cstring>
+ <cstring>tqlayout30</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>b_ok_2</cstring>
</property>
@@ -99,7 +99,7 @@
<string>&amp;Cancel</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>b_cancel_2</cstring>
</property>
@@ -107,7 +107,7 @@
<string>&amp;Help</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>b_ok</cstring>
</property>
@@ -127,7 +127,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>21</height>
@@ -164,10 +164,10 @@
<slot>reject()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>slotHelp()</slot>
<slot>accept()</slot>
<slot>reject()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>