Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/7/head
Michele Calgaro 1 year ago
parent 13a68c63c8
commit 69860bab74
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -896,7 +896,7 @@ if you have some ideas, patches, wishes or whatever.
<listitem><para>A XML file named p.e. kmfruleoption_mac_option.xml</para></listitem> <listitem><para>A XML file named p.e. kmfruleoption_mac_option.xml</para></listitem>
<listitem><para>A desktop file p.e. kmfruleoptionedit_mac.desktop that registeres the plugin within the KDE services framework.</para></listitem> <listitem><para>A desktop file p.e. kmfruleoptionedit_mac.desktop that registeres the plugin within the KDE services framework.</para></listitem>
<listitem><para>An KParts Plugin component/class that derives form either KMFRuleOptionEditInterface or KMFRuleTargetOptionEditInterface named p.e. KMFRuleOptionEditMAC </para></listitem> <listitem><para>An KParts Plugin component/class that derives form either KMFRuleOptionEditInterface or KMFRuleTargetOptionEditInterface named p.e. KMFRuleOptionEditMAC </para></listitem>
<listitem><para>A Class deriving from QWidget that may be loaded into the editor view when editing that option.</para> <listitem><para>A Class deriving from TQWidget that may be loaded into the editor view when editing that option.</para>
<para>Most likely you'll use QTDesigner to design the GUI. If you do this you need to inherit from the generated class.</para></listitem> <para>Most likely you'll use QTDesigner to design the GUI. If you do this you need to inherit from the generated class.</para></listitem>
</itemizedlist> </itemizedlist>
</sect2> </sect2>
@ -1003,17 +1003,17 @@ class KMFRuleEditMac;
class KMFRuleOptionEditMAC : public KMFRuleOptionEditInterface { class KMFRuleOptionEditMAC : public KMFRuleOptionEditInterface {
TQ_OBJECT TQ_OBJECT
public: public:
KMFRuleOptionEditMAC(QObject *parent = 0, const char *name = 0); KMFRuleOptionEditMAC(TQObject *parent = 0, const char *name = 0);
~KMFRuleOptionEditMAC(); ~KMFRuleOptionEditMAC();
void loadRule( IPTRule* rule ); void loadRule( IPTRule* rule );
QWidget* editWidget(); TQWidget* editWidget();
const QString&amp; optionEditName() const; const TQString&amp; optionEditName() const;
const QString&amp; description() const; const TQString&amp; description() const;
private slots: private slots:
void slotAddRuleOption(QString*, QPtrList&lt; QString &gt;* ); void slotAddRuleOption(TQString*, QPtrList&lt; TQString &gt;* );
void slotAddTargetOption(QString*, QPtrList&lt; QString &gt;* ); void slotAddTargetOption(TQString*, QPtrList&lt; TQString &gt;* );
void slotShowOverview(); void slotShowOverview();
private: private:
@ -1027,11 +1027,11 @@ class TDEInstance;
class KMFRuleOptionEditMACFactory : public KLibFactory { class KMFRuleOptionEditMACFactory : public KLibFactory {
TQ_OBJECT TQ_OBJECT
public: public:
KMFRuleOptionEditMACFactory( QObject *parent = 0, const char *name = 0 ); KMFRuleOptionEditMACFactory( TQObject *parent = 0, const char *name = 0 );
virtual ~KMFRuleOptionEditMACFactory() { virtual ~KMFRuleOptionEditMACFactory() {
}; };
virtual QObject* createObject( QObject* parent = 0, const char* pname = 0, virtual TQObject* createObject( TQObject* parent = 0, const char* pname = 0,
const char* name = "QObject", const char* name = "TQObject",
const QStringList &amp;args = QStringList() ); const QStringList &amp;args = QStringList() );
}; };
@ -1064,7 +1064,7 @@ public:
#include "kmfruleeditmac.h" #include "kmfruleeditmac.h"
// Constructor get out plugin into a valid state // Constructor get out plugin into a valid state
KMFRuleOptionEditMAC::KMFRuleOptionEditMAC(QObject *parent, const char *name) KMFRuleOptionEditMAC::KMFRuleOptionEditMAC(TQObject *parent, const char *name)
: KMFRuleOptionEditInterface(parent, name) { : KMFRuleOptionEditInterface(parent, name) {
// Initialise the editor class // Initialise the editor class
@ -1073,11 +1073,11 @@ KMFRuleOptionEditMAC::KMFRuleOptionEditMAC(QObject *parent, const char *name)
m_edit->hide(); m_edit->hide();
// Connect the Signals for the editor class to our slots passing them to the app // Connect the Signals for the editor class to our slots passing them to the app
connect( m_edit,SIGNAL(sigAddRuleOpt(QString*, QPtrList&lt; QString &gt;* ) ), connect( m_edit,SIGNAL(sigAddRuleOpt(TQString*, QPtrList&lt; TQString &gt;* ) ),
this,SLOT( slotAddRuleOption(QString*, QPtrList&lt; QString &gt;* ) ) ); this,SLOT( slotAddRuleOption(TQString*, QPtrList&lt; TQString &gt;* ) ) );
// //
//connect( m_edit,SIGNAL(sigAddTargetOpt(QString*, QPtrList&lt; QString &gt;* ) ), //connect( m_edit,SIGNAL(sigAddTargetOpt(TQString*, QPtrList&lt; TQString &gt;* ) ),
// this,SLOT( slotAddTargetOption(QString*, QPtrList&lt; QString &gt;* ) ) ); // this,SLOT( slotAddTargetOption(TQString*, QPtrList&lt; TQString &gt;* ) ) );
connect( m_edit,SIGNAL(sigHideMe() ), connect( m_edit,SIGNAL(sigHideMe() ),
this,SLOT( slotShowOverview() ) ); this,SLOT( slotShowOverview() ) );
} }
@ -1085,14 +1085,14 @@ KMFRuleOptionEditMAC::KMFRuleOptionEditMAC(QObject *parent, const char *name)
KMFRuleOptionEditMAC::~KMFRuleOptionEditMAC() {} KMFRuleOptionEditMAC::~KMFRuleOptionEditMAC() {}
// Slot to pass the Signals to the app // Slot to pass the Signals to the app
void KMFRuleOptionEditMAC::slotAddRuleOption(QString* name, QPtrList&lt; QString &gt;* values ) { void KMFRuleOptionEditMAC::slotAddRuleOption(TQString* name, QPtrList&lt; TQString &gt;* values ) {
if ( KMFRuleEditInterface* ruleedit = dynamic_cast&lt;KMFRuleEditInterface*&gt; ( parent() ) ) { if ( KMFRuleEditInterface* ruleedit = dynamic_cast&lt;KMFRuleEditInterface*&gt; ( parent() ) ) {
ruleedit->addRuleOption( name, values ); ruleedit->addRuleOption( name, values );
} else { } else {
kdDebug() &lt;&lt; "KMFRuleOptionEditMAC::slotAddRuleOption(): parent() not of type KMFRuleEditInterface" &lt;&lt; endl; kdDebug() &lt;&lt; "KMFRuleOptionEditMAC::slotAddRuleOption(): parent() not of type KMFRuleEditInterface" &lt;&lt; endl;
} }
} }
void KMFRuleOptionEditMAC::slotAddTargetOption(QString* name, QPtrList&lt; QString &gt;* values ) { void KMFRuleOptionEditMAC::slotAddTargetOption(TQString* name, QPtrList&lt; TQString &gt;* values ) {
if ( KMFRuleEditInterface* ruleedit = dynamic_cast&lt;KMFRuleEditInterface*&gt; ( parent() ) ) { if ( KMFRuleEditInterface* ruleedit = dynamic_cast&lt;KMFRuleEditInterface*&gt; ( parent() ) ) {
ruleedit->addRuleTargetOption( name, values ); ruleedit->addRuleTargetOption( name, values );
} else { } else {
@ -1111,11 +1111,11 @@ void KMFRuleOptionEditMAC::slotShowOverview() {
// Get info for GUI about the plugin // Get info for GUI about the plugin
const QString&amp; KMFRuleOptionEditMAC::optionEditName() const { const TQString&amp; KMFRuleOptionEditMAC::optionEditName() const {
return *( new QString( i18n("MAC Option") ) ); return *( new TQString( i18n("MAC Option") ) );
} }
const QString&amp; KMFRuleOptionEditMAC::description() const { const TQString&amp; KMFRuleOptionEditMAC::description() const {
return *( new QString( i18n("This plugin manages the MAC address based options of iptables.") ) ); return *( new TQString( i18n("This plugin manages the MAC address based options of iptables.") ) );
} }
// We must implement this as it is called from the underliening rule editor // We must implement this as it is called from the underliening rule editor
@ -1129,7 +1129,7 @@ void KMFRuleOptionEditMAC::loadRule( IPTRule* rule ) {
} }
// return a pointer to our editor widget // return a pointer to our editor widget
QWidget* KMFRuleOptionEditMAC::editWidget() { TQWidget* KMFRuleOptionEditMAC::editWidget() {
if ( ! m_edit ) { if ( ! m_edit ) {
kdDebug() &lt;&lt; "KMFRuleOptionEditMAC::editWidget() - m_edit == 0" &lt;&lt; endl; kdDebug() &lt;&lt; "KMFRuleOptionEditMAC::editWidget() - m_edit == 0" &lt;&lt; endl;
return 0; return 0;
@ -1145,13 +1145,13 @@ QWidget* KMFRuleOptionEditMAC::editWidget() {
// TDEInstance* KMFRuleOptionEditMACFactory::s_instance = 0L; // TDEInstance* KMFRuleOptionEditMACFactory::s_instance = 0L;
// TDEAboutData* KMFRuleOptionEditMACFactory::s_about = 0L; // TDEAboutData* KMFRuleOptionEditMACFactory::s_about = 0L;
KMFRuleOptionEditMACFactory::KMFRuleOptionEditMACFactory( QObject* parent, const char* name ) KMFRuleOptionEditMACFactory::KMFRuleOptionEditMACFactory( TQObject* parent, const char* name )
: KLibFactory( parent, name ) { : KLibFactory( parent, name ) {
} }
QObject* KMFRuleOptionEditMACFactory::createObject( QObject* parent, const char* name, TQObject* KMFRuleOptionEditMACFactory::createObject( TQObject* parent, const char* name,
const char*, const QStringList &amp; ) { const char*, const QStringList &amp; ) {
QObject * obj = new KMFRuleOptionEditMAC( parent, name ); TQObject * obj = new KMFRuleOptionEditMAC( parent, name );
emit objectCreated( obj ); emit objectCreated( obj );
return obj; return obj;
} }
@ -1203,7 +1203,7 @@ class KMFRuleEditMac : public KMyFirewallRuleEditorMac {
TQ_OBJECT TQ_OBJECT
public: public:
KMFRuleEditMac( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); KMFRuleEditMac( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~KMFRuleEditMac(); ~KMFRuleEditMac();
void loadRule( IPTRule* ); void loadRule( IPTRule* );
@ -1223,7 +1223,7 @@ private:
IPTRule* m_rule; IPTRule* m_rule;
signals: signals:
void sigAddRuleOpt( QString*, QPtrList&lt;QString&gt;* ); void sigAddRuleOpt( TQString*, QPtrList&lt;TQString&gt;* );
void sigHideMe(); void sigHideMe();
}; };
@ -1280,7 +1280,7 @@ Author: Christian Hubinger &lt;chubinger@gmail.com&gt;, (C) 2001-2004
* The dialog will by default be modeless, unless you set 'modal' to * The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. * TRUE to construct a modal dialog.
*/ */
KMFRuleEditMac::KMFRuleEditMac( QWidget* parent, const char* name, WFlags fl ) KMFRuleEditMac::KMFRuleEditMac( TQWidget* parent, const char* name, WFlags fl )
: KMyFirewallRuleEditorMac( parent, name, fl ) { : KMyFirewallRuleEditorMac( parent, name, fl ) {
m_err_handler = new KMFErrorHandler( "KMFRuleEditMac" ); m_err_handler = new KMFErrorHandler( "KMFRuleEditMac" );
m_check_input = new KMFCheckInput(); m_check_input = new KMFCheckInput();
@ -1301,7 +1301,7 @@ KMFRuleEditMac::~KMFRuleEditMac() {
* font changes * font changes
*/ */
bool KMFRuleEditMac::event( QEvent* ev ) { bool KMFRuleEditMac::event( QEvent* ev ) {
bool ret = QWidget::event( ev ); bool ret = TQWidget::event( ev );
if ( ev->type() == QEvent::ApplicationFontChange ) {} if ( ev->type() == QEvent::ApplicationFontChange ) {}
return ret; return ret;
} }
@ -1317,13 +1317,13 @@ void KMFRuleEditMac::loadRule( IPTRule * rule ) {
t_src_mac5 ->clear(); t_src_mac5 ->clear();
t_src_mac6 ->clear(); t_src_mac6 ->clear();
m_rule = rule; m_rule = rule;
QString line = ""; TQString line = "";
IPTRuleOption* opt = 0; IPTRuleOption* opt = 0;
opt = m_rule->getOptionForName("mac_opt"); opt = m_rule->getOptionForName("mac_opt");
if ( opt ) { if ( opt ) {
QStringList args = opt->getValues(); QStringList args = opt->getValues();
QString src, dest; TQString src, dest;
line = *args.at(1); line = *args.at(1);
if ( line.isEmpty() || line == "UNDEFINED" ) if ( line.isEmpty() || line == "UNDEFINED" )
return; return;
@ -1332,7 +1332,7 @@ void KMFRuleEditMac::loadRule( IPTRule * rule ) {
c_inv_src_mac->setChecked( true ); c_inv_src_mac->setChecked( true );
} }
int num = 1; int num = 1;
QString part = ""; TQString part = "";
c_src_mac->setChecked( true ); c_src_mac->setChecked( true );
while ( !line.isEmpty() ) { while ( !line.isEmpty() ) {
int pos = -1; int pos = -1;
@ -1374,21 +1374,21 @@ void KMFRuleEditMac::accept() {
kdDebug() &lt;&lt; "KMFRuleEditMac::accept()" &lt;&lt; endl; kdDebug() &lt;&lt; "KMFRuleEditMac::accept()" &lt;&lt; endl;
m_rule->chain()->table()->kmfDoc()->startTransaction(); m_rule->chain()->table()->kmfDoc()->startTransaction();
m_rule->saveState(); m_rule->saveState();
QString tok1 = t_src_mac1->text().upper(); TQString tok1 = t_src_mac1->text().upper();
QString tok2 = t_src_mac2->text().upper(); TQString tok2 = t_src_mac2->text().upper();
QString tok3 = t_src_mac3->text().upper(); TQString tok3 = t_src_mac3->text().upper();
QString tok4 = t_src_mac4->text().upper(); TQString tok4 = t_src_mac4->text().upper();
QString tok5 = t_src_mac5->text().upper(); TQString tok5 = t_src_mac5->text().upper();
QString tok6 = t_src_mac6->text().upper(); TQString tok6 = t_src_mac6->text().upper();
if ( c_src_mac->isChecked() &amp;&amp; ( tok1.isEmpty() || tok2.isEmpty() || tok3.isEmpty() || tok4.isEmpty() || tok5.isEmpty() || tok6.isEmpty() ) ) { if ( c_src_mac->isChecked() &amp;&amp; ( tok1.isEmpty() || tok2.isEmpty() || tok3.isEmpty() || tok4.isEmpty() || tok5.isEmpty() || tok6.isEmpty() ) ) {
const QString &amp; msg = i18n( "One ore more of the fields are empty. Please fill out all fields to define a valid MAC address." ); const TQString &amp; msg = i18n( "One ore more of the fields are empty. Please fill out all fields to define a valid MAC address." );
KMessageBox::error( this, msg ); KMessageBox::error( this, msg );
m_rule->chain()->table()->kmfDoc()->endTransaction(); m_rule->chain()->table()->kmfDoc()->endTransaction();
return ; return ;
} }
QString mac = ""; TQString mac = "";
if ( c_src_mac->isChecked() ) { if ( c_src_mac->isChecked() ) {
mac = tok1 + ":" + tok2 + ":" + tok3 + ":" + tok4 + ":" + tok5 + ":" + tok6; mac = tok1 + ":" + tok2 + ":" + tok3 + ":" + tok4 + ":" + tok5 + ":" + tok6;
@ -1399,15 +1399,15 @@ void KMFRuleEditMac::accept() {
} }
} }
QPtrList&lt;QString>* values = new QPtrList&lt;QString&gt;; QPtrList&lt;TQString>* values = new QPtrList&lt;TQString&gt;;
QString* op = new QString( "mac_opt" ); TQString* op = new TQString( "mac_opt" );
if ( c_src_mac->isChecked() &amp;&amp; !mac.isEmpty() ) { if ( c_src_mac->isChecked() &amp;&amp; !mac.isEmpty() ) {
kdDebug() &lt;&lt; "Add new mac option" &lt;&lt; endl; kdDebug() &lt;&lt; "Add new mac option" &lt;&lt; endl;
QString* src_mac = new QString( mac ); TQString* src_mac = new TQString( mac );
if ( c_inv_src_mac->isChecked() ) { if ( c_inv_src_mac->isChecked() ) {
src_mac->prepend( "! " ); src_mac->prepend( "! " );
} }
values->append( new QString( "bool:on" ) ); values->append( new TQString( "bool:on" ) );
values->append( src_mac ); values->append( src_mac );
} }
emit sigAddRuleOpt( op, values ); emit sigAddRuleOpt( op, values );

@ -43,8 +43,8 @@ public slots:
void slotHelp(); void slotHelp();
signals: signals:
void sigAddRuleOpt( QString*, QPtrList<QString>* ); void sigAddRuleOpt( TQString*, QPtrList<TQString>* );
void sigAddTargetOpt( QString *, QPtrList<QString> * ); void sigAddTargetOpt( TQString *, QPtrList<TQString> * );
void sigDocumentChanged(); void sigDocumentChanged();
void sigHideMe(); void sigHideMe();

Loading…
Cancel
Save