summaryrefslogtreecommitdiffstats
path: root/kate/app/kateexternaltools.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kate/app/kateexternaltools.cpp
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/app/kateexternaltools.cpp')
-rw-r--r--kate/app/kateexternaltools.cpp230
1 files changed, 115 insertions, 115 deletions
diff --git a/kate/app/kateexternaltools.cpp b/kate/app/kateexternaltools.cpp
index 50c07709b..6680e26a4 100644
--- a/kate/app/kateexternaltools.cpp
+++ b/kate/app/kateexternaltools.cpp
@@ -44,19 +44,19 @@
#include <kpopupmenu.h>
#include <kdebug.h>
-#include <qbitmap.h>
-#include <qcombobox.h>
-#include <qfile.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qmap.h>
-#include <qregexp.h>
-#include <qtextedit.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
+#include <tqbitmap.h>
+#include <tqcombobox.h>
+#include <tqfile.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqtextedit.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
#include <stdlib.h>
#include <unistd.h>
@@ -65,13 +65,13 @@
KateExternalToolsCommand *KateExternalToolsCommand::s_self=0;
//BEGIN KateExternalTool
-KateExternalTool::KateExternalTool( const QString &name,
- const QString &command,
- const QString &icon,
- const QString &tryexec,
- const QStringList &mimetypes,
- const QString &acname,
- const QString &cmdname,
+KateExternalTool::KateExternalTool( const TQString &name,
+ const TQString &command,
+ const TQString &icon,
+ const TQString &tryexec,
+ const TQStringList &mimetypes,
+ const TQString &acname,
+ const TQString &cmdname,
int save )
: name ( name ),
command ( command ),
@@ -90,12 +90,12 @@ bool KateExternalTool::checkExec()
{
// if tryexec is empty, it is the first word of command
if ( tryexec.isEmpty() )
- tryexec = command.section( " ", 0, 0, QString::SectionSkipEmpty );
+ tryexec = command.section( " ", 0, 0, TQString::SectionSkipEmpty );
// NOTE this code is modified taken from kdesktopfile.cpp, from KDesktopFile::tryExec()
if (!tryexec.isEmpty()) {
if (tryexec[0] == '/') {
- if (::access(QFile::encodeName(tryexec), R_OK | X_OK))
+ if (::access(TQFile::encodeName(tryexec), R_OK | X_OK))
return false;
m_exec = tryexec;
@@ -103,13 +103,13 @@ bool KateExternalTool::checkExec()
// !!! Sergey A. Sukiyazov <corwin@micom.don.ru> !!!
// Environment PATH may contain filenames in 8bit locale cpecified
// encoding (Like a filenames).
- QStringList dirs = QStringList::split(':', QFile::decodeName(::getenv("PATH")));
- QStringList::Iterator it(dirs.begin());
+ TQStringList dirs = TQStringList::split(':', TQFile::decodeName(::getenv("PATH")));
+ TQStringList::Iterator it(dirs.begin());
bool match = false;
for (; it != dirs.end(); ++it)
{
- QString fName = *it + "/" + tryexec;
- if (::access(QFile::encodeName(fName), R_OK | X_OK) == 0)
+ TQString fName = *it + "/" + tryexec;
+ if (::access(TQFile::encodeName(fName), R_OK | X_OK) == 0)
{
match = true;
m_exec = fName;
@@ -125,7 +125,7 @@ bool KateExternalTool::checkExec()
return false;
}
-bool KateExternalTool::valid( const QString &mt ) const
+bool KateExternalTool::valid( const TQString &mt ) const
{
return mimetypes.isEmpty() || mimetypes.contains( mt );
}
@@ -137,7 +137,7 @@ KateExternalToolsCommand::KateExternalToolsCommand() : Kate::Command() {
reload();
}
-QStringList KateExternalToolsCommand::cmds () {
+TQStringList KateExternalToolsCommand::cmds () {
return m_list;
}
@@ -153,10 +153,10 @@ void KateExternalToolsCommand::reload () {
KConfig config("externaltools", false, false, "appdata");
config.setGroup("Global");
- QStringList tools = config.readListEntry("tools");
+ TQStringList tools = config.readListEntry("tools");
- for( QStringList::Iterator it = tools.begin(); it != tools.end(); ++it )
+ for( TQStringList::Iterator it = tools.begin(); it != tools.end(); ++it )
{
if ( *it == "---" )
continue;
@@ -185,8 +185,8 @@ void KateExternalToolsCommand::reload () {
else m_inited=true;
}
-bool KateExternalToolsCommand::exec (Kate::View *view, const QString &cmd, QString &) {
- QWidget *wv=dynamic_cast<QWidget*>(view);
+bool KateExternalToolsCommand::exec (Kate::View *view, const TQString &cmd, TQString &) {
+ TQWidget *wv=dynamic_cast<TQWidget*>(view);
if (!wv) {
// kdDebug(13001)<<"KateExternalToolsCommand::exec: Could not get view widget"<<endl;
return false;
@@ -197,7 +197,7 @@ bool KateExternalToolsCommand::exec (Kate::View *view, const QString &cmd, QStri
return false;
}
// kdDebug(13001)<<"cmd="<<cmd.stripWhiteSpace()<<endl;
- QString actionName=m_map[cmd.stripWhiteSpace()];
+ TQString actionName=m_map[cmd.stripWhiteSpace()];
if (actionName.isEmpty()) return false;
// kdDebug(13001)<<"actionName is not empty:"<<actionName<<endl;
KateExternalToolsMenuAction *a=
@@ -211,13 +211,13 @@ bool KateExternalToolsCommand::exec (Kate::View *view, const QString &cmd, QStri
return true;
}
-bool KateExternalToolsCommand::help (Kate::View *, const QString &, QString &) {
+bool KateExternalToolsCommand::help (Kate::View *, const TQString &, TQString &) {
return false;
}
//END KateExternalToolsCommand
//BEGIN KateExternalToolAction
-KateExternalToolAction::KateExternalToolAction( QObject *parent,
+KateExternalToolAction::KateExternalToolAction( TQObject *parent,
const char *name, KateExternalTool *t)
: KAction( parent, name ),
tool ( t )
@@ -226,10 +226,10 @@ KateExternalToolAction::KateExternalToolAction( QObject *parent,
if ( ! t->icon.isEmpty() )
setIconSet( SmallIconSet( t->icon ) );
- connect( this ,SIGNAL(activated()), this, SLOT(slotRun()) );
+ connect( this ,TQT_SIGNAL(activated()), this, TQT_SLOT(slotRun()) );
}
-bool KateExternalToolAction::expandMacro( const QString &str, QStringList &ret )
+bool KateExternalToolAction::expandMacro( const TQString &str, TQStringList &ret )
{
KateMainWindow *mw = (KateMainWindow*)parent()->parent();
@@ -244,9 +244,9 @@ bool KateExternalToolAction::expandMacro( const QString &str, QStringList &ret )
else if ( str == "filename" )
ret += mw->activeDocumentUrl().fileName();
else if ( str == "line" ) // cursor line of current doc
- ret += QString::number( view->cursorLine() );
+ ret += TQString::number( view->cursorLine() );
else if ( str == "col" ) // cursor col of current doc
- ret += QString::number( view->cursorColumn() );
+ ret += TQString::number( view->cursorColumn() );
else if ( str == "selection" ) // selection of current doc if any
ret += view->getDoc()->selection();
else if ( str == "text" ) // text of current doc
@@ -268,7 +268,7 @@ void KateExternalToolAction::slotRun()
{
// expand the macros in command if any,
// and construct a command with an absolute path
- QString cmd = tool->command;
+ TQString cmd = tool->command;
if ( ! expandMacrosShellQuote( cmd ) )
{
@@ -291,8 +291,8 @@ void KateExternalToolAction::slotRun()
//END KateExternalToolAction
//BEGIN KateExternalToolsMenuAction
-KateExternalToolsMenuAction::KateExternalToolsMenuAction( const QString &text,
- QObject *parent,
+KateExternalToolsMenuAction::KateExternalToolsMenuAction( const TQString &text,
+ TQObject *parent,
const char* name,
KateMainWindow *mw )
: KActionMenu( text, parent, name ),
@@ -301,7 +301,7 @@ KateExternalToolsMenuAction::KateExternalToolsMenuAction( const QString &text,
m_actionCollection = new KActionCollection( mainwindow );
- connect(KateDocManager::self(),SIGNAL(documentChanged()),this,SLOT(slotDocumentChanged()));
+ connect(KateDocManager::self(),TQT_SIGNAL(documentChanged()),this,TQT_SLOT(slotDocumentChanged()));
reload();
}
@@ -314,21 +314,21 @@ void KateExternalToolsMenuAction::reload()
// load all the tools, and create a action for each of them
KConfig *config = new KConfig( "externaltools", false, false, "appdata" );
config->setGroup( "Global" );
- QStringList tools = config->readListEntry( "tools" );
+ TQStringList tools = config->readListEntry( "tools" );
// if there are tools that are present but not explicitly removed,
// add them to the end of the list
config->setReadDefaults( true );
- QStringList dtools = config->readListEntry( "tools" );
+ TQStringList dtools = config->readListEntry( "tools" );
int gver = config->readNumEntry( "version", 1 );
config->setReadDefaults( false );
int ver = config->readNumEntry( "version" );
if ( ver <= gver )
{
- QStringList removed = config->readListEntry( "removed" );
+ TQStringList removed = config->readListEntry( "removed" );
bool sepadded = false;
- for (QStringList::iterator itg = dtools.begin(); itg != dtools.end(); ++itg )
+ for (TQStringList::iterator itg = dtools.begin(); itg != dtools.end(); ++itg )
{
if ( ! tools.contains( *itg ) &&
! removed.contains( *itg ) )
@@ -347,7 +347,7 @@ void KateExternalToolsMenuAction::reload()
config->writeEntry( "version", gver );
}
- for( QStringList::Iterator it = tools.begin(); it != tools.end(); ++it )
+ for( TQStringList::Iterator it = tools.begin(); it != tools.end(); ++it )
{
if ( *it == "---" )
{
@@ -383,8 +383,8 @@ void KateExternalToolsMenuAction::slotDocumentChanged()
Kate::DocumentExt *de = documentExt( KateDocManager::self()->activeDocument() );
if ( de )
{
- QString mt = de->mimeType();
- QStringList l;
+ TQString mt = de->mimeType();
+ TQStringList l;
bool b;
KActionPtrList actions = m_actionCollection->actions();
@@ -404,14 +404,14 @@ void KateExternalToolsMenuAction::slotDocumentChanged()
//BEGIN ToolItem
/**
- * This is a QListBoxItem, that has a KateExternalTool. The text is the Name
+ * This is a TQListBoxItem, that has a KateExternalTool. The text is the Name
* of the tool.
*/
class ToolItem : public QListBoxPixmap
{
public:
- ToolItem( QListBox *lb, const QPixmap &icon, KateExternalTool *tool )
- : QListBoxPixmap( lb, icon, tool->name ),
+ ToolItem( TQListBox *lb, const TQPixmap &icon, KateExternalTool *tool )
+ : TQListBoxPixmap( lb, icon, tool->name ),
tool ( tool )
{;}
@@ -423,26 +423,26 @@ class ToolItem : public QListBoxPixmap
//BEGIN KateExternalToolServiceEditor
KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool *tool,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n("Edit External Tool"), KDialogBase::Ok|KDialogBase::Cancel ),
tool( tool )
{
// create a entry for each property
// fill in the values from the service if available
- QWidget *w = new QWidget( this );
+ TQWidget *w = new TQWidget( this );
setMainWidget( w );
- QGridLayout *lo = new QGridLayout( w );
+ TQGridLayout *lo = new TQGridLayout( w );
lo->setSpacing( KDialogBase::spacingHint() );
- QLabel *l;
+ TQLabel *l;
- leName = new QLineEdit( w );
+ leName = new TQLineEdit( w );
lo->addWidget( leName, 1, 2 );
- l = new QLabel( leName, i18n("&Label:"), w );
+ l = new TQLabel( leName, i18n("&Label:"), w );
l->setAlignment( l->alignment()|Qt::AlignRight );
lo->addWidget( l, 1, 1 );
if ( tool ) leName->setText( tool->name );
- QWhatsThis::add( leName, i18n(
+ TQWhatsThis::add( leName, i18n(
"The name will be displayed in the 'Tools->External' menu") );
btnIcon = new KIconButton( w );
@@ -451,13 +451,13 @@ KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool *
if ( tool && !tool->icon.isEmpty() )
btnIcon->setIcon( tool->icon );
- teCommand = new QTextEdit( w );
+ teCommand = new TQTextEdit( w );
lo->addMultiCellWidget( teCommand, 2, 2, 2, 3 );
- l = new QLabel( teCommand, i18n("S&cript:"), w );
+ l = new TQLabel( teCommand, i18n("S&cript:"), w );
l->setAlignment( Qt::AlignTop|Qt::AlignRight );
lo->addWidget( l, 2, 1 );
if ( tool ) teCommand->setText( tool->command );
- QWhatsThis::add( teCommand, i18n(
+ TQWhatsThis::add( teCommand, i18n(
"<p>The script to execute to invoke the tool. The script is passed "
"to /bin/sh for execution. The following macros "
"will be expanded:</p>"
@@ -474,57 +474,57 @@ KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool *
"<li><code>%text</code> - the text of the current document.</ul>" ) );
- leExecutable = new QLineEdit( w );
+ leExecutable = new TQLineEdit( w );
lo->addMultiCellWidget( leExecutable, 3, 3, 2, 3 );
- l = new QLabel( leExecutable, i18n("&Executable:"), w );
+ l = new TQLabel( leExecutable, i18n("&Executable:"), w );
l->setAlignment( l->alignment()|Qt::AlignRight );
lo->addWidget( l, 3, 1 );
if ( tool ) leExecutable->setText( tool->tryexec );
- QWhatsThis::add( leExecutable, i18n(
+ TQWhatsThis::add( leExecutable, i18n(
"The executable used by the command. This is used to check if a tool "
"should be displayed; if not set, the first word of <em>command</em> "
"will be used.") );
- leMimetypes = new QLineEdit( w );
+ leMimetypes = new TQLineEdit( w );
lo->addWidget( leMimetypes, 4, 2 );
- l = new QLabel( leMimetypes, i18n("&Mime types:"), w );
+ l = new TQLabel( leMimetypes, i18n("&Mime types:"), w );
l->setAlignment( l->alignment()|Qt::AlignRight );
lo->addWidget( l, 4, 1 );
if ( tool ) leMimetypes->setText( tool->mimetypes.join("; ") );
- QWhatsThis::add( leMimetypes, i18n(
+ TQWhatsThis::add( leMimetypes, i18n(
"A semicolon-separated list of mime types for which this tool should "
"be available; if this is left empty, the tool is always available. "
"To choose from known mimetypes, press the button on the right.") );
- QToolButton *btnMTW = new QToolButton(w);
+ TQToolButton *btnMTW = new TQToolButton(w);
lo->addWidget( btnMTW, 4, 3 );
- btnMTW->setIconSet(QIconSet(SmallIcon("wizard")));
- connect(btnMTW, SIGNAL(clicked()), this, SLOT(showMTDlg()));
- QWhatsThis::add( btnMTW, i18n(
+ btnMTW->setIconSet(TQIconSet(SmallIcon("wizard")));
+ connect(btnMTW, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMTDlg()));
+ TQWhatsThis::add( btnMTW, i18n(
"Click for a dialog that can help you creating a list of mimetypes.") );
- cmbSave = new QComboBox(w);
+ cmbSave = new TQComboBox(w);
lo->addMultiCellWidget( cmbSave, 5, 5, 2, 3 );
- l = new QLabel( cmbSave, i18n("&Save:"), w );
+ l = new TQLabel( cmbSave, i18n("&Save:"), w );
l->setAlignment( l->alignment()|Qt::AlignRight );
lo->addWidget( l, 5, 1 );
- QStringList sl;
+ TQStringList sl;
sl << i18n("None") << i18n("Current Document") << i18n("All Documents");
cmbSave->insertStringList( sl );
if ( tool ) cmbSave->setCurrentItem( tool->save );
- QWhatsThis::add( cmbSave, i18n(
+ TQWhatsThis::add( cmbSave, i18n(
"You can elect to save the current or all [modified] documents prior to "
"running the command. This is helpful if you want to pass URLs to "
"an application like, for example, an FTP client.") );
- leCmdLine = new QLineEdit( w );
+ leCmdLine = new TQLineEdit( w );
lo->addMultiCellWidget( leCmdLine, 6, 6, 2, 3 );
- l = new QLabel( leCmdLine, i18n("&Command line name:"), w );
+ l = new TQLabel( leCmdLine, i18n("&Command line name:"), w );
l->setAlignment( l->alignment()|Qt::AlignRight );
lo->addWidget( l, 6, 1 );
if ( tool ) leCmdLine->setText( tool->cmdname );
- QWhatsThis::add( leCmdLine, i18n(
+ TQWhatsThis::add( leCmdLine, i18n(
"If you specify a name here, you can invoke the command from the view "
"command lines with exttool-the_name_you_specified_here. "
"Please do not use spaces or tabs in the name."));
@@ -545,8 +545,8 @@ void KateExternalToolServiceEditor::slotOk()
void KateExternalToolServiceEditor::showMTDlg()
{
- QString text = i18n("Select the MimeTypes for which to enable this tool.");
- QStringList list = QStringList::split( QRegExp("\\s*;\\s*"), leMimetypes->text() );
+ TQString text = i18n("Select the MimeTypes for which to enable this tool.");
+ TQStringList list = TQStringList::split( TQRegExp("\\s*;\\s*"), leMimetypes->text() );
KMimeTypeChooserDialog d( i18n("Select Mime Types"), text, list, "text", this );
if ( d.exec() == KDialogBase::Accepted ) {
leMimetypes->setText( d.chooser()->mimeTypes().join(";") );
@@ -555,41 +555,41 @@ void KateExternalToolServiceEditor::showMTDlg()
//END KateExternalToolServiceEditor
//BEGIN KateExternalToolsConfigWidget
-KateExternalToolsConfigWidget::KateExternalToolsConfigWidget( QWidget *parent, const char* name )
+KateExternalToolsConfigWidget::KateExternalToolsConfigWidget( TQWidget *parent, const char* name )
: Kate::ConfigPage( parent, name ),
m_changed( false )
{
- QGridLayout *lo = new QGridLayout( this, 5, 5, 0, KDialog::spacingHint() );
+ TQGridLayout *lo = new TQGridLayout( this, 5, 5, 0, KDialog::spacingHint() );
lbTools = new KListBox( this );
lo->addMultiCellWidget( lbTools, 1, 4, 0, 3 );
- connect( lbTools, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()) );
+ connect( lbTools, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()) );
- btnNew = new QPushButton( i18n("&New..."), this );
+ btnNew = new TQPushButton( i18n("&New..."), this );
lo->addWidget( btnNew, 5, 0 );
- connect( btnNew, SIGNAL(clicked()), this, SLOT(slotNew()) );
+ connect( btnNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNew()) );
- btnRemove = new QPushButton( i18n("&Remove"), this );
+ btnRemove = new TQPushButton( i18n("&Remove"), this );
lo->addWidget( btnRemove, 5, 2 );
- connect( btnRemove, SIGNAL(clicked()), this, SLOT(slotRemove()) );
+ connect( btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemove()) );
- btnEdit = new QPushButton( i18n("&Edit..."), this );
+ btnEdit = new TQPushButton( i18n("&Edit..."), this );
lo->addWidget( btnEdit, 5, 1 );
- connect( btnEdit, SIGNAL(clicked()), this, SLOT(slotEdit()) );
+ connect( btnEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEdit()) );
- QPushButton *b = new QPushButton( i18n("Insert &Separator"), this );
+ TQPushButton *b = new TQPushButton( i18n("Insert &Separator"), this );
lo->addWidget( b, 5, 3 );
- connect( b, SIGNAL(clicked()), this, SLOT(slotInsertSeparator()) );
+ connect( b, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotInsertSeparator()) );
- btnMoveUp = new QPushButton( SmallIconSet("up"), "", this );
+ btnMoveUp = new TQPushButton( SmallIconSet("up"), "", this );
lo->addWidget( btnMoveUp, 2, 4 );
- connect( btnMoveUp, SIGNAL(clicked()), this, SLOT(slotMoveUp()) );
+ connect( btnMoveUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveUp()) );
- btnMoveDwn = new QPushButton( SmallIconSet("down"), "", this );
+ btnMoveDwn = new TQPushButton( SmallIconSet("down"), "", this );
lo->addWidget( btnMoveDwn, 3, 4 );
- connect( btnMoveDwn, SIGNAL(clicked()), this, SLOT(slotMoveDown()) );
+ connect( btnMoveDwn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveDown()) );
- connect( lbTools, SIGNAL( doubleClicked ( QListBoxItem * ) ), this, SLOT( slotEdit() ) );
+ connect( lbTools, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ), this, TQT_SLOT( slotEdit() ) );
lo->setRowStretch( 1, 1 );
lo->setRowStretch( 4, 1 );
@@ -598,7 +598,7 @@ KateExternalToolsConfigWidget::KateExternalToolsConfigWidget( QWidget *parent, c
lo->setColStretch( 2, 1 );
- QWhatsThis::add( lbTools, i18n(
+ TQWhatsThis::add( lbTools, i18n(
"This list shows all the configured tools, represented by their menu text.") );
config = new KConfig("externaltools", false, false, "appdata");
@@ -618,13 +618,13 @@ void KateExternalToolsConfigWidget::reload()
// load the files from a KConfig
config->setGroup( "Global" );
- QStringList tools = config->readListEntry("tools");
+ TQStringList tools = config->readListEntry("tools");
- for( QStringList::Iterator it = tools.begin(); it != tools.end(); ++it )
+ for( TQStringList::Iterator it = tools.begin(); it != tools.end(); ++it )
{
if ( *it == "---" )
{
- new QListBoxText( lbTools, "---" );
+ new TQListBoxText( lbTools, "---" );
}
else
{
@@ -647,9 +647,9 @@ void KateExternalToolsConfigWidget::reload()
m_changed = false;
}
-QPixmap KateExternalToolsConfigWidget::blankIcon()
+TQPixmap KateExternalToolsConfigWidget::blankIcon()
{
- QPixmap pm( KIcon::SizeSmall, KIcon::SizeSmall );
+ TQPixmap pm( KIcon::SizeSmall, KIcon::SizeSmall );
pm.fill();
pm.setMask( pm.createHeuristicMask() );
return pm;
@@ -663,7 +663,7 @@ void KateExternalToolsConfigWidget::apply()
// save a new list
// save each item
- QStringList tools;
+ TQStringList tools;
for ( uint i = 0; i < lbTools->count(); i++ )
{
if ( lbTools->text( i ) == "---" )
@@ -693,18 +693,18 @@ void KateExternalToolsConfigWidget::apply()
// add the group names to the list of removed items.
if ( m_removed.count() )
{
- for ( QStringList::iterator it = m_removed.begin(); it != m_removed.end(); ++it )
+ for ( TQStringList::iterator it = m_removed.begin(); it != m_removed.end(); ++it )
{
if ( config->hasGroup( *it ) )
config->deleteGroup( *it );
}
- QStringList removed = config->readListEntry( "removed" );
+ TQStringList removed = config->readListEntry( "removed" );
removed += m_removed;
// clean up the list of removed items, so that it does not contain
// non-existing groups (we can't remove groups from a non-owned global file).
config->sync();
- QStringList::iterator it1 = removed.begin();
+ TQStringList::iterator it1 = removed.begin();
while( it1 != removed.end() )
{
if ( ! config->hasGroup( *it1 ) )
@@ -741,11 +741,11 @@ void KateExternalToolsConfigWidget::slotNew()
editor.teCommand->text(),
editor.btnIcon->icon(),
editor.leExecutable->text(),
- QStringList::split( QRegExp("\\s*;\\s*"), editor.leMimetypes->text() ) );
+ TQStringList::split( TQRegExp("\\s*;\\s*"), editor.leMimetypes->text() ) );
// This is sticky, it does not change again, so that shortcuts sticks
// TODO check for dups
- t->acname = "externaltool_" + QString(t->name).replace( QRegExp("\\W+"), "" );
+ t->acname = "externaltool_" + TQString(t->name).replace( TQRegExp("\\W+"), "" );
new ToolItem ( lbTools, t->icon.isEmpty() ? blankIcon() : SmallIcon( t->icon ), t );
@@ -787,7 +787,7 @@ void KateExternalToolsConfigWidget::slotEdit()
t->command = editor.teCommand->text();
t->icon = editor.btnIcon->icon();
t->tryexec = editor.leExecutable->text();
- t->mimetypes = QStringList::split( QRegExp("\\s*;\\s*"), editor.leMimetypes->text() );
+ t->mimetypes = TQStringList::split( TQRegExp("\\s*;\\s*"), editor.leMimetypes->text() );
t->save = editor.cmbSave->currentItem();
//if the icon has changed or name changed, I have to renew the listbox item :S
@@ -817,7 +817,7 @@ void KateExternalToolsConfigWidget::slotInsertSeparator()
void KateExternalToolsConfigWidget::slotMoveUp()
{
// move the current item in the listbox upwards if possible
- QListBoxItem *item = lbTools->selectedItem();
+ TQListBoxItem *item = lbTools->selectedItem();
if ( ! item ) return;
int idx = lbTools->index( item );
@@ -833,7 +833,7 @@ void KateExternalToolsConfigWidget::slotMoveUp()
else // a separator!
{
lbTools->removeItem( idx );
- lbTools->insertItem( new QListBoxText( 0, "---" ), idx-1 );
+ lbTools->insertItem( new TQListBoxText( 0, "---" ), idx-1 );
}
lbTools->setCurrentItem( idx - 1 );
@@ -845,7 +845,7 @@ void KateExternalToolsConfigWidget::slotMoveUp()
void KateExternalToolsConfigWidget::slotMoveDown()
{
// move the current item in the listbox downwards if possible
- QListBoxItem *item = lbTools->selectedItem();
+ TQListBoxItem *item = lbTools->selectedItem();
if ( ! item ) return;
uint idx = lbTools->index( item );
@@ -861,7 +861,7 @@ void KateExternalToolsConfigWidget::slotMoveDown()
else // a separator!
{
lbTools->removeItem( idx );
- lbTools->insertItem( new QListBoxText( 0, "---" ), idx+1 );
+ lbTools->insertItem( new TQListBoxText( 0, "---" ), idx+1 );
}
lbTools->setCurrentItem( idx+1 );