summaryrefslogtreecommitdiffstats
path: root/kmyfirewall/kmfwidgets/kmftemplatechooser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmyfirewall/kmfwidgets/kmftemplatechooser.cpp')
-rw-r--r--kmyfirewall/kmfwidgets/kmftemplatechooser.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kmyfirewall/kmfwidgets/kmftemplatechooser.cpp b/kmyfirewall/kmfwidgets/kmftemplatechooser.cpp
index 2d989bb..eb0274b 100644
--- a/kmyfirewall/kmfwidgets/kmftemplatechooser.cpp
+++ b/kmyfirewall/kmfwidgets/kmftemplatechooser.cpp
@@ -11,13 +11,13 @@
// License: GPL
//
-// Qt includes
-#include <qlistbox.h>
-#include <qfile.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qdir.h>
-#include <qpushbutton.h>
+// TQt includes
+#include <tqlistbox.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqdir.h>
+#include <tqpushbutton.h>
// KDE includes
#include <kstandarddirs.h>
@@ -33,13 +33,13 @@
#include "kmftemplatechooser.h"
namespace KMF {
-KMFTemplateChooser::KMFTemplateChooser(QWidget* parent, const char* name, bool modal, WFlags fl) : KMyFirewallTemplateChooser(parent,name, modal,fl) {
- connect( lb_templates, SIGNAL( highlighted ( int ) ),
- this, SLOT( slotNewTemplateSelected( int ) ) );
- connect( lb_templates, SIGNAL( doubleClicked( QListBoxItem* ) ),
- this, SLOT( slotNewTemplateSelected( QListBoxItem* ) ) );
- connect( b_help, SIGNAL( clicked() ),
- this, SLOT( slotHelp() ) );
+KMFTemplateChooser::KMFTemplateChooser(TQWidget* tqparent, const char* name, bool modal, WFlags fl) : KMyFirewallTemplateChooser(tqparent,name, modal,fl) {
+ connect( lb_templates, TQT_SIGNAL( highlighted ( int ) ),
+ this, TQT_SLOT( slotNewTemplateSelected( int ) ) );
+ connect( lb_templates, TQT_SIGNAL( doubleClicked( TQListBoxItem* ) ),
+ this, TQT_SLOT( slotNewTemplateSelected( TQListBoxItem* ) ) );
+ connect( b_help, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotHelp() ) );
parseTemplates();
b_accept->setEnabled( false );
@@ -49,7 +49,7 @@ KMFTemplateChooser::~KMFTemplateChooser() {}
/*$SPECIALIZATION$*/
void KMFTemplateChooser::reject() {
- QDialog::reject();
+ TQDialog::reject();
}
void KMFTemplateChooser::accept() {
@@ -62,7 +62,7 @@ void KMFTemplateChooser::accept() {
} else {
emit sigLoadTemplate( *m_templateFilePaths.at( lb_templates->currentItem() ) );
}
- QDialog::accept();
+ TQDialog::accept();
}
void KMFTemplateChooser::slotHelp() {
@@ -70,7 +70,7 @@ void KMFTemplateChooser::slotHelp() {
kapp->invokeHelp();
}
-void KMFTemplateChooser::slotNewTemplateSelected( QListBoxItem* i ){
+void KMFTemplateChooser::slotNewTemplateSelected( TQListBoxItem* i ){
// kdDebug() << "void KMFTemplateChooser::slotNewTemplateSelected( " << index << " )" << endl;
slotNewTemplateSelected( lb_templates->index( i ) );
accept();
@@ -98,51 +98,51 @@ void KMFTemplateChooser::parseTemplates(){
}
KStandardDirs std_dir;
- QString tmp_dir = std_dir.findResourceDir( "data", "kmyfirewall/templates/" );
+ TQString tmp_dir = std_dir.findResourceDir( "data", "kmyfirewall/templates/" );
- QDir dir( tmp_dir + "/kmyfirewall/templates/" );
+ TQDir dir( tmp_dir + "/kmyfirewall/templates/" );
kdDebug() << "Found Data dir at: " << dir.path() << endl;
- QString type;
+ TQString type;
if ( KMFConfig::useGenericInterface() ) {
type = "*.tkmfgrs";
} else {
type = "*.tkmfrs";
}
- QStringList templates = dir.entryList( type );
+ TQStringList templates = dir.entryList( type );
if ( templates.isEmpty() ) {
- KMessageBox::information( this, i18n("No templates (%1) could be found; please check your installation.").arg( type ) );
+ KMessageBox::information( this, i18n("No templates (%1) could be found; please check your installation.").tqarg( type ) );
return;
}
- for ( QStringList::Iterator it = templates.begin(); it != templates.end(); ++it ) {
+ for ( TQStringList::Iterator it = templates.begin(); it != templates.end(); ++it ) {
parseFile( dir.path() + "/" + *it );
}
}
-void KMFTemplateChooser::parseFile( const QString& file ) {
+void KMFTemplateChooser::parseFile( const TQString& file ) {
// kdDebug() << "Parsing Template: " << file << endl;
- QFile f( file );
+ TQFile f( file );
if ( !f.open( IO_ReadOnly ) ) {
- KMessageBox::information( this, i18n("Template %1 could not be opened.").arg( file ) );
+ KMessageBox::information( this, i18n("Template %1 could not be opened.").tqarg( file ) );
return;
}
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &f ) ) {
f.close();
- KMessageBox::information( this, i18n("Template %1 is not a valid XML document.").arg( file ) );
+ KMessageBox::information( this, i18n("Template %1 is not a valid XML document.").tqarg( file ) );
return;
}
- QDomElement root = doc.documentElement();
- QDomNodeList list = root.elementsByTagName ( XML::Abstract_Element );
+ TQDomElement root = doc.documentElement();
+ TQDomNodeList list = root.elementsByTagName ( XML::Abstract_Element );
if ( list.count() == 0 ) {
- KMessageBox::information( this, i18n("Template %1 does not contain the \"abstract\" tag.").arg( file ) );
+ KMessageBox::information( this, i18n("Template %1 does not contain the \"abstract\" tag.").tqarg( file ) );
return;
}
- QDomNode node = list.item( 0 );
- QString desc = node.toElement().attribute( XML::Description_Attribute );
- QString name = node.toElement().attribute( XML::Name_Attribute );
+ TQDomNode node = list.item( 0 );
+ TQString desc = node.toElement().attribute( XML::Description_Attribute );
+ TQString name = node.toElement().attribute( XML::Name_Attribute );
lb_templates->insertItem( name );
m_templateFilePaths.append( file );
m_templateDescriptions.append( desc );