diff options
Diffstat (limited to 'kate/plugins')
-rw-r--r-- | kate/plugins/autobookmarker/autobookmarker.cpp | 144 | ||||
-rw-r--r-- | kate/plugins/autobookmarker/autobookmarker.h | 44 | ||||
-rw-r--r-- | kate/plugins/insertfile/insertfileplugin.cpp | 32 | ||||
-rw-r--r-- | kate/plugins/insertfile/insertfileplugin.h | 12 | ||||
-rw-r--r-- | kate/plugins/isearch/ISearchPlugin.cpp | 96 | ||||
-rw-r--r-- | kate/plugins/isearch/ISearchPlugin.h | 28 | ||||
-rw-r--r-- | kate/plugins/kdatatool/kate_kdatatool.cpp | 40 | ||||
-rw-r--r-- | kate/plugins/kdatatool/kate_kdatatool.h | 18 | ||||
-rw-r--r-- | kate/plugins/wordcompletion/docwordcompletion.cpp | 124 | ||||
-rw-r--r-- | kate/plugins/wordcompletion/docwordcompletion.h | 40 |
10 files changed, 289 insertions, 289 deletions
diff --git a/kate/plugins/autobookmarker/autobookmarker.cpp b/kate/plugins/autobookmarker/autobookmarker.cpp index af3acbc32..c03fcefe0 100644 --- a/kate/plugins/autobookmarker/autobookmarker.cpp +++ b/kate/plugins/autobookmarker/autobookmarker.cpp @@ -42,16 +42,16 @@ #include <kstaticdeleter.h> #include <kurl.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qlistview.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qtoolbutton.h> -#include <qwhatsthis.h> -#include <qregexp.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqlistview.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqtoolbutton.h> +#include <tqwhatsthis.h> +#include <tqregexp.h> //#include <kdebug.h> //END includes @@ -59,14 +59,14 @@ //BEGIN AutoBookmarker K_EXPORT_COMPONENT_FACTORY( ktexteditor_autobookmarker, KGenericFactory<AutoBookmarker>( "ktexteditor_autobookmarker" ) ) -AutoBookmarker::AutoBookmarker( QObject *parent, +AutoBookmarker::AutoBookmarker( TQObject *parent, const char* name, - const QStringList& /*args*/ ) + const TQStringList& /*args*/ ) : KTextEditor::Plugin ( (KTextEditor::Document*) parent, name ), KTextEditor::ConfigInterfaceExtension() { if ( parent ) - connect( parent, SIGNAL( completed() ), this, SLOT( slotCompleted() ) ); + connect( parent, TQT_SIGNAL( completed() ), this, TQT_SLOT( slotCompleted() ) ); } void AutoBookmarker::addView(KTextEditor::View */*view*/) @@ -77,12 +77,12 @@ void AutoBookmarker::removeView(KTextEditor::View */*view*/) { } -KTextEditor::ConfigPage * AutoBookmarker::configPage( uint /*number*/, QWidget *parent, const char *name ) +KTextEditor::ConfigPage * AutoBookmarker::configPage( uint /*number*/, TQWidget *parent, const char *name ) { return new AutoBookmarkerConfigPage( parent, name ); } -QString AutoBookmarker::configPageName( uint /*p*/ ) const +TQString AutoBookmarker::configPageName( uint /*p*/ ) const { // switch (p) // { @@ -93,7 +93,7 @@ QString AutoBookmarker::configPageName( uint /*p*/ ) const // } } -QString AutoBookmarker::configPageFullName( uint /*p*/ ) const +TQString AutoBookmarker::configPageFullName( uint /*p*/ ) const { // switch (p) // { @@ -104,7 +104,7 @@ QString AutoBookmarker::configPageFullName( uint /*p*/ ) const // } } -QPixmap AutoBookmarker::configPagePixmap( uint /*p*/, int size ) const +TQPixmap AutoBookmarker::configPagePixmap( uint /*p*/, int size ) const { return UserIcon("kte_bookmark", size); } @@ -115,11 +115,11 @@ void AutoBookmarker::slotCompleted() KTextEditor::DocumentInfoInterface *di = static_cast<KTextEditor::DocumentInfoInterface*>(document()-> qt_cast("KTextEditor::DocumentInfoInterface")); - QString mt; + TQString mt; if ( di ) // we can still try match the URL otherwise mt = di->mimeType(); - QString fileName; + TQString fileName; if ( document()->url().isValid() ) fileName = document()->url().fileName(); @@ -136,9 +136,9 @@ void AutoBookmarker::slotCompleted() if ( ! found ) found = ( ! mt.isEmpty() && e->mimemask.contains( mt ) ); if ( ! found ) - for( QStringList::Iterator it1 = e->filemask.begin(); it1 != e->filemask.end(); ++it1 ) + for( TQStringList::Iterator it1 = e->filemask.begin(); it1 != e->filemask.end(); ++it1 ) { - QRegExp re(*it1, true, true); + TQRegExp re(*it1, true, true); if ( ( found = ( ( re.search( fileName ) > -1 ) && ( re.matchedLength() == (int)fileName.length() ) ) ) ) break; } @@ -160,7 +160,7 @@ void AutoBookmarker::applyEntity( AutoBookmarkEnt *e ) if ( ! ( ei && mi ) ) return; - QRegExp re( e->pattern, e->flags & AutoBookmarkEnt::CaseSensitive ); + TQRegExp re( e->pattern, e->flags & AutoBookmarkEnt::CaseSensitive ); re.setMinimal( e->flags & AutoBookmarkEnt::MinimalMatching ); for ( uint l( 0 ); l < ei->numLines(); l++ ) @@ -203,11 +203,11 @@ void ABGlobal::readConfig() KConfig *config = new KConfig("ktexteditor_autobookmarkerrc"); uint n( 0 ); - while ( config->hasGroup( QString("autobookmark%1").arg( n ) ) ) + while ( config->hasGroup( TQString("autobookmark%1").arg( n ) ) ) { - config->setGroup( QString("autobookmark%1").arg( n ) ); - QStringList filemask = config->readListEntry( "filemask", ';' ); - QStringList mimemask = config->readListEntry( "mimemask", ';' ); + config->setGroup( TQString("autobookmark%1").arg( n ) ); + TQStringList filemask = config->readListEntry( "filemask", ';' ); + TQStringList mimemask = config->readListEntry( "mimemask", ';' ); int flags = config->readNumEntry( "flags", 1 ); AutoBookmarkEnt *e = new AutoBookmarkEnt( config->readEntry( "pattern", "" ), @@ -229,15 +229,15 @@ void ABGlobal::writeConfig() KConfig *config = new KConfig("ktexteditor_autobookmarkerrc"); // clean the config object - QStringList l = config->groupList(); - for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) + TQStringList l = config->groupList(); + for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) config->deleteGroup( *it ); // fill in the current list for ( uint i = 0; i < m_ents->count(); i++ ) { AutoBookmarkEnt *e = m_ents->at( i ); - config->setGroup( QString("autobookmark%1").arg( i ) ); + config->setGroup( TQString("autobookmark%1").arg( i ) ); config->writeEntry( "pattern", e->pattern ); config->writeEntry( "filemask", e->filemask, ';' ); config->writeEntry( "mimemask", e->mimemask, ';' ); @@ -255,7 +255,7 @@ class AutoBookmarkEntItem : public QListViewItem { public: AutoBookmarkEntItem( KListView *lv, AutoBookmarkEnt *e ) - : QListViewItem( lv ), + : TQListViewItem( lv ), ent( e ) { redo(); @@ -275,75 +275,75 @@ class AutoBookmarkEntItem : public QListViewItem // Dialog for editing a single autobookmark entity // * edit the pattern // * set the file/mime type masks -AutoBookmarkerEntEditor::AutoBookmarkerEntEditor( QWidget *parent, AutoBookmarkEnt *e ) +AutoBookmarkerEntEditor::AutoBookmarkerEntEditor( TQWidget *parent, AutoBookmarkEnt *e ) : KDialogBase( parent, "autobookmark_ent_editor", true, i18n("Edit Entry"), KDialogBase::Ok|KDialogBase::Cancel ), e( e ) { - QFrame *w = makeMainWidget(); - QGridLayout * lo = new QGridLayout( w, 5, 3 ); + TQFrame *w = makeMainWidget(); + TQGridLayout * lo = new TQGridLayout( w, 5, 3 ); lo->setSpacing( KDialogBase::spacingHint() ); - QLabel *l = new QLabel( i18n("&Pattern:"), w ); - lePattern = new QLineEdit( e->pattern, w ); + TQLabel *l = new TQLabel( i18n("&Pattern:"), w ); + lePattern = new TQLineEdit( e->pattern, w ); l->setBuddy( lePattern ); lo->addWidget( l, 0, 0 ); lo->addMultiCellWidget( lePattern, 0, 0, 1, 2 ); - QWhatsThis::add( lePattern, i18n( + TQWhatsThis::add( lePattern, i18n( "<p>A regular expression. Matching lines will be bookmarked.</p>" ) ); - connect( lePattern, SIGNAL(textChanged ( const QString & ) ),this, SLOT( slotPatternChanged( const QString& ) ) ); + connect( lePattern, TQT_SIGNAL(textChanged ( const TQString & ) ),this, TQT_SLOT( slotPatternChanged( const TQString& ) ) ); - cbCS = new QCheckBox( i18n("Case &sensitive"), w ); + cbCS = new TQCheckBox( i18n("Case &sensitive"), w ); lo->addMultiCellWidget( cbCS, 1, 1, 0, 2 ); cbCS->setChecked( e->flags & AutoBookmarkEnt::CaseSensitive ); - QWhatsThis::add( cbCS, i18n( + TQWhatsThis::add( cbCS, i18n( "<p>If enabled, the pattern matching will be case sensitive, otherwise " "not.</p>") ); - cbMM = new QCheckBox( i18n("&Minimal matching"), w ); + cbMM = new TQCheckBox( i18n("&Minimal matching"), w ); lo->addMultiCellWidget( cbMM, 2, 2, 0 ,2 ); cbMM->setChecked( e->flags & AutoBookmarkEnt::MinimalMatching ); - QWhatsThis::add( cbMM, i18n( + TQWhatsThis::add( cbMM, i18n( "<p>If enabled, the pattern matching will use minimal matching; if you " "do not know what that is, please read the appendix on regular expressions " "in the kate manual.</p>") ); - l = new QLabel( i18n("&File mask:"), w ); - leFileMask = new QLineEdit( e->filemask.join( "; " ), w ); + l = new TQLabel( i18n("&File mask:"), w ); + leFileMask = new TQLineEdit( e->filemask.join( "; " ), w ); l->setBuddy( leFileMask ); lo->addWidget( l, 3, 0 ); lo->addMultiCellWidget( leFileMask, 3, 3, 1, 2 ); - QWhatsThis::add( leFileMask, i18n( + TQWhatsThis::add( leFileMask, i18n( "<p>A list of filename masks, separated by semicolons. This can be used " "to limit the usage of this entity to files with matching names.</p>" "<p>Use the wizard button to the right of the mimetype entry below to " "easily fill out both lists.</p>" ) ); - l = new QLabel( i18n("MIME &types:"), w ); - leMimeTypes = new QLineEdit( e->mimemask.join( "; " ), w ); + l = new TQLabel( i18n("MIME &types:"), w ); + leMimeTypes = new TQLineEdit( e->mimemask.join( "; " ), w ); l->setBuddy( leMimeTypes ); lo->addWidget( l, 4, 0 ); lo->addWidget( leMimeTypes, 4, 1 ); - QWhatsThis::add( leMimeTypes, i18n( + TQWhatsThis::add( leMimeTypes, i18n( "<p>A list of mime types, separated by semicolon. This can be used to " "limit the usage of this entity to files with matching mime types.</p>" "<p>Use the wizard button on the right to get a list of existing file " "types to choose from, using it will fill in the file masks as well.</p>" ) ); - QToolButton *btnMTW = new QToolButton(w); + TQToolButton *btnMTW = new TQToolButton(w); lo->addWidget( btnMTW, 4, 2 ); - 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( "<p>Click this button to display a checkable list of mimetypes available " "on your system. When used, the file masks entry above will be filled in " "with the corresponding masks.</p>") ); slotPatternChanged( lePattern->text() ); } -void AutoBookmarkerEntEditor::slotPatternChanged( const QString&_pattern ) +void AutoBookmarkerEntEditor::slotPatternChanged( const TQString&_pattern ) { enableButtonOK( !_pattern.isEmpty() ); } @@ -353,8 +353,8 @@ void AutoBookmarkerEntEditor::apply() if ( lePattern->text().isEmpty() ) return; e->pattern = lePattern->text(); - e->filemask = QStringList::split( QRegExp("\\s*;\\s*"), leFileMask->text() ); - e->mimemask = QStringList::split( QRegExp("\\s*;\\s*"), leMimeTypes->text() ); + e->filemask = TQStringList::split( TQRegExp("\\s*;\\s*"), leFileMask->text() ); + e->mimemask = TQStringList::split( TQRegExp("\\s*;\\s*"), leMimeTypes->text() ); e->flags = 0; if ( cbCS->isOn() ) e->flags |= AutoBookmarkEnt::CaseSensitive; if ( cbMM->isOn() ) e->flags |= AutoBookmarkEnt::MinimalMatching; @@ -362,8 +362,8 @@ void AutoBookmarkerEntEditor::apply() void AutoBookmarkerEntEditor::showMTDlg() { - QString text = i18n("Select the MimeTypes for this pattern.\nPlease note that this will automatically edit the associated file extensions as well."); - QStringList list = QStringList::split( QRegExp("\\s*;\\s*"), leMimeTypes->text() ); + TQString text = i18n("Select the MimeTypes for this pattern.\nPlease note that this will automatically edit the associated file extensions as well."); + TQStringList list = TQStringList::split( TQRegExp("\\s*;\\s*"), leMimeTypes->text() ); KMimeTypeChooserDialog d( i18n("Select Mime Types"), text, list, "text", this ); if ( d.exec() == KDialogBase::Accepted ) { // do some checking, warn user if mime types or patterns are removed. @@ -376,13 +376,13 @@ void AutoBookmarkerEntEditor::showMTDlg() //BEGIN AutoBookmarkerConfigPage // TODO allow custom mark types with icons -AutoBookmarkerConfigPage::AutoBookmarkerConfigPage( QWidget *parent, const char *name ) +AutoBookmarkerConfigPage::AutoBookmarkerConfigPage( TQWidget *parent, const char *name ) : KTextEditor::ConfigPage( parent, name ) { - QVBoxLayout *lo = new QVBoxLayout( this ); + TQVBoxLayout *lo = new TQVBoxLayout( this ); lo->setSpacing( KDialogBase::spacingHint() ); - QLabel *l = new QLabel( i18n("&Patterns"), this ); + TQLabel *l = new TQLabel( i18n("&Patterns"), this ); lo->addWidget( l ); lvPatterns = new KListView( this ); lvPatterns->addColumn( i18n("Pattern") ); @@ -390,7 +390,7 @@ AutoBookmarkerConfigPage::AutoBookmarkerConfigPage( QWidget *parent, const char lvPatterns->addColumn( i18n("File Masks") ); lo->addWidget( lvPatterns ); l->setBuddy( lvPatterns ); - QWhatsThis::add( lvPatterns, i18n( + TQWhatsThis::add( lvPatterns, i18n( "<p>This list shows your configured autobookmark entities. When a document " "is opened, each entity is used in the following way: " "<ol>" @@ -400,30 +400,30 @@ AutoBookmarkerConfigPage::AutoBookmarkerConfigPage( QWidget *parent, const char "and a bookmark is set on matching lines.</li></ul>" "<p>Use the buttons below to manage your collection of entities.</p>") ); - QHBoxLayout *lo1 = new QHBoxLayout ( lo ); + TQHBoxLayout *lo1 = new TQHBoxLayout ( lo ); lo1->setSpacing( KDialogBase::spacingHint() ); - btnNew = new QPushButton( i18n("&New..."), this ); + btnNew = new TQPushButton( i18n("&New..."), this ); lo1->addWidget( btnNew ); - QWhatsThis::add( btnNew, i18n( + TQWhatsThis::add( btnNew, i18n( "Press this button to create a new autobookmark entity.") ); - btnDel = new QPushButton( i18n("&Delete"), this ); + btnDel = new TQPushButton( i18n("&Delete"), this ); lo1->addWidget( btnDel ); - QWhatsThis::add( btnDel, i18n( + TQWhatsThis::add( btnDel, i18n( "Press this button to delete the currently selected entity.") ); - btnEdit = new QPushButton( i18n("&Edit..."), this ); + btnEdit = new TQPushButton( i18n("&Edit..."), this ); lo1->addWidget( btnEdit ); - QWhatsThis::add( btnEdit, i18n( + TQWhatsThis::add( btnEdit, i18n( "Press this button to edit the currently selected entity.") ); lo1->addStretch( 1 ); - connect( btnNew, SIGNAL(clicked()), this, SLOT(slotNew()) ); - connect( btnDel, SIGNAL(clicked()), this, SLOT(slotDel()) ); - connect( btnEdit, SIGNAL(clicked()), this, SLOT(slotEdit()) ); - connect( lvPatterns, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(slotEdit()) ); + connect( btnNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNew()) ); + connect( btnDel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDel()) ); + connect( btnEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEdit()) ); + connect( lvPatterns, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(slotEdit()) ); m_ents = new ABEntityList(); m_ents->setAutoDelete( true ); @@ -509,7 +509,7 @@ void AutoBookmarkerConfigPage::slotEdit() //END AutoBookmarkerConfigPage //BEGIN AutoBookmarkEnt -AutoBookmarkEnt::AutoBookmarkEnt( const QString &p, const QStringList &f, const QStringList &m, int fl ) +AutoBookmarkEnt::AutoBookmarkEnt( const TQString &p, const TQStringList &f, const TQStringList &m, int fl ) : pattern( p ), filemask( f ), mimemask( m ), diff --git a/kate/plugins/autobookmarker/autobookmarker.h b/kate/plugins/autobookmarker/autobookmarker.h index 188c8a360..bdeb2abcf 100644 --- a/kate/plugins/autobookmarker/autobookmarker.h +++ b/kate/plugins/autobookmarker/autobookmarker.h @@ -28,21 +28,21 @@ #include <kdialogbase.h> -#include <qptrlist.h> -#include <qvbox.h> +#include <tqptrlist.h> +#include <tqvbox.h> class AutoBookmarkEnt { public: enum REFlags { CaseSensitive=1, MinimalMatching=2 }; - AutoBookmarkEnt(const QString &p=QString::null, - const QStringList &f=QStringList(), - const QStringList &m=QStringList(), + AutoBookmarkEnt(const TQString &p=TQString::null, + const TQStringList &f=TQStringList(), + const TQStringList &m=TQStringList(), int flags=1 ); ~AutoBookmarkEnt(){}; - QString pattern; - QStringList filemask; - QStringList mimemask; + TQString pattern; + TQStringList filemask; + TQStringList mimemask; int flags; }; @@ -52,9 +52,9 @@ class AutoBookmarker { Q_OBJECT public: - AutoBookmarker( QObject *parent = 0, + AutoBookmarker( TQObject *parent = 0, const char* name = 0, - const QStringList &args = QStringList() ); + const TQStringList &args = TQStringList() ); virtual ~AutoBookmarker() {}; void addView (KTextEditor::View *view); @@ -62,10 +62,10 @@ class AutoBookmarker // ConfigInterfaceExtention uint configPages() const { return 1; }; - KTextEditor::ConfigPage * configPage( uint number, QWidget *parent, const char *name ); - QString configPageName( uint ) const; - QString configPageFullName( uint ) const; - QPixmap configPagePixmap( uint, int ) const; + KTextEditor::ConfigPage * configPage( uint number, TQWidget *parent, const char *name ); + TQString configPageName( uint ) const; + TQString configPageFullName( uint ) const; + TQPixmap configPagePixmap( uint, int ) const; bool abDone; private slots: @@ -73,8 +73,8 @@ class AutoBookmarker void applyEntity( AutoBookmarkEnt *e ); }; -typedef QPtrList<AutoBookmarkEnt> ABEntityList; -typedef QPtrListIterator<AutoBookmarkEnt> ABEntityListIterator; +typedef TQPtrList<AutoBookmarkEnt> ABEntityList; +typedef TQPtrListIterator<AutoBookmarkEnt> ABEntityListIterator; /* singleton to keep the data */ class ABGlobal @@ -98,7 +98,7 @@ class AutoBookmarkerConfigPage : public KTextEditor::ConfigPage { Q_OBJECT public: - AutoBookmarkerConfigPage( QWidget *parent, const char *name ); + AutoBookmarkerConfigPage( TQWidget *parent, const char *name ); virtual ~AutoBookmarkerConfigPage() {}; virtual void apply(); @@ -112,7 +112,7 @@ class AutoBookmarkerConfigPage : public KTextEditor::ConfigPage private: class KListView *lvPatterns; - class QPushButton *btnNew, *btnDel, *btnEdit; + class TQPushButton *btnNew, *btnDel, *btnEdit; ABEntityList *m_ents; }; @@ -120,17 +120,17 @@ class AutoBookmarkerEntEditor : public KDialogBase { Q_OBJECT public: - AutoBookmarkerEntEditor( QWidget *parent, AutoBookmarkEnt *e ); + AutoBookmarkerEntEditor( TQWidget *parent, AutoBookmarkEnt *e ); ~AutoBookmarkerEntEditor(){}; void apply(); private slots: void showMTDlg(); - void slotPatternChanged( const QString& ); + void slotPatternChanged( const TQString& ); private: - class QLineEdit *lePattern, *leMimeTypes, *leFileMask; - class QCheckBox *cbCS, *cbMM; + class TQLineEdit *lePattern, *leMimeTypes, *leFileMask; + class TQCheckBox *cbCS, *cbMM; AutoBookmarkEnt *e; }; diff --git a/kate/plugins/insertfile/insertfileplugin.cpp b/kate/plugins/insertfile/insertfileplugin.cpp index e25df8bd5..6a350831f 100644 --- a/kate/plugins/insertfile/insertfileplugin.cpp +++ b/kate/plugins/insertfile/insertfileplugin.cpp @@ -34,14 +34,14 @@ #include <ktempfile.h> #include <kurl.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> K_EXPORT_COMPONENT_FACTORY( ktexteditor_insertfile, KGenericFactory<InsertFilePlugin>( "ktexteditor_insertfile" ) ) //BEGIN InsertFilePlugin -InsertFilePlugin::InsertFilePlugin( QObject *parent, const char* name, const QStringList& ) +InsertFilePlugin::InsertFilePlugin( TQObject *parent, const char* name, const TQStringList& ) : KTextEditor::Plugin ( (KTextEditor::Document*) parent, name ) { } @@ -70,19 +70,19 @@ void InsertFilePlugin::removeView(KTextEditor::View *view) //BEGIN InsertFilePluginView InsertFilePluginView::InsertFilePluginView( KTextEditor::View *view, const char *name ) - : QObject( view, name ), + : TQObject( view, name ), KXMLGUIClient( view ) { view->insertChildClient( this ); setInstance( KGenericFactory<InsertFilePlugin>::instance() ); _job = 0; - (void) new KAction( i18n("Insert File..."), 0, this, SLOT(slotInsertFile()), actionCollection(), "tools_insert_file" ); + (void) new KAction( i18n("Insert File..."), 0, this, TQT_SLOT(slotInsertFile()), actionCollection(), "tools_insert_file" ); setXMLFile( "ktexteditor_insertfileui.rc" ); } void InsertFilePluginView::slotInsertFile() { - KFileDialog dlg("::insertfile", "", (QWidget*)parent(), "filedialog", true); + KFileDialog dlg("::insertfile", "", (TQWidget*)parent(), "filedialog", true); dlg.setOperationMode( KFileDialog::Opening ); dlg.setCaption(i18n("Choose File to Insert")); @@ -98,13 +98,13 @@ void InsertFilePluginView::slotInsertFile() insertFile(); } else { - KTempFile tempFile( QString::null ); + KTempFile tempFile( TQString::null ); _tmpfile = tempFile.name(); KURL destURL; destURL.setPath( _tmpfile ); _job = KIO::file_copy( _file, destURL, 0600, true, false, true ); - connect( _job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinished ( KIO::Job * ) ) ); + connect( _job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotFinished ( KIO::Job * ) ) ); } } @@ -113,34 +113,34 @@ void InsertFilePluginView::slotFinished( KIO::Job *job ) assert( job == _job ); _job = 0; if ( job->error() ) - KMessageBox::error( (QWidget*)parent(), i18n("Failed to load file:\n\n") + job->errorString(), i18n("Insert File Error") ); + KMessageBox::error( (TQWidget*)parent(), i18n("Failed to load file:\n\n") + job->errorString(), i18n("Insert File Error") ); else insertFile(); } void InsertFilePluginView::insertFile() { - QString error; + TQString error; if ( _tmpfile.isEmpty() ) return; - QFileInfo fi; + TQFileInfo fi; fi.setFile( _tmpfile ); if (!fi.exists() || !fi.isReadable()) error = i18n("<p>The file <strong>%1</strong> does not exist or is not readable, aborting.").arg(_file.fileName()); - QFile f( _tmpfile ); + TQFile f( _tmpfile ); if ( !f.open(IO_ReadOnly) ) error = i18n("<p>Unable to open file <strong>%1</strong>, aborting.").arg(_file.fileName()); if ( ! error.isEmpty() ) { - KMessageBox::sorry( (QWidget*)parent(), error, i18n("Insert File Error") ); + KMessageBox::sorry( (TQWidget*)parent(), error, i18n("Insert File Error") ); return; } // now grab file contents - QTextStream stream(&f); - QString str, tmp; + TQTextStream stream(&f); + TQString str, tmp; uint numlines = 0; uint len = 0; while (!stream.eof()) { @@ -156,7 +156,7 @@ void InsertFilePluginView::insertFile() if ( str.isEmpty() ) error = i18n("<p>File <strong>%1</strong> had no contents.").arg(_file.fileName()); if ( ! error.isEmpty() ) { - KMessageBox::sorry( (QWidget*)parent(), error, i18n("Insert File Error") ); + KMessageBox::sorry( (TQWidget*)parent(), error, i18n("Insert File Error") ); return; } diff --git a/kate/plugins/insertfile/insertfileplugin.h b/kate/plugins/insertfile/insertfileplugin.h index 3e882416c..9331f8100 100644 --- a/kate/plugins/insertfile/insertfileplugin.h +++ b/kate/plugins/insertfile/insertfileplugin.h @@ -26,7 +26,7 @@ #include <ktexteditor/view.h> #include <kxmlguiclient.h> -#include <qobject.h> +#include <tqobject.h> #include <jobclasses.h> #include <kurl.h> @@ -35,9 +35,9 @@ class InsertFilePlugin : public KTextEditor::Plugin, public KTextEditor::PluginV Q_OBJECT public: - InsertFilePlugin( QObject *parent = 0, + InsertFilePlugin( TQObject *parent = 0, const char* name = 0, - const QStringList &args = QStringList() ); + const TQStringList &args = TQStringList() ); virtual ~InsertFilePlugin(); void addView (KTextEditor::View *view); @@ -45,10 +45,10 @@ class InsertFilePlugin : public KTextEditor::Plugin, public KTextEditor::PluginV private: - QPtrList<class InsertFilePluginView> m_views; + TQPtrList<class InsertFilePluginView> m_views; }; -class InsertFilePluginView : public QObject, public KXMLGUIClient +class InsertFilePluginView : public TQObject, public KXMLGUIClient { Q_OBJECT public: @@ -63,7 +63,7 @@ class InsertFilePluginView : public QObject, public KXMLGUIClient private: void insertFile(); KURL _file; - QString _tmpfile; + TQString _tmpfile; KIO::FileCopyJob *_job; }; diff --git a/kate/plugins/isearch/ISearchPlugin.cpp b/kate/plugins/isearch/ISearchPlugin.cpp index 9a790a3ef..a74cf5d90 100644 --- a/kate/plugins/isearch/ISearchPlugin.cpp +++ b/kate/plugins/isearch/ISearchPlugin.cpp @@ -16,10 +16,10 @@ Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qregexp.h> -#include <qstyle.h> -#include <qpopupmenu.h> +#include <tqlabel.h> +#include <tqregexp.h> +#include <tqstyle.h> +#include <tqpopupmenu.h> #include <kgenericfactory.h> #include <klocale.h> #include <kaction.h> @@ -33,7 +33,7 @@ K_EXPORT_COMPONENT_FACTORY( ktexteditor_isearch, KGenericFactory<ISearchPlugin>( "ktexteditor_isearch" ) ) ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) - : QObject ( view ), KXMLGUIClient (view) + : TQObject ( view ), KXMLGUIClient (view) , m_view( 0L ) , m_doc( 0L ) , m_searchIF( 0L ) @@ -66,14 +66,14 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) m_searchForwardAction = new KAction( i18n("Search Incrementally"), CTRL+ALT+Key_F, - this, SLOT(slotSearchForwardAction()), + this, TQT_SLOT(slotSearchForwardAction()), actionCollection(), "edit_isearch" ); m_searchBackwardAction = new KAction( i18n("Search Incrementally Backwards"), CTRL+ALT+SHIFT+Key_F, - this, SLOT(slotSearchBackwardAction()), + this, TQT_SLOT(slotSearchBackwardAction()), actionCollection(), "edit_isearch_reverse" ); - m_label = new QLabel( i18n("I-Search:"), 0L, "kde toolbar widget" ); + m_label = new TQLabel( i18n("I-Search:"), 0L, "kde toolbar widget" ); KWidgetAction* labelAction = new KWidgetAction( m_label, i18n("I-Search:"), 0, 0, 0, @@ -84,12 +84,12 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) m_combo->setDuplicatesEnabled( false ); m_combo->setMaximumWidth( 300 ); m_combo->lineEdit()->installEventFilter( this ); - connect( m_combo, SIGNAL(textChanged(const QString&)), - this, SLOT(slotTextChanged(const QString&)) ); - connect( m_combo, SIGNAL(returnPressed(const QString&)), - this, SLOT(slotReturnPressed(const QString&)) ); - connect( m_combo, SIGNAL(aboutToShowContextMenu(QPopupMenu*)), - this, SLOT(slotAddContextMenuItems(QPopupMenu*)) ); + connect( m_combo, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotTextChanged(const TQString&)) ); + connect( m_combo, TQT_SIGNAL(returnPressed(const TQString&)), + this, TQT_SLOT(slotReturnPressed(const TQString&)) ); + connect( m_combo, TQT_SIGNAL(aboutToShowContextMenu(TQPopupMenu*)), + this, TQT_SLOT(slotAddContextMenuItems(TQPopupMenu*)) ); m_comboAction = new KWidgetAction( m_combo, i18n("Search"), 0, 0, 0, @@ -106,8 +106,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) i18n("Case Sensitive"), KShortcut(), actionCollection(), "isearch_case_sensitive" ); action->setShortcutConfigurable( false ); - connect( action, SIGNAL(toggled(bool)), - this, SLOT(setCaseSensitive(bool)) ); + connect( action, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(setCaseSensitive(bool)) ); action->setChecked( m_caseSensitive ); optionMenu->insert( action ); @@ -115,8 +115,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) i18n("From Beginning"), KShortcut(), actionCollection(), "isearch_from_beginning" ); action->setShortcutConfigurable( false ); - connect( action, SIGNAL(toggled(bool)), - this, SLOT(setFromBeginning(bool)) ); + connect( action, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(setFromBeginning(bool)) ); action->setChecked( m_fromBeginning ); optionMenu->insert( action ); @@ -124,8 +124,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) i18n("Regular Expression"), KShortcut(), actionCollection(), "isearch_reg_exp" ); action->setShortcutConfigurable( false ); - connect( action, SIGNAL(toggled(bool)), - this, SLOT(setRegExp(bool)) ); + connect( action, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(setRegExp(bool)) ); action->setChecked( m_regExp ); optionMenu->insert( action ); @@ -134,8 +134,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) // action = new KToggleAction( // i18n("Auto-Wrap Search"), KShortcut(), // actionCollection(), "isearch_auto_wrap" ); -// connect( action, SIGNAL(toggled(bool)), -// this, SLOT(setAutoWrap(bool)) ); +// connect( action, TQT_SIGNAL(toggled(bool)), +// this, TQT_SLOT(setAutoWrap(bool)) ); // action->setChecked( m_autoWrap ); // optionMenu->insert( action ); @@ -202,31 +202,31 @@ void ISearchPluginView::setAutoWrap( bool autoWrap ) m_autoWrap = autoWrap; } -bool ISearchPluginView::eventFilter( QObject* o, QEvent* e ) +bool ISearchPluginView::eventFilter( TQObject* o, TQEvent* e ) { if( o != m_combo->lineEdit() ) return false; - if( e->type() == QEvent::FocusIn ) { - QFocusEvent* focusEvent = (QFocusEvent*)e; - if( focusEvent->reason() == QFocusEvent::ActiveWindow || - focusEvent->reason() == QFocusEvent::Popup ) + if( e->type() == TQEvent::FocusIn ) { + TQFocusEvent* focusEvent = (TQFocusEvent*)e; + if( focusEvent->reason() == TQFocusEvent::ActiveWindow || + focusEvent->reason() == TQFocusEvent::Popup ) return false; startSearch(); } - if( e->type() == QEvent::FocusOut ) { - QFocusEvent* focusEvent = (QFocusEvent*)e; - if( focusEvent->reason() == QFocusEvent::ActiveWindow || - focusEvent->reason() == QFocusEvent::Popup ) + if( e->type() == TQEvent::FocusOut ) { + TQFocusEvent* focusEvent = (TQFocusEvent*)e; + if( focusEvent->reason() == TQFocusEvent::ActiveWindow || + focusEvent->reason() == TQFocusEvent::Popup ) return false; endSearch(); } - if( e->type() == QEvent::KeyPress ) { - QKeyEvent *keyEvent = (QKeyEvent*)e; + if( e->type() == TQEvent::KeyPress ) { + TQKeyEvent *keyEvent = (TQKeyEvent*)e; if( keyEvent->key() == Qt::Key_Escape ) - quitToView( QString::null ); + quitToView( TQString::null ); } return false; @@ -237,7 +237,7 @@ void ISearchPluginView::updateLabelText( bool failing /* = false */, bool reverse /* = false */, bool wrapped /* = false */, bool overwrapped /* = false */ ) { - QString text; + TQString text; // Reverse binary: // 0000 if( !failing && !reverse && !wrapped && !overwrapped ) { @@ -309,7 +309,7 @@ void ISearchPluginView::slotSearchAction( bool reverse ) void ISearchPluginView::nextMatch( bool reverse ) { - QString text = m_combo->currentText(); + TQString text = m_combo->currentText(); if( text.isEmpty() ) return; if( state != MatchSearch ) { @@ -355,7 +355,7 @@ void ISearchPluginView::startSearch() m_combo->blockSignals( true ); - QString text = m_selectIF->selection(); + TQString text = m_selectIF->selection(); if( text.isEmpty() ) text = m_lastString; m_combo->setCurrentText( text ); @@ -378,7 +378,7 @@ void ISearchPluginView::endSearch() } } -void ISearchPluginView::quitToView( const QString &text ) +void ISearchPluginView::quitToView( const TQString &text ) { if( !text.isNull() && !text.isEmpty() ) { m_combo->addToHistory( text ); @@ -390,7 +390,7 @@ void ISearchPluginView::quitToView( const QString &text ) } } -void ISearchPluginView::slotTextChanged( const QString& text ) +void ISearchPluginView::slotTextChanged( const TQString& text ) { state = TextSearch; @@ -400,29 +400,29 @@ void ISearchPluginView::slotTextChanged( const QString& text ) iSearch( m_searchLine, m_searchCol, text, m_searchBackward, m_autoWrap ); } -void ISearchPluginView::slotReturnPressed( const QString& text ) +void ISearchPluginView::slotReturnPressed( const TQString& text ) { quitToView( text ); } -void ISearchPluginView::slotAddContextMenuItems( QPopupMenu *menu ) +void ISearchPluginView::slotAddContextMenuItems( TQPopupMenu *menu ) { if( menu ) { menu->insertSeparator(); menu->insertItem( i18n("Case Sensitive"), this, - SLOT(setCaseSensitive(bool))); + TQT_SLOT(setCaseSensitive(bool))); menu->insertItem( i18n("From Beginning"), this, - SLOT(setFromBeginning(bool))); + TQT_SLOT(setFromBeginning(bool))); menu->insertItem( i18n("Regular Expression"), this, - SLOT(setRegExp(bool))); + TQT_SLOT(setRegExp(bool))); //menu->insertItem( i18n("Auto-Wrap Search"), this, - // SLOT(setAutoWrap(bool))); + // TQT_SLOT(setAutoWrap(bool))); } } bool ISearchPluginView::iSearch( uint startLine, uint startCol, - const QString& text, bool reverse, + const TQString& text, bool reverse, bool autoWrap ) { if( !m_view ) return false; @@ -441,7 +441,7 @@ bool ISearchPluginView::iSearch( } else { found = m_searchIF->searchText( startLine, startCol, - QRegExp( text ), + TQRegExp( text ), &m_foundLine, &m_foundCol, &m_matchLen, @@ -465,7 +465,7 @@ bool ISearchPluginView::iSearch( return found; } -ISearchPlugin::ISearchPlugin( QObject *parent, const char* name, const QStringList& ) +ISearchPlugin::ISearchPlugin( TQObject *parent, const char* name, const TQStringList& ) : KTextEditor::Plugin ( (KTextEditor::Document*) parent, name ) { } diff --git a/kate/plugins/isearch/ISearchPlugin.h b/kate/plugins/isearch/ISearchPlugin.h index d2f603fb8..9627193b8 100644 --- a/kate/plugins/isearch/ISearchPlugin.h +++ b/kate/plugins/isearch/ISearchPlugin.h @@ -27,8 +27,8 @@ #include <ktexteditor/selectioninterface.h> #include <kxmlguiclient.h> -#include <qobject.h> -#include <qguardedptr.h> +#include <tqobject.h> +#include <tqguardedptr.h> class QLabel; @@ -37,17 +37,17 @@ class ISearchPlugin : public KTextEditor::Plugin, public KTextEditor::PluginView Q_OBJECT public: - ISearchPlugin( QObject *parent = 0, const char* name = 0, const QStringList &args = QStringList() ); + ISearchPlugin( TQObject *parent = 0, const char* name = 0, const TQStringList &args = TQStringList() ); virtual ~ISearchPlugin(); void addView (KTextEditor::View *view); void removeView (KTextEditor::View *view); private: - QPtrList<class ISearchPluginView> m_views; + TQPtrList<class ISearchPluginView> m_views; }; -class ISearchPluginView : public QObject, public KXMLGUIClient +class ISearchPluginView : public TQObject, public KXMLGUIClient { Q_OBJECT @@ -55,7 +55,7 @@ public: ISearchPluginView( KTextEditor::View *view ); virtual ~ISearchPluginView(); - virtual bool eventFilter( QObject*, QEvent* ); + virtual bool eventFilter( TQObject*, TQEvent* ); void setView( KTextEditor::View* view ); @@ -69,9 +69,9 @@ private slots: void slotSearchForwardAction(); void slotSearchBackwardAction(); void slotSearchAction( bool reverse ); - void slotTextChanged( const QString& text ); - void slotReturnPressed( const QString& text ); - void slotAddContextMenuItems( QPopupMenu *menu); + void slotTextChanged( const TQString& text ); + void slotReturnPressed( const TQString& text ); + void slotAddContextMenuItems( TQPopupMenu *menu); private: void readConfig(); @@ -81,11 +81,11 @@ private: bool wrapped = false, bool overwrapped = false ); void startSearch(); void endSearch(); - void quitToView( const QString &text ); + void quitToView( const TQString &text ); void nextMatch( bool reverse ); bool iSearch( uint startLine, uint startCol, - const QString& text, bool reverse, bool autoWrap ); + const TQString& text, bool reverse, bool autoWrap ); KTextEditor::View* m_view; KTextEditor::Document* m_doc; @@ -95,9 +95,9 @@ private: KAction* m_searchForwardAction; KAction* m_searchBackwardAction; KWidgetAction* m_comboAction; - QGuardedPtr<QLabel> m_label; - QGuardedPtr<KHistoryCombo> m_combo; - QString m_lastString; + TQGuardedPtr<TQLabel> m_label; + TQGuardedPtr<KHistoryCombo> m_combo; + TQString m_lastString; bool m_searchBackward; bool m_caseSensitive; bool m_fromBeginning; diff --git a/kate/plugins/kdatatool/kate_kdatatool.cpp b/kate/plugins/kdatatool/kate_kdatatool.cpp index 3c63bcb4f..11cd645b7 100644 --- a/kate/plugins/kdatatool/kate_kdatatool.cpp +++ b/kate/plugins/kdatatool/kate_kdatatool.cpp @@ -37,7 +37,7 @@ K_EXPORT_COMPONENT_FACTORY( ktexteditor_kdatatool, KGenericFactory<KTextEditor:: namespace KTextEditor { -KDataToolPlugin::KDataToolPlugin( QObject *parent, const char* name, const QStringList& ) +KDataToolPlugin::KDataToolPlugin( TQObject *parent, const char* name, const TQStringList& ) : KTextEditor::Plugin ( (KTextEditor::Document*) parent, name ) { } @@ -76,7 +76,7 @@ KDataToolPluginView::KDataToolPluginView( KTextEditor::View *view ) setInstance( KGenericFactory<KDataToolPlugin>::instance() ); m_menu = new KActionMenu(i18n("Data Tools"), actionCollection(), "popup_dataTool"); - connect(m_menu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(aboutToShow())); + connect(m_menu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(aboutToShow())); setXMLFile("ktexteditor_kdatatoolui.rc"); m_view = view; @@ -91,9 +91,9 @@ KDataToolPluginView::~KDataToolPluginView() void KDataToolPluginView::aboutToShow() { kdDebug()<<"KTextEditor::KDataToolPluginView::aboutToShow"<<endl; - QString word; + TQString word; m_singleWord = false; - m_wordUnderCursor = QString::null; + m_wordUnderCursor = TQString::null; // unplug old actions, if any: KAction *ac; @@ -121,12 +121,12 @@ void KDataToolPluginView::aboutToShow() ci = KTextEditor::viewCursorInterface(v); uint line, col; ci->cursorPositionReal(&line, &col); - QString tmp_line = ei->textLine(line); + TQString tmp_line = ei->textLine(line); m_wordUnderCursor = ""; // find begin of word: m_singleWord_start = 0; for(int i = col; i >= 0; i--) { - QChar ch = tmp_line.at(i); + TQChar ch = tmp_line.at(i); if( ! (ch.isLetter() || ch == '-' || ch == '\'') ) { m_singleWord_start = i+1; @@ -137,7 +137,7 @@ void KDataToolPluginView::aboutToShow() // find end of word: m_singleWord_end = tmp_line.length(); for(uint i = col+1; i < tmp_line.length(); i++) { - QChar ch = tmp_line.at(i); + TQChar ch = tmp_line.at(i); if( ! (ch.isLetter() || ch == '-' || ch == '\'') ) { m_singleWord_end = i; @@ -150,8 +150,8 @@ void KDataToolPluginView::aboutToShow() m_singleWord = true; m_singleWord_line = line; } else { - m_notAvailable = new KAction(i18n("(not available)"), QString::null, 0, this, - SLOT(slotNotAvailable()), actionCollection(),"dt_n_av"); + m_notAvailable = new KAction(i18n("(not available)"), TQString::null, 0, this, + TQT_SLOT(slotNotAvailable()), actionCollection(),"dt_n_av"); m_menu->insert(m_notAvailable); return; } @@ -159,21 +159,21 @@ void KDataToolPluginView::aboutToShow() KInstance *inst=instance(); - QValueList<KDataToolInfo> tools; - tools += KDataToolInfo::query( "QString", "text/plain", inst ); + TQValueList<KDataToolInfo> tools; + tools += KDataToolInfo::query( "TQString", "text/plain", inst ); if( m_singleWord ) - tools += KDataToolInfo::query( "QString", "application/x-singleword", inst ); + tools += KDataToolInfo::query( "TQString", "application/x-singleword", inst ); m_actionList = KDataToolAction::dataToolActionList( tools, this, - SLOT( slotToolActivated( const KDataToolInfo &, const QString & ) ) ); + TQT_SLOT( slotToolActivated( const KDataToolInfo &, const TQString & ) ) ); for ( ac = m_actionList.first(); ac; ac = m_actionList.next() ) { m_menu->insert(ac); } if( m_actionList.isEmpty() ) { - m_notAvailable = new KAction(i18n("(not available)"), QString::null, 0, this, - SLOT(slotNotAvailable()), actionCollection(),"dt_n_av"); + m_notAvailable = new KAction(i18n("(not available)"), TQString::null, 0, this, + TQT_SLOT(slotNotAvailable()), actionCollection(),"dt_n_av"); m_menu->insert(m_notAvailable); } } @@ -186,7 +186,7 @@ void KDataToolPluginView::slotNotAvailable() "of the KOffice package.")); } -void KDataToolPluginView::slotToolActivated( const KDataToolInfo &info, const QString &command ) +void KDataToolPluginView::slotToolActivated( const KDataToolInfo &info, const TQString &command ) { KDataTool* tool = info.createTool( ); @@ -196,14 +196,14 @@ void KDataToolPluginView::slotToolActivated( const KDataToolInfo &info, const QS return; } - QString text; + TQString text; if ( selectionInterface(m_view->document())->hasSelection() ) text = selectionInterface(m_view->document())->selection(); else text = m_wordUnderCursor; - QString mimetype = "text/plain"; - QString datatype = "QString"; + TQString mimetype = "text/plain"; + TQString datatype = "TQString"; // If unsupported (and if we have a single word indeed), try application/x-singleword if ( !info.mimeTypes().contains( mimetype ) && m_singleWord ) @@ -211,7 +211,7 @@ void KDataToolPluginView::slotToolActivated( const KDataToolInfo &info, const QS kdDebug() << "Running tool with datatype=" << datatype << " mimetype=" << mimetype << endl; - QString origText = text; + TQString origText = text; if ( tool->run( command, &text, datatype, mimetype) ) { diff --git a/kate/plugins/kdatatool/kate_kdatatool.h b/kate/plugins/kdatatool/kate_kdatatool.h index bde5d70b2..fbe4e7bf0 100644 --- a/kate/plugins/kdatatool/kate_kdatatool.h +++ b/kate/plugins/kdatatool/kate_kdatatool.h @@ -22,9 +22,9 @@ #define _KATE_KDATATOOL_ #include <ktexteditor/plugin.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <kxmlguiclient.h> -#include <qguardedptr.h> +#include <tqguardedptr.h> class KActionMenu; class KDataToolInfo; @@ -39,17 +39,17 @@ class KDataToolPlugin : public KTextEditor::Plugin, public KTextEditor::PluginVi Q_OBJECT public: - KDataToolPlugin( QObject *parent = 0, const char* name = 0, const QStringList &args = QStringList() ); + KDataToolPlugin( TQObject *parent = 0, const char* name = 0, const TQStringList &args = TQStringList() ); virtual ~KDataToolPlugin(); void addView (KTextEditor::View *view); void removeView (KTextEditor::View *view); private: - QPtrList<class KDataToolPluginView> m_views; + TQPtrList<class KDataToolPluginView> m_views; }; -class KDataToolPluginView : public QObject, public KXMLGUIClient +class KDataToolPluginView : public TQObject, public KXMLGUIClient { Q_OBJECT @@ -61,13 +61,13 @@ private: View *m_view; bool m_singleWord; int m_singleWord_line, m_singleWord_start, m_singleWord_end; - QString m_wordUnderCursor; - QPtrList<KAction> m_actionList; - QGuardedPtr<KActionMenu> m_menu; + TQString m_wordUnderCursor; + TQPtrList<KAction> m_actionList; + TQGuardedPtr<KActionMenu> m_menu; KAction *m_notAvailable; protected slots: void aboutToShow(); - void slotToolActivated( const KDataToolInfo &datatoolinfo, const QString &string ); + void slotToolActivated( const KDataToolInfo &datatoolinfo, const TQString &string ); void slotNotAvailable(); }; diff --git a/kate/plugins/wordcompletion/docwordcompletion.cpp b/kate/plugins/wordcompletion/docwordcompletion.cpp index 9fb7f4844..37da55224 100644 --- a/kate/plugins/wordcompletion/docwordcompletion.cpp +++ b/kate/plugins/wordcompletion/docwordcompletion.cpp @@ -43,24 +43,24 @@ #include <kparts/part.h> #include <kiconloader.h> -#include <qregexp.h> -#include <qstring.h> -#include <qdict.h> -#include <qspinbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qhbox.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqdict.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqhbox.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> // #include <kdebug.h> //END //BEGIN DocWordCompletionPlugin K_EXPORT_COMPONENT_FACTORY( ktexteditor_docwordcompletion, KGenericFactory<DocWordCompletionPlugin>( "ktexteditor_docwordcompletion" ) ) -DocWordCompletionPlugin::DocWordCompletionPlugin( QObject *parent, +DocWordCompletionPlugin::DocWordCompletionPlugin( TQObject *parent, const char* name, - const QStringList& /*args*/ ) + const TQStringList& /*args*/ ) : KTextEditor::Plugin ( (KTextEditor::Document*) parent, name ) { readConfig(); @@ -99,23 +99,23 @@ void DocWordCompletionPlugin::removeView(KTextEditor::View *view) } } -KTextEditor::ConfigPage* DocWordCompletionPlugin::configPage( uint, QWidget *parent, const char *name ) +KTextEditor::ConfigPage* DocWordCompletionPlugin::configPage( uint, TQWidget *parent, const char *name ) { return new DocWordCompletionConfigPage( this, parent, name ); } -QString DocWordCompletionPlugin::configPageName( uint ) const +TQString DocWordCompletionPlugin::configPageName( uint ) const { return i18n("Word Completion Plugin"); } -QString DocWordCompletionPlugin::configPageFullName( uint ) const +TQString DocWordCompletionPlugin::configPageFullName( uint ) const { return i18n("Configure the Word Completion Plugin"); } // FIXME provide sucn a icon - QPixmap DocWordCompletionPlugin::configPagePixmap( uint, int size ) const + TQPixmap DocWordCompletionPlugin::configPagePixmap( uint, int size ) const { return UserIcon( "kte_wordcompletion", size ); } @@ -127,16 +127,16 @@ struct DocWordCompletionPluginViewPrivate uint line, col; // start position of last match (where to search from) uint cline, ccol; // cursor position uint lilen; // length of last insertion - QString last; // last word we were trying to match - QString lastIns; // latest applied completion - QRegExp re; // hrm + TQString last; // last word we were trying to match + TQString lastIns; // latest applied completion + TQRegExp re; // hrm KToggleAction *autopopup; // for accessing state uint treshold; // the required length of a word before popping up the completion list automatically int directionalPos; // be able to insert "" at the correct time }; DocWordCompletionPluginView::DocWordCompletionPluginView( uint treshold, bool autopopup, KTextEditor::View *view, const char *name ) - : QObject( view, name ), + : TQObject( view, name ), KXMLGUIClient( view ), m_view( view ), d( new DocWordCompletionPluginViewPrivate ) @@ -146,15 +146,15 @@ DocWordCompletionPluginView::DocWordCompletionPluginView( uint treshold, bool au setInstance( KGenericFactory<DocWordCompletionPlugin>::instance() ); (void) new KAction( i18n("Reuse Word Above"), CTRL+Key_8, this, - SLOT(completeBackwards()), actionCollection(), "doccomplete_bw" ); + TQT_SLOT(completeBackwards()), actionCollection(), "doccomplete_bw" ); (void) new KAction( i18n("Reuse Word Below"), CTRL+Key_9, this, - SLOT(completeForwards()), actionCollection(), "doccomplete_fw" ); + TQT_SLOT(completeForwards()), actionCollection(), "doccomplete_fw" ); (void) new KAction( i18n("Pop Up Completion List"), 0, this, - SLOT(popupCompletionList()), actionCollection(), "doccomplete_pu" ); + TQT_SLOT(popupCompletionList()), actionCollection(), "doccomplete_pu" ); (void) new KAction( i18n("Shell Completion"), 0, this, - SLOT(shellComplete()), actionCollection(), "doccomplete_sh" ); + TQT_SLOT(shellComplete()), actionCollection(), "doccomplete_sh" ); d->autopopup = new KToggleAction( i18n("Automatic Completion Popup"), 0, this, - SLOT(toggleAutoPopup()), actionCollection(), "enable_autopopup" ); + TQT_SLOT(toggleAutoPopup()), actionCollection(), "enable_autopopup" ); d->autopopup->setChecked( autopopup ); toggleAutoPopup(); @@ -164,12 +164,12 @@ DocWordCompletionPluginView::DocWordCompletionPluginView( uint treshold, bool au KTextEditor::VariableInterface *vi = KTextEditor::variableInterface( view->document() ); if ( vi ) { - QString e = vi->variable("wordcompletion-autopopup"); + TQString e = vi->variable("wordcompletion-autopopup"); if ( ! e.isEmpty() ) d->autopopup->setEnabled( e == "true" ); - connect( view->document(), SIGNAL(variableChanged(const QString &, const QString &)), - this, SLOT(slotVariableChanged(const QString &, const QString &)) ); + connect( view->document(), TQT_SIGNAL(variableChanged(const TQString &, const TQString &)), + this, TQT_SLOT(slotVariableChanged(const TQString &, const TQString &)) ); } } @@ -189,7 +189,7 @@ void DocWordCompletionPluginView::completeForwards() } // Pop up the editors completion list if applicable -void DocWordCompletionPluginView::popupCompletionList( QString w ) +void DocWordCompletionPluginView::popupCompletionList( TQString w ) { if ( w.isEmpty() ) w = word(); @@ -203,15 +203,15 @@ void DocWordCompletionPluginView::popupCompletionList( QString w ) void DocWordCompletionPluginView::toggleAutoPopup() { if ( d->autopopup->isChecked() ) { - if ( ! connect( m_view->document(), SIGNAL(charactersInteractivelyInserted(int ,int ,const QString&)), - this, SLOT(autoPopupCompletionList()) )) + if ( ! connect( m_view->document(), TQT_SIGNAL(charactersInteractivelyInserted(int ,int ,const TQString&)), + this, TQT_SLOT(autoPopupCompletionList()) )) { - connect( m_view->document(), SIGNAL(textChanged()), this, SLOT(autoPopupCompletionList()) ); + connect( m_view->document(), TQT_SIGNAL(textChanged()), this, TQT_SLOT(autoPopupCompletionList()) ); } } else { - disconnect( m_view->document(), SIGNAL(textChanged()), this, SLOT(autoPopupCompletionList()) ); - disconnect( m_view->document(), SIGNAL(charactersInteractivelyInserted(int ,int ,const QString&)), - this, SLOT(autoPopupCompletionList()) ); + disconnect( m_view->document(), TQT_SIGNAL(textChanged()), this, TQT_SLOT(autoPopupCompletionList()) ); + disconnect( m_view->document(), TQT_SIGNAL(charactersInteractivelyInserted(int ,int ,const TQString&)), + this, TQT_SLOT(autoPopupCompletionList()) ); } } @@ -220,7 +220,7 @@ void DocWordCompletionPluginView::toggleAutoPopup() void DocWordCompletionPluginView::autoPopupCompletionList() { if ( ! m_view->hasFocus() ) return; - QString w = word(); + TQString w = word(); if ( w.length() >= d->treshold ) { popupCompletionList( w ); @@ -235,14 +235,14 @@ void DocWordCompletionPluginView::shellComplete() // find the word we are typing uint cline, ccol; viewCursorInterface(m_view)->cursorPositionReal(&cline, &ccol); - QString wrd = word(); + TQString wrd = word(); if (wrd.isEmpty()) return; - QValueList < KTextEditor::CompletionEntry > matches = allMatches(wrd); + TQValueList < KTextEditor::CompletionEntry > matches = allMatches(wrd); if (matches.size() == 0) return; - QString partial = findLongestUnique(matches); + TQString partial = findLongestUnique(matches); if (partial.length() == wrd.length()) { KTextEditor::CodeCompletionInterface * cci = codeCompletionInterface(m_view); @@ -264,7 +264,7 @@ void DocWordCompletionPluginView::complete( bool fw ) // find the word we are typing uint cline, ccol; viewCursorInterface( m_view )->cursorPositionReal( &cline, &ccol ); - QString wrd = word(); + TQString wrd = word(); if ( wrd.isEmpty() ) return; @@ -320,7 +320,7 @@ void DocWordCompletionPluginView::complete( bool fw ) d->re.setPattern( "\\b" + wrd + "(\\w+)" ); int pos ( 0 ); - QString ln = ei->textLine( d->line ); + TQString ln = ei->textLine( d->line ); while ( true ) { @@ -330,7 +330,7 @@ void DocWordCompletionPluginView::complete( bool fw ) if ( pos > -1 ) // we matched a word { - QString m = d->re.cap( 1 ); + TQString m = d->re.cap( 1 ); if ( m != d->lastIns ) { // we got good a match! replace text and return. @@ -393,10 +393,10 @@ void DocWordCompletionPluginView::complete( bool fw ) } // Contributed by <brain@hdsnet.hu> -QString DocWordCompletionPluginView::findLongestUnique(const QValueList < KTextEditor::CompletionEntry > &matches) +TQString DocWordCompletionPluginView::findLongestUnique(const TQValueList < KTextEditor::CompletionEntry > &matches) { - QString partial = matches.front().text; - QValueList < KTextEditor::CompletionEntry >::const_iterator i = matches.begin(); + TQString partial = matches.front().text; + TQValueList < KTextEditor::CompletionEntry >::const_iterator i = matches.begin(); for (++i; i != matches.end(); ++i) { if (!(*i).text.startsWith(partial)) @@ -410,7 +410,7 @@ QString DocWordCompletionPluginView::findLongestUnique(const QValueList < KTextE } } if (partial.length() == 0) - return QString(); + return TQString(); } } @@ -418,31 +418,31 @@ QString DocWordCompletionPluginView::findLongestUnique(const QValueList < KTextE } // Return the string to complete (the letters behind the cursor) -QString DocWordCompletionPluginView::word() +TQString DocWordCompletionPluginView::word() { uint cline, ccol; viewCursorInterface( m_view )->cursorPositionReal( &cline, &ccol ); - if ( ! ccol ) return QString::null; // no word + if ( ! ccol ) return TQString::null; // no word KTextEditor::EditInterface *ei = KTextEditor::editInterface( m_view->document() ); d->re.setPattern( "\\b(\\w+)$" ); if ( d->re.searchRev( ei->text( cline, 0, cline, ccol ) ) < 0 ) - return QString::null; // no word + return TQString::null; // no word return d->re.cap( 1 ); } // Scan throught the entire document for possible completions, // ignoring any dublets -QValueList<KTextEditor::CompletionEntry> DocWordCompletionPluginView::allMatches( const QString &word ) +TQValueList<KTextEditor::CompletionEntry> DocWordCompletionPluginView::allMatches( const TQString &word ) { - QValueList<KTextEditor::CompletionEntry> l; + TQValueList<KTextEditor::CompletionEntry> l; uint i( 0 ); int pos( 0 ); d->re.setPattern( "\\b("+word+"\\w+)" ); - QString s, m; + TQString s, m; KTextEditor::EditInterface *ei = KTextEditor::editInterface( m_view->document() ); - QDict<int> seen; // maybe slow with > 17 matches + TQDict<int> seen; // maybe slow with > 17 matches int sawit(1); // to ref for the dict uint cline, ccol;// needed to avoid constructing a word at cursor position viewCursorInterface( m_view )->cursorPositionReal( &cline, &ccol ); @@ -478,7 +478,7 @@ QValueList<KTextEditor::CompletionEntry> DocWordCompletionPluginView::allMatches return l; } -void DocWordCompletionPluginView::slotVariableChanged( const QString &var, const QString &val ) +void DocWordCompletionPluginView::slotVariableChanged( const TQString &var, const TQString &val ) { if ( var == "wordcompletion-autopopup" ) d->autopopup->setEnabled( val == "true" ); @@ -488,20 +488,20 @@ void DocWordCompletionPluginView::slotVariableChanged( const QString &var, const //END //BEGIN DocWordCompletionConfigPage -DocWordCompletionConfigPage::DocWordCompletionConfigPage( DocWordCompletionPlugin *completion, QWidget *parent, const char *name ) +DocWordCompletionConfigPage::DocWordCompletionConfigPage( DocWordCompletionPlugin *completion, TQWidget *parent, const char *name ) : KTextEditor::ConfigPage( parent, name ) , m_completion( completion ) { - QVBoxLayout *lo = new QVBoxLayout( this ); + TQVBoxLayout *lo = new TQVBoxLayout( this ); lo->setSpacing( KDialog::spacingHint() ); - cbAutoPopup = new QCheckBox( i18n("Automatically &show completion list"), this ); + cbAutoPopup = new TQCheckBox( i18n("Automatically &show completion list"), this ); lo->addWidget( cbAutoPopup ); - QHBox *hb = new QHBox( this ); + TQHBox *hb = new TQHBox( this ); hb->setSpacing( KDialog::spacingHint() ); lo->addWidget( hb ); - QLabel *l = new QLabel( i18n( + TQLabel *l = new TQLabel( i18n( "Translators: This is the first part of two strings wich will comprise the " "sentence 'Show completions when a word is at least N characters'. The first " "part is on the right side of the N, which is represented by a spinbox " @@ -509,17 +509,17 @@ DocWordCompletionConfigPage::DocWordCompletionConfigPage( DocWordCompletionPlugi "ingeger number between and including 1 and 30. Feel free to leave the " "second part of the sentence blank if it suits your language better. ", "Show completions &when a word is at least"), hb ); - sbAutoPopup = new QSpinBox( 1, 30, 1, hb ); + sbAutoPopup = new TQSpinBox( 1, 30, 1, hb ); l->setBuddy( sbAutoPopup ); - lSbRight = new QLabel( i18n( + lSbRight = new TQLabel( i18n( "This is the second part of two strings that will comprise teh sentence " "'Show completions when a word is at least N characters'", "characters long."), hb ); - QWhatsThis::add( cbAutoPopup, i18n( + TQWhatsThis::add( cbAutoPopup, i18n( "Enable the automatic completion list popup as default. The popup can " "be disabled on a view basis from the 'Tools' menu.") ); - QWhatsThis::add( sbAutoPopup, i18n( + TQWhatsThis::add( sbAutoPopup, i18n( "Define the length a word should have before the completion list " "is displayed.") ); diff --git a/kate/plugins/wordcompletion/docwordcompletion.h b/kate/plugins/wordcompletion/docwordcompletion.h index b42560fca..ed632631a 100644 --- a/kate/plugins/wordcompletion/docwordcompletion.h +++ b/kate/plugins/wordcompletion/docwordcompletion.h @@ -35,9 +35,9 @@ #include <ktexteditor/configinterfaceextension.h> #include <kxmlguiclient.h> -#include <qevent.h> -#include <qobject.h> -#include <qvaluelist.h> +#include <tqevent.h> +#include <tqobject.h> +#include <tqvaluelist.h> class DocWordCompletionPlugin : public KTextEditor::Plugin @@ -47,9 +47,9 @@ class DocWordCompletionPlugin Q_OBJECT public: - DocWordCompletionPlugin( QObject *parent = 0, + DocWordCompletionPlugin( TQObject *parent = 0, const char* name = 0, - const QStringList &args = QStringList() ); + const TQStringList &args = TQStringList() ); virtual ~DocWordCompletionPlugin() {}; void addView (KTextEditor::View *view); @@ -60,10 +60,10 @@ class DocWordCompletionPlugin // ConfigInterfaceExtention uint configPages() const { return 1; }; - KTextEditor::ConfigPage * configPage( uint number, QWidget *parent, const char *name ); - QString configPageName( uint ) const; - QString configPageFullName( uint ) const; - QPixmap configPagePixmap( uint, int ) const; + KTextEditor::ConfigPage * configPage( uint number, TQWidget *parent, const char *name ); + TQString configPageName( uint ) const; + TQString configPageFullName( uint ) const; + TQPixmap configPagePixmap( uint, int ) const; uint treshold() const { return m_treshold; }; void setTreshold( uint t ) { m_treshold = t; }; @@ -72,14 +72,14 @@ class DocWordCompletionPlugin private: - QPtrList<class DocWordCompletionPluginView> m_views; + TQPtrList<class DocWordCompletionPluginView> m_views; uint m_treshold; bool m_autopopup; }; class DocWordCompletionPluginView - : public QObject, public KXMLGUIClient + : public TQObject, public KXMLGUIClient { Q_OBJECT @@ -95,18 +95,18 @@ class DocWordCompletionPluginView void completeForwards(); void shellComplete(); - void popupCompletionList( QString word=QString::null ); + void popupCompletionList( TQString word=TQString::null ); void autoPopupCompletionList(); void toggleAutoPopup(); - void slotVariableChanged( const QString &, const QString & ); + void slotVariableChanged( const TQString &, const TQString & ); private: void complete( bool fw=true ); - QString word(); - QValueList<KTextEditor::CompletionEntry> allMatches( const QString &word ); - QString findLongestUnique(const QValueList < KTextEditor::CompletionEntry > &matches); + TQString word(); + TQValueList<KTextEditor::CompletionEntry> allMatches( const TQString &word ); + TQString findLongestUnique(const TQValueList < KTextEditor::CompletionEntry > &matches); KTextEditor::View *m_view; struct DocWordCompletionPluginViewPrivate *d; }; @@ -115,7 +115,7 @@ class DocWordCompletionConfigPage : public KTextEditor::ConfigPage { Q_OBJECT public: - DocWordCompletionConfigPage( DocWordCompletionPlugin *completion, QWidget *parent, const char *name ); + DocWordCompletionConfigPage( DocWordCompletionPlugin *completion, TQWidget *parent, const char *name ); virtual ~DocWordCompletionConfigPage() {}; virtual void apply(); @@ -124,9 +124,9 @@ class DocWordCompletionConfigPage : public KTextEditor::ConfigPage private: DocWordCompletionPlugin *m_completion; - class QCheckBox *cbAutoPopup; - class QSpinBox *sbAutoPopup; - class QLabel *lSbRight; + class TQCheckBox *cbAutoPopup; + class TQSpinBox *sbAutoPopup; + class TQLabel *lSbRight; }; #endif // _DocWordCompletionPlugin_h_ |