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

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 69860bab74)
r14.1.x r14.1.1
Michele Calgaro 1 year ago
parent ec60f50d6e
commit 2642005fd9
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 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>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>
</itemizedlist>
</sect2>
@ -1003,17 +1003,17 @@ class KMFRuleEditMac;
class KMFRuleOptionEditMAC : public KMFRuleOptionEditInterface {
TQ_OBJECT
public:
KMFRuleOptionEditMAC(QObject *parent = 0, const char *name = 0);
KMFRuleOptionEditMAC(TQObject *parent = 0, const char *name = 0);
~KMFRuleOptionEditMAC();
void loadRule( IPTRule* rule );
QWidget* editWidget();
const QString&amp; optionEditName() const;
const QString&amp; description() const;
TQWidget* editWidget();
const TQString&amp; optionEditName() const;
const TQString&amp; description() const;
private slots:
void slotAddRuleOption(QString*, QPtrList&lt; QString &gt;* );
void slotAddTargetOption(QString*, QPtrList&lt; QString &gt;* );
void slotAddRuleOption(TQString*, QPtrList&lt; TQString &gt;* );
void slotAddTargetOption(TQString*, QPtrList&lt; TQString &gt;* );
void slotShowOverview();
private:
@ -1027,11 +1027,11 @@ class TDEInstance;
class KMFRuleOptionEditMACFactory : public KLibFactory {
TQ_OBJECT
public:
KMFRuleOptionEditMACFactory( QObject *parent = 0, const char *name = 0 );
KMFRuleOptionEditMACFactory( TQObject *parent = 0, const char *name = 0 );
virtual ~KMFRuleOptionEditMACFactory() {
};
virtual QObject* createObject( QObject* parent = 0, const char* pname = 0,
const char* name = "QObject",
virtual TQObject* createObject( TQObject* parent = 0, const char* pname = 0,
const char* name = "TQObject",
const QStringList &amp;args = QStringList() );
};
@ -1064,7 +1064,7 @@ public:
#include "kmfruleeditmac.h"
// 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) {
// Initialise the editor class
@ -1073,11 +1073,11 @@ KMFRuleOptionEditMAC::KMFRuleOptionEditMAC(QObject *parent, const char *name)
m_edit->hide();
// 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;* ) ),
this,SLOT( slotAddRuleOption(QString*, QPtrList&lt; QString &gt;* ) ) );
connect( m_edit,SIGNAL(sigAddRuleOpt(TQString*, QPtrList&lt; TQString &gt;* ) ),
this,SLOT( slotAddRuleOption(TQString*, QPtrList&lt; TQString &gt;* ) ) );
//
//connect( m_edit,SIGNAL(sigAddTargetOpt(QString*, QPtrList&lt; QString &gt;* ) ),
// this,SLOT( slotAddTargetOption(QString*, QPtrList&lt; QString &gt;* ) ) );
//connect( m_edit,SIGNAL(sigAddTargetOpt(TQString*, QPtrList&lt; TQString &gt;* ) ),
// this,SLOT( slotAddTargetOption(TQString*, QPtrList&lt; TQString &gt;* ) ) );
connect( m_edit,SIGNAL(sigHideMe() ),
this,SLOT( slotShowOverview() ) );
}
@ -1085,14 +1085,14 @@ KMFRuleOptionEditMAC::KMFRuleOptionEditMAC(QObject *parent, const char *name)
KMFRuleOptionEditMAC::~KMFRuleOptionEditMAC() {}
// 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() ) ) {
ruleedit->addRuleOption( name, values );
} else {
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() ) ) {
ruleedit->addRuleTargetOption( name, values );
} else {
@ -1111,11 +1111,11 @@ void KMFRuleOptionEditMAC::slotShowOverview() {
// Get info for GUI about the plugin
const QString&amp; KMFRuleOptionEditMAC::optionEditName() const {
return *( new QString( i18n("MAC Option") ) );
const TQString&amp; KMFRuleOptionEditMAC::optionEditName() const {
return *( new TQString( i18n("MAC Option") ) );
}
const QString&amp; KMFRuleOptionEditMAC::description() const {
return *( new QString( i18n("This plugin manages the MAC address based options of iptables.") ) );
const TQString&amp; KMFRuleOptionEditMAC::description() const {
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
@ -1129,7 +1129,7 @@ void KMFRuleOptionEditMAC::loadRule( IPTRule* rule ) {
}
// return a pointer to our editor widget
QWidget* KMFRuleOptionEditMAC::editWidget() {
TQWidget* KMFRuleOptionEditMAC::editWidget() {
if ( ! m_edit ) {
kdDebug() &lt;&lt; "KMFRuleOptionEditMAC::editWidget() - m_edit == 0" &lt;&lt; endl;
return 0;
@ -1145,13 +1145,13 @@ QWidget* KMFRuleOptionEditMAC::editWidget() {
// TDEInstance* KMFRuleOptionEditMACFactory::s_instance = 0L;
// TDEAboutData* KMFRuleOptionEditMACFactory::s_about = 0L;
KMFRuleOptionEditMACFactory::KMFRuleOptionEditMACFactory( QObject* parent, const char* name )
KMFRuleOptionEditMACFactory::KMFRuleOptionEditMACFactory( TQObject* parent, const char* 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; ) {
QObject * obj = new KMFRuleOptionEditMAC( parent, name );
TQObject * obj = new KMFRuleOptionEditMAC( parent, name );
emit objectCreated( obj );
return obj;
}
@ -1203,7 +1203,7 @@ class KMFRuleEditMac : public KMyFirewallRuleEditorMac {
TQ_OBJECT
public:
KMFRuleEditMac( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
KMFRuleEditMac( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~KMFRuleEditMac();
void loadRule( IPTRule* );
@ -1223,7 +1223,7 @@ private:
IPTRule* m_rule;
signals:
void sigAddRuleOpt( QString*, QPtrList&lt;QString&gt;* );
void sigAddRuleOpt( TQString*, QPtrList&lt;TQString&gt;* );
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
* 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 ) {
m_err_handler = new KMFErrorHandler( "KMFRuleEditMac" );
m_check_input = new KMFCheckInput();
@ -1301,7 +1301,7 @@ KMFRuleEditMac::~KMFRuleEditMac() {
* font changes
*/
bool KMFRuleEditMac::event( QEvent* ev ) {
bool ret = QWidget::event( ev );
bool ret = TQWidget::event( ev );
if ( ev->type() == QEvent::ApplicationFontChange ) {}
return ret;
}
@ -1317,13 +1317,13 @@ void KMFRuleEditMac::loadRule( IPTRule * rule ) {
t_src_mac5 ->clear();
t_src_mac6 ->clear();
m_rule = rule;
QString line = "";
TQString line = "";
IPTRuleOption* opt = 0;
opt = m_rule->getOptionForName("mac_opt");
if ( opt ) {
QStringList args = opt->getValues();
QString src, dest;
TQString src, dest;
line = *args.at(1);
if ( line.isEmpty() || line == "UNDEFINED" )
return;
@ -1332,7 +1332,7 @@ void KMFRuleEditMac::loadRule( IPTRule * rule ) {
c_inv_src_mac->setChecked( true );
}
int num = 1;
QString part = "";
TQString part = "";
c_src_mac->setChecked( true );
while ( !line.isEmpty() ) {
int pos = -1;
@ -1374,21 +1374,21 @@ void KMFRuleEditMac::accept() {
kdDebug() &lt;&lt; "KMFRuleEditMac::accept()" &lt;&lt; endl;
m_rule->chain()->table()->kmfDoc()->startTransaction();
m_rule->saveState();
QString tok1 = t_src_mac1->text().upper();
QString tok2 = t_src_mac2->text().upper();
QString tok3 = t_src_mac3->text().upper();
QString tok4 = t_src_mac4->text().upper();
QString tok5 = t_src_mac5->text().upper();
QString tok6 = t_src_mac6->text().upper();
TQString tok1 = t_src_mac1->text().upper();
TQString tok2 = t_src_mac2->text().upper();
TQString tok3 = t_src_mac3->text().upper();
TQString tok4 = t_src_mac4->text().upper();
TQString tok5 = t_src_mac5->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() ) ) {
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 );
m_rule->chain()->table()->kmfDoc()->endTransaction();
return ;
}
QString mac = "";
TQString mac = "";
if ( c_src_mac->isChecked() ) {
mac = tok1 + ":" + tok2 + ":" + tok3 + ":" + tok4 + ":" + tok5 + ":" + tok6;
@ -1399,15 +1399,15 @@ void KMFRuleEditMac::accept() {
}
}
QPtrList&lt;QString>* values = new QPtrList&lt;QString&gt;;
QString* op = new QString( "mac_opt" );
QPtrList&lt;TQString>* values = new QPtrList&lt;TQString&gt;;
TQString* op = new TQString( "mac_opt" );
if ( c_src_mac->isChecked() &amp;&amp; !mac.isEmpty() ) {
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() ) {
src_mac->prepend( "! " );
}
values->append( new QString( "bool:on" ) );
values->append( new TQString( "bool:on" ) );
values->append( src_mac );
}
emit sigAddRuleOpt( op, values );

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

Loading…
Cancel
Save