summaryrefslogtreecommitdiffstats
path: root/kate
diff options
context:
space:
mode:
Diffstat (limited to 'kate')
-rw-r--r--kate/interfaces/document.h58
-rw-r--r--kate/interfaces/interfaces.cpp12
-rw-r--r--kate/interfaces/katecmd.cpp32
-rw-r--r--kate/interfaces/katecmd.h40
-rw-r--r--kate/interfaces/view.h14
-rw-r--r--kate/part/katearbitraryhighlight.cpp34
-rw-r--r--kate/part/katearbitraryhighlight.h20
-rw-r--r--kate/part/kateattribute.cpp18
-rw-r--r--kate/part/kateattribute.h32
-rw-r--r--kate/part/kateautoindent.cpp250
-rw-r--r--kate/part/kateautoindent.h68
-rw-r--r--kate/part/katebookmarks.cpp54
-rw-r--r--kate/part/katebookmarks.h8
-rw-r--r--kate/part/katebuffer.cpp102
-rw-r--r--kate/part/katebuffer.h18
-rw-r--r--kate/part/katecmds.cpp80
-rw-r--r--kate/part/katecmds.h28
-rw-r--r--kate/part/katecodecompletion.cpp158
-rw-r--r--kate/part/katecodecompletion.h48
-rw-r--r--kate/part/katecodefoldinghelpers.cpp48
-rw-r--r--kate/part/katecodefoldinghelpers.h30
-rw-r--r--kate/part/kateconfig.cpp102
-rw-r--r--kate/part/kateconfig.h94
-rw-r--r--kate/part/katecursor.cpp4
-rw-r--r--kate/part/katecursor.h4
-rw-r--r--kate/part/katedialogs.cpp692
-rw-r--r--kate/part/katedialogs.h108
-rw-r--r--kate/part/katedocument.cpp464
-rw-r--r--kate/part/katedocument.h186
-rw-r--r--kate/part/katedocumenthelpers.cpp4
-rw-r--r--kate/part/katedocumenthelpers.h4
-rw-r--r--kate/part/katefactory.cpp16
-rw-r--r--kate/part/katefactory.h26
-rw-r--r--kate/part/katefiletype.cpp172
-rw-r--r--kate/part/katefiletype.h56
-rw-r--r--kate/part/katefont.cpp20
-rw-r--r--kate/part/katefont.h24
-rw-r--r--kate/part/katehighlight.cpp562
-rw-r--r--kate/part/katehighlight.h198
-rw-r--r--kate/part/kateindentscriptabstracts.cpp8
-rw-r--r--kate/part/kateindentscriptabstracts.h32
-rw-r--r--kate/part/katejscript.cpp146
-rw-r--r--kate/part/katejscript.h40
-rw-r--r--kate/part/kateluaindentscript.cpp82
-rw-r--r--kate/part/kateluaindentscript.h24
-rw-r--r--kate/part/kateprinter.cpp292
-rw-r--r--kate/part/kateprinter.h44
-rw-r--r--kate/part/katerenderer.cpp96
-rw-r--r--kate/part/katerenderer.h18
-rw-r--r--kate/part/kateschema.cpp480
-rw-r--r--kate/part/kateschema.h92
-rw-r--r--kate/part/katesearch.cpp116
-rw-r--r--kate/part/katesearch.h50
-rw-r--r--kate/part/katespell.cpp36
-rw-r--r--kate/part/katespell.h6
-rw-r--r--kate/part/katesupercursor.cpp98
-rw-r--r--kate/part/katesupercursor.h42
-rw-r--r--kate/part/katesyntaxdocument.cpp86
-rw-r--r--kate/part/katesyntaxdocument.h54
-rw-r--r--kate/part/katetemplatehandler.cpp48
-rw-r--r--kate/part/katetemplatehandler.h24
-rw-r--r--kate/part/katetextline.cpp54
-rw-r--r--kate/part/katetextline.h56
-rw-r--r--kate/part/kateundo.cpp10
-rw-r--r--kate/part/kateundo.h8
-rw-r--r--kate/part/kateview.cpp346
-rw-r--r--kate/part/kateview.h56
-rw-r--r--kate/part/kateviewhelpers.cpp204
-rw-r--r--kate/part/kateviewhelpers.h56
-rw-r--r--kate/part/kateviewinternal.cpp242
-rw-r--r--kate/part/kateviewinternal.h78
-rw-r--r--kate/part/test_regression.cpp324
-rw-r--r--kate/part/test_regression.h52
-rw-r--r--kate/plugins/autobookmarker/autobookmarker.cpp144
-rw-r--r--kate/plugins/autobookmarker/autobookmarker.h44
-rw-r--r--kate/plugins/insertfile/insertfileplugin.cpp32
-rw-r--r--kate/plugins/insertfile/insertfileplugin.h12
-rw-r--r--kate/plugins/isearch/ISearchPlugin.cpp96
-rw-r--r--kate/plugins/isearch/ISearchPlugin.h28
-rw-r--r--kate/plugins/kdatatool/kate_kdatatool.cpp40
-rw-r--r--kate/plugins/kdatatool/kate_kdatatool.h18
-rw-r--r--kate/plugins/wordcompletion/docwordcompletion.cpp124
-rw-r--r--kate/plugins/wordcompletion/docwordcompletion.h40
83 files changed, 3933 insertions, 3933 deletions
diff --git a/kate/interfaces/document.h b/kate/interfaces/document.h
index 6e7cb9a56..023840335 100644
--- a/kate/interfaces/document.h
+++ b/kate/interfaces/document.h
@@ -64,7 +64,7 @@ class KATEPARTINTERFACES_EXPORT ConfigPage : public KTextEditor::ConfigPage
Q_OBJECT
public:
- ConfigPage ( QWidget *parent=0, const char *name=0 ) : KTextEditor::ConfigPage (parent, name) { ; };
+ ConfigPage ( TQWidget *parent=0, const char *name=0 ) : KTextEditor::ConfigPage (parent, name) { ; };
virtual ~ConfigPage () { ; };
public slots:
@@ -82,7 +82,7 @@ class KATEPARTINTERFACES_EXPORT ActionMenu : public KActionMenu
Q_OBJECT
public:
- ActionMenu ( const QString& text, QObject* parent = 0, const char* name = 0 )
+ ActionMenu ( const TQString& text, TQObject* parent = 0, const char* name = 0 )
: KActionMenu(text, parent, name) { ; };
virtual ~ActionMenu () { ; };
@@ -104,19 +104,19 @@ class KATEPARTINTERFACES_EXPORT Command
* Pure text start part of the commands which can be handled by this object
* which means i.e. for s/sdl/sdf/g => s or for char:1212 => char
*/
- virtual QStringList cmds () = 0;
+ virtual TQStringList cmds () = 0;
/**
* Execute this command for the given view and cmd string, return a bool
* about success, msg for status
*/
- virtual bool exec (View *view, const QString &cmd, QString &msg) = 0;
+ virtual bool exec (View *view, const TQString &cmd, TQString &msg) = 0;
/**
* Shows help for the given view and cmd string, return a bool
* about success, msg for status
*/
- virtual bool help (View *view, const QString &cmd, QString &msg) = 0;
+ virtual bool help (View *view, const TQString &cmd, TQString &msg) = 0;
};
/**
@@ -143,7 +143,7 @@ class CommandExtension
* are displayed, existing flags are left out.
*
*/ //### this is yet to be tried
- virtual void flagCompletions( QStringList& /*list*/ ) {;}
+ virtual void flagCompletions( TQStringList& /*list*/ ) {;}
/**
* @return a KCompletion object that will substitute the command line default
@@ -154,7 +154,7 @@ class CommandExtension
*
* @param cmdname The command name associated with this request.
*/
- virtual KCompletion *completionObject( const QString & cmdname, Kate::View * /*view*/ ) { Q_UNUSED(cmdname); return 0L; }
+ virtual KCompletion *completionObject( const TQString & cmdname, Kate::View * /*view*/ ) { Q_UNUSED(cmdname); return 0L; }
/**
* @return whether this command wants to process text interactively given the @p cmdname.
@@ -166,7 +166,7 @@ class CommandExtension
*
* @param cmdname the command name associated with this query.
*/
- virtual bool wantsToProcessText( const QString &cmdname ) { Q_UNUSED(cmdname); return false; }
+ virtual bool wantsToProcessText( const TQString &cmdname ) { Q_UNUSED(cmdname); return false; }
/**
* This is called by the commandline each time the argument text for the
@@ -174,7 +174,7 @@ class CommandExtension
* @param view The current view
* @param text The current command text typed by the user.
*/ // ### yet to be tested. The obvious candidate is isearch.
- virtual void processText( Kate::View *view, const QString &text ) { Q_UNUSED(view); Q_UNUSED(text); }
+ virtual void processText( Kate::View *view, const TQString &text ) { Q_UNUSED(view); Q_UNUSED(text); }
};
/** This interface provides access to the Kate Document class.
@@ -192,7 +192,7 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
public:
Document ();
- Document ( QObject* parent, const char* name );
+ Document ( TQObject* parent, const char* name );
virtual ~Document ();
/**
@@ -201,7 +201,7 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
public:
static bool registerCommand (Command *cmd);
static bool unregisterCommand (Command *cmd);
- static Command *queryCommand (const QString &cmd);
+ static Command *queryCommand (const TQString &cmd);
public:
/**
@@ -214,7 +214,7 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
/**
* Returns the document name.
*/
- virtual QString docName () { return 0L; };
+ virtual TQString docName () { return 0L; };
/**
* Sets the document name.
@@ -222,10 +222,10 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
* but changes nothing beside triggers signal
* @deprecated
*/
- virtual void setDocName (QString ) { ; };
+ virtual void setDocName (TQString ) { ; };
- virtual ActionMenu *hlActionMenu (const QString& , QObject* =0, const char* = 0) = 0;
- virtual ActionMenu *exportActionMenu (const QString& , QObject* =0, const char* = 0) = 0;
+ virtual ActionMenu *hlActionMenu (const TQString& , TQObject* =0, const char* = 0) = 0;
+ virtual ActionMenu *exportActionMenu (const TQString& , TQObject* =0, const char* = 0) = 0;
public slots:
// clear buffer/filename - update the views
@@ -241,7 +241,7 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
*/
virtual void spellcheck() {};
- virtual void exportAs(const QString &) = 0;
+ virtual void exportAs(const TQString &) = 0;
virtual void applyWordWrap () = 0;
@@ -254,28 +254,28 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
virtual uint wordWrapAt () = 0;
- virtual void setEncoding (const QString &e) = 0;
- virtual QString encoding() const = 0;
+ virtual void setEncoding (const TQString &e) = 0;
+ virtual TQString encoding() const = 0;
/** @deprecated */
// FIXME: Remove when BIC allowed.
public:
/** @deprecated */
- virtual ConfigPage *colorConfigPage (QWidget *) = 0;
+ virtual ConfigPage *colorConfigPage (TQWidget *) = 0;
/** @deprecated */
- virtual ConfigPage *fontConfigPage (QWidget *) = 0;
+ virtual ConfigPage *fontConfigPage (TQWidget *) = 0;
/** @deprecated */
- virtual ConfigPage *indentConfigPage (QWidget *) = 0;
+ virtual ConfigPage *indentConfigPage (TQWidget *) = 0;
/** @deprecated */
- virtual ConfigPage *selectConfigPage (QWidget *) = 0;
+ virtual ConfigPage *selectConfigPage (TQWidget *) = 0;
/** @deprecated */
- virtual ConfigPage *editConfigPage (QWidget *) = 0;
+ virtual ConfigPage *editConfigPage (TQWidget *) = 0;
/** @deprecated */
- virtual ConfigPage *keysConfigPage (QWidget *) = 0;
+ virtual ConfigPage *keysConfigPage (TQWidget *) = 0;
/** @deprecated */
- virtual ConfigPage *kSpellConfigPage (QWidget *) { return 0L; }
+ virtual ConfigPage *kSpellConfigPage (TQWidget *) { return 0L; }
/** @deprecated */
- virtual ConfigPage *hlConfigPage (QWidget *) = 0;
+ virtual ConfigPage *hlConfigPage (TQWidget *) = 0;
public:
virtual uint configFlags () = 0;
@@ -331,13 +331,13 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
// default false
static void setFileChangedDialogsActivated (bool on);
- static const QString &defaultEncoding ();
+ static const TQString &defaultEncoding ();
protected:
static bool s_openErrorDialogsActivated;
static bool s_fileChangedDialogsActivated;
- static QString s_defaultEncoding;
+ static TQString s_defaultEncoding;
};
/**
@@ -400,7 +400,7 @@ KATEPARTINTERFACES_EXPORT DocumentExt *documentExt (KTextEditor::Document *doc);
/**
* Creates a new Kate::Document object
*/
-KATEPARTINTERFACES_EXPORT Document *createDocument ( QObject *parent = 0, const char *name = 0 );
+KATEPARTINTERFACES_EXPORT Document *createDocument ( TQObject *parent = 0, const char *name = 0 );
}
diff --git a/kate/interfaces/interfaces.cpp b/kate/interfaces/interfaces.cpp
index 42bd35b7e..ad20959b6 100644
--- a/kate/interfaces/interfaces.cpp
+++ b/kate/interfaces/interfaces.cpp
@@ -29,9 +29,9 @@ namespace Kate
bool Document::s_openErrorDialogsActivated = true;
bool Document::s_fileChangedDialogsActivated = false;
-QString Document::s_defaultEncoding;
+TQString Document::s_defaultEncoding;
-Document::Document (QObject* parent, const char* name)
+Document::Document (TQObject* parent, const char* name)
: KTextEditor::Document (parent, name)
{
}
@@ -54,7 +54,7 @@ void Document::setFileChangedDialogsActivated (bool on)
s_fileChangedDialogsActivated = on;
}
-const QString &Document::defaultEncoding ()
+const TQString &Document::defaultEncoding ()
{
return s_defaultEncoding;
}
@@ -69,12 +69,12 @@ bool Document::unregisterCommand (Command *cmd)
return KateCmd::self()->unregisterCommand (cmd);
}
-Command *Document::queryCommand (const QString &cmd)
+Command *Document::queryCommand (const TQString &cmd)
{
return KateCmd::self()->queryCommand (cmd);
}
-View::View ( KTextEditor::Document *doc, QWidget *parent, const char *name ) : KTextEditor::View (doc, parent, name)
+View::View ( KTextEditor::Document *doc, TQWidget *parent, const char *name ) : KTextEditor::View (doc, parent, name)
{
}
@@ -111,7 +111,7 @@ DocumentExt *documentExt (KTextEditor::Document *doc)
return static_cast<DocumentExt*>(doc->qt_cast("Kate::DocumentExt"));
}
-Document *createDocument ( QObject *parent, const char *name )
+Document *createDocument ( TQObject *parent, const char *name )
{
return (Document* ) KTextEditor::createDocument ("libkatepart", parent, name);
}
diff --git a/kate/interfaces/katecmd.cpp b/kate/interfaces/katecmd.cpp
index e6a981dd5..569110093 100644
--- a/kate/interfaces/katecmd.cpp
+++ b/kate/interfaces/katecmd.cpp
@@ -36,7 +36,7 @@ KateCmd::~KateCmd ()
bool KateCmd::registerCommand (Kate::Command *cmd)
{
- QStringList l = cmd->cmds ();
+ TQStringList l = cmd->cmds ();
for (uint z=0; z<l.count(); z++)
if (m_dict[l[z]])
@@ -54,18 +54,18 @@ bool KateCmd::registerCommand (Kate::Command *cmd)
bool KateCmd::unregisterCommand (Kate::Command *cmd)
{
- QStringList l;
- QDictIterator<Kate::Command> it(m_dict);
+ TQStringList l;
+ TQDictIterator<Kate::Command> it(m_dict);
for( ; it.current(); ++it )
if (it.current()==cmd) l<<it.currentKey();
- for ( QStringList::Iterator it1 = l.begin(); it1 != l.end(); ++it1 ) {
+ for ( TQStringList::Iterator it1 = l.begin(); it1 != l.end(); ++it1 ) {
m_dict.remove(*it1);
kdDebug()<<"Removed command:"<<*it1<<endl;
}
return true;
}
-Kate::Command *KateCmd::queryCommand (const QString &cmd)
+Kate::Command *KateCmd::queryCommand (const TQString &cmd)
{
// a command can be named ".*[\w\-]+" with the constrain that it must
// contain at least one letter.
@@ -81,7 +81,7 @@ Kate::Command *KateCmd::queryCommand (const QString &cmd)
return m_dict[cmd.left(f)];
}
-QStringList KateCmd::cmds ()
+TQStringList KateCmd::cmds ()
{
return m_cmds;
}
@@ -96,7 +96,7 @@ KateCmd *KateCmd::self ()
return s_self;
}
-void KateCmd::appendHistory( const QString &cmd )
+void KateCmd::appendHistory( const TQString &cmd )
{
if ( !m_history.isEmpty() && m_history.last() == cmd )
return;
@@ -107,10 +107,10 @@ void KateCmd::appendHistory( const QString &cmd )
m_history.append( cmd );
}
-const QString KateCmd::fromHistory( uint index ) const
+const TQString KateCmd::fromHistory( uint index ) const
{
if ( index > m_history.count() - 1 )
- return QString();
+ return TQString();
return m_history[ index ];
}
//END KateCmd
@@ -131,7 +131,7 @@ KateCmdShellCompletion::KateCmdShellCompletion()
m_escape_char = '\\';
}
-QString KateCmdShellCompletion::makeCompletion( const QString &text )
+TQString KateCmdShellCompletion::makeCompletion( const TQString &text )
{
// Split text at the last unquoted space
//
@@ -142,7 +142,7 @@ QString KateCmdShellCompletion::makeCompletion( const QString &text )
return KCompletion::makeCompletion( m_text_compl );
}
-void KateCmdShellCompletion::postProcessMatch( QString *match ) const
+void KateCmdShellCompletion::postProcessMatch( TQString *match ) const
{
if ( match->isNull() )
return;
@@ -150,9 +150,9 @@ void KateCmdShellCompletion::postProcessMatch( QString *match ) const
match->prepend( m_text_start );
}
-void KateCmdShellCompletion::postProcessMatches( QStringList *matches ) const
+void KateCmdShellCompletion::postProcessMatches( TQStringList *matches ) const
{
- for ( QStringList::Iterator it = matches->begin();
+ for ( TQStringList::Iterator it = matches->begin();
it != matches->end(); it++ )
if ( !(*it).isNull() )
(*it).prepend( m_text_start );
@@ -166,12 +166,12 @@ void KateCmdShellCompletion::postProcessMatches( KCompletionMatches *matches ) c
(*it).value().prepend( m_text_start );
}
-void KateCmdShellCompletion::splitText(const QString &text, QString &text_start,
- QString &text_compl) const
+void KateCmdShellCompletion::splitText(const TQString &text, TQString &text_start,
+ TQString &text_compl) const
{
bool in_quote = false;
bool escaped = false;
- QChar p_last_quote_char;
+ TQChar p_last_quote_char;
int last_unquoted_space = -1;
int end_space_len = 0;
diff --git a/kate/interfaces/katecmd.h b/kate/interfaces/katecmd.h
index 8af9e1f6c..b01f6dafb 100644
--- a/kate/interfaces/katecmd.h
+++ b/kate/interfaces/katecmd.h
@@ -23,8 +23,8 @@
#include <kcompletion.h>
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
class KATEPARTINTERFACES_EXPORT KateCmd
{
@@ -38,18 +38,18 @@ class KATEPARTINTERFACES_EXPORT KateCmd
bool registerCommand (Kate::Command *cmd);
bool unregisterCommand (Kate::Command *cmd);
- Kate::Command *queryCommand (const QString &cmd);
+ Kate::Command *queryCommand (const TQString &cmd);
- QStringList cmds ();
- void appendHistory( const QString &cmd );
- const QString fromHistory( uint i ) const;
+ TQStringList cmds ();
+ void appendHistory( const TQString &cmd );
+ const TQString fromHistory( uint i ) const;
uint historyLength() const { return m_history.count(); }
private:
static KateCmd *s_self;
- QDict<Kate::Command> m_dict;
- QStringList m_cmds;
- QStringList m_history;
+ TQDict<Kate::Command> m_dict;
+ TQStringList m_cmds;
+ TQStringList m_history;
};
/**
@@ -67,14 +67,14 @@ class KATEPARTINTERFACES_EXPORT KateCmdShellCompletion : public KCompletion
* Finds completions to the given text.
* The first match is returned and emitted in the signal match().
* @param text the text to complete
- * @return the first match, or QString::null if not found
+ * @return the first match, or TQString::null if not found
*/
- QString makeCompletion(const QString &text);
+ TQString makeCompletion(const TQString &text);
protected:
// Called by KCompletion
- void postProcessMatch( QString *match ) const;
- void postProcessMatches( QStringList *matches ) const;
+ void postProcessMatch( TQString *match ) const;
+ void postProcessMatches( TQStringList *matches ) const;
void postProcessMatches( KCompletionMatches *matches ) const;
private:
@@ -84,15 +84,15 @@ class KATEPARTINTERFACES_EXPORT KateCmdShellCompletion : public KCompletion
* @param text_start will be set to the text at the left, including the space
* @param text_compl Will be set to the text at the right. This is the text to complete.
*/
- void splitText( const QString &text, QString &text_start, QString &text_compl ) const;
+ void splitText( const TQString &text, TQString &text_start, TQString &text_compl ) const;
- QChar m_word_break_char;
- QChar m_quote_char1;
- QChar m_quote_char2;
- QChar m_escape_char;
+ TQChar m_word_break_char;
+ TQChar m_quote_char1;
+ TQChar m_quote_char2;
+ TQChar m_escape_char;
- QString m_text_start;
- QString m_text_compl;
+ TQString m_text_start;
+ TQString m_text_compl;
};
diff --git a/kate/interfaces/view.h b/kate/interfaces/view.h
index 98290039e..90c61d5ac 100644
--- a/kate/interfaces/view.h
+++ b/kate/interfaces/view.h
@@ -53,7 +53,7 @@ class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEdi
/**
Constructor (should much rather take a reference to the document).
*/
- View ( KTextEditor::Document *, QWidget *, const char *name = 0 );
+ View ( KTextEditor::Document *, TQWidget *, const char *name = 0 );
/**
Destructor, you need a destructor if Scott Meyers says so.
*/
@@ -69,21 +69,21 @@ class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEdi
/**
Gets the text line where the cursor is on
*/
- virtual QString currentTextLine() { return 0L; }
+ virtual TQString currentTextLine() { return 0L; }
/**
Gets the word where the cursor is on
*/
- virtual QString currentWord() { return 0L; }
+ virtual TQString currentWord() { return 0L; }
/**
Gets the word at position x, y. Can be used to find
the word under the mouse cursor
*/
- virtual QString word(int , int ) { return 0L; }
+ virtual TQString word(int , int ) { return 0L; }
/**
Insert text at the current cursor position.
@param mark is unused.
*/
- virtual void insertText(const QString &mark ) { Q_UNUSED(mark); }
+ virtual void insertText(const TQString &mark ) { Q_UNUSED(mark); }
/**
Works exactly like closeURL() of KParts::ReadWritePart
*/
@@ -92,7 +92,7 @@ class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEdi
public:
virtual int tabWidth() = 0;
virtual void setTabWidth(int) = 0;
- virtual void setEncoding (QString e) = 0;
+ virtual void setEncoding (TQString e) = 0;
/**
Returns true if this editor is the only owner of its document
@@ -211,7 +211,7 @@ class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEdi
Set focus to the current window.
*/
// Should remove this, it's redundant.
- virtual void setFocus () { QWidget::setFocus(); }
+ virtual void setFocus () { TQWidget::setFocus(); }
/**
Searches for the last searched text forward from cursor position.
@param forward determines the search direction.
diff --git a/kate/part/katearbitraryhighlight.cpp b/kate/part/katearbitraryhighlight.cpp
index 2ecbececc..a9a4fe37c 100644
--- a/kate/part/katearbitraryhighlight.cpp
+++ b/kate/part/katearbitraryhighlight.cpp
@@ -24,19 +24,19 @@
#include <kdebug.h>
-#include <qfont.h>
+#include <tqfont.h>
KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateSuperCursor* start,
-KateSuperCursor* end, QObject* parent, const char* name) :
+KateSuperCursor* end, TQObject* parent, const char* name) :
KateSuperRange(start, end, parent, name) {
}
-KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, QObject* parent, const char* name)
+KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, TQObject* parent, const char* name)
: KateSuperRange(doc, range, parent, name)
{
}
-KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, QObject* parent, const char* name)
+KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent, const char* name)
: KateSuperRange(doc, start, end, parent, name)
{
}
@@ -46,11 +46,11 @@ KateArbitraryHighlightRange::~KateArbitraryHighlightRange()
}
KateArbitraryHighlight::KateArbitraryHighlight(KateDocument* parent, const char* name)
- : QObject(parent, name)
+ : TQObject(parent, name)
{
}
-KateAttribute KateArbitraryHighlightRange::merge(QPtrList<KateSuperRange> ranges)
+KateAttribute KateArbitraryHighlightRange::merge(TQPtrList<KateSuperRange> ranges)
{
ranges.sort();
@@ -73,27 +73,27 @@ KateAttribute KateArbitraryHighlightRange::merge(QPtrList<KateSuperRange> ranges
void KateArbitraryHighlight::addHighlightToDocument(KateSuperRangeList* list)
{
m_docHLs.append(list);
- connect(list, SIGNAL(rangeEliminated(KateSuperRange*)), SLOT(slotRangeEliminated(KateSuperRange*)));
- connect(list, SIGNAL(destroyed(QObject*)),SLOT(slotRangeListDeleted(QObject*)));
+ connect(list, TQT_SIGNAL(rangeEliminated(KateSuperRange*)), TQT_SLOT(slotRangeEliminated(KateSuperRange*)));
+ connect(list, TQT_SIGNAL(destroyed(TQObject*)),TQT_SLOT(slotRangeListDeleted(TQObject*)));
}
void KateArbitraryHighlight::addHighlightToView(KateSuperRangeList* list, KateView* view)
{
if (!m_viewHLs[view])
- m_viewHLs.insert(view, new QPtrList<KateSuperRangeList>());
+ m_viewHLs.insert(view, new TQPtrList<KateSuperRangeList>());
m_viewHLs[view]->append(list);
- connect(list, SIGNAL(rangeEliminated(KateSuperRange*)), SLOT(slotTagRange(KateSuperRange*)));
- connect(list, SIGNAL(tagRange(KateSuperRange*)), SLOT(slotTagRange(KateSuperRange*)));
- connect(list, SIGNAL(destroyed(QObject*)),SLOT(slotRangeListDeleted(QObject*)));
+ connect(list, TQT_SIGNAL(rangeEliminated(KateSuperRange*)), TQT_SLOT(slotTagRange(KateSuperRange*)));
+ connect(list, TQT_SIGNAL(tagRange(KateSuperRange*)), TQT_SLOT(slotTagRange(KateSuperRange*)));
+ connect(list, TQT_SIGNAL(destroyed(TQObject*)),TQT_SLOT(slotRangeListDeleted(TQObject*)));
}
-void KateArbitraryHighlight::slotRangeListDeleted(QObject* obj) {
+void KateArbitraryHighlight::slotRangeListDeleted(TQObject* obj) {
int id=m_docHLs.findRef(static_cast<KateSuperRangeList*>(obj));
if (id>=0) m_docHLs.take(id);
- for (QMap<KateView*, QPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
+ for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next())
if (l==obj) {
l->take();
@@ -123,14 +123,14 @@ KateSuperRangeList& KateArbitraryHighlight::rangesIncluding(uint line, KateView*
//--- END Temporary optimisation ---
if (view) {
- QPtrList<KateSuperRangeList>* list = m_viewHLs[view];
+ TQPtrList<KateSuperRangeList>* list = m_viewHLs[view];
if (list)
for (KateSuperRangeList* l = list->first(); l; l = list->next())
if (l->count())
s_return.appendList(l->rangesIncluding(line));
} else {
- for (QMap<KateView*, QPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
+ for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next())
if (l->count())
s_return.appendList(l->rangesIncluding(line));
@@ -150,7 +150,7 @@ void KateArbitraryHighlight::slotTagRange(KateSuperRange* range)
KateView* KateArbitraryHighlight::viewForRange(KateSuperRange* range)
{
- for (QMap<KateView*, QPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
+ for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next())
if (l->contains(range))
return it.key();
diff --git a/kate/part/katearbitraryhighlight.h b/kate/part/katearbitraryhighlight.h
index 7955e7889..4dd5a362b 100644
--- a/kate/part/katearbitraryhighlight.h
+++ b/kate/part/katearbitraryhighlight.h
@@ -22,9 +22,9 @@
#include "kateattribute.h"
#include "katesupercursor.h"
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
class KateDocument;
class KateView;
@@ -34,15 +34,15 @@ class KateArbitraryHighlightRange : public KateSuperRange, public KateAttribute
Q_OBJECT
public:
- KateArbitraryHighlightRange(KateSuperCursor* start, KateSuperCursor* end, QObject* parent = 0L, const char* name = 0L);
- KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, QObject* parent = 0L, const char* name = 0L);
- KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, QObject* parent = 0L, const char* name = 0L);
+ KateArbitraryHighlightRange(KateSuperCursor* start, KateSuperCursor* end, TQObject* parent = 0L, const char* name = 0L);
+ KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, TQObject* parent = 0L, const char* name = 0L);
+ KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent = 0L, const char* name = 0L);
virtual ~KateArbitraryHighlightRange();
virtual void changed() { slotTagRange(); };
- static KateAttribute merge(QPtrList<KateSuperRange> ranges);
+ static KateAttribute merge(TQPtrList<KateSuperRange> ranges);
};
/**
@@ -74,12 +74,12 @@ signals:
private slots:
void slotTagRange(KateSuperRange* range);
- void slotRangeListDeleted(QObject* obj);
+ void slotRangeListDeleted(TQObject* obj);
private:
KateView* viewForRange(KateSuperRange* range);
- QMap<KateView*, QPtrList<KateSuperRangeList>* > m_viewHLs;
- QPtrList<KateSuperRangeList> m_docHLs;
+ TQMap<KateView*, TQPtrList<KateSuperRangeList>* > m_viewHLs;
+ TQPtrList<KateSuperRangeList> m_docHLs;
};
#endif
diff --git a/kate/part/kateattribute.cpp b/kate/part/kateattribute.cpp
index 5de93a406..9ed6349f6 100644
--- a/kate/part/kateattribute.cpp
+++ b/kate/part/kateattribute.cpp
@@ -19,7 +19,7 @@
#include "kateattribute.h"
KateAttribute::KateAttribute()
- : m_weight(QFont::Normal)
+ : m_weight(TQFont::Normal)
, m_italic(false)
, m_underline(false)
, m_overline(false)
@@ -73,9 +73,9 @@ KateAttribute& KateAttribute::operator+=(const KateAttribute& a)
return *this;
}
-QFont KateAttribute::font(const QFont& ref)
+TQFont KateAttribute::font(const TQFont& ref)
{
- QFont ret = ref;
+ TQFont ret = ref;
if (itemSet(Weight))
ret.setWeight(weight());
@@ -105,7 +105,7 @@ void KateAttribute::setWeight(int weight)
void KateAttribute::setBold(bool enable)
{
- setWeight(enable ? QFont::Bold : QFont::Normal);
+ setWeight(enable ? TQFont::Bold : TQFont::Normal);
}
void KateAttribute::setItalic(bool enable)
@@ -156,7 +156,7 @@ void KateAttribute::setStrikeOut(bool enable)
}
}
-void KateAttribute::setOutline(const QColor& color)
+void KateAttribute::setOutline(const TQColor& color)
{
if (!(m_itemsSet & Outline) || m_outline != color)
{
@@ -168,7 +168,7 @@ void KateAttribute::setOutline(const QColor& color)
}
}
-void KateAttribute::setTextColor(const QColor& color)
+void KateAttribute::setTextColor(const TQColor& color)
{
if (!(m_itemsSet & TextColor) || m_textColor != color)
{
@@ -180,7 +180,7 @@ void KateAttribute::setTextColor(const QColor& color)
}
}
-void KateAttribute::setSelectedTextColor(const QColor& color)
+void KateAttribute::setSelectedTextColor(const TQColor& color)
{
if (!(m_itemsSet & SelectedTextColor) || m_selectedTextColor != color)
{
@@ -192,7 +192,7 @@ void KateAttribute::setSelectedTextColor(const QColor& color)
}
}
-void KateAttribute::setBGColor(const QColor& color)
+void KateAttribute::setBGColor(const TQColor& color)
{
if (!(m_itemsSet & BGColor) || m_bgColor != color)
{
@@ -204,7 +204,7 @@ void KateAttribute::setBGColor(const QColor& color)
}
}
-void KateAttribute::setSelectedBGColor(const QColor& color)
+void KateAttribute::setSelectedBGColor(const TQColor& color)
{
if (!(m_itemsSet & SelectedBGColor) || m_selectedBGColor != color)
{
diff --git a/kate/part/kateattribute.h b/kate/part/kateattribute.h
index c4933e690..a54279b24 100644
--- a/kate/part/kateattribute.h
+++ b/kate/part/kateattribute.h
@@ -21,7 +21,7 @@
#include "katefont.h"
-#include <qcolor.h>
+#include <tqcolor.h>
/**
* The Attribute class incorporates all text decorations supported by Kate.
@@ -49,13 +49,13 @@ public:
KateAttribute();
virtual ~KateAttribute();
- QFont font(const QFont& ref);
+ TQFont font(const TQFont& ref);
- inline int width(KateFontStruct& fs, const QString& text, int col, int tabWidth) const
+ inline int width(KateFontStruct& fs, const TQString& text, int col, int tabWidth) const
{ return fs.width(text, col, bold(), italic(), tabWidth); };
// Non-preferred function when you have a string and you want one char's width!!
- inline int width(KateFontStruct& fs, const QChar& c, int tabWidth) const
+ inline int width(KateFontStruct& fs, const TQChar& c, int tabWidth) const
{ return fs.width(c, bold(), italic(), tabWidth); };
inline bool itemSet(int item) const
@@ -76,7 +76,7 @@ public:
void setWeight(int weight);
inline bool bold() const
- { return weight() >= QFont::Bold; };
+ { return weight() >= TQFont::Bold; };
void setBold(bool enable = true);
@@ -100,30 +100,30 @@ public:
void setStrikeOut(bool enable = true);
- inline const QColor& outline() const
+ inline const TQColor& outline() const
{ return m_outline; };
- void setOutline(const QColor& color);
+ void setOutline(const TQColor& color);
- inline const QColor& textColor() const
+ inline const TQColor& textColor() const
{ return m_textColor; };
- void setTextColor(const QColor& color);
+ void setTextColor(const TQColor& color);
- inline const QColor& selectedTextColor() const
+ inline const TQColor& selectedTextColor() const
{ return m_selectedTextColor; };
- void setSelectedTextColor(const QColor& color);
+ void setSelectedTextColor(const TQColor& color);
- inline const QColor& bgColor() const
+ inline const TQColor& bgColor() const
{ return m_bgColor; };
- void setBGColor(const QColor& color);
+ void setBGColor(const TQColor& color);
- inline const QColor& selectedBGColor() const
+ inline const TQColor& selectedBGColor() const
{ return m_selectedBGColor; };
- void setSelectedBGColor(const QColor& color);
+ void setSelectedBGColor(const TQColor& color);
KateAttribute& operator+=(const KateAttribute& a);
@@ -138,7 +138,7 @@ public:
private:
int m_weight;
bool m_italic, m_underline, m_overline,m_strikeout, m_changed;
- QColor m_outline, m_textColor, m_selectedTextColor, m_bgColor, m_selectedBGColor;
+ TQColor m_outline, m_textColor, m_selectedTextColor, m_bgColor, m_selectedBGColor;
int m_itemsSet;
};
diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp
index 7c58b6051..ed9a6169b 100644
--- a/kate/part/kateautoindent.cpp
+++ b/kate/part/kateautoindent.cpp
@@ -55,9 +55,9 @@ KateAutoIndent *KateAutoIndent::createIndenter (KateDocument *doc, uint mode)
return new KateAutoIndent (doc);
}
-QStringList KateAutoIndent::listModes ()
+TQStringList KateAutoIndent::listModes ()
{
- QStringList l;
+ TQStringList l;
l << modeDescription(KateDocumentConfig::imNone);
l << modeDescription(KateDocumentConfig::imNormal);
@@ -71,27 +71,27 @@ QStringList KateAutoIndent::listModes ()
return l;
}
-QString KateAutoIndent::modeName (uint mode)
+TQString KateAutoIndent::modeName (uint mode)
{
if (mode == KateDocumentConfig::imNormal)
- return QString ("normal");
+ return TQString ("normal");
else if (mode == KateDocumentConfig::imCStyle)
- return QString ("cstyle");
+ return TQString ("cstyle");
else if (mode == KateDocumentConfig::imPythonStyle)
- return QString ("python");
+ return TQString ("python");
else if (mode == KateDocumentConfig::imXmlStyle)
- return QString ("xml");
+ return TQString ("xml");
else if (mode == KateDocumentConfig::imCSAndS)
- return QString ("csands");
+ return TQString ("csands");
else if ( mode == KateDocumentConfig::imVarIndent )
- return QString( "varindent" );
+ return TQString( "varindent" );
// else if ( mode == KateDocumentConfig::imScriptIndent )
-// return QString( "scriptindent" );
+// return TQString( "scriptindent" );
- return QString ("none");
+ return TQString ("none");
}
-QString KateAutoIndent::modeDescription (uint mode)
+TQString KateAutoIndent::modeDescription (uint mode)
{
if (mode == KateDocumentConfig::imNormal)
return i18n ("Normal");
@@ -111,7 +111,7 @@ QString KateAutoIndent::modeDescription (uint mode)
return i18n ("None");
}
-uint KateAutoIndent::modeNumber (const QString &name)
+uint KateAutoIndent::modeNumber (const TQString &name)
{
if (modeName(KateDocumentConfig::imNormal) == name)
return KateDocumentConfig::imNormal;
@@ -139,7 +139,7 @@ bool KateAutoIndent::hasConfigPage (uint mode)
return false;
}
-IndenterConfigPage* KateAutoIndent::configPage(QWidget *parent, uint mode)
+IndenterConfigPage* KateAutoIndent::configPage(TQWidget *parent, uint mode)
{
// if ( mode == KateDocumentConfig::imScriptIndent )
// return new ScriptIndentConfigPage(parent, "script_indent_config_page");
@@ -148,7 +148,7 @@ IndenterConfigPage* KateAutoIndent::configPage(QWidget *parent, uint mode)
}
KateAutoIndent::KateAutoIndent (KateDocument *_doc)
-: QObject(), doc(_doc)
+: TQObject(), doc(_doc)
{
}
KateAutoIndent::~KateAutoIndent ()
@@ -158,19 +158,19 @@ KateAutoIndent::~KateAutoIndent ()
//END KateAutoIndent
//BEGIN KateViewIndentAction
-KateViewIndentationAction::KateViewIndentationAction(KateDocument *_doc, const QString& text, QObject* parent, const char* name)
+KateViewIndentationAction::KateViewIndentationAction(KateDocument *_doc, const TQString& text, TQObject* parent, const char* name)
: KActionMenu (text, parent, name), doc(_doc)
{
- connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow()));
+ connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}
void KateViewIndentationAction::slotAboutToShow()
{
- QStringList modes = KateAutoIndent::listModes ();
+ TQStringList modes = KateAutoIndent::listModes ();
popupMenu()->clear ();
for (uint z=0; z<modes.size(); ++z)
- popupMenu()->insertItem ( '&' + KateAutoIndent::modeDescription(z).replace('&', "&&"), this, SLOT(setMode(int)), 0, z);
+ popupMenu()->insertItem ( '&' + KateAutoIndent::modeDescription(z).replace('&', "&&"), this, TQT_SLOT(setMode(int)), 0, z);
popupMenu()->setItemChecked (doc->config()->indentationMode(), true);
}
@@ -187,7 +187,7 @@ KateNormalIndent::KateNormalIndent (KateDocument *_doc)
: KateAutoIndent (_doc)
{
// if highlighting changes, update attributes
- connect(_doc, SIGNAL(hlChanged()), this, SLOT(updateConfig()));
+ connect(_doc, TQT_SIGNAL(hlChanged()), this, TQT_SLOT(updateConfig()));
}
KateNormalIndent::~KateNormalIndent ()
@@ -223,7 +223,7 @@ void KateNormalIndent::updateConfig ()
for (uint i=0; i<items.count(); i++)
{
- QString name = items.at(i)->name;
+ TQString name = items.at(i)->name;
if (name.find("Comment") != -1 && commentAttrib == 255)
{
commentAttrib = i;
@@ -279,7 +279,7 @@ void KateNormalIndent::updateConfig ()
}
}
-bool KateNormalIndent::isBalanced (KateDocCursor &begin, const KateDocCursor &end, QChar open, QChar close, uint &pos) const
+bool KateNormalIndent::isBalanced (KateDocCursor &begin, const KateDocCursor &end, TQChar open, TQChar close, uint &pos) const
{
int parenOpen = 0;
bool atLeastOne = false;
@@ -291,7 +291,7 @@ bool KateNormalIndent::isBalanced (KateDocCursor &begin, const KateDocCursor &en
// Assume that open and close are 'Symbol' characters
while (begin < end)
{
- QChar c = begin.currentChar();
+ TQChar c = begin.currentChar();
if (begin.currentAttrib() == symbolAttrib)
{
if (c == open)
@@ -337,11 +337,11 @@ bool KateNormalIndent::skipBlanks (KateDocCursor &cur, KateDocCursor &max, bool
do
{
uchar attrib = cur.currentAttrib();
- const QString hlFile = doc->highlight()->hlKeyForAttrib( attrib );
+ const TQString hlFile = doc->highlight()->hlKeyForAttrib( attrib );
if (attrib != commentAttrib && attrib != regionAttrib && attrib != alertAttrib && attrib != preprocessorAttrib && !hlFile.endsWith("doxygen.xml"))
{
- QChar c = cur.currentChar();
+ TQChar c = cur.currentChar();
if (!c.isNull() && !c.isSpace())
break;
}
@@ -375,9 +375,9 @@ uint KateNormalIndent::measureIndent (KateDocCursor &cur) const
return doc->plainKateTextLine(cur.line())->cursorX(cur.col(), tabWidth);
}
-QString KateNormalIndent::tabString(uint pos) const
+TQString KateNormalIndent::tabString(uint pos) const
{
- QString s;
+ TQString s;
pos = kMin (pos, 80U); // sanity check for large values of pos
if (!useSpaces || mixedIndent)
@@ -406,7 +406,7 @@ void KateNormalIndent::processNewline (KateDocCursor &begin, bool /*needContinue
if (pos > 0)
{
- QString filler = doc->text(line, 0, line, pos);
+ TQString filler = doc->text(line, 0, line, pos);
doc->insertText(begin.line(), 0, filler);
begin.setCol(filler.length());
}
@@ -444,8 +444,8 @@ void KateCSmartIndent::processLine (KateDocCursor &line)
uint indent = 0;
// TODO Here we do not check for beginning and ending comments ...
- QChar first = textLine->getChar(firstChar);
- QChar last = textLine->getChar(textLine->lastChar());
+ TQChar first = textLine->getChar(firstChar);
+ TQChar last = textLine->getChar(textLine->lastChar());
if (first == '}')
{
@@ -538,7 +538,7 @@ void KateCSmartIndent::processLine (KateDocCursor &line)
if (indent != measureIndent(line) || first == '}' || first == '{' || first == '#')
{
doc->removeText(line.line(), 0, line.line(), firstChar);
- QString filler = tabString(indent);
+ TQString filler = tabString(indent);
if (indent > 0) doc->insertText(line.line(), 0, filler);
if (!processingBlock) line.setCol(filler.length());
}
@@ -548,7 +548,7 @@ void KateCSmartIndent::processSection (const KateDocCursor &begin, const KateDoc
{
kdDebug(13030)<<"PROCESS SECTION"<<endl;
KateDocCursor cur = begin;
- QTime t;
+ TQTime t;
t.start();
processingBlock = (end.line() - cur.line() > 0) ? true : false;
@@ -596,7 +596,7 @@ bool KateCSmartIndent::handleDoxygen (KateDocCursor &begin)
textLine = doc->plainKateTextLine(begin.line());
first = textLine->firstChar();
int indent = findOpeningComment(begin);
- QString filler = tabString (indent);
+ TQString filler = tabString (indent);
bool doxygenAutoInsert = doc->config()->configFlags() & KateDocumentConfig::cfDoxygenAutoTyping;
@@ -619,7 +619,7 @@ bool KateCSmartIndent::handleDoxygen (KateDocCursor &begin)
textLine = doc->plainKateTextLine(begin.line());
first = textLine->firstChar();
int indent = findOpeningComment(begin);
- QString filler = tabString (indent);
+ TQString filler = tabString (indent);
doc->removeText (begin.line(), 0, begin.line(), first);
doc->insertText (begin.line(), 0, filler);
@@ -643,7 +643,7 @@ void KateCSmartIndent::processNewline (KateDocCursor &begin, bool needContinue)
if (indent > 0 || inMiddle)
{
- QString filler = tabString (indent);
+ TQString filler = tabString (indent);
doc->insertText (begin.line(), 0, filler);
begin.setCol(filler.length());
@@ -675,7 +675,7 @@ void KateCSmartIndent::processNewline (KateDocCursor &begin, bool needContinue)
*/
static inline bool isColonImmune(const KateNormalIndent &indenter,
uchar attr1, uchar attr2,
- QChar prev1, QChar prev2)
+ TQChar prev1, TQChar prev2)
{
return attr1 == indenter.preprocessorAttrib
// FIXME: no way to discriminate against multiline comment and single
@@ -698,7 +698,7 @@ static inline bool colonPermitsReindent(const KateNormalIndent &indenter,
int curCol
)
{
- const QString txt = line->string(0,curCol);
+ const TQString txt = line->string(0,curCol);
// do we have any significant preceding colon?
for (int pos = 0; (pos = txt.find(':', pos)) >= 0; pos++) {
if (line->attribute(pos) == indenter.symbolAttrib)
@@ -714,14 +714,14 @@ static inline bool colonPermitsReindent(const KateNormalIndent &indenter,
txt[curCol - 1], txt[curCol - 2]);
}
-void KateCSmartIndent::processChar(QChar c)
+void KateCSmartIndent::processChar(TQChar c)
{
// You may be curious about 'n' among the triggers:
// It is used to discriminate C#'s #region/#endregion which are indented
// against normal preprocessing statements which aren't indented.
- static const QString triggers("}{)/:#n");
- static const QString firstTriggers("}{)/:#");
- static const QString lastTriggers(":n");
+ static const TQString triggers("}{)/:#n");
+ static const TQString firstTriggers("}{)/:#");
+ static const TQString lastTriggers(":n");
if (triggers.find(c) < 0)
return;
@@ -730,9 +730,9 @@ void KateCSmartIndent::processChar(QChar c)
KateDocCursor begin(view->cursorLine(), 0, doc);
KateTextLine::Ptr textLine = doc->plainKateTextLine(begin.line());
- const QChar curChar = textLine->getChar(curCol);
+ const TQChar curChar = textLine->getChar(curCol);
const int first = textLine->firstChar();
- const QChar firstChar = textLine->getChar(first);
+ const TQChar firstChar = textLine->getChar(first);
#if 0 // nice try
// Only indent on symbols or preprocessing directives -- never on
@@ -748,7 +748,7 @@ void KateCSmartIndent::processChar(QChar c)
if (c == 'n')
{
- if (firstChar != '#' || textLine->string(curCol-5, 5) != QString::fromLatin1("regio"))
+ if (firstChar != '#' || textLine->string(curCol-5, 5) != TQString::fromLatin1("regio"))
return;
}
@@ -773,7 +773,7 @@ void KateCSmartIndent::processChar(QChar c)
// I. e. take action on single braces on line or last colon, but inhibit
// any reindentation if any of those characters appear amidst some section
// of the line
- const QChar lastChar = textLine->getChar(textLine->lastChar());
+ const TQChar lastChar = textLine->getChar(textLine->lastChar());
int pos;
if (((c == firstChar && firstTriggers.find(firstChar) >= 0)
|| (c == lastChar && lastTriggers.find(lastChar) >= 0))
@@ -812,7 +812,7 @@ uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue)
{
if (textLine->attribute(pos) == symbolAttrib)
{
- QChar tc = textLine->getChar (pos);
+ TQChar tc = textLine->getChar (pos);
if ((tc == ';' || tc == ':' || tc == ',') && otherAnchor == -1 && parenCount <= 0) {
otherAnchor = pos, potentialAnchorSeen = true;
isArg = tc == ',';
@@ -834,7 +834,7 @@ uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue)
if (openCount != 0 || otherAnchor != -1)
{
found = true;
- QChar c;
+ TQChar c;
if (openCount > 0)
c = '{';
else if (openCount < 0)
@@ -845,7 +845,7 @@ uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue)
int specialIndent = 0;
if (c == ':' && needContinue)
{
- QChar ch;
+ TQChar ch;
specialIndent = textLine->firstChar();
if (textLine->stringAtPos(specialIndent, "case"))
ch = textLine->getChar(specialIndent + 4);
@@ -920,7 +920,7 @@ uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue)
// Move forward from anchor and determine last known reference character
// Braces take precedance over others ...
textLine = doc->plainKateTextLine(cur.line());
- QChar lastChar = textLine->getChar (anchorPos);
+ TQChar lastChar = textLine->getChar (anchorPos);
int lastLine = cur.line();
if (lastChar == '#' || lastChar == '[')
{
@@ -935,7 +935,7 @@ uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue)
if (!skipBlanks(cur, begin, true))
return isArg && !parenthesizedArg ? begin.col() : 0;
- QChar tc = cur.currentChar();
+ TQChar tc = cur.currentChar();
//kdDebug(13030) << " cur.line:" << cur.line() << " cur.col:" << cur.col() << " currentChar '" << tc << "' " << textLine->attribute(cur.col()) << endl;
if (cur == begin || tc.isNull())
break;
@@ -977,7 +977,7 @@ uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue)
KateDocCursor finish(lastLine, textLine->lastChar() + 1, doc);
uint pos = 0;
- if (isBalanced(start, finish, QChar('('), QChar(')'), pos) && false)
+ if (isBalanced(start, finish, TQChar('('), TQChar(')'), pos) && false)
indent = anchorIndent;
else
{
@@ -1069,7 +1069,7 @@ uint KateCSmartIndent::calcContinue(KateDocCursor &start, KateDocCursor &end)
}
uint openPos = 0;
- if (needsBalanced && !isBalanced (cur, end, QChar('('), QChar(')'), openPos))
+ if (needsBalanced && !isBalanced (cur, end, TQChar('('), TQChar(')'), openPos))
{
allowSemi = isFor;
if (openPos > 0)
@@ -1105,7 +1105,7 @@ uint KateCSmartIndent::findOpeningBrace(KateDocCursor &start)
{
if (cur.currentAttrib() == symbolAttrib)
{
- QChar ch = cur.currentChar();
+ TQChar ch = cur.currentChar();
if (ch == '{')
count--;
else if (ch == '}')
@@ -1131,7 +1131,7 @@ bool KateCSmartIndent::firstOpeningBrace(KateDocCursor &start)
{
if (cur.currentAttrib() == symbolAttrib)
{
- QChar ch = cur.currentChar();
+ TQChar ch = cur.currentChar();
if (ch == '{')
return false;
else if (ch == '}' && cur.col() == 0)
@@ -1153,7 +1153,7 @@ uint KateCSmartIndent::findOpeningParen(KateDocCursor &start)
{
if (cur.currentAttrib() == symbolAttrib)
{
- QChar ch = cur.currentChar();
+ TQChar ch = cur.currentChar();
if (ch == '(')
count--;
else if (ch == ')')
@@ -1192,9 +1192,9 @@ uint KateCSmartIndent::findOpeningComment(KateDocCursor &start)
//BEGIN KatePythonIndent
-QRegExp KatePythonIndent::endWithColon = QRegExp( "^[^#]*:\\s*(#.*)?$" );
-QRegExp KatePythonIndent::stopStmt = QRegExp( "^\\s*(break|continue|raise|return|pass)\\b.*" );
-QRegExp KatePythonIndent::blockBegin = QRegExp( "^\\s*(class|def|if|elif|else|for|while|try)\\b.*" );
+TQRegExp KatePythonIndent::endWithColon = TQRegExp( "^[^#]*:\\s*(#.*)?$" );
+TQRegExp KatePythonIndent::stopStmt = TQRegExp( "^\\s*(break|continue|raise|return|pass)\\b.*" );
+TQRegExp KatePythonIndent::blockBegin = TQRegExp( "^\\s*(class|def|if|elif|else|for|while|try)\\b.*" );
KatePythonIndent::KatePythonIndent (KateDocument *doc)
: KateNormalIndent (doc)
@@ -1232,7 +1232,7 @@ void KatePythonIndent::processNewline (KateDocCursor &begin, bool /*newline*/)
if (indent > 0)
{
- QString filler = tabString (indent);
+ TQString filler = tabString (indent);
doc->insertText (begin.line(), 0, filler);
begin.setCol(filler.length());
}
@@ -1266,7 +1266,7 @@ int KatePythonIndent::calcExtra (int &prevBlock, int &pos, KateDocCursor &end)
}
KateDocCursor cur (prevBlock, pos, doc);
- QChar c;
+ TQChar c;
int extraIndent = 0;
while (cur.line() < end.line())
{
@@ -1290,9 +1290,9 @@ int KatePythonIndent::calcExtra (int &prevBlock, int &pos, KateDocCursor &end)
return extraIndent;
}
-void KatePythonIndent::traverseString( const QChar &stringChar, KateDocCursor &cur, KateDocCursor &end )
+void KatePythonIndent::traverseString( const TQChar &stringChar, KateDocCursor &cur, KateDocCursor &end )
{
- QChar c;
+ TQChar c;
bool escape = false;
cur.moveForward(1);
@@ -1335,8 +1335,8 @@ tag.
*/
-const QRegExp KateXmlIndent::startsWithCloseTag("^[ \t]*</");
-const QRegExp KateXmlIndent::unclosedDoctype("<!DOCTYPE[^>]*$");
+const TQRegExp KateXmlIndent::startsWithCloseTag("^[ \t]*</");
+const TQRegExp KateXmlIndent::unclosedDoctype("<!DOCTYPE[^>]*$");
KateXmlIndent::KateXmlIndent (KateDocument *doc)
: KateNormalIndent (doc)
@@ -1352,13 +1352,13 @@ void KateXmlIndent::processNewline (KateDocCursor &begin, bool /*newline*/)
begin.setCol(processLine(begin.line()));
}
-void KateXmlIndent::processChar (QChar c)
+void KateXmlIndent::processChar (TQChar c)
{
if(c != '/') return;
// only alter lines that start with a close element
KateView *view = doc->activeView();
- QString text = doc->plainKateTextLine(view->cursorLine())->string();
+ TQString text = doc->plainKateTextLine(view->cursorLine())->string();
if(text.find(startsWithCloseTag) == -1) return;
// process it
@@ -1398,7 +1398,7 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags,
break;
}
prevIndent = prevLine->cursorX(prevLine->firstChar(), tabWidth);
- QString text = prevLine->string();
+ TQString text = prevLine->string();
// special case:
// <a>
@@ -1506,7 +1506,7 @@ uint KateXmlIndent::processLine (uint line)
// apply new indent
doc->removeText(line, 0, line, kateLine->firstChar());
- QString filler = tabString(indent);
+ TQString filler = tabString(indent);
doc->insertText(line, 0, filler);
return filler.length();
@@ -1543,7 +1543,7 @@ void KateCSAndSIndent::processLine (KateDocCursor &line)
updateIndentString();
const int oldCol = line.col();
- QString whitespace = calcIndent(line);
+ TQString whitespace = calcIndent(line);
// strip off existing whitespace
int oldIndent = textLine->firstChar();
if ( oldIndent < 0 )
@@ -1562,7 +1562,7 @@ void KateCSAndSIndent::processLine (KateDocCursor &line)
void KateCSAndSIndent::processSection (const KateDocCursor &begin, const KateDocCursor &end)
{
- QTime t; t.start();
+ TQTime t; t.start();
for( KateDocCursor cur = begin; cur.line() <= end.line(); )
{
processLine (cur);
@@ -1577,12 +1577,12 @@ void KateCSAndSIndent::processSection (const KateDocCursor &begin, const KateDoc
* If @p convert is set to false, characters at and after the first non-whitespace
* character are removed, not converted.
*/
-static QString initialWhitespace(const KateTextLine::Ptr &line, int chars, bool convert = true)
+static TQString initialWhitespace(const KateTextLine::Ptr &line, int chars, bool convert = true)
{
- QString text = line->string(0, chars);
+ TQString text = line->string(0, chars);
if( (int)text.length() < chars )
{
- QString filler; filler.fill(' ',chars - text.length());
+ TQString filler; filler.fill(' ',chars - text.length());
text += filler;
}
for( uint n = 0; n < text.length(); ++n )
@@ -1597,7 +1597,7 @@ static QString initialWhitespace(const KateTextLine::Ptr &line, int chars, bool
return text;
}
-QString KateCSAndSIndent::findOpeningCommentIndentation(const KateDocCursor &start)
+TQString KateCSAndSIndent::findOpeningCommentIndentation(const KateDocCursor &start)
{
KateDocCursor cur = start;
@@ -1614,7 +1614,7 @@ QString KateCSAndSIndent::findOpeningCommentIndentation(const KateDocCursor &sta
// should never happen.
kdWarning( 13030 ) << " in a comment, but can't find the start of it" << endl;
- return QString::null;
+ return TQString::null;
}
bool KateCSAndSIndent::handleDoxygen (KateDocCursor &begin)
@@ -1642,7 +1642,7 @@ bool KateCSAndSIndent::handleDoxygen (KateDocCursor &begin)
// our line is inside a doxygen comment. align the *'s and then maybe insert one too ...
textLine = doc->plainKateTextLine(begin.line());
first = textLine->firstChar();
- QString indent = findOpeningCommentIndentation(begin);
+ TQString indent = findOpeningCommentIndentation(begin);
bool doxygenAutoInsert = doc->config()->configFlags() & KateDocumentConfig::cfDoxygenAutoTyping;
@@ -1703,12 +1703,12 @@ bool KateCSAndSIndent::startsWithLabel( int line )
return false;
// Get the line text.
- const QString lineContents = indentLine->string();
+ const TQString lineContents = indentLine->string();
const int indentLast = indentLine->lastChar();
bool whitespaceFound = false;
for ( int n = indentFirst; n <= indentLast; ++n )
{
- // Get the character as latin1. Can't use QChar::isLetterOrNumber()
+ // Get the character as latin1. Can't use TQChar::isLetterOrNumber()
// as that includes non 0-9 numbers.
char c = lineContents[n].latin1();
if ( c == ':' )
@@ -1756,7 +1756,7 @@ template<class T> T min(T a, T b) { return (a < b) ? a : b; }
int KateCSAndSIndent::lastNonCommentChar( const KateDocCursor &line )
{
KateTextLine::Ptr textLine = doc->plainKateTextLine( line.line() );
- QString str = textLine->string();
+ TQString str = textLine->string();
// find a possible start-of-comment
int p = -2; // so the first find starts at position 0
@@ -1891,17 +1891,17 @@ bool KateCSAndSIndent::inStatement( const KateDocCursor &begin )
return false;
}
-QString KateCSAndSIndent::continuationIndent( const KateDocCursor &begin )
+TQString KateCSAndSIndent::continuationIndent( const KateDocCursor &begin )
{
if( !inStatement( begin ) )
- return QString::null;
+ return TQString::null;
return indentString;
}
/**
* Figure out how indented the line containing @p begin should be.
*/
-QString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
+TQString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
{
KateTextLine::Ptr currLine = doc->plainKateTextLine(begin.line());
int currLineFirst = currLine->firstChar();
@@ -1917,9 +1917,9 @@ QString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
// if the line starts with # (but isn't a c# region thingy), no indentation at all.
if( currLineFirst >= 0 && currLine->getChar(currLineFirst) == '#' )
{
- if( !currLine->stringAtPos( currLineFirst+1, QString::fromLatin1("region") ) &&
- !currLine->stringAtPos( currLineFirst+1, QString::fromLatin1("endregion") ) )
- return QString::null;
+ if( !currLine->stringAtPos( currLineFirst+1, TQString::fromLatin1("region") ) &&
+ !currLine->stringAtPos( currLineFirst+1, TQString::fromLatin1("endregion") ) )
+ return TQString::null;
}
/* Strategy:
@@ -1974,10 +1974,10 @@ QString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
{
#define ARRLEN( array ) ( sizeof(array)/sizeof(array[0]) )
for( uint n = 0; n < ARRLEN(scopeKeywords); ++n )
- if( textLine->stringAtPos(pos, QString::fromLatin1(scopeKeywords[n]) ) )
+ if( textLine->stringAtPos(pos, TQString::fromLatin1(scopeKeywords[n]) ) )
return calcIndentAfterKeyword( begin, cur, pos, false );
for( uint n = 0; n < ARRLEN(blockScopeKeywords); ++n )
- if( textLine->stringAtPos(pos, QString::fromLatin1(blockScopeKeywords[n]) ) )
+ if( textLine->stringAtPos(pos, TQString::fromLatin1(blockScopeKeywords[n]) ) )
return calcIndentAfterKeyword( begin, cur, pos, true );
#undef ARRLEN
}
@@ -1985,10 +1985,10 @@ QString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
}
// no active { in file.
- return QString::null;
+ return TQString::null;
}
-QString KateCSAndSIndent::calcIndentInBracket(const KateDocCursor &indentCursor, const KateDocCursor &bracketCursor, int bracketPos)
+TQString KateCSAndSIndent::calcIndentInBracket(const KateDocCursor &indentCursor, const KateDocCursor &bracketCursor, int bracketPos)
{
KateTextLine::Ptr indentLine = doc->plainKateTextLine(indentCursor.line());
KateTextLine::Ptr bracketLine = doc->plainKateTextLine(bracketCursor.line());
@@ -2030,12 +2030,12 @@ QString KateCSAndSIndent::calcIndentInBracket(const KateDocCursor &indentCursor,
return initialWhitespace( bracketLine, indentTo );
}
-QString KateCSAndSIndent::calcIndentAfterKeyword(const KateDocCursor &indentCursor, const KateDocCursor &keywordCursor, int keywordPos, bool blockKeyword)
+TQString KateCSAndSIndent::calcIndentAfterKeyword(const KateDocCursor &indentCursor, const KateDocCursor &keywordCursor, int keywordPos, bool blockKeyword)
{
KateTextLine::Ptr keywordLine = doc->plainKateTextLine(keywordCursor.line());
KateTextLine::Ptr indentLine = doc->plainKateTextLine(indentCursor.line());
- QString whitespaceToKeyword = initialWhitespace( keywordLine, keywordPos, false );
+ TQString whitespaceToKeyword = initialWhitespace( keywordLine, keywordPos, false );
if( blockKeyword ) {
// FIXME: we could add the open brace and subsequent newline here since they're definitely needed.
}
@@ -2057,12 +2057,12 @@ QString KateCSAndSIndent::calcIndentAfterKeyword(const KateDocCursor &indentCurs
return indentString + whitespaceToKeyword;
}
-QString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, const KateDocCursor &braceCursor, int bracePos)
+TQString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, const KateDocCursor &braceCursor, int bracePos)
{
KateTextLine::Ptr braceLine = doc->plainKateTextLine(braceCursor.line());
const int braceFirst = braceLine->firstChar();
- QString whitespaceToOpenBrace = initialWhitespace( braceLine, bracePos, false );
+ TQString whitespaceToOpenBrace = initialWhitespace( braceLine, bracePos, false );
// if the open brace is the start of a namespace, don't indent...
// FIXME: this is an extremely poor heuristic. it looks on the line with
@@ -2070,7 +2070,7 @@ QString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, c
// beginning 'namespace'. that's 99% of usage, I'd guess.
{
if( braceFirst >= 0 && braceLine->attribute(braceFirst) == keywordAttrib &&
- braceLine->stringAtPos( braceFirst, QString::fromLatin1( "namespace" ) ) )
+ braceLine->stringAtPos( braceFirst, TQString::fromLatin1( "namespace" ) ) )
return continuationIndent(indentCursor) + whitespaceToOpenBrace;
if( braceCursor.line() > 0 )
@@ -2078,7 +2078,7 @@ QString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, c
KateTextLine::Ptr prevLine = doc->plainKateTextLine(braceCursor.line() - 1);
int firstPrev = prevLine->firstChar();
if( firstPrev >= 0 && prevLine->attribute(firstPrev) == keywordAttrib &&
- prevLine->stringAtPos( firstPrev, QString::fromLatin1( "namespace" ) ) )
+ prevLine->stringAtPos( firstPrev, TQString::fromLatin1( "namespace" ) ) )
return continuationIndent(indentCursor) + whitespaceToOpenBrace;
}
}
@@ -2104,14 +2104,14 @@ QString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, c
return whitespaceToOpenBrace;
// the normal case: indent once for the brace, again if it's a continuation
- QString continuationIndent = continuation ? indentString : QString::null;
+ TQString continuationIndent = continuation ? indentString : TQString::null;
return indentString + continuationIndent + whitespaceToOpenBrace;
}
-void KateCSAndSIndent::processChar(QChar c)
+void KateCSAndSIndent::processChar(TQChar c)
{
// 'n' trigger is for c# regions.
- static const QString triggers("}{)]/:;#n");
+ static const TQString triggers("}{)]/:;#n");
if (triggers.find(c) == -1)
return;
@@ -2154,8 +2154,8 @@ void KateCSAndSIndent::processChar(QChar c)
//BEGIN KateVarIndent
class KateVarIndentPrivate {
public:
- QRegExp reIndentAfter, reIndent, reUnindent;
- QString triggers;
+ TQRegExp reIndentAfter, reIndent, reUnindent;
+ TQString triggers;
uint couples;
uchar coupleAttrib;
};
@@ -2164,9 +2164,9 @@ KateVarIndent::KateVarIndent( KateDocument *doc )
: KateNormalIndent( doc )
{
d = new KateVarIndentPrivate;
- d->reIndentAfter = QRegExp( doc->variable( "var-indent-indent-after" ) );
- d->reIndent = QRegExp( doc->variable( "var-indent-indent" ) );
- d->reUnindent = QRegExp( doc->variable( "var-indent-unindent" ) );
+ d->reIndentAfter = TQRegExp( doc->variable( "var-indent-indent-after" ) );
+ d->reIndent = TQRegExp( doc->variable( "var-indent-indent" ) );
+ d->reUnindent = TQRegExp( doc->variable( "var-indent-unindent" ) );
d->triggers = doc->variable( "var-indent-triggerchars" );
d->coupleAttrib = 0;
@@ -2174,8 +2174,8 @@ KateVarIndent::KateVarIndent( KateDocument *doc )
slotVariableChanged( "var-indent-handle-couples", doc->variable( "var-indent-handle-couples" ) );
// update if a setting is changed
- connect( doc, SIGNAL(variableChanged( const QString&, const QString&) ),
- this, SLOT(slotVariableChanged( const QString&, const QString& )) );
+ connect( doc, TQT_SIGNAL(variableChanged( const TQString&, const TQString&) ),
+ this, TQT_SLOT(slotVariableChanged( const TQString&, const TQString& )) );
}
KateVarIndent::~KateVarIndent()
@@ -2191,7 +2191,7 @@ void KateVarIndent::processNewline ( KateDocCursor &begin, bool /*needContinue*/
processLine( begin );
}
-void KateVarIndent::processChar ( QChar c )
+void KateVarIndent::processChar ( TQChar c )
{
// process line if the c is in our list, and we are not in comment text
if ( d->triggers.contains( c ) )
@@ -2209,7 +2209,7 @@ void KateVarIndent::processChar ( QChar c )
void KateVarIndent::processLine ( KateDocCursor &line )
{
- QString indent; // store the indent string here
+ TQString indent; // store the indent string here
// find the first line with content that is not starting with comment text,
// and take the position from that
@@ -2266,7 +2266,7 @@ void KateVarIndent::processLine ( KateDocCursor &line )
int i = tl->firstChar();
if ( i > -1 )
{
- QChar ch = tl->getChar( i );
+ TQChar ch = tl->getChar( i );
uchar at = tl->attribute( i );
kdDebug(13030)<<"attrib is "<<at<<endl;
if ( d->couples & Parens && ch == ')'
@@ -2355,7 +2355,7 @@ void KateVarIndent::processSection (const KateDocCursor &begin, const KateDocCur
}
}
-void KateVarIndent::slotVariableChanged( const QString &var, const QString &val )
+void KateVarIndent::slotVariableChanged( const TQString &var, const TQString &val )
{
if ( ! var.startsWith("var-indent") )
return;
@@ -2371,7 +2371,7 @@ void KateVarIndent::slotVariableChanged( const QString &var, const QString &val
else if ( var == "var-indent-handle-couples" )
{
d->couples = 0;
- QStringList l = QStringList::split( " ", val );
+ TQStringList l = TQStringList::split( " ", val );
if ( l.contains("parens") ) d->couples |= Parens;
if ( l.contains("braces") ) d->couples |= Braces;
if ( l.contains("brackets") ) d->couples |= Brackets;
@@ -2393,7 +2393,7 @@ void KateVarIndent::slotVariableChanged( const QString &var, const QString &val
}
}
-int KateVarIndent::coupleBalance ( int line, const QChar &open, const QChar &close ) const
+int KateVarIndent::coupleBalance ( int line, const TQChar &open, const TQChar &close ) const
{
int r = 0;
@@ -2402,7 +2402,7 @@ int KateVarIndent::coupleBalance ( int line, const QChar &open, const QChar &clo
for ( uint z=0; z < ln->length(); z++ )
{
- QChar c = ln->getChar( z );
+ TQChar c = ln->getChar( z );
if ( ln->attribute(z) == d->coupleAttrib )
{
kdDebug(13030)<<z<<", "<<c<<endl;
@@ -2420,8 +2420,8 @@ bool KateVarIndent::hasRelevantOpening( const KateDocCursor &end ) const
KateDocCursor cur = end;
int count = 1;
- QChar close = cur.currentChar();
- QChar opener;
+ TQChar close = cur.currentChar();
+ TQChar opener;
if ( close == '}' ) opener = '{';
else if ( close = ')' ) opener = '(';
else if (close = ']' ) opener = '[';
@@ -2432,7 +2432,7 @@ bool KateVarIndent::hasRelevantOpening( const KateDocCursor &end ) const
{
if (cur.currentAttrib() == d->coupleAttrib)
{
- QChar ch = cur.currentChar();
+ TQChar ch = cur.currentChar();
if (ch == opener)
count--;
else if (ch == close)
@@ -2467,9 +2467,9 @@ void KateScriptIndent::processNewline( KateDocCursor &begin, bool needContinue )
if (view)
{
- QString errorMsg;
+ TQString errorMsg;
- QTime t;
+ TQTime t;
t.start();
kdDebug(13030)<<"calling m_script.processChar"<<endl;
if( !m_script.processNewline( view, begin, needContinue , errorMsg ) )
@@ -2480,16 +2480,16 @@ void KateScriptIndent::processNewline( KateDocCursor &begin, bool needContinue )
}
}
-void KateScriptIndent::processChar( QChar c )
+void KateScriptIndent::processChar( TQChar c )
{
kdDebug(13030) << "processChar" << endl;
KateView *view = doc->activeView();
if (view)
{
- QString errorMsg;
+ TQString errorMsg;
- QTime t;
+ TQTime t;
t.start();
kdDebug(13030)<<"calling m_script.processChar"<<endl;
if( !m_script.processChar( view, c , errorMsg ) )
@@ -2507,9 +2507,9 @@ void KateScriptIndent::processLine (KateDocCursor &line)
if (view)
{
- QString errorMsg;
+ TQString errorMsg;
- QTime t;
+ TQTime t;
t.start();
kdDebug(13030)<<"calling m_script.processLine"<<endl;
if( !m_script.processLine( view, line , errorMsg ) )
@@ -2522,11 +2522,11 @@ void KateScriptIndent::processLine (KateDocCursor &line)
//END KateScriptIndent
//BEGIN ScriptIndentConfigPage, THIS IS ONLY A TEST! :)
-#include <qlabel.h>
-ScriptIndentConfigPage::ScriptIndentConfigPage ( QWidget *parent, const char *name )
+#include <tqlabel.h>
+ScriptIndentConfigPage::ScriptIndentConfigPage ( TQWidget *parent, const char *name )
: IndenterConfigPage(parent, name)
{
- QLabel* hello = new QLabel("Hello world! Dummy for testing purpose.", this);
+ TQLabel* hello = new TQLabel("Hello world! Dummy for testing purpose.", this);
hello->show();
}
diff --git a/kate/part/kateautoindent.h b/kate/part/kateautoindent.h
index 76ba14ee6..7ff1a93d2 100644
--- a/kate/part/kateautoindent.h
+++ b/kate/part/kateautoindent.h
@@ -21,7 +21,7 @@
#ifndef __KATE_AUTO_INDENT_H__
#define __KATE_AUTO_INDENT_H__
-#include <qobject.h>
+#include <tqobject.h>
#include "katecursor.h"
#include "kateconfig.h"
@@ -51,7 +51,7 @@ class IndenterConfigPage : public QWidget
* @param parent parent widget
* @param name name
*/
- IndenterConfigPage ( QWidget *parent=0, const char *name=0 ) : QWidget(parent, name) {}
+ IndenterConfigPage ( TQWidget *parent=0, const char *name=0 ) : TQWidget(parent, name) {}
virtual ~IndenterConfigPage () {}
public slots:
@@ -87,28 +87,28 @@ class KateAutoIndent : public QObject
* List all possible modes by name
* @return list of modes
*/
- static QStringList listModes ();
+ static TQStringList listModes ();
/**
* Return the mode name given the mode
* @param mode mode index
* @return name for this mode index
*/
- static QString modeName (uint mode);
+ static TQString modeName (uint mode);
/**
* Return the mode description
* @param mode mode index
* @return mode index
*/
- static QString modeDescription (uint mode);
+ static TQString modeDescription (uint mode);
/**
* Maps name -> index
* @param name mode name
* @return mode index
*/
- static uint modeNumber (const QString &name);
+ static uint modeNumber (const TQString &name);
/**
* Config page support
@@ -121,7 +121,7 @@ class KateAutoIndent : public QObject
* Support for a config page.
* @return config page or 0 if not available.
*/
- static IndenterConfigPage* configPage(QWidget *parent, uint mode);
+ static IndenterConfigPage* configPage(TQWidget *parent, uint mode);
public:
/**
@@ -160,7 +160,7 @@ class KateAutoIndent : public QObject
* Called every time a character is inserted into the document.
* @param c character inserted
*/
- virtual void processChar (QChar c) { Q_UNUSED(c); }
+ virtual void processChar (TQChar c) { Q_UNUSED(c); }
/**
* Aligns/indents the given line to the proper indent position.
@@ -197,7 +197,7 @@ class KateViewIndentationAction : public KActionMenu
Q_OBJECT
public:
- KateViewIndentationAction(KateDocument *_doc, const QString& text, QObject* parent = 0, const char* name = 0);
+ KateViewIndentationAction(KateDocument *_doc, const TQString& text, TQObject* parent = 0, const char* name = 0);
~KateViewIndentationAction(){;};
@@ -255,7 +255,7 @@ public:
* Called every time a character is inserted into the document.
* @param c character inserted
*/
- virtual void processChar (QChar c) { Q_UNUSED(c); }
+ virtual void processChar (TQChar c) { Q_UNUSED(c); }
/**
* Aligns/indents the given line to the proper indent position.
@@ -292,7 +292,7 @@ protected:
* @param pos Contains the position of the first @p open character in the line.
* @return True if @p open and @p close have an equal number of occurances between @p begin and @p end. False otherwise.
*/
- bool isBalanced (KateDocCursor &begin, const KateDocCursor &end, QChar open, QChar close, uint &pos) const;
+ bool isBalanced (KateDocCursor &begin, const KateDocCursor &end, TQChar open, TQChar close, uint &pos) const;
/**
* Skip all whitespace starting at @p cur and ending at @p max. Spans lines if @p newline is set.
@@ -316,9 +316,9 @@ protected:
* Produces a string with the proper indentation characters for its length.
*
* @param length The length of the indention in characters.
- * @return A QString representing @p length characters (factoring in tabs and spaces)
+ * @return A TQString representing @p length characters (factoring in tabs and spaces)
*/
- QString tabString(uint length) const;
+ TQString tabString(uint length) const;
uint tabWidth; //!< The number of characters simulated for a tab
uint indentWidth; //!< The number of characters used when tabs are replaced by spaces
@@ -354,7 +354,7 @@ class KateCSmartIndent : public KateNormalIndent
~KateCSmartIndent ();
virtual void processNewline (KateDocCursor &cur, bool needContinue);
- virtual void processChar (QChar c);
+ virtual void processChar (TQChar c);
virtual void processLine (KateDocCursor &line);
virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end);
@@ -390,11 +390,11 @@ class KatePythonIndent : public KateNormalIndent
private:
int calcExtra (int &prevBlock, int &pos, KateDocCursor &end);
- void traverseString( const QChar &stringChar, KateDocCursor &cur, KateDocCursor &end );
+ void traverseString( const TQChar &stringChar, KateDocCursor &cur, KateDocCursor &end );
- static QRegExp endWithColon;
- static QRegExp stopStmt;
- static QRegExp blockBegin;
+ static TQRegExp endWithColon;
+ static TQRegExp stopStmt;
+ static TQRegExp blockBegin;
};
class KateXmlIndent : public KateNormalIndent
@@ -407,7 +407,7 @@ class KateXmlIndent : public KateNormalIndent
virtual uint modeNumber () const { return KateDocumentConfig::imXmlStyle; }
virtual void processNewline (KateDocCursor &cur, bool needContinue);
- virtual void processChar (QChar c);
+ virtual void processChar (TQChar c);
virtual void processLine (KateDocCursor &line);
virtual bool canProcessLine() const { return true; }
virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end);
@@ -422,8 +422,8 @@ class KateXmlIndent : public KateNormalIndent
uint &attrCol, bool &unclosedTag);
// useful regular expressions
- static const QRegExp startsWithCloseTag;
- static const QRegExp unclosedDoctype;
+ static const TQRegExp startsWithCloseTag;
+ static const TQRegExp unclosedDoctype;
};
class KateCSAndSIndent : public KateNormalIndent
@@ -435,7 +435,7 @@ class KateCSAndSIndent : public KateNormalIndent
~KateCSAndSIndent ();
virtual void processNewline (KateDocCursor &begin, bool needContinue);
- virtual void processChar (QChar c);
+ virtual void processChar (TQChar c);
virtual void processLine (KateDocCursor &line);
virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end);
@@ -451,17 +451,17 @@ class KateCSAndSIndent : public KateNormalIndent
int lastNonCommentChar( const KateDocCursor &line );
bool startsWithLabel( int line );
bool inStatement( const KateDocCursor &begin );
- QString continuationIndent( const KateDocCursor &begin );
+ TQString continuationIndent( const KateDocCursor &begin );
- QString calcIndent (const KateDocCursor &begin);
- QString calcIndentAfterKeyword(const KateDocCursor &indentCursor, const KateDocCursor &keywordCursor, int keywordPos, bool blockKeyword);
- QString calcIndentInBracket(const KateDocCursor &indentCursor, const KateDocCursor &bracketCursor, int bracketPos);
- QString calcIndentInBrace(const KateDocCursor &indentCursor, const KateDocCursor &braceCursor, int bracePos);
+ TQString calcIndent (const KateDocCursor &begin);
+ TQString calcIndentAfterKeyword(const KateDocCursor &indentCursor, const KateDocCursor &keywordCursor, int keywordPos, bool blockKeyword);
+ TQString calcIndentInBracket(const KateDocCursor &indentCursor, const KateDocCursor &bracketCursor, int bracketPos);
+ TQString calcIndentInBrace(const KateDocCursor &indentCursor, const KateDocCursor &braceCursor, int bracePos);
bool handleDoxygen (KateDocCursor &begin);
- QString findOpeningCommentIndentation (const KateDocCursor &start);
+ TQString findOpeningCommentIndentation (const KateDocCursor &start);
- QString indentString;
+ TQString indentString;
};
/**
@@ -508,7 +508,7 @@ class KateVarIndent : public KateNormalIndent
virtual ~KateVarIndent();
virtual void processNewline (KateDocCursor &cur, bool needContinue);
- virtual void processChar (QChar c);
+ virtual void processChar (TQChar c);
virtual void processLine (KateDocCursor &line);
virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end);
@@ -518,7 +518,7 @@ class KateVarIndent : public KateNormalIndent
virtual uint modeNumber () const { return KateDocumentConfig::imVarIndent; };
private slots:
- void slotVariableChanged(const QString&, const QString&);
+ void slotVariableChanged(const TQString&, const TQString&);
private:
/**
@@ -529,7 +529,7 @@ class KateVarIndent : public KateNormalIndent
* @param attrib the attribute the characters must have, defaults to
* KateAutoIndent::symbolAttrib
*/
- int coupleBalance( int line, const QChar &open, const QChar &close ) const;
+ int coupleBalance( int line, const TQChar &open, const TQChar &close ) const;
/**
* @return true if there is a matching opening with the correct attribute
@@ -549,7 +549,7 @@ class KateScriptIndent : public KateNormalIndent
~KateScriptIndent();
virtual void processNewline( KateDocCursor &cur, bool needContinue );
- virtual void processChar( QChar c );
+ virtual void processChar( TQChar c );
virtual void processLine (KateDocCursor &line);
// virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end);
@@ -566,7 +566,7 @@ class ScriptIndentConfigPage : public IndenterConfigPage
Q_OBJECT
public:
- ScriptIndentConfigPage ( QWidget *parent=0, const char *name=0 );
+ ScriptIndentConfigPage ( TQWidget *parent=0, const char *name=0 );
virtual ~ScriptIndentConfigPage ();
public slots:
diff --git a/kate/part/katebookmarks.cpp b/kate/part/katebookmarks.cpp
index f92fb4282..ac1ee73d9 100644
--- a/kate/part/katebookmarks.cpp
+++ b/kate/part/katebookmarks.cpp
@@ -30,18 +30,18 @@
#include <kxmlguiclient.h>
#include <kxmlguifactory.h>
-#include <qregexp.h>
-#include <qmemarray.h>
-#include <qevent.h>
+#include <tqregexp.h>
+#include <tqmemarray.h>
+#include <tqevent.h>
/**
Utility: selection sort
- sort a QMemArray<uint> in ascending order.
+ sort a TQMemArray<uint> in ascending order.
max it the largest (zerobased) index to sort.
To sort the entire array: ssort( *array, array.size() -1 );
This is only efficient if ran only once.
*/
-static void ssort( QMemArray<uint> &a, int max )
+static void ssort( TQMemArray<uint> &a, int max )
{
uint tmp, j, maxpos;
for ( uint h = max; h >= 1; h-- )
@@ -58,11 +58,11 @@ static void ssort( QMemArray<uint> &a, int max )
// TODO add a insort() or bubble_sort - more efficient for aboutToShow() ?
KateBookmarks::KateBookmarks( KateView* view, Sorting sort )
- : QObject( view, "kate bookmarks" )
+ : TQObject( view, "kate bookmarks" )
, m_view( view )
, m_sorting( sort )
{
- connect (view->getDoc(), SIGNAL(marksChanged()), this, SLOT(marksChanged()));
+ connect (view->getDoc(), TQT_SIGNAL(marksChanged()), this, TQT_SLOT(marksChanged()));
_tries=0;
m_bookmarksMenu = 0L;
}
@@ -75,26 +75,26 @@ void KateBookmarks::createActions( KActionCollection* ac )
{
m_bookmarkToggle = new KToggleAction(
i18n("Set &Bookmark"), "bookmark", CTRL+Key_B,
- this, SLOT(toggleBookmark()),
+ this, TQT_SLOT(toggleBookmark()),
ac, "bookmarks_toggle" );
m_bookmarkToggle->setWhatsThis(i18n("If a line has no bookmark then add one, otherwise remove it."));
m_bookmarkToggle->setCheckedState( i18n("Clear &Bookmark") );
m_bookmarkClear = new KAction(
i18n("Clear &All Bookmarks"), 0,
- this, SLOT(clearBookmarks()),
+ this, TQT_SLOT(clearBookmarks()),
ac, "bookmarks_clear");
m_bookmarkClear->setWhatsThis(i18n("Remove all bookmarks of the current document."));
m_goNext = new KAction(
i18n("Next Bookmark"), "next", ALT + Key_PageDown,
- this, SLOT(goNext()),
+ this, TQT_SLOT(goNext()),
ac, "bookmarks_next");
m_goNext->setWhatsThis(i18n("Go to the next bookmark."));
m_goPrevious = new KAction(
i18n("Previous Bookmark"), "previous", ALT + Key_PageUp,
- this, SLOT(goPrevious()),
+ this, TQT_SLOT(goPrevious()),
ac, "bookmarks_previous");
m_goPrevious->setWhatsThis(i18n("Go to the previous bookmark."));
@@ -102,14 +102,14 @@ void KateBookmarks::createActions( KActionCollection* ac )
//connect the aboutToShow() and aboutToHide() signals with
//the bookmarkMenuAboutToShow() and bookmarkMenuAboutToHide() slots
- connect( m_bookmarksMenu, SIGNAL(aboutToShow()), this, SLOT(bookmarkMenuAboutToShow()));
- connect( m_bookmarksMenu, SIGNAL(aboutToHide()), this, SLOT(bookmarkMenuAboutToHide()) );
+ connect( m_bookmarksMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(bookmarkMenuAboutToShow()));
+ connect( m_bookmarksMenu, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(bookmarkMenuAboutToHide()) );
marksChanged ();
bookmarkMenuAboutToHide();
- connect( m_view, SIGNAL( gotFocus( Kate::View * ) ), this, SLOT( slotViewGotFocus( Kate::View * ) ) );
- connect( m_view, SIGNAL( lostFocus( Kate::View * ) ), this, SLOT( slotViewLostFocus( Kate::View * ) ) );
+ connect( m_view, TQT_SIGNAL( gotFocus( Kate::View * ) ), this, TQT_SLOT( slotViewGotFocus( Kate::View * ) ) );
+ connect( m_view, TQT_SIGNAL( lostFocus( Kate::View * ) ), this, TQT_SLOT( slotViewLostFocus( Kate::View * ) ) );
}
void KateBookmarks::toggleBookmark ()
@@ -126,7 +126,7 @@ void KateBookmarks::toggleBookmark ()
void KateBookmarks::clearBookmarks ()
{
- QPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
+ TQPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
for (uint i=0; i < m.count(); i++)
m_view->getDoc()->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType01 );
@@ -146,18 +146,18 @@ void KateBookmarks::slotViewLostFocus( Kate::View *v )
m_bookmarksMenu->clear();
}
-void KateBookmarks::insertBookmarks( QPopupMenu& menu )
+void KateBookmarks::insertBookmarks( TQPopupMenu& menu )
{
uint line = m_view->cursorLine();
- const QRegExp re("&(?!&)");
+ const TQRegExp re("&(?!&)");
int idx( -1 );
int old_menu_count = menu.count();
KTextEditor::Mark *next = 0;
KTextEditor::Mark *prev = 0;
- QPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
- QMemArray<uint> sortArray( m.count() );
- QPtrListIterator<KTextEditor::Mark> it( m );
+ TQPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
+ TQMemArray<uint> sortArray( m.count() );
+ TQPtrListIterator<KTextEditor::Mark> it( m );
if ( it.count() > 0 )
menu.insertSeparator();
@@ -166,7 +166,7 @@ void KateBookmarks::insertBookmarks( QPopupMenu& menu )
{
if( (*it)->type & KTextEditor::MarkInterface::markType01 )
{
- QString bText = KStringHandler::rEmSqueeze
+ TQString bText = KStringHandler::rEmSqueeze
( m_view->getDoc()->textLine( (*it)->line ),
menu.fontMetrics(), 32 );
bText.replace(re, "&&"); // kill undesired accellerators!
@@ -180,8 +180,8 @@ void KateBookmarks::insertBookmarks( QPopupMenu& menu )
}
menu.insertItem(
- QString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
- m_view, SLOT(gotoLineNumber(int)), 0, (*it)->line, idx );
+ TQString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
+ m_view, TQT_SLOT(gotoLineNumber(int)), 0, (*it)->line, idx );
if ( (*it)->line < line )
{
@@ -220,7 +220,7 @@ void KateBookmarks::insertBookmarks( QPopupMenu& menu )
void KateBookmarks::bookmarkMenuAboutToShow()
{
- QPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
+ TQPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
m_bookmarksMenu->clear();
m_bookmarkToggle->setChecked( m_view->getDoc()->mark( m_view->cursorLine() )
@@ -247,7 +247,7 @@ void KateBookmarks::bookmarkMenuAboutToHide()
void KateBookmarks::goNext()
{
- QPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
+ TQPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
if (m.isEmpty())
return;
@@ -264,7 +264,7 @@ void KateBookmarks::goNext()
void KateBookmarks::goPrevious()
{
- QPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
+ TQPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
if (m.isEmpty())
return;
diff --git a/kate/part/katebookmarks.h b/kate/part/katebookmarks.h
index 0d72c0ccc..574bb44ad 100644
--- a/kate/part/katebookmarks.h
+++ b/kate/part/katebookmarks.h
@@ -20,8 +20,8 @@
#ifndef __KATE_BOOKMARKS_H__
#define __KATE_BOOKMARKS_H__
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
class KateView;
@@ -50,7 +50,7 @@ class KateBookmarks : public QObject
void setSorting( Sorting s ) { m_sorting = s; };
protected:
- void insertBookmarks( QPopupMenu& menu);
+ void insertBookmarks( TQPopupMenu& menu);
private slots:
void toggleBookmark();
@@ -75,7 +75,7 @@ class KateBookmarks : public QObject
KAction* m_goPrevious;
Sorting m_sorting;
- QPopupMenu* m_bookmarksMenu;
+ TQPopupMenu* m_bookmarksMenu;
uint _tries;
};
diff --git a/kate/part/katebuffer.cpp b/kate/part/katebuffer.cpp
index 06c919f96..74a9ba59e 100644
--- a/kate/part/katebuffer.cpp
+++ b/kate/part/katebuffer.cpp
@@ -34,13 +34,13 @@
#include <kglobal.h>
#include <kcharsets.h>
-#include <qpopupmenu.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
-#include <qcstring.h>
-#include <qdatetime.h>
+#include <tqpopupmenu.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
/**
* loader block size, load 256 kb at once per default
@@ -84,7 +84,7 @@ void KateBuffer::setMaxLoadedBlocks (uint count)
class KateFileLoader
{
public:
- KateFileLoader (const QString &filename, QTextCodec *codec, bool removeTrailingSpaces)
+ KateFileLoader (const TQString &filename, TQTextCodec *codec, bool removeTrailingSpaces)
: m_file (filename)
, m_buffer (kMin (m_file.size(), KATE_FILE_LOADER_BS))
, m_codec (codec)
@@ -95,7 +95,7 @@ class KateFileLoader
, lastWasEndOfLine (true) // at start of file, we had a virtual newline
, lastWasR (false) // we have not found a \r as last char
, m_eol (-1) // no eol type detected atm
- , m_twoByteEncoding (QString(codec->name()) == "ISO-10646-UCS-2")
+ , m_twoByteEncoding (TQString(codec->name()) == "ISO-10646-UCS-2")
, m_binary (false)
, m_removeTrailingSpaces (removeTrailingSpaces)
{
@@ -173,7 +173,7 @@ class KateFileLoader
inline bool removeTrailingSpaces () const { return m_removeTrailingSpaces; }
// internal unicode data array
- inline const QChar *unicode () const { return m_text.unicode(); }
+ inline const TQChar *unicode () const { return m_text.unicode(); }
// read a line, return length + offset in unicode data
void readLine (uint &offset, uint &length)
@@ -195,7 +195,7 @@ class KateFileLoader
{
processNull (c);
- QString str (m_decoder->toUnicode (m_buffer, c));
+ TQString str (m_decoder->toUnicode (m_buffer, c));
readString = str.length();
m_text = m_text.mid (m_lastLineStart, m_position-m_lastLineStart)
@@ -301,11 +301,11 @@ class KateFileLoader
}
private:
- QFile m_file;
- QByteArray m_buffer;
- QTextCodec *m_codec;
- QTextDecoder *m_decoder;
- QString m_text;
+ TQFile m_file;
+ TQByteArray m_buffer;
+ TQTextCodec *m_codec;
+ TQTextDecoder *m_decoder;
+ TQString m_text;
uint m_position;
uint m_lastLineStart;
bool m_eof;
@@ -321,7 +321,7 @@ class KateFileLoader
* Create an empty buffer. (with one block with one empty line)
*/
KateBuffer::KateBuffer(KateDocument *doc)
- : QObject (doc),
+ : TQObject (doc),
editSessionNumber (0),
editIsRunning (false),
editTagLineStart (0xffffffff),
@@ -455,13 +455,13 @@ void KateBuffer::clear()
m_lineHighlighted = 0;
}
-bool KateBuffer::openFile (const QString &m_file)
+bool KateBuffer::openFile (const TQString &m_file)
{
KateFileLoader file (m_file, m_doc->config()->codec(), m_doc->configFlags() & KateDocument::cfRemoveSpaces);
bool ok = false;
struct stat sbuf;
- if (stat(QFile::encodeName(m_file), &sbuf) == 0)
+ if (stat(TQFile::encodeName(m_file), &sbuf) == 0)
{
if (S_ISREG(sbuf.st_mode) && file.open())
ok = true;
@@ -539,12 +539,12 @@ bool KateBuffer::openFile (const QString &m_file)
bool KateBuffer::canEncode ()
{
- QTextCodec *codec = m_doc->config()->codec();
+ TQTextCodec *codec = m_doc->config()->codec();
kdDebug(13020) << "ENC NAME: " << codec->name() << endl;
// hardcode some unicode encodings which can encode all chars
- if ((QString(codec->name()) == "UTF-8") || (QString(codec->name()) == "ISO-10646-UCS-2"))
+ if ((TQString(codec->name()) == "UTF-8") || (TQString(codec->name()) == "ISO-10646-UCS-2"))
return true;
for (uint i=0; i < m_lines; i++)
@@ -561,26 +561,26 @@ bool KateBuffer::canEncode ()
return true;
}
-bool KateBuffer::saveFile (const QString &m_file)
+bool KateBuffer::saveFile (const TQString &m_file)
{
- QFile file (m_file);
- QTextStream stream (&file);
+ TQFile file (m_file);
+ TQTextStream stream (&file);
if ( !file.open( IO_WriteOnly ) )
{
return false; // Error
}
- QTextCodec *codec = m_doc->config()->codec();
+ TQTextCodec *codec = m_doc->config()->codec();
// disable Unicode headers
- stream.setEncoding(QTextStream::RawUnicode);
+ stream.setEncoding(TQTextStream::RawUnicode);
// this line sets the mapper to the correct codec
stream.setCodec(codec);
// our loved eol string ;)
- QString eol = m_doc->config()->eolString ();
+ TQString eol = m_doc->config()->eolString ();
// should we strip spaces?
bool removeTrailingSpaces = m_doc->configFlags() & KateDocument::cfRemoveSpaces;
@@ -597,7 +597,7 @@ bool KateBuffer::saveFile (const QString &m_file)
if (lastChar > -1)
{
- stream << QConstString (textline->text(), lastChar+1).string();
+ stream << TQConstString (textline->text(), lastChar+1).string();
}
}
else // simple, dump the line
@@ -916,9 +916,9 @@ void KateBuffer::updatePreviousNotEmptyLine(KateBufBlock *blk,uint current_line,
textLine = blk->line(current_line);
} while (textLine->firstChar()==-1);
kdDebug(13020)<<"updatePreviousNotEmptyLine: updating line:"<<(blk->startLine()+current_line)<<endl;
- QMemArray<uint> foldingList=textLine->foldingListArray();
+ TQMemArray<uint> foldingList=textLine->foldingListArray();
while ( (foldingList.size()>0) && ( abs(foldingList[foldingList.size()-2])==1)) {
- foldingList.resize(foldingList.size()-2,QGArray::SpeedOptim);
+ foldingList.resize(foldingList.size()-2,TQGArray::SpeedOptim);
}
addIndentBasedFoldingInformation(foldingList,addindent,deindent);
textLine->setFoldingList(foldingList);
@@ -927,19 +927,19 @@ void KateBuffer::updatePreviousNotEmptyLine(KateBufBlock *blk,uint current_line,
emit tagLines (blk->startLine()+current_line, blk->startLine()+current_line);
}
-void KateBuffer::addIndentBasedFoldingInformation(QMemArray<uint> &foldingList,bool addindent,uint deindent)
+void KateBuffer::addIndentBasedFoldingInformation(TQMemArray<uint> &foldingList,bool addindent,uint deindent)
{
if (addindent) {
//kdDebug(13020)<<"adding indent for line :"<<current_line + buf->startLine()<<" textLine->noIndentBasedFoldingAtStart"<<textLine->noIndentBasedFoldingAtStart()<<endl;
kdDebug(13020)<<"adding ident"<<endl;
- foldingList.resize (foldingList.size() + 2, QGArray::SpeedOptim);
+ foldingList.resize (foldingList.size() + 2, TQGArray::SpeedOptim);
foldingList[foldingList.size()-2] = 1;
foldingList[foldingList.size()-1] = 0;
}
kdDebug(13020)<<"DEINDENT: "<<deindent<<endl;
if (deindent > 0)
{
- foldingList.resize (foldingList.size() + (deindent*2), QGArray::SpeedOptim);
+ foldingList.resize (foldingList.size() + (deindent*2), TQGArray::SpeedOptim);
for (uint z= foldingList.size()-(deindent*2); z < foldingList.size(); z=z+2)
{
@@ -965,7 +965,7 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b
if (startLine >= (buf->startLine()+buf->lines()))
return false;
- //QTime t;
+ //TQTime t;
//t.start();
//kdDebug (13020) << "HIGHLIGHTED START --- NEED HL, LINESTART: " << startLine << " LINEEND: " << endLine << endl;
//kdDebug (13020) << "HL UNTIL LINE: " << m_lineHighlighted << " MAX: " << m_lineHighlightedMax << endl;
@@ -1041,7 +1041,7 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b
// current line
KateTextLine::Ptr textLine = buf->line(current_line);
- QMemArray<uint> foldingList;
+ TQMemArray<uint> foldingList;
bool ctxChanged = false;
m_highlight->doHighlight (prevLine, textLine, &foldingList, &ctxChanged);
@@ -1053,14 +1053,14 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b
if (m_highlight->foldingIndentationSensitive())
{
// get the indentation array of the previous line to start with !
- QMemArray<unsigned short> indentDepth;
+ TQMemArray<unsigned short> indentDepth;
indentDepth.duplicate (prevLine->indentationDepthArray());
// current indentation of this line
uint iDepth = textLine->indentDepth(m_tabWidth);
if ((current_line+buf->startLine())==0)
{
- indentDepth.resize (1, QGArray::SpeedOptim);
+ indentDepth.resize (1, TQGArray::SpeedOptim);
indentDepth[0] = iDepth;
}
@@ -1121,18 +1121,18 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b
if ((iDepth > 0) && (indentDepth.isEmpty() || (indentDepth[indentDepth.size()-1] < iDepth)))
{
kdDebug(13020)<<"adding depth to \"stack\":"<<iDepth<<endl;
- indentDepth.resize (indentDepth.size()+1, QGArray::SpeedOptim);
+ indentDepth.resize (indentDepth.size()+1, TQGArray::SpeedOptim);
indentDepth[indentDepth.size()-1] = iDepth;
} else {
if (!indentDepth.isEmpty())
{
for (int z=indentDepth.size()-1; z > -1; z--)
if (indentDepth[z]>iDepth)
- indentDepth.resize(z, QGArray::SpeedOptim);
+ indentDepth.resize(z, TQGArray::SpeedOptim);
if ((iDepth > 0) && (indentDepth.isEmpty() || (indentDepth[indentDepth.size()-1] < iDepth)))
{
kdDebug(13020)<<"adding depth to \"stack\":"<<iDepth<<endl;
- indentDepth.resize (indentDepth.size()+1, QGArray::SpeedOptim);
+ indentDepth.resize (indentDepth.size()+1, TQGArray::SpeedOptim);
indentDepth[indentDepth.size()-1] = iDepth;
if (prevLine->firstChar()==-1) {
@@ -1196,8 +1196,8 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b
if (foldingList.size()!=textLine->foldingListArray().size()) {
foldingChanged=true;
} else {
- QMemArray<uint>::ConstIterator it=foldingList.begin();
- QMemArray<uint>::ConstIterator it1=textLine->foldingListArray();
+ TQMemArray<uint>::ConstIterator it=foldingList.begin();
+ TQMemArray<uint>::ConstIterator it1=textLine->foldingListArray();
bool markerType=true;
for(;it!=foldingList.end();++it,++it1) {
if (markerType) {
@@ -1263,7 +1263,7 @@ void KateBuffer::codeFoldingColumnUpdate(unsigned int lineNr) {
if (line->foldingColumnsOutdated()) {
line->setFoldingColumnsOutdated(false);
bool tmp;
- QMemArray<uint> folding=line->foldingListArray();
+ TQMemArray<uint> folding=line->foldingListArray();
m_regionTree.updateLine(lineNr,&folding,&tmp,true,false);
}
}
@@ -1340,11 +1340,11 @@ void KateBufBlock::fillBlock (KateFileLoader *stream)
// is allready too much stuff around in mem ?
bool swap = m_parent->m_loadedBlocks.count() >= KateBuffer::maxLoadedBlocks();
- QByteArray rawData;
+ TQByteArray rawData;
// calcs the approx size for KATE_AVG_BLOCK_SIZE chars !
if (swap)
- rawData.resize ((KATE_AVG_BLOCK_SIZE * sizeof(QChar)) + ((KATE_AVG_BLOCK_SIZE/80) * 8));
+ rawData.resize ((KATE_AVG_BLOCK_SIZE * sizeof(TQChar)) + ((KATE_AVG_BLOCK_SIZE/80) * 8));
char *buf = rawData.data ();
uint size = 0;
@@ -1353,7 +1353,7 @@ void KateBufBlock::fillBlock (KateFileLoader *stream)
{
uint offset = 0, length = 0;
stream->readLine(offset, length);
- const QChar *unicodeData = stream->unicode () + offset;
+ const TQChar *unicodeData = stream->unicode () + offset;
// strip spaces at end of line
if ( stream->removeTrailingSpaces() )
@@ -1377,7 +1377,7 @@ void KateBufBlock::fillBlock (KateFileLoader *stream)
uint pos = size;
// calc new size
- size = size + 1 + sizeof(uint) + (sizeof(QChar)*length);
+ size = size + 1 + sizeof(uint) + (sizeof(TQChar)*length);
if (size > rawData.size ())
{
@@ -1391,8 +1391,8 @@ void KateBufBlock::fillBlock (KateFileLoader *stream)
memcpy(buf+pos, (char *) &length, sizeof(uint));
pos += sizeof(uint);
- memcpy(buf+pos, (char *) unicodeData, sizeof(QChar)*length);
- pos += sizeof(QChar)*length;
+ memcpy(buf+pos, (char *) unicodeData, sizeof(TQChar)*length);
+ pos += sizeof(TQChar)*length;
}
else
{
@@ -1501,7 +1501,7 @@ void KateBufBlock::swapIn ()
if (m_state != KateBufBlock::stateSwapped)
return;
- QByteArray rawData (m_vmblockSize);
+ TQByteArray rawData (m_vmblockSize);
// what to do if that fails ?
if (!KateFactory::self()->vm()->copyBlock(rawData.data(), m_vmblock, 0, rawData.size()))
@@ -1541,7 +1541,7 @@ void KateBufBlock::swapOut ()
for (uint i=0; i < m_lines; i++)
size += m_stringList[i]->dumpSize (haveHl);
- QByteArray rawData (size);
+ TQByteArray rawData (size);
char *buf = rawData.data();
// Dump textlines
diff --git a/kate/part/katebuffer.h b/kate/part/katebuffer.h
index 6b2d48ead..6c4216810 100644
--- a/kate/part/katebuffer.h
+++ b/kate/part/katebuffer.h
@@ -25,10 +25,10 @@
#include <kvmallocator.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qvaluevector.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqvaluevector.h>
class KateLineInfo;
class KateDocument;
@@ -202,7 +202,7 @@ class KateBufBlock
/**
* list of textlines
*/
- QValueVector<KateTextLine::Ptr> m_stringList;
+ TQValueVector<KateTextLine::Ptr> m_stringList;
/**
* parent buffer.
@@ -453,7 +453,7 @@ class KateBuffer : public QObject
* @param m_file filename to open
* @return success
*/
- bool openFile (const QString &m_file);
+ bool openFile (const TQString &m_file);
/**
* was the last loading broken because of not enough tmp disk space ?
@@ -479,7 +479,7 @@ class KateBuffer : public QObject
* @param m_file filename to save to
* @return success
*/
- bool saveFile (const QString &m_file);
+ bool saveFile (const TQString &m_file);
public:
/**
@@ -503,7 +503,7 @@ class KateBuffer : public QObject
*/
KateTextLine::Ptr line_internal (KateBufBlock *buf, uint i);
- inline void addIndentBasedFoldingInformation(QMemArray<uint> &foldingList,bool addindent,uint deindent);
+ inline void addIndentBasedFoldingInformation(TQMemArray<uint> &foldingList,bool addindent,uint deindent);
inline void updatePreviousNotEmptyLine(KateBufBlock *blk,uint current_line,bool addindent,uint deindent);
public:
/**
@@ -640,7 +640,7 @@ class KateBuffer : public QObject
* ALL blocks
* in order of linenumbers
*/
- QValueVector<KateBufBlock*> m_blocks;
+ TQValueVector<KateBufBlock*> m_blocks;
/**
* last block where the start/end line is in sync with real life
diff --git a/kate/part/katecmds.cpp b/kate/part/katecmds.cpp
index 17846dd7d..b64b5414e 100644
--- a/kate/part/katecmds.cpp
+++ b/kate/part/katecmds.cpp
@@ -36,7 +36,7 @@
#include <kurl.h>
#include <kshellcompletion.h>
-#include <qregexp.h>
+#include <tqregexp.h>
//BEGIN CoreCommands
@@ -50,7 +50,7 @@ static void setDocFlag( KateDocumentConfig::ConfigFlags flag, bool enable,
// this returns wheather the string s could be converted to
// a bool value, one of on|off|1|0|true|false. the argument val is
// set to the extracted value in case of success
-static bool getBoolArg( QString s, bool *val )
+static bool getBoolArg( TQString s, bool *val )
{
bool res( false );
s = s.lower();
@@ -69,9 +69,9 @@ static bool getBoolArg( QString s, bool *val )
return false;
}
-QStringList KateCommands::CoreCommands::cmds()
+TQStringList KateCommands::CoreCommands::cmds()
{
- QStringList l;
+ TQStringList l;
l << "indent" << "unindent" << "cleanindent"
<< "comment" << "uncomment" << "goto" << "kill-line"
<< "set-tab-width" << "set-replace-tabs" << "set-show-tabs"
@@ -87,8 +87,8 @@ QStringList KateCommands::CoreCommands::cmds()
}
bool KateCommands::CoreCommands::exec(Kate::View *view,
- const QString &_cmd,
- QString &errorMsg)
+ const TQString &_cmd,
+ TQString &errorMsg)
{
#define KCC_ERR(s) { errorMsg=s; return false; }
// cast it hardcore, we know that it is really a kateview :)
@@ -98,8 +98,8 @@ bool KateCommands::CoreCommands::exec(Kate::View *view,
KCC_ERR( i18n("Could not access view") );
//create a list of args
- QStringList args( QStringList::split( QRegExp("\\s+"), _cmd ) );
- QString cmd ( args.first() );
+ TQStringList args( TQStringList::split( TQRegExp("\\s+"), _cmd ) );
+ TQString cmd ( args.first() );
args.remove( args.first() );
// ALL commands that takes no arguments.
@@ -157,7 +157,7 @@ bool KateCommands::CoreCommands::exec(Kate::View *view,
}
else if ( cmd == "set-highlight" )
{
- QString val = _cmd.section( ' ', 1 ).lower();
+ TQString val = _cmd.section( ' ', 1 ).lower();
for ( uint i=0; i < v->doc()->hlModeCount(); i++ )
{
if ( v->doc()->hlModeName( i ).lower() == val )
@@ -279,12 +279,12 @@ bool KateCommands::CoreCommands::exec(Kate::View *view,
KCC_ERR( i18n("Unknown command '%1'").arg(cmd) );
}
-KCompletion *KateCommands::CoreCommands::completionObject( const QString &cmd, Kate::View *view )
+KCompletion *KateCommands::CoreCommands::completionObject( const TQString &cmd, Kate::View *view )
{
if ( cmd == "set-highlight" )
{
KateView *v = (KateView*)view;
- QStringList l;
+ TQStringList l;
for ( uint i = 0; i < v->doc()->hlModeCount(); i++ )
l << v->doc()->hlModeName( i );
@@ -298,7 +298,7 @@ KCompletion *KateCommands::CoreCommands::completionObject( const QString &cmd, K
//END CoreCommands
//BEGIN SedReplace
-static void replace(QString &s, const QString &needle, const QString &with)
+static void replace(TQString &s, const TQString &needle, const TQString &with)
{
int pos=0;
while (1)
@@ -311,7 +311,7 @@ static void replace(QString &s, const QString &needle, const QString &with)
}
-static int backslashString(const QString &haystack, const QString &needle, int index)
+static int backslashString(const TQString &haystack, const TQString &needle, int index)
{
int len=haystack.length();
int searchlen=needle.length();
@@ -339,7 +339,7 @@ static int backslashString(const QString &haystack, const QString &needle, int i
}
// exchange "\t" for the actual tab character, for example
-static void exchangeAbbrevs(QString &str)
+static void exchangeAbbrevs(TQString &str)
{
// the format is (findreplace)*[nullzero]
const char *magic="a\x07t\tn\n";
@@ -348,9 +348,9 @@ static void exchangeAbbrevs(QString &str)
{
int index=0;
char replace=magic[1];
- while ((index=backslashString(str, QChar(*magic), index))!=-1)
+ while ((index=backslashString(str, TQChar(*magic), index))!=-1)
{
- str.replace(index, 2, QChar(replace));
+ str.replace(index, 2, TQChar(replace));
index++;
}
magic++;
@@ -359,7 +359,7 @@ static void exchangeAbbrevs(QString &str)
}
int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
- const QString &find, const QString &repOld, const QString &delim,
+ const TQString &find, const TQString &repOld, const TQString &delim,
bool noCase, bool repeat,
uint startcol, int endcol )
{
@@ -376,7 +376,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
// * handle capatures by putting them in one list.
// * the existing insertion is fine, including the line calculation.
- QStringList patterns = QStringList::split( QRegExp("(^\\\\n|(?![^\\\\])\\\\n)"), find, true );
+ TQStringList patterns = TQStringList::split( TQRegExp("(^\\\\n|(?![^\\\\])\\\\n)"), find, true );
if ( patterns.count() > 1 )
{
@@ -391,7 +391,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
}
}
- QRegExp matcher(patterns[0], noCase);
+ TQRegExp matcher(patterns[0], noCase);
uint len;
int matches = 0;
@@ -405,19 +405,19 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
matches++;
- QString rep=repOld;
+ TQString rep=repOld;
// now set the backreferences in the replacement
- QStringList backrefs=matcher.capturedTexts();
+ TQStringList backrefs=matcher.capturedTexts();
int refnum=1;
- QStringList::Iterator i = backrefs.begin();
+ TQStringList::Iterator i = backrefs.begin();
++i;
for (; i!=backrefs.end(); ++i)
{
// I need to match "\\" or "", but not "\"
- QString number=QString::number(refnum);
+ TQString number=TQString::number(refnum);
int index=0;
while (index!=-1)
@@ -468,11 +468,11 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
return matches;
}
-bool KateCommands::SedReplace::exec (Kate::View *view, const QString &cmd, QString &msg)
+bool KateCommands::SedReplace::exec (Kate::View *view, const TQString &cmd, TQString &msg)
{
kdDebug(13025)<<"SedReplace::execCmd( "<<cmd<<" )"<<endl;
- QRegExp delim("^[$%]?s\\s*([^\\w\\s])");
+ TQRegExp delim("^[$%]?s\\s*([^\\w\\s])");
if ( delim.search( cmd ) < 0 ) return false;
bool fullFile=cmd[0]=='%';
@@ -480,16 +480,16 @@ bool KateCommands::SedReplace::exec (Kate::View *view, const QString &cmd, QStri
bool repeat=cmd[cmd.length()-1]=='g' || cmd[cmd.length()-2]=='g';
bool onlySelect=cmd[0]=='$';
- QString d = delim.cap(1);
+ TQString d = delim.cap(1);
kdDebug(13025)<<"SedReplace: delimiter is '"<<d<<"'"<<endl;
- QRegExp splitter( QString("^[$%]?s\\s*") + d + "((?:[^\\\\\\" + d + "]|\\\\.)*)\\" + d +"((?:[^\\\\\\" + d + "]|\\\\.)*)\\" + d + "[ig]{0,2}$" );
+ TQRegExp splitter( TQString("^[$%]?s\\s*") + d + "((?:[^\\\\\\" + d + "]|\\\\.)*)\\" + d +"((?:[^\\\\\\" + d + "]|\\\\.)*)\\" + d + "[ig]{0,2}$" );
if (splitter.search(cmd)<0) return false;
- QString find=splitter.cap(1);
+ TQString find=splitter.cap(1);
kdDebug(13025)<< "SedReplace: find=" << find.latin1() <<endl;
- QString replace=splitter.cap(2);
+ TQString replace=splitter.cap(2);
exchangeAbbrevs(replace);
kdDebug(13025)<< "SedReplace: replace=" << replace.latin1() <<endl;
@@ -546,12 +546,12 @@ bool KateCommands::SedReplace::exec (Kate::View *view, const QString &cmd, QStri
//END SedReplace
//BEGIN Character
-bool KateCommands::Character::exec (Kate::View *view, const QString &_cmd, QString &)
+bool KateCommands::Character::exec (Kate::View *view, const TQString &_cmd, TQString &)
{
- QString cmd = _cmd;
+ TQString cmd = _cmd;
// hex, octal, base 9+1
- QRegExp num("^char *(0?x[0-9A-Fa-f]{1,4}|0[0-7]{1,6}|[0-9]{1,3})$");
+ TQRegExp num("^char *(0?x[0-9A-Fa-f]{1,4}|0[0-7]{1,6}|[0-9]{1,3})$");
if (num.search(cmd)==-1) return false;
cmd=num.cap(1);
@@ -562,7 +562,7 @@ bool KateCommands::Character::exec (Kate::View *view, const QString &_cmd, QStri
int base=10;
if (cmd[0]=='x' || cmd.left(2)=="0x")
{
- cmd.replace(QRegExp("^0?x"), "");
+ cmd.replace(TQRegExp("^0?x"), "");
base=16;
}
else if (cmd[0]=='0')
@@ -575,12 +575,12 @@ bool KateCommands::Character::exec (Kate::View *view, const QString &_cmd, QStri
char buf[2];
buf[0]=(char)number;
buf[1]=0;
- view->insertText(QString(buf));
+ view->insertText(TQString(buf));
}
else
{ // do the unicode thing
- QChar c(number);
- view->insertText(QString(&c, 1));
+ TQChar c(number);
+ view->insertText(TQString(&c, 1));
}
return true;
@@ -588,15 +588,15 @@ bool KateCommands::Character::exec (Kate::View *view, const QString &_cmd, QStri
//END Character
//BEGIN Date
-bool KateCommands::Date::exec (Kate::View *view, const QString &cmd, QString &)
+bool KateCommands::Date::exec (Kate::View *view, const TQString &cmd, TQString &)
{
if (cmd.left(4) != "date")
return false;
- if (QDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)).length() > 0)
- view->insertText(QDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)));
+ if (TQDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)).length() > 0)
+ view->insertText(TQDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)));
else
- view->insertText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
+ view->insertText(TQDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
return true;
}
diff --git a/kate/part/katecmds.h b/kate/part/katecmds.h
index 84f7919d8..55c8d807b 100644
--- a/kate/part/katecmds.h
+++ b/kate/part/katecmds.h
@@ -46,20 +46,20 @@ class CoreCommands : public Kate::Command, public Kate::CommandExtension
* @param errorMsg error to return if no success
* @return success
*/
- bool exec( class Kate::View *view, const QString &cmd, QString &errorMsg );
+ bool exec( class Kate::View *view, const TQString &cmd, TQString &errorMsg );
- bool help( class Kate::View *, const QString &, QString & ) {return false;};
+ bool help( class Kate::View *, const TQString &, TQString & ) {return false;};
/**
* supported commands as prefixes
* @return prefix list
*/
- QStringList cmds();
+ TQStringList cmds();
/**
* override completionObject from interfaces/document.h .
*/
- KCompletion *completionObject( const QString &cmd, Kate::View *view );
+ KCompletion *completionObject( const TQString &cmd, Kate::View *view );
};
/**
@@ -82,15 +82,15 @@ class SedReplace : public Kate::Command
* @param errorMsg error to return if no success
* @return success
*/
- bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
+ bool exec (class Kate::View *view, const TQString &cmd, TQString &errorMsg);
- bool help (class Kate::View *, const QString &, QString &) { return false; };
+ bool help (class Kate::View *, const TQString &, TQString &) { return false; };
/**
* supported commands as prefixes
* @return prefix list
*/
- QStringList cmds () { QStringList l("s"); l << "%s" << "$s"; return l; };
+ TQStringList cmds () { TQStringList l("s"); l << "%s" << "$s"; return l; };
private:
/**
@@ -113,7 +113,7 @@ class SedReplace : public Kate::Command
* If it is -1, the whole line is used.
*/
static int sedMagic(KateDocument *doc, int &line,
- const QString &find, const QString &replace, const QString &delim,
+ const TQString &find, const TQString &replace, const TQString &delim,
bool noCase, bool repeat,
uint startcol=0, int endcol=-1);
};
@@ -136,15 +136,15 @@ class Character : public Kate::Command
* @param errorMsg error to return if no success
* @return success
*/
- bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
+ bool exec (class Kate::View *view, const TQString &cmd, TQString &errorMsg);
- bool help (class Kate::View *, const QString &, QString &) { return false; };
+ bool help (class Kate::View *, const TQString &, TQString &) { return false; };
/**
* supported commands as prefixes
* @return prefix list
*/
- QStringList cmds () { return QStringList("char"); };
+ TQStringList cmds () { return TQStringList("char"); };
};
/**
@@ -160,15 +160,15 @@ class Date : public Kate::Command
* @param errorMsg error to return if no success
* @return success
*/
- bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
+ bool exec (class Kate::View *view, const TQString &cmd, TQString &errorMsg);
- bool help (class Kate::View *, const QString &, QString &) { return false; };
+ bool help (class Kate::View *, const TQString &, TQString &) { return false; };
/**
* supported commands as prefixes
* @return prefix list
*/
- QStringList cmds () { return QStringList("date"); };
+ TQStringList cmds () { return TQStringList("date"); };
};
diff --git a/kate/part/katecodecompletion.cpp b/kate/part/katecodecompletion.cpp
index bbc34dfca..cee99f9d4 100644
--- a/kate/part/katecodecompletion.cpp
+++ b/kate/part/katecodecompletion.cpp
@@ -34,16 +34,16 @@
#include <kdebug.h>
-#include <qwhatsthis.h>
-#include <qvbox.h>
-#include <qlistbox.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qsizegrip.h>
-#include <qfontmetrics.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqwhatsthis.h>
+#include <tqvbox.h>
+#include <tqlistbox.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqsizegrip.h>
+#include <tqfontmetrics.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
/**
* This class is used as the codecompletion listbox. It can be resized according to its contents,
@@ -57,11 +57,11 @@ class KateCCListBox : public QListBox
/**
@short Create a new CCListBox
*/
- KateCCListBox (QWidget* parent = 0, const char* name = 0, WFlags f = 0):QListBox(parent, name, f)
+ KateCCListBox (TQWidget* parent = 0, const char* name = 0, WFlags f = 0):TQListBox(parent, name, f)
{
}
- QSize sizeHint() const
+ TQSize sizeHint() const
{
int count = this->count();
int height = 20;
@@ -80,12 +80,12 @@ class KateCCListBox : public QListBox
if ( (tmpcount = fontMetrics().width(text(i)) ) > maxcount)
maxcount = tmpcount;
- if (maxcount > QApplication::desktop()->width()){
- tmpwidth = QApplication::desktop()->width() - 5;
+ if (maxcount > TQApplication::desktop()->width()){
+ tmpwidth = TQApplication::desktop()->width() - 5;
height += horizontalScrollBar()->height();
} else
tmpwidth += maxcount;
- return QSize(tmpwidth,height);
+ return TQSize(tmpwidth,height);
}
};
@@ -93,8 +93,8 @@ class KateCCListBox : public QListBox
class KateCompletionItem : public QListBoxText
{
public:
- KateCompletionItem( QListBox* lb, KTextEditor::CompletionEntry entry )
- : QListBoxText( lb )
+ KateCompletionItem( TQListBox* lb, KTextEditor::CompletionEntry entry )
+ : TQListBoxText( lb )
, m_entry( entry )
{
if( entry.postfix == "()" ) { // should be configurable
@@ -109,31 +109,31 @@ class KateCompletionItem : public QListBoxText
KateCodeCompletion::KateCodeCompletion( KateView* view )
- : QObject( view, "Kate Code Completion" )
+ : TQObject( view, "Kate Code Completion" )
, m_view( view )
, m_commentLabel( 0 )
{
- m_completionPopup = new QVBox( 0, 0, WType_Popup );
- m_completionPopup->setFrameStyle( QFrame::Box | QFrame::Plain );
+ m_completionPopup = new TQVBox( 0, 0, WType_Popup );
+ m_completionPopup->setFrameStyle( TQFrame::Box | TQFrame::Plain );
m_completionPopup->setLineWidth( 1 );
m_completionListBox = new KateCCListBox( m_completionPopup );
- m_completionListBox->setFrameStyle( QFrame::NoFrame );
- //m_completionListBox->setCornerWidget( new QSizeGrip( m_completionListBox) );
+ m_completionListBox->setFrameStyle( TQFrame::NoFrame );
+ //m_completionListBox->setCornerWidget( new TQSizeGrip( m_completionListBox) );
m_completionListBox->setFocusProxy( m_view->m_viewInternal );
m_completionListBox->installEventFilter( this );
- m_completionPopup->resize(m_completionListBox->sizeHint() + QSize(2,2));
+ m_completionPopup->resize(m_completionListBox->sizeHint() + TQSize(2,2));
m_completionPopup->installEventFilter( this );
m_completionPopup->setFocusProxy( m_view->m_viewInternal );
m_pArgHint = new KateArgHint( m_view );
- connect( m_pArgHint, SIGNAL(argHintHidden()),
- this, SIGNAL(argHintHidden()) );
+ connect( m_pArgHint, TQT_SIGNAL(argHintHidden()),
+ this, TQT_SIGNAL(argHintHidden()) );
- connect( m_view, SIGNAL(cursorPositionChanged()),
- this, SLOT(slotCursorPosChanged()) );
+ connect( m_view, TQT_SIGNAL(cursorPositionChanged()),
+ this, TQT_SLOT(slotCursorPosChanged()) );
}
KateCodeCompletion::~KateCodeCompletion()
@@ -146,7 +146,7 @@ bool KateCodeCompletion::codeCompletionVisible () {
}
void KateCodeCompletion::showCompletionBox(
- QValueList<KTextEditor::CompletionEntry> complList, int offset, bool casesensitive )
+ TQValueList<KTextEditor::CompletionEntry> complList, int offset, bool casesensitive )
{
kdDebug(13035) << "showCompletionBox " << endl;
@@ -161,14 +161,14 @@ void KateCodeCompletion::showCompletionBox(
updateBox( true );
}
-bool KateCodeCompletion::eventFilter( QObject *o, QEvent *e )
+bool KateCodeCompletion::eventFilter( TQObject *o, TQEvent *e )
{
if ( o != m_completionPopup &&
o != m_completionListBox &&
o != m_completionListBox->viewport() )
return false;
- if( e->type() == QEvent::Hide )
+ if( e->type() == TQEvent::Hide )
{
//don't use abortCompletion() as aborting here again will send abort signal
//even on successfull completion we will emit completionAborted() twice...
@@ -179,20 +179,20 @@ bool KateCodeCompletion::eventFilter( QObject *o, QEvent *e )
}
- if ( e->type() == QEvent::MouseButtonDblClick ) {
+ if ( e->type() == TQEvent::MouseButtonDblClick ) {
doComplete();
return false;
}
- if ( e->type() == QEvent::MouseButtonPress ) {
- QTimer::singleShot(0, this, SLOT(showComment()));
+ if ( e->type() == TQEvent::MouseButtonPress ) {
+ TQTimer::singleShot(0, this, TQT_SLOT(showComment()));
return false;
}
return false;
}
-void KateCodeCompletion::handleKey (QKeyEvent *e)
+void KateCodeCompletion::handleKey (TQKeyEvent *e)
{
// close completion if you move out of range
if ((e->key() == Key_Up) && (m_completionListBox->currentItem() == 0))
@@ -207,8 +207,8 @@ void KateCodeCompletion::handleKey (QKeyEvent *e)
(e->key() == Key_Home ) || (e->key() == Key_End) ||
(e->key() == Key_Prior) || (e->key() == Key_Next ))
{
- QTimer::singleShot(0,this,SLOT(showComment()));
- QApplication::sendEvent( m_completionListBox, (QEvent*)e );
+ TQTimer::singleShot(0,this,TQT_SLOT(showComment()));
+ TQApplication::sendEvent( m_completionListBox, (TQEvent*)e );
return;
}
@@ -224,11 +224,11 @@ void KateCodeCompletion::doComplete()
if( item == 0 )
return;
- QString text = item->m_entry.text;
- QString currentLine = m_view->currentTextLine();
+ TQString text = item->m_entry.text;
+ TQString currentLine = m_view->currentTextLine();
int len = m_view->cursorColumnReal() - m_colCursor;
- QString currentComplText = currentLine.mid(m_colCursor,len);
- QString add = text.mid(currentComplText.length());
+ TQString currentComplText = currentLine.mid(m_colCursor,len);
+ TQString add = text.mid(currentComplText.length());
if( item->m_entry.postfix == "()" )
add += "(";
@@ -269,9 +269,9 @@ void KateCodeCompletion::updateBox( bool )
m_completionListBox->clear();
- QString currentLine = m_view->currentTextLine();
+ TQString currentLine = m_view->currentTextLine();
int len = m_view->cursorColumnReal() - m_colCursor;
- QString currentComplText = currentLine.mid(m_colCursor,len);
+ TQString currentComplText = currentLine.mid(m_colCursor,len);
/* No-one really badly wants those, or?
kdDebug(13035) << "Column: " << m_colCursor << endl;
kdDebug(13035) << "Line: " << currentLine << endl;
@@ -280,7 +280,7 @@ void KateCodeCompletion::updateBox( bool )
kdDebug(13035) << "Text: '" << currentComplText << "'" << endl;
kdDebug(13035) << "Count: " << m_complList.count() << endl;
*/
- QValueList<KTextEditor::CompletionEntry>::Iterator it;
+ TQValueList<KTextEditor::CompletionEntry>::Iterator it;
if( m_caseSensitive ) {
for( it = m_complList.begin(); it != m_complList.end(); ++it ) {
if( (*it).text.startsWith(currentComplText) ) {
@@ -305,29 +305,29 @@ void KateCodeCompletion::updateBox( bool )
}
kdDebug(13035)<<"KateCodeCompletion::updateBox: Resizing widget"<<endl;
- m_completionPopup->resize(m_completionListBox->sizeHint() + QSize(2,2));
- QPoint p = m_view->mapToGlobal( m_view->cursorCoordinates() );
+ m_completionPopup->resize(m_completionListBox->sizeHint() + TQSize(2,2));
+ TQPoint p = m_view->mapToGlobal( m_view->cursorCoordinates() );
int x = p.x();
int y = p.y() ;
- if ( y + m_completionPopup->height() + m_view->renderer()->config()->fontMetrics( )->height() > QApplication::desktop()->height() )
+ if ( y + m_completionPopup->height() + m_view->renderer()->config()->fontMetrics( )->height() > TQApplication::desktop()->height() )
y -= (m_completionPopup->height() );
else
y += m_view->renderer()->config()->fontMetrics( )->height();
- if (x + m_completionPopup->width() > QApplication::desktop()->width())
- x = QApplication::desktop()->width() - m_completionPopup->width();
+ if (x + m_completionPopup->width() > TQApplication::desktop()->width())
+ x = TQApplication::desktop()->width() - m_completionPopup->width();
- m_completionPopup->move( QPoint(x,y) );
+ m_completionPopup->move( TQPoint(x,y) );
m_completionListBox->setCurrentItem( 0 );
m_completionListBox->setSelected( 0, true );
m_completionListBox->setFocus();
m_completionPopup->show();
- QTimer::singleShot(0,this,SLOT(showComment()));
+ TQTimer::singleShot(0,this,TQT_SLOT(showComment()));
}
-void KateCodeCompletion::showArgHint ( QStringList functionList, const QString& strWrapping, const QString& strDelimiter )
+void KateCodeCompletion::showArgHint ( TQStringList functionList, const TQString& strWrapping, const TQString& strDelimiter )
{
unsigned int line, col;
m_view->cursorPositionReal( &line, &col );
@@ -335,8 +335,8 @@ void KateCodeCompletion::showArgHint ( QStringList functionList, const QString&
m_pArgHint->setArgMarkInfos( strWrapping, strDelimiter );
int nNum = 0;
- QStringList::Iterator end(functionList.end());
- for( QStringList::Iterator it = functionList.begin(); it != end; ++it )
+ TQStringList::Iterator end(functionList.end());
+ for( TQStringList::Iterator it = functionList.begin(); it != end; ++it )
{
kdDebug(13035) << "Insert function text: " << *it << endl;
@@ -345,7 +345,7 @@ void KateCodeCompletion::showArgHint ( QStringList functionList, const QString&
nNum++;
}
- m_pArgHint->move(m_view->mapToGlobal(m_view->cursorCoordinates() + QPoint(0,m_view->renderer()->config()->fontMetrics( )->height())) );
+ m_pArgHint->move(m_view->mapToGlobal(m_view->cursorCoordinates() + TQPoint(0,m_view->renderer()->config()->fontMetrics( )->height())) );
m_pArgHint->show();
}
@@ -369,13 +369,13 @@ void KateCodeCompletion::showComment()
delete m_commentLabel;
m_commentLabel = new KateCodeCompletionCommentLabel( 0, item->m_entry.comment );
- m_commentLabel->setFont(QToolTip::font());
- m_commentLabel->setPalette(QToolTip::palette());
+ m_commentLabel->setFont(TQToolTip::font());
+ m_commentLabel->setPalette(TQToolTip::palette());
- QPoint rightPoint = m_completionPopup->mapToGlobal(QPoint(m_completionPopup->width(),0));
- QPoint leftPoint = m_completionPopup->mapToGlobal(QPoint(0,0));
- QRect screen = QApplication::desktop()->screenGeometry ( m_commentLabel );
- QPoint finalPoint;
+ TQPoint rightPoint = m_completionPopup->mapToGlobal(TQPoint(m_completionPopup->width(),0));
+ TQPoint leftPoint = m_completionPopup->mapToGlobal(TQPoint(0,0));
+ TQRect screen = TQApplication::desktop()->screenGeometry ( m_commentLabel );
+ TQPoint finalPoint;
if (rightPoint.x()+m_commentLabel->width() > screen.x() + screen.width())
finalPoint.setX(leftPoint.x()-m_commentLabel->width());
else
@@ -392,13 +392,13 @@ void KateCodeCompletion::showComment()
}
KateArgHint::KateArgHint( KateView* parent, const char* name )
- : QFrame( parent, name, WType_Popup )
+ : TQFrame( parent, name, WType_Popup )
{
setBackgroundColor( black );
setPaletteForegroundColor( Qt::black );
labelDict.setAutoDelete( true );
- layout = new QVBoxLayout( this, 1, 2 );
+ layout = new TQVBoxLayout( this, 1, 2 );
layout->setAutoAdd( true );
editorView = parent;
@@ -414,7 +414,7 @@ KateArgHint::~KateArgHint()
{
}
-void KateArgHint::setArgMarkInfos( const QString& wrapping, const QString& delimiter )
+void KateArgHint::setArgMarkInfos( const TQString& wrapping, const TQString& delimiter )
{
m_wrapping = wrapping;
m_delimiter = delimiter;
@@ -454,10 +454,10 @@ void KateArgHint::cursorPositionChanged( KateView* view, int line, int col )
int nCountDelimiter = 0;
int count = 0;
- QString currentTextLine = view->doc()->textLine( line );
- QString text = currentTextLine.mid( m_currentCol, col - m_currentCol );
- QRegExp strconst_rx( "\"[^\"]*\"" );
- QRegExp chrconst_rx( "'[^']*'" );
+ TQString currentTextLine = view->doc()->textLine( line );
+ TQString text = currentTextLine.mid( m_currentCol, col - m_currentCol );
+ TQRegExp strconst_rx( "\"[^\"]*\"" );
+ TQRegExp chrconst_rx( "'[^']*'" );
text = text
.replace( strconst_rx, "\"\"" )
@@ -484,11 +484,11 @@ void KateArgHint::cursorPositionChanged( KateView* view, int line, int col )
}
-void KateArgHint::addFunction( int id, const QString& prot )
+void KateArgHint::addFunction( int id, const TQString& prot )
{
m_functionMap[ id ] = prot;
- QLabel* label = new QLabel( prot.stripWhiteSpace().simplifyWhiteSpace(), this );
- label->setBackgroundColor( QColor(255, 255, 238) );
+ TQLabel* label = new TQLabel( prot.stripWhiteSpace().simplifyWhiteSpace(), this );
+ label->setBackgroundColor( TQColor(255, 255, 238) );
label->show();
labelDict.insert( id, label );
@@ -507,15 +507,15 @@ void KateArgHint::setCurrentFunction( int currentFunction )
currentFunction = 0;
if( m_markCurrentFunction && m_currentFunction >= 0 ){
- QLabel* label = labelDict[ m_currentFunction ];
+ TQLabel* label = labelDict[ m_currentFunction ];
label->setFont( font() );
}
m_currentFunction = currentFunction;
if( m_markCurrentFunction ){
- QLabel* label = labelDict[ currentFunction ];
- QFont fnt( font() );
+ TQLabel* label = labelDict[ currentFunction ];
+ TQFont fnt( font() );
fnt.setBold( true );
label->setFont( fnt );
}
@@ -526,14 +526,14 @@ void KateArgHint::setCurrentFunction( int currentFunction )
void KateArgHint::show()
{
- QFrame::show();
+ TQFrame::show();
adjustSize();
}
-bool KateArgHint::eventFilter( QObject*, QEvent* e )
+bool KateArgHint::eventFilter( TQObject*, TQEvent* e )
{
- if( isVisible() && e->type() == QEvent::KeyPress ){
- QKeyEvent* ke = static_cast<QKeyEvent*>( e );
+ if( isVisible() && e->type() == TQEvent::KeyPress ){
+ TQKeyEvent* ke = static_cast<TQKeyEvent*>( e );
if( (ke->state() & ControlButton) && ke->key() == Key_Left ){
setCurrentFunction( currentFunction() - 1 );
ke->accept();
@@ -553,9 +553,9 @@ bool KateArgHint::eventFilter( QObject*, QEvent* e )
void KateArgHint::adjustSize( )
{
- QRect screen = QApplication::desktop()->screenGeometry( pos() );
+ TQRect screen = TQApplication::desktop()->screenGeometry( pos() );
- QFrame::adjustSize();
+ TQFrame::adjustSize();
if( width() > screen.width() )
resize( screen.width(), height() );
diff --git a/kate/part/katecodecompletion.h b/kate/part/katecodecompletion.h
index 81279d929..895151b05 100644
--- a/kate/part/katecodecompletion.h
+++ b/kate/part/katecodecompletion.h
@@ -30,12 +30,12 @@
#include <ktexteditor/codecompletioninterface.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qframe.h>
-#include <qmap.h>
-#include <qintdict.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqmap.h>
+#include <tqintdict.h>
class KateView;
class KateArgHint;
@@ -49,13 +49,13 @@ class KateCodeCompletionCommentLabel : public QLabel
Q_OBJECT
public:
- KateCodeCompletionCommentLabel( QWidget* parent, const QString& text) : QLabel( parent, "toolTipTip",
+ KateCodeCompletionCommentLabel( TQWidget* parent, const TQString& text) : TQLabel( parent, "toolTipTip",
WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM )
{
setMargin(1);
setIndent(0);
setAutoMask( false );
- setFrameStyle( QFrame::Plain | QFrame::Box );
+ setFrameStyle( TQFrame::Plain | TQFrame::Box );
setLineWidth( 1 );
setAlignment( AlignAuto | AlignTop );
polish();
@@ -77,12 +77,12 @@ class KateCodeCompletion : public QObject
bool codeCompletionVisible ();
void showArgHint(
- QStringList functionList, const QString& strWrapping, const QString& strDelimiter );
+ TQStringList functionList, const TQString& strWrapping, const TQString& strDelimiter );
void showCompletionBox(
- QValueList<KTextEditor::CompletionEntry> entries, int offset = 0, bool casesensitive = true );
- bool eventFilter( QObject* o, QEvent* e );
+ TQValueList<KTextEditor::CompletionEntry> entries, int offset = 0, bool casesensitive = true );
+ bool eventFilter( TQObject* o, TQEvent* e );
- void handleKey (QKeyEvent *e);
+ void handleKey (TQKeyEvent *e);
public slots:
void slotCursorPosChanged();
@@ -94,7 +94,7 @@ class KateCodeCompletion : public QObject
void completionDone();
void argHintHidden();
void completionDone(KTextEditor::CompletionEntry);
- void filterInsertString(KTextEditor::CompletionEntry*,QString *);
+ void filterInsertString(KTextEditor::CompletionEntry*,TQString *);
private:
void doComplete();
@@ -104,9 +104,9 @@ class KateCodeCompletion : public QObject
KateArgHint* m_pArgHint;
KateView* m_view;
- QVBox* m_completionPopup;
+ TQVBox* m_completionPopup;
KateCCListBox* m_completionListBox;
- QValueList<KTextEditor::CompletionEntry> m_complList;
+ TQValueList<KTextEditor::CompletionEntry> m_complList;
uint m_lineCursor;
uint m_colCursor;
int m_offset;
@@ -125,14 +125,14 @@ class KateArgHint: public QFrame
virtual void setCurrentFunction( int );
virtual int currentFunction() const { return m_currentFunction; }
- void setArgMarkInfos( const QString&, const QString& );
+ void setArgMarkInfos( const TQString&, const TQString& );
- virtual void addFunction( int, const QString& );
- QString functionAt( int id ) const { return m_functionMap[ id ]; }
+ virtual void addFunction( int, const TQString& );
+ TQString functionAt( int id ) const { return m_functionMap[ id ]; }
virtual void show();
virtual void adjustSize();
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
signals:
void argHintHidden();
@@ -147,16 +147,16 @@ class KateArgHint: public QFrame
void slotDone(bool completed);
private:
- QMap<int, QString> m_functionMap;
+ TQMap<int, TQString> m_functionMap;
int m_currentFunction;
- QString m_wrapping;
- QString m_delimiter;
+ TQString m_wrapping;
+ TQString m_delimiter;
bool m_markCurrentFunction;
int m_currentLine;
int m_currentCol;
KateView* editorView;
- QIntDict<QLabel> labelDict;
- QLayout* layout;
+ TQIntDict<TQLabel> labelDict;
+ TQLayout* layout;
};
#endif
diff --git a/kate/part/katecodefoldinghelpers.cpp b/kate/part/katecodefoldinghelpers.cpp
index 49090820b..91b4da88a 100644
--- a/kate/part/katecodefoldinghelpers.cpp
+++ b/kate/part/katecodefoldinghelpers.cpp
@@ -23,7 +23,7 @@
#include "katecursor.h"
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#define JW_DEBUG 0
@@ -150,7 +150,7 @@ void KateCodeFoldingNode::clearChildren ()
m_children.resize (0);
}
-KateCodeFoldingTree::KateCodeFoldingTree(KateBuffer *buffer): QObject(buffer), m_buffer (buffer)
+KateCodeFoldingTree::KateCodeFoldingTree(KateBuffer *buffer): TQObject(buffer), m_buffer (buffer)
{
clear();
}
@@ -360,10 +360,10 @@ void KateCodeFoldingTree::debugDump()
dumpNode(&m_root, "");
}
-void KateCodeFoldingTree::dumpNode(KateCodeFoldingNode *node, const QString &prefix)
+void KateCodeFoldingTree::dumpNode(KateCodeFoldingNode *node, const TQString &prefix)
{
//output node properties
- kdDebug(13000)<<prefix<<QString("Type: %1, startLineValid %2, startLineRel %3, endLineValid %4, endLineRel %5, visible %6").
+ kdDebug(13000)<<prefix<<TQString("Type: %1, startLineValid %2, startLineRel %3, endLineValid %4, endLineRel %5, visible %6").
arg(node->type).arg(node->startLineValid).arg(node->startLineRel).arg(node->endLineValid).
arg(node->endLineRel).arg(node->visible)<<endl;
@@ -371,7 +371,7 @@ void KateCodeFoldingTree::dumpNode(KateCodeFoldingNode *node, const QString &pre
if (node->noChildren())
return;
- QString newprefix(prefix + " ");
+ TQString newprefix(prefix + " ");
for ( uint i=0; i < node->childCount(); ++i )
dumpNode (node->child(i),newprefix);
}
@@ -380,7 +380,7 @@ void KateCodeFoldingTree::dumpNode(KateCodeFoldingNode *node, const QString &pre
That's one of the most important functions ;)
*/
void KateCodeFoldingTree::updateLine(unsigned int line,
- QMemArray<uint> *regionChanges, bool *updated,bool changed,bool colsChanged)
+ TQMemArray<uint> *regionChanges, bool *updated,bool changed,bool colsChanged)
{
if ( (!changed) || colsChanged)
{
@@ -752,7 +752,7 @@ void KateCodeFoldingTree::moveSubNodesUp(KateCodeFoldingNode *node)
break;
}
#if JW_DEBUG
- kdDebug(13000)<<QString("remove pos: %1").arg(removepos)<<endl;
+ kdDebug(13000)<<TQString("remove pos: %1").arg(removepos)<<endl;
#endif
if (removepos>-1)
{
@@ -786,7 +786,7 @@ void KateCodeFoldingTree::moveSubNodesUp(KateCodeFoldingNode *node)
-void KateCodeFoldingTree::addOpening(KateCodeFoldingNode *node,signed char nType, QMemArray<uint>* list,unsigned int line,unsigned int charPos)
+void KateCodeFoldingTree::addOpening(KateCodeFoldingNode *node,signed char nType, TQMemArray<uint>* list,unsigned int line,unsigned int charPos)
{
uint startLine = getStartLine(node);
if ((startLine==line) && (node->type!=0))
@@ -948,7 +948,7 @@ void KateCodeFoldingTree::addOpening(KateCodeFoldingNode *node,signed char nType
}
-void KateCodeFoldingTree::addOpening_further_iterations(KateCodeFoldingNode *node,signed char /* nType */, QMemArray<uint>*
+void KateCodeFoldingTree::addOpening_further_iterations(KateCodeFoldingNode *node,signed char /* nType */, TQMemArray<uint>*
list,unsigned int line,int current, unsigned int startLine,unsigned int charPos)
{
while (!(list->isEmpty()))
@@ -1036,7 +1036,7 @@ void KateCodeFoldingTree::lineHasBeenRemoved(unsigned int line)
dontIgnoreUnchangedLines.insert(line+1, &trueVal);
hiddenLinesCountCacheValid = false;
#if JW_DEBUG
- kdDebug(13000)<<QString("KateCodeFoldingTree::lineHasBeenRemoved: %1").arg(line)<<endl;
+ kdDebug(13000)<<TQString("KateCodeFoldingTree::lineHasBeenRemoved: %1").arg(line)<<endl;
#endif
//line ++;
@@ -1067,7 +1067,7 @@ void KateCodeFoldingTree::lineHasBeenRemoved(unsigned int line)
if (node->parentNode)
decrementBy1(node->parentNode, node);
- for (QValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
+ for (TQValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
{
if ((*it).start > line)
(*it).start--;
@@ -1100,7 +1100,7 @@ void KateCodeFoldingTree::lineHasBeenInserted(unsigned int line)
hiddenLinesCountCacheValid = false;
//return;
#if JW_DEBUG
- kdDebug(13000)<<QString("KateCodeFoldingTree::lineHasBeenInserted: %1").arg(line)<<endl;
+ kdDebug(13000)<<TQString("KateCodeFoldingTree::lineHasBeenInserted: %1").arg(line)<<endl;
#endif
// findAndMarkAllNodesforRemovalOpenedOrClosedAt(line);
@@ -1127,7 +1127,7 @@ void KateCodeFoldingTree::lineHasBeenInserted(unsigned int line)
if (node->parentNode)
incrementBy1(node->parentNode, node);
- for (QValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
+ for (TQValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
{
if ((*it).start > line)
(*it).start++;
@@ -1330,7 +1330,7 @@ void KateCodeFoldingTree::toggleRegionVisibility(unsigned int line)
lineMapping.clear();
hiddenLinesCountCacheValid = false;
- kdDebug(13000)<<QString("KateCodeFoldingTree::toggleRegionVisibility() %1").arg(line)<<endl;
+ kdDebug(13000)<<TQString("KateCodeFoldingTree::toggleRegionVisibility() %1").arg(line)<<endl;
findAllNodesOpenedOrClosedAt(line);
for (int i=0; i<(int)nodesForLine.count(); i++)
@@ -1352,7 +1352,7 @@ void KateCodeFoldingTree::toggleRegionVisibility(unsigned int line)
addHiddenLineBlock(nodesForLine.at(0),line);
else
{
- for (QValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end();++it)
+ for (TQValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end();++it)
if ((*it).start == line+1)
{
hiddenLines.remove(it);
@@ -1385,7 +1385,7 @@ void KateCodeFoldingTree::addHiddenLineBlock(KateCodeFoldingNode *node,unsigned
data.length = node->endLineRel-(existsOpeningAtLineAfter(line+node->endLineRel,node)?1:0); // without -1;
bool inserted = false;
- for (QValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
+ for (TQValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
{
if (((*it).start>=data.start) && ((*it).start<=data.start+data.length-1)) // another hidden block starting at the within this block already exits -> adapt new block
{
@@ -1438,14 +1438,14 @@ unsigned int KateCodeFoldingTree::getRealLine(unsigned int virtualLine)
if (hiddenLines.isEmpty())
return virtualLine;
- // kdDebug(13000)<<QString("VirtualLine %1").arg(virtualLine)<<endl;
+ // kdDebug(13000)<<TQString("VirtualLine %1").arg(virtualLine)<<endl;
unsigned int *real=lineMapping[virtualLine];
if (real)
return (*real);
unsigned int tmp = virtualLine;
- for (QValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.begin();it!=hiddenLines.end();++it)
+ for (TQValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.begin();it!=hiddenLines.end();++it)
{
if ((*it).start<=virtualLine)
virtualLine += (*it).length;
@@ -1453,7 +1453,7 @@ unsigned int KateCodeFoldingTree::getRealLine(unsigned int virtualLine)
break;
}
- // kdDebug(13000)<<QString("Real Line %1").arg(virtualLine)<<endl;
+ // kdDebug(13000)<<TQString("Real Line %1").arg(virtualLine)<<endl;
lineMapping.insert(tmp, new unsigned int(virtualLine));
return virtualLine;
@@ -1468,9 +1468,9 @@ unsigned int KateCodeFoldingTree::getVirtualLine(unsigned int realLine)
if (hiddenLines.isEmpty())
return realLine;
- // kdDebug(13000)<<QString("RealLine--> %1").arg(realLine)<<endl;
+ // kdDebug(13000)<<TQString("RealLine--> %1").arg(realLine)<<endl;
- for (QValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.fromLast(); it!=hiddenLines.end(); --it)
+ for (TQValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.fromLast(); it!=hiddenLines.end(); --it)
{
if ((*it).start <= realLine)
realLine -= (*it).length;
@@ -1478,7 +1478,7 @@ unsigned int KateCodeFoldingTree::getVirtualLine(unsigned int realLine)
// break;
}
- // kdDebug(13000)<<QString("-->virtual Line %1").arg(realLine)<<endl;
+ // kdDebug(13000)<<TQString("-->virtual Line %1").arg(realLine)<<endl;
return realLine;
}
@@ -1498,7 +1498,7 @@ unsigned int KateCodeFoldingTree::getHiddenLinesCount(unsigned int doclen)
hiddenLinesCountCacheValid = true;
hiddenLinesCountCache = 0;
- for (QValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
+ for (TQValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
{
if ((*it).start+(*it).length<=doclen)
hiddenLinesCountCache += (*it).length;
@@ -1635,7 +1635,7 @@ void KateCodeFoldingTree::ensureVisible( uint line )
{
// first have a look, if the line is really hidden
bool found=false;
- for (QValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.begin();it!=hiddenLines.end();++it)
+ for (TQValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.begin();it!=hiddenLines.end();++it)
{
if ( ((*it).start<=line) && ((*it).start+(*it).length>line) )
{
diff --git a/kate/part/katecodefoldinghelpers.h b/kate/part/katecodefoldinghelpers.h
index bd5e5e8d5..72aebd49d 100644
--- a/kate/part/katecodefoldinghelpers.h
+++ b/kate/part/katecodefoldinghelpers.h
@@ -20,11 +20,11 @@
#define _KATE_CODEFOLDING_HELPERS_
//BEGIN INCLUDES + FORWARDS
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qobject.h>
-#include <qintdict.h>
-#include <qmemarray.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqobject.h>
+#include <tqintdict.h>
+#include <tqmemarray.h>
class KateCodeFoldingTree;
class KateTextCursor;
@@ -110,7 +110,7 @@ class KateCodeFoldingNode
bool deleteOpening;
bool deleteEnding;
- QMemArray<KateCodeFoldingNode*> m_children;
+ TQMemArray<KateCodeFoldingNode*> m_children;
};
class KateCodeFoldingTree : public QObject
@@ -148,12 +148,12 @@ class KateCodeFoldingTree : public QObject
KateBuffer *m_buffer;
- QIntDict<unsigned int> lineMapping;
- QIntDict<bool> dontIgnoreUnchangedLines;
+ TQIntDict<unsigned int> lineMapping;
+ TQIntDict<bool> dontIgnoreUnchangedLines;
- QPtrList<KateCodeFoldingNode> markedForDeleting;
- QPtrList<KateCodeFoldingNode> nodesForLine;
- QValueList<KateHiddenLineBlock> hiddenLines;
+ TQPtrList<KateCodeFoldingNode> markedForDeleting;
+ TQPtrList<KateCodeFoldingNode> nodesForLine;
+ TQValueList<KateHiddenLineBlock> hiddenLines;
unsigned int hiddenLinesCountCache;
bool something_changed;
@@ -165,9 +165,9 @@ class KateCodeFoldingTree : public QObject
bool correctEndings (signed char data, KateCodeFoldingNode *node, unsigned int line, unsigned int endCol, int insertPos);
- void dumpNode (KateCodeFoldingNode *node, const QString &prefix);
- void addOpening (KateCodeFoldingNode *node, signed char nType,QMemArray<uint>* list, unsigned int line,unsigned int charPos);
- void addOpening_further_iterations (KateCodeFoldingNode *node,signed char nType, QMemArray<uint>*
+ void dumpNode (KateCodeFoldingNode *node, const TQString &prefix);
+ void addOpening (KateCodeFoldingNode *node, signed char nType,TQMemArray<uint>* list, unsigned int line,unsigned int charPos);
+ void addOpening_further_iterations (KateCodeFoldingNode *node,signed char nType, TQMemArray<uint>*
list,unsigned int line,int current,unsigned int startLine,unsigned int charPos);
void incrementBy1 (KateCodeFoldingNode *node, KateCodeFoldingNode *after);
@@ -201,7 +201,7 @@ class KateCodeFoldingTree : public QObject
void moveSubNodesUp (KateCodeFoldingNode *node);
public slots:
- void updateLine (unsigned int line,QMemArray<uint>* regionChanges, bool *updated, bool changed,bool colschanged);
+ void updateLine (unsigned int line,TQMemArray<uint>* regionChanges, bool *updated, bool changed,bool colschanged);
void toggleRegionVisibility (unsigned int);
void collapseToplevelNodes ();
void expandToplevelNodes (int numLines);
diff --git a/kate/part/kateconfig.cpp b/kate/part/kateconfig.cpp
index c580ed5c1..4b3c2f52b 100644
--- a/kate/part/kateconfig.cpp
+++ b/kate/part/kateconfig.cpp
@@ -37,8 +37,8 @@
#include <kinstance.h>
#include <kstaticdeleter.h>
-#include <qpopupmenu.h>
-#include <qtextcodec.h>
+#include <tqpopupmenu.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
@@ -180,9 +180,9 @@ void KateDocumentConfig::readConfig (KConfig *config)
setSearchDirConfigDepth (config->readNumEntry("Search Dir Config Depth", 3));
- setBackupPrefix (config->readEntry("Backup Prefix", QString ("")));
+ setBackupPrefix (config->readEntry("Backup Prefix", TQString ("")));
- setBackupSuffix (config->readEntry("Backup Suffix", QString ("~")));
+ setBackupSuffix (config->readEntry("Backup Suffix", TQString ("~")));
// plugins
for (uint i=0; i<KateFactory::self()->plugins().count(); i++)
@@ -409,7 +409,7 @@ void KateDocumentConfig::setConfigFlags (uint fullFlags)
configEnd ();
}
-const QString &KateDocumentConfig::encoding () const
+const TQString &KateDocumentConfig::encoding () const
{
if (m_encodingSet || isGlobal())
return m_encoding;
@@ -417,12 +417,12 @@ const QString &KateDocumentConfig::encoding () const
return s_global->encoding();
}
-QTextCodec *KateDocumentConfig::codec ()
+TQTextCodec *KateDocumentConfig::codec ()
{
if (m_encodingSet || isGlobal())
{
if (m_encoding.isEmpty() && isGlobal())
- return KGlobal::charsets()->codecForName (QString::fromLatin1(KGlobal::locale()->encoding()));
+ return KGlobal::charsets()->codecForName (TQString::fromLatin1(KGlobal::locale()->encoding()));
else if (m_encoding.isEmpty())
return s_global->codec ();
else
@@ -432,14 +432,14 @@ QTextCodec *KateDocumentConfig::codec ()
return s_global->codec ();
}
-void KateDocumentConfig::setEncoding (const QString &encoding)
+void KateDocumentConfig::setEncoding (const TQString &encoding)
{
- QString enc = encoding;
+ TQString enc = encoding;
if (!enc.isEmpty())
{
bool found = false;
- QTextCodec *codec = KGlobal::charsets()->codecForName (encoding, found);
+ TQTextCodec *codec = KGlobal::charsets()->codecForName (encoding, found);
if (!found || !codec)
return;
@@ -471,16 +471,16 @@ int KateDocumentConfig::eol () const
return s_global->eol();
}
-QString KateDocumentConfig::eolString ()
+TQString KateDocumentConfig::eolString ()
{
if (eol() == KateDocumentConfig::eolUnix)
- return QString ("\n");
+ return TQString ("\n");
else if (eol() == KateDocumentConfig::eolDos)
- return QString ("\r\n");
+ return TQString ("\r\n");
else if (eol() == KateDocumentConfig::eolMac)
- return QString ("\r");
+ return TQString ("\r");
- return QString ("\n");
+ return TQString ("\n");
}
void KateDocumentConfig::setEol (int mode)
@@ -529,7 +529,7 @@ void KateDocumentConfig::setBackupFlags (uint flags)
configEnd ();
}
-const QString &KateDocumentConfig::backupPrefix () const
+const TQString &KateDocumentConfig::backupPrefix () const
{
if (m_backupPrefixSet || isGlobal())
return m_backupPrefix;
@@ -537,7 +537,7 @@ const QString &KateDocumentConfig::backupPrefix () const
return s_global->backupPrefix();
}
-const QString &KateDocumentConfig::backupSuffix () const
+const TQString &KateDocumentConfig::backupSuffix () const
{
if (m_backupSuffixSet || isGlobal())
return m_backupSuffix;
@@ -545,7 +545,7 @@ const QString &KateDocumentConfig::backupSuffix () const
return s_global->backupSuffix();
}
-void KateDocumentConfig::setBackupPrefix (const QString &prefix)
+void KateDocumentConfig::setBackupPrefix (const TQString &prefix)
{
configStart ();
@@ -555,7 +555,7 @@ void KateDocumentConfig::setBackupPrefix (const QString &prefix)
configEnd ();
}
-void KateDocumentConfig::setBackupSuffix (const QString &suffix)
+void KateDocumentConfig::setBackupSuffix (const TQString &suffix)
{
configStart ();
@@ -1127,14 +1127,14 @@ void KateRendererConfig::setSchemaInternal( int schema )
KConfig *config (KateFactory::self()->schemaManager()->schema(schema));
- QColor tmp0 (KGlobalSettings::baseColor());
- QColor tmp1 (KGlobalSettings::highlightColor());
- QColor tmp2 (KGlobalSettings::alternateBackgroundColor());
- QColor tmp3 ( "#FFFF99" );
- QColor tmp4 (tmp2.dark());
- QColor tmp5 ( KGlobalSettings::textColor() );
- QColor tmp6 ( "#EAE9E8" );
- QColor tmp7 ( "#000000" );
+ TQColor tmp0 (KGlobalSettings::baseColor());
+ TQColor tmp1 (KGlobalSettings::highlightColor());
+ TQColor tmp2 (KGlobalSettings::alternateBackgroundColor());
+ TQColor tmp3 ( "#FFFF99" );
+ TQColor tmp4 (tmp2.dark());
+ TQColor tmp5 ( KGlobalSettings::textColor() );
+ TQColor tmp6 ( "#EAE9E8" );
+ TQColor tmp7 ( "#000000" );
m_backgroundColor = config->readColorEntry("Color Background", &tmp0);
m_backgroundColorSet = true;
@@ -1154,7 +1154,7 @@ void KateRendererConfig::setSchemaInternal( int schema )
m_lineNumberColorSet = true;
// same std colors like in KateDocument::markColor
- QColor mark[7];
+ TQColor mark[7];
mark[0] = Qt::blue;
mark[1] = Qt::red;
mark[2] = Qt::yellow;
@@ -1164,13 +1164,13 @@ void KateRendererConfig::setSchemaInternal( int schema )
mark[6] = Qt::red;
for (int i = 1; i <= KTextEditor::MarkInterface::reservedMarkersCount(); i++) {
- QColor col = config->readColorEntry(QString("Color MarkType%1").arg(i), &mark[i - 1]);
+ TQColor col = config->readColorEntry(TQString("Color MarkType%1").arg(i), &mark[i - 1]);
int index = i-1;
m_lineMarkerColorSet[index] = true;
m_lineMarkerColor[index] = col;
}
- QFont f (KGlobalSettings::fixedFont());
+ TQFont f (KGlobalSettings::fixedFont());
if (!m_fontSet)
{
@@ -1189,7 +1189,7 @@ KateFontStruct *KateRendererConfig::fontStruct ()
return s_global->fontStruct ();
}
-QFont *KateRendererConfig::font()
+TQFont *KateRendererConfig::font()
{
return &(fontStruct ()->myFont);
}
@@ -1199,7 +1199,7 @@ KateFontMetrics *KateRendererConfig::fontMetrics()
return &(fontStruct ()->myFontMetrics);
}
-void KateRendererConfig::setFont(const QFont &font)
+void KateRendererConfig::setFont(const TQFont &font)
{
configStart ();
@@ -1232,7 +1232,7 @@ void KateRendererConfig::setWordWrapMarker (bool on)
configEnd ();
}
-const QColor& KateRendererConfig::backgroundColor() const
+const TQColor& KateRendererConfig::backgroundColor() const
{
if (m_backgroundColorSet || isGlobal())
return m_backgroundColor;
@@ -1240,7 +1240,7 @@ const QColor& KateRendererConfig::backgroundColor() const
return s_global->backgroundColor();
}
-void KateRendererConfig::setBackgroundColor (const QColor &col)
+void KateRendererConfig::setBackgroundColor (const TQColor &col)
{
configStart ();
@@ -1250,7 +1250,7 @@ void KateRendererConfig::setBackgroundColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::selectionColor() const
+const TQColor& KateRendererConfig::selectionColor() const
{
if (m_selectionColorSet || isGlobal())
return m_selectionColor;
@@ -1258,7 +1258,7 @@ const QColor& KateRendererConfig::selectionColor() const
return s_global->selectionColor();
}
-void KateRendererConfig::setSelectionColor (const QColor &col)
+void KateRendererConfig::setSelectionColor (const TQColor &col)
{
configStart ();
@@ -1268,7 +1268,7 @@ void KateRendererConfig::setSelectionColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::highlightedLineColor() const
+const TQColor& KateRendererConfig::highlightedLineColor() const
{
if (m_highlightedLineColorSet || isGlobal())
return m_highlightedLineColor;
@@ -1276,7 +1276,7 @@ const QColor& KateRendererConfig::highlightedLineColor() const
return s_global->highlightedLineColor();
}
-void KateRendererConfig::setHighlightedLineColor (const QColor &col)
+void KateRendererConfig::setHighlightedLineColor (const TQColor &col)
{
configStart ();
@@ -1286,7 +1286,7 @@ void KateRendererConfig::setHighlightedLineColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::lineMarkerColor(KTextEditor::MarkInterface::MarkTypes type) const
+const TQColor& KateRendererConfig::lineMarkerColor(KTextEditor::MarkInterface::MarkTypes type) const
{
int index = 0;
if (type > 0) { while((type >> index++) ^ 1) {} }
@@ -1294,7 +1294,7 @@ const QColor& KateRendererConfig::lineMarkerColor(KTextEditor::MarkInterface::Ma
if ( index < 0 || index >= KTextEditor::MarkInterface::reservedMarkersCount() )
{
- static QColor dummy;
+ static TQColor dummy;
return dummy;
}
@@ -1304,7 +1304,7 @@ const QColor& KateRendererConfig::lineMarkerColor(KTextEditor::MarkInterface::Ma
return s_global->lineMarkerColor( type );
}
-void KateRendererConfig::setLineMarkerColor (const QColor &col, KTextEditor::MarkInterface::MarkTypes type)
+void KateRendererConfig::setLineMarkerColor (const TQColor &col, KTextEditor::MarkInterface::MarkTypes type)
{
int index = static_cast<int>( log(static_cast<double>(type)) / log(2.0) );
Q_ASSERT( index >= 0 && index < KTextEditor::MarkInterface::reservedMarkersCount() );
@@ -1316,7 +1316,7 @@ void KateRendererConfig::setLineMarkerColor (const QColor &col, KTextEditor::Mar
configEnd ();
}
-const QColor& KateRendererConfig::highlightedBracketColor() const
+const TQColor& KateRendererConfig::highlightedBracketColor() const
{
if (m_highlightedBracketColorSet || isGlobal())
return m_highlightedBracketColor;
@@ -1324,7 +1324,7 @@ const QColor& KateRendererConfig::highlightedBracketColor() const
return s_global->highlightedBracketColor();
}
-void KateRendererConfig::setHighlightedBracketColor (const QColor &col)
+void KateRendererConfig::setHighlightedBracketColor (const TQColor &col)
{
configStart ();
@@ -1334,7 +1334,7 @@ void KateRendererConfig::setHighlightedBracketColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::wordWrapMarkerColor() const
+const TQColor& KateRendererConfig::wordWrapMarkerColor() const
{
if (m_wordWrapMarkerColorSet || isGlobal())
return m_wordWrapMarkerColor;
@@ -1342,7 +1342,7 @@ const QColor& KateRendererConfig::wordWrapMarkerColor() const
return s_global->wordWrapMarkerColor();
}
-void KateRendererConfig::setWordWrapMarkerColor (const QColor &col)
+void KateRendererConfig::setWordWrapMarkerColor (const TQColor &col)
{
configStart ();
@@ -1352,7 +1352,7 @@ void KateRendererConfig::setWordWrapMarkerColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::tabMarkerColor() const
+const TQColor& KateRendererConfig::tabMarkerColor() const
{
if (m_tabMarkerColorSet || isGlobal())
return m_tabMarkerColor;
@@ -1360,7 +1360,7 @@ const QColor& KateRendererConfig::tabMarkerColor() const
return s_global->tabMarkerColor();
}
-void KateRendererConfig::setTabMarkerColor (const QColor &col)
+void KateRendererConfig::setTabMarkerColor (const TQColor &col)
{
configStart ();
@@ -1370,7 +1370,7 @@ void KateRendererConfig::setTabMarkerColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::iconBarColor() const
+const TQColor& KateRendererConfig::iconBarColor() const
{
if (m_iconBarColorSet || isGlobal())
return m_iconBarColor;
@@ -1378,7 +1378,7 @@ const QColor& KateRendererConfig::iconBarColor() const
return s_global->iconBarColor();
}
-void KateRendererConfig::setIconBarColor (const QColor &col)
+void KateRendererConfig::setIconBarColor (const TQColor &col)
{
configStart ();
@@ -1388,7 +1388,7 @@ void KateRendererConfig::setIconBarColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::lineNumberColor() const
+const TQColor& KateRendererConfig::lineNumberColor() const
{
if (m_lineNumberColorSet || isGlobal())
return m_lineNumberColor;
@@ -1396,7 +1396,7 @@ const QColor& KateRendererConfig::lineNumberColor() const
return s_global->lineNumberColor();
}
-void KateRendererConfig::setLineNumberColor (const QColor &col)
+void KateRendererConfig::setLineNumberColor (const TQColor &col)
{
configStart ();
diff --git a/kate/part/kateconfig.h b/kate/part/kateconfig.h
index e81234826..1e0ea5cb8 100644
--- a/kate/part/kateconfig.h
+++ b/kate/part/kateconfig.h
@@ -21,10 +21,10 @@
#include <ktexteditor/markinterface.h>
-#include <qbitarray.h>
-#include <qcolor.h>
-#include <qobject.h>
-#include <qvaluevector.h>
+#include <tqbitarray.h>
+#include <tqcolor.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
class KateView;
class KateDocument;
@@ -186,10 +186,10 @@ class KateDocumentConfig : public KateConfig
void setConfigFlags (KateDocumentConfig::ConfigFlags flag, bool enable);
void setConfigFlags (uint fullFlags);
- const QString &encoding () const;
- QTextCodec *codec ();
+ const TQString &encoding () const;
+ TQTextCodec *codec ();
- void setEncoding (const QString &encoding);
+ void setEncoding (const TQString &encoding);
bool isSetEncoding () const;
@@ -201,7 +201,7 @@ class KateDocumentConfig : public KateConfig
};
int eol () const;
- QString eolString ();
+ TQString eolString ();
void setEol (int mode);
@@ -217,11 +217,11 @@ class KateDocumentConfig : public KateConfig
uint backupFlags () const;
void setBackupFlags (uint flags);
- const QString &backupPrefix () const;
- void setBackupPrefix (const QString &prefix);
+ const TQString &backupPrefix () const;
+ void setBackupPrefix (const TQString &prefix);
- const QString &backupSuffix () const;
- void setBackupSuffix (const QString &suffix);
+ const TQString &backupSuffix () const;
+ void setBackupSuffix (const TQString &suffix);
bool plugin (uint index) const;
void setPlugin (uint index, bool load);
@@ -244,14 +244,14 @@ class KateDocumentConfig : public KateConfig
uint m_undoSteps;
bool m_pageUpDownMovesCursor;
uint m_configFlags;
- QString m_encoding;
+ TQString m_encoding;
int m_eol;
bool m_allowEolDetection;
uint m_backupFlags;
int m_searchDirConfigDepth;
- QString m_backupPrefix;
- QString m_backupSuffix;
- QBitArray m_plugins;
+ TQString m_backupPrefix;
+ TQString m_backupSuffix;
+ TQBitArray m_plugins;
bool m_tabWidthSet : 1;
bool m_indentationWidthSet : 1;
@@ -268,7 +268,7 @@ class KateDocumentConfig : public KateConfig
bool m_searchDirConfigDepthSet : 1;
bool m_backupPrefixSet : 1;
bool m_backupSuffixSet : 1;
- QBitArray m_pluginsSet;
+ TQBitArray m_pluginsSet;
private:
static KateDocumentConfig *s_global;
@@ -453,42 +453,42 @@ class KateRendererConfig : public KateConfig
void reloadSchema();
KateFontStruct *fontStruct ();
- QFont *font();
+ TQFont *font();
KateFontMetrics *fontMetrics();
- void setFont(const QFont &font);
+ void setFont(const TQFont &font);
bool wordWrapMarker () const;
void setWordWrapMarker (bool on);
- const QColor& backgroundColor() const;
- void setBackgroundColor (const QColor &col);
+ const TQColor& backgroundColor() const;
+ void setBackgroundColor (const TQColor &col);
- const QColor& selectionColor() const;
- void setSelectionColor (const QColor &col);
+ const TQColor& selectionColor() const;
+ void setSelectionColor (const TQColor &col);
- const QColor& highlightedLineColor() const;
- void setHighlightedLineColor (const QColor &col);
+ const TQColor& highlightedLineColor() const;
+ void setHighlightedLineColor (const TQColor &col);
- const QColor& lineMarkerColor(KTextEditor::MarkInterface::MarkTypes type = KTextEditor::MarkInterface::markType01) const; // markType01 == Bookmark
- void setLineMarkerColor (const QColor &col, KTextEditor::MarkInterface::MarkTypes type = KTextEditor::MarkInterface::markType01);
+ const TQColor& lineMarkerColor(KTextEditor::MarkInterface::MarkTypes type = KTextEditor::MarkInterface::markType01) const; // markType01 == Bookmark
+ void setLineMarkerColor (const TQColor &col, KTextEditor::MarkInterface::MarkTypes type = KTextEditor::MarkInterface::markType01);
- const QColor& highlightedBracketColor() const;
- void setHighlightedBracketColor (const QColor &col);
+ const TQColor& highlightedBracketColor() const;
+ void setHighlightedBracketColor (const TQColor &col);
- const QColor& wordWrapMarkerColor() const;
- void setWordWrapMarkerColor (const QColor &col);
+ const TQColor& wordWrapMarkerColor() const;
+ void setWordWrapMarkerColor (const TQColor &col);
- const QColor& tabMarkerColor() const;
- void setTabMarkerColor (const QColor &col);
+ const TQColor& tabMarkerColor() const;
+ void setTabMarkerColor (const TQColor &col);
- const QColor& iconBarColor() const;
- void setIconBarColor (const QColor &col);
+ const TQColor& iconBarColor() const;
+ void setIconBarColor (const TQColor &col);
// the line number color is used for the line numbers on the left bar and
// for vertical separator lines and for code folding lines.
- const QColor& lineNumberColor() const;
- void setLineNumberColor (const QColor &col);
+ const TQColor& lineNumberColor() const;
+ void setLineNumberColor (const TQColor &col);
bool showIndentationLines () const;
void setShowIndentationLines (bool on);
@@ -503,15 +503,15 @@ class KateRendererConfig : public KateConfig
KateFontStruct *m_font;
bool m_wordWrapMarker;
bool m_showIndentationLines;
- QColor m_backgroundColor;
- QColor m_selectionColor;
- QColor m_highlightedLineColor;
- QColor m_highlightedBracketColor;
- QColor m_wordWrapMarkerColor;
- QColor m_tabMarkerColor;
- QColor m_iconBarColor;
- QColor m_lineNumberColor;
- QValueVector<QColor> m_lineMarkerColor;
+ TQColor m_backgroundColor;
+ TQColor m_selectionColor;
+ TQColor m_highlightedLineColor;
+ TQColor m_highlightedBracketColor;
+ TQColor m_wordWrapMarkerColor;
+ TQColor m_tabMarkerColor;
+ TQColor m_iconBarColor;
+ TQColor m_lineNumberColor;
+ TQValueVector<TQColor> m_lineMarkerColor;
bool m_schemaSet : 1;
bool m_fontSet : 1;
@@ -525,7 +525,7 @@ class KateRendererConfig : public KateConfig
bool m_tabMarkerColorSet : 1;
bool m_iconBarColorSet : 1;
bool m_lineNumberColorSet : 1;
- QBitArray m_lineMarkerColorSet;
+ TQBitArray m_lineMarkerColorSet;
private:
static KateRendererConfig *s_global;
diff --git a/kate/part/katecursor.cpp b/kate/part/katecursor.cpp
index a67b7e475..dcd7c38bf 100644
--- a/kate/part/katecursor.cpp
+++ b/kate/part/katecursor.cpp
@@ -136,7 +136,7 @@ bool KateDocCursor::moveBackward(uint nbChar)
}
}
-bool KateDocCursor::insertText(const QString& s)
+bool KateDocCursor::insertText(const TQString& s)
{
return m_doc->insertText(line(), col(), s);
}
@@ -152,7 +152,7 @@ bool KateDocCursor::removeText(uint nbChar)
(uint)endCursor.line(), (uint)endCursor.col());
}
-QChar KateDocCursor::currentChar() const
+TQChar KateDocCursor::currentChar() const
{
return m_doc->plainKateTextLine(line())->getChar(col());
}
diff --git a/kate/part/katecursor.h b/kate/part/katecursor.h
index 20a86d5d9..c155abba4 100644
--- a/kate/part/katecursor.h
+++ b/kate/part/katecursor.h
@@ -111,9 +111,9 @@ class KateDocCursor : public KateTextCursor
// KTextEditor::Cursor interface
void position(uint *line, uint *col) const;
bool setPosition(uint line, uint col);
- bool insertText(const QString& text);
+ bool insertText(const TQString& text);
bool removeText(uint numberOfCharacters);
- QChar currentChar() const;
+ TQChar currentChar() const;
uchar currentAttrib() const;
diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp
index 91da42e8f..d3a481856 100644
--- a/kate/part/katedialogs.cpp
+++ b/kate/part/katedialogs.cpp
@@ -74,39 +74,39 @@
#include <kstandarddirs.h>
#include <ktempfile.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdialog.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qgrid.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qheader.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qmap.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qpointarray.h>
-#include <qptrcollection.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
-#include <qtextcodec.h>
-#include <qtoolbutton.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qwhatsthis.h>
-#include <qwidgetstack.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdialog.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqgrid.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqheader.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqmap.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqpointarray.h>
+#include <tqptrcollection.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
+#include <tqtextcodec.h>
+#include <tqtoolbutton.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqwhatsthis.h>
+#include <tqwidgetstack.h>
// trailing slash is important
#define HLDOWNLOADPATH "http://kate.kde.org/syntax/"
@@ -114,11 +114,11 @@
//END
//BEGIN KateConfigPage
-KateConfigPage::KateConfigPage ( QWidget *parent, const char *name )
+KateConfigPage::KateConfigPage ( TQWidget *parent, const char *name )
: Kate::ConfigPage (parent, name)
, m_changed (false)
{
- connect (this, SIGNAL(changed()), this, SLOT(somethingHasChanged ()));
+ connect (this, TQT_SIGNAL(changed()), this, TQT_SLOT(somethingHasChanged ()));
}
KateConfigPage::~KateConfigPage ()
@@ -144,47 +144,47 @@ const int KateIndentConfigTab::flags[] = {
KateDocumentConfig::cfIndentPastedText
};
-KateIndentConfigTab::KateIndentConfigTab(QWidget *parent)
+KateIndentConfigTab::KateIndentConfigTab(TQWidget *parent)
: KateConfigPage(parent)
{
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
int configFlags = KateDocumentConfig::global()->configFlags();
- QVGroupBox *gbAuto = new QVGroupBox(i18n("Automatic Indentation"), this);
+ TQVGroupBox *gbAuto = new TQVGroupBox(i18n("Automatic Indentation"), this);
- QHBox *indentLayout = new QHBox(gbAuto);
+ TQHBox *indentLayout = new TQHBox(gbAuto);
indentLayout->setSpacing(KDialog::spacingHint());
- QLabel *indentLabel = new QLabel(i18n("&Indentation mode:"), indentLayout);
+ TQLabel *indentLabel = new TQLabel(i18n("&Indentation mode:"), indentLayout);
m_indentMode = new KComboBox (indentLayout);
m_indentMode->insertStringList (KateAutoIndent::listModes());
indentLabel->setBuddy(m_indentMode);
- m_configPage = new QPushButton(SmallIconSet("configure"), i18n("Configure..."), indentLayout);
+ m_configPage = new TQPushButton(SmallIconSet("configure"), i18n("Configure..."), indentLayout);
- opt[5] = new QCheckBox(i18n("Insert leading Doxygen \"*\" when typing"), gbAuto);
- opt[7] = new QCheckBox(i18n("Adjust indentation of code pasted from the clipboard"), gbAuto);
+ opt[5] = new TQCheckBox(i18n("Insert leading Doxygen \"*\" when typing"), gbAuto);
+ opt[7] = new TQCheckBox(i18n("Adjust indentation of code pasted from the clipboard"), gbAuto);
- QVGroupBox *gbSpaces = new QVGroupBox(i18n("Indentation with Spaces"), this);
- QVBox *spaceLayout = new QVBox(gbSpaces);
- opt[0] = new QCheckBox(i18n("Use &spaces instead of tabs to indent"), spaceLayout );
- opt[6] = new QCheckBox(i18n("Emacs style mixed mode"), spaceLayout);
+ TQVGroupBox *gbSpaces = new TQVGroupBox(i18n("Indentation with Spaces"), this);
+ TQVBox *spaceLayout = new TQVBox(gbSpaces);
+ opt[0] = new TQCheckBox(i18n("Use &spaces instead of tabs to indent"), spaceLayout );
+ opt[6] = new TQCheckBox(i18n("Emacs style mixed mode"), spaceLayout);
indentationWidth = new KIntNumInput(KateDocumentConfig::global()->indentationWidth(), spaceLayout);
indentationWidth->setRange(1, 16, 1, false);
indentationWidth->setLabel(i18n("Number of spaces:"), AlignVCenter);
- opt[1] = new QCheckBox(i18n("Keep indent &profile"), this);
- opt[2] = new QCheckBox(i18n("&Keep extra spaces"), this);
+ opt[1] = new TQCheckBox(i18n("Keep indent &profile"), this);
+ opt[2] = new TQCheckBox(i18n("&Keep extra spaces"), this);
- QVGroupBox *keys = new QVGroupBox(i18n("Keys to Use"), this);
- opt[3] = new QCheckBox(i18n("&Tab key indents"), keys);
- opt[4] = new QCheckBox(i18n("&Backspace key indents"), keys);
+ TQVGroupBox *keys = new TQVGroupBox(i18n("Keys to Use"), this);
+ opt[3] = new TQCheckBox(i18n("&Tab key indents"), keys);
+ opt[4] = new TQCheckBox(i18n("&Backspace key indents"), keys);
- QRadioButton *rb1, *rb2, *rb3;
- m_tabs = new QButtonGroup( 1, Qt::Horizontal, i18n("Tab Key Mode if Nothing Selected"), this );
+ TQRadioButton *rb1, *rb2, *rb3;
+ m_tabs = new TQButtonGroup( 1, Qt::Horizontal, i18n("Tab Key Mode if Nothing Selected"), this );
m_tabs->setRadioButtonExclusive( true );
- m_tabs->insert( rb1=new QRadioButton( i18n("Insert indent &characters"), m_tabs ), 0 );
- m_tabs->insert( rb2=new QRadioButton( i18n("I&nsert tab character"), m_tabs ), 1 );
- m_tabs->insert( rb3=new QRadioButton( i18n("Indent current &line"), m_tabs ), 2 );
+ m_tabs->insert( rb1=new TQRadioButton( i18n("Insert indent &characters"), m_tabs ), 0 );
+ m_tabs->insert( rb2=new TQRadioButton( i18n("I&nsert tab character"), m_tabs ), 1 );
+ m_tabs->insert( rb3=new TQRadioButton( i18n("Indent current &line"), m_tabs ), 2 );
opt[0]->setChecked(configFlags & flags[0]);
opt[1]->setChecked(configFlags & flags[1]);
@@ -205,28 +205,28 @@ KateIndentConfigTab::KateIndentConfigTab(QWidget *parent)
layout->addStretch();
// What is this? help
- QWhatsThis::add(opt[0], i18n(
+ TQWhatsThis::add(opt[0], i18n(
"Check this if you want to indent with spaces rather than tabs."));
- QWhatsThis::add(opt[2], i18n(
+ TQWhatsThis::add(opt[2], i18n(
"Indentations of more than the selected number of spaces will not be "
"shortened."));
- QWhatsThis::add(opt[3], i18n(
+ TQWhatsThis::add(opt[3], i18n(
"This allows the <b>Tab</b> key to be used to increase the indentation "
"level."));
- QWhatsThis::add(opt[4], i18n(
+ TQWhatsThis::add(opt[4], i18n(
"This allows the <b>Backspace</b> key to be used to decrease the "
"indentation level."));
- QWhatsThis::add(opt[5], i18n(
+ TQWhatsThis::add(opt[5], i18n(
"Automatically inserts a leading \"*\" while typing within a Doxygen "
"style comment."));
- QWhatsThis::add( opt[6], i18n(
+ TQWhatsThis::add( opt[6], i18n(
"Use a mix of tab and space characters for indentation.") );
- QWhatsThis::add( opt[7], i18n(
+ TQWhatsThis::add( opt[7], i18n(
"If this option is selected, pasted code from the clipboard is indented. "
"Triggering the <b>undo</b>-action removes the indentation.") );
- QWhatsThis::add(indentationWidth, i18n("The number of spaces to indent with."));
+ TQWhatsThis::add(indentationWidth, i18n("The number of spaces to indent with."));
- QWhatsThis::add(m_configPage, i18n(
+ TQWhatsThis::add(m_configPage, i18n(
"If this button is enabled, additional indenter specific options are "
"available and can be configured in an extra dialog.") );
@@ -236,27 +236,27 @@ KateIndentConfigTab::KateIndentConfigTab(QWidget *parent)
// after initial reload, connect the stuff for the changed () signal
//
- connect(m_indentMode, SIGNAL(activated(int)), this, SLOT(slotChanged()));
- connect(m_indentMode, SIGNAL(activated(int)), this, SLOT(indenterSelected(int)));
+ connect(m_indentMode, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged()));
+ connect(m_indentMode, TQT_SIGNAL(activated(int)), this, TQT_SLOT(indenterSelected(int)));
- connect( opt[0], SIGNAL(toggled(bool)), this, SLOT(somethingToggled()));
+ connect( opt[0], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(somethingToggled()));
- connect( opt[0], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[1], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[2], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[3], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[4], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[5], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[6], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[7], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
+ connect( opt[0], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[1], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[2], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[3], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[4], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[5], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[6], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[7], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
- connect(indentationWidth, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
+ connect(indentationWidth, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
- connect(rb1, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(rb2, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(rb3, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(rb1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(rb2, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(rb3, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
- connect(m_configPage, SIGNAL(clicked()), this, SLOT(configPage()));
+ connect(m_configPage, TQT_SIGNAL(clicked()), this, TQT_SLOT(configPage()));
}
void KateIndentConfigTab::somethingToggled() {
@@ -282,10 +282,10 @@ void KateIndentConfigTab::configPage()
KDialogBase dlg(this, "indenter_config_dialog", true, i18n("Configure Indenter"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Cancel, true);
- QVBox *box = new QVBox(&dlg);
+ TQVBox *box = new TQVBox(&dlg);
box->setSpacing( KDialog::spacingHint() );
dlg.setMainWidget(box);
- new QLabel("<qt><b>" + KateAutoIndent::modeDescription(index) + "</b></qt>", box);
+ new TQLabel("<qt><b>" + KateAutoIndent::modeDescription(index) + "</b></qt>", box);
new KSeparator(KSeparator::HLine, box);
IndenterConfigPage* page = KateAutoIndent::configPage(box, index);
@@ -293,7 +293,7 @@ void KateIndentConfigTab::configPage()
if (!page) return;
box->setStretchFactor(page, 1);
- connect( &dlg, SIGNAL(okClicked()), page, SLOT(apply()) );
+ connect( &dlg, TQT_SIGNAL(okClicked()), page, TQT_SLOT(apply()) );
dlg.resize(400, 300);
dlg.exec();
@@ -347,68 +347,68 @@ void KateIndentConfigTab::reload ()
//BEGIN KateSelectConfigTab
const int KateSelectConfigTab::flags[] = {};
-KateSelectConfigTab::KateSelectConfigTab(QWidget *parent)
+KateSelectConfigTab::KateSelectConfigTab(TQWidget *parent)
: KateConfigPage(parent)
{
int configFlags = KateDocumentConfig::global()->configFlags();
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
- QVGroupBox *gbCursor = new QVGroupBox(i18n("Text Cursor Movement"), this);
+ TQVGroupBox *gbCursor = new TQVGroupBox(i18n("Text Cursor Movement"), this);
- opt[0] = new QCheckBox(i18n("Smart ho&me and smart end"), gbCursor);
+ opt[0] = new TQCheckBox(i18n("Smart ho&me and smart end"), gbCursor);
opt[0]->setChecked(configFlags & KateDocumentConfig::cfSmartHome);
- connect(opt[0], SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(opt[0], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
- opt[1] = new QCheckBox(i18n("Wrap c&ursor"), gbCursor);
+ opt[1] = new TQCheckBox(i18n("Wrap c&ursor"), gbCursor);
opt[1]->setChecked(configFlags & KateDocumentConfig::cfWrapCursor);
- connect(opt[1], SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(opt[1], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
- e6 = new QCheckBox(i18n("&PageUp/PageDown moves cursor"), gbCursor);
+ e6 = new TQCheckBox(i18n("&PageUp/PageDown moves cursor"), gbCursor);
e6->setChecked(KateDocumentConfig::global()->pageUpDownMovesCursor());
- connect(e6, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(e6, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
e4 = new KIntNumInput(KateViewConfig::global()->autoCenterLines(), gbCursor);
e4->setRange(0, 1000000, 1, false);
e4->setLabel(i18n("Autocenter cursor (lines):"), AlignVCenter);
- connect(e4, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
+ connect(e4, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
layout->addWidget(gbCursor);
- QRadioButton *rb1, *rb2;
+ TQRadioButton *rb1, *rb2;
- m_tabs = new QButtonGroup( 1, Qt::Horizontal, i18n("Selection Mode"), this );
+ m_tabs = new TQButtonGroup( 1, Qt::Horizontal, i18n("Selection Mode"), this );
layout->add (m_tabs);
m_tabs->setRadioButtonExclusive( true );
- m_tabs->insert( rb1=new QRadioButton( i18n("&Normal"), m_tabs ), 0 );
- m_tabs->insert( rb2=new QRadioButton( i18n("&Persistent"), m_tabs ), 1 );
+ m_tabs->insert( rb1=new TQRadioButton( i18n("&Normal"), m_tabs ), 0 );
+ m_tabs->insert( rb2=new TQRadioButton( i18n("&Persistent"), m_tabs ), 1 );
layout->addStretch();
- QWhatsThis::add(rb1, i18n(
+ TQWhatsThis::add(rb1, i18n(
"Selections will be overwritten by typed text and will be lost on "
"cursor movement."));
- QWhatsThis::add(rb2, i18n(
+ TQWhatsThis::add(rb2, i18n(
"Selections will stay even after cursor movement and typing."));
- QWhatsThis::add(e4, i18n(
+ TQWhatsThis::add(e4, i18n(
"Sets the number of lines to maintain visible above and below the "
"cursor when possible."));
- QWhatsThis::add(opt[0], i18n(
+ TQWhatsThis::add(opt[0], i18n(
"When selected, pressing the home key will cause the cursor to skip "
"whitespace and go to the start of a line's text. "
"The same applies for the end key."));
- QWhatsThis::add(opt[1], i18n(
+ TQWhatsThis::add(opt[1], i18n(
"When on, moving the insertion cursor using the <b>Left</b> and "
"<b>Right</b> keys will go on to previous/next line at beginning/end of "
"the line, similar to most editors.<p>When off, the insertion cursor "
"cannot be moved left of the line start, but it can be moved off the "
"line end, which can be very handy for programmers."));
- QWhatsThis::add(e6, i18n("Selects whether the PageUp and PageDown keys should alter the vertical position of the cursor relative to the top of the view."));
+ TQWhatsThis::add(e6, i18n("Selects whether the PageUp and PageDown keys should alter the vertical position of the cursor relative to the top of the view."));
reload ();
@@ -417,8 +417,8 @@ KateSelectConfigTab::KateSelectConfigTab(QWidget *parent)
// after initial reload, connect the stuff for the changed () signal
//
- connect(rb1, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(rb2, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(rb1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(rb2, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
}
void KateSelectConfigTab::apply ()
@@ -464,65 +464,65 @@ const int KateEditConfigTab::flags[] = {KateDocument::cfWordWrap,
KateDocument::cfAutoBrackets, KateDocument::cfShowTabs,
KateDocumentConfig::cfReplaceTabsDyn, KateDocumentConfig::cfRemoveTrailingDyn};
-KateEditConfigTab::KateEditConfigTab(QWidget *parent)
+KateEditConfigTab::KateEditConfigTab(TQWidget *parent)
: KateConfigPage(parent)
{
- QVBoxLayout *mainLayout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
int configFlags = KateDocumentConfig::global()->configFlags();
- QVGroupBox *gbWhiteSpace = new QVGroupBox(i18n("Tabulators"), this);
+ TQVGroupBox *gbWhiteSpace = new TQVGroupBox(i18n("Tabulators"), this);
- opt[3] = new QCheckBox( i18n("&Insert spaces instead of tabulators"), gbWhiteSpace );
+ opt[3] = new TQCheckBox( i18n("&Insert spaces instead of tabulators"), gbWhiteSpace );
opt[3]->setChecked( configFlags & KateDocumentConfig::cfReplaceTabsDyn );
- connect( opt[3], SIGNAL(toggled(bool)), this, SLOT(slotChanged()) );
+ connect( opt[3], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()) );
- opt[2] = new QCheckBox(i18n("&Show tabulators"), gbWhiteSpace);
+ opt[2] = new TQCheckBox(i18n("&Show tabulators"), gbWhiteSpace);
opt[2]->setChecked(configFlags & flags[2]);
- connect(opt[2], SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(opt[2], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
e2 = new KIntNumInput(KateDocumentConfig::global()->tabWidth(), gbWhiteSpace);
e2->setRange(1, 16, 1, false);
e2->setLabel(i18n("Tab width:"), AlignVCenter);
- connect(e2, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
+ connect(e2, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
mainLayout->addWidget(gbWhiteSpace);
- QVGroupBox *gbWordWrap = new QVGroupBox(i18n("Static Word Wrap"), this);
+ TQVGroupBox *gbWordWrap = new TQVGroupBox(i18n("Static Word Wrap"), this);
- opt[0] = new QCheckBox(i18n("Enable static &word wrap"), gbWordWrap);
+ opt[0] = new TQCheckBox(i18n("Enable static &word wrap"), gbWordWrap);
opt[0]->setChecked(KateDocumentConfig::global()->wordWrap());
- connect(opt[0], SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(opt[0], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
- m_wwmarker = new QCheckBox( i18n("&Show static word wrap marker (if applicable)"), gbWordWrap );
+ m_wwmarker = new TQCheckBox( i18n("&Show static word wrap marker (if applicable)"), gbWordWrap );
m_wwmarker->setChecked( KateRendererConfig::global()->wordWrapMarker() );
- connect(m_wwmarker, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(m_wwmarker, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
e1 = new KIntNumInput(KateDocumentConfig::global()->wordWrapAt(), gbWordWrap);
e1->setRange(20, 200, 1, false);
e1->setLabel(i18n("Wrap words at:"), AlignVCenter);
- connect(e1, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
+ connect(e1, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
mainLayout->addWidget(gbWordWrap);
- opt[4] = new QCheckBox( i18n("Remove &trailing spaces"), this );
+ opt[4] = new TQCheckBox( i18n("Remove &trailing spaces"), this );
mainLayout->addWidget( opt[4] );
opt[4]->setChecked( configFlags & KateDocumentConfig::cfRemoveTrailingDyn );
- connect( opt[4], SIGNAL(toggled(bool)), this, SLOT(slotChanged()) );
+ connect( opt[4], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()) );
- opt[1] = new QCheckBox(i18n("Auto &brackets"), this);
+ opt[1] = new TQCheckBox(i18n("Auto &brackets"), this);
mainLayout->addWidget(opt[1]);
opt[1]->setChecked(configFlags & flags[1]);
- connect(opt[1], SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(opt[1], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
e3 = new KIntNumInput(e2, KateDocumentConfig::global()->undoSteps(), this);
e3->setRange(0, 1000000, 1, false);
e3->setSpecialValueText( i18n("Unlimited") );
e3->setLabel(i18n("Maximum undo steps:"), AlignVCenter);
mainLayout->addWidget(e3);
- connect(e3, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
+ connect(e3, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
- QHBoxLayout *e5Layout = new QHBoxLayout(mainLayout);
- QLabel *e5Label = new QLabel(i18n("Smart search t&ext from:"), this);
+ TQHBoxLayout *e5Layout = new TQHBoxLayout(mainLayout);
+ TQLabel *e5Label = new TQLabel(i18n("Smart search t&ext from:"), this);
e5Layout->addWidget(e5Label);
e5 = new KComboBox (this);
e5->insertItem( i18n("Nowhere") );
@@ -533,12 +533,12 @@ KateEditConfigTab::KateEditConfigTab(QWidget *parent)
e5->setCurrentItem(KateViewConfig::global()->textToSearchMode());
e5Layout->addWidget(e5);
e5Label->setBuddy(e5);
- connect(e5, SIGNAL(activated(int)), this, SLOT(slotChanged()));
+ connect(e5, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged()));
mainLayout->addStretch();
// What is this? help
- QWhatsThis::add(opt[0], i18n(
+ TQWhatsThis::add(opt[0], i18n(
"Automatically start a new line of text when the current line exceeds "
"the length specified by the <b>Wrap words at:</b> option."
"<p>This option does not wrap existing lines of text - use the <b>Apply "
@@ -546,20 +546,20 @@ KateEditConfigTab::KateEditConfigTab(QWidget *parent)
"<p>If you want lines to be <i>visually wrapped</i> instead, according "
"to the width of the view, enable <b>Dynamic Word Wrap</b> in the "
"<b>View Defaults</b> config page."));
- QWhatsThis::add(e1, i18n(
+ TQWhatsThis::add(e1, i18n(
"If the Word Wrap option is selected this entry determines the length "
"(in characters) at which the editor will automatically start a new line."));
- QWhatsThis::add(opt[1], i18n(
+ TQWhatsThis::add(opt[1], i18n(
"When the user types a left bracket ([,(, or {) KateView automatically "
"enters the right bracket (}, ), or ]) to the right of the cursor."));
- QWhatsThis::add(opt[2], i18n(
+ TQWhatsThis::add(opt[2], i18n(
"The editor will display a symbol to indicate the presence of a tab in "
"the text."));
- QWhatsThis::add(e3, i18n(
+ TQWhatsThis::add(e3, i18n(
"Sets the number of undo/redo steps to record. More steps uses more memory."));
- QString gstfwt = i18n(
+ TQString gstfwt = i18n(
"This determines where KateView will get the search text from "
"(this will be automatically entered into the Find Text dialog): "
"<br>"
@@ -582,16 +582,16 @@ KateEditConfigTab::KateEditConfigTab(QWidget *parent)
"Note that, in all the above modes, if a search string has "
"not been or cannot be determined, then the Find Text Dialog "
"will fall back to the last search text.");
- QWhatsThis::add(e5Label, gstfwt);
- QWhatsThis::add(e5, gstfwt);
- QWhatsThis::add( opt[3], i18n(
+ TQWhatsThis::add(e5Label, gstfwt);
+ TQWhatsThis::add(e5, gstfwt);
+ TQWhatsThis::add( opt[3], i18n(
"If this is enabled, the editor will calculate the number of spaces up to "
"the next tab position as defined by the tab width, and insert that number "
"of spaces instead of a TAB character." ) );
- QWhatsThis::add( opt[4], i18n(
+ TQWhatsThis::add( opt[4], i18n(
"If this is enabled, the editor will remove any trailing whitespace on "
"lines when they are left by the insertion cursor.") );
- QWhatsThis::add( m_wwmarker, i18n(
+ TQWhatsThis::add( m_wwmarker, i18n(
"<p>If this option is checked, a vertical line will be drawn at the word "
"wrap column as defined in the <strong>Editing</strong> properties."
"<p>Note that the word wrap marker is only drawn if you use a fixed "
@@ -640,20 +640,20 @@ void KateEditConfigTab::reload ()
//END KateEditConfigTab
//BEGIN KateViewDefaultsConfig
-KateViewDefaultsConfig::KateViewDefaultsConfig(QWidget *parent)
+KateViewDefaultsConfig::KateViewDefaultsConfig(TQWidget *parent)
:KateConfigPage(parent)
{
- QRadioButton *rb1;
- QRadioButton *rb2;
+ TQRadioButton *rb1;
+ TQRadioButton *rb2;
- QVBoxLayout *blay=new QVBoxLayout(this,0,KDialog::spacingHint());
+ TQVBoxLayout *blay=new TQVBoxLayout(this,0,KDialog::spacingHint());
- QVGroupBox *gbWordWrap = new QVGroupBox(i18n("Word Wrap"), this);
+ TQVGroupBox *gbWordWrap = new TQVGroupBox(i18n("Word Wrap"), this);
- m_dynwrap=new QCheckBox(i18n("&Dynamic word wrap"),gbWordWrap);
+ m_dynwrap=new TQCheckBox(i18n("&Dynamic word wrap"),gbWordWrap);
- QHBox *m_dynwrapIndicatorsLay = new QHBox (gbWordWrap);
- m_dynwrapIndicatorsLabel = new QLabel( i18n("Dynamic word wrap indicators (if applicable):"), m_dynwrapIndicatorsLay );
+ TQHBox *m_dynwrapIndicatorsLay = new TQHBox (gbWordWrap);
+ m_dynwrapIndicatorsLabel = new TQLabel( i18n("Dynamic word wrap indicators (if applicable):"), m_dynwrapIndicatorsLay );
m_dynwrapIndicatorsCombo = new KComboBox( m_dynwrapIndicatorsLay );
m_dynwrapIndicatorsCombo->insertItem( i18n("Off") );
m_dynwrapIndicatorsCombo->insertItem( i18n("Follow Line Numbers") );
@@ -669,43 +669,43 @@ KateViewDefaultsConfig::KateViewDefaultsConfig(QWidget *parent)
blay->addWidget(gbWordWrap);
- QVGroupBox *gbFold = new QVGroupBox(i18n("Code Folding"), this);
+ TQVGroupBox *gbFold = new TQVGroupBox(i18n("Code Folding"), this);
- m_folding=new QCheckBox(i18n("Show &folding markers (if available)"), gbFold );
- m_collapseTopLevel = new QCheckBox( i18n("Collapse toplevel folding nodes"), gbFold );
+ m_folding=new TQCheckBox(i18n("Show &folding markers (if available)"), gbFold );
+ m_collapseTopLevel = new TQCheckBox( i18n("Collapse toplevel folding nodes"), gbFold );
m_collapseTopLevel->hide ();
blay->addWidget(gbFold);
- QVGroupBox *gbBar = new QVGroupBox(i18n("Borders"), this);
+ TQVGroupBox *gbBar = new TQVGroupBox(i18n("Borders"), this);
- m_icons=new QCheckBox(i18n("Show &icon border"),gbBar);
- m_line=new QCheckBox(i18n("Show &line numbers"),gbBar);
- m_scrollBarMarks=new QCheckBox(i18n("Show &scrollbar marks"),gbBar);
+ m_icons=new TQCheckBox(i18n("Show &icon border"),gbBar);
+ m_line=new TQCheckBox(i18n("Show &line numbers"),gbBar);
+ m_scrollBarMarks=new TQCheckBox(i18n("Show &scrollbar marks"),gbBar);
blay->addWidget(gbBar);
- m_bmSort = new QButtonGroup( 1, Qt::Horizontal, i18n("Sort Bookmarks Menu"), this );
+ m_bmSort = new TQButtonGroup( 1, Qt::Horizontal, i18n("Sort Bookmarks Menu"), this );
m_bmSort->setRadioButtonExclusive( true );
- m_bmSort->insert( rb1=new QRadioButton( i18n("By &position"), m_bmSort ), 0 );
- m_bmSort->insert( rb2=new QRadioButton( i18n("By c&reation"), m_bmSort ), 1 );
+ m_bmSort->insert( rb1=new TQRadioButton( i18n("By &position"), m_bmSort ), 0 );
+ m_bmSort->insert( rb2=new TQRadioButton( i18n("By c&reation"), m_bmSort ), 1 );
blay->addWidget(m_bmSort, 0 );
- m_showIndentLines = new QCheckBox(i18n("Show indentation lines"), this);
+ m_showIndentLines = new TQCheckBox(i18n("Show indentation lines"), this);
m_showIndentLines->setChecked(KateRendererConfig::global()->showIndentationLines());
blay->addWidget(m_showIndentLines);
blay->addStretch(1000);
- QWhatsThis::add(m_dynwrap,i18n(
+ TQWhatsThis::add(m_dynwrap,i18n(
"If this option is checked, the text lines will be wrapped at the view "
"border on the screen."));
- QString wtstr = i18n("Choose when the Dynamic Word Wrap Indicators should be displayed");
- QWhatsThis::add(m_dynwrapIndicatorsLabel, wtstr);
- QWhatsThis::add(m_dynwrapIndicatorsCombo, wtstr);
+ TQString wtstr = i18n("Choose when the Dynamic Word Wrap Indicators should be displayed");
+ TQWhatsThis::add(m_dynwrapIndicatorsLabel, wtstr);
+ TQWhatsThis::add(m_dynwrapIndicatorsCombo, wtstr);
// xgettext:no-c-format
- QWhatsThis::add(m_dynwrapAlignLevel, i18n(
+ TQWhatsThis::add(m_dynwrapAlignLevel, i18n(
"<p>Enables the start of dynamically wrapped lines to be aligned "
"vertically to the indentation level of the first line. This can help "
"to make code and markup more readable.</p><p>Additionally, this allows "
@@ -714,28 +714,28 @@ KateViewDefaultsConfig::KateViewDefaultsConfig(QWidget *parent)
"example, at 50%, lines whose indentation levels are deeper than 50% of "
"the width of the screen will not have vertical alignment applied to "
"subsequent wrapped lines.</p>"));
- QWhatsThis::add(m_line,i18n(
+ TQWhatsThis::add(m_line,i18n(
"If this option is checked, every new view will display line numbers "
"on the left hand side."));
- QWhatsThis::add(m_icons,i18n(
+ TQWhatsThis::add(m_icons,i18n(
"If this option is checked, every new view will display an icon border "
"on the left hand side.<br><br>The icon border shows bookmark signs, "
"for instance."));
- QWhatsThis::add(m_scrollBarMarks,i18n(
+ TQWhatsThis::add(m_scrollBarMarks,i18n(
"If this option is checked, every new view will show marks on the "
"vertical scrollbar.<br><br>These marks will, for instance, show "
"bookmarks."));
- QWhatsThis::add(m_folding,i18n(
+ TQWhatsThis::add(m_folding,i18n(
"If this option is checked, every new view will display marks for code "
"folding, if code folding is available."));
- QWhatsThis::add(m_bmSort,i18n(
+ TQWhatsThis::add(m_bmSort,i18n(
"Choose how the bookmarks should be ordered in the <b>Bookmarks</b> menu."));
- QWhatsThis::add(rb1,i18n(
+ TQWhatsThis::add(rb1,i18n(
"The bookmarks will be ordered by the line numbers they are placed at."));
- QWhatsThis::add(rb2,i18n(
+ TQWhatsThis::add(rb2,i18n(
"Each new bookmark will be added to the bottom, independently from "
"where it is placed in the document."));
- QWhatsThis::add(m_showIndentLines, i18n(
+ TQWhatsThis::add(m_showIndentLines, i18n(
"If this is enabled, the editor will display vertical lines to help "
"identify indent lines.") );
@@ -745,17 +745,17 @@ KateViewDefaultsConfig::KateViewDefaultsConfig(QWidget *parent)
// after initial reload, connect the stuff for the changed () signal
//
- connect(m_dynwrap, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(m_dynwrapIndicatorsCombo, SIGNAL(activated(int)), this, SLOT(slotChanged()));
- connect(m_dynwrapAlignLevel, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
- connect(m_icons, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(m_scrollBarMarks, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(m_line, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(m_folding, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(m_collapseTopLevel, SIGNAL(toggled(bool)), this, SLOT(slotChanged()) );
- connect(rb1, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(rb2, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(m_showIndentLines, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(m_dynwrap, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(m_dynwrapIndicatorsCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged()));
+ connect(m_dynwrapAlignLevel, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
+ connect(m_icons, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(m_scrollBarMarks, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(m_line, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(m_folding, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(m_collapseTopLevel, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()) );
+ connect(rb1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(rb2, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(m_showIndentLines, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
}
KateViewDefaultsConfig::~KateViewDefaultsConfig()
@@ -807,28 +807,28 @@ void KateViewDefaultsConfig::defaults (){;}
//BEGIN KateEditKeyConfiguration
-KateEditKeyConfiguration::KateEditKeyConfiguration( QWidget* parent, KateDocument* doc )
+KateEditKeyConfiguration::KateEditKeyConfiguration( TQWidget* parent, KateDocument* doc )
: KateConfigPage( parent )
{
m_doc = doc;
m_ready = false;
}
-void KateEditKeyConfiguration::showEvent ( QShowEvent * )
+void KateEditKeyConfiguration::showEvent ( TQShowEvent * )
{
if (!m_ready)
{
- (new QVBoxLayout(this))->setAutoAdd(true);
+ (new TQVBoxLayout(this))->setAutoAdd(true);
KateView* view = (KateView*)m_doc->views().at(0);
m_ac = view->editActionCollection();
m_keyChooser = new KKeyChooser( m_ac, this, false );
- connect( m_keyChooser, SIGNAL( keyChange() ), this, SLOT( slotChanged() ) );
+ connect( m_keyChooser, TQT_SIGNAL( keyChange() ), this, TQT_SLOT( slotChanged() ) );
m_keyChooser->show ();
m_ready = true;
}
- QWidget::show ();
+ TQWidget::show ();
}
void KateEditKeyConfiguration::apply()
@@ -846,49 +846,49 @@ void KateEditKeyConfiguration::apply()
//END KateEditKeyConfiguration
//BEGIN KateSaveConfigTab
-KateSaveConfigTab::KateSaveConfigTab( QWidget *parent )
+KateSaveConfigTab::KateSaveConfigTab( TQWidget *parent )
: KateConfigPage( parent )
{
int configFlags = KateDocumentConfig::global()->configFlags();
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
- QVGroupBox *gbEnc = new QVGroupBox(i18n("File Format"), this);
+ TQVGroupBox *gbEnc = new TQVGroupBox(i18n("File Format"), this);
layout->addWidget( gbEnc );
- QHBox *e5Layout = new QHBox(gbEnc);
- QLabel *e5Label = new QLabel(i18n("&Encoding:"), e5Layout);
+ TQHBox *e5Layout = new TQHBox(gbEnc);
+ TQLabel *e5Label = new TQLabel(i18n("&Encoding:"), e5Layout);
m_encoding = new KComboBox (e5Layout);
e5Label->setBuddy(m_encoding);
- e5Layout = new QHBox(gbEnc);
- e5Label = new QLabel(i18n("End &of line:"), e5Layout);
+ e5Layout = new TQHBox(gbEnc);
+ e5Label = new TQLabel(i18n("End &of line:"), e5Layout);
m_eol = new KComboBox (e5Layout);
e5Label->setBuddy(m_eol);
- allowEolDetection = new QCheckBox(i18n("&Automatic end of line detection"), gbEnc);
+ allowEolDetection = new TQCheckBox(i18n("&Automatic end of line detection"), gbEnc);
m_eol->insertItem (i18n("UNIX"));
m_eol->insertItem (i18n("DOS/Windows"));
m_eol->insertItem (i18n("Macintosh"));
- QVGroupBox *gbMem = new QVGroupBox(i18n("Memory Usage"), this);
+ TQVGroupBox *gbMem = new TQVGroupBox(i18n("Memory Usage"), this);
layout->addWidget( gbMem );
- e5Layout = new QHBox(gbMem);
+ e5Layout = new TQHBox(gbMem);
e5Layout->setSpacing (32);
- blockCountLabel = new QLabel(i18n("Maximum loaded &blocks per file:"), e5Layout);
- blockCount = new QSpinBox (4, 512, 4, e5Layout);
+ blockCountLabel = new TQLabel(i18n("Maximum loaded &blocks per file:"), e5Layout);
+ blockCount = new TQSpinBox (4, 512, 4, e5Layout);
blockCount->setValue (KateBuffer::maxLoadedBlocks());
blockCountLabel->setBuddy(blockCount);
- QVGroupBox *gbWhiteSpace = new QVGroupBox(i18n("Automatic Cleanups on Load/Save"), this);
+ TQVGroupBox *gbWhiteSpace = new TQVGroupBox(i18n("Automatic Cleanups on Load/Save"), this);
layout->addWidget( gbWhiteSpace );
- removeSpaces = new QCheckBox(i18n("Re&move trailing spaces"), gbWhiteSpace);
+ removeSpaces = new TQCheckBox(i18n("Re&move trailing spaces"), gbWhiteSpace);
removeSpaces->setChecked(configFlags & KateDocument::cfRemoveSpaces);
- QVGroupBox *dirConfigBox = new QVGroupBox(i18n("Folder Config File"), this);
+ TQVGroupBox *dirConfigBox = new TQVGroupBox(i18n("Folder Config File"), this);
layout->addWidget( dirConfigBox );
dirSearchDepth = new KIntNumInput(KateDocumentConfig::global()->searchDirConfigDepth(), dirConfigBox);
@@ -896,45 +896,45 @@ KateSaveConfigTab::KateSaveConfigTab( QWidget *parent )
dirSearchDepth->setSpecialValueText( i18n("Do not use config file") );
dirSearchDepth->setLabel(i18n("Se&arch depth for config file:"), AlignVCenter);
- QGroupBox *gb = new QGroupBox( 1, Qt::Horizontal, i18n("Backup on Save"), this );
+ TQGroupBox *gb = new TQGroupBox( 1, Qt::Horizontal, i18n("Backup on Save"), this );
layout->addWidget( gb );
- cbLocalFiles = new QCheckBox( i18n("&Local files"), gb );
- cbRemoteFiles = new QCheckBox( i18n("&Remote files"), gb );
+ cbLocalFiles = new TQCheckBox( i18n("&Local files"), gb );
+ cbRemoteFiles = new TQCheckBox( i18n("&Remote files"), gb );
- QHBox *hbBuPrefix = new QHBox( gb );
- QLabel *lBuPrefix = new QLabel( i18n("&Prefix:"), hbBuPrefix );
- leBuPrefix = new QLineEdit( hbBuPrefix );
+ TQHBox *hbBuPrefix = new TQHBox( gb );
+ TQLabel *lBuPrefix = new TQLabel( i18n("&Prefix:"), hbBuPrefix );
+ leBuPrefix = new TQLineEdit( hbBuPrefix );
lBuPrefix->setBuddy( leBuPrefix );
- QHBox *hbBuSuffix = new QHBox( gb );
- QLabel *lBuSuffix = new QLabel( i18n("&Suffix:"), hbBuSuffix );
- leBuSuffix = new QLineEdit( hbBuSuffix );
+ TQHBox *hbBuSuffix = new TQHBox( gb );
+ TQLabel *lBuSuffix = new TQLabel( i18n("&Suffix:"), hbBuSuffix );
+ leBuSuffix = new TQLineEdit( hbBuSuffix );
lBuSuffix->setBuddy( leBuSuffix );
layout->addStretch();
- QWhatsThis::add(removeSpaces, i18n(
+ TQWhatsThis::add(removeSpaces, i18n(
"The editor will automatically eliminate extra spaces at the ends of "
"lines of text while loading/saving the file."));
- QWhatsThis::add( gb, i18n(
+ TQWhatsThis::add( gb, i18n(
"<p>Backing up on save will cause Kate to copy the disk file to "
"'&lt;prefix&gt;&lt;filename&gt;&lt;suffix&gt;' before saving changes."
"<p>The suffix defaults to <strong>~</strong> and prefix is empty by default" ) );
- QWhatsThis::add( allowEolDetection, i18n(
+ TQWhatsThis::add( allowEolDetection, i18n(
"Check this if you want the editor to autodetect the end of line type."
"The first found end of line type will be used for the whole file.") );
- QWhatsThis::add( cbLocalFiles, i18n(
+ TQWhatsThis::add( cbLocalFiles, i18n(
"Check this if you want backups of local files when saving") );
- QWhatsThis::add( cbRemoteFiles, i18n(
+ TQWhatsThis::add( cbRemoteFiles, i18n(
"Check this if you want backups of remote files when saving") );
- QWhatsThis::add( leBuPrefix, i18n(
+ TQWhatsThis::add( leBuPrefix, i18n(
"Enter the prefix to prepend to the backup file names" ) );
- QWhatsThis::add( leBuSuffix, i18n(
+ TQWhatsThis::add( leBuSuffix, i18n(
"Enter the suffix to add to the backup file names" ) );
- QWhatsThis::add(dirSearchDepth, i18n(
+ TQWhatsThis::add(dirSearchDepth, i18n(
"The editor will search the given number of folder levels upwards for .kateconfig file"
" and load the settings line from it." ));
- QWhatsThis::add(blockCount, i18n(
+ TQWhatsThis::add(blockCount, i18n(
"The editor will load given number of blocks (of around 2048 lines) of text into memory;"
" if the filesize is bigger than this the other blocks are swapped "
" to disk and loaded transparently as-needed.<br>"
@@ -948,16 +948,16 @@ KateSaveConfigTab::KateSaveConfigTab( QWidget *parent )
// after initial reload, connect the stuff for the changed () signal
//
- connect(m_encoding, SIGNAL(activated(int)), this, SLOT(slotChanged()));
- connect(m_eol, SIGNAL(activated(int)), this, SLOT(slotChanged()));
- connect( allowEolDetection, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect(blockCount, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
- connect(removeSpaces, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect( cbLocalFiles, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( cbRemoteFiles, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect(dirSearchDepth, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
- connect( leBuPrefix, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( leBuSuffix, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
+ connect(m_encoding, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged()));
+ connect(m_eol, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged()));
+ connect( allowEolDetection, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect(blockCount, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
+ connect(removeSpaces, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect( cbLocalFiles, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( cbRemoteFiles, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect(dirSearchDepth, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
+ connect( leBuPrefix, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( leBuSuffix, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
}
void KateSaveConfigTab::apply()
@@ -1013,12 +1013,12 @@ void KateSaveConfigTab::reload()
m_encoding->clear ();
m_encoding->insertItem (i18n("KDE Default"));
m_encoding->setCurrentItem(0);
- QStringList encodings (KGlobal::charsets()->descriptiveEncodingNames());
+ TQStringList encodings (KGlobal::charsets()->descriptiveEncodingNames());
int insert = 1;
for (uint i=0; i < encodings.count(); i++)
{
bool found = false;
- QTextCodec *codecForEnc = KGlobal::charsets()->codecForName(KGlobal::charsets()->encodingForName(encodings[i]), found);
+ TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(KGlobal::charsets()->encodingForName(encodings[i]), found);
if (found)
{
@@ -1065,7 +1065,7 @@ void KateSaveConfigTab::defaults()
class KatePartPluginListItem : public QCheckListItem
{
public:
- KatePartPluginListItem(bool checked, uint i, const QString &name, QListView *parent);
+ KatePartPluginListItem(bool checked, uint i, const TQString &name, TQListView *parent);
uint pluginIndex () const { return index; }
protected:
@@ -1076,8 +1076,8 @@ class KatePartPluginListItem : public QCheckListItem
bool silentStateChange;
};
-KatePartPluginListItem::KatePartPluginListItem(bool checked, uint i, const QString &name, QListView *parent)
- : QCheckListItem(parent, name, CheckBox)
+KatePartPluginListItem::KatePartPluginListItem(bool checked, uint i, const TQString &name, TQListView *parent)
+ : TQCheckListItem(parent, name, CheckBox)
, index(i)
, silentStateChange(false)
{
@@ -1094,7 +1094,7 @@ void KatePartPluginListItem::stateChange(bool b)
//END
//BEGIN PluginListView
-KatePartPluginListView::KatePartPluginListView(QWidget *parent, const char *name)
+KatePartPluginListView::KatePartPluginListView(TQWidget *parent, const char *name)
: KListView(parent, name)
{
}
@@ -1106,10 +1106,10 @@ void KatePartPluginListView::stateChanged(KatePartPluginListItem *item, bool b)
//END
//BEGIN KatePartPluginConfigPage
-KatePartPluginConfigPage::KatePartPluginConfigPage (QWidget *parent) : KateConfigPage (parent, "")
+KatePartPluginConfigPage::KatePartPluginConfigPage (TQWidget *parent) : KateConfigPage (parent, "")
{
// sizemanagment
- QGridLayout *grid = new QGridLayout( this, 1, 1 );
+ TQGridLayout *grid = new TQGridLayout( this, 1, 1 );
grid->setSpacing( KDialogBase::spacingHint() );
listView = new KatePartPluginListView(this);
@@ -1129,15 +1129,15 @@ KatePartPluginConfigPage::KatePartPluginConfigPage (QWidget *parent) : KateConfi
// configure button
- btnConfigure = new QPushButton( i18n("Configure..."), this );
+ btnConfigure = new TQPushButton( i18n("Configure..."), this );
btnConfigure->setEnabled( false );
grid->addWidget( btnConfigure, 1, 0, Qt::AlignRight );
- connect( btnConfigure, SIGNAL(clicked()), this, SLOT(slotConfigure()) );
+ connect( btnConfigure, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotConfigure()) );
- connect( listView, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotCurrentChanged(QListViewItem*)) );
- connect( listView, SIGNAL(stateChange(KatePartPluginListItem *, bool)),
- this, SLOT(slotStateChanged(KatePartPluginListItem *, bool)));
- connect(listView, SIGNAL(stateChange(KatePartPluginListItem *, bool)), this, SLOT(slotChanged()));
+ connect( listView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotCurrentChanged(TQListViewItem*)) );
+ connect( listView, TQT_SIGNAL(stateChange(KatePartPluginListItem *, bool)),
+ this, TQT_SLOT(slotStateChanged(KatePartPluginListItem *, bool)));
+ connect(listView, TQT_SIGNAL(stateChange(KatePartPluginListItem *, bool)), this, TQT_SLOT(slotChanged()));
}
KatePartPluginConfigPage::~KatePartPluginConfigPage ()
@@ -1162,10 +1162,10 @@ void KatePartPluginConfigPage::apply ()
void KatePartPluginConfigPage::slotStateChanged( KatePartPluginListItem *item, bool b )
{
if ( b )
- slotCurrentChanged( (QListViewItem*)item );
+ slotCurrentChanged( (TQListViewItem*)item );
}
-void KatePartPluginConfigPage::slotCurrentChanged( QListViewItem* i )
+void KatePartPluginConfigPage::slotCurrentChanged( TQListViewItem* i )
{
KatePartPluginListItem *item = static_cast<KatePartPluginListItem *>(i);
if ( ! item ) return;
@@ -1175,7 +1175,7 @@ void KatePartPluginConfigPage::slotCurrentChanged( QListViewItem* i )
{
// load this plugin, and see if it has config pages
- KTextEditor::Plugin *plugin = KTextEditor::createPlugin(QFile::encodeName((KateFactory::self()->plugins())[item->pluginIndex()]->library()));
+ KTextEditor::Plugin *plugin = KTextEditor::createPlugin(TQFile::encodeName((KateFactory::self()->plugins())[item->pluginIndex()]->library()));
if ( plugin ) {
KTextEditor::ConfigInterfaceExtension *cie = KTextEditor::configInterfaceExtension( plugin );
b = ( cie && cie->configPages() );
@@ -1189,7 +1189,7 @@ void KatePartPluginConfigPage::slotConfigure()
{
KatePartPluginListItem *item = static_cast<KatePartPluginListItem*>(listView->currentItem());
KTextEditor::Plugin *plugin =
- KTextEditor::createPlugin(QFile::encodeName((KateFactory::self()->plugins())[item->pluginIndex()]->library()));
+ KTextEditor::createPlugin(TQFile::encodeName((KateFactory::self()->plugins())[item->pluginIndex()]->library()));
if ( ! plugin ) return;
@@ -1208,21 +1208,21 @@ void KatePartPluginConfigPage::slotConfigure()
KDialogBase::IconList : // still untested
KDialogBase::Plain;
- QString name = (KateFactory::self()->plugins())[item->pluginIndex()]->name();
+ TQString name = (KateFactory::self()->plugins())[item->pluginIndex()]->name();
KDialogBase *kd = new KDialogBase ( dt,
i18n("Configure %1").arg( name ),
KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help,
KDialogBase::Ok,
this );
- QPtrList<KTextEditor::ConfigPage> editorPages;
+ TQPtrList<KTextEditor::ConfigPage> editorPages;
for (uint i = 0; i < cife->configPages (); i++)
{
- QWidget *page;
+ TQWidget *page;
if ( dt == KDialogBase::IconList )
{
- QStringList path;
+ TQStringList path;
path.clear();
path << cife->configPageName( i );
page = kd->addVBoxPage( path, cife->configPageFullName (i),
@@ -1231,7 +1231,7 @@ void KatePartPluginConfigPage::slotConfigure()
else
{
page = kd->plainPage();
- QVBoxLayout *_l = new QVBoxLayout( page );
+ TQVBoxLayout *_l = new TQVBoxLayout( page );
_l->setAutoAdd( true );
}
@@ -1252,105 +1252,105 @@ void KatePartPluginConfigPage::slotConfigure()
//END KatePartPluginConfigPage
//BEGIN KateHlConfigPage
-KateHlConfigPage::KateHlConfigPage (QWidget *parent, KateDocument *doc)
+KateHlConfigPage::KateHlConfigPage (TQWidget *parent, KateDocument *doc)
: KateConfigPage (parent, "")
, hlData (0)
, m_doc (doc)
{
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
// hl chooser
- QHBox *hbHl = new QHBox( this );
+ TQHBox *hbHl = new TQHBox( this );
layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
- QLabel *lHl = new QLabel( i18n("H&ighlight:"), hbHl );
- hlCombo = new QComboBox( false, hbHl );
+ TQLabel *lHl = new TQLabel( i18n("H&ighlight:"), hbHl );
+ hlCombo = new TQComboBox( false, hbHl );
lHl->setBuddy( hlCombo );
- connect( hlCombo, SIGNAL(activated(int)),
- this, SLOT(hlChanged(int)) );
+ connect( hlCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(hlChanged(int)) );
for( int i = 0; i < KateHlManager::self()->highlights(); i++) {
if (KateHlManager::self()->hlSection(i).length() > 0)
- hlCombo->insertItem(KateHlManager::self()->hlSection(i) + QString ("/") + KateHlManager::self()->hlNameTranslated(i));
+ hlCombo->insertItem(KateHlManager::self()->hlSection(i) + TQString ("/") + KateHlManager::self()->hlNameTranslated(i));
else
hlCombo->insertItem(KateHlManager::self()->hlNameTranslated(i));
}
- QGroupBox *gbInfo = new QGroupBox( 1, Qt::Horizontal, i18n("Information"), this );
+ TQGroupBox *gbInfo = new TQGroupBox( 1, Qt::Horizontal, i18n("Information"), this );
layout->add (gbInfo);
// author
- QHBox *hb1 = new QHBox( gbInfo);
- new QLabel( i18n("Author:"), hb1 );
- author = new QLabel (hb1);
+ TQHBox *hb1 = new TQHBox( gbInfo);
+ new TQLabel( i18n("Author:"), hb1 );
+ author = new TQLabel (hb1);
author->setTextFormat (Qt::RichText);
// license
- QHBox *hb2 = new QHBox( gbInfo);
- new QLabel( i18n("License:"), hb2 );
- license = new QLabel (hb2);
+ TQHBox *hb2 = new TQHBox( gbInfo);
+ new TQLabel( i18n("License:"), hb2 );
+ license = new TQLabel (hb2);
- QGroupBox *gbProps = new QGroupBox( 1, Qt::Horizontal, i18n("Properties"), this );
+ TQGroupBox *gbProps = new TQGroupBox( 1, Qt::Horizontal, i18n("Properties"), this );
layout->add (gbProps);
// file & mime types
- QHBox *hbFE = new QHBox( gbProps);
- QLabel *lFileExts = new QLabel( i18n("File e&xtensions:"), hbFE );
- wildcards = new QLineEdit( hbFE );
+ TQHBox *hbFE = new TQHBox( gbProps);
+ TQLabel *lFileExts = new TQLabel( i18n("File e&xtensions:"), hbFE );
+ wildcards = new TQLineEdit( hbFE );
lFileExts->setBuddy( wildcards );
- QHBox *hbMT = new QHBox( gbProps );
- QLabel *lMimeTypes = new QLabel( i18n("MIME &types:"), hbMT);
- mimetypes = new QLineEdit( hbMT );
+ TQHBox *hbMT = new TQHBox( gbProps );
+ TQLabel *lMimeTypes = new TQLabel( i18n("MIME &types:"), hbMT);
+ mimetypes = new TQLineEdit( hbMT );
lMimeTypes->setBuddy( mimetypes );
- QHBox *hbMT2 = new QHBox( gbProps );
- QLabel *lprio = new QLabel( i18n("Prio&rity:"), hbMT2);
+ TQHBox *hbMT2 = new TQHBox( gbProps );
+ TQLabel *lprio = new TQLabel( i18n("Prio&rity:"), hbMT2);
priority = new KIntNumInput( hbMT2 );
lprio->setBuddy( priority );
- QToolButton *btnMTW = new QToolButton(hbMT);
- btnMTW->setIconSet(QIconSet(SmallIcon("wizard")));
- connect(btnMTW, SIGNAL(clicked()), this, SLOT(showMTDlg()));
+ TQToolButton *btnMTW = new TQToolButton(hbMT);
+ btnMTW->setIconSet(TQIconSet(SmallIcon("wizard")));
+ connect(btnMTW, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMTDlg()));
// download/new buttons
- QHBox *hbBtns = new QHBox( this );
+ TQHBox *hbBtns = new TQHBox( this );
layout->add (hbBtns);
- ((QBoxLayout*)hbBtns->layout())->addStretch(1); // hmm.
+ ((TQBoxLayout*)hbBtns->layout())->addStretch(1); // hmm.
hbBtns->setSpacing( KDialog::spacingHint() );
- QPushButton *btnDl = new QPushButton(i18n("Do&wnload..."), hbBtns);
- connect( btnDl, SIGNAL(clicked()), this, SLOT(hlDownload()) );
+ TQPushButton *btnDl = new TQPushButton(i18n("Do&wnload..."), hbBtns);
+ connect( btnDl, TQT_SIGNAL(clicked()), this, TQT_SLOT(hlDownload()) );
int currentHl = m_doc ? m_doc->hlMode() : 0;
hlCombo->setCurrentItem( currentHl );
hlChanged( currentHl );
- QWhatsThis::add( hlCombo, i18n(
+ TQWhatsThis::add( hlCombo, i18n(
"Choose a <em>Syntax Highlight mode</em> from this list to view its "
"properties below.") );
- QWhatsThis::add( wildcards, i18n(
+ TQWhatsThis::add( wildcards, i18n(
"The list of file extensions used to determine which files to highlight "
"using the current syntax highlight mode.") );
- QWhatsThis::add( mimetypes, i18n(
+ TQWhatsThis::add( mimetypes, i18n(
"The list of Mime Types used to determine which files to highlight "
"using the current highlight mode.<p>Click the wizard button on the "
"left of the entry field to display the MimeType selection dialog.") );
- QWhatsThis::add( btnMTW, i18n(
+ TQWhatsThis::add( btnMTW, i18n(
"Display a dialog with a list of all available mime types to choose from."
"<p>The <strong>File Extensions</strong> entry will automatically be "
"edited as well.") );
- QWhatsThis::add( btnDl, i18n(
+ TQWhatsThis::add( btnDl, i18n(
"Click this button to download new or updated syntax highlight "
"descriptions from the Kate website.") );
layout->addStretch ();
- connect( wildcards, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( mimetypes, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( priority, SIGNAL( valueChanged ( int ) ), this, SLOT( slotChanged() ) );
+ connect( wildcards, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( mimetypes, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( priority, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotChanged() ) );
}
KateHlConfigPage::~KateHlConfigPage ()
@@ -1366,7 +1366,7 @@ void KateHlConfigPage::apply ()
writeback();
- for ( QIntDictIterator<KateHlData> it( hlDataDict ); it.current(); ++it )
+ for ( TQIntDictIterator<KateHlData> it( hlDataDict ); it.current(); ++it )
KateHlManager::self()->getHl( it.currentKey() )->setData( it.current() );
KateHlManager::self()->getKConfig()->sync ();
@@ -1397,7 +1397,7 @@ void KateHlConfigPage::hlChanged(int z)
priority->setValue(hlData->priority);
// split author string if needed into multiple lines !
- QStringList l= QStringList::split (QRegExp("[,;]"), hl->author());
+ TQStringList l= TQStringList::split (TQRegExp("[,;]"), hl->author());
author->setText (l.join ("<br>"));
license->setText (hl->license());
@@ -1421,8 +1421,8 @@ void KateHlConfigPage::hlDownload()
void KateHlConfigPage::showMTDlg()
{
- QString text = i18n("Select the MimeTypes you want highlighted using the '%1' syntax highlight rules.\nPlease note that this will automatically edit the associated file extensions as well.").arg( hlCombo->currentText() );
- QStringList list = QStringList::split( QRegExp("\\s*;\\s*"), mimetypes->text() );
+ TQString text = i18n("Select the MimeTypes you want highlighted using the '%1' syntax highlight rules.\nPlease note that this will automatically edit the associated file extensions as well.").arg( hlCombo->currentText() );
+ TQStringList list = TQStringList::split( TQRegExp("\\s*;\\s*"), mimetypes->text() );
KMimeTypeChooserDialog d( i18n("Select Mime Types"), text, list, "text", this );
if ( d.exec() == KDialogBase::Accepted ) {
@@ -1435,38 +1435,38 @@ void KateHlConfigPage::showMTDlg()
//END KateHlConfigPage
//BEGIN KateHlDownloadDialog
-KateHlDownloadDialog::KateHlDownloadDialog(QWidget *parent, const char *name, bool modal)
+KateHlDownloadDialog::KateHlDownloadDialog(TQWidget *parent, const char *name, bool modal)
:KDialogBase(KDialogBase::Swallow, i18n("Highlight Download"), User1|Close, User1, parent, name, modal, true, i18n("&Install"))
{
- QVBox* vbox = new QVBox(this);
+ TQVBox* vbox = new TQVBox(this);
setMainWidget(vbox);
vbox->setSpacing(spacingHint());
- new QLabel(i18n("Select the syntax highlighting files you want to update:"), vbox);
- list = new QListView(vbox);
+ new TQLabel(i18n("Select the syntax highlighting files you want to update:"), vbox);
+ list = new TQListView(vbox);
list->addColumn("");
list->addColumn(i18n("Name"));
list->addColumn(i18n("Installed"));
list->addColumn(i18n("Latest"));
- list->setSelectionMode(QListView::Multi);
+ list->setSelectionMode(TQListView::Multi);
list->setAllColumnsShowFocus(true);
- new QLabel(i18n("<b>Note:</b> New versions are selected automatically."), vbox);
+ new TQLabel(i18n("<b>Note:</b> New versions are selected automatically."), vbox);
actionButton (User1)->setIconSet(SmallIconSet("ok"));
transferJob = KIO::get(
- KURL(QString(HLDOWNLOADPATH)
- + QString("update-")
- + QString(KATEPART_VERSION)
- + QString(".xml")), true, true );
- connect(transferJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(listDataReceived(KIO::Job *, const QByteArray &)));
-// void data( KIO::Job *, const QByteArray &data);
+ KURL(TQString(HLDOWNLOADPATH)
+ + TQString("update-")
+ + TQString(KATEPART_VERSION)
+ + TQString(".xml")), true, true );
+ connect(transferJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(listDataReceived(KIO::Job *, const TQByteArray &)));
+// void data( KIO::Job *, const TQByteArray &data);
resize(450, 400);
}
KateHlDownloadDialog::~KateHlDownloadDialog(){}
-void KateHlDownloadDialog::listDataReceived(KIO::Job *, const QByteArray &data)
+void KateHlDownloadDialog::listDataReceived(KIO::Job *, const TQByteArray &data)
{
if (!transferJob || transferJob->isErrorPage())
{
@@ -1474,20 +1474,20 @@ void KateHlDownloadDialog::listDataReceived(KIO::Job *, const QByteArray &data)
return;
}
- listData+=QString(data);
- kdDebug(13000)<<QString("CurrentListData: ")<<listData<<endl<<endl;
- kdDebug(13000)<<QString("Data length: %1").arg(data.size())<<endl;
- kdDebug(13000)<<QString("listData length: %1").arg(listData.length())<<endl;
+ listData+=TQString(data);
+ kdDebug(13000)<<TQString("CurrentListData: ")<<listData<<endl<<endl;
+ kdDebug(13000)<<TQString("Data length: %1").arg(data.size())<<endl;
+ kdDebug(13000)<<TQString("listData length: %1").arg(listData.length())<<endl;
if (data.size()==0)
{
if (listData.length()>0)
{
- QString installedVersion;
+ TQString installedVersion;
KateHlManager *hlm=KateHlManager::self();
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(listData);
- QDomElement DocElem=doc.documentElement();
- QDomNode n=DocElem.firstChild();
+ TQDomElement DocElem=doc.documentElement();
+ TQDomNode n=DocElem.firstChild();
KateHighlighting *hl = 0;
if (n.isNull()) kdDebug(13000)<<"There is no usable childnode"<<endl;
@@ -1495,12 +1495,12 @@ void KateHlDownloadDialog::listDataReceived(KIO::Job *, const QByteArray &data)
{
installedVersion=" --";
- QDomElement e=n.toElement();
+ TQDomElement e=n.toElement();
if (!e.isNull())
- kdDebug(13000)<<QString("NAME: ")<<e.tagName()<<QString(" - ")<<e.attribute("name")<<endl;
+ kdDebug(13000)<<TQString("NAME: ")<<e.tagName()<<TQString(" - ")<<e.attribute("name")<<endl;
n=n.nextSibling();
- QString Name=e.attribute("name");
+ TQString Name=e.attribute("name");
for (int i=0;i<hlm->highlights();i++)
{
@@ -1514,7 +1514,7 @@ void KateHlDownloadDialog::listDataReceived(KIO::Job *, const QByteArray &data)
}
// autoselect entry if new or updated.
- QListViewItem* entry = new QListViewItem(
+ TQListViewItem* entry = new TQListViewItem(
list, "", e.attribute("name"), installedVersion,
e.attribute("version"),e.attribute("url"));
if (!hl || hl->version() < e.attribute("version"))
@@ -1529,14 +1529,14 @@ void KateHlDownloadDialog::listDataReceived(KIO::Job *, const QByteArray &data)
void KateHlDownloadDialog::slotUser1()
{
- QString destdir=KGlobal::dirs()->saveLocation("data","katepart/syntax/");
- for (QListViewItem *it=list->firstChild();it;it=it->nextSibling())
+ TQString destdir=KGlobal::dirs()->saveLocation("data","katepart/syntax/");
+ for (TQListViewItem *it=list->firstChild();it;it=it->nextSibling())
{
if (list->isSelected(it))
{
KURL src(it->text(4));
- QString filename=src.fileName(false);
- QString dest = destdir+filename;
+ TQString filename=src.fileName(false);
+ TQString dest = destdir+filename;
KIO::NetAccess::download(src,dest, this);
}
@@ -1548,18 +1548,18 @@ void KateHlDownloadDialog::slotUser1()
//END KateHlDownloadDialog
//BEGIN KateGotoLineDialog
-KateGotoLineDialog::KateGotoLineDialog(QWidget *parent, int line, int max)
+KateGotoLineDialog::KateGotoLineDialog(TQWidget *parent, int line, int max)
: KDialogBase(parent, 0L, true, i18n("Go to Line"), Ok | Cancel, Ok) {
- QWidget *page = new QWidget(this);
+ TQWidget *page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
e1 = new KIntNumInput(line, page);
e1->setRange(1, max);
e1->setEditFocus(true);
- QLabel *label = new QLabel( e1,i18n("&Go to line:"), page );
+ TQLabel *label = new TQLabel( e1,i18n("&Go to line:"), page );
topLayout->addWidget(label);
topLayout->addWidget(e1);
topLayout->addSpacing(spacingHint()); // A little bit extra space
@@ -1575,14 +1575,14 @@ int KateGotoLineDialog::getLine() {
//BEGIN KateModOnHdPrompt
KateModOnHdPrompt::KateModOnHdPrompt( KateDocument *doc,
int modtype,
- const QString &reason,
- QWidget *parent )
+ const TQString &reason,
+ TQWidget *parent )
: KDialogBase( parent, "", true, "", Ok|Apply|Cancel|User1 ),
m_doc( doc ),
m_modtype ( modtype ),
m_tmpfile( 0 )
{
- QString title, btnOK, whatisok;
+ TQString title, btnOK, whatisok;
if ( modtype == 3 ) // deleted
{
title = i18n("File Was Deleted on Disk");
@@ -1606,23 +1606,23 @@ KateModOnHdPrompt::KateModOnHdPrompt( KateDocument *doc,
enableButtonSeparator( true );
setCaption( title );
- QFrame *w = makeMainWidget();
- QVBoxLayout *lo = new QVBoxLayout( w );
- QHBoxLayout *lo1 = new QHBoxLayout( lo );
- QLabel *icon = new QLabel( w );
+ TQFrame *w = makeMainWidget();
+ TQVBoxLayout *lo = new TQVBoxLayout( w );
+ TQHBoxLayout *lo1 = new TQHBoxLayout( lo );
+ TQLabel *icon = new TQLabel( w );
icon->setPixmap( DesktopIcon("messagebox_warning" ) );
lo1->addWidget( icon );
- lo1->addWidget( new QLabel( reason + "\n\n" + i18n("What do you want to do?"), w ) );
+ lo1->addWidget( new TQLabel( reason + "\n\n" + i18n("What do you want to do?"), w ) );
// If the file isn't deleted, present a diff button, and a overwrite action.
if ( modtype != 3 )
{
- QHBoxLayout *lo2 = new QHBoxLayout( lo );
- QPushButton *btnDiff = new QPushButton( i18n("&View Difference"), w );
+ TQHBoxLayout *lo2 = new TQHBoxLayout( lo );
+ TQPushButton *btnDiff = new TQPushButton( i18n("&View Difference"), w );
lo2->addStretch( 1 );
lo2->addWidget( btnDiff );
- connect( btnDiff, SIGNAL(clicked()), this, SLOT(slotDiff()) );
- QWhatsThis::add( btnDiff, i18n(
+ connect( btnDiff, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDiff()) );
+ TQWhatsThis::add( btnDiff, i18n(
"Calculates the difference between the editor contents and the disk "
"file using diff(1) and opens the diff file with the default application "
"for that.") );
@@ -1644,8 +1644,8 @@ void KateModOnHdPrompt::slotDiff()
KProcIO *p = new KProcIO();
p->setComm( KProcess::All );
*p << "diff" << "-u" << "-" << m_doc->url().path();
- connect( p, SIGNAL(processExited(KProcess*)), this, SLOT(slotPDone(KProcess*)) );
- connect( p, SIGNAL(readReady(KProcIO*)), this, SLOT(slotPRead(KProcIO*)) );
+ connect( p, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotPDone(KProcess*)) );
+ connect( p, TQT_SIGNAL(readReady(KProcIO*)), this, TQT_SLOT(slotPRead(KProcIO*)) );
setCursor( WaitCursor );
@@ -1664,7 +1664,7 @@ void KateModOnHdPrompt::slotPRead( KProcIO *p)
if ( ! m_tmpfile )
m_tmpfile = new KTempFile();
// put all the data we have in it
- QString stmp;
+ TQString stmp;
bool dataRead = false;
while ( p->readln( stmp, false ) > -1 )
{
diff --git a/kate/part/katedialogs.h b/kate/part/katedialogs.h
index ba03d5eff..8c8b2b61e 100644
--- a/kate/part/katedialogs.h
+++ b/kate/part/katedialogs.h
@@ -33,11 +33,11 @@
#include <kdialogbase.h>
#include <kmimetype.h>
-#include <qstringlist.h>
-#include <qcolor.h>
-#include <qintdict.h>
-#include <qvbox.h>
-#include <qtabwidget.h>
+#include <tqstringlist.h>
+#include <tqcolor.h>
+#include <tqintdict.h>
+#include <tqvbox.h>
+#include <tqtabwidget.h>
class KatePartPluginListItem;
@@ -82,7 +82,7 @@ class KateConfigPage : public Kate::ConfigPage
Q_OBJECT
public:
- KateConfigPage ( QWidget *parent=0, const char *name=0 );
+ KateConfigPage ( TQWidget *parent=0, const char *name=0 );
virtual ~KateConfigPage ();
public:
@@ -101,13 +101,13 @@ class KateGotoLineDialog : public KDialogBase
public:
- KateGotoLineDialog(QWidget *parent, int line, int max);
+ KateGotoLineDialog(TQWidget *parent, int line, int max);
int getLine();
protected:
KIntNumInput *e1;
- QPushButton *btnOK;
+ TQPushButton *btnOK;
};
class KateIndentConfigTab : public KateConfigPage
@@ -115,7 +115,7 @@ class KateIndentConfigTab : public KateConfigPage
Q_OBJECT
public:
- KateIndentConfigTab(QWidget *parent);
+ KateIndentConfigTab(TQWidget *parent);
protected slots:
void somethingToggled();
@@ -124,11 +124,11 @@ class KateIndentConfigTab : public KateConfigPage
protected:
enum { numFlags = 8 };
static const int flags[numFlags];
- QCheckBox *opt[numFlags];
+ TQCheckBox *opt[numFlags];
KIntNumInput *indentationWidth;
- QButtonGroup *m_tabs;
+ TQButtonGroup *m_tabs;
KComboBox *m_indentMode;
- QPushButton *m_configPage;
+ TQPushButton *m_configPage;
public slots:
void configPage();
@@ -144,16 +144,16 @@ class KateSelectConfigTab : public KateConfigPage
Q_OBJECT
public:
- KateSelectConfigTab(QWidget *parent);
+ KateSelectConfigTab(TQWidget *parent);
protected:
enum { numFlags = 2 };
static const int flags[numFlags];
- QCheckBox *opt[numFlags];
+ TQCheckBox *opt[numFlags];
- QButtonGroup *m_tabs;
+ TQButtonGroup *m_tabs;
KIntNumInput *e4;
- QCheckBox *e6;
+ TQCheckBox *e6;
public slots:
void apply ();
@@ -167,18 +167,18 @@ class KateEditConfigTab : public KateConfigPage
Q_OBJECT
public:
- KateEditConfigTab(QWidget *parent);
+ KateEditConfigTab(TQWidget *parent);
protected:
enum { numFlags = 5 };
static const int flags[numFlags];
- QCheckBox *opt[numFlags];
+ TQCheckBox *opt[numFlags];
KIntNumInput *e1;
KIntNumInput *e2;
KIntNumInput *e3;
KComboBox *e5;
- QCheckBox *m_wwmarker;
+ TQCheckBox *m_wwmarker;
public slots:
void apply ();
@@ -192,21 +192,21 @@ class KateViewDefaultsConfig : public KateConfigPage
Q_OBJECT
public:
- KateViewDefaultsConfig( QWidget *parent );
+ KateViewDefaultsConfig( TQWidget *parent );
~KateViewDefaultsConfig();
private:
- QCheckBox *m_line;
- QCheckBox *m_folding;
- QCheckBox *m_collapseTopLevel;
- QCheckBox *m_icons;
- QCheckBox *m_scrollBarMarks;
- QCheckBox *m_dynwrap;
- QCheckBox *m_showIndentLines;
+ TQCheckBox *m_line;
+ TQCheckBox *m_folding;
+ TQCheckBox *m_collapseTopLevel;
+ TQCheckBox *m_icons;
+ TQCheckBox *m_scrollBarMarks;
+ TQCheckBox *m_dynwrap;
+ TQCheckBox *m_showIndentLines;
KIntNumInput *m_dynwrapAlignLevel;
- QLabel *m_dynwrapIndicatorsLabel;
+ TQLabel *m_dynwrapIndicatorsLabel;
KComboBox *m_dynwrapIndicatorsCombo;
- QButtonGroup *m_bmSort;
+ TQButtonGroup *m_bmSort;
public slots:
void apply ();
@@ -220,7 +220,7 @@ class KateEditKeyConfiguration: public KateConfigPage
Q_OBJECT
public:
- KateEditKeyConfiguration( QWidget* parent, KateDocument* doc );
+ KateEditKeyConfiguration( TQWidget* parent, KateDocument* doc );
public slots:
void apply();
@@ -229,7 +229,7 @@ class KateEditKeyConfiguration: public KateConfigPage
void defaults() {};
protected:
- void showEvent ( QShowEvent * );
+ void showEvent ( TQShowEvent * );
private:
bool m_ready;
@@ -242,7 +242,7 @@ class KateSaveConfigTab : public KateConfigPage
{
Q_OBJECT
public:
- KateSaveConfigTab( QWidget *parent );
+ KateSaveConfigTab( TQWidget *parent );
public slots:
void apply();
@@ -252,13 +252,13 @@ class KateSaveConfigTab : public KateConfigPage
protected:
KComboBox *m_encoding, *m_eol;
- QCheckBox *cbLocalFiles, *cbRemoteFiles;
- QCheckBox *replaceTabs, *removeSpaces, *allowEolDetection;
- QLineEdit *leBuPrefix;
- QLineEdit *leBuSuffix;
+ TQCheckBox *cbLocalFiles, *cbRemoteFiles;
+ TQCheckBox *replaceTabs, *removeSpaces, *allowEolDetection;
+ TQLineEdit *leBuPrefix;
+ TQLineEdit *leBuSuffix;
KIntNumInput *dirSearchDepth;
- class QSpinBox *blockCount;
- class QLabel *blockCountLabel;
+ class TQSpinBox *blockCount;
+ class TQLabel *blockCountLabel;
};
class KatePartPluginListItem;
@@ -270,7 +270,7 @@ class KatePartPluginListView : public KListView
friend class KatePartPluginListItem;
public:
- KatePartPluginListView (QWidget *parent = 0, const char *name = 0);
+ KatePartPluginListView (TQWidget *parent = 0, const char *name = 0);
signals:
void stateChange(KatePartPluginListItem *, bool);
@@ -285,7 +285,7 @@ class KatePartPluginConfigPage : public KateConfigPage
Q_OBJECT
public:
- KatePartPluginConfigPage (QWidget *parent);
+ KatePartPluginConfigPage (TQWidget *parent);
~KatePartPluginConfigPage ();
public slots:
@@ -295,14 +295,14 @@ class KatePartPluginConfigPage : public KateConfigPage
void defaults () {};
private slots:
- void slotCurrentChanged( QListViewItem * );
+ void slotCurrentChanged( TQListViewItem * );
void slotConfigure();
void slotStateChanged( KatePartPluginListItem *, bool );
private:
KatePartPluginListView *listView;
- QPtrList<KatePartPluginListItem> m_items;
- class QPushButton *btnConfigure;
+ TQPtrList<KatePartPluginListItem> m_items;
+ class TQPushButton *btnConfigure;
};
class KateHlConfigPage : public KateConfigPage
@@ -310,7 +310,7 @@ class KateHlConfigPage : public KateConfigPage
Q_OBJECT
public:
- KateHlConfigPage (QWidget *parent, KateDocument *doc);
+ KateHlConfigPage (TQWidget *parent, KateDocument *doc);
~KateHlConfigPage ();
public slots:
@@ -327,13 +327,13 @@ class KateHlConfigPage : public KateConfigPage
private:
void writeback ();
- QComboBox *hlCombo;
- QLineEdit *wildcards;
- QLineEdit *mimetypes;
+ TQComboBox *hlCombo;
+ TQLineEdit *wildcards;
+ TQLineEdit *mimetypes;
class KIntNumInput *priority;
- class QLabel *author, *license;
+ class TQLabel *author, *license;
- QIntDict<KateHlData> hlDataDict;
+ TQIntDict<KateHlData> hlDataDict;
KateHlData *hlData;
KateDocument *m_doc;
@@ -344,16 +344,16 @@ class KateHlDownloadDialog: public KDialogBase
Q_OBJECT
public:
- KateHlDownloadDialog(QWidget *parent, const char *name, bool modal);
+ KateHlDownloadDialog(TQWidget *parent, const char *name, bool modal);
~KateHlDownloadDialog();
private:
- class QListView *list;
- class QString listData;
+ class TQListView *list;
+ class TQString listData;
KIO::TransferJob *transferJob;
private slots:
- void listDataReceived(KIO::Job *, const QByteArray &data);
+ void listDataReceived(KIO::Job *, const TQByteArray &data);
public slots:
void slotUser1();
@@ -377,7 +377,7 @@ class KateModOnHdPrompt : public KDialogBase
Overwrite,
Ignore
};
- KateModOnHdPrompt( KateDocument *doc, int modtype, const QString &reason, QWidget *parent );
+ KateModOnHdPrompt( KateDocument *doc, int modtype, const TQString &reason, TQWidget *parent );
~KateModOnHdPrompt();
public slots:
diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp
index c7b5a08b6..fe5e22b1d 100644
--- a/kate/part/katedocument.cpp
+++ b/kate/part/katedocument.cpp
@@ -70,12 +70,12 @@
#include <kmdcodec.h>
#include <kstandarddirs.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qclipboard.h>
-#include <qtextstream.h>
-#include <qtextcodec.h>
-#include <qmap.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqclipboard.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
+#include <tqmap.h>
//END includes
//BEGIN PRIVATE CLASSES
@@ -91,8 +91,8 @@ class KatePartPluginItem
// KateDocument Constructor
//
KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
- bool bReadOnly, QWidget *parentWidget,
- const char *widgetName, QObject *parent, const char *name)
+ bool bReadOnly, TQWidget *parentWidget,
+ const char *widgetName, TQObject *parent, const char *name)
: Kate::Document(parent, name),
m_plugins (KateFactory::self()->plugins().count()),
m_undoDontMerge(false),
@@ -170,8 +170,8 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
m_markDescriptions.setAutoDelete( true );
setMarksUserChangable( markType01 );
- m_undoMergeTimer = new QTimer(this);
- connect(m_undoMergeTimer, SIGNAL(timeout()), SLOT(undoCancel()));
+ m_undoMergeTimer = new TQTimer(this);
+ connect(m_undoMergeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(undoCancel()));
clearMarks ();
clearUndo ();
@@ -189,24 +189,24 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
m_indenter->updateConfig ();
// some nice signals from the buffer
- connect(m_buffer, SIGNAL(tagLines(int,int)), this, SLOT(tagLines(int,int)));
- connect(m_buffer, SIGNAL(codeFoldingUpdated()),this,SIGNAL(codeFoldingUpdated()));
+ connect(m_buffer, TQT_SIGNAL(tagLines(int,int)), this, TQT_SLOT(tagLines(int,int)));
+ connect(m_buffer, TQT_SIGNAL(codeFoldingUpdated()),this,TQT_SIGNAL(codeFoldingUpdated()));
// if the user changes the highlight with the dialog, notify the doc
- connect(KateHlManager::self(),SIGNAL(changed()),SLOT(internalHlChanged()));
+ connect(KateHlManager::self(),TQT_SIGNAL(changed()),TQT_SLOT(internalHlChanged()));
// signal for the arbitrary HL
- connect(m_arbitraryHL, SIGNAL(tagLines(KateView*, KateSuperRange*)), SLOT(tagArbitraryLines(KateView*, KateSuperRange*)));
+ connect(m_arbitraryHL, TQT_SIGNAL(tagLines(KateView*, KateSuperRange*)), TQT_SLOT(tagArbitraryLines(KateView*, KateSuperRange*)));
// signals for mod on hd
- connect( KateFactory::self()->dirWatch(), SIGNAL(dirty (const QString &)),
- this, SLOT(slotModOnHdDirty (const QString &)) );
+ connect( KateFactory::self()->dirWatch(), TQT_SIGNAL(dirty (const TQString &)),
+ this, TQT_SLOT(slotModOnHdDirty (const TQString &)) );
- connect( KateFactory::self()->dirWatch(), SIGNAL(created (const QString &)),
- this, SLOT(slotModOnHdCreated (const QString &)) );
+ connect( KateFactory::self()->dirWatch(), TQT_SIGNAL(created (const TQString &)),
+ this, TQT_SLOT(slotModOnHdCreated (const TQString &)) );
- connect( KateFactory::self()->dirWatch(), SIGNAL(deleted (const QString &)),
- this, SLOT(slotModOnHdDeleted (const QString &)) );
+ connect( KateFactory::self()->dirWatch(), TQT_SIGNAL(deleted (const TQString &)),
+ this, TQT_SLOT(slotModOnHdDeleted (const TQString &)) );
// update doc name
setDocName ("");
@@ -220,7 +220,7 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
setWidget( view );
}
- connect(this,SIGNAL(sigQueryClose(bool *, bool*)),this,SLOT(slotQueryClose_save(bool *, bool*)));
+ connect(this,TQT_SIGNAL(sigQueryClose(bool *, bool*)),this,TQT_SLOT(slotQueryClose_save(bool *, bool*)));
m_isasking = 0;
@@ -287,7 +287,7 @@ void KateDocument::loadPlugin (uint pluginIndex)
{
if (m_plugins[pluginIndex]) return;
- m_plugins[pluginIndex] = KTextEditor::createPlugin (QFile::encodeName((KateFactory::self()->plugins())[pluginIndex]->library()), this);
+ m_plugins[pluginIndex] = KTextEditor::createPlugin (TQFile::encodeName((KateFactory::self()->plugins())[pluginIndex]->library()), this);
enablePluginGUI (m_plugins[pluginIndex]);
}
@@ -353,16 +353,16 @@ void KateDocument::disablePluginGUI (KTextEditor::Plugin *plugin)
//BEGIN KTextEditor::Document stuff
-KTextEditor::View *KateDocument::createView( QWidget *parent, const char *name )
+KTextEditor::View *KateDocument::createView( TQWidget *parent, const char *name )
{
KateView* newView = new KateView( this, parent, name);
- connect(newView, SIGNAL(cursorPositionChanged()), SLOT(undoCancel()));
+ connect(newView, TQT_SIGNAL(cursorPositionChanged()), TQT_SLOT(undoCancel()));
if ( s_fileChangedDialogsActivated )
- connect( newView, SIGNAL(gotFocus( Kate::View * )), this, SLOT(slotModifiedOnDisk()) );
+ connect( newView, TQT_SIGNAL(gotFocus( Kate::View * )), this, TQT_SLOT(slotModifiedOnDisk()) );
return newView;
}
-QPtrList<KTextEditor::View> KateDocument::views () const
+TQPtrList<KTextEditor::View> KateDocument::views () const
{
return m_textEditViews;
}
@@ -382,7 +382,7 @@ uint KateDocument::configPages () const
return 10;
}
-KTextEditor::ConfigPage *KateDocument::configPage (uint number, QWidget *parent, const char * )
+KTextEditor::ConfigPage *KateDocument::configPage (uint number, TQWidget *parent, const char * )
{
switch( number )
{
@@ -423,7 +423,7 @@ KTextEditor::ConfigPage *KateDocument::configPage (uint number, QWidget *parent,
return 0;
}
-QString KateDocument::configPageName (uint number) const
+TQString KateDocument::configPageName (uint number) const
{
switch( number )
{
@@ -458,13 +458,13 @@ QString KateDocument::configPageName (uint number) const
return i18n ("Plugins");
default:
- return QString ("");
+ return TQString ("");
}
- return QString ("");
+ return TQString ("");
}
-QString KateDocument::configPageFullName (uint number) const
+TQString KateDocument::configPageFullName (uint number) const
{
switch( number )
{
@@ -499,13 +499,13 @@ QString KateDocument::configPageFullName (uint number) const
return i18n ("Plugin Manager");
default:
- return QString ("");
+ return TQString ("");
}
- return QString ("");
+ return TQString ("");
}
-QPixmap KateDocument::configPagePixmap (uint number, int size) const
+TQPixmap KateDocument::configPagePixmap (uint number, int size) const
{
switch( number )
{
@@ -549,9 +549,9 @@ QPixmap KateDocument::configPagePixmap (uint number, int size) const
//BEGIN KTextEditor::EditInterface stuff
-QString KateDocument::text() const
+TQString KateDocument::text() const
{
- QString s;
+ TQString s;
for (uint i = 0; i < m_buffer->count(); i++)
{
@@ -569,27 +569,27 @@ QString KateDocument::text() const
return s;
}
-QString KateDocument::text ( uint startLine, uint startCol, uint endLine, uint endCol ) const
+TQString KateDocument::text ( uint startLine, uint startCol, uint endLine, uint endCol ) const
{
return text(startLine, startCol, endLine, endCol, false);
}
-QString KateDocument::text ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise) const
+TQString KateDocument::text ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise) const
{
if ( blockwise && (startCol > endCol) )
- return QString ();
+ return TQString ();
- QString s;
+ TQString s;
if (startLine == endLine)
{
if (startCol > endCol)
- return QString ();
+ return TQString ();
KateTextLine::Ptr textLine = m_buffer->plainLine(startLine);
if ( !textLine )
- return QString ();
+ return TQString ();
return textLine->string(startCol, endCol-startCol);
}
@@ -622,23 +622,23 @@ QString KateDocument::text ( uint startLine, uint startCol, uint endLine, uint e
return s;
}
-QString KateDocument::textLine( uint line ) const
+TQString KateDocument::textLine( uint line ) const
{
KateTextLine::Ptr l = m_buffer->plainLine(line);
if (!l)
- return QString();
+ return TQString();
return l->string();
}
-bool KateDocument::setText(const QString &s)
+bool KateDocument::setText(const TQString &s)
{
if (!isReadWrite())
return false;
- QPtrList<KTextEditor::Mark> m = marks ();
- QValueList<KTextEditor::Mark> msave;
+ TQPtrList<KTextEditor::Mark> m = marks ();
+ TQValueList<KTextEditor::Mark> msave;
for (uint i=0; i < m.count(); i++)
msave.append (*m.at(i));
@@ -675,12 +675,12 @@ bool KateDocument::clear()
return removeText (0,0,lastLine()+1, 0);
}
-bool KateDocument::insertText( uint line, uint col, const QString &s)
+bool KateDocument::insertText( uint line, uint col, const TQString &s)
{
return insertText (line, col, s, false);
}
-bool KateDocument::insertText( uint line, uint col, const QString &s, bool blockwise )
+bool KateDocument::insertText( uint line, uint col, const TQString &s, bool blockwise )
{
if (!isReadWrite())
return false;
@@ -698,7 +698,7 @@ bool KateDocument::insertText( uint line, uint col, const QString &s, bool block
uint insertPos = col;
uint len = s.length();
- QString buf;
+ TQString buf;
bool replacetabs = ( config()->configFlags() & KateDocumentConfig::cfReplaceTabsDyn && ! m_isInUndo );
uint tw = config()->tabWidth();
@@ -709,7 +709,7 @@ bool KateDocument::insertText( uint line, uint col, const QString &s, bool block
for (uint pos = 0; pos < len; pos++)
{
- QChar ch = s[pos];
+ TQChar ch = s[pos];
if (ch == '\n')
{
@@ -845,7 +845,7 @@ bool KateDocument::removeText ( uint startLine, uint startCol, uint endLine, uin
return true;
}
-bool KateDocument::insertLine( uint l, const QString &str )
+bool KateDocument::insertLine( uint l, const TQString &str )
{
if (!isReadWrite())
return false;
@@ -1064,16 +1064,16 @@ bool KateDocument::wrapText (uint startLine, uint endLine)
kdDebug (13020) << "do wrap line: " << line << endl;
- const QChar *text = l->text();
+ const TQChar *text = l->text();
uint eolPosition = l->length()-1;
// take tabs into account here, too
uint x = 0;
- const QString & t = l->string();
+ const TQString & t = l->string();
uint z2 = 0;
for ( ; z2 < l->length(); z2++)
{
- if (t[z2] == QChar('\t'))
+ if (t[z2] == TQChar('\t'))
x += m_buffer->tabWidth() - (x % m_buffer->tabWidth());
else
x++;
@@ -1128,7 +1128,7 @@ bool KateDocument::wrapText (uint startLine, uint endLine)
else
{
if (nextl && (nextl->length() > 0) && !nextl->getChar(0).isSpace() && ((l->length() < 1) || !l->getChar(l->length()-1).isSpace()))
- editInsertText (line+1, 0, QString (" "));
+ editInsertText (line+1, 0, TQString (" "));
bool newLineAdded = false;
editWrapLine (line, z, false, &newLineAdded);
@@ -1145,7 +1145,7 @@ bool KateDocument::wrapText (uint startLine, uint endLine)
return true;
}
-void KateDocument::editAddUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text)
+void KateDocument::editAddUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text)
{
if (editIsRunning && editWithUndo && m_editCurrentUndo) {
m_editCurrentUndo->addItem(type, line, col, len, text);
@@ -1159,12 +1159,12 @@ void KateDocument::editAddUndo (KateUndoGroup::UndoType type, uint line, uint co
}
}
-bool KateDocument::editInsertText ( uint line, uint col, const QString &str )
+bool KateDocument::editInsertText ( uint line, uint col, const TQString &str )
{
if (!isReadWrite())
return false;
- QString s = str;
+ TQString s = str;
KateTextLine::Ptr l = m_buffer->line(line);
@@ -1179,7 +1179,7 @@ bool KateDocument::editInsertText ( uint line, uint col, const QString &str )
while ( (pos = s.find('\t')) > -1 )
{
l = tw - ( (col + pos)%tw );
- s.replace( pos, 1, QString().fill( ' ', l ) );
+ s.replace( pos, 1, TQString().fill( ' ', l ) );
}
}
@@ -1192,7 +1192,7 @@ bool KateDocument::editInsertText ( uint line, uint col, const QString &str )
m_buffer->changeLine(line);
- for( QPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
+ for( TQPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
it.current()->editTextInserted (line, col, s.length());
editEnd ();
@@ -1219,7 +1219,7 @@ bool KateDocument::editRemoveText ( uint line, uint col, uint len )
m_buffer->changeLine(line);
- for( QPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
+ for( TQPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
it.current()->editTextRemoved (line, col, len);
editEnd ();
@@ -1239,7 +1239,7 @@ bool KateDocument::editMarkLineAutoWrapped ( uint line, bool autowrapped )
editStart ();
- editAddUndo (KateUndoGroup::editMarkLineAutoWrapped, line, autowrapped ? 1 : 0, 0, QString::null);
+ editAddUndo (KateUndoGroup::editMarkLineAutoWrapped, line, autowrapped ? 1 : 0, 0, TQString::null);
l->setAutoWrapped (autowrapped);
@@ -1281,8 +1281,8 @@ bool KateDocument::editWrapLine ( uint line, uint col, bool newLine, bool *newLi
m_buffer->insertLine (line+1, textLine);
m_buffer->changeLine(line);
- QPtrList<KTextEditor::Mark> list;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
+ TQPtrList<KTextEditor::Mark> list;
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
{
if( it.current()->line >= line )
{
@@ -1291,7 +1291,7 @@ bool KateDocument::editWrapLine ( uint line, uint col, bool newLine, bool *newLi
}
}
- for( QPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
+ for( TQPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
{
KTextEditor::Mark* mark = m_marks.take( it.current()->line );
mark->line++;
@@ -1318,7 +1318,7 @@ bool KateDocument::editWrapLine ( uint line, uint col, bool newLine, bool *newLi
(*newLineAdded) = false;
}
- for( QPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
+ for( TQPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
it.current()->editLineWrapped (line, col, !nextLine || newLine);
editEnd ();
@@ -1360,8 +1360,8 @@ bool KateDocument::editUnWrapLine ( uint line, bool removeLine, uint length )
m_buffer->changeLine(line+1);
}
- QPtrList<KTextEditor::Mark> list;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
+ TQPtrList<KTextEditor::Mark> list;
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
{
if( it.current()->line >= line+1 )
list.append( it.current() );
@@ -1377,7 +1377,7 @@ bool KateDocument::editUnWrapLine ( uint line, bool removeLine, uint length )
}
}
- for( QPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
+ for( TQPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
{
KTextEditor::Mark* mark = m_marks.take( it.current()->line );
mark->line--;
@@ -1387,7 +1387,7 @@ bool KateDocument::editUnWrapLine ( uint line, bool removeLine, uint length )
if( !list.isEmpty() )
emit marksChanged();
- for( QPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
+ for( TQPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
it.current()->editLineUnWrapped (line, col, removeLine, length);
editEnd ();
@@ -1395,7 +1395,7 @@ bool KateDocument::editUnWrapLine ( uint line, bool removeLine, uint length )
return true;
}
-bool KateDocument::editInsertLine ( uint line, const QString &s )
+bool KateDocument::editInsertLine ( uint line, const TQString &s )
{
if (!isReadWrite())
return false;
@@ -1416,14 +1416,14 @@ bool KateDocument::editInsertLine ( uint line, const QString &s )
removeTrailingSpace( line ); // new line
- QPtrList<KTextEditor::Mark> list;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
+ TQPtrList<KTextEditor::Mark> list;
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
{
if( it.current()->line >= line )
list.append( it.current() );
}
- for( QPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
+ for( TQPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
{
KTextEditor::Mark* mark = m_marks.take( it.current()->line );
mark->line++;
@@ -1433,7 +1433,7 @@ bool KateDocument::editInsertLine ( uint line, const QString &s )
if( !list.isEmpty() )
emit marksChanged();
- for( QPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
+ for( TQPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
it.current()->editLineInserted (line);
editEnd ();
@@ -1458,9 +1458,9 @@ bool KateDocument::editRemoveLine ( uint line )
m_buffer->removeLine(line);
- QPtrList<KTextEditor::Mark> list;
+ TQPtrList<KTextEditor::Mark> list;
KTextEditor::Mark* rmark = 0;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
{
if ( (it.current()->line > line) )
list.append( it.current() );
@@ -1471,7 +1471,7 @@ bool KateDocument::editRemoveLine ( uint line )
if (rmark)
delete (m_marks.take (rmark->line));
- for( QPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
+ for( TQPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
{
KTextEditor::Mark* mark = m_marks.take( it.current()->line );
mark->line--;
@@ -1481,7 +1481,7 @@ bool KateDocument::editRemoveLine ( uint line )
if( !list.isEmpty() )
emit marksChanged();
- for( QPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
+ for( TQPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
it.current()->editLineRemoved (line);
editEnd();
@@ -1642,7 +1642,7 @@ void KateDocument::clearRedo()
emit undoChanged ();
}
-QPtrList<KTextEditor::Cursor> KateDocument::cursors () const
+TQPtrList<KTextEditor::Cursor> KateDocument::cursors () const
{
return myCursors;
}
@@ -1650,7 +1650,7 @@ QPtrList<KTextEditor::Cursor> KateDocument::cursors () const
//BEGIN KTextEditor::SearchInterface stuff
-bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, const QString &text, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool casesensitive, bool backwards)
+bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, const TQString &text, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool casesensitive, bool backwards)
{
if (text.isEmpty())
return false;
@@ -1732,7 +1732,7 @@ bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, co
return false;
}
-bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, const QRegExp &regexp, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool backwards)
+bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, const TQRegExp &regexp, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool backwards)
{
kdDebug(13020)<<"KateDocument::searchText( "<<startLine<<", "<<startCol<<", "<<regexp.pattern()<<", "<<backwards<<" )"<<endl;
if (regexp.isEmpty() || !regexp.isValid())
@@ -1862,12 +1862,12 @@ uint KateDocument::hlModeCount ()
return KateHlManager::self()->highlights();
}
-QString KateDocument::hlModeName (uint mode)
+TQString KateDocument::hlModeName (uint mode)
{
return KateHlManager::self()->hlName (mode);
}
-QString KateDocument::hlModeSectionName (uint mode)
+TQString KateDocument::hlModeSectionName (uint mode)
{
return KateHlManager::self()->hlSection (mode);
}
@@ -1930,7 +1930,7 @@ void KateDocument::readSessionConfig(KConfig *kconfig)
KURL url (kconfig->readEntry("URL"));
// get the encoding
- QString tmpenc=kconfig->readEntry("Encoding");
+ TQString tmpenc=kconfig->readEntry("Encoding");
if (!tmpenc.isEmpty() && (tmpenc != encoding()))
setEncoding(tmpenc);
@@ -1948,7 +1948,7 @@ void KateDocument::readSessionConfig(KConfig *kconfig)
config()->setIndentationMode( (uint)kconfig->readNumEntry("Indentation Mode", config()->indentationMode() ) );
// Restore Bookmarks
- QValueList<int> marks = kconfig->readIntListEntry("Bookmarks");
+ TQValueList<int> marks = kconfig->readIntListEntry("Bookmarks");
for( uint i = 0; i < marks.count(); i++ )
addMark( marks[i], KateDocument::markType01 );
}
@@ -1969,8 +1969,8 @@ void KateDocument::writeSessionConfig(KConfig *kconfig)
kconfig->writeEntry("Indentation Mode", config()->indentationMode() );
// Save Bookmarks
- QValueList<int> marks;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks );
+ TQValueList<int> marks;
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks );
it.current() && it.current()->type & KTextEditor::MarkInterface::markType01;
++it )
marks << it.current()->line;
@@ -1990,14 +1990,14 @@ void KateDocument::configDialog()
KWin::setIcons( kd->winId(), kapp->icon(), kapp->miniIcon() );
#endif
- QPtrList<KTextEditor::ConfigPage> editorPages;
+ TQPtrList<KTextEditor::ConfigPage> editorPages;
for (uint i = 0; i < KTextEditor::configInterfaceExtension (this)->configPages (); i++)
{
- QStringList path;
+ TQStringList path;
path.clear();
path << KTextEditor::configInterfaceExtension (this)->configPageName (i);
- QVBox *page = kd->addVBoxPage(path, KTextEditor::configInterfaceExtension (this)->configPageFullName (i),
+ TQVBox *page = kd->addVBoxPage(path, KTextEditor::configInterfaceExtension (this)->configPageFullName (i),
KTextEditor::configInterfaceExtension (this)->configPagePixmap(i, KIcon::SizeMedium) );
editorPages.append (KTextEditor::configInterfaceExtension (this)->configPage(i, page));
@@ -2122,11 +2122,11 @@ void KateDocument::removeMark( uint line, uint markType )
repaintViews(true);
}
-QPtrList<KTextEditor::Mark> KateDocument::marks()
+TQPtrList<KTextEditor::Mark> KateDocument::marks()
{
- QPtrList<KTextEditor::Mark> list;
+ TQPtrList<KTextEditor::Mark> list;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks );
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks );
it.current(); ++it ) {
list.append( it.current() );
}
@@ -2136,7 +2136,7 @@ QPtrList<KTextEditor::Mark> KateDocument::marks()
void KateDocument::clearMarks()
{
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks );
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks );
it.current(); ++it ) {
KTextEditor::Mark* mark = it.current();
emit markChanged( *mark, MarkRemoved );
@@ -2149,36 +2149,36 @@ void KateDocument::clearMarks()
repaintViews(true);
}
-void KateDocument::setPixmap( MarkInterface::MarkTypes type, const QPixmap& pixmap )
+void KateDocument::setPixmap( MarkInterface::MarkTypes type, const TQPixmap& pixmap )
{
- m_markPixmaps.replace( type, new QPixmap( pixmap ) );
+ m_markPixmaps.replace( type, new TQPixmap( pixmap ) );
}
-void KateDocument::setDescription( MarkInterface::MarkTypes type, const QString& description )
+void KateDocument::setDescription( MarkInterface::MarkTypes type, const TQString& description )
{
- m_markDescriptions.replace( type, new QString( description ) );
+ m_markDescriptions.replace( type, new TQString( description ) );
}
-QPixmap *KateDocument::markPixmap( MarkInterface::MarkTypes type )
+TQPixmap *KateDocument::markPixmap( MarkInterface::MarkTypes type )
{
return m_markPixmaps[type];
}
-QColor KateDocument::markColor( MarkInterface::MarkTypes type )
+TQColor KateDocument::markColor( MarkInterface::MarkTypes type )
{
uint reserved = (0x1 << KTextEditor::MarkInterface::reservedMarkersCount()) - 1;
if ((uint)type >= (uint)markType01 && (uint)type <= reserved) {
return KateRendererConfig::global()->lineMarkerColor(type);
} else {
- return QColor();
+ return TQColor();
}
}
-QString KateDocument::markDescription( MarkInterface::MarkTypes type )
+TQString KateDocument::markDescription( MarkInterface::MarkTypes type )
{
if( m_markDescriptions[type] )
return *m_markDescriptions[type];
- return QString::null;
+ return TQString::null;
}
void KateDocument::setMarksUserChangable( uint markMask )
@@ -2205,7 +2205,7 @@ bool KateDocument::print ()
//END
//BEGIN KTextEditor::DocumentInfoInterface (### unfinished)
-QString KateDocument::mimeType()
+TQString KateDocument::mimeType()
{
KMimeType::Ptr result = KMimeType::defaultMimeTypePtr();
@@ -2226,19 +2226,19 @@ long KateDocument::fileSize()
}
// TODO implement this
-QString KateDocument::niceFileSize()
+TQString KateDocument::niceFileSize()
{
return "UNKNOWN";
}
KMimeType::Ptr KateDocument::mimeTypeForContent()
{
- QByteArray buf (1024);
+ TQByteArray buf (1024);
uint bufpos = 0;
for (uint i=0; i < numLines(); i++)
{
- QString line = textLine( i );
+ TQString line = textLine( i );
uint len = line.length() + 1;
if (bufpos + len > 1024)
@@ -2305,13 +2305,13 @@ bool KateDocument::openURL( const KURL &url )
m_job = KIO::get ( url, false, isProgressInfoEnabled() );
// connect to slots
- connect( m_job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- SLOT( slotDataKate( KIO::Job*, const QByteArray& ) ) );
+ connect( m_job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ TQT_SLOT( slotDataKate( KIO::Job*, const TQByteArray& ) ) );
- connect( m_job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotFinishedKate( KIO::Job* ) ) );
+ connect( m_job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotFinishedKate( KIO::Job* ) ) );
- QWidget *w = widget ();
+ TQWidget *w = widget ();
if (!w && !m_views.isEmpty ())
w = m_views.first();
@@ -2324,7 +2324,7 @@ bool KateDocument::openURL( const KURL &url )
}
}
-void KateDocument::slotDataKate ( KIO::Job *, const QByteArray &data )
+void KateDocument::slotDataKate ( KIO::Job *, const TQByteArray &data )
{
// kdDebug(13020) << "KateDocument::slotData" << endl;
@@ -2384,7 +2384,7 @@ bool KateDocument::openFile(KIO::Job * job)
//
if (job)
{
- QString metaDataCharset = job->queryMetaData("charset");
+ TQString metaDataCharset = job->queryMetaData("charset");
// only overwrite config if nothing set
if (!metaDataCharset.isEmpty () && (!m_config->isSetEncoding() || m_config->encoding().isEmpty()))
@@ -2394,7 +2394,7 @@ bool KateDocument::openFile(KIO::Job * job)
//
// service type magic to get encoding right
//
- QString serviceType = m_extension->urlArgs().serviceType.simplifyWhiteSpace();
+ TQString serviceType = m_extension->urlArgs().serviceType.simplifyWhiteSpace();
int pos = serviceType.find(';');
if (pos != -1)
setEncoding (serviceType.mid(pos+1));
@@ -2462,7 +2462,7 @@ bool KateDocument::openFile(KIO::Job * job)
//
// set doc name, dummy value as arg, don't need it
//
- setDocName (QString::null);
+ setDocName (TQString::null);
//
// to houston, we are not modified
@@ -2567,7 +2567,7 @@ bool KateDocument::saveFile()
{
if (s_fileChangedDialogsActivated && m_modOnHd)
{
- QString str = reasonedMOHString() + "\n\n";
+ TQString str = reasonedMOHString() + "\n\n";
if (!isModified())
{
@@ -2650,12 +2650,12 @@ bool KateDocument::saveFile()
bool KateDocument::saveAs( const KURL &u )
{
- QString oldDir = url().directory();
+ TQString oldDir = url().directory();
if ( KParts::ReadWritePart::saveAs( u ) )
{
// null means base on filename
- setDocName( QString::null );
+ setDocName( TQString::null );
if ( u.directory() != oldDir )
readDirConfig();
@@ -2675,7 +2675,7 @@ void KateDocument::readDirConfig ()
if (m_url.isLocalFile() && (depth > -1))
{
- QString currentDir = QFileInfo (m_file).dirPath();
+ TQString currentDir = TQFileInfo (m_file).dirPath();
// only search as deep as specified or not at all ;)
while (depth > -1)
@@ -2683,14 +2683,14 @@ void KateDocument::readDirConfig ()
kdDebug (13020) << "search for config file in path: " << currentDir << endl;
// try to open config file in this dir
- QFile f (currentDir + "/.kateconfig");
+ TQFile f (currentDir + "/.kateconfig");
if (f.open (IO_ReadOnly))
{
- QTextStream stream (&f);
+ TQTextStream stream (&f);
uint linesRead = 0;
- QString line = stream.readLine();
+ TQString line = stream.readLine();
while ((linesRead < 32) && !line.isNull())
{
readVariableLine( line );
@@ -2703,7 +2703,7 @@ void KateDocument::readDirConfig ()
break;
}
- QString newDir = QFileInfo (currentDir).dirPath();
+ TQString newDir = TQFileInfo (currentDir).dirPath();
// bail out on looping (for example reached /)
if (currentDir == newDir)
@@ -2737,7 +2737,7 @@ void KateDocument::deactivateDirWatch ()
if (!m_dirWatchFile.isEmpty())
KateFactory::self()->dirWatch ()->removeFile (m_dirWatchFile);
- m_dirWatchFile = QString::null;
+ m_dirWatchFile = TQString::null;
}
bool KateDocument::closeURL()
@@ -2755,7 +2755,7 @@ bool KateDocument::closeURL()
widget(),
reasonedMOHString() + "\n\n" + i18n("Do you really want to continue to close this file? Data loss may occur."),
i18n("Possible Data Loss"), i18n("Close Nevertheless"),
- QString("kate_close_modonhd_%1").arg( m_modOnHdReason ) ) == KMessageBox::Continue))
+ TQString("kate_close_modonhd_%1").arg( m_modOnHdReason ) ) == KMessageBox::Continue))
return false;
}
}
@@ -2773,7 +2773,7 @@ bool KateDocument::closeURL()
// empty url + filename
//
m_url = KURL ();
- m_file = QString::null;
+ m_file = TQString::null;
// we are not modified
if (m_modOnHd)
@@ -2803,7 +2803,7 @@ bool KateDocument::closeURL()
for (KateView * view = m_views.first(); view != 0L; view = m_views.next() )
{
// Explicitly call the internal version because we don't want this to look like
- // an external request (and thus have the view not QWidget::scroll()ed.
+ // an external request (and thus have the view not TQWidget::scroll()ed.
view->setCursorPositionInternal(0, 0, 1, false);
view->clearSelection();
view->updateView(true);
@@ -2813,7 +2813,7 @@ bool KateDocument::closeURL()
emit fileNameChanged ();
// update doc name
- setDocName (QString::null);
+ setDocName (TQString::null);
// success
return true;
@@ -2951,7 +2951,7 @@ uint KateDocument::currentColumn( const KateTextCursor& cursor )
return 0;
}
-bool KateDocument::typeChars ( KateView *view, const QString &chars )
+bool KateDocument::typeChars ( KateView *view, const TQString &chars )
{
KateTextLine::Ptr textLine = m_buffer->plainLine(view->cursorLine ());
@@ -2959,22 +2959,22 @@ bool KateDocument::typeChars ( KateView *view, const QString &chars )
return false;
bool bracketInserted = false;
- QString buf;
- QChar c;
+ TQString buf;
+ TQChar c;
for( uint z = 0; z < chars.length(); z++ )
{
- QChar ch = c = chars[z];
+ TQChar ch = c = chars[z];
if (ch.isPrint() || ch == '\t')
{
buf.append (ch);
if (!bracketInserted && (config()->configFlags() & KateDocument::cfAutoBrackets))
{
- QChar end_ch;
+ TQChar end_ch;
bool complete = true;
- QChar prevChar = textLine->getChar(view->cursorColumnReal()-1);
- QChar nextChar = textLine->getChar(view->cursorColumnReal());
+ TQChar prevChar = textLine->getChar(view->cursorColumnReal()-1);
+ TQChar nextChar = textLine->getChar(view->cursorColumnReal());
switch(ch) {
case '(': end_ch = ')'; break;
case '[': end_ch = ']'; break;
@@ -3107,7 +3107,7 @@ void KateDocument::transpose( const KateTextCursor& cursor)
return;
uint line = cursor.line();
- QString s;
+ TQString s;
//clever swap code if first character on the line swap right&left
//otherwise left & right
@@ -3143,8 +3143,8 @@ void KateDocument::backspace( KateView *view, const KateTextCursor& c )
// if inside empty (), {}, [], '', "" delete both
KateTextLine::Ptr tl = m_buffer->plainLine(line);
if(!tl) return;
- QChar prevChar = tl->getChar(col-1);
- QChar nextChar = tl->getChar(col);
+ TQChar prevChar = tl->getChar(col-1);
+ TQChar nextChar = tl->getChar(col);
if ( (prevChar == '"' && nextChar == '"') ||
(prevChar == '\'' && nextChar == '\'') ||
@@ -3195,7 +3195,7 @@ void KateDocument::backspace( KateView *view, const KateTextCursor& c )
if (!textLine)
return;
- if (config()->wordWrap() && textLine->endingWith(QString::fromLatin1(" ")))
+ if (config()->wordWrap() && textLine->endingWith(TQString::fromLatin1(" ")))
{
// gg: in hard wordwrap mode, backspace must also eat the trailing space
removeText (line-1, textLine->length()-1, line, 0);
@@ -3227,12 +3227,12 @@ void KateDocument::del( KateView *view, const KateTextCursor& c )
void KateDocument::paste ( KateView* view )
{
- QString s = QApplication::clipboard()->text();
+ TQString s = TQApplication::clipboard()->text();
if (s.isEmpty())
return;
- uint lines = s.contains (QChar ('\n'));
+ uint lines = s.contains (TQChar ('\n'));
m_undoDontMerge = true;
@@ -3275,7 +3275,7 @@ void KateDocument::insertIndentChars ( KateView *view )
{
editStart ();
- QString s;
+ TQString s;
if (config()->configFlags() & KateDocument::cfSpaceIndent)
{
int width = config()->indentationWidth();
@@ -3406,7 +3406,7 @@ void KateDocument::optimizeLeadingSpace(uint line, int flags, int change)
void KateDocument::replaceWithOptimizedSpace(uint line, uint upto_column, uint space, int flags)
{
uint length;
- QString new_space;
+ TQString new_space;
if (flags & KateDocument::cfSpaceIndent && ! (flags & KateDocumentConfig::cfMixedIndent) ) {
length = space;
@@ -3416,7 +3416,7 @@ void KateDocument::replaceWithOptimizedSpace(uint line, uint upto_column, uint s
length = space / config()->tabWidth();
new_space.fill('\t', length);
- QString extra_space;
+ TQString extra_space;
extra_space.fill(' ', space % config()->tabWidth());
length += space % config()->tabWidth();
new_space += extra_space;
@@ -3444,7 +3444,7 @@ void KateDocument::replaceWithOptimizedSpace(uint line, uint upto_column, uint s
Remove a given string at the begining
of the current line.
*/
-bool KateDocument::removeStringFromBegining(int line, QString &str)
+bool KateDocument::removeStringFromBegining(int line, TQString &str)
{
KateTextLine::Ptr textline = m_buffer->plainLine(line);
@@ -3474,7 +3474,7 @@ bool KateDocument::removeStringFromBegining(int line, QString &str)
Remove a given string at the end
of the current line.
*/
-bool KateDocument::removeStringFromEnd(int line, QString &str)
+bool KateDocument::removeStringFromEnd(int line, TQString &str)
{
KateTextLine::Ptr textline = m_buffer->plainLine(line);
@@ -3511,12 +3511,12 @@ void KateDocument::addStartLineCommentToSingleLine( int line, int attrib )
{
if (highlight()->getCommentSingleLinePosition(attrib)==KateHighlighting::CSLPosColumn0)
{
- QString commentLineMark = highlight()->getCommentSingleLineStart( attrib ) + " ";
+ TQString commentLineMark = highlight()->getCommentSingleLineStart( attrib ) + " ";
insertText (line, 0, commentLineMark);
}
else
{
- QString commentLineMark=highlight()->getCommentSingleLineStart(attrib);
+ TQString commentLineMark=highlight()->getCommentSingleLineStart(attrib);
KateTextLine::Ptr l = m_buffer->line(line);
int pos=l->firstChar();
if (pos >=0)
@@ -3530,8 +3530,8 @@ void KateDocument::addStartLineCommentToSingleLine( int line, int attrib )
*/
bool KateDocument::removeStartLineCommentFromSingleLine( int line, int attrib )
{
- QString shortCommentMark = highlight()->getCommentSingleLineStart( attrib );
- QString longCommentMark = shortCommentMark + " ";
+ TQString shortCommentMark = highlight()->getCommentSingleLineStart( attrib );
+ TQString longCommentMark = shortCommentMark + " ";
editStart();
@@ -3550,8 +3550,8 @@ bool KateDocument::removeStartLineCommentFromSingleLine( int line, int attrib )
*/
void KateDocument::addStartStopCommentToSingleLine( int line, int attrib )
{
- QString startCommentMark = highlight()->getCommentStart( attrib ) + " ";
- QString stopCommentMark = " " + highlight()->getCommentEnd( attrib );
+ TQString startCommentMark = highlight()->getCommentStart( attrib ) + " ";
+ TQString stopCommentMark = " " + highlight()->getCommentEnd( attrib );
editStart();
@@ -3573,10 +3573,10 @@ void KateDocument::addStartStopCommentToSingleLine( int line, int attrib )
*/
bool KateDocument::removeStartStopCommentFromSingleLine( int line, int attrib )
{
- QString shortStartCommentMark = highlight()->getCommentStart( attrib );
- QString longStartCommentMark = shortStartCommentMark + " ";
- QString shortStopCommentMark = highlight()->getCommentEnd( attrib );
- QString longStopCommentMark = " " + shortStopCommentMark;
+ TQString shortStartCommentMark = highlight()->getCommentStart( attrib );
+ TQString longStartCommentMark = shortStartCommentMark + " ";
+ TQString shortStopCommentMark = highlight()->getCommentEnd( attrib );
+ TQString longStopCommentMark = " " + shortStopCommentMark;
editStart();
@@ -3607,8 +3607,8 @@ bool KateDocument::removeStartStopCommentFromSingleLine( int line, int attrib )
*/
void KateDocument::addStartStopCommentToSelection( KateView *view, int attrib )
{
- QString startComment = highlight()->getCommentStart( attrib );
- QString endComment = highlight()->getCommentEnd( attrib );
+ TQString startComment = highlight()->getCommentStart( attrib );
+ TQString endComment = highlight()->getCommentEnd( attrib );
int sl = view->selStartLine();
int el = view->selEndLine();
@@ -3639,7 +3639,7 @@ void KateDocument::addStartStopCommentToSelection( KateView *view, int attrib )
*/
void KateDocument::addStartLineCommentToSelection( KateView *view, int attrib )
{
- QString commentLineMark = highlight()->getCommentSingleLineStart( attrib ) + " ";
+ TQString commentLineMark = highlight()->getCommentSingleLineStart( attrib ) + " ";
int sl = view->selStartLine();
int el = view->selEndLine();
@@ -3713,8 +3713,8 @@ bool KateDocument::previousNonSpaceCharPos(int &line, int &col)
*/
bool KateDocument::removeStartStopCommentFromSelection( KateView *view, int attrib )
{
- QString startComment = highlight()->getCommentStart( attrib );
- QString endComment = highlight()->getCommentEnd( attrib );
+ TQString startComment = highlight()->getCommentStart( attrib );
+ TQString endComment = highlight()->getCommentEnd( attrib );
int sl = kMax<int> (0, view->selStartLine());
int el = kMin<int> (view->selEndLine(), lastLine());
@@ -3757,8 +3757,8 @@ bool KateDocument::removeStartStopCommentFromSelection( KateView *view, int attr
bool KateDocument::removeStartStopCommentFromRegion(const KateTextCursor &start,const KateTextCursor &end,int attrib)
{
- QString startComment = highlight()->getCommentStart( attrib );
- QString endComment = highlight()->getCommentEnd( attrib );
+ TQString startComment = highlight()->getCommentStart( attrib );
+ TQString endComment = highlight()->getCommentEnd( attrib );
int startCommentLen = startComment.length();
int endCommentLen = endComment.length();
@@ -3780,8 +3780,8 @@ bool KateDocument::removeStartStopCommentFromRegion(const KateTextCursor &start,
*/
bool KateDocument::removeStartLineCommentFromSelection( KateView *view, int attrib )
{
- QString shortCommentMark = highlight()->getCommentSingleLineStart( attrib );
- QString longCommentMark = shortCommentMark + " ";
+ TQString shortCommentMark = highlight()->getCommentSingleLineStart( attrib );
+ TQString longCommentMark = shortCommentMark + " ";
int sl = view->selStartLine();
int el = view->selEndLine();
@@ -3961,8 +3961,8 @@ void KateDocument::transform( KateView *v, const KateTextCursor &c,
start = end;
end = t;
}
- QString s = text( ln, start, ln, end );
- QString o = s;
+ TQString s = text( ln, start, ln, end );
+ TQString o = s;
if ( t == Uppercase )
s = s.upper();
@@ -4002,8 +4002,8 @@ void KateDocument::transform( KateView *v, const KateTextCursor &c,
selectionRestored = true;
} else { // no selection
- QString o = text( cl, cc, cl, cc + 1 );
- QString s;
+ TQString o = text( cl, cc, cl, cc + 1 );
+ TQString s;
int n ( cc );
switch ( t ) {
case Uppercase:
@@ -4078,19 +4078,19 @@ void KateDocument::joinLines( uint first, uint last )
editEnd();
}
-QString KateDocument::getWord( const KateTextCursor& cursor ) {
+TQString KateDocument::getWord( const KateTextCursor& cursor ) {
int start, end, len;
KateTextLine::Ptr textLine = m_buffer->plainLine(cursor.line());
len = textLine->length();
start = end = cursor.col();
if (start > len) // Probably because of non-wrapping cursor mode.
- return QString("");
+ return TQString("");
while (start > 0 && highlight()->isInWord(textLine->getChar(start - 1), textLine->attribute(start - 1))) start--;
while (end < len && highlight()->isInWord(textLine->getChar(end), textLine->attribute(end))) end++;
len = end - start;
- return QString(&textLine->text()[start], len);
+ return TQString(&textLine->text()[start], len);
}
void KateDocument::tagLines(int start, int end)
@@ -4137,9 +4137,9 @@ void KateDocument::setConfigFlags (uint flags)
config()->setConfigFlags(flags);
}
-inline bool isStartBracket( const QChar& c ) { return c == '{' || c == '[' || c == '('; }
-inline bool isEndBracket ( const QChar& c ) { return c == '}' || c == ']' || c == ')'; }
-inline bool isBracket ( const QChar& c ) { return isStartBracket( c ) || isEndBracket( c ); }
+inline bool isStartBracket( const TQChar& c ) { return c == '{' || c == '[' || c == '('; }
+inline bool isEndBracket ( const TQChar& c ) { return c == '}' || c == ']' || c == ')'; }
+inline bool isBracket ( const TQChar& c ) { return isStartBracket( c ) || isEndBracket( c ); }
/*
Bracket matching uses the following algorithm:
@@ -4174,9 +4174,9 @@ bool KateDocument::findMatchingBracket( KateTextCursor& start, KateTextCursor& e
if( !textLine )
return false;
- QChar right = textLine->getChar( start.col() );
- QChar left = textLine->getChar( start.col() - 1 );
- QChar bracket;
+ TQChar right = textLine->getChar( start.col() );
+ TQChar left = textLine->getChar( start.col() - 1 );
+ TQChar bracket;
if ( config()->configFlags() & cfOvr ) {
if( isBracket( right ) ) {
@@ -4198,7 +4198,7 @@ bool KateDocument::findMatchingBracket( KateTextCursor& start, KateTextCursor& e
return false;
}
- QChar opposite;
+ TQChar opposite;
switch( bracket ) {
case '{': opposite = '}'; break;
@@ -4247,7 +4247,7 @@ bool KateDocument::findMatchingBracket( KateTextCursor& start, KateTextCursor& e
continue;
/* Check for match */
- QChar c = textLine->getChar( end.col() );
+ TQChar c = textLine->getChar( end.col() );
if( c == bracket ) {
count++;
} else if( c == opposite ) {
@@ -4266,7 +4266,7 @@ void KateDocument::guiActivateEvent( KParts::GUIActivateEvent *ev )
emit selectionChanged();
}
-void KateDocument::setDocName (QString name )
+void KateDocument::setDocName (TQString name )
{
if ( name == m_docName )
return;
@@ -4300,7 +4300,7 @@ void KateDocument::setDocName (QString name )
m_docName = i18n ("Untitled");
if (m_docNameNumber > 0)
- m_docName = QString(m_docName + " (%1)").arg(m_docNameNumber+1);
+ m_docName = TQString(m_docName + " (%1)").arg(m_docNameNumber+1);
updateFileType (KateFactory::self()->fileTypeManager()->fileType (this));
emit nameChanged ((Kate::Document *) this);
@@ -4328,7 +4328,7 @@ void KateDocument::slotModifiedOnDisk( Kate::View * /*v*/ )
{
m_modOnHd = false;
KEncodingFileDialog::Result res=KEncodingFileDialog::getSaveURLAndEncoding(config()->encoding(),
- url().url(),QString::null,widget(),i18n("Save File"));
+ url().url(),TQString::null,widget(),i18n("Save File"));
kdDebug(13020)<<"got "<<res.URLs.count()<<" URLs"<<endl;
if( ! res.URLs.isEmpty() && ! res.URLs.first().isEmpty() && checkOverwrite( res.URLs.first() ) )
@@ -4388,7 +4388,7 @@ void KateDocument::setModifiedOnDisk( int reason )
class KateDocumentTmpMark
{
public:
- QString line;
+ TQString line;
KTextEditor::Mark mark;
};
@@ -4415,9 +4415,9 @@ void KateDocument::reloadFile()
}
}
- QValueList<KateDocumentTmpMark> tmp;
+ TQValueList<KateDocumentTmpMark> tmp;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
{
KateDocumentTmpMark m;
@@ -4434,7 +4434,7 @@ void KateDocument::reloadFile()
m_reloading = true;
- QValueList<int> lines, cols;
+ TQValueList<int> lines, cols;
for ( uint i=0; i < m_views.count(); i++ )
{
lines.append( m_views.at( i )->cursorLine() );
@@ -4448,7 +4448,7 @@ void KateDocument::reloadFile()
m_reloading = false;
- for ( QValueList<int>::size_type z=0; z < tmp.size(); z++ )
+ for ( TQValueList<int>::size_type z=0; z < tmp.size(); z++ )
{
if (z < numLines())
{
@@ -4533,12 +4533,12 @@ KateCodeFoldingTree *KateDocument::foldingTree ()
return m_buffer->foldingTree();
}
-void KateDocument::setEncoding (const QString &e)
+void KateDocument::setEncoding (const TQString &e)
{
if ( m_encodingSticky )
return;
- QString ce = m_config->encoding().lower();
+ TQString ce = m_config->encoding().lower();
if ( e.lower() == ce )
return;
@@ -4547,7 +4547,7 @@ void KateDocument::setEncoding (const QString &e)
reloadFile();
}
-QString KateDocument::encoding() const
+TQString KateDocument::encoding() const
{
return m_config->encoding();
}
@@ -4590,10 +4590,10 @@ void KateDocument::updateConfig ()
add interface for plugins/apps to set/get variables
add view stuff
*/
-QRegExp KateDocument::kvLine = QRegExp("kate:(.*)");
-QRegExp KateDocument::kvLineWildcard = QRegExp("kate-wildcard\\((.*)\\):(.*)");
-QRegExp KateDocument::kvLineMime = QRegExp("kate-mimetype\\((.*)\\):(.*)");
-QRegExp KateDocument::kvVar = QRegExp("([\\w\\-]+)\\s+([^;]+)");
+TQRegExp KateDocument::kvLine = TQRegExp("kate:(.*)");
+TQRegExp KateDocument::kvLineWildcard = TQRegExp("kate-wildcard\\((.*)\\):(.*)");
+TQRegExp KateDocument::kvLineMime = TQRegExp("kate-mimetype\\((.*)\\):(.*)");
+TQRegExp KateDocument::kvVar = TQRegExp("([\\w\\-]+)\\s+([^;]+)");
void KateDocument::readVariables(bool onlyViewAndRenderer)
{
@@ -4630,7 +4630,7 @@ void KateDocument::readVariables(bool onlyViewAndRenderer)
}
}
-void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
+void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer )
{
// simple check first, no regex
// no kate inside, no vars, simple...
@@ -4638,7 +4638,7 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
return;
// found vars, if any
- QString s;
+ TQString s;
if ( kvLine.search( t ) > -1 )
{
@@ -4648,13 +4648,13 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
}
else if (kvLineWildcard.search( t ) > -1) // regex given
{
- QStringList wildcards (QStringList::split(';', kvLineWildcard.cap(1)));
- QString nameOfFile = url().fileName();
+ TQStringList wildcards (TQStringList::split(';', kvLineWildcard.cap(1)));
+ TQString nameOfFile = url().fileName();
bool found = false;
- for (QStringList::size_type i = 0; !found && i < wildcards.size(); ++i)
+ for (TQStringList::size_type i = 0; !found && i < wildcards.size(); ++i)
{
- QRegExp wildcard (wildcards[i], true/*Qt::CaseSensitive*/, true/*QRegExp::Wildcard*/);
+ TQRegExp wildcard (wildcards[i], true/*Qt::CaseSensitive*/, true/*TQRegExp::Wildcard*/);
found = wildcard.exactMatch (nameOfFile);
}
@@ -4669,7 +4669,7 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
}
else if (kvLineMime.search( t ) > -1) // mime-type given
{
- QStringList types (QStringList::split(';', kvLineMime.cap(1)));
+ TQStringList types (TQStringList::split(';', kvLineMime.cap(1)));
// no matching type found
if (!types.contains (mimeType ()))
@@ -4684,7 +4684,7 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
return;
}
- QStringList vvl; // view variable names
+ TQStringList vvl; // view variable names
vvl << "dynamic-word-wrap" << "dynamic-word-wrap-indicators"
<< "line-numbers" << "icon-border" << "folding-markers"
<< "bookmark-sorting" << "auto-center-lines"
@@ -4696,7 +4696,7 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
<< "font" << "font-size" << "scheme";
int p( 0 );
- QString var, val;
+ TQString var, val;
while ( (p = kvVar.search( s, p )) > -1 )
{
p += kvVar.matchedLength();
@@ -4771,7 +4771,7 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
// STRING SETTINGS
else if ( var == "eol" || var == "end-of-line" )
{
- QStringList l;
+ TQStringList l;
l << "unix" << "dos" << "mac";
if ( (n = l.findIndex( val.lower() )) != -1 )
m_config->setEol( n );
@@ -4802,12 +4802,12 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
}
}
-void KateDocument::setViewVariable( QString var, QString val )
+void KateDocument::setViewVariable( TQString var, TQString val )
{
KateView *v;
bool state;
int n;
- QColor c;
+ TQColor c;
for (v = m_views.first(); v != 0L; v= m_views.next() )
{
if ( var == "dynamic-word-wrap" && checkBoolValue( val, &state ) )
@@ -4838,12 +4838,12 @@ void KateDocument::setViewVariable( QString var, QString val )
v->renderer()->config()->setWordWrapMarkerColor( c );
else if ( var == "font" || ( var == "font-size" && checkIntValue( val, &n ) ) )
{
- QFont _f( *v->renderer()->config()->font( ) );
+ TQFont _f( *v->renderer()->config()->font( ) );
if ( var == "font" )
{
_f.setFamily( val );
- _f.setFixedPitch( QFont( val ).fixedPitch() );
+ _f.setFixedPitch( TQFont( val ).fixedPitch() );
}
else
_f.setPointSize( n );
@@ -4857,10 +4857,10 @@ void KateDocument::setViewVariable( QString var, QString val )
}
}
-bool KateDocument::checkBoolValue( QString val, bool *result )
+bool KateDocument::checkBoolValue( TQString val, bool *result )
{
val = val.stripWhiteSpace().lower();
- QStringList l;
+ TQStringList l;
l << "1" << "on" << "true";
if ( l.contains( val ) )
{
@@ -4877,21 +4877,21 @@ bool KateDocument::checkBoolValue( QString val, bool *result )
return false;
}
-bool KateDocument::checkIntValue( QString val, int *result )
+bool KateDocument::checkIntValue( TQString val, int *result )
{
bool ret( false );
*result = val.toInt( &ret );
return ret;
}
-bool KateDocument::checkColorValue( QString val, QColor &c )
+bool KateDocument::checkColorValue( TQString val, TQColor &c )
{
c.setNamedColor( val );
return c.isValid();
}
// KTextEditor::variable
-QString KateDocument::variable( const QString &name ) const
+TQString KateDocument::variable( const TQString &name ) const
{
if ( m_storedVariables.contains( name ) )
return m_storedVariables[ name ];
@@ -4901,14 +4901,14 @@ QString KateDocument::variable( const QString &name ) const
//END
-void KateDocument::slotModOnHdDirty (const QString &path)
+void KateDocument::slotModOnHdDirty (const TQString &path)
{
if ((path == m_dirWatchFile) && (!m_modOnHd || m_modOnHdReason != 1))
{
// compare md5 with the one we have (if we have one)
if ( ! m_digest.isEmpty() )
{
- QCString tmp;
+ TQCString tmp;
if ( createDigest( tmp ) && tmp == m_digest )
return;
}
@@ -4924,7 +4924,7 @@ void KateDocument::slotModOnHdDirty (const QString &path)
}
}
-void KateDocument::slotModOnHdCreated (const QString &path)
+void KateDocument::slotModOnHdCreated (const TQString &path)
{
if ((path == m_dirWatchFile) && (!m_modOnHd || m_modOnHdReason != 2))
{
@@ -4939,7 +4939,7 @@ void KateDocument::slotModOnHdCreated (const QString &path)
}
}
-void KateDocument::slotModOnHdDeleted (const QString &path)
+void KateDocument::slotModOnHdDeleted (const TQString &path)
{
if ((path == m_dirWatchFile) && (!m_modOnHd || m_modOnHdReason != 3))
{
@@ -4954,13 +4954,13 @@ void KateDocument::slotModOnHdDeleted (const QString &path)
}
}
-bool KateDocument::createDigest( QCString &result )
+bool KateDocument::createDigest( TQCString &result )
{
bool ret = false;
result = "";
if ( url().isLocalFile() )
{
- QFile f ( url().path() );
+ TQFile f ( url().path() );
if ( f.open( IO_ReadOnly) )
{
KMD5 md5;
@@ -4973,7 +4973,7 @@ bool KateDocument::createDigest( QCString &result )
return ret;
}
-QString KateDocument::reasonedMOHString() const
+TQString KateDocument::reasonedMOHString() const
{
switch( m_modOnHdReason )
{
@@ -4987,7 +4987,7 @@ QString KateDocument::reasonedMOHString() const
return i18n("The file '%1' was deleted by another program.").arg( url().prettyURL() );
break;
default:
- return QString();
+ return TQString();
}
}
@@ -5061,7 +5061,7 @@ void KateDocument::slotQueryClose_save(bool *handled, bool* abortClosing) {
if (m_url.isEmpty())
{
KEncodingFileDialog::Result res=KEncodingFileDialog::getSaveURLAndEncoding(config()->encoding(),
- QString::null,QString::null,0,i18n("Save File"));
+ TQString::null,TQString::null,0,i18n("Save File"));
if( res.URLs.isEmpty() || !checkOverwrite( res.URLs.first() ) ) {
*abortClosing=true;
@@ -5084,7 +5084,7 @@ bool KateDocument::checkOverwrite( KURL u )
if( !u.isLocalFile() )
return true;
- QFileInfo info( u.path() );
+ TQFileInfo info( u.path() );
if( !info.exists() )
return true;
@@ -5095,20 +5095,20 @@ bool KateDocument::checkOverwrite( KURL u )
i18n( "&Overwrite" ) );
}
-void KateDocument::setDefaultEncoding (const QString &encoding)
+void KateDocument::setDefaultEncoding (const TQString &encoding)
{
s_defaultEncoding = encoding;
}
//BEGIN KTextEditor::TemplateInterface
-bool KateDocument::insertTemplateTextImplementation ( uint line, uint column, const QString &templateString, const QMap<QString,QString> &initialValues, QWidget *) {
+bool KateDocument::insertTemplateTextImplementation ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *) {
return (new KateTemplateHandler(this,line,column,templateString,initialValues))->initOk();
}
void KateDocument::testTemplateCode() {
int col=activeView()->cursorColumn();
int line=activeView()->cursorLine();
- insertTemplateText(line,col,"for ${index} \\${NOPLACEHOLDER} ${index} ${blah} ${fullname} \\$${Placeholder} \\${${PLACEHOLDER2}}\n next line:${ANOTHERPLACEHOLDER} $${DOLLARBEFOREPLACEHOLDER} {NOTHING} {\n${cursor}\n}",QMap<QString,QString>());
+ insertTemplateText(line,col,"for ${index} \\${NOPLACEHOLDER} ${index} ${blah} ${fullname} \\$${Placeholder} \\${${PLACEHOLDER2}}\n next line:${ANOTHERPLACEHOLDER} $${DOLLARBEFOREPLACEHOLDER} {NOTHING} {\n${cursor}\n}",TQMap<TQString,TQString>());
}
bool KateDocument::invokeTabInterceptor(KKey key) {
@@ -5139,8 +5139,8 @@ bool KateDocument::removeTabInterceptor(KateKeyInterceptorFunctor *interceptor)
bool KateDocument::hasSelection () const
{ if (m_activeView) return m_activeView->hasSelection (); return false; }
- QString KateDocument::selection () const
- { if (m_activeView) return m_activeView->selection (); return QString(""); }
+ TQString KateDocument::selection () const
+ { if (m_activeView) return m_activeView->selection (); return TQString(""); }
bool KateDocument::removeSelectedText ()
{ if (m_activeView) return m_activeView->removeSelectedText (); return false; }
diff --git a/kate/part/katedocument.h b/kate/part/katedocument.h
index c1c5ab169..2868203de 100644
--- a/kate/part/katedocument.h
+++ b/kate/part/katedocument.h
@@ -40,9 +40,9 @@
#include <kmimetype.h>
#include <klocale.h>
-#include <qintdict.h>
-#include <qmap.h>
-#include <qdatetime.h>
+#include <tqintdict.h>
+#include <tqmap.h>
+#include <tqdatetime.h>
namespace KTextEditor { class Plugin; }
@@ -91,7 +91,7 @@ class KateDocument : public Kate::Document,
public:
KateDocument (bool bSingleViewMode=false, bool bBrowserView=false, bool bReadOnly=false,
- QWidget *parentWidget = 0, const char *widgetName = 0, QObject * = 0, const char * = 0);
+ TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject * = 0, const char * = 0);
~KateDocument ();
bool closeURL();
@@ -115,7 +115,7 @@ class KateDocument : public Kate::Document,
void disablePluginGUI (KTextEditor::Plugin *plugin);
private:
- QMemArray<KTextEditor::Plugin *> m_plugins;
+ TQMemArray<KTextEditor::Plugin *> m_plugins;
public:
bool readOnly () const { return m_bReadOnly; }
@@ -134,14 +134,14 @@ class KateDocument : public Kate::Document,
// KTextEditor::Document stuff
//
public:
- KTextEditor::View *createView( QWidget *parent, const char *name );
- QPtrList<KTextEditor::View> views () const;
+ KTextEditor::View *createView( TQWidget *parent, const char *name );
+ TQPtrList<KTextEditor::View> views () const;
inline KateView *activeView () const { return m_activeView; }
private:
- QPtrList<KateView> m_views;
- QPtrList<KTextEditor::View> m_textEditViews;
+ TQPtrList<KateView> m_views;
+ TQPtrList<KTextEditor::View> m_textEditViews;
KateView *m_activeView;
/**
@@ -160,32 +160,32 @@ class KateDocument : public Kate::Document,
//
public slots:
uint configPages () const;
- KTextEditor::ConfigPage *configPage (uint number = 0, QWidget *parent = 0, const char *name=0 );
- QString configPageName (uint number = 0) const;
- QString configPageFullName (uint number = 0) const;
- QPixmap configPagePixmap (uint number = 0, int size = KIcon::SizeSmall) const;
+ KTextEditor::ConfigPage *configPage (uint number = 0, TQWidget *parent = 0, const char *name=0 );
+ TQString configPageName (uint number = 0) const;
+ TQString configPageFullName (uint number = 0) const;
+ TQPixmap configPagePixmap (uint number = 0, int size = KIcon::SizeSmall) const;
//
// KTextEditor::EditInterface stuff
//
public slots:
- QString text() const;
+ TQString text() const;
- QString text ( uint startLine, uint startCol, uint endLine, uint endCol ) const;
- QString text ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise ) const;
+ TQString text ( uint startLine, uint startCol, uint endLine, uint endCol ) const;
+ TQString text ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise ) const;
- QString textLine ( uint line ) const;
+ TQString textLine ( uint line ) const;
- bool setText(const QString &);
+ bool setText(const TQString &);
bool clear ();
- bool insertText ( uint line, uint col, const QString &s );
- bool insertText ( uint line, uint col, const QString &s, bool blockwise );
+ bool insertText ( uint line, uint col, const TQString &s );
+ bool insertText ( uint line, uint col, const TQString &s, bool blockwise );
bool removeText ( uint startLine, uint startCol, uint endLine, uint endCol );
bool removeText ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise );
- bool insertLine ( uint line, const QString &s );
+ bool insertLine ( uint line, const TQString &s );
bool removeLine ( uint line );
uint numLines() const;
@@ -195,8 +195,8 @@ class KateDocument : public Kate::Document,
signals:
void textChanged ();
- void charactersInteractivelyInserted(int ,int ,const QString&);
- void charactersSemiInteractivelyInserted(int ,int ,const QString&);
+ void charactersInteractivelyInserted(int ,int ,const TQString&);
+ void charactersSemiInteractivelyInserted(int ,int ,const TQString&);
void backspacePressed();
public:
@@ -228,7 +228,7 @@ class KateDocument : public Kate::Document,
* @param s string to be inserted
* @return true on success
*/
- bool editInsertText ( uint line, uint col, const QString &s );
+ bool editInsertText ( uint line, uint col, const TQString &s );
/**
* Remove a string in the given line/column
* @param line line number
@@ -275,7 +275,7 @@ class KateDocument : public Kate::Document,
* @param s string to insert
* @return true on success
*/
- bool editInsertLine ( uint line, const QString &s );
+ bool editInsertLine ( uint line, const TQString &s );
/**
* Remove a line
* @param line line number
@@ -333,7 +333,7 @@ class KateDocument : public Kate::Document,
void undoCancel();
private:
- void editAddUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text);
+ void editAddUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text);
uint editSessionNumber;
bool editIsRunning;
@@ -360,16 +360,16 @@ class KateDocument : public Kate::Document,
friend class KateTemplateHandler;
private:
- QPtrList<KateSuperCursor> m_superCursors;
+ TQPtrList<KateSuperCursor> m_superCursors;
//
// some internals for undo/redo
//
- QPtrList<KateUndoGroup> undoItems;
- QPtrList<KateUndoGroup> redoItems;
+ TQPtrList<KateUndoGroup> undoItems;
+ TQPtrList<KateUndoGroup> redoItems;
bool m_undoDontMerge; //create a setter later on and remove the friend declaration
bool m_undoIgnoreCancel;
- QTimer* m_undoMergeTimer;
+ TQTimer* m_undoMergeTimer;
// these two variables are for resetting the document to
// non-modified if all changes have been undone...
KateUndoGroup* lastUndoGroupWhenSaved;
@@ -389,20 +389,20 @@ class KateDocument : public Kate::Document,
//
public slots:
KTextEditor::Cursor *createCursor ();
- QPtrList<KTextEditor::Cursor> cursors () const;
+ TQPtrList<KTextEditor::Cursor> cursors () const;
private:
- QPtrList<KTextEditor::Cursor> myCursors;
+ TQPtrList<KTextEditor::Cursor> myCursors;
//
// KTextEditor::SearchInterface stuff
//
public slots:
bool searchText (unsigned int startLine, unsigned int startCol,
- const QString &text, unsigned int *foundAtLine, unsigned int *foundAtCol,
+ const TQString &text, unsigned int *foundAtLine, unsigned int *foundAtCol,
unsigned int *matchLen, bool casesensitive = true, bool backwards = false);
bool searchText (unsigned int startLine, unsigned int startCol,
- const QRegExp &regexp, unsigned int *foundAtLine, unsigned int *foundAtCol,
+ const TQRegExp &regexp, unsigned int *foundAtLine, unsigned int *foundAtCol,
unsigned int *matchLen, bool backwards = false);
//
@@ -412,8 +412,8 @@ class KateDocument : public Kate::Document,
uint hlMode ();
bool setHlMode (uint mode);
uint hlModeCount ();
- QString hlModeName (uint mode);
- QString hlModeSectionName (uint mode);
+ TQString hlModeName (uint mode);
+ TQString hlModeSectionName (uint mode);
public:
void bufferHlChanged ();
@@ -457,14 +457,14 @@ class KateDocument : public Kate::Document,
void addMark( uint line, uint markType );
void removeMark( uint line, uint markType );
- QPtrList<KTextEditor::Mark> marks();
+ TQPtrList<KTextEditor::Mark> marks();
void clearMarks();
- void setPixmap( MarkInterface::MarkTypes, const QPixmap& );
- void setDescription( MarkInterface::MarkTypes, const QString& );
- QString markDescription( MarkInterface::MarkTypes );
- QPixmap *markPixmap( MarkInterface::MarkTypes );
- QColor markColor( MarkInterface::MarkTypes );
+ void setPixmap( MarkInterface::MarkTypes, const TQPixmap& );
+ void setDescription( MarkInterface::MarkTypes, const TQString& );
+ TQString markDescription( MarkInterface::MarkTypes );
+ TQPixmap *markPixmap( MarkInterface::MarkTypes );
+ TQColor markColor( MarkInterface::MarkTypes );
void setMarksUserChangable( uint markMask );
uint editableMarks();
@@ -474,9 +474,9 @@ class KateDocument : public Kate::Document,
void markChanged( KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction );
private:
- QIntDict<KTextEditor::Mark> m_marks;
- QIntDict<QPixmap> m_markPixmaps;
- QIntDict<QString> m_markDescriptions;
+ TQIntDict<KTextEditor::Mark> m_marks;
+ TQIntDict<TQPixmap> m_markPixmaps;
+ TQIntDict<TQString> m_markDescriptions;
uint m_editableMarks;
//
@@ -499,7 +499,7 @@ class KateDocument : public Kate::Document,
*
* @since Kate 2.3
*/
- QString mimeType();
+ TQString mimeType();
/**
* @return the calculated size in bytes that the document would have when saved to
@@ -517,7 +517,7 @@ class KateDocument : public Kate::Document,
* @since Kate 2.3
* @todo implement this (it returns "UNKNOWN")
*/
- QString niceFileSize();
+ TQString niceFileSize();
/**
* @return a pointer to the KMimeType for this document, found by analyzing the
@@ -533,13 +533,13 @@ class KateDocument : public Kate::Document,
// KTextEditor::VariableInterface
//
public:
- QString variable( const QString &name ) const;
+ TQString variable( const TQString &name ) const;
signals:
- void variableChanged( const QString &, const QString & );
+ void variableChanged( const TQString &, const TQString & );
private:
- QMap<QString, QString> m_storedVariables;
+ TQMap<TQString, TQString> m_storedVariables;
//
// KParts::ReadWrite stuff
@@ -565,7 +565,7 @@ class KateDocument : public Kate::Document,
void setModified( bool m );
private slots:
- void slotDataKate ( KIO::Job* kio_job, const QByteArray &data );
+ void slotDataKate ( KIO::Job* kio_job, const TQByteArray &data );
void slotFinishedKate ( KIO::Job * job );
private:
@@ -574,30 +574,30 @@ class KateDocument : public Kate::Document,
void activateDirWatch ();
void deactivateDirWatch ();
- QString m_dirWatchFile;
+ TQString m_dirWatchFile;
//
// Kate::Document stuff, this is all deprecated!!!!!!!!!!
//
public:
- Kate::ConfigPage *colorConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *fontConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *indentConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *selectConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *editConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *keysConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *hlConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *viewDefaultsConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *saveConfigPage( QWidget * ) { return 0; }
-
- Kate::ActionMenu *hlActionMenu (const QString& /* text */, QObject* /* parent */ = 0, const char* /* name */ = 0) { return 0; }
- Kate::ActionMenu *exportActionMenu (const QString& /* text */, QObject* /* parent */ = 0, const char* /* name */ = 0) { return 0; }
+ Kate::ConfigPage *colorConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *fontConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *indentConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *selectConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *editConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *keysConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *hlConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *viewDefaultsConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *saveConfigPage( TQWidget * ) { return 0; }
+
+ Kate::ActionMenu *hlActionMenu (const TQString& /* text */, TQObject* /* parent */ = 0, const char* /* name */ = 0) { return 0; }
+ Kate::ActionMenu *exportActionMenu (const TQString& /* text */, TQObject* /* parent */ = 0, const char* /* name */ = 0) { return 0; }
public:
/**
* Type chars in a view
*/
- bool typeChars ( KateView *type, const QString &chars );
+ bool typeChars ( KateView *type, const TQString &chars );
/**
* gets the last line number (numLines() -1)
@@ -620,7 +620,7 @@ class KateDocument : public Kate::Document,
//export feature, obsolute
public slots:
- void exportAs(const QString&) { };
+ void exportAs(const TQString&) { };
signals:
void modifiedChanged ();
@@ -673,8 +673,8 @@ class KateDocument : public Kate::Document,
void optimizeLeadingSpace( uint line, int flags, int change );
void replaceWithOptimizedSpace( uint line, uint upto_column, uint space, int flags );
- bool removeStringFromBegining(int line, QString &str);
- bool removeStringFromEnd(int line, QString &str);
+ bool removeStringFromBegining(int line, TQString &str);
+ bool removeStringFromEnd(int line, TQString &str);
/**
Find the position (line and col) of the next char
@@ -743,7 +743,7 @@ class KateDocument : public Kate::Document,
bool removeStartLineCommentFromSelection( KateView *view, int attrib=0 );
public:
- QString getWord( const KateTextCursor& cursor );
+ TQString getWord( const KateTextCursor& cursor );
public:
void tagAll();
@@ -756,9 +756,9 @@ class KateDocument : public Kate::Document,
public:
- QString docName () {return m_docName;};
+ TQString docName () {return m_docName;};
- void setDocName (QString docName);
+ void setDocName (TQString docName);
void lineInfo (KateLineInfo *info, unsigned int line);
@@ -796,8 +796,8 @@ class KateDocument : public Kate::Document,
// -1: ignore once, 0: false, 1: true
public slots:
- void setEncoding (const QString &e);
- QString encoding() const;
+ void setEncoding (const TQString &e);
+ TQString encoding() const;
public slots:
void setWordWrap (bool on);
@@ -861,9 +861,9 @@ class KateDocument : public Kate::Document,
void textRemoved();
private slots:
- void slotModOnHdDirty (const QString &path);
- void slotModOnHdCreated (const QString &path);
- void slotModOnHdDeleted (const QString &path);
+ void slotModOnHdDirty (const TQString &path);
+ void slotModOnHdCreated (const TQString &path);
+ void slotModOnHdDeleted (const TQString &path);
private:
/**
@@ -875,14 +875,14 @@ class KateDocument : public Kate::Document,
*
* @since 3.3
*/
- bool createDigest ( QCString &result );
+ bool createDigest ( TQCString &result );
/**
* create a string for the modonhd warnings, giving the reason.
*
* @since 3.3
*/
- QString reasonedMOHString() const;
+ TQString reasonedMOHString() const;
/**
* Removes all trailing whitespace form @p line, if
@@ -914,9 +914,9 @@ class KateDocument : public Kate::Document,
bool m_modOnHd;
unsigned char m_modOnHdReason;
- QCString m_digest; // MD5 digest, updated on load/save
+ TQCString m_digest; // MD5 digest, updated on load/save
- QString m_docName;
+ TQString m_docName;
int m_docNameNumber;
// file type !!!
@@ -938,7 +938,7 @@ class KateDocument : public Kate::Document,
static bool checkOverwrite( KURL u );
- static void setDefaultEncoding (const QString &encoding);
+ static void setDefaultEncoding (const TQString &encoding);
void setEncodingSticky( bool e ) { m_encodingSticky = e; }
@@ -973,36 +973,36 @@ class KateDocument : public Kate::Document,
Reads and applies the variables in a single line
TODO registered variables gets saved in a [map]
*/
- void readVariableLine( QString t, bool onlyViewAndRenderer = false );
+ void readVariableLine( TQString t, bool onlyViewAndRenderer = false );
/**
Sets a view variable in all the views.
*/
- void setViewVariable( QString var, QString val );
+ void setViewVariable( TQString var, TQString val );
/**
@return weather a string value could be converted
to a bool value as supported.
The value is put in *result.
*/
- static bool checkBoolValue( QString value, bool *result );
+ static bool checkBoolValue( TQString value, bool *result );
/**
@return weather a string value could be converted
to a integer value.
The value is put in *result.
*/
- static bool checkIntValue( QString value, int *result );
+ static bool checkIntValue( TQString value, int *result );
/**
- Feeds value into @p col using QColor::setNamedColor() and returns
+ Feeds value into @p col using TQColor::setNamedColor() and returns
wheather the color is valid
*/
- static bool checkColorValue( QString value, QColor &col );
+ static bool checkColorValue( TQString value, TQColor &col );
/**
* helper regex to capture the document variables
*/
- static QRegExp kvLine;
- static QRegExp kvLineWildcard;
- static QRegExp kvLineMime;
- static QRegExp kvVar;
+ static TQRegExp kvLine;
+ static TQRegExp kvLineWildcard;
+ static TQRegExp kvLineMime;
+ static TQRegExp kvVar;
KIO::TransferJob *m_job;
KTempFile *m_tempFile;
@@ -1014,7 +1014,7 @@ class KateDocument : public Kate::Document,
bool invokeTabInterceptor(KKey);
protected:
- virtual bool insertTemplateTextImplementation ( uint line, uint column, const QString &templateString, const QMap<QString,QString> &initialValues, QWidget *parentWindow=0 );
+ virtual bool insertTemplateTextImplementation ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *parentWindow=0 );
KateKeyInterceptorFunctor *m_tabInterceptor;
protected slots:
@@ -1030,7 +1030,7 @@ class KateDocument : public Kate::Document,
bool setSelection ( uint startLine, uint startCol, uint endLine, uint endCol );
bool clearSelection ();
bool hasSelection () const;
- QString selection () const;
+ TQString selection () const;
bool removeSelectedText ();
bool selectAll();
diff --git a/kate/part/katedocumenthelpers.cpp b/kate/part/katedocumenthelpers.cpp
index 9055e7ec3..370be7684 100644
--- a/kate/part/katedocumenthelpers.cpp
+++ b/kate/part/katedocumenthelpers.cpp
@@ -31,8 +31,8 @@ KateBrowserExtension::KateBrowserExtension( KateDocument* doc )
: KParts::BrowserExtension( doc, "katepartbrowserextension" ),
m_doc (doc)
{
- connect( doc, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ connect( doc, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
emit enableAction( "print", true );
}
diff --git a/kate/part/katedocumenthelpers.h b/kate/part/katedocumenthelpers.h
index 8346ffa18..75c6740d0 100644
--- a/kate/part/katedocumenthelpers.h
+++ b/kate/part/katedocumenthelpers.h
@@ -25,8 +25,8 @@
#include <kparts/browserextension.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
class KateDocument;
diff --git a/kate/part/katefactory.cpp b/kate/part/katefactory.cpp
index a02d00fe7..64bde8718 100644
--- a/kate/part/katefactory.cpp
+++ b/kate/part/katefactory.cpp
@@ -38,7 +38,7 @@
#include <kdirwatch.h>
#include <kstaticdeleter.h>
-#include <qapplication.h>
+#include <tqapplication.h>
/**
* dummy wrapper factory to be sure nobody external deletes our katefactory
@@ -50,13 +50,13 @@ class KateFactoryPublic : public KParts::Factory
* reimplemented create object method
* @param parentWidget parent widget
* @param widgetName widget name
- * @param parent QObject parent
+ * @param parent TQObject parent
* @param name object name
* @param classname class name
* @param args additional arguments
* @return constructed part object
*/
- KParts::Part *createPartObject ( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *classname, const QStringList &args )
+ KParts::Part *createPartObject ( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *classname, const TQStringList &args )
{
return KateFactory::self()->createPartObject (parentWidget, widgetName, parent, name, classname, args);
}
@@ -157,7 +157,7 @@ KateFactory::KateFactory ()
m_cmds.push_back (new KateCommands::Date ());
m_cmds.push_back (new SearchCommand());
- for ( QValueList<Kate::Command *>::iterator it = m_cmds.begin(); it != m_cmds.end(); ++it )
+ for ( TQValueList<Kate::Command *>::iterator it = m_cmds.begin(); it != m_cmds.end(); ++it )
KateCmd::self()->registerCommand (*it);
}
@@ -186,7 +186,7 @@ KateFactory::~KateFactory()
delete m_vm;
- for ( QValueList<Kate::Command *>::iterator it = m_cmds.begin(); it != m_cmds.end(); ++it )
+ for ( TQValueList<Kate::Command *>::iterator it = m_cmds.begin(); it != m_cmds.end(); ++it )
delete *it;
// cu manager
@@ -206,9 +206,9 @@ KateFactory *KateFactory::self ()
return s_self;
}
-KParts::Part *KateFactory::createPartObject ( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *_classname, const QStringList & )
+KParts::Part *KateFactory::createPartObject ( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *_classname, const TQStringList & )
{
- QCString classname( _classname );
+ TQCString classname( _classname );
bool bWantSingleView = ( classname != "KTextEditor::Document" && classname != "Kate::Document" );
bool bWantBrowserView = ( classname == "Browser/View" );
bool bWantReadOnly = (bWantBrowserView || ( classname == "KParts::ReadOnlyPart" ));
@@ -262,7 +262,7 @@ KateJScript *KateFactory::jscript ()
}
-KateIndentScript KateFactory::indentScript (const QString &scriptname)
+KateIndentScript KateFactory::indentScript (const TQString &scriptname)
{
KateIndentScript result;
for(uint i=0;i<m_indentScriptManagers.count();i++)
diff --git a/kate/part/katefactory.h b/kate/part/katefactory.h
index 5e3986161..0fd939ce3 100644
--- a/kate/part/katefactory.h
+++ b/kate/part/katefactory.h
@@ -73,15 +73,15 @@ class KateFactory
* reimplemented create object method
* @param parentWidget parent widget
* @param widgetName widget name
- * @param parent QObject parent
+ * @param parent TQObject parent
* @param name object name
* @param classname class parent
* @param args additional arguments
* @return constructed part object
*/
- KParts::Part *createPartObject ( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const char *classname,
- const QStringList &args );
+ KParts::Part *createPartObject ( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const char *classname,
+ const TQStringList &args );
/**
* public accessor to the instance
@@ -132,19 +132,19 @@ class KateFactory
* return a list of all registered docs
* @return all known documents
*/
- inline QPtrList<KateDocument> *documents () { return &m_documents; };
+ inline TQPtrList<KateDocument> *documents () { return &m_documents; };
/**
* return a list of all registered views
* @return all known views
*/
- inline QPtrList<KateView> *views () { return &m_views; };
+ inline TQPtrList<KateView> *views () { return &m_views; };
/**
* return a list of all registered renderers
* @return all known renderers
*/
- inline QPtrList<KateRenderer> *renderers () { return &m_renderers; };
+ inline TQPtrList<KateRenderer> *renderers () { return &m_renderers; };
/**
* on start detected plugins
@@ -210,7 +210,7 @@ class KateFactory
* looks up a script given by name. If there are more than
* one matching, the first found will be taken
*/
- KateIndentScript indentScript (const QString &scriptname);
+ KateIndentScript indentScript (const TQString &scriptname);
private:
/**
@@ -231,17 +231,17 @@ class KateFactory
/**
* registered docs
*/
- QPtrList<KateDocument> m_documents;
+ TQPtrList<KateDocument> m_documents;
/**
* registered views
*/
- QPtrList<KateView> m_views;
+ TQPtrList<KateView> m_views;
/**
* registered renderers
*/
- QPtrList<KateRenderer> m_renderers;
+ TQPtrList<KateRenderer> m_renderers;
/**
* global dirwatch object
@@ -286,7 +286,7 @@ class KateFactory
/**
* internal commands
*/
- QValueList<Kate::Command *> m_cmds;
+ TQValueList<Kate::Command *> m_cmds;
/**
* js interpreter
@@ -303,7 +303,7 @@ class KateFactory
/**
* manager for js based indenters
*/
- QPtrList<KateIndentScriptManagerAbstract> m_indentScriptManagers;
+ TQPtrList<KateIndentScriptManagerAbstract> m_indentScriptManagers;
};
diff --git a/kate/part/katefiletype.cpp b/kate/part/katefiletype.cpp
index ea3a487cb..11d5e9a46 100644
--- a/kate/part/katefiletype.cpp
+++ b/kate/part/katefiletype.cpp
@@ -35,22 +35,22 @@
#include <klocale.h>
#include <kpopupmenu.h>
-#include <qregexp.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qheader.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qwhatsthis.h>
-#include <qwidgetstack.h>
+#include <tqregexp.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqheader.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqwhatsthis.h>
+#include <tqwidgetstack.h>
#define KATE_FT_HOWMANY 1024
//END Includes
@@ -74,7 +74,7 @@ void KateFileTypeManager::update ()
{
KConfig config ("katefiletyperc", false, false);
- QStringList g (config.groupList());
+ TQStringList g (config.groupList());
g.sort ();
m_types.clear ();
@@ -99,11 +99,11 @@ void KateFileTypeManager::update ()
//
// save the given list to config file + update
//
-void KateFileTypeManager::save (QPtrList<KateFileType> *v)
+void KateFileTypeManager::save (TQPtrList<KateFileType> *v)
{
KConfig config ("katefiletyperc", false, false);
- QStringList newg;
+ TQStringList newg;
for (uint z=0; z < v->count(); z++)
{
config.setGroup (v->at(z)->name);
@@ -113,8 +113,8 @@ void KateFileTypeManager::save (QPtrList<KateFileType> *v)
config.writeEntry ("Mimetypes", v->at(z)->mimetypes, ';');
config.writeEntry ("Priority", v->at(z)->priority);
- QString varLine = v->at(z)->varLine;
- if (QRegExp("kate:(.*)").search(varLine) < 0)
+ TQString varLine = v->at(z)->varLine;
+ if (TQRegExp("kate:(.*)").search(varLine) < 0)
varLine.prepend ("kate: ");
config.writeEntry ("Variables", varLine);
@@ -122,7 +122,7 @@ void KateFileTypeManager::save (QPtrList<KateFileType> *v)
newg << v->at(z)->name;
}
- QStringList g (config.groupList());
+ TQStringList g (config.groupList());
for (uint z=0; z < g.count(); z++)
{
@@ -144,7 +144,7 @@ int KateFileTypeManager::fileType (KateDocument *doc)
if (m_types.isEmpty())
return -1;
- QString fileName = doc->url().prettyURL();
+ TQString fileName = doc->url().prettyURL();
int length = doc->url().prettyURL().length();
int result;
@@ -152,18 +152,18 @@ int KateFileTypeManager::fileType (KateDocument *doc)
// Try wildcards
if ( ! fileName.isEmpty() )
{
- static QStringList commonSuffixes = QStringList::split (";", ".orig;.new;~;.bak;.BAK");
+ static TQStringList commonSuffixes = TQStringList::split (";", ".orig;.new;~;.bak;.BAK");
if ((result = wildcardsFind(fileName)) != -1)
return result;
- QString backupSuffix = KateDocumentConfig::global()->backupSuffix();
+ TQString backupSuffix = KateDocumentConfig::global()->backupSuffix();
if (fileName.endsWith(backupSuffix)) {
if ((result = wildcardsFind(fileName.left(length - backupSuffix.length()))) != -1)
return result;
}
- for (QStringList::Iterator it = commonSuffixes.begin(); it != commonSuffixes.end(); ++it) {
+ for (TQStringList::Iterator it = commonSuffixes.begin(); it != commonSuffixes.end(); ++it) {
if (*it != backupSuffix && fileName.endsWith(*it)) {
if ((result = wildcardsFind(fileName.left(length - (*it).length()))) != -1)
return result;
@@ -183,7 +183,7 @@ int KateFileTypeManager::fileType (KateDocument *doc)
// Try content-based mimetype
KMimeType::Ptr mt = doc->mimeTypeForContent();
- QPtrList<KateFileType> types;
+ TQPtrList<KateFileType> types;
for (uint z=0; z < m_types.count(); z++)
{
@@ -212,17 +212,17 @@ int KateFileTypeManager::fileType (KateDocument *doc)
return -1;
}
-int KateFileTypeManager::wildcardsFind (const QString &fileName)
+int KateFileTypeManager::wildcardsFind (const TQString &fileName)
{
- QPtrList<KateFileType> types;
+ TQPtrList<KateFileType> types;
for (uint z=0; z < m_types.count(); z++)
{
- for( QStringList::Iterator it = m_types.at(z)->wildcards.begin(); it != m_types.at(z)->wildcards.end(); ++it )
+ for( TQStringList::Iterator it = m_types.at(z)->wildcards.begin(); it != m_types.at(z)->wildcards.end(); ++it )
{
// anders: we need to be sure to match the end of string, as eg a css file
// would otherwise end up with the c hl
- QRegExp re(*it, true, true);
+ TQRegExp re(*it, true, true);
if ( ( re.search( fileName ) > -1 ) && ( re.matchedLength() == (int)fileName.length() ) )
types.append (m_types.at(z));
}
@@ -258,63 +258,63 @@ const KateFileType *KateFileTypeManager::fileType (uint number)
//END KateFileTypeManager
//BEGIN KateFileTypeConfigTab
-KateFileTypeConfigTab::KateFileTypeConfigTab( QWidget *parent )
+KateFileTypeConfigTab::KateFileTypeConfigTab( TQWidget *parent )
: KateConfigPage( parent )
{
m_types.setAutoDelete (true);
m_lastType = 0;
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
// hl chooser
- QHBox *hbHl = new QHBox( this );
+ TQHBox *hbHl = new TQHBox( this );
layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
- QLabel *lHl = new QLabel( i18n("&Filetype:"), hbHl );
- typeCombo = new QComboBox( false, hbHl );
+ TQLabel *lHl = new TQLabel( i18n("&Filetype:"), hbHl );
+ typeCombo = new TQComboBox( false, hbHl );
lHl->setBuddy( typeCombo );
- connect( typeCombo, SIGNAL(activated(int)),
- this, SLOT(typeChanged(int)) );
+ connect( typeCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(typeChanged(int)) );
- QPushButton *btnnew = new QPushButton( i18n("&New"), hbHl );
- connect( btnnew, SIGNAL(clicked()), this, SLOT(newType()) );
+ TQPushButton *btnnew = new TQPushButton( i18n("&New"), hbHl );
+ connect( btnnew, TQT_SIGNAL(clicked()), this, TQT_SLOT(newType()) );
- btndel = new QPushButton( i18n("&Delete"), hbHl );
- connect( btndel, SIGNAL(clicked()), this, SLOT(deleteType()) );
+ btndel = new TQPushButton( i18n("&Delete"), hbHl );
+ connect( btndel, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteType()) );
- gbProps = new QGroupBox( 2, Qt::Horizontal, i18n("Properties"), this );
+ gbProps = new TQGroupBox( 2, Qt::Horizontal, i18n("Properties"), this );
layout->add (gbProps);
// file & mime types
- QLabel *lname = new QLabel( i18n("N&ame:"), gbProps );
- name = new QLineEdit( gbProps );
+ TQLabel *lname = new TQLabel( i18n("N&ame:"), gbProps );
+ name = new TQLineEdit( gbProps );
lname->setBuddy( name );
// file & mime types
- QLabel *lsec = new QLabel( i18n("&Section:"), gbProps );
- section = new QLineEdit( gbProps );
+ TQLabel *lsec = new TQLabel( i18n("&Section:"), gbProps );
+ section = new TQLineEdit( gbProps );
lsec->setBuddy( section );
// file & mime types
- QLabel *lvar = new QLabel( i18n("&Variables:"), gbProps );
- varLine = new QLineEdit( gbProps );
+ TQLabel *lvar = new TQLabel( i18n("&Variables:"), gbProps );
+ varLine = new TQLineEdit( gbProps );
lvar->setBuddy( varLine );
// file & mime types
- QLabel *lFileExts = new QLabel( i18n("File e&xtensions:"), gbProps );
- wildcards = new QLineEdit( gbProps );
+ TQLabel *lFileExts = new TQLabel( i18n("File e&xtensions:"), gbProps );
+ wildcards = new TQLineEdit( gbProps );
lFileExts->setBuddy( wildcards );
- QLabel *lMimeTypes = new QLabel( i18n("MIME &types:"), gbProps);
- QHBox *hbMT = new QHBox (gbProps);
- mimetypes = new QLineEdit( hbMT );
+ TQLabel *lMimeTypes = new TQLabel( i18n("MIME &types:"), gbProps);
+ TQHBox *hbMT = new TQHBox (gbProps);
+ mimetypes = new TQLineEdit( hbMT );
lMimeTypes->setBuddy( mimetypes );
- QToolButton *btnMTW = new QToolButton(hbMT);
- btnMTW->setIconSet(QIconSet(SmallIcon("wizard")));
- connect(btnMTW, SIGNAL(clicked()), this, SLOT(showMTDlg()));
+ TQToolButton *btnMTW = new TQToolButton(hbMT);
+ btnMTW->setIconSet(TQIconSet(SmallIcon("wizard")));
+ connect(btnMTW, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMTDlg()));
- QLabel *lprio = new QLabel( i18n("Prio&rity:"), gbProps);
+ TQLabel *lprio = new TQLabel( i18n("Prio&rity:"), gbProps);
priority = new KIntNumInput( gbProps );
lprio->setBuddy( priority );
@@ -322,36 +322,36 @@ KateFileTypeConfigTab::KateFileTypeConfigTab( QWidget *parent )
reload();
- connect( name, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( section, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( varLine, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( wildcards, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( mimetypes, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( priority, SIGNAL( valueChanged ( int ) ), this, SLOT( slotChanged() ) );
+ connect( name, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( section, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( varLine, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( wildcards, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( mimetypes, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( priority, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotChanged() ) );
- QWhatsThis::add( btnnew, i18n("Create a new file type.") );
- QWhatsThis::add( btndel, i18n("Delete the current file type.") );
- QWhatsThis::add( name, i18n(
+ TQWhatsThis::add( btnnew, i18n("Create a new file type.") );
+ TQWhatsThis::add( btndel, i18n("Delete the current file type.") );
+ TQWhatsThis::add( name, i18n(
"The name of the filetype will be the text of the corresponding menu item.") );
- QWhatsThis::add( section, i18n(
+ TQWhatsThis::add( section, i18n(
"The section name is used to organize the file types in menus.") );
- QWhatsThis::add( varLine, i18n(
+ TQWhatsThis::add( varLine, i18n(
"<p>This string allows you to configure Kate's settings for the files "
"selected by this mimetype using Kate variables. You can set almost any "
"configuration option, such as highlight, indent-mode, encoding, etc.</p>"
"<p>For a full list of known variables, see the manual.</p>") );
- QWhatsThis::add( wildcards, i18n(
+ TQWhatsThis::add( wildcards, i18n(
"The wildcards mask allows you to select files by filename. A typical "
"mask uses an asterisk and the file extension, for example "
"<code>*.txt; *.text</code>. The string is a semicolon-separated list "
"of masks.") );
- QWhatsThis::add( mimetypes, i18n(
+ TQWhatsThis::add( mimetypes, i18n(
"The mime type mask allows you to select files by mimetype. The string is "
"a semicolon-separated list of mimetypes, for example "
"<code>text/plain; text/english</code>.") );
- QWhatsThis::add( btnMTW, i18n(
+ TQWhatsThis::add( btnMTW, i18n(
"Displays a wizard that helps you easily select mimetypes.") );
- QWhatsThis::add( priority, i18n(
+ TQWhatsThis::add( priority, i18n(
"Sets a priority for this file type. If more than one file type selects the same "
"file, the one with the highest priority will be used." ) );
}
@@ -399,7 +399,7 @@ void KateFileTypeConfigTab::update ()
for( uint i = 0; i < m_types.count(); i++) {
if (m_types.at(i)->section.length() > 0)
- typeCombo->insertItem(m_types.at(i)->section + QString ("/") + m_types.at(i)->name);
+ typeCombo->insertItem(m_types.at(i)->section + TQString ("/") + m_types.at(i)->name);
else
typeCombo->insertItem(m_types.at(i)->name);
}
@@ -424,7 +424,7 @@ void KateFileTypeConfigTab::deleteType ()
void KateFileTypeConfigTab::newType ()
{
- QString newN = i18n("New Filetype");
+ TQString newN = i18n("New Filetype");
for( uint i = 0; i < m_types.count(); i++) {
if (m_types.at(i)->name == newN)
@@ -451,8 +451,8 @@ void KateFileTypeConfigTab::save ()
m_lastType->name = name->text ();
m_lastType->section = section->text ();
m_lastType->varLine = varLine->text ();
- m_lastType->wildcards = QStringList::split (";", wildcards->text ());
- m_lastType->mimetypes = QStringList::split (";", mimetypes->text ());
+ m_lastType->wildcards = TQStringList::split (";", wildcards->text ());
+ m_lastType->mimetypes = TQStringList::split (";", mimetypes->text ());
m_lastType->priority = priority->value();
}
}
@@ -501,8 +501,8 @@ void KateFileTypeConfigTab::typeChanged (int type)
void KateFileTypeConfigTab::showMTDlg()
{
- QString text = i18n("Select the MimeTypes you want for this file type.\nPlease note that this will automatically edit the associated file extensions as well.");
- QStringList list = QStringList::split( QRegExp("\\s*;\\s*"), mimetypes->text() );
+ TQString text = i18n("Select the MimeTypes you want for this file type.\nPlease note that this will automatically edit the associated file extensions as well.");
+ TQStringList list = TQStringList::split( TQRegExp("\\s*;\\s*"), mimetypes->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.
@@ -519,9 +519,9 @@ void KateViewFileTypeAction::init()
m_doc = 0;
subMenus.setAutoDelete( true );
- popupMenu()->insertItem ( i18n("None"), this, SLOT(setType(int)), 0, 0);
+ popupMenu()->insertItem ( i18n("None"), this, TQT_SLOT(setType(int)), 0, 0);
- connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow()));
+ connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}
void KateViewFileTypeAction::updateMenu (Kate::Document *doc)
@@ -536,27 +536,27 @@ void KateViewFileTypeAction::slotAboutToShow()
for (int z=0; z<count; z++)
{
- QString hlName = KateFactory::self()->fileTypeManager()->list()->at(z)->name;
- QString hlSection = KateFactory::self()->fileTypeManager()->list()->at(z)->section;
+ TQString hlName = KateFactory::self()->fileTypeManager()->list()->at(z)->name;
+ TQString hlSection = KateFactory::self()->fileTypeManager()->list()->at(z)->section;
if ( !hlSection.isEmpty() && (names.contains(hlName) < 1) )
{
if (subMenusName.contains(hlSection) < 1)
{
subMenusName << hlSection;
- QPopupMenu *menu = new QPopupMenu ();
+ TQPopupMenu *menu = new TQPopupMenu ();
subMenus.append(menu);
popupMenu()->insertItem (hlSection, menu);
}
int m = subMenusName.findIndex (hlSection);
names << hlName;
- subMenus.at(m)->insertItem ( hlName, this, SLOT(setType(int)), 0, z+1);
+ subMenus.at(m)->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1);
}
else if (names.contains(hlName) < 1)
{
names << hlName;
- popupMenu()->insertItem ( hlName, this, SLOT(setType(int)), 0, z+1);
+ popupMenu()->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1);
}
}
diff --git a/kate/part/katefiletype.h b/kate/part/katefiletype.h
index cd343019c..7a927636b 100644
--- a/kate/part/katefiletype.h
+++ b/kate/part/katefiletype.h
@@ -19,10 +19,10 @@
#ifndef __kate_filetype_h__
#define __kate_filetype_h__
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qpopupmenu.h> // for QPtrList<QPopupMenu>, compile with gcc 3.4
-#include <qguardedptr.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqpopupmenu.h> // for TQPtrList<TQPopupMenu>, compile with gcc 3.4
+#include <tqguardedptr.h>
#include "katedialogs.h"
@@ -32,12 +32,12 @@ class KateFileType
{
public:
int number;
- QString name;
- QString section;
- QStringList wildcards;
- QStringList mimetypes;
+ TQString name;
+ TQString section;
+ TQStringList wildcards;
+ TQStringList mimetypes;
int priority;
- QString varLine;
+ TQString varLine;
};
class KateFileTypeManager
@@ -51,7 +51,7 @@ class KateFileTypeManager
*/
void update ();
- void save (QPtrList<KateFileType> *v);
+ void save (TQPtrList<KateFileType> *v);
/**
* get the right fileType for the given document
@@ -67,13 +67,13 @@ class KateFileTypeManager
/**
* Don't modify
*/
- QPtrList<KateFileType> *list () { return &m_types; }
+ TQPtrList<KateFileType> *list () { return &m_types; }
private:
- int wildcardsFind (const QString &fileName);
+ int wildcardsFind (const TQString &fileName);
private:
- QPtrList<KateFileType> m_types;
+ TQPtrList<KateFileType> m_types;
};
class KateFileTypeConfigTab : public KateConfigPage
@@ -81,7 +81,7 @@ class KateFileTypeConfigTab : public KateConfigPage
Q_OBJECT
public:
- KateFileTypeConfigTab( QWidget *parent );
+ KateFileTypeConfigTab( TQWidget *parent );
public slots:
void apply();
@@ -98,17 +98,17 @@ class KateFileTypeConfigTab : public KateConfigPage
void save ();
private:
- class QGroupBox *gbProps;
- class QPushButton *btndel;
- class QComboBox *typeCombo;
- class QLineEdit *wildcards;
- class QLineEdit *mimetypes;
+ class TQGroupBox *gbProps;
+ class TQPushButton *btndel;
+ class TQComboBox *typeCombo;
+ class TQLineEdit *wildcards;
+ class TQLineEdit *mimetypes;
class KIntNumInput *priority;
- class QLineEdit *name;
- class QLineEdit *section;
- class QLineEdit *varLine;
+ class TQLineEdit *name;
+ class TQLineEdit *section;
+ class TQLineEdit *varLine;
- QPtrList<KateFileType> m_types;
+ TQPtrList<KateFileType> m_types;
KateFileType *m_lastType;
};
@@ -117,7 +117,7 @@ class KateViewFileTypeAction : public Kate::ActionMenu
Q_OBJECT
public:
- KateViewFileTypeAction(const QString& text, QObject* parent = 0, const char* name = 0)
+ KateViewFileTypeAction(const TQString& text, TQObject* parent = 0, const char* name = 0)
: Kate::ActionMenu(text, parent, name) { init(); };
~KateViewFileTypeAction(){;};
@@ -127,10 +127,10 @@ class KateViewFileTypeAction : public Kate::ActionMenu
private:
void init();
- QGuardedPtr<KateDocument> m_doc;
- QStringList subMenusName;
- QStringList names;
- QPtrList<QPopupMenu> subMenus;
+ TQGuardedPtr<KateDocument> m_doc;
+ TQStringList subMenusName;
+ TQStringList names;
+ TQPtrList<TQPopupMenu> subMenus;
public slots:
void slotAboutToShow();
diff --git a/kate/part/katefont.cpp b/kate/part/katefont.cpp
index efab0268c..361ce5cce 100644
--- a/kate/part/katefont.cpp
+++ b/kate/part/katefont.cpp
@@ -23,13 +23,13 @@
#include <kglobalsettings.h>
-#include <qfontinfo.h>
+#include <tqfontinfo.h>
//
// KateFontMetrics implementation
//
-KateFontMetrics::KateFontMetrics(const QFont& f) : QFontMetrics(f)
+KateFontMetrics::KateFontMetrics(const TQFont& f) : TQFontMetrics(f)
{
for (int i=0; i<256; i++) warray[i]=0;
}
@@ -49,7 +49,7 @@ short * KateFontMetrics::createRow (short *wa, uchar row)
return wa;
}
-int KateFontMetrics::width(QChar c)
+int KateFontMetrics::width(TQChar c)
{
uchar cell=c.cell();
uchar row=c.row();
@@ -58,7 +58,7 @@ int KateFontMetrics::width(QChar c)
if (!wa)
wa = createRow (wa, row);
- if (wa[cell]<0) wa[cell]=(short) QFontMetrics::width(c);
+ if (wa[cell]<0) wa[cell]=(short) TQFontMetrics::width(c);
return (int)wa[cell];
}
@@ -93,12 +93,12 @@ void KateFontStruct::updateFontData ()
fontHeight = maxAscent + maxDescent + 1;
fontAscent = maxAscent;
- m_fixedPitch = QFontInfo( myFont ).fixedPitch();
+ m_fixedPitch = TQFontInfo( myFont ).fixedPitch();
}
-void KateFontStruct::setFont (const QFont & font)
+void KateFontStruct::setFont (const TQFont & font)
{
- QFontMetrics testFM (font);
+ TQFontMetrics testFM (font);
// no valid font tried
if ((testFM.ascent() + testFM.descent() + 1) < 1)
@@ -106,13 +106,13 @@ void KateFontStruct::setFont (const QFont & font)
myFont = font;
- myFontBold = QFont (font);
+ myFontBold = TQFont (font);
myFontBold.setBold (true);
- myFontItalic = QFont (font);
+ myFontItalic = TQFont (font);
myFontItalic.setItalic (true);
- myFontBI = QFont (font);
+ myFontBI = TQFont (font);
myFontBI.setBold (true);
myFontBI.setItalic (true);
diff --git a/kate/part/katefont.h b/kate/part/katefont.h
index 02c2106c4..1ab3b3463 100644
--- a/kate/part/katefont.h
+++ b/kate/part/katefont.h
@@ -22,8 +22,8 @@
#ifndef __kate_font_h__
#define __kate_font_h__
-#include <qfont.h>
-#include <qfontmetrics.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
//
// KateFontMetrics implementation
@@ -32,12 +32,12 @@
class KateFontMetrics : public QFontMetrics
{
public:
- KateFontMetrics(const QFont& f);
+ KateFontMetrics(const TQFont& f);
~KateFontMetrics();
- int width(QChar c);
+ int width(TQChar c);
- int width(QString s) { return QFontMetrics::width(s); }
+ int width(TQString s) { return TQFontMetrics::width(s); }
private:
short *createRow (short *wa, uchar row);
@@ -56,15 +56,15 @@ class KateFontStruct
KateFontStruct();
~KateFontStruct();
- void setFont(const QFont & font);
+ void setFont(const TQFont & font);
private:
void updateFontData ();
public:
- inline int width (const QString& text, int col, bool bold, bool italic, int tabWidth)
+ inline int width (const TQString& text, int col, bool bold, bool italic, int tabWidth)
{
- if (text[col] == QChar('\t'))
+ if (text[col] == TQChar('\t'))
return tabWidth * myFontMetrics.width(' ');
return (bold) ?
@@ -76,9 +76,9 @@ class KateFontStruct
myFontMetrics.charWidth(text, col) );
}
- inline int width (const QChar& c, bool bold, bool italic, int tabWidth)
+ inline int width (const TQChar& c, bool bold, bool italic, int tabWidth)
{
- if (c == QChar('\t'))
+ if (c == TQChar('\t'))
return tabWidth * myFontMetrics.width(' ');
return (bold) ?
@@ -90,7 +90,7 @@ class KateFontStruct
myFontMetrics.width(c) );
}
- inline const QFont& font(bool bold, bool italic) const
+ inline const TQFont& font(bool bold, bool italic) const
{
return (bold) ?
( (italic) ? myFontBI : myFontBold ) :
@@ -100,7 +100,7 @@ class KateFontStruct
inline bool fixedPitch() const { return m_fixedPitch; }
public:
- QFont myFont, myFontBold, myFontItalic, myFontBI;
+ TQFont myFont, myFontBold, myFontItalic, myFontBI;
KateFontMetrics myFontMetrics, myFontMetricsBold, myFontMetricsItalic, myFontMetricsBI;
diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp
index 84bfc67fd..655452184 100644
--- a/kate/part/katehighlight.cpp
+++ b/kate/part/katehighlight.cpp
@@ -46,8 +46,8 @@
#include <kstaticdeleter.h>
#include <kapplication.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
//END
//BEGIN defines
@@ -57,15 +57,15 @@
// min. x seconds between two dynamic contexts reset
static const int KATE_DYNAMIC_CONTEXTS_RESET_DELAY = 30 * 1000;
-// x is a QString. if x is "true" or "1" this expression returns "true"
-#define IS_TRUE(x) x.lower() == QString("true") || x.toInt() == 1
+// x is a TQString. if x is "true" or "1" this expression returns "true"
+#define IS_TRUE(x) x.lower() == TQString("true") || x.toInt() == 1
//END defines
//BEGIN Prviate HL classes
-inline bool kateInsideString (const QString &str, QChar ch)
+inline bool kateInsideString (const TQString &str, TQChar ch)
{
- const QChar *unicode = str.unicode();
+ const TQChar *unicode = str.unicode();
const uint len = str.length();
for (uint i=0; i < len; i++)
if (unicode[i] == ch)
@@ -84,16 +84,16 @@ class KateHlItem
// caller must keep in mind: LEN > 0 is a must !!!!!!!!!!!!!!!!!!!!!1
// Now, the function returns the offset detected, or 0 if no match is found.
// bool linestart isn't needed, this is equivalent to offset == 0.
- virtual int checkHgl(const QString& text, int offset, int len) = 0;
+ virtual int checkHgl(const TQString& text, int offset, int len) = 0;
virtual bool lineContinue(){return false;}
- virtual QStringList *capturedTexts() {return 0;}
- virtual KateHlItem *clone(const QStringList *) {return this;}
+ virtual TQStringList *capturedTexts() {return 0;}
+ virtual KateHlItem *clone(const TQStringList *) {return this;}
- static void dynamicSubstitute(QString& str, const QStringList *args);
+ static void dynamicSubstitute(TQString& str, const TQStringList *args);
- QMemArray<KateHlItem*> subItems;
+ TQMemArray<KateHlItem*> subItems;
int attr;
int ctx;
signed char region;
@@ -116,13 +116,13 @@ class KateHlItem
class KateHlContext
{
public:
- KateHlContext(const QString &_hlId, int attribute, int lineEndContext,int _lineBeginContext,
+ KateHlContext(const TQString &_hlId, int attribute, int lineEndContext,int _lineBeginContext,
bool _fallthrough, int _fallthroughContext, bool _dynamic,bool _noIndentationBasedFolding);
virtual ~KateHlContext();
- KateHlContext *clone(const QStringList *args);
+ KateHlContext *clone(const TQStringList *args);
- QValueVector<KateHlItem*> items;
- QString hlId; ///< A unique highlight identifier. Used to look up correct properties.
+ TQValueVector<KateHlItem*> items;
+ TQString hlId; ///< A unique highlight identifier. Used to look up correct properties.
int attr;
int ctx;
int lineBeginContext;
@@ -153,7 +153,7 @@ class KateEmbeddedHlInfo
class KateHlIncludeRule
{
public:
- KateHlIncludeRule(int ctx_=0, uint pos_=0, const QString &incCtxN_="", bool incAttrib=false)
+ KateHlIncludeRule(int ctx_=0, uint pos_=0, const TQString &incCtxN_="", bool incAttrib=false)
: ctx(ctx_)
, pos( pos_)
, incCtxN( incCtxN_ )
@@ -167,46 +167,46 @@ class KateHlIncludeRule
int ctx;
uint pos;
int incCtx;
- QString incCtxN;
+ TQString incCtxN;
bool includeAttrib;
};
class KateHlCharDetect : public KateHlItem
{
public:
- KateHlCharDetect(int attribute, int context,signed char regionId,signed char regionId2, QChar);
+ KateHlCharDetect(int attribute, int context,signed char regionId,signed char regionId2, TQChar);
- virtual int checkHgl(const QString& text, int offset, int len);
- virtual KateHlItem *clone(const QStringList *args);
+ virtual int checkHgl(const TQString& text, int offset, int len);
+ virtual KateHlItem *clone(const TQStringList *args);
private:
- QChar sChar;
+ TQChar sChar;
};
class KateHl2CharDetect : public KateHlItem
{
public:
- KateHl2CharDetect(int attribute, int context, signed char regionId,signed char regionId2, QChar ch1, QChar ch2);
- KateHl2CharDetect(int attribute, int context,signed char regionId,signed char regionId2, const QChar *ch);
+ KateHl2CharDetect(int attribute, int context, signed char regionId,signed char regionId2, TQChar ch1, TQChar ch2);
+ KateHl2CharDetect(int attribute, int context,signed char regionId,signed char regionId2, const TQChar *ch);
- virtual int checkHgl(const QString& text, int offset, int len);
- virtual KateHlItem *clone(const QStringList *args);
+ virtual int checkHgl(const TQString& text, int offset, int len);
+ virtual KateHlItem *clone(const TQStringList *args);
private:
- QChar sChar1;
- QChar sChar2;
+ TQChar sChar1;
+ TQChar sChar2;
};
class KateHlStringDetect : public KateHlItem
{
public:
- KateHlStringDetect(int attribute, int context, signed char regionId,signed char regionId2, const QString &, bool inSensitive=false);
+ KateHlStringDetect(int attribute, int context, signed char regionId,signed char regionId2, const TQString &, bool inSensitive=false);
- virtual int checkHgl(const QString& text, int offset, int len);
- virtual KateHlItem *clone(const QStringList *args);
+ virtual int checkHgl(const TQString& text, int offset, int len);
+ virtual KateHlItem *clone(const TQStringList *args);
private:
- const QString str;
+ const TQString str;
const int strLen;
const bool _inSensitive;
};
@@ -214,28 +214,28 @@ class KateHlStringDetect : public KateHlItem
class KateHlRangeDetect : public KateHlItem
{
public:
- KateHlRangeDetect(int attribute, int context, signed char regionId,signed char regionId2, QChar ch1, QChar ch2);
+ KateHlRangeDetect(int attribute, int context, signed char regionId,signed char regionId2, TQChar ch1, TQChar ch2);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
private:
- QChar sChar1;
- QChar sChar2;
+ TQChar sChar1;
+ TQChar sChar2;
};
class KateHlKeyword : public KateHlItem
{
public:
- KateHlKeyword(int attribute, int context,signed char regionId,signed char regionId2, bool insensitive, const QString& delims);
+ KateHlKeyword(int attribute, int context,signed char regionId,signed char regionId2, bool insensitive, const TQString& delims);
virtual ~KateHlKeyword ();
- void addList(const QStringList &);
- virtual int checkHgl(const QString& text, int offset, int len);
+ void addList(const TQStringList &);
+ virtual int checkHgl(const TQString& text, int offset, int len);
private:
- QMemArray< QDict<bool>* > dict;
+ TQMemArray< TQDict<bool>* > dict;
bool _insensitive;
- const QString& deliminators;
+ const TQString& deliminators;
int minLen;
int maxLen;
};
@@ -245,7 +245,7 @@ class KateHlInt : public KateHlItem
public:
KateHlInt(int attribute, int context, signed char regionId,signed char regionId2);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
};
class KateHlFloat : public KateHlItem
@@ -254,7 +254,7 @@ class KateHlFloat : public KateHlItem
KateHlFloat(int attribute, int context, signed char regionId,signed char regionId2);
virtual ~KateHlFloat () {}
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
};
class KateHlCFloat : public KateHlFloat
@@ -262,8 +262,8 @@ class KateHlCFloat : public KateHlFloat
public:
KateHlCFloat(int attribute, int context, signed char regionId,signed char regionId2);
- virtual int checkHgl(const QString& text, int offset, int len);
- int checkIntHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
+ int checkIntHgl(const TQString& text, int offset, int len);
};
class KateHlCOct : public KateHlItem
@@ -271,7 +271,7 @@ class KateHlCOct : public KateHlItem
public:
KateHlCOct(int attribute, int context, signed char regionId,signed char regionId2);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
};
class KateHlCHex : public KateHlItem
@@ -279,7 +279,7 @@ class KateHlCHex : public KateHlItem
public:
KateHlCHex(int attribute, int context, signed char regionId,signed char regionId2);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
};
class KateHlLineContinue : public KateHlItem
@@ -287,8 +287,8 @@ class KateHlLineContinue : public KateHlItem
public:
KateHlLineContinue(int attribute, int context, signed char regionId,signed char regionId2);
- virtual bool endEnable(QChar c) {return c == '\0';}
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual bool endEnable(TQChar c) {return c == '\0';}
+ virtual int checkHgl(const TQString& text, int offset, int len);
virtual bool lineContinue(){return true;}
};
@@ -297,7 +297,7 @@ class KateHlCStringChar : public KateHlItem
public:
KateHlCStringChar(int attribute, int context, signed char regionId,signed char regionId2);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
};
class KateHlCChar : public KateHlItem
@@ -305,34 +305,34 @@ class KateHlCChar : public KateHlItem
public:
KateHlCChar(int attribute, int context,signed char regionId,signed char regionId2);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
};
class KateHlAnyChar : public KateHlItem
{
public:
- KateHlAnyChar(int attribute, int context, signed char regionId,signed char regionId2, const QString& charList);
+ KateHlAnyChar(int attribute, int context, signed char regionId,signed char regionId2, const TQString& charList);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
private:
- const QString _charList;
+ const TQString _charList;
};
class KateHlRegExpr : public KateHlItem
{
public:
- KateHlRegExpr(int attribute, int context,signed char regionId,signed char regionId2 ,QString expr, bool insensitive, bool minimal);
+ KateHlRegExpr(int attribute, int context,signed char regionId,signed char regionId2 ,TQString expr, bool insensitive, bool minimal);
~KateHlRegExpr() { delete Expr; };
- virtual int checkHgl(const QString& text, int offset, int len);
- virtual QStringList *capturedTexts();
- virtual KateHlItem *clone(const QStringList *args);
+ virtual int checkHgl(const TQString& text, int offset, int len);
+ virtual TQStringList *capturedTexts();
+ virtual KateHlItem *clone(const TQStringList *args);
private:
- QRegExp *Expr;
+ TQRegExp *Expr;
bool handlesLinestart;
- QString _regexp;
+ TQString _regexp;
bool _insensitive;
bool _minimal;
};
@@ -343,7 +343,7 @@ class KateHlDetectSpaces : public KateHlItem
KateHlDetectSpaces (int attribute, int context,signed char regionId,signed char regionId2)
: KateHlItem(attribute,context,regionId,regionId2) {}
- virtual int checkHgl(const QString& text, int offset, int len)
+ virtual int checkHgl(const TQString& text, int offset, int len)
{
int len2 = offset + len;
while ((offset < len2) && text[offset].isSpace()) offset++;
@@ -357,10 +357,10 @@ class KateHlDetectIdentifier : public KateHlItem
KateHlDetectIdentifier (int attribute, int context,signed char regionId,signed char regionId2)
: KateHlItem(attribute,context,regionId,regionId2) { alwaysStartEnable = false; }
- virtual int checkHgl(const QString& text, int offset, int len)
+ virtual int checkHgl(const TQString& text, int offset, int len)
{
// first char should be a letter or underscore
- if ( text[offset].isLetter() || text[offset] == QChar ('_') )
+ if ( text[offset].isLetter() || text[offset] == TQChar ('_') )
{
// memorize length
int len2 = offset+len;
@@ -371,7 +371,7 @@ class KateHlDetectIdentifier : public KateHlItem
// now loop for all other thingies
while (
(offset < len2)
- && (text[offset].isLetterOrNumber() || (text[offset] == QChar ('_')))
+ && (text[offset].isLetterOrNumber() || (text[offset] == TQChar ('_')))
)
offset++;
@@ -388,11 +388,11 @@ class KateHlDetectIdentifier : public KateHlItem
KateHlManager *KateHlManager::s_self = 0;
static const bool trueBool = true;
-static const QString stdDeliminator = QString (" \t.():!+,-<=>%&*/;?[]^{|}~\\");
+static const TQString stdDeliminator = TQString (" \t.():!+,-<=>%&*/;?[]^{|}~\\");
//END
//BEGIN NON MEMBER FUNCTIONS
-static KateHlItemData::ItemStyles getDefStyleNum(QString name)
+static KateHlItemData::ItemStyles getDefStyleNum(TQString name)
{
if (name=="dsNormal") return KateHlItemData::dsNormal;
else if (name=="dsKeyword") return KateHlItemData::dsKeyword;
@@ -437,7 +437,7 @@ KateHlItem::~KateHlItem()
delete subItems[i];
}
-void KateHlItem::dynamicSubstitute(QString &str, const QStringList *args)
+void KateHlItem::dynamicSubstitute(TQString &str, const TQStringList *args)
{
for (uint i = 0; i < str.length() - 1; ++i)
{
@@ -465,13 +465,13 @@ void KateHlItem::dynamicSubstitute(QString &str, const QStringList *args)
//END
//BEGIN KateHlCharDetect
-KateHlCharDetect::KateHlCharDetect(int attribute, int context, signed char regionId,signed char regionId2, QChar c)
+KateHlCharDetect::KateHlCharDetect(int attribute, int context, signed char regionId,signed char regionId2, TQChar c)
: KateHlItem(attribute,context,regionId,regionId2)
, sChar(c)
{
}
-int KateHlCharDetect::checkHgl(const QString& text, int offset, int /*len*/)
+int KateHlCharDetect::checkHgl(const TQString& text, int offset, int /*len*/)
{
if (text[offset] == sChar)
return offset + 1;
@@ -479,7 +479,7 @@ int KateHlCharDetect::checkHgl(const QString& text, int offset, int /*len*/)
return 0;
}
-KateHlItem *KateHlCharDetect::clone(const QStringList *args)
+KateHlItem *KateHlCharDetect::clone(const TQStringList *args)
{
char c = sChar.latin1();
@@ -493,14 +493,14 @@ KateHlItem *KateHlCharDetect::clone(const QStringList *args)
//END
//BEGIN KateHl2CharDetect
-KateHl2CharDetect::KateHl2CharDetect(int attribute, int context, signed char regionId,signed char regionId2, QChar ch1, QChar ch2)
+KateHl2CharDetect::KateHl2CharDetect(int attribute, int context, signed char regionId,signed char regionId2, TQChar ch1, TQChar ch2)
: KateHlItem(attribute,context,regionId,regionId2)
, sChar1 (ch1)
, sChar2 (ch2)
{
}
-int KateHl2CharDetect::checkHgl(const QString& text, int offset, int len)
+int KateHl2CharDetect::checkHgl(const TQString& text, int offset, int len)
{
if ((len >= 2) && text[offset++] == sChar1 && text[offset++] == sChar2)
return offset;
@@ -508,7 +508,7 @@ int KateHl2CharDetect::checkHgl(const QString& text, int offset, int len)
return 0;
}
-KateHlItem *KateHl2CharDetect::clone(const QStringList *args)
+KateHlItem *KateHl2CharDetect::clone(const TQStringList *args)
{
char c1 = sChar1.latin1();
char c2 = sChar2.latin1();
@@ -526,7 +526,7 @@ KateHlItem *KateHl2CharDetect::clone(const QStringList *args)
//END
//BEGIN KateHlStringDetect
-KateHlStringDetect::KateHlStringDetect(int attribute, int context, signed char regionId,signed char regionId2,const QString &s, bool inSensitive)
+KateHlStringDetect::KateHlStringDetect(int attribute, int context, signed char regionId,signed char regionId2,const TQString &s, bool inSensitive)
: KateHlItem(attribute, context,regionId,regionId2)
, str(inSensitive ? s.upper() : s)
, strLen (str.length())
@@ -534,7 +534,7 @@ KateHlStringDetect::KateHlStringDetect(int attribute, int context, signed char r
{
}
-int KateHlStringDetect::checkHgl(const QString& text, int offset, int len)
+int KateHlStringDetect::checkHgl(const TQString& text, int offset, int len)
{
if (len < strLen)
return 0;
@@ -559,9 +559,9 @@ int KateHlStringDetect::checkHgl(const QString& text, int offset, int len)
return 0;
}
-KateHlItem *KateHlStringDetect::clone(const QStringList *args)
+KateHlItem *KateHlStringDetect::clone(const TQStringList *args)
{
- QString newstr = str;
+ TQString newstr = str;
dynamicSubstitute(newstr, args);
@@ -575,14 +575,14 @@ KateHlItem *KateHlStringDetect::clone(const QStringList *args)
//END
//BEGIN KateHlRangeDetect
-KateHlRangeDetect::KateHlRangeDetect(int attribute, int context, signed char regionId,signed char regionId2, QChar ch1, QChar ch2)
+KateHlRangeDetect::KateHlRangeDetect(int attribute, int context, signed char regionId,signed char regionId2, TQChar ch1, TQChar ch2)
: KateHlItem(attribute,context,regionId,regionId2)
, sChar1 (ch1)
, sChar2 (ch2)
{
}
-int KateHlRangeDetect::checkHgl(const QString& text, int offset, int len)
+int KateHlRangeDetect::checkHgl(const TQString& text, int offset, int len)
{
if (text[offset] == sChar1)
{
@@ -601,7 +601,7 @@ int KateHlRangeDetect::checkHgl(const QString& text, int offset, int len)
//END
//BEGIN KateHlKeyword
-KateHlKeyword::KateHlKeyword (int attribute, int context, signed char regionId,signed char regionId2, bool insensitive, const QString& delims)
+KateHlKeyword::KateHlKeyword (int attribute, int context, signed char regionId,signed char regionId2, bool insensitive, const TQString& delims)
: KateHlItem(attribute,context,regionId,regionId2)
, _insensitive(insensitive)
, deliminators(delims)
@@ -618,7 +618,7 @@ KateHlKeyword::~KateHlKeyword ()
delete dict[i];
}
-void KateHlKeyword::addList(const QStringList& list)
+void KateHlKeyword::addList(const TQStringList& list)
{
for(uint i=0; i < list.count(); ++i)
{
@@ -640,13 +640,13 @@ void KateHlKeyword::addList(const QStringList& list)
}
if (!dict[len])
- dict[len] = new QDict<bool> (17, !_insensitive);
+ dict[len] = new TQDict<bool> (17, !_insensitive);
dict[len]->insert(list[i], &trueBool);
}
}
-int KateHlKeyword::checkHgl(const QString& text, int offset, int len)
+int KateHlKeyword::checkHgl(const TQString& text, int offset, int len)
{
int offset2 = offset;
int wordLen = 0;
@@ -661,7 +661,7 @@ int KateHlKeyword::checkHgl(const QString& text, int offset, int len)
if (wordLen < minLen) return 0;
- if ( dict[wordLen] && dict[wordLen]->find(QConstString(text.unicode() + offset, wordLen).string()) )
+ if ( dict[wordLen] && dict[wordLen]->find(TQConstString(text.unicode() + offset, wordLen).string()) )
return offset2;
return 0;
@@ -675,7 +675,7 @@ KateHlInt::KateHlInt(int attribute, int context, signed char regionId,signed cha
alwaysStartEnable = false;
}
-int KateHlInt::checkHgl(const QString& text, int offset, int len)
+int KateHlInt::checkHgl(const TQString& text, int offset, int len)
{
int offset2 = offset;
@@ -710,7 +710,7 @@ KateHlFloat::KateHlFloat(int attribute, int context, signed char regionId,signed
alwaysStartEnable = false;
}
-int KateHlFloat::checkHgl(const QString& text, int offset, int len)
+int KateHlFloat::checkHgl(const TQString& text, int offset, int len)
{
bool b = false;
bool p = false;
@@ -806,7 +806,7 @@ KateHlCOct::KateHlCOct(int attribute, int context, signed char regionId,signed c
alwaysStartEnable = false;
}
-int KateHlCOct::checkHgl(const QString& text, int offset, int len)
+int KateHlCOct::checkHgl(const TQString& text, int offset, int len)
{
if (text[offset] == '0')
{
@@ -841,7 +841,7 @@ KateHlCHex::KateHlCHex(int attribute, int context,signed char regionId,signed ch
alwaysStartEnable = false;
}
-int KateHlCHex::checkHgl(const QString& text, int offset, int len)
+int KateHlCHex::checkHgl(const TQString& text, int offset, int len)
{
if ((len > 1) && (text[offset++] == '0') && ((text[offset++] & 0xdf) == 'X' ))
{
@@ -875,7 +875,7 @@ KateHlCFloat::KateHlCFloat(int attribute, int context, signed char regionId,sign
alwaysStartEnable = false;
}
-int KateHlCFloat::checkIntHgl(const QString& text, int offset, int len)
+int KateHlCFloat::checkIntHgl(const TQString& text, int offset, int len)
{
int offset2 = offset;
@@ -890,7 +890,7 @@ int KateHlCFloat::checkIntHgl(const QString& text, int offset, int len)
return 0;
}
-int KateHlCFloat::checkHgl(const QString& text, int offset, int len)
+int KateHlCFloat::checkHgl(const TQString& text, int offset, int len)
{
int offset2 = KateHlFloat::checkHgl(text, offset, len);
@@ -914,13 +914,13 @@ int KateHlCFloat::checkHgl(const QString& text, int offset, int len)
//END
//BEGIN KateHlAnyChar
-KateHlAnyChar::KateHlAnyChar(int attribute, int context, signed char regionId,signed char regionId2, const QString& charList)
+KateHlAnyChar::KateHlAnyChar(int attribute, int context, signed char regionId,signed char regionId2, const TQString& charList)
: KateHlItem(attribute, context,regionId,regionId2)
, _charList(charList)
{
}
-int KateHlAnyChar::checkHgl(const QString& text, int offset, int)
+int KateHlAnyChar::checkHgl(const TQString& text, int offset, int)
{
if (kateInsideString (_charList, text[offset]))
return ++offset;
@@ -930,7 +930,7 @@ int KateHlAnyChar::checkHgl(const QString& text, int offset, int)
//END
//BEGIN KateHlRegExpr
-KateHlRegExpr::KateHlRegExpr( int attribute, int context, signed char regionId,signed char regionId2, QString regexp, bool insensitive, bool minimal)
+KateHlRegExpr::KateHlRegExpr( int attribute, int context, signed char regionId,signed char regionId2, TQString regexp, bool insensitive, bool minimal)
: KateHlItem(attribute, context, regionId,regionId2)
, handlesLinestart (regexp.startsWith("^"))
, _regexp(regexp)
@@ -940,35 +940,35 @@ KateHlRegExpr::KateHlRegExpr( int attribute, int context, signed char regionId,s
if (!handlesLinestart)
regexp.prepend("^");
- Expr = new QRegExp(regexp, !_insensitive);
+ Expr = new TQRegExp(regexp, !_insensitive);
Expr->setMinimal(_minimal);
}
-int KateHlRegExpr::checkHgl(const QString& text, int offset, int /*len*/)
+int KateHlRegExpr::checkHgl(const TQString& text, int offset, int /*len*/)
{
if (offset && handlesLinestart)
return 0;
- int offset2 = Expr->search( text, offset, QRegExp::CaretAtOffset );
+ int offset2 = Expr->search( text, offset, TQRegExp::CaretAtOffset );
if (offset2 == -1) return 0;
return (offset + Expr->matchedLength());
}
-QStringList *KateHlRegExpr::capturedTexts()
+TQStringList *KateHlRegExpr::capturedTexts()
{
- return new QStringList(Expr->capturedTexts());
+ return new TQStringList(Expr->capturedTexts());
}
-KateHlItem *KateHlRegExpr::clone(const QStringList *args)
+KateHlItem *KateHlRegExpr::clone(const TQStringList *args)
{
- QString regexp = _regexp;
- QStringList escArgs = *args;
+ TQString regexp = _regexp;
+ TQStringList escArgs = *args;
- for (QStringList::Iterator it = escArgs.begin(); it != escArgs.end(); ++it)
+ for (TQStringList::Iterator it = escArgs.begin(); it != escArgs.end(); ++it)
{
- (*it).replace(QRegExp("(\\W)"), "\\\\1");
+ (*it).replace(TQRegExp("(\\W)"), "\\\\1");
}
dynamicSubstitute(regexp, &escArgs);
@@ -989,7 +989,7 @@ KateHlLineContinue::KateHlLineContinue(int attribute, int context, signed char r
: KateHlItem(attribute,context,regionId,regionId2) {
}
-int KateHlLineContinue::checkHgl(const QString& text, int offset, int len)
+int KateHlLineContinue::checkHgl(const TQString& text, int offset, int len)
{
if ((len == 1) && (text[offset] == '\\'))
return ++offset;
@@ -1004,7 +1004,7 @@ KateHlCStringChar::KateHlCStringChar(int attribute, int context,signed char regi
}
// checks for C escaped chars \n and escaped hex/octal chars
-static int checkEscapedChar(const QString& text, int offset, int& len)
+static int checkEscapedChar(const TQString& text, int offset, int& len)
{
int i;
if (text[offset] == '\\' && len > 1)
@@ -1068,7 +1068,7 @@ static int checkEscapedChar(const QString& text, int offset, int& len)
return 0;
}
-int KateHlCStringChar::checkHgl(const QString& text, int offset, int len)
+int KateHlCStringChar::checkHgl(const TQString& text, int offset, int len)
{
return checkEscapedChar(text, offset, len);
}
@@ -1079,7 +1079,7 @@ KateHlCChar::KateHlCChar(int attribute, int context,signed char regionId,signed
: KateHlItem(attribute,context,regionId,regionId2) {
}
-int KateHlCChar::checkHgl(const QString& text, int offset, int len)
+int KateHlCChar::checkHgl(const TQString& text, int offset, int len)
{
if ((len > 1) && (text[offset] == '\'') && (text[offset+1] != '\''))
{
@@ -1112,24 +1112,24 @@ int KateHlCChar::checkHgl(const QString& text, int offset, int len)
//END
//BEGIN KateHl2CharDetect
-KateHl2CharDetect::KateHl2CharDetect(int attribute, int context, signed char regionId,signed char regionId2, const QChar *s)
+KateHl2CharDetect::KateHl2CharDetect(int attribute, int context, signed char regionId,signed char regionId2, const TQChar *s)
: KateHlItem(attribute,context,regionId,regionId2) {
sChar1 = s[0];
sChar2 = s[1];
}
//END KateHl2CharDetect
-KateHlItemData::KateHlItemData(const QString name, int defStyleNum)
+KateHlItemData::KateHlItemData(const TQString name, int defStyleNum)
: name(name), defStyleNum(defStyleNum) {
}
-KateHlData::KateHlData(const QString &wildcards, const QString &mimetypes, const QString &identifier, int priority)
+KateHlData::KateHlData(const TQString &wildcards, const TQString &mimetypes, const TQString &identifier, int priority)
: wildcards(wildcards), mimetypes(mimetypes), identifier(identifier), priority(priority)
{
}
//BEGIN KateHlContext
-KateHlContext::KateHlContext (const QString &_hlId, int attribute, int lineEndContext, int _lineBeginContext, bool _fallthrough,
+KateHlContext::KateHlContext (const TQString &_hlId, int attribute, int lineEndContext, int _lineBeginContext, bool _fallthrough,
int _fallthroughContext, bool _dynamic, bool _noIndentationBasedFolding)
{
hlId = _hlId;
@@ -1141,11 +1141,11 @@ KateHlContext::KateHlContext (const QString &_hlId, int attribute, int lineEndCo
dynamic = _dynamic;
dynamicChild = false;
noIndentationBasedFolding=_noIndentationBasedFolding;
- if (_noIndentationBasedFolding) kdDebug(13010)<<QString("**********************_noIndentationBasedFolding is TRUE*****************")<<endl;
+ if (_noIndentationBasedFolding) kdDebug(13010)<<TQString("**********************_noIndentationBasedFolding is TRUE*****************")<<endl;
}
-KateHlContext *KateHlContext::clone(const QStringList *args)
+KateHlContext *KateHlContext::clone(const TQStringList *args)
{
KateHlContext *ret = new KateHlContext(hlId, attr, ctx, lineBeginContext, fallthrough, ftctx, false,noIndentationBasedFolding);
@@ -1225,16 +1225,16 @@ KateHighlighting::~KateHighlighting()
m_contexts.clear ();
}
-void KateHighlighting::generateContextStack(int *ctxNum, int ctx, QMemArray<short>* ctxs, int *prevLine)
+void KateHighlighting::generateContextStack(int *ctxNum, int ctx, TQMemArray<short>* ctxs, int *prevLine)
{
- //kdDebug(13010)<<QString("Entering generateContextStack with %1").arg(ctx)<<endl;
+ //kdDebug(13010)<<TQString("Entering generateContextStack with %1").arg(ctx)<<endl;
while (true)
{
if (ctx >= 0)
{
(*ctxNum) = ctx;
- ctxs->resize (ctxs->size()+1, QGArray::SpeedOptim);
+ ctxs->resize (ctxs->size()+1, TQGArray::SpeedOptim);
(*ctxs)[ctxs->size()-1]=(*ctxNum);
return;
@@ -1251,12 +1251,12 @@ void KateHighlighting::generateContextStack(int *ctxNum, int ctx, QMemArray<shor
if (size > 0)
{
- ctxs->resize (size, QGArray::SpeedOptim);
+ ctxs->resize (size, TQGArray::SpeedOptim);
(*ctxNum)=(*ctxs)[size-1];
}
else
{
- ctxs->resize (0, QGArray::SpeedOptim);
+ ctxs->resize (0, TQGArray::SpeedOptim);
(*ctxNum)=0;
}
@@ -1288,9 +1288,9 @@ void KateHighlighting::generateContextStack(int *ctxNum, int ctx, QMemArray<shor
/**
* Creates a new dynamic context or reuse an old one if it has already been created.
*/
-int KateHighlighting::makeDynamicContext(KateHlContext *model, const QStringList *args)
+int KateHighlighting::makeDynamicContext(KateHlContext *model, const TQStringList *args)
{
- QPair<KateHlContext *, QString> key(model, args->front());
+ QPair<KateHlContext *, TQString> key(model, args->front());
short value;
if (dynamicCtxs.contains(key))
@@ -1338,7 +1338,7 @@ void KateHighlighting::dropDynamicContexts()
*/
void KateHighlighting::doHighlight ( KateTextLine *prevLine,
KateTextLine *textLine,
- QMemArray<uint>* foldingList,
+ TQMemArray<uint>* foldingList,
bool *ctxChanged )
{
if (!textLine)
@@ -1353,7 +1353,7 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
}
// duplicate the ctx stack, only once !
- QMemArray<short> ctx;
+ TQMemArray<short> ctx;
ctx.duplicate (prevLine->ctxArray());
int ctxNum = 0;
@@ -1372,7 +1372,7 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
//kdDebug(13010) << "\t\tctxNum = " << ctxNum << " contextList[ctxNum] = " << contextList[ctxNum] << endl; // ellis
- //if (lineContinue) kdDebug(13010)<<QString("The old context should be %1").arg((int)ctxNum)<<endl;
+ //if (lineContinue) kdDebug(13010)<<TQString("The old context should be %1").arg((int)ctxNum)<<endl;
if (!(context = contextNum(ctxNum)))
context = contextNum(0);
@@ -1396,12 +1396,12 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
//kdDebug(13010)<<"test1-2-1-text4"<<endl;
- //if (lineContinue) kdDebug(13010)<<QString("The new context is %1").arg((int)ctxNum)<<endl;
+ //if (lineContinue) kdDebug(13010)<<TQString("The new context is %1").arg((int)ctxNum)<<endl;
}
// text, for programming convenience :)
- QChar lastChar = ' ';
- const QString& text = textLine->string();
+ TQChar lastChar = ' ';
+ const TQString& text = textLine->string();
const int len = textLine->length();
// calc at which char the first char occurs, set it to lenght of line if never
@@ -1459,14 +1459,14 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
if (item->region2)
{
- // kdDebug(13010)<<QString("Region mark 2 detected: %1").arg(item->region2)<<endl;
+ // kdDebug(13010)<<TQString("Region mark 2 detected: %1").arg(item->region2)<<endl;
if ( !foldingList->isEmpty() && ((item->region2 < 0) && (*foldingList)[foldingList->size()-2] == -item->region2 ) )
{
- foldingList->resize (foldingList->size()-2, QGArray::SpeedOptim);
+ foldingList->resize (foldingList->size()-2, TQGArray::SpeedOptim);
}
else
{
- foldingList->resize (foldingList->size()+2, QGArray::SpeedOptim);
+ foldingList->resize (foldingList->size()+2, TQGArray::SpeedOptim);
(*foldingList)[foldingList->size()-2] = (uint)item->region2;
if (item->region2<0) //check not really needed yet
(*foldingList)[foldingList->size()-1] = offset2;
@@ -1478,15 +1478,15 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
if (item->region)
{
- // kdDebug(13010)<<QString("Region mark detected: %1").arg(item->region)<<endl;
+ // kdDebug(13010)<<TQString("Region mark detected: %1").arg(item->region)<<endl;
/* if ( !foldingList->isEmpty() && ((item->region < 0) && (*foldingList)[foldingList->size()-1] == -item->region ) )
{
- foldingList->resize (foldingList->size()-1, QGArray::SpeedOptim);
+ foldingList->resize (foldingList->size()-1, TQGArray::SpeedOptim);
}
else*/
{
- foldingList->resize (foldingList->size()+2, QGArray::SpeedOptim);
+ foldingList->resize (foldingList->size()+2, TQGArray::SpeedOptim);
(*foldingList)[foldingList->size()-2] = item->region;
if (item->region<0) //check not really needed yet
(*foldingList)[foldingList->size()-1] = offset2;
@@ -1506,7 +1506,7 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
// dynamic context: substitute the model with an 'instance'
if (context->dynamic)
{
- QStringList *lst = item->capturedTexts();
+ TQStringList *lst = item->capturedTexts();
if (lst != 0)
{
// Replace the top of the stack and the current context
@@ -1602,7 +1602,7 @@ void KateHighlighting::loadWildcards()
KConfig *config = KateHlManager::self()->getKConfig();
config->setGroup("Highlighting " + iName);
- QString extensionString = config->readEntry("Wildcards", iWildcards);
+ TQString extensionString = config->readEntry("Wildcards", iWildcards);
if (extensionSource != extensionString) {
regexpExtensions.clear();
@@ -1610,31 +1610,31 @@ void KateHighlighting::loadWildcards()
extensionSource = extensionString;
- static QRegExp sep("\\s*;\\s*");
+ static TQRegExp sep("\\s*;\\s*");
- QStringList l = QStringList::split( sep, extensionSource );
+ TQStringList l = TQStringList::split( sep, extensionSource );
- static QRegExp boringExpression("\\*\\.[\\d\\w]+");
+ static TQRegExp boringExpression("\\*\\.[\\d\\w]+");
- for( QStringList::Iterator it = l.begin(); it != l.end(); ++it )
+ for( TQStringList::Iterator it = l.begin(); it != l.end(); ++it )
if (boringExpression.exactMatch(*it))
plainExtensions.append((*it).mid(1));
else
- regexpExtensions.append(QRegExp((*it), true, true));
+ regexpExtensions.append(TQRegExp((*it), true, true));
}
}
-QValueList<QRegExp>& KateHighlighting::getRegexpExtensions()
+TQValueList<TQRegExp>& KateHighlighting::getRegexpExtensions()
{
return regexpExtensions;
}
-QStringList& KateHighlighting::getPlainExtensions()
+TQStringList& KateHighlighting::getPlainExtensions()
{
return plainExtensions;
}
-QString KateHighlighting::getMimetypes()
+TQString KateHighlighting::getMimetypes()
{
KConfig *config = KateHlManager::self()->getKConfig();
config->setGroup("Highlighting " + iName);
@@ -1684,7 +1684,7 @@ void KateHighlighting::getKateHlItemDataList (uint schema, KateHlItemDataList &l
for (KateHlItemData *p = list.first(); p != 0L; p = list.next())
{
- QStringList s = config->readListEntry(p->name);
+ TQStringList s = config->readListEntry(p->name);
// kdDebug(13010)<<p->name<<s.count()<<endl;
if (s.count()>0)
@@ -1693,7 +1693,7 @@ void KateHighlighting::getKateHlItemDataList (uint schema, KateHlItemDataList &l
while(s.count()<9) s<<"";
p->clear();
- QString tmp=s[0]; if (!tmp.isEmpty()) p->defStyleNum=tmp.toInt();
+ TQString tmp=s[0]; if (!tmp.isEmpty()) p->defStyleNum=tmp.toInt();
QRgb col;
@@ -1733,20 +1733,20 @@ void KateHighlighting::setKateHlItemDataList(uint schema, KateHlItemDataList &li
config->setGroup("Highlighting " + iName + " - Schema "
+ KateFactory::self()->schemaManager()->name(schema));
- QStringList settings;
+ TQStringList settings;
for (KateHlItemData *p = list.first(); p != 0L; p = list.next())
{
settings.clear();
- settings<<QString::number(p->defStyleNum,10);
- settings<<(p->itemSet(KateAttribute::TextColor)?QString::number(p->textColor().rgb(),16):"");
- settings<<(p->itemSet(KateAttribute::SelectedTextColor)?QString::number(p->selectedTextColor().rgb(),16):"");
+ settings<<TQString::number(p->defStyleNum,10);
+ settings<<(p->itemSet(KateAttribute::TextColor)?TQString::number(p->textColor().rgb(),16):"");
+ settings<<(p->itemSet(KateAttribute::SelectedTextColor)?TQString::number(p->selectedTextColor().rgb(),16):"");
settings<<(p->itemSet(KateAttribute::Weight)?(p->bold()?"1":"0"):"");
settings<<(p->itemSet(KateAttribute::Italic)?(p->italic()?"1":"0"):"");
settings<<(p->itemSet(KateAttribute::StrikeOut)?(p->strikeOut()?"1":"0"):"");
settings<<(p->itemSet(KateAttribute::Underline)?(p->underline()?"1":"0"):"");
- settings<<(p->itemSet(KateAttribute::BGColor)?QString::number(p->bgColor().rgb(),16):"");
- settings<<(p->itemSet(KateAttribute::SelectedBGColor)?QString::number(p->selectedBGColor().rgb(),16):"");
+ settings<<(p->itemSet(KateAttribute::BGColor)?TQString::number(p->bgColor().rgb(),16):"");
+ settings<<(p->itemSet(KateAttribute::SelectedBGColor)?TQString::number(p->selectedBGColor().rgb(),16):"");
settings<<"---";
config->writeEntry(p->name,settings);
}
@@ -1845,29 +1845,29 @@ void KateHighlighting::addToKateHlItemDataList()
while (KateHlManager::self()->syntax->nextGroup(data))
{
// read all attributes
- QString color = KateHlManager::self()->syntax->groupData(data,QString("color"));
- QString selColor = KateHlManager::self()->syntax->groupData(data,QString("selColor"));
- QString bold = KateHlManager::self()->syntax->groupData(data,QString("bold"));
- QString italic = KateHlManager::self()->syntax->groupData(data,QString("italic"));
- QString underline = KateHlManager::self()->syntax->groupData(data,QString("underline"));
- QString strikeOut = KateHlManager::self()->syntax->groupData(data,QString("strikeOut"));
- QString bgColor = KateHlManager::self()->syntax->groupData(data,QString("backgroundColor"));
- QString selBgColor = KateHlManager::self()->syntax->groupData(data,QString("selBackgroundColor"));
+ TQString color = KateHlManager::self()->syntax->groupData(data,TQString("color"));
+ TQString selColor = KateHlManager::self()->syntax->groupData(data,TQString("selColor"));
+ TQString bold = KateHlManager::self()->syntax->groupData(data,TQString("bold"));
+ TQString italic = KateHlManager::self()->syntax->groupData(data,TQString("italic"));
+ TQString underline = KateHlManager::self()->syntax->groupData(data,TQString("underline"));
+ TQString strikeOut = KateHlManager::self()->syntax->groupData(data,TQString("strikeOut"));
+ TQString bgColor = KateHlManager::self()->syntax->groupData(data,TQString("backgroundColor"));
+ TQString selBgColor = KateHlManager::self()->syntax->groupData(data,TQString("selBackgroundColor"));
KateHlItemData* newData = new KateHlItemData(
- buildPrefix+KateHlManager::self()->syntax->groupData(data,QString("name")).simplifyWhiteSpace(),
- getDefStyleNum(KateHlManager::self()->syntax->groupData(data,QString("defStyleNum"))));
+ buildPrefix+KateHlManager::self()->syntax->groupData(data,TQString("name")).simplifyWhiteSpace(),
+ getDefStyleNum(KateHlManager::self()->syntax->groupData(data,TQString("defStyleNum"))));
/* here the custom style overrides are specified, if needed */
- if (!color.isEmpty()) newData->setTextColor(QColor(color));
- if (!selColor.isEmpty()) newData->setSelectedTextColor(QColor(selColor));
+ if (!color.isEmpty()) newData->setTextColor(TQColor(color));
+ if (!selColor.isEmpty()) newData->setSelectedTextColor(TQColor(selColor));
if (!bold.isEmpty()) newData->setBold( IS_TRUE(bold) );
if (!italic.isEmpty()) newData->setItalic( IS_TRUE(italic) );
// new attributes for the new rendering view
if (!underline.isEmpty()) newData->setUnderline( IS_TRUE(underline) );
if (!strikeOut.isEmpty()) newData->setStrikeOut( IS_TRUE(strikeOut) );
- if (!bgColor.isEmpty()) newData->setBGColor(QColor(bgColor));
- if (!selBgColor.isEmpty()) newData->setSelectedBGColor(QColor(selBgColor));
+ if (!bgColor.isEmpty()) newData->setBGColor(TQColor(bgColor));
+ if (!selBgColor.isEmpty()) newData->setSelectedBGColor(TQColor(selBgColor));
internalIDList.append(newData);
}
@@ -1887,7 +1887,7 @@ void KateHighlighting::addToKateHlItemDataList()
*
* @return The index of the attribute, or 0 if the attribute isn't found
*/
-int KateHighlighting::lookupAttrName(const QString& name, KateHlItemDataList &iDl)
+int KateHighlighting::lookupAttrName(const TQString& name, KateHlItemDataList &iDl)
{
for (uint i = 0; i < iDl.count(); i++)
if (iDl.at(i)->name == buildPrefix+name)
@@ -1912,19 +1912,19 @@ int KateHighlighting::lookupAttrName(const QString& name, KateHlItemDataList &i
*/
KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
KateHlItemDataList &iDl,
- QStringList *RegionList,
- QStringList *ContextNameList)
+ TQStringList *RegionList,
+ TQStringList *ContextNameList)
{
// No highlighting -> exit
if (noHl)
return 0;
// get the (tagname) itemd type
- QString dataname=KateHlManager::self()->syntax->groupItemData(data,QString(""));
+ TQString dataname=KateHlManager::self()->syntax->groupItemData(data,TQString(""));
// code folding region handling:
- QString beginRegionStr=KateHlManager::self()->syntax->groupItemData(data,QString("beginRegion"));
- QString endRegionStr=KateHlManager::self()->syntax->groupItemData(data,QString("endRegion"));
+ TQString beginRegionStr=KateHlManager::self()->syntax->groupItemData(data,TQString("beginRegion"));
+ TQString endRegionStr=KateHlManager::self()->syntax->groupItemData(data,TQString("endRegion"));
signed char regionId=0;
signed char regionId2=0;
@@ -1960,13 +1960,13 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
}
int attr = 0;
- QString tmpAttr=KateHlManager::self()->syntax->groupItemData(data,QString("attribute")).simplifyWhiteSpace();
+ TQString tmpAttr=KateHlManager::self()->syntax->groupItemData(data,TQString("attribute")).simplifyWhiteSpace();
bool onlyConsume = tmpAttr.isEmpty();
// only relevant for non consumer
if (!onlyConsume)
{
- if (QString("%1").arg(tmpAttr.toInt())==tmpAttr)
+ if (TQString("%1").arg(tmpAttr.toInt())==tmpAttr)
{
errorsAndWarnings+=i18n(
"<B>%1</B>: Deprecated syntax. Attribute (%2) not addressed by symbolic name<BR>").
@@ -1979,44 +1979,44 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
// Info about context switch
int context = -1;
- QString unresolvedContext;
- QString tmpcontext=KateHlManager::self()->syntax->groupItemData(data,QString("context"));
+ TQString unresolvedContext;
+ TQString tmpcontext=KateHlManager::self()->syntax->groupItemData(data,TQString("context"));
if (!tmpcontext.isEmpty())
context=getIdFromString(ContextNameList, tmpcontext,unresolvedContext);
// Get the char parameter (eg DetectChar)
char chr;
- if (! KateHlManager::self()->syntax->groupItemData(data,QString("char")).isEmpty())
- chr= (KateHlManager::self()->syntax->groupItemData(data,QString("char")).latin1())[0];
+ if (! KateHlManager::self()->syntax->groupItemData(data,TQString("char")).isEmpty())
+ chr= (KateHlManager::self()->syntax->groupItemData(data,TQString("char")).latin1())[0];
else
chr=0;
// Get the String parameter (eg. StringDetect)
- QString stringdata=KateHlManager::self()->syntax->groupItemData(data,QString("String"));
+ TQString stringdata=KateHlManager::self()->syntax->groupItemData(data,TQString("String"));
// Get a second char parameter (char1) (eg Detect2Chars)
char chr1;
- if (! KateHlManager::self()->syntax->groupItemData(data,QString("char1")).isEmpty())
- chr1= (KateHlManager::self()->syntax->groupItemData(data,QString("char1")).latin1())[0];
+ if (! KateHlManager::self()->syntax->groupItemData(data,TQString("char1")).isEmpty())
+ chr1= (KateHlManager::self()->syntax->groupItemData(data,TQString("char1")).latin1())[0];
else
chr1=0;
// Will be removed eventually. Atm used for StringDetect, keyword and RegExp
- const QString & insensitive_str = KateHlManager::self()->syntax->groupItemData(data,QString("insensitive"));
+ const TQString & insensitive_str = KateHlManager::self()->syntax->groupItemData(data,TQString("insensitive"));
bool insensitive = IS_TRUE( insensitive_str );
// for regexp only
- bool minimal = IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,QString("minimal")) );
+ bool minimal = IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,TQString("minimal")) );
// dominik: look ahead and do not change offset. so we can change contexts w/o changing offset1.
- bool lookAhead = IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,QString("lookAhead")) );
+ bool lookAhead = IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,TQString("lookAhead")) );
- bool dynamic= IS_TRUE(KateHlManager::self()->syntax->groupItemData(data,QString("dynamic")) );
+ bool dynamic= IS_TRUE(KateHlManager::self()->syntax->groupItemData(data,TQString("dynamic")) );
- bool firstNonSpace = IS_TRUE(KateHlManager::self()->syntax->groupItemData(data,QString("firstNonSpace")) );
+ bool firstNonSpace = IS_TRUE(KateHlManager::self()->syntax->groupItemData(data,TQString("firstNonSpace")) );
int column = -1;
- QString colStr = KateHlManager::self()->syntax->groupItemData(data,QString("column"));
+ TQString colStr = KateHlManager::self()->syntax->groupItemData(data,TQString("column"));
if (!colStr.isEmpty())
column = colStr.toInt();
@@ -2070,12 +2070,12 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
return tmpItem;
}
-QString KateHighlighting::hlKeyForAttrib( int i ) const
+TQString KateHighlighting::hlKeyForAttrib( int i ) const
{
- // find entry. This is faster than QMap::find. m_hlIndex always has an entry
+ // find entry. This is faster than TQMap::find. m_hlIndex always has an entry
// for key '0' (it is "none"), so the result is always valid.
int k = 0;
- QMap<int,QString>::const_iterator it = m_hlIndex.constEnd();
+ TQMap<int,TQString>::const_iterator it = m_hlIndex.constEnd();
while ( it != m_hlIndex.constBegin() )
{
--it;
@@ -2086,42 +2086,42 @@ QString KateHighlighting::hlKeyForAttrib( int i ) const
return it.data();
}
-bool KateHighlighting::isInWord( QChar c, int attrib ) const
+bool KateHighlighting::isInWord( TQChar c, int attrib ) const
{
return m_additionalData[ hlKeyForAttrib( attrib ) ]->deliminator.find(c) < 0
&& !c.isSpace() && c != '"' && c != '\'';
}
-bool KateHighlighting::canBreakAt( QChar c, int attrib ) const
+bool KateHighlighting::canBreakAt( TQChar c, int attrib ) const
{
- static const QString& sq = KGlobal::staticQString("\"'");
+ static const TQString& sq = KGlobal::staticQString("\"'");
return (m_additionalData[ hlKeyForAttrib( attrib ) ]->wordWrapDeliminator.find(c) != -1) && (sq.find(c) == -1);
}
signed char KateHighlighting::commentRegion(int attr) const {
- QString commentRegion=m_additionalData[ hlKeyForAttrib( attr ) ]->multiLineRegion;
+ TQString commentRegion=m_additionalData[ hlKeyForAttrib( attr ) ]->multiLineRegion;
return (commentRegion.isEmpty()?0:(commentRegion.toShort()));
}
bool KateHighlighting::canComment( int startAttrib, int endAttrib ) const
{
- QString k = hlKeyForAttrib( startAttrib );
+ TQString k = hlKeyForAttrib( startAttrib );
return ( k == hlKeyForAttrib( endAttrib ) &&
( ( !m_additionalData[k]->multiLineCommentStart.isEmpty() && !m_additionalData[k]->multiLineCommentEnd.isEmpty() ) ||
! m_additionalData[k]->singleLineCommentMarker.isEmpty() ) );
}
-QString KateHighlighting::getCommentStart( int attrib ) const
+TQString KateHighlighting::getCommentStart( int attrib ) const
{
return m_additionalData[ hlKeyForAttrib( attrib) ]->multiLineCommentStart;
}
-QString KateHighlighting::getCommentEnd( int attrib ) const
+TQString KateHighlighting::getCommentEnd( int attrib ) const
{
return m_additionalData[ hlKeyForAttrib( attrib ) ]->multiLineCommentEnd;
}
-QString KateHighlighting::getCommentSingleLineStart( int attrib ) const
+TQString KateHighlighting::getCommentSingleLineStart( int attrib ) const
{
return m_additionalData[ hlKeyForAttrib( attrib) ]->singleLineCommentMarker;
}
@@ -2141,7 +2141,7 @@ void KateHighlighting::readCommentConfig()
KateHlManager::self()->syntax->setIdentifier(buildIdentifier);
KateSyntaxContextData *data=KateHlManager::self()->syntax->getGroupInfo("general","comment");
- QString cmlStart="", cmlEnd="", cmlRegion="", cslStart="";
+ TQString cmlStart="", cmlEnd="", cmlRegion="", cslStart="";
CSLPos cslPosition=CSLPosColumn0;
if (data)
@@ -2151,7 +2151,7 @@ void KateHighlighting::readCommentConfig()
if (KateHlManager::self()->syntax->groupData(data,"name")=="singleLine")
{
cslStart=KateHlManager::self()->syntax->groupData(data,"start");
- QString cslpos=KateHlManager::self()->syntax->groupData(data,"position");
+ TQString cslpos=KateHlManager::self()->syntax->groupData(data,"position");
if (cslpos=="afterwhitespace")
cslPosition=CSLPosAfterWhitespace;
else
@@ -2193,13 +2193,13 @@ void KateHighlighting::readGlobalKeywordConfig()
{
kdDebug(13010)<<"Found global keyword config"<<endl;
- if ( IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,QString("casesensitive")) ) )
+ if ( IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,TQString("casesensitive")) ) )
casesensitive=true;
else
casesensitive=false;
//get the weak deliminators
- weakDeliminator=(KateHlManager::self()->syntax->groupItemData(data,QString("weakDeliminator")));
+ weakDeliminator=(KateHlManager::self()->syntax->groupItemData(data,TQString("weakDeliminator")));
kdDebug(13010)<<"weak delimiters are: "<<weakDeliminator<<endl;
@@ -2212,7 +2212,7 @@ void KateHighlighting::readGlobalKeywordConfig()
deliminator.remove (f, 1);
}
- QString addDelim = (KateHlManager::self()->syntax->groupItemData(data,QString("additionalDeliminator")));
+ TQString addDelim = (KateHlManager::self()->syntax->groupItemData(data,TQString("additionalDeliminator")));
if (!addDelim.isEmpty())
deliminator=deliminator+addDelim;
@@ -2223,7 +2223,7 @@ void KateHighlighting::readGlobalKeywordConfig()
{
//Default values
casesensitive=true;
- weakDeliminator=QString("");
+ weakDeliminator=TQString("");
}
kdDebug(13010)<<"readGlobalKeywordConfig:END"<<endl;
@@ -2251,12 +2251,12 @@ void KateHighlighting::readWordWrapConfig()
KateHlManager::self()->syntax->setIdentifier(buildIdentifier);
KateSyntaxContextData *data = KateHlManager::self()->syntax->getConfig("general","keywords");
- QString wordWrapDeliminator = stdDeliminator;
+ TQString wordWrapDeliminator = stdDeliminator;
if (data)
{
kdDebug(13010)<<"Found global keyword config"<<endl;
- wordWrapDeliminator = (KateHlManager::self()->syntax->groupItemData(data,QString("wordWrapDeliminator")));
+ wordWrapDeliminator = (KateHlManager::self()->syntax->groupItemData(data,TQString("wordWrapDeliminator")));
//when no wordWrapDeliminator is defined use the deliminator list
if ( wordWrapDeliminator.length() == 0 ) wordWrapDeliminator = deliminator;
@@ -2279,7 +2279,7 @@ void KateHighlighting::readIndentationConfig()
if (data)
{
- m_indentation = (KateHlManager::self()->syntax->groupItemData(data,QString("mode")));
+ m_indentation = (KateHlManager::self()->syntax->groupItemData(data,TQString("mode")));
KateHlManager::self()->syntax->freeGroupInfo(data);
}
@@ -2297,7 +2297,7 @@ void KateHighlighting::readFoldingConfig()
{
kdDebug(13010)<<"Found global keyword config"<<endl;
- if ( IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,QString("indentationsensitive")) ) )
+ if ( IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,TQString("indentationsensitive")) ) )
m_foldingIndentationSensitive=true;
else
m_foldingIndentationSensitive=false;
@@ -2315,7 +2315,7 @@ void KateHighlighting::readFoldingConfig()
kdDebug(13010)<<"############################ use indent for fold are: "<<m_foldingIndentationSensitive<<endl;
}
-void KateHighlighting::createContextNameList(QStringList *ContextNameList,int ctx0)
+void KateHighlighting::createContextNameList(TQStringList *ContextNameList,int ctx0)
{
kdDebug(13010)<<"creatingContextNameList:BEGIN"<<endl;
@@ -2332,10 +2332,10 @@ void KateHighlighting::createContextNameList(QStringList *ContextNameList,int c
{
while (KateHlManager::self()->syntax->nextGroup(data))
{
- QString tmpAttr=KateHlManager::self()->syntax->groupData(data,QString("name")).simplifyWhiteSpace();
+ TQString tmpAttr=KateHlManager::self()->syntax->groupData(data,TQString("name")).simplifyWhiteSpace();
if (tmpAttr.isEmpty())
{
- tmpAttr=QString("!KATE_INTERNAL_DUMMY! %1").arg(id);
+ tmpAttr=TQString("!KATE_INTERNAL_DUMMY! %1").arg(id);
errorsAndWarnings +=i18n("<B>%1</B>: Deprecated syntax. Context %2 has no symbolic name<BR>").arg(buildIdentifier).arg(id-ctx0);
}
else tmpAttr=buildPrefix+tmpAttr;
@@ -2348,7 +2348,7 @@ void KateHighlighting::createContextNameList(QStringList *ContextNameList,int c
}
-int KateHighlighting::getIdFromString(QStringList *ContextNameList, QString tmpLineEndContext, /*NO CONST*/ QString &unres)
+int KateHighlighting::getIdFromString(TQStringList *ContextNameList, TQString tmpLineEndContext, /*NO CONST*/ TQString &unres)
{
unres="";
int context;
@@ -2370,7 +2370,7 @@ int KateHighlighting::getIdFromString(QStringList *ContextNameList, QString tmpL
int o = tmpLineEndContext.find("##");
// FIXME at least with 'foo##bar'-style contexts the rules are picked up
// but the default attribute is not
- QString tmp=tmpLineEndContext.mid(o+2);
+ TQString tmp=tmpLineEndContext.mid(o+2);
if (!embeddedHls.contains(tmp)) embeddedHls.insert(tmp,KateEmbeddedHlInfo());
unres=tmp+':'+tmpLineEndContext.left(o);
context=0;
@@ -2427,7 +2427,7 @@ void KateHighlighting::makeContextList()
if (!it.data().loaded) // we found one, we still have to load
{
kdDebug(13010)<<"**************** Inner loop in make ContextList"<<endl;
- QString identifierToUse;
+ TQString identifierToUse;
kdDebug(13010)<<"Trying to open highlighting definition file: "<< it.key()<<endl;
if (iName==it.key()) // the own identifier is known
identifierToUse=identifier;
@@ -2469,7 +2469,7 @@ void KateHighlighting::makeContextList()
for (KateHlUnresolvedCtxRefs::iterator unresIt=unresolvedContextReferences.begin();
unresIt!=unresolvedContextReferences.end();++unresIt)
{
- QString incCtx = unresIt.data();
+ TQString incCtx = unresIt.data();
kdDebug(13010)<<"Context "<<incCtx<<" is unresolved"<<endl;
// only resolve '##Name' contexts here; handleKateHlIncludeRules() can figure
// out 'Name##Name'-style inclusions, but we screw it up
@@ -2513,7 +2513,7 @@ void KateHighlighting::handleKateHlIncludeRules()
if (includeRules.isEmpty()) return;
buildPrefix="";
- QString dummy;
+ TQString dummy;
// By now the context0 references are resolved, now more or less only inner
// file references are resolved. If we decide that arbitrary inclusion is
@@ -2636,7 +2636,7 @@ void KateHighlighting::handleKateHlIncludeRulesRecursive(KateHlIncludeRules::ite
*
* @return the number of contexts after this is added.
*/
-int KateHighlighting::addToContextList(const QString &ident, int ctx0)
+int KateHighlighting::addToContextList(const TQString &ident, int ctx0)
{
kdDebug(13010)<<"=== Adding hl with ident '"<<ident<<"'"<<endl;
@@ -2644,7 +2644,7 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
KateSyntaxContextData *data, *datasub;
KateHlItem *c;
- QString dummy;
+ TQString dummy;
// Let the syntax document class know, which file we'd like to parse
if (!KateHlManager::self()->syntax->setIdentifier(ident))
@@ -2674,7 +2674,7 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
readFoldingConfig ();
- QString ctxName;
+ TQString ctxName;
// This list is needed for the translation of the attribute parameter,
// if the itemData name is given instead of the index
@@ -2694,22 +2694,22 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
{
kdDebug(13010)<<"Found a context in file, building structure now"<<endl;
//BEGIN - Translation of the attribute parameter
- QString tmpAttr=KateHlManager::self()->syntax->groupData(data,QString("attribute")).simplifyWhiteSpace();
+ TQString tmpAttr=KateHlManager::self()->syntax->groupData(data,TQString("attribute")).simplifyWhiteSpace();
int attr;
- if (QString("%1").arg(tmpAttr.toInt())==tmpAttr)
+ if (TQString("%1").arg(tmpAttr.toInt())==tmpAttr)
attr=tmpAttr.toInt();
else
attr=lookupAttrName(tmpAttr,iDl);
//END - Translation of the attribute parameter
- ctxName=buildPrefix+KateHlManager::self()->syntax->groupData(data,QString("lineEndContext")).simplifyWhiteSpace();
+ ctxName=buildPrefix+KateHlManager::self()->syntax->groupData(data,TQString("lineEndContext")).simplifyWhiteSpace();
- QString tmpLineEndContext=KateHlManager::self()->syntax->groupData(data,QString("lineEndContext")).simplifyWhiteSpace();
+ TQString tmpLineEndContext=KateHlManager::self()->syntax->groupData(data,TQString("lineEndContext")).simplifyWhiteSpace();
int context;
context=getIdFromString(&ContextNameList, tmpLineEndContext,dummy);
- QString tmpNIBF = KateHlManager::self()->syntax->groupData(data, QString("noIndentationBasedFolding") );
+ TQString tmpNIBF = KateHlManager::self()->syntax->groupData(data, TQString("noIndentationBasedFolding") );
bool noIndentationBasedFolding=IS_TRUE(tmpNIBF);
//BEGIN get fallthrough props
@@ -2717,12 +2717,12 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
int ftc = 0; // fallthrough context
if ( i > 0 ) // fallthrough is not smart in context 0
{
- QString tmpFt = KateHlManager::self()->syntax->groupData(data, QString("fallthrough") );
+ TQString tmpFt = KateHlManager::self()->syntax->groupData(data, TQString("fallthrough") );
if ( IS_TRUE(tmpFt) )
ft = true;
if ( ft )
{
- QString tmpFtc = KateHlManager::self()->syntax->groupData( data, QString("fallthroughContext") );
+ TQString tmpFtc = KateHlManager::self()->syntax->groupData( data, TQString("fallthroughContext") );
ftc=getIdFromString(&ContextNameList, tmpFtc,dummy);
if (ftc == -1) ftc =0;
@@ -2733,7 +2733,7 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
//END falltrhough props
bool dynamic = false;
- QString tmpDynamic = KateHlManager::self()->syntax->groupData(data, QString("dynamic") );
+ TQString tmpDynamic = KateHlManager::self()->syntax->groupData(data, TQString("dynamic") );
if ( tmpDynamic.lower() == "true" || tmpDynamic.toInt() == 1 )
dynamic = true;
@@ -2741,8 +2741,8 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
ident,
attr,
context,
- (KateHlManager::self()->syntax->groupData(data,QString("lineBeginContext"))).isEmpty()?-1:
- (KateHlManager::self()->syntax->groupData(data,QString("lineBeginContext"))).toInt(),
+ (KateHlManager::self()->syntax->groupData(data,TQString("lineBeginContext"))).isEmpty()?-1:
+ (KateHlManager::self()->syntax->groupData(data,TQString("lineBeginContext"))).toInt(),
ft, ftc, dynamic,noIndentationBasedFolding);
m_contexts.push_back (ctxNew);
@@ -2756,11 +2756,11 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
// KateHlIncludeRules : add a pointer to each item in that context
// TODO add a attrib includeAttrib
- QString tag = KateHlManager::self()->syntax->groupItemData(data,QString(""));
+ TQString tag = KateHlManager::self()->syntax->groupItemData(data,TQString(""));
if ( tag == "IncludeRules" ) //if the new item is an Include rule, we have to take special care
{
- QString incCtx = KateHlManager::self()->syntax->groupItemData( data, QString("context"));
- QString incAttrib = KateHlManager::self()->syntax->groupItemData( data, QString("includeAttrib"));
+ TQString incCtx = KateHlManager::self()->syntax->groupItemData( data, TQString("context"));
+ TQString incAttrib = KateHlManager::self()->syntax->groupItemData( data, TQString("includeAttrib"));
bool includeAttrib = IS_TRUE( incAttrib );
// only context refernces of type Name, ##Name, and Subname##Name are allowed
if (incCtx.startsWith("##") || (!incCtx.startsWith("#")))
@@ -2769,8 +2769,8 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
//#stay, #pop is not interesting here
if (incCtxi >= 0)
{
- QString incSet = incCtx.mid(incCtxi + 2);
- QString incCtxN = incSet + ":" + incCtx.left(incCtxi);
+ TQString incSet = incCtx.mid(incCtxi + 2);
+ TQString incCtxN = incSet + ":" + incCtx.left(incCtxi);
//a cross highlighting reference
kdDebug(13010)<<"Cross highlight reference <IncludeRules>, context "<<incCtxN<<endl;
@@ -2798,13 +2798,13 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
}
// TODO -- can we remove the block below??
#if 0
- QString tag = KateHlManager::self()->syntax->groupKateHlItemData(data,QString(""));
+ TQString tag = KateHlManager::self()->syntax->groupKateHlItemData(data,TQString(""));
if ( tag == "IncludeRules" ) {
// attrib context: the index (jowenn, i think using names here
// would be a cool feat, goes for mentioning the context in
// any item. a map or dict?)
int ctxId = getIdFromString(&ContextNameList,
- KateHlManager::self()->syntax->groupKateHlItemData( data, QString("context")),dummy); // the index is *required*
+ KateHlManager::self()->syntax->groupKateHlItemData( data, TQString("context")),dummy); // the index is *required*
if ( ctxId > -1) { // we can even reuse rules of 0 if we want to:)
kdDebug(13010)<<"makeContextList["<<i<<"]: including all items of context "<<ctxId<<endl;
if ( ctxId < (int) i ) { // must be defined
@@ -2855,11 +2855,11 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
errorsAndWarnings+=i18n(
"<B>%1</B>: Specified multiline comment region (%2) could not be resolved<BR>"
).arg(buildIdentifier).arg( m_additionalData[ ident ]->multiLineRegion );
- m_additionalData[ ident ]->multiLineRegion = QString();
+ m_additionalData[ ident ]->multiLineRegion = TQString();
kdDebug(13010)<<"ERROR comment region attribute could not be resolved"<<endl;
} else {
- m_additionalData[ ident ]->multiLineRegion=QString::number(commentregionid+1);
+ m_additionalData[ ident ]->multiLineRegion=TQString::number(commentregionid+1);
kdDebug(13010)<<"comment region resolved to:"<<m_additionalData[ ident ]->multiLineRegion<<endl;
}
}
@@ -2869,7 +2869,7 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
void KateHighlighting::clearAttributeArrays ()
{
- for ( QIntDictIterator< QMemArray<KateAttribute> > it( m_attributeArrays ); it.current(); ++it )
+ for ( TQIntDictIterator< TQMemArray<KateAttribute> > it( m_attributeArrays ); it.current(); ++it )
{
// k, schema correct, let create the data
KateAttributeList defaultStyleList;
@@ -2880,7 +2880,7 @@ void KateHighlighting::clearAttributeArrays ()
getKateHlItemDataList(it.currentKey(), itemDataList);
uint nAttribs = itemDataList.count();
- QMemArray<KateAttribute> *array = it.current();
+ TQMemArray<KateAttribute> *array = it.current();
array->resize (nAttribs);
for (uint z = 0; z < nAttribs; z++)
@@ -2896,9 +2896,9 @@ void KateHighlighting::clearAttributeArrays ()
}
}
-QMemArray<KateAttribute> *KateHighlighting::attributes (uint schema)
+TQMemArray<KateAttribute> *KateHighlighting::attributes (uint schema)
{
- QMemArray<KateAttribute> *array;
+ TQMemArray<KateAttribute> *array;
// found it, allready floating around
if ((array = m_attributeArrays[schema]))
@@ -2920,7 +2920,7 @@ QMemArray<KateAttribute> *KateHighlighting::attributes (uint schema)
getKateHlItemDataList(schema, itemDataList);
uint nAttribs = itemDataList.count();
- array = new QMemArray<KateAttribute> (nAttribs);
+ array = new TQMemArray<KateAttribute> (nAttribs);
for (uint z = 0; z < nAttribs; z++)
{
@@ -2953,9 +2953,9 @@ void KateHighlighting::getKateHlItemDataListCopy (uint schema, KateHlItemDataLis
//BEGIN KateHlManager
KateHlManager::KateHlManager()
- : QObject()
+ : TQObject()
, m_config ("katesyntaxhighlightingrc", false, false)
- , commonSuffixes (QStringList::split(";", ".orig;.new;~;.bak;.BAK"))
+ , commonSuffixes (TQStringList::split(";", ".orig;.new;~;.bak;.BAK"))
, syntax (new KateSyntaxDocument())
, dynamicCtxsCount(0)
, forceNoDCReset(false)
@@ -2974,8 +2974,8 @@ KateHlManager::KateHlManager()
if (insert == hlList.count())
break;
- if ( QString(hlList.at(insert)->section() + hlList.at(insert)->nameTranslated()).lower()
- > QString(hl->section() + hl->nameTranslated()).lower() )
+ if ( TQString(hlList.at(insert)->section() + hlList.at(insert)->nameTranslated()).lower()
+ > TQString(hl->section() + hl->nameTranslated()).lower() )
break;
}
@@ -3014,7 +3014,7 @@ KateHighlighting *KateHlManager::getHl(int n)
return hlList.at(n);
}
-int KateHlManager::nameFind(const QString &name)
+int KateHlManager::nameFind(const TQString &name)
{
int z (hlList.count() - 1);
for (; z > 0; z--)
@@ -3033,20 +3033,20 @@ int KateHlManager::detectHighlighting (KateDocument *doc)
return hl;
}
-int KateHlManager::wildcardFind(const QString &fileName)
+int KateHlManager::wildcardFind(const TQString &fileName)
{
int result = -1;
if ((result = realWildcardFind(fileName)) != -1)
return result;
int length = fileName.length();
- QString backupSuffix = KateDocumentConfig::global()->backupSuffix();
+ TQString backupSuffix = KateDocumentConfig::global()->backupSuffix();
if (fileName.endsWith(backupSuffix)) {
if ((result = realWildcardFind(fileName.left(length - backupSuffix.length()))) != -1)
return result;
}
- for (QStringList::Iterator it = commonSuffixes.begin(); it != commonSuffixes.end(); ++it) {
+ for (TQStringList::Iterator it = commonSuffixes.begin(); it != commonSuffixes.end(); ++it) {
if (*it != backupSuffix && fileName.endsWith(*it)) {
if ((result = realWildcardFind(fileName.left(length - (*it).length()))) != -1)
return result;
@@ -3056,21 +3056,21 @@ int KateHlManager::wildcardFind(const QString &fileName)
return -1;
}
-int KateHlManager::realWildcardFind(const QString &fileName)
+int KateHlManager::realWildcardFind(const TQString &fileName)
{
- static QRegExp sep("\\s*;\\s*");
+ static TQRegExp sep("\\s*;\\s*");
- QPtrList<KateHighlighting> highlights;
+ TQPtrList<KateHighlighting> highlights;
for (KateHighlighting *highlight = hlList.first(); highlight != 0L; highlight = hlList.next()) {
highlight->loadWildcards();
- for (QStringList::Iterator it = highlight->getPlainExtensions().begin(); it != highlight->getPlainExtensions().end(); ++it)
+ for (TQStringList::Iterator it = highlight->getPlainExtensions().begin(); it != highlight->getPlainExtensions().end(); ++it)
if (fileName.endsWith((*it)))
highlights.append(highlight);
for (int i = 0; i < (int)highlight->getRegexpExtensions().count(); i++) {
- QRegExp re = highlight->getRegexpExtensions()[i];
+ TQRegExp re = highlight->getRegexpExtensions()[i];
if (re.exactMatch(fileName))
highlights.append(highlight);
}
@@ -3097,17 +3097,17 @@ int KateHlManager::realWildcardFind(const QString &fileName)
int KateHlManager::mimeFind( KateDocument *doc )
{
- static QRegExp sep("\\s*;\\s*");
+ static TQRegExp sep("\\s*;\\s*");
KMimeType::Ptr mt = doc->mimeTypeForContent();
- QPtrList<KateHighlighting> highlights;
+ TQPtrList<KateHighlighting> highlights;
for (KateHighlighting *highlight = hlList.first(); highlight != 0L; highlight = hlList.next())
{
- QStringList l = QStringList::split( sep, highlight->getMimetypes() );
+ TQStringList l = TQStringList::split( sep, highlight->getMimetypes() );
- for( QStringList::Iterator it = l.begin(); it != l.end(); ++it )
+ for( TQStringList::Iterator it = l.begin(); it != l.end(); ++it )
{
if ( *it == mt->name() ) // faster than a regexp i guess?
highlights.append (highlight);
@@ -3139,10 +3139,10 @@ uint KateHlManager::defaultStyles()
return 14;
}
-QString KateHlManager::defaultStyleName(int n, bool translateNames)
+TQString KateHlManager::defaultStyleName(int n, bool translateNames)
{
- static QStringList names;
- static QStringList translatedNames;
+ static TQStringList names;
+ static TQStringList translatedNames;
if (names.isEmpty())
{
@@ -3225,7 +3225,7 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list)
list.append(charAttribute);
KateAttribute* string = new KateAttribute();
- string->setTextColor(QColor::QColor("#D00"));
+ string->setTextColor(TQColor::TQColor("#D00"));
string->setSelectedTextColor(Qt::red);
list.append(string);
@@ -3242,9 +3242,9 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list)
KateAttribute* alert = new KateAttribute();
alert->setTextColor(Qt::black);
- alert->setSelectedTextColor( QColor::QColor("#FCC") );
+ alert->setSelectedTextColor( TQColor::TQColor("#FCC") );
alert->setBold(true);
- alert->setBGColor( QColor::QColor("#FCC") );
+ alert->setBGColor( TQColor::TQColor("#FCC") );
list.append(alert);
KateAttribute* functionAttribute = new KateAttribute();
@@ -3270,13 +3270,13 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list)
for (uint z = 0; z < defaultStyles(); z++)
{
KateAttribute *i = list.at(z);
- QStringList s = config->readListEntry(defaultStyleName(z));
+ TQStringList s = config->readListEntry(defaultStyleName(z));
if (!s.isEmpty())
{
while( s.count()<8)
s << "";
- QString tmp;
+ TQString tmp;
QRgb col;
tmp=s[0]; if (!tmp.isEmpty()) {
@@ -3322,17 +3322,17 @@ void KateHlManager::setDefaults(uint schema, KateAttributeList &list)
for (uint z = 0; z < defaultStyles(); z++)
{
- QStringList settings;
+ TQStringList settings;
KateAttribute *i = list.at(z);
- settings<<(i->itemSet(KateAttribute::TextColor)?QString::number(i->textColor().rgb(),16):"");
- settings<<(i->itemSet(KateAttribute::SelectedTextColor)?QString::number(i->selectedTextColor().rgb(),16):"");
+ settings<<(i->itemSet(KateAttribute::TextColor)?TQString::number(i->textColor().rgb(),16):"");
+ settings<<(i->itemSet(KateAttribute::SelectedTextColor)?TQString::number(i->selectedTextColor().rgb(),16):"");
settings<<(i->itemSet(KateAttribute::Weight)?(i->bold()?"1":"0"):"");
settings<<(i->itemSet(KateAttribute::Italic)?(i->italic()?"1":"0"):"");
settings<<(i->itemSet(KateAttribute::StrikeOut)?(i->strikeOut()?"1":"0"):"");
settings<<(i->itemSet(KateAttribute::Underline)?(i->underline()?"1":"0"):"");
- settings<<(i->itemSet(KateAttribute::BGColor)?QString::number(i->bgColor().rgb(),16):"-");
- settings<<(i->itemSet(KateAttribute::SelectedBGColor)?QString::number(i->selectedBGColor().rgb(),16):"-");
+ settings<<(i->itemSet(KateAttribute::BGColor)?TQString::number(i->bgColor().rgb(),16):"-");
+ settings<<(i->itemSet(KateAttribute::SelectedBGColor)?TQString::number(i->selectedBGColor().rgb(),16):"-");
settings<<"---";
config->writeEntry(defaultStyleName(z),settings);
@@ -3346,17 +3346,17 @@ int KateHlManager::highlights()
return (int) hlList.count();
}
-QString KateHlManager::hlName(int n)
+TQString KateHlManager::hlName(int n)
{
return hlList.at(n)->name();
}
-QString KateHlManager::hlNameTranslated(int n)
+TQString KateHlManager::hlNameTranslated(int n)
{
return hlList.at(n)->nameTranslated();
}
-QString KateHlManager::hlSection(int n)
+TQString KateHlManager::hlSection(int n)
{
return hlList.at(n)->section();
}
@@ -3366,14 +3366,14 @@ bool KateHlManager::hlHidden(int n)
return hlList.at(n)->hidden();
}
-QString KateHlManager::identifierForName(const QString& name)
+TQString KateHlManager::identifierForName(const TQString& name)
{
KateHighlighting *hl = 0;
if ((hl = hlDict[name]))
return hl->getIdentifier ();
- return QString();
+ return TQString();
}
bool KateHlManager::resetDynamicCtxs()
@@ -3401,7 +3401,7 @@ void KateViewHighlightAction::init()
m_doc = 0;
subMenus.setAutoDelete( true );
- connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow()));
+ connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}
void KateViewHighlightAction::updateMenu (Kate::Document *doc)
@@ -3416,8 +3416,8 @@ void KateViewHighlightAction::slotAboutToShow()
for (int z=0; z<count; z++)
{
- QString hlName = KateHlManager::self()->hlNameTranslated (z);
- QString hlSection = KateHlManager::self()->hlSection (z);
+ TQString hlName = KateHlManager::self()->hlNameTranslated (z);
+ TQString hlSection = KateHlManager::self()->hlSection (z);
if (!KateHlManager::self()->hlHidden(z))
{
@@ -3426,19 +3426,19 @@ void KateViewHighlightAction::slotAboutToShow()
if (subMenusName.contains(hlSection) < 1)
{
subMenusName << hlSection;
- QPopupMenu *menu = new QPopupMenu ();
+ TQPopupMenu *menu = new TQPopupMenu ();
subMenus.append(menu);
popupMenu()->insertItem ( '&' + hlSection, menu);
}
int m = subMenusName.findIndex (hlSection);
names << hlName;
- subMenus.at(m)->insertItem ( '&' + hlName, this, SLOT(setHl(int)), 0, z);
+ subMenus.at(m)->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z);
}
else if (names.contains(hlName) < 1)
{
names << hlName;
- popupMenu()->insertItem ( '&' + hlName, this, SLOT(setHl(int)), 0, z);
+ popupMenu()->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z);
}
}
}
diff --git a/kate/part/katehighlight.h b/kate/part/katehighlight.h
index 70b7016a3..b42fccb62 100644
--- a/kate/part/katehighlight.h
+++ b/kate/part/katehighlight.h
@@ -28,18 +28,18 @@
#include <kconfig.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
-#include <qregexp.h>
-#include <qdict.h>
-#include <qintdict.h>
-#include <qmap.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
-#include <qdatetime.h>
-#include <qpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
+#include <tqregexp.h>
+#include <tqdict.h>
+#include <tqintdict.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
+#include <tqdatetime.h>
+#include <tqpopupmenu.h>
class KateHlContext;
class KateHlItem;
@@ -53,19 +53,19 @@ class KateSyntaxModeListItem;
class KateSyntaxContextData;
// some typedefs
-typedef QPtrList<KateAttribute> KateAttributeList;
-typedef QValueList<KateHlIncludeRule*> KateHlIncludeRules;
-typedef QPtrList<KateHlItemData> KateHlItemDataList;
-typedef QPtrList<KateHlData> KateHlDataList;
-typedef QMap<QString,KateEmbeddedHlInfo> KateEmbeddedHlInfos;
-typedef QMap<int*,QString> KateHlUnresolvedCtxRefs;
-typedef QValueList<int> IntList;
+typedef TQPtrList<KateAttribute> KateAttributeList;
+typedef TQValueList<KateHlIncludeRule*> KateHlIncludeRules;
+typedef TQPtrList<KateHlItemData> KateHlItemDataList;
+typedef TQPtrList<KateHlData> KateHlDataList;
+typedef TQMap<TQString,KateEmbeddedHlInfo> KateEmbeddedHlInfos;
+typedef TQMap<int*,TQString> KateHlUnresolvedCtxRefs;
+typedef TQValueList<int> IntList;
//Item Properties: name, Item Style, Item Font
class KateHlItemData : public KateAttribute
{
public:
- KateHlItemData(const QString name, int defStyleNum);
+ KateHlItemData(const TQString name, int defStyleNum);
enum ItemStyles {
dsNormal,
@@ -84,19 +84,19 @@ class KateHlItemData : public KateAttribute
dsError };
public:
- const QString name;
+ const TQString name;
int defStyleNum;
};
class KateHlData
{
public:
- KateHlData(const QString &wildcards, const QString &mimetypes,const QString &identifier, int priority);
+ KateHlData(const TQString &wildcards, const TQString &mimetypes,const TQString &identifier, int priority);
public:
- QString wildcards;
- QString mimetypes;
- QString identifier;
+ TQString wildcards;
+ TQString mimetypes;
+ TQString identifier;
int priority;
};
@@ -109,14 +109,14 @@ class KateHighlighting
public:
void doHighlight ( KateTextLine *prevLine,
KateTextLine *textLine,
- QMemArray<uint> *foldingList,
+ TQMemArray<uint> *foldingList,
bool *ctxChanged );
void loadWildcards();
- QValueList<QRegExp>& getRegexpExtensions();
- QStringList& getPlainExtensions();
+ TQValueList<TQRegExp>& getRegexpExtensions();
+ TQStringList& getPlainExtensions();
- QString getMimetypes();
+ TQString getMimetypes();
// this pointer needs to be deleted !!!!!!!!!!
KateHlData *getData();
@@ -129,15 +129,15 @@ class KateHighlighting
// keep track that you delete them, or mem will be lost
void getKateHlItemDataListCopy (uint schema, KateHlItemDataList &);
- const QString &name() const {return iName;}
- const QString &nameTranslated() const {return iNameTranslated;}
- const QString &section() const {return iSection;}
+ const TQString &name() const {return iName;}
+ const TQString &nameTranslated() const {return iNameTranslated;}
+ const TQString &section() const {return iSection;}
bool hidden() const {return iHidden;}
- const QString &version() const {return iVersion;}
- const QString &author () const { return iAuthor; }
- const QString &license () const { return iLicense; }
+ const TQString &version() const {return iVersion;}
+ const TQString &author () const { return iAuthor; }
+ const TQString &license () const { return iLicense; }
int priority();
- const QString &getIdentifier() const {return identifier;}
+ const TQString &getIdentifier() const {return identifier;}
void use();
void release();
@@ -145,13 +145,13 @@ class KateHighlighting
* @return true if the character @p c is not a deliminator character
* for the corresponding highlight.
*/
- bool isInWord( QChar c, int attrib=0 ) const;
+ bool isInWord( TQChar c, int attrib=0 ) const;
/**
* @return true if the character @p c is a wordwrap deliminator as specified
* in the general keyword section of the xml file.
*/
- bool canBreakAt( QChar c, int attrib=0 ) const;
+ bool canBreakAt( TQChar c, int attrib=0 ) const;
/**
* @return true if @p beginAttr and @p endAttr are members of the same
@@ -169,19 +169,19 @@ class KateHighlighting
* @return the mulitiline comment start marker for the highlight
* corresponding to @p attrib.
*/
- QString getCommentStart( int attrib=0 ) const;
+ TQString getCommentStart( int attrib=0 ) const;
/**
* @return the muiltiline comment end marker for the highlight corresponding
* to @p attrib.
*/
- QString getCommentEnd( int attrib=0 ) const;
+ TQString getCommentEnd( int attrib=0 ) const;
/**
* @return the single comment marker for the highlight corresponding
* to @p attrib.
*/
- QString getCommentSingleLineStart( int attrib=0 ) const;
+ TQString getCommentSingleLineStart( int attrib=0 ) const;
/**
@@ -204,19 +204,19 @@ class KateHighlighting
* map attribute to its highlighting file.
* the returned string is used as key for m_additionalData.
*/
- QString hlKeyForAttrib( int attrib ) const;
+ TQString hlKeyForAttrib( int attrib ) const;
void clearAttributeArrays ();
- QMemArray<KateAttribute> *attributes (uint schema);
+ TQMemArray<KateAttribute> *attributes (uint schema);
inline bool noHighlighting () const { return noHl; };
// be carefull: all documents hl should be invalidated after calling this method!
void dropDynamicContexts();
- QString indentation () { return m_indentation; }
+ TQString indentation () { return m_indentation; }
private:
// make this private, nobody should play with the internal data pointers
@@ -225,10 +225,10 @@ class KateHighlighting
void init();
void done();
void makeContextList ();
- int makeDynamicContext(KateHlContext *model, const QStringList *args);
+ int makeDynamicContext(KateHlContext *model, const TQStringList *args);
void handleKateHlIncludeRules ();
void handleKateHlIncludeRulesRecursive(KateHlIncludeRules::iterator it, KateHlIncludeRules *list);
- int addToContextList(const QString &ident, int ctx0);
+ int addToContextList(const TQString &ident, int ctx0);
void addToKateHlItemDataList();
void createKateHlItemData (KateHlItemDataList &list);
void readGlobalKeywordConfig();
@@ -238,58 +238,58 @@ class KateHighlighting
void readFoldingConfig ();
// manipulates the ctxs array directly ;)
- void generateContextStack(int *ctxNum, int ctx, QMemArray<short> *ctxs, int *posPrevLine);
+ void generateContextStack(int *ctxNum, int ctx, TQMemArray<short> *ctxs, int *posPrevLine);
- KateHlItem *createKateHlItem(KateSyntaxContextData *data, KateHlItemDataList &iDl, QStringList *RegionList, QStringList *ContextList);
- int lookupAttrName(const QString& name, KateHlItemDataList &iDl);
+ KateHlItem *createKateHlItem(KateSyntaxContextData *data, KateHlItemDataList &iDl, TQStringList *RegionList, TQStringList *ContextList);
+ int lookupAttrName(const TQString& name, KateHlItemDataList &iDl);
- void createContextNameList(QStringList *ContextNameList, int ctx0);
- int getIdFromString(QStringList *ContextNameList, QString tmpLineEndContext,/*NO CONST*/ QString &unres);
+ void createContextNameList(TQStringList *ContextNameList, int ctx0);
+ int getIdFromString(TQStringList *ContextNameList, TQString tmpLineEndContext,/*NO CONST*/ TQString &unres);
KateHlItemDataList internalIDList;
- QValueVector<KateHlContext*> m_contexts;
+ TQValueVector<KateHlContext*> m_contexts;
inline KateHlContext *contextNum (uint n) { if (n < m_contexts.size()) return m_contexts[n]; return 0; }
- QMap< QPair<KateHlContext *, QString>, short> dynamicCtxs;
+ TQMap< QPair<KateHlContext *, TQString>, short> dynamicCtxs;
// make them pointers perhaps
KateEmbeddedHlInfos embeddedHls;
KateHlUnresolvedCtxRefs unresolvedContextReferences;
- QStringList RegionList;
- QStringList ContextNameList;
+ TQStringList RegionList;
+ TQStringList ContextNameList;
bool noHl;
bool folding;
bool casesensitive;
- QString weakDeliminator;
- QString deliminator;
+ TQString weakDeliminator;
+ TQString deliminator;
- QString iName;
- QString iNameTranslated;
- QString iSection;
+ TQString iName;
+ TQString iNameTranslated;
+ TQString iSection;
bool iHidden;
- QString iWildcards;
- QString iMimetypes;
- QString identifier;
- QString iVersion;
- QString iAuthor;
- QString iLicense;
- QString m_indentation;
+ TQString iWildcards;
+ TQString iMimetypes;
+ TQString identifier;
+ TQString iVersion;
+ TQString iAuthor;
+ TQString iLicense;
+ TQString m_indentation;
int m_priority;
int refCount;
int startctx, base_startctx;
- QString errorsAndWarnings;
- QString buildIdentifier;
- QString buildPrefix;
+ TQString errorsAndWarnings;
+ TQString buildIdentifier;
+ TQString buildPrefix;
bool building;
uint itemData0;
uint buildContext0Offset;
KateHlIncludeRules includeRules;
bool m_foldingIndentationSensitive;
- QIntDict< QMemArray<KateAttribute> > m_attributeArrays;
+ TQIntDict< TQMemArray<KateAttribute> > m_attributeArrays;
/**
@@ -306,32 +306,32 @@ class KateHighlighting
*/
class HighlightPropertyBag {
public:
- QString singleLineCommentMarker;
- QString multiLineCommentStart;
- QString multiLineCommentEnd;
- QString multiLineRegion;
+ TQString singleLineCommentMarker;
+ TQString multiLineCommentStart;
+ TQString multiLineCommentEnd;
+ TQString multiLineRegion;
CSLPos singleLineCommentPosition;
- QString deliminator;
- QString wordWrapDeliminator;
+ TQString deliminator;
+ TQString wordWrapDeliminator;
};
/**
* Highlight properties for each included highlight definition.
* The key is the identifier
*/
- QDict<HighlightPropertyBag> m_additionalData;
+ TQDict<HighlightPropertyBag> m_additionalData;
/**
* Fast lookup of hl properties, based on attribute index
* The key is the starting index in the attribute array for each file.
* @see hlKeyForAttrib
*/
- QMap<int, QString> m_hlIndex;
+ TQMap<int, TQString> m_hlIndex;
- QString extensionSource;
- QValueList<QRegExp> regexpExtensions;
- QStringList plainExtensions;
+ TQString extensionSource;
+ TQValueList<TQRegExp> regexpExtensions;
+ TQStringList plainExtensions;
public:
inline bool foldingIndentationSensitive () { return m_foldingIndentationSensitive; }
@@ -353,24 +353,24 @@ class KateHlManager : public QObject
inline KConfig *getKConfig() { return &m_config; };
KateHighlighting *getHl(int n);
- int nameFind(const QString &name);
+ int nameFind(const TQString &name);
int detectHighlighting (class KateDocument *doc);
int findHl(KateHighlighting *h) {return hlList.find(h);}
- QString identifierForName(const QString&);
+ TQString identifierForName(const TQString&);
// methodes to get the default style count + names
static uint defaultStyles();
- static QString defaultStyleName(int n, bool translateNames = false);
+ static TQString defaultStyleName(int n, bool translateNames = false);
void getDefaults(uint schema, KateAttributeList &);
void setDefaults(uint schema, KateAttributeList &);
int highlights();
- QString hlName(int n);
- QString hlNameTranslated (int n);
- QString hlSection(int n);
+ TQString hlName(int n);
+ TQString hlNameTranslated (int n);
+ TQString hlSection(int n);
bool hlHidden(int n);
void incDynamicCtxs() { ++dynamicCtxsCount; };
@@ -384,25 +384,25 @@ class KateHlManager : public QObject
void changed();
private:
- int wildcardFind(const QString &fileName);
+ int wildcardFind(const TQString &fileName);
int mimeFind(KateDocument *);
- int realWildcardFind(const QString &fileName);
+ int realWildcardFind(const TQString &fileName);
private:
friend class KateHighlighting;
- QPtrList<KateHighlighting> hlList;
- QDict<KateHighlighting> hlDict;
+ TQPtrList<KateHighlighting> hlList;
+ TQDict<KateHighlighting> hlDict;
static KateHlManager *s_self;
KConfig m_config;
- QStringList commonSuffixes;
+ TQStringList commonSuffixes;
KateSyntaxDocument *syntax;
uint dynamicCtxsCount;
- QTime lastCtxsReset;
+ TQTime lastCtxsReset;
bool forceNoDCReset;
};
@@ -411,7 +411,7 @@ class KateViewHighlightAction: public Kate::ActionMenu
Q_OBJECT
public:
- KateViewHighlightAction(const QString& text, QObject* parent = 0, const char* name = 0)
+ KateViewHighlightAction(const TQString& text, TQObject* parent = 0, const char* name = 0)
: Kate::ActionMenu(text, parent, name) { init(); };
~KateViewHighlightAction(){;};
@@ -421,10 +421,10 @@ class KateViewHighlightAction: public Kate::ActionMenu
private:
void init();
- QGuardedPtr<Kate::Document> m_doc;
- QStringList subMenusName;
- QStringList names;
- QPtrList<QPopupMenu> subMenus;
+ TQGuardedPtr<Kate::Document> m_doc;
+ TQStringList subMenusName;
+ TQStringList names;
+ TQPtrList<TQPopupMenu> subMenus;
public slots:
void slotAboutToShow();
diff --git a/kate/part/kateindentscriptabstracts.cpp b/kate/part/kateindentscriptabstracts.cpp
index f30dd9ebd..944bce9b0 100644
--- a/kate/part/kateindentscriptabstracts.cpp
+++ b/kate/part/kateindentscriptabstracts.cpp
@@ -19,13 +19,13 @@
#include "kateindentscriptabstracts.h"
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
//BEGIN KateIndentScriptImplAbstractImpl
-KateIndentScriptImplAbstract::KateIndentScriptImplAbstract(const QString& internalName,
- const QString &filePath, const QString &niceName,
- const QString &copyright, double version):m_refcount(0),m_filePath(filePath),m_niceName(niceName),
+KateIndentScriptImplAbstract::KateIndentScriptImplAbstract(const TQString& internalName,
+ const TQString &filePath, const TQString &niceName,
+ const TQString &copyright, double version):m_refcount(0),m_filePath(filePath),m_niceName(niceName),
m_copyright(copyright),m_version(version)
{
}
diff --git a/kate/part/kateindentscriptabstracts.h b/kate/part/kateindentscriptabstracts.h
index a47a8431a..84dd219fb 100644
--- a/kate/part/kateindentscriptabstracts.h
+++ b/kate/part/kateindentscriptabstracts.h
@@ -19,7 +19,7 @@
#ifndef _KATEINDENTSCRIPTABSTRACTS_H_
#define _KATEINDENTSCRIPTABSTRACTS_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
namespace Kate {
@@ -32,25 +32,25 @@ class KateDocCursor;
class KateIndentScriptImplAbstract {
public:
friend class KateIndentScript;
- KateIndentScriptImplAbstract(const QString& internalName,
- const QString &filePath, const QString &niceName,
- const QString &copyright, double version);
+ KateIndentScriptImplAbstract(const TQString& internalName,
+ const TQString &filePath, const TQString &niceName,
+ const TQString &copyright, double version);
virtual ~KateIndentScriptImplAbstract();
- virtual bool processChar( class Kate::View *view, QChar c, QString &errorMsg )=0;
- virtual bool processLine( class Kate::View *view, const KateDocCursor &line, QString &errorMsg )=0;
- virtual bool processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, QString &errorMsg )=0;
+ virtual bool processChar( class Kate::View *view, TQChar c, TQString &errorMsg )=0;
+ virtual bool processLine( class Kate::View *view, const KateDocCursor &line, TQString &errorMsg )=0;
+ virtual bool processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, TQString &errorMsg )=0;
protected:
virtual void decRef();
long refCount() {return m_refcount;}
- QString filePath() const {return m_filePath;}
+ TQString filePath() const {return m_filePath;}
private:
void incRef();
long m_refcount;
- QString m_internalName;
- QString m_filePath;
- QString m_niceName;
- QString m_copyright;
+ TQString m_internalName;
+ TQString m_filePath;
+ TQString m_niceName;
+ TQString m_copyright;
double m_version;
};
@@ -69,15 +69,15 @@ class KateIndentScript {
return *this;
}
/*operator KateIndentJScript*() const { return m_scr; }*/
- bool processChar( class Kate::View *view, QChar c, QString &errorMsg ) {
+ bool processChar( class Kate::View *view, TQChar c, TQString &errorMsg ) {
kdDebug(13050)<<"KateIndentScript::processChar: m_scr:"<<m_scr<<endl;
if (m_scr) return m_scr->processChar(view,c,errorMsg); else return true;
}
- bool processLine( class Kate::View *view, const KateDocCursor& line, QString &errorMsg ) {
+ bool processLine( class Kate::View *view, const KateDocCursor& line, TQString &errorMsg ) {
kdDebug(13050)<<"KateIndentScript::processLine: m_scr:"<<m_scr<<endl;
if (m_scr) return m_scr->processLine(view,line,errorMsg); else return true;
}
- bool processNewline( class Kate::View *view, const KateDocCursor& begin, bool needcontinue, QString &errorMsg ) {
+ bool processNewline( class Kate::View *view, const KateDocCursor& begin, bool needcontinue, TQString &errorMsg ) {
kdDebug(13050)<<"KateIndentScript::processNewLine: m_scr:"<<m_scr<<endl;
if (m_scr) return m_scr->processNewline(view,begin,needcontinue,errorMsg); else return true;
}
@@ -93,7 +93,7 @@ class KateIndentScriptManagerAbstract
public:
KateIndentScriptManagerAbstract () {};
virtual ~KateIndentScriptManagerAbstract () {};
- virtual KateIndentScript script(const QString &scriptname)=0;
+ virtual KateIndentScript script(const TQString &scriptname)=0;
};
#endif
diff --git a/kate/part/katejscript.cpp b/kate/part/katejscript.cpp
index 024f36500..75f5fc513 100644
--- a/kate/part/katejscript.cpp
+++ b/kate/part/katejscript.cpp
@@ -43,11 +43,11 @@
#include <kjs/interpreter.h>
#include <kjs/lookup.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
namespace KJS {
@@ -58,7 +58,7 @@ namespace KJS {
// Copyright (C) 2001-2003 David Faure (faure@kde.org)
// Copyright (C) 2003 Apple Computer, Inc.
-UString::UString(const QString &d)
+UString::UString(const TQString &d)
{
unsigned int len = d.length();
UChar *dat = new UChar[len];
@@ -66,14 +66,14 @@ UString::UString(const QString &d)
rep = UString::Rep::create(dat, len);
}
-QString UString::qstring() const
+TQString UString::qstring() const
{
- return QString((QChar*) data(), size());
+ return TQString((TQChar*) data(), size());
}
-QConstString UString::qconststring() const
+TQConstString UString::qconststring() const
{
- return QConstString((QChar*) data(), size());
+ return TQConstString((TQChar*) data(), size());
}
//BEGIN global methods
@@ -267,7 +267,7 @@ KJS::ObjectImp *KateJScript::wrapView (KJS::ExecState *exec, KateView *view)
return new KateJSView(exec, view);
}
-bool KateJScript::execute (KateView *view, const QString &script, QString &errorMsg)
+bool KateJScript::execute (KateView *view, const TQString &script, TQString &errorMsg)
{
// no view, no fun
if (!view)
@@ -653,13 +653,13 @@ void KateJScriptManager::collectScripts (bool force)
}
// Let's get a list of all the .js files
- QStringList list = KGlobal::dirs()->findAllResources("data","katepart/scripts/*.js",false,true);
+ TQStringList list = KGlobal::dirs()->findAllResources("data","katepart/scripts/*.js",false,true);
// Let's iterate through the list and build the Mode List
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
// Each file has a group called:
- QString Group="Cache "+ *it;
+ TQString Group="Cache "+ *it;
// Let's go to this group
config.setGroup(Group);
@@ -667,7 +667,7 @@ void KateJScriptManager::collectScripts (bool force)
// stat the file
struct stat sbuf;
memset (&sbuf, 0, sizeof(sbuf));
- stat(QFile::encodeName(*it), &sbuf);
+ stat(TQFile::encodeName(*it), &sbuf);
// If the group exist and we're not forced to read the .js file, let's build myModeList for katepartjscriptrc
if (!force && config.hasGroup(Group) && (sbuf.st_mtime == config.readNumEntry("lastModified")))
@@ -677,11 +677,11 @@ void KateJScriptManager::collectScripts (bool force)
{
kdDebug (13050) << "add script: " << *it << endl;
- QString desktopFile = (*it).left((*it).length()-2).append ("desktop");
+ TQString desktopFile = (*it).left((*it).length()-2).append ("desktop");
kdDebug (13050) << "add script (desktop file): " << desktopFile << endl;
- QFileInfo dfi (desktopFile);
+ TQFileInfo dfi (desktopFile);
if (dfi.exists())
{
@@ -689,10 +689,10 @@ void KateJScriptManager::collectScripts (bool force)
df.setDesktopGroup ();
// get cmdname, fallback to baseName, if it is empty, therefor not use the kconfig fallback
- QString cmdname = df.readEntry ("X-Kate-Command");
+ TQString cmdname = df.readEntry ("X-Kate-Command");
if (cmdname.isEmpty())
{
- QFileInfo fi (*it);
+ TQFileInfo fi (*it);
cmdname = fi.baseName();
}
@@ -711,7 +711,7 @@ void KateJScriptManager::collectScripts (bool force)
{
kdDebug (13050) << "add script: fallback, no desktop file around!" << endl;
- QFileInfo fi (*it);
+ TQFileInfo fi (*it);
if (m_scripts[fi.baseName()])
continue;
@@ -731,7 +731,7 @@ void KateJScriptManager::collectScripts (bool force)
config.sync();
}
-bool KateJScriptManager::exec( Kate::View *view, const QString &_cmd, QString &errorMsg )
+bool KateJScriptManager::exec( Kate::View *view, const TQString &_cmd, TQString &errorMsg )
{
// cast it hardcore, we know that it is really a kateview :)
KateView *v = (KateView*) view;
@@ -743,8 +743,8 @@ bool KateJScriptManager::exec( Kate::View *view, const QString &_cmd, QString &e
}
//create a list of args
- QStringList args( QStringList::split( QRegExp("\\s+"), _cmd ) );
- QString cmd ( args.first() );
+ TQStringList args( TQStringList::split( TQRegExp("\\s+"), _cmd ) );
+ TQString cmd ( args.first() );
args.remove( args.first() );
kdDebug(13050) << "try to exec: " << cmd << endl;
@@ -755,7 +755,7 @@ bool KateJScriptManager::exec( Kate::View *view, const QString &_cmd, QString &e
return false;
}
- QFile file (m_scripts[cmd]->filename);
+ TQFile file (m_scripts[cmd]->filename);
if ( !file.open( IO_ReadOnly ) )
{
@@ -763,17 +763,17 @@ bool KateJScriptManager::exec( Kate::View *view, const QString &_cmd, QString &e
return false;
}
- QTextStream stream( &file );
- stream.setEncoding (QTextStream::UnicodeUTF8);
+ TQTextStream stream( &file );
+ stream.setEncoding (TQTextStream::UnicodeUTF8);
- QString source = stream.read ();
+ TQString source = stream.read ();
file.close();
return KateFactory::self()->jscript()->execute(v, source, errorMsg);
}
-bool KateJScriptManager::help( Kate::View *, const QString &cmd, QString &msg )
+bool KateJScriptManager::help( Kate::View *, const TQString &cmd, TQString &msg )
{
if (!m_scripts[cmd] || !m_scripts[cmd]->desktopFileExists)
return false;
@@ -789,11 +789,11 @@ bool KateJScriptManager::help( Kate::View *, const QString &cmd, QString &msg )
return true;
}
-QStringList KateJScriptManager::cmds()
+TQStringList KateJScriptManager::cmds()
{
- QStringList l;
+ TQStringList l;
- QDictIterator<KateJScriptManager::Script> it( m_scripts );
+ TQDictIterator<KateJScriptManager::Script> it( m_scripts );
for( ; it.current(); ++it )
l << it.current()->name;
@@ -844,9 +844,9 @@ KJS::Value KJS::KateJSIndenterProtoFunc::call(KJS::ExecState *exec, KJS::Object
//END
//BEGIN KateIndentJScriptImpl
-KateIndentJScriptImpl::KateIndentJScriptImpl(const QString& internalName,
- const QString &filePath, const QString &niceName,
- const QString &copyright, double version):
+KateIndentJScriptImpl::KateIndentJScriptImpl(const TQString& internalName,
+ const TQString &filePath, const TQString &niceName,
+ const TQString &copyright, double version):
KateIndentScriptImplAbstract(internalName,filePath,niceName,copyright,version),m_interpreter(0),m_indenter(0)
{
}
@@ -876,7 +876,7 @@ void KateIndentJScriptImpl::deleteInterpreter()
m_interpreter=0;
}
-bool KateIndentJScriptImpl::setupInterpreter(QString &errorMsg)
+bool KateIndentJScriptImpl::setupInterpreter(TQString &errorMsg)
{
if (!m_interpreter)
{
@@ -890,7 +890,7 @@ bool KateIndentJScriptImpl::setupInterpreter(QString &errorMsg)
m_interpreter->globalObject().put(m_interpreter->globalExec(),"debug", KJS::Object(new
KateJSGlobalFunctions(KateJSGlobalFunctions::Debug,1)));
m_interpreter->globalObject().put(m_interpreter->globalExec(),"indenter",*m_indenter,KJS::DontDelete | KJS::ReadOnly);
- QFile file (filePath());
+ TQFile file (filePath());
if ( !file.open( IO_ReadOnly ) )
{
@@ -899,10 +899,10 @@ bool KateIndentJScriptImpl::setupInterpreter(QString &errorMsg)
return false;
}
- QTextStream stream( &file );
- stream.setEncoding (QTextStream::UnicodeUTF8);
+ TQTextStream stream( &file );
+ stream.setEncoding (TQTextStream::UnicodeUTF8);
- QString source = stream.read ();
+ TQString source = stream.read ();
file.close();
@@ -935,7 +935,7 @@ bool KateIndentJScriptImpl::setupInterpreter(QString &errorMsg)
}
-inline static bool KateIndentJScriptCall(Kate::View *view, QString &errorMsg, KateJSDocument *docWrapper, KateJSView *viewWrapper,
+inline static bool KateIndentJScriptCall(Kate::View *view, TQString &errorMsg, KateJSDocument *docWrapper, KateJSView *viewWrapper,
KJS::Interpreter *interpreter, KJS::Object lookupobj,const KJS::Identifier& func,KJS::List params)
{
// no view, no fun
@@ -972,24 +972,24 @@ inline static bool KateIndentJScriptCall(Kate::View *view, QString &errorMsg, Ka
return true;
}
-bool KateIndentJScriptImpl::processChar(Kate::View *view, QChar c, QString &errorMsg )
+bool KateIndentJScriptImpl::processChar(Kate::View *view, TQChar c, TQString &errorMsg )
{
kdDebug(13050)<<"KateIndentJScriptImpl::processChar"<<endl;
if (!setupInterpreter(errorMsg)) return false;
KJS::List params;
- params.append(KJS::String(QString(c)));
+ params.append(KJS::String(TQString(c)));
return KateIndentJScriptCall(view,errorMsg,m_docWrapper,m_viewWrapper,m_interpreter,*m_indenter,KJS::Identifier("onchar"),params);
}
-bool KateIndentJScriptImpl::processLine(Kate::View *view, const KateDocCursor &line, QString &errorMsg )
+bool KateIndentJScriptImpl::processLine(Kate::View *view, const KateDocCursor &line, TQString &errorMsg )
{
kdDebug(13050)<<"KateIndentJScriptImpl::processLine"<<endl;
if (!setupInterpreter(errorMsg)) return false;
return KateIndentJScriptCall(view,errorMsg,m_docWrapper,m_viewWrapper,m_interpreter,*m_indenter,KJS::Identifier("online"),KJS::List());
}
-bool KateIndentJScriptImpl::processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, QString &errorMsg )
+bool KateIndentJScriptImpl::processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, TQString &errorMsg )
{
kdDebug(13050)<<"KateIndentJScriptImpl::processNewline"<<endl;
if (!setupInterpreter(errorMsg)) return false;
@@ -1028,13 +1028,13 @@ void KateIndentJScriptManager::collectScripts (bool force)
#endif
// Let's get a list of all the .js files
- QStringList list = KGlobal::dirs()->findAllResources("data","katepart/scripts/indent/*.js",false,true);
+ TQStringList list = KGlobal::dirs()->findAllResources("data","katepart/scripts/indent/*.js",false,true);
// Let's iterate through the list and build the Mode List
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
// Each file has a group ed:
- QString Group="Cache "+ *it;
+ TQString Group="Cache "+ *it;
// Let's go to this group
config.setGroup(Group);
@@ -1042,20 +1042,20 @@ void KateIndentJScriptManager::collectScripts (bool force)
// stat the file
struct stat sbuf;
memset (&sbuf, 0, sizeof(sbuf));
- stat(QFile::encodeName(*it), &sbuf);
+ stat(TQFile::encodeName(*it), &sbuf);
// If the group exist and we're not forced to read the .js file, let's build myModeList for katepartjscriptrc
bool readnew=false;
if (!force && config.hasGroup(Group) && (sbuf.st_mtime == config.readNumEntry("lastModified")))
{
config.setGroup(Group);
- QString filePath=*it;
- QString internalName=config.readEntry("internlName","KATE-ERROR");
+ TQString filePath=*it;
+ TQString internalName=config.readEntry("internlName","KATE-ERROR");
if (internalName=="KATE-ERROR") readnew=true;
else
{
- QString niceName=config.readEntry("niceName",internalName);
- QString copyright=config.readEntry("copyright",i18n("(Unknown)"));
+ TQString niceName=config.readEntry("niceName",internalName);
+ TQString copyright=config.readEntry("copyright",i18n("(Unknown)"));
double version=config.readDoubleNumEntry("version",0.0);
KateIndentJScriptImpl *s=new KateIndentJScriptImpl(
internalName,filePath,niceName,copyright,version);
@@ -1065,15 +1065,15 @@ void KateIndentJScriptManager::collectScripts (bool force)
else readnew=true;
if (readnew)
{
- QFileInfo fi (*it);
+ TQFileInfo fi (*it);
if (m_scripts[fi.baseName()])
continue;
- QString internalName=fi.baseName();
- QString filePath=*it;
- QString niceName=internalName;
- QString copyright=i18n("(Unknown)");
+ TQString internalName=fi.baseName();
+ TQString filePath=*it;
+ TQString niceName=internalName;
+ TQString copyright=i18n("(Unknown)");
double version=0.0;
parseScriptHeader(filePath,&niceName,&copyright,&version);
/*save the information for retrieval*/
@@ -1093,22 +1093,22 @@ void KateIndentJScriptManager::collectScripts (bool force)
config.sync();
}
-KateIndentScript KateIndentJScriptManager::script(const QString &scriptname) {
+KateIndentScript KateIndentJScriptManager::script(const TQString &scriptname) {
KateIndentJScriptImpl *s=m_scripts[scriptname];
kdDebug(13050)<<scriptname<<"=="<<s<<endl;
return KateIndentScript(s);
}
-void KateIndentJScriptManager::parseScriptHeader(const QString &filePath,
- QString *niceName,QString *copyright,double *version)
+void KateIndentJScriptManager::parseScriptHeader(const TQString &filePath,
+ TQString *niceName,TQString *copyright,double *version)
{
- QFile f(QFile::encodeName(filePath));
+ TQFile f(TQFile::encodeName(filePath));
if (!f.open(IO_ReadOnly) ) {
kdDebug(13050)<<"Header could not be parsed, because file could not be opened"<<endl;
return;
}
- QTextStream st(&f);
- st.setEncoding (QTextStream::UnicodeUTF8);
+ TQTextStream st(&f);
+ st.setEncoding (TQTextStream::UnicodeUTF8);
if (!st.readLine().upper().startsWith("/**KATE")) {
kdDebug(13050)<<"No header found"<<endl;
f.close();
@@ -1117,12 +1117,12 @@ void KateIndentJScriptManager::parseScriptHeader(const QString &filePath,
// here the real parsing begins
kdDebug(13050)<<"Parsing indent script header"<<endl;
enum {NOTHING=0,COPYRIGHT=1} currentState=NOTHING;
- QString line;
- QString tmpblockdata="";
- QRegExp endExpr("[\\s\\t]*\\*\\*\\/[\\s\\t]*$");
- QRegExp keyValue("[\\s\\t]*\\*\\s*(.+):(.*)$");
- QRegExp blockContent("[\\s\\t]*\\*(.*)$");
- while ((line=st.readLine())!=QString::null) {
+ TQString line;
+ TQString tmpblockdata="";
+ TQRegExp endExpr("[\\s\\t]*\\*\\*\\/[\\s\\t]*$");
+ TQRegExp keyValue("[\\s\\t]*\\*\\s*(.+):(.*)$");
+ TQRegExp blockContent("[\\s\\t]*\\*(.*)$");
+ while ((line=st.readLine())!=TQString::null) {
if (endExpr.exactMatch(line)) {
kdDebug(13050)<<"end of config block"<<endl;
if (currentState==NOTHING) break;
@@ -1135,11 +1135,11 @@ void KateIndentJScriptManager::parseScriptHeader(const QString &filePath,
if (currentState==NOTHING)
{
if (keyValue.exactMatch(line)) {
- QStringList sl=keyValue.capturedTexts();
+ TQStringList sl=keyValue.capturedTexts();
kdDebug(13050)<<"key:"<<sl[1]<<endl<<"value:"<<sl[2]<<endl;
kdDebug(13050)<<"key-length:"<<sl[1].length()<<endl<<"value-length:"<<sl[2].length()<<endl;
- QString key=sl[1];
- QString value=sl[2];
+ TQString key=sl[1];
+ TQString value=sl[2];
if (key=="NAME") (*niceName)=value.stripWhiteSpace();
else if (key=="VERSION") (*version)=value.stripWhiteSpace().toDouble(0);
else if (key=="COPYRIGHT")
@@ -1152,7 +1152,7 @@ void KateIndentJScriptManager::parseScriptHeader(const QString &filePath,
} else {
if (blockContent.exactMatch(line))
{
- QString bl=blockContent.capturedTexts()[1];
+ TQString bl=blockContent.capturedTexts()[1];
//kdDebug(13050)<<"block content line:"<<bl<<endl<<bl.length()<<" "<<bl.isEmpty()<<endl;
if (bl.isEmpty())
{
diff --git a/kate/part/katejscript.h b/kate/part/katejscript.h
index ac9e20246..f9cf23280 100644
--- a/kate/part/katejscript.h
+++ b/kate/part/katejscript.h
@@ -22,7 +22,7 @@
#include "../interfaces/document.h"
#include "kateindentscriptabstracts.h"
-#include <qdict.h>
+#include <tqdict.h>
#include <kdebug.h>
/**
* Some common stuff
@@ -87,7 +87,7 @@ class KateJScript
* @param errorMsg error to return if no success
* @return success or not?
*/
- bool execute (KateView *view, const QString &script, QString &errorMsg);
+ bool execute (KateView *view, const TQString &script, TQString &errorMsg);
protected:
/**
@@ -124,18 +124,18 @@ class KateJScriptManager : public Kate::Command
* get desktop filename
* @return desktop filename
*/
- inline QString desktopFilename () { return filename.left(filename.length()-2).append ("desktop"); }
+ inline TQString desktopFilename () { return filename.left(filename.length()-2).append ("desktop"); }
public:
/**
* command name, as used for command line and more
*/
- QString name;
+ TQString name;
/**
* filename of the script
*/
- QString filename;
+ TQString filename;
/**
* has it a desktop file?
@@ -165,7 +165,7 @@ class KateJScriptManager : public Kate::Command
* @param errorMsg error to return if no success
* @return success
*/
- bool exec( class Kate::View *view, const QString &cmd, QString &errorMsg );
+ bool exec( class Kate::View *view, const TQString &cmd, TQString &errorMsg );
/**
* get help for a command
@@ -174,31 +174,31 @@ class KateJScriptManager : public Kate::Command
* @param msg help message
* @return help available or not
*/
- bool help( class Kate::View *view, const QString &cmd, QString &msg );
+ bool help( class Kate::View *view, const TQString &cmd, TQString &msg );
/**
* supported commands as prefixes
* @return prefix list
*/
- QStringList cmds();
+ TQStringList cmds();
private:
/**
* we need to know somewhere which scripts are around
*/
- QDict<KateJScriptManager::Script> m_scripts;
+ TQDict<KateJScriptManager::Script> m_scripts;
};
class KateIndentJScriptImpl: public KateIndentScriptImplAbstract {
public:
- KateIndentJScriptImpl(const QString& internalName,
- const QString &filePath, const QString &niceName,
- const QString &copyright, double version);
+ KateIndentJScriptImpl(const TQString& internalName,
+ const TQString &filePath, const TQString &niceName,
+ const TQString &copyright, double version);
~KateIndentJScriptImpl();
- virtual bool processChar( class Kate::View *view, QChar c, QString &errorMsg );
- virtual bool processLine( class Kate::View *view, const KateDocCursor &line, QString &errorMsg );
- virtual bool processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, QString &errorMsg );
+ virtual bool processChar( class Kate::View *view, TQChar c, TQString &errorMsg );
+ virtual bool processLine( class Kate::View *view, const KateDocCursor &line, TQString &errorMsg );
+ virtual bool processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, TQString &errorMsg );
protected:
virtual void decRef();
private:
@@ -206,7 +206,7 @@ class KateIndentJScriptImpl: public KateIndentScriptImplAbstract {
KateJSDocument *m_docWrapper;
KJS::Object *m_indenter;
KJS::Interpreter *m_interpreter;
- bool setupInterpreter(QString &errorMsg);
+ bool setupInterpreter(TQString &errorMsg);
void deleteInterpreter();
};
@@ -216,16 +216,16 @@ class KateIndentJScriptManager: public KateIndentScriptManagerAbstract
public:
KateIndentJScriptManager ();
virtual ~KateIndentJScriptManager ();
- virtual KateIndentScript script(const QString &scriptname);
+ virtual KateIndentScript script(const TQString &scriptname);
private:
/**
* go, search our scripts
* @param force force cache updating?
*/
void collectScripts (bool force = false);
- void parseScriptHeader(const QString &filePath,
- QString *niceName,QString *copyright,double *version);
- QDict<KateIndentJScriptImpl> m_scripts;
+ void parseScriptHeader(const TQString &filePath,
+ TQString *niceName,TQString *copyright,double *version);
+ TQDict<KateIndentJScriptImpl> m_scripts;
};
#endif
diff --git a/kate/part/kateluaindentscript.cpp b/kate/part/kateluaindentscript.cpp
index a8872c0e8..dbc7d1fa4 100644
--- a/kate/part/kateluaindentscript.cpp
+++ b/kate/part/kateluaindentscript.cpp
@@ -27,8 +27,8 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kstandarddirs.h>
#include <kconfig.h>
@@ -156,7 +156,7 @@ static int katelua_document_insertText(lua_State *L) {
lua_pushstring(L,i18n("document.removeText:Three parameters needed (line,col,text) (number,number,string)").utf8().data());
lua_error(L);
}
- lua_pushboolean(L,katelua_doc->insertText((uint)lua_tonumber(L,1),(uint)lua_tonumber(L,2),QString::fromUtf8(lua_tostring(L,3))));
+ lua_pushboolean(L,katelua_doc->insertText((uint)lua_tonumber(L,1),(uint)lua_tonumber(L,2),TQString::fromUtf8(lua_tostring(L,3))));
return 1;
}
@@ -212,9 +212,9 @@ static void kateregistertable(lua_State* m_interpreter,const KATELUA_FUNCTIONS
//BEGIN KateLUAIndentScriptImpl
-KateLUAIndentScriptImpl::KateLUAIndentScriptImpl(const QString& internalName,
- const QString &filePath, const QString &niceName,
- const QString &copyright, double version):
+KateLUAIndentScriptImpl::KateLUAIndentScriptImpl(const TQString& internalName,
+ const TQString &filePath, const TQString &niceName,
+ const TQString &copyright, double version):
KateIndentScriptImplAbstract(internalName,filePath,niceName,copyright,version),m_interpreter(0)/*,m_indenter(0)*/
{
}
@@ -243,7 +243,7 @@ void KateLUAIndentScriptImpl::deleteInterpreter()
}
}
-bool KateLUAIndentScriptImpl::setupInterpreter(QString &errorMsg)
+bool KateLUAIndentScriptImpl::setupInterpreter(TQString &errorMsg)
{
if (m_interpreter) return true;
m_interpreter=lua_open();
@@ -283,7 +283,7 @@ bool KateLUAIndentScriptImpl::setupInterpreter(QString &errorMsg)
/*open script*/
lua_pushstring(m_interpreter,"dofile");
lua_gettable(m_interpreter,LUA_GLOBALSINDEX);
- QCString fn=QFile::encodeName(filePath());
+ TQCString fn=TQFile::encodeName(filePath());
lua_pushstring(m_interpreter,fn.data());
int execresult=lua_pcall(m_interpreter,1,1,0);
if (execresult==0) {
@@ -299,7 +299,7 @@ bool KateLUAIndentScriptImpl::setupInterpreter(QString &errorMsg)
}
-bool KateLUAIndentScriptImpl::processChar(Kate::View *view, QChar c, QString &errorMsg )
+bool KateLUAIndentScriptImpl::processChar(Kate::View *view, TQChar c, TQString &errorMsg )
{
if (!setupInterpreter(errorMsg)) return false;
katelua_doc=((KateView*)view)->doc();
@@ -310,7 +310,7 @@ bool KateLUAIndentScriptImpl::processChar(Kate::View *view, QChar c, QString &er
bool result=true;
if (!lua_isnil(m_interpreter,lua_gettop(m_interpreter)))
{
- lua_pushstring(m_interpreter,QString(c).utf8().data());
+ lua_pushstring(m_interpreter,TQString(c).utf8().data());
if (lua_pcall(m_interpreter,1,0,0)!=0)
{
errorMsg=i18n("Lua indenting script had errors: %1").arg(lua_tostring(m_interpreter,lua_gettop(m_interpreter)));
@@ -322,13 +322,13 @@ bool KateLUAIndentScriptImpl::processChar(Kate::View *view, QChar c, QString &er
return result;
}
-bool KateLUAIndentScriptImpl::processLine(Kate::View *view, const KateDocCursor &line, QString &errorMsg )
+bool KateLUAIndentScriptImpl::processLine(Kate::View *view, const KateDocCursor &line, TQString &errorMsg )
{
if (!setupInterpreter(errorMsg)) return false;
return true;
}
-bool KateLUAIndentScriptImpl::processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, QString &errorMsg )
+bool KateLUAIndentScriptImpl::processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, TQString &errorMsg )
{
if (!setupInterpreter(errorMsg)) return false;
katelua_doc=((KateView*)view)->doc();
@@ -383,13 +383,13 @@ void KateLUAIndentScriptManager::collectScripts (bool force)
#endif
// Let's get a list of all the .js files
- QStringList list = KGlobal::dirs()->findAllResources("data","katepart/scripts/indent/*.lua",false,true);
+ TQStringList list = KGlobal::dirs()->findAllResources("data","katepart/scripts/indent/*.lua",false,true);
// Let's iterate through the list and build the Mode List
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
// Each file has a group ed:
- QString Group="Cache "+ *it;
+ TQString Group="Cache "+ *it;
// Let's go to this group
config.setGroup(Group);
@@ -397,20 +397,20 @@ void KateLUAIndentScriptManager::collectScripts (bool force)
// stat the file
struct stat sbuf;
memset (&sbuf, 0, sizeof(sbuf));
- stat(QFile::encodeName(*it), &sbuf);
+ stat(TQFile::encodeName(*it), &sbuf);
kdDebug()<<"Lua script file:"<<(*it)<<endl;
// If the group exist and we're not forced to read the .js file, let's build myModeList for katepartjscriptrc
bool readnew=false;
if (!force && config.hasGroup(Group) && (sbuf.st_mtime == config.readNumEntry("lastModified")))
{
config.setGroup(Group);
- QString filePath=*it;
- QString internalName=config.readEntry("internlName","KATE-ERROR");
+ TQString filePath=*it;
+ TQString internalName=config.readEntry("internlName","KATE-ERROR");
if (internalName=="KATE-ERROR") readnew=true;
else
{
- QString niceName=config.readEntry("niceName",internalName);
- QString copyright=config.readEntry("copyright",i18n("(Unknown)"));
+ TQString niceName=config.readEntry("niceName",internalName);
+ TQString copyright=config.readEntry("copyright",i18n("(Unknown)"));
double version=config.readDoubleNumEntry("version",0.0);
KateLUAIndentScriptImpl *s=new KateLUAIndentScriptImpl(
internalName,filePath,niceName,copyright,version);
@@ -420,15 +420,15 @@ void KateLUAIndentScriptManager::collectScripts (bool force)
else readnew=true;
if (readnew)
{
- QFileInfo fi (*it);
+ TQFileInfo fi (*it);
if (m_scripts[fi.baseName()])
continue;
- QString internalName=fi.baseName();
- QString filePath=*it;
- QString niceName=internalName;
- QString copyright=i18n("(Unknown)");
+ TQString internalName=fi.baseName();
+ TQString filePath=*it;
+ TQString niceName=internalName;
+ TQString copyright=i18n("(Unknown)");
double version=0.0;
parseScriptHeader(filePath,&niceName,&copyright,&version);
/*save the information for retrieval*/
@@ -448,23 +448,23 @@ void KateLUAIndentScriptManager::collectScripts (bool force)
config.sync();
}
-KateIndentScript KateLUAIndentScriptManager::script(const QString &scriptname) {
+KateIndentScript KateLUAIndentScriptManager::script(const TQString &scriptname) {
KateLUAIndentScriptImpl *s=m_scripts[scriptname];
kdDebug(13050)<<scriptname<<"=="<<s<<endl;
return KateIndentScript(s);
}
-void KateLUAIndentScriptManager::parseScriptHeader(const QString &filePath,
- QString *niceName,QString *copyright,double *version)
+void KateLUAIndentScriptManager::parseScriptHeader(const TQString &filePath,
+ TQString *niceName,TQString *copyright,double *version)
{
#if 0
- QFile f(QFile::encodeName(filePath));
+ TQFile f(TQFile::encodeName(filePath));
if (!f.open(IO_ReadOnly) ) {
kdDebug(13050)<<"Header could not be parsed, because file could not be opened"<<endl;
return;
}
- QTextStream st(&f);
- st.setEncoding (QTextStream::UnicodeUTF8);
+ TQTextStream st(&f);
+ st.setEncoding (TQTextStream::UnicodeUTF8);
if (!st.readLine().upper().startsWith("/**KATE")) {
kdDebug(13050)<<"No header found"<<endl;
f.close();
@@ -473,12 +473,12 @@ void KateLUAIndentScriptManager::parseScriptHeader(const QString &filePath,
// here the real parsing begins
kdDebug(13050)<<"Parsing indent script header"<<endl;
enum {NOTHING=0,COPYRIGHT=1} currentState=NOTHING;
- QString line;
- QString tmpblockdata="";
- QRegExp endExpr("[\\s\\t]*\\*\\*\\/[\\s\\t]*$");
- QRegExp keyValue("[\\s\\t]*\\*\\s*(.+):(.*)$");
- QRegExp blockContent("[\\s\\t]*\\*(.*)$");
- while ((line=st.readLine())!=QString::null) {
+ TQString line;
+ TQString tmpblockdata="";
+ TQRegExp endExpr("[\\s\\t]*\\*\\*\\/[\\s\\t]*$");
+ TQRegExp keyValue("[\\s\\t]*\\*\\s*(.+):(.*)$");
+ TQRegExp blockContent("[\\s\\t]*\\*(.*)$");
+ while ((line=st.readLine())!=TQString::null) {
if (endExpr.exactMatch(line)) {
kdDebug(13050)<<"end of config block"<<endl;
if (currentState==NOTHING) break;
@@ -491,11 +491,11 @@ void KateLUAIndentScriptManager::parseScriptHeader(const QString &filePath,
if (currentState==NOTHING)
{
if (keyValue.exactMatch(line)) {
- QStringList sl=keyValue.capturedTexts();
+ TQStringList sl=keyValue.capturedTexts();
kdDebug(13050)<<"key:"<<sl[1]<<endl<<"value:"<<sl[2]<<endl;
kdDebug(13050)<<"key-length:"<<sl[1].length()<<endl<<"value-length:"<<sl[2].length()<<endl;
- QString key=sl[1];
- QString value=sl[2];
+ TQString key=sl[1];
+ TQString value=sl[2];
if (key=="NAME") (*niceName)=value.stripWhiteSpace();
else if (key=="VERSION") (*version)=value.stripWhiteSpace().toDouble(0);
else if (key=="COPYRIGHT")
@@ -508,7 +508,7 @@ void KateLUAIndentScriptManager::parseScriptHeader(const QString &filePath,
} else {
if (blockContent.exactMatch(line))
{
- QString bl=blockContent.capturedTexts()[1];
+ TQString bl=blockContent.capturedTexts()[1];
//kdDebug(13050)<<"block content line:"<<bl<<endl<<bl.length()<<" "<<bl.isEmpty()<<endl;
if (bl.isEmpty())
{
diff --git a/kate/part/kateluaindentscript.h b/kate/part/kateluaindentscript.h
index 4cccf85ba..a03a85574 100644
--- a/kate/part/kateluaindentscript.h
+++ b/kate/part/kateluaindentscript.h
@@ -23,24 +23,24 @@
#define _KATELUAINDENTSCRIPT_H_
#include "kateindentscriptabstracts.h"
-#include <qdict.h>
+#include <tqdict.h>
struct lua_State;
class KateLUAIndentScriptImpl: public KateIndentScriptImplAbstract {
public:
- KateLUAIndentScriptImpl(const QString& internalName,
- const QString &filePath, const QString &niceName,
- const QString &copyright, double version);
+ KateLUAIndentScriptImpl(const TQString& internalName,
+ const TQString &filePath, const TQString &niceName,
+ const TQString &copyright, double version);
~KateLUAIndentScriptImpl();
- virtual bool processChar( class Kate::View *view, QChar c, QString &errorMsg );
- virtual bool processLine( class Kate::View *view, const KateDocCursor &line, QString &errorMsg );
- virtual bool processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, QString &errorMsg );
+ virtual bool processChar( class Kate::View *view, TQChar c, TQString &errorMsg );
+ virtual bool processLine( class Kate::View *view, const KateDocCursor &line, TQString &errorMsg );
+ virtual bool processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, TQString &errorMsg );
protected:
virtual void decRef();
private:
- bool setupInterpreter(QString &errorMsg);
+ bool setupInterpreter(TQString &errorMsg);
void deleteInterpreter();
struct lua_State *m_interpreter;
};
@@ -51,16 +51,16 @@ class KateLUAIndentScriptManager: public KateIndentScriptManagerAbstract
public:
KateLUAIndentScriptManager ();
virtual ~KateLUAIndentScriptManager ();
- virtual KateIndentScript script(const QString &scriptname);
+ virtual KateIndentScript script(const TQString &scriptname);
private:
/**
* go, search our scripts
* @param force force cache updating?
*/
void collectScripts (bool force = false);
- void parseScriptHeader(const QString &filePath,
- QString *niceName,QString *copyright,double *version);
- QDict<KateLUAIndentScriptImpl> m_scripts;
+ void parseScriptHeader(const TQString &filePath,
+ TQString *niceName,TQString *copyright,double *version);
+ TQDict<KateLUAIndentScriptImpl> m_scripts;
};
#endif
diff --git a/kate/part/kateprinter.cpp b/kate/part/kateprinter.cpp
index 380c50216..e0dbdc728 100644
--- a/kate/part/kateprinter.cpp
+++ b/kate/part/kateprinter.cpp
@@ -40,19 +40,19 @@
#include <kurl.h>
#include <kuser.h> // for loginName
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qpaintdevicemetrics.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qstringlist.h>
-#include <qwhatsthis.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqstringlist.h>
+#include <tqwhatsthis.h>
//BEGIN KatePrinter
bool KatePrinter::print (KateDocument *doc)
@@ -75,8 +75,8 @@ bool KatePrinter::print (KateDocument *doc)
//renderer.config()->setSchema (1);
renderer.setPrinterFriendly(true);
- QPainter paint( &printer );
- QPaintDeviceMetrics pdm( &printer );
+ TQPainter paint( &printer );
+ TQPaintDeviceMetrics pdm( &printer );
/*
We work in tree cycles:
1) initialize variables and retrieve print settings
@@ -108,23 +108,23 @@ bool KatePrinter::print (KateDocument *doc)
uint lineNumberWidth( 0 );
// Header/Footer Page
- QFont headerFont; // used for header/footer
- QString f = printer.option("app-kate-hffont");
+ TQFont headerFont; // used for header/footer
+ TQString f = printer.option("app-kate-hffont");
if (!f.isEmpty())
headerFont.fromString( f );
bool useHeader = (printer.option("app-kate-useheader") == "true");
- QColor headerBgColor(printer.option("app-kate-headerbg"));
- QColor headerFgColor(printer.option("app-kate-headerfg"));
+ TQColor headerBgColor(printer.option("app-kate-headerbg"));
+ TQColor headerFgColor(printer.option("app-kate-headerfg"));
uint headerHeight( 0 ); // further init only if needed
- QStringList headerTagList; // do
+ TQStringList headerTagList; // do
bool headerDrawBg = false; // do
bool useFooter = (printer.option("app-kate-usefooter") == "true");
- QColor footerBgColor(printer.option("app-kate-footerbg"));
- QColor footerFgColor(printer.option("app-kate-footerfg"));
+ TQColor footerBgColor(printer.option("app-kate-footerbg"));
+ TQColor footerFgColor(printer.option("app-kate-footerfg"));
uint footerHeight( 0 ); // further init only if needed
- QStringList footerTagList = 0; // do
+ TQStringList footerTagList = 0; // do
bool footerDrawBg = 0; // do
// Layout Page
@@ -133,7 +133,7 @@ bool KatePrinter::print (KateDocument *doc)
bool useBackground = ( printer.option("app-kate-usebackground") == "true" );
bool useBox = (printer.option("app-kate-usebox") == "true");
int boxWidth(printer.option("app-kate-boxwidth").toInt());
- QColor boxColor(printer.option("app-kate-boxcolor"));
+ TQColor boxColor(printer.option("app-kate-boxcolor"));
int innerMargin = useBox ? printer.option("app-kate-boxmargin").toInt() : 6;
// Post initialization
@@ -167,7 +167,7 @@ bool KatePrinter::print (KateDocument *doc)
if ( printLineNumbers )
{
// figure out the horiizontal space required
- QString s( QString("%1 ").arg( doc->numLines() ) );
+ TQString s( TQString("%1 ").arg( doc->numLines() ) );
s.fill('5', -1); // some non-fixed fonts haven't equally wide numbers
// FIXME calculate which is actually the widest...
lineNumberWidth = renderer.currentFontMetrics()->width( s );
@@ -184,8 +184,8 @@ bool KatePrinter::print (KateDocument *doc)
// This retrieves all tags, ued or not, but
// none of theese operations should be expensive,
// and searcing each tag in the format strings is avoided.
- QDateTime dt = QDateTime::currentDateTime();
- QMap<QString,QString> tags;
+ TQDateTime dt = TQDateTime::currentDateTime();
+ TQMap<TQString,TQString> tags;
KUser u (KUser::UseRealUserID);
tags["u"] = u.loginName();
@@ -199,25 +199,25 @@ bool KatePrinter::print (KateDocument *doc)
tags["U"] = doc->url().prettyURL();
if ( selectionOnly )
{
- QString s( i18n("(Selection of) ") );
+ TQString s( i18n("(Selection of) ") );
tags["f"].prepend( s );
tags["U"].prepend( s );
}
- QRegExp reTags( "%([dDfUhuyY])" ); // TODO tjeck for "%%<TAG>"
+ TQRegExp reTags( "%([dDfUhuyY])" ); // TODO tjeck for "%%<TAG>"
if (useHeader)
{
headerDrawBg = ( printer.option("app-kate-headerusebg") == "true" );
- headerHeight = QFontMetrics( headerFont ).height();
+ headerHeight = TQFontMetrics( headerFont ).height();
if ( useBox || headerDrawBg )
headerHeight += innerMargin * 2;
else
- headerHeight += 1 + QFontMetrics( headerFont ).leading();
+ headerHeight += 1 + TQFontMetrics( headerFont ).leading();
- QString headerTags = printer.option("app-kate-headerformat");
+ TQString headerTags = printer.option("app-kate-headerformat");
int pos = reTags.search( headerTags );
- QString rep;
+ TQString rep;
while ( pos > -1 )
{
rep = tags[reTags.cap( 1 )];
@@ -225,7 +225,7 @@ bool KatePrinter::print (KateDocument *doc)
pos += rep.length();
pos = reTags.search( headerTags, pos );
}
- headerTagList = QStringList::split('|', headerTags, true);
+ headerTagList = TQStringList::split('|', headerTags, true);
if (!headerBgColor.isValid())
headerBgColor = Qt::lightGray;
@@ -236,15 +236,15 @@ bool KatePrinter::print (KateDocument *doc)
if (useFooter)
{
footerDrawBg = ( printer.option("app-kate-footerusebg") == "true" );
- footerHeight = QFontMetrics( headerFont ).height();
+ footerHeight = TQFontMetrics( headerFont ).height();
if ( useBox || footerDrawBg )
footerHeight += 2*innerMargin;
else
footerHeight += 1; // line only
- QString footerTags = printer.option("app-kate-footerformat");
+ TQString footerTags = printer.option("app-kate-footerformat");
int pos = reTags.search( footerTags );
- QString rep;
+ TQString rep;
while ( pos > -1 )
{
rep = tags[reTags.cap( 1 )];
@@ -253,7 +253,7 @@ bool KatePrinter::print (KateDocument *doc)
pos = reTags.search( footerTags, pos );
}
- footerTagList = QStringList::split('|', footerTags, true);
+ footerTagList = TQStringList::split('|', footerTags, true);
if (!footerBgColor.isValid())
footerBgColor = Qt::lightGray;
if (!footerFgColor.isValid())
@@ -306,19 +306,19 @@ bool KatePrinter::print (KateDocument *doc)
guideHeight = ( innerMargin * 4 ) + 1;
// get a title and add the height required to draw it
- QString _title = i18n("Typographical Conventions for %1").arg(doc->highlight()->name());
+ TQString _title = i18n("Typographical Conventions for %1").arg(doc->highlight()->name());
guideHeight += paint.boundingRect( 0, 0, _w, 1000, Qt::AlignTop|Qt::AlignHCenter, _title ).height();
// see how many columns we can fit in
int _widest( 0 );
- QPtrListIterator<KateHlItemData> it( ilist );
+ TQPtrListIterator<KateHlItemData> it( ilist );
KateHlItemData *_d;
int _items ( 0 );
while ( ( _d = it.current()) != 0 )
{
- _widest = kMax( _widest, ((QFontMetrics)(
+ _widest = kMax( _widest, ((TQFontMetrics)(
_d->bold() ?
_d->italic() ?
renderer.config()->fontStruct()->myFontMetricsBI :
@@ -375,12 +375,12 @@ bool KatePrinter::print (KateDocument *doc)
if ( _lt ) _pages++; // last page
// substitute both tag lists
- QString re("%P");
- QStringList::Iterator it;
+ TQString re("%P");
+ TQStringList::Iterator it;
for ( it=headerTagList.begin(); it!=headerTagList.end(); ++it )
- (*it).replace( re, QString( "%1" ).arg( _pages ) );
+ (*it).replace( re, TQString( "%1" ).arg( _pages ) );
for ( it=footerTagList.begin(); it!=footerTagList.end(); ++it )
- (*it).replace( re, QString( "%1" ).arg( _pages ) );
+ (*it).replace( re, TQString( "%1" ).arg( _pages ) );
}
} // end prepare block
@@ -421,11 +421,11 @@ bool KatePrinter::print (KateDocument *doc)
int align = valign|Qt::AlignLeft;
int marg = ( useBox || headerDrawBg ) ? innerMargin : 0;
if ( useBox ) marg += boxWidth;
- QString s;
+ TQString s;
for (int i=0; i<3; i++)
{
s = headerTagList[i];
- if (s.find("%p") != -1) s.replace("%p", QString::number(currentPage));
+ if (s.find("%p") != -1) s.replace("%p", TQString::number(currentPage));
paint.drawText(marg, 0, headerWidth-(marg*2), headerHeight, align, s);
align = valign|(i == 0 ? Qt::AlignHCenter : Qt::AlignRight);
}
@@ -449,11 +449,11 @@ bool KatePrinter::print (KateDocument *doc)
int align = Qt::AlignVCenter|Qt::AlignLeft;
int marg = ( useBox || footerDrawBg ) ? innerMargin : 0;
if ( useBox ) marg += boxWidth;
- QString s;
+ TQString s;
for (int i=0; i<3; i++)
{
s = footerTagList[i];
- if (s.find("%p") != -1) s.replace("%p", QString::number(currentPage));
+ if (s.find("%p") != -1) s.replace("%p", TQString::number(currentPage));
paint.drawText(marg, maxHeight+innerMargin, headerWidth-(marg*2), footerHeight, align, s);
align = Qt::AlignVCenter|(i == 0 ? Qt::AlignHCenter : Qt::AlignRight);
}
@@ -487,7 +487,7 @@ bool KatePrinter::print (KateDocument *doc)
if ( useBox )
{
- paint.setPen(QPen(boxColor, boxWidth));
+ paint.setPen(TQPen(boxColor, boxWidth));
paint.drawRect(0, 0, pdmWidth, pdm.height());
if (useHeader)
paint.drawLine(0, headerHeight, headerWidth, headerHeight);
@@ -522,7 +522,7 @@ bool KatePrinter::print (KateDocument *doc)
}
// draw a title string
paint.setFont( renderer.config()->fontStruct()->myFontBold );
- QRect _r;
+ TQRect _r;
paint.drawText( _marg, y, pdmWidth-(2*_marg), maxHeight - y,
Qt::AlignTop|Qt::AlignHCenter,
i18n("Typographical Conventions for %1").arg(doc->highlight()->name()), -1, &_r );
@@ -533,7 +533,7 @@ bool KatePrinter::print (KateDocument *doc)
y += 1 + innerMargin;
// draw attrib names using their styles
- QPtrListIterator<KateHlItemData> _it( ilist );
+ TQPtrListIterator<KateHlItemData> _it( ilist );
KateHlItemData *_d;
int _cw = _w/guideCols;
int _i(0);
@@ -561,7 +561,7 @@ bool KatePrinter::print (KateDocument *doc)
paint.setPen( renderer.config()->lineNumberColor() );
paint.drawText( (( useBox || useBackground ) ? innerMargin : 0), y,
lineNumberWidth, renderer.fontHeight(),
- Qt::AlignRight, QString("%1").arg( lineCount + 1 ) );
+ Qt::AlignRight, TQString("%1").arg( lineCount + 1 ) );
}
endCol = renderer.textWidth(doc->kateTextLine(lineCount), startCol, maxWidth, &needWrap);
@@ -633,21 +633,21 @@ bool KatePrinter::print (KateDocument *doc)
#ifndef Q_WS_WIN //TODO: reenable
//BEGIN KatePrintTextSettings
-KatePrintTextSettings::KatePrintTextSettings( KPrinter * /*printer*/, QWidget *parent, const char *name )
+KatePrintTextSettings::KatePrintTextSettings( KPrinter * /*printer*/, TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
setTitle( i18n("Te&xt Settings") );
- QVBoxLayout *lo = new QVBoxLayout ( this );
+ TQVBoxLayout *lo = new TQVBoxLayout ( this );
lo->setSpacing( KDialog::spacingHint() );
- cbSelection = new QCheckBox( i18n("Print &selected text only"), this );
+ cbSelection = new TQCheckBox( i18n("Print &selected text only"), this );
lo->addWidget( cbSelection );
- cbLineNumbers = new QCheckBox( i18n("Print &line numbers"), this );
+ cbLineNumbers = new TQCheckBox( i18n("Print &line numbers"), this );
lo->addWidget( cbLineNumbers );
- cbGuide = new QCheckBox( i18n("Print syntax &guide"), this );
+ cbGuide = new TQCheckBox( i18n("Print syntax &guide"), this );
lo->addWidget( cbGuide );
lo->addStretch( 1 );
@@ -655,26 +655,26 @@ KatePrintTextSettings::KatePrintTextSettings( KPrinter * /*printer*/, QWidget *p
// set defaults - nothing to do :-)
// whatsthis
- QWhatsThis::add( cbSelection, i18n(
+ TQWhatsThis::add( cbSelection, i18n(
"<p>This option is only available if some text is selected in the document.</p>"
"<p>If available and enabled, only the selected text is printed.</p>") );
- QWhatsThis::add( cbLineNumbers, i18n(
+ TQWhatsThis::add( cbLineNumbers, i18n(
"<p>If enabled, line numbers will be printed on the left side of the page(s).</p>") );
- QWhatsThis::add( cbGuide, i18n(
+ TQWhatsThis::add( cbGuide, i18n(
"<p>Print a box displaying typographical conventions for the document type, as "
"defined by the syntax highlighting being used.") );
}
-void KatePrintTextSettings::getOptions( QMap<QString,QString>& opts, bool )
+void KatePrintTextSettings::getOptions( TQMap<TQString,TQString>& opts, bool )
{
opts["app-kate-printselection"] = cbSelection->isChecked() ? "true" : "false";
opts["app-kate-printlinenumbers"] = cbLineNumbers->isChecked() ? "true" : "false";
opts["app-kate-printguide"] = cbGuide->isChecked() ? "true" : "false" ;
}
-void KatePrintTextSettings::setOptions( const QMap<QString,QString>& opts )
+void KatePrintTextSettings::setOptions( const TQMap<TQString,TQString>& opts )
{
- QString v;
+ TQString v;
v = opts["app-kate-printselection"];
if ( ! v.isEmpty() )
cbSelection->setChecked( v == "true" );
@@ -694,99 +694,99 @@ void KatePrintTextSettings::enableSelection( bool enable )
//END KatePrintTextSettings
//BEGIN KatePrintHeaderFooter
-KatePrintHeaderFooter::KatePrintHeaderFooter( KPrinter * /*printer*/, QWidget *parent, const char *name )
+KatePrintHeaderFooter::KatePrintHeaderFooter( KPrinter * /*printer*/, TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
setTitle( i18n("Hea&der && Footer") );
- QVBoxLayout *lo = new QVBoxLayout ( this );
+ TQVBoxLayout *lo = new TQVBoxLayout ( this );
uint sp = KDialog::spacingHint();
lo->setSpacing( sp );
// enable
- QHBoxLayout *lo1 = new QHBoxLayout ( lo );
- cbEnableHeader = new QCheckBox( i18n("Pr&int header"), this );
+ TQHBoxLayout *lo1 = new TQHBoxLayout ( lo );
+ cbEnableHeader = new TQCheckBox( i18n("Pr&int header"), this );
lo1->addWidget( cbEnableHeader );
- cbEnableFooter = new QCheckBox( i18n("Pri&nt footer"), this );
+ cbEnableFooter = new TQCheckBox( i18n("Pri&nt footer"), this );
lo1->addWidget( cbEnableFooter );
// font
- QHBoxLayout *lo2 = new QHBoxLayout( lo );
- lo2->addWidget( new QLabel( i18n("Header/footer font:"), this ) );
- lFontPreview = new QLabel( this );
- lFontPreview->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ TQHBoxLayout *lo2 = new TQHBoxLayout( lo );
+ lo2->addWidget( new TQLabel( i18n("Header/footer font:"), this ) );
+ lFontPreview = new TQLabel( this );
+ lFontPreview->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
lo2->addWidget( lFontPreview );
lo2->setStretchFactor( lFontPreview, 1 );
- QPushButton *btnChooseFont = new QPushButton( i18n("Choo&se Font..."), this );
+ TQPushButton *btnChooseFont = new TQPushButton( i18n("Choo&se Font..."), this );
lo2->addWidget( btnChooseFont );
- connect( btnChooseFont, SIGNAL(clicked()), this, SLOT(setHFFont()) );
+ connect( btnChooseFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(setHFFont()) );
// header
- gbHeader = new QGroupBox( 2, Qt::Horizontal, i18n("Header Properties"), this );
+ gbHeader = new TQGroupBox( 2, Qt::Horizontal, i18n("Header Properties"), this );
lo->addWidget( gbHeader );
- QLabel *lHeaderFormat = new QLabel( i18n("&Format:"), gbHeader );
- QHBox *hbHeaderFormat = new QHBox( gbHeader );
+ TQLabel *lHeaderFormat = new TQLabel( i18n("&Format:"), gbHeader );
+ TQHBox *hbHeaderFormat = new TQHBox( gbHeader );
hbHeaderFormat->setSpacing( sp );
- leHeaderLeft = new QLineEdit( hbHeaderFormat );
- leHeaderCenter = new QLineEdit( hbHeaderFormat );
- leHeaderRight = new QLineEdit( hbHeaderFormat );
+ leHeaderLeft = new TQLineEdit( hbHeaderFormat );
+ leHeaderCenter = new TQLineEdit( hbHeaderFormat );
+ leHeaderRight = new TQLineEdit( hbHeaderFormat );
lHeaderFormat->setBuddy( leHeaderLeft );
- new QLabel( i18n("Colors:"), gbHeader );
- QHBox *hbHeaderColors = new QHBox( gbHeader );
+ new TQLabel( i18n("Colors:"), gbHeader );
+ TQHBox *hbHeaderColors = new TQHBox( gbHeader );
hbHeaderColors->setSpacing( sp );
- QLabel *lHeaderFgCol = new QLabel( i18n("Foreground:"), hbHeaderColors );
+ TQLabel *lHeaderFgCol = new TQLabel( i18n("Foreground:"), hbHeaderColors );
kcbtnHeaderFg = new KColorButton( hbHeaderColors );
lHeaderFgCol->setBuddy( kcbtnHeaderFg );
- cbHeaderEnableBgColor = new QCheckBox( i18n("Bac&kground"), hbHeaderColors );
+ cbHeaderEnableBgColor = new TQCheckBox( i18n("Bac&kground"), hbHeaderColors );
kcbtnHeaderBg = new KColorButton( hbHeaderColors );
- gbFooter = new QGroupBox( 2, Qt::Horizontal, i18n("Footer Properties"), this );
+ gbFooter = new TQGroupBox( 2, Qt::Horizontal, i18n("Footer Properties"), this );
lo->addWidget( gbFooter );
// footer
- QLabel *lFooterFormat = new QLabel( i18n("For&mat:"), gbFooter );
- QHBox *hbFooterFormat = new QHBox( gbFooter );
+ TQLabel *lFooterFormat = new TQLabel( i18n("For&mat:"), gbFooter );
+ TQHBox *hbFooterFormat = new TQHBox( gbFooter );
hbFooterFormat->setSpacing( sp );
- leFooterLeft = new QLineEdit( hbFooterFormat );
- leFooterCenter = new QLineEdit( hbFooterFormat );
- leFooterRight = new QLineEdit( hbFooterFormat );
+ leFooterLeft = new TQLineEdit( hbFooterFormat );
+ leFooterCenter = new TQLineEdit( hbFooterFormat );
+ leFooterRight = new TQLineEdit( hbFooterFormat );
lFooterFormat->setBuddy( leFooterLeft );
- new QLabel( i18n("Colors:"), gbFooter );
- QHBox *hbFooterColors = new QHBox( gbFooter );
+ new TQLabel( i18n("Colors:"), gbFooter );
+ TQHBox *hbFooterColors = new TQHBox( gbFooter );
hbFooterColors->setSpacing( sp );
- QLabel *lFooterBgCol = new QLabel( i18n("Foreground:"), hbFooterColors );
+ TQLabel *lFooterBgCol = new TQLabel( i18n("Foreground:"), hbFooterColors );
kcbtnFooterFg = new KColorButton( hbFooterColors );
lFooterBgCol->setBuddy( kcbtnFooterFg );
- cbFooterEnableBgColor = new QCheckBox( i18n("&Background"), hbFooterColors );
+ cbFooterEnableBgColor = new TQCheckBox( i18n("&Background"), hbFooterColors );
kcbtnFooterBg = new KColorButton( hbFooterColors );
lo->addStretch( 1 );
// user friendly
- connect( cbEnableHeader, SIGNAL(toggled(bool)), gbHeader, SLOT(setEnabled(bool)) );
- connect( cbEnableFooter, SIGNAL(toggled(bool)), gbFooter, SLOT(setEnabled(bool)) );
- connect( cbHeaderEnableBgColor, SIGNAL(toggled(bool)), kcbtnHeaderBg, SLOT(setEnabled(bool)) );
- connect( cbFooterEnableBgColor, SIGNAL(toggled(bool)), kcbtnFooterBg, SLOT(setEnabled(bool)) );
+ connect( cbEnableHeader, TQT_SIGNAL(toggled(bool)), gbHeader, TQT_SLOT(setEnabled(bool)) );
+ connect( cbEnableFooter, TQT_SIGNAL(toggled(bool)), gbFooter, TQT_SLOT(setEnabled(bool)) );
+ connect( cbHeaderEnableBgColor, TQT_SIGNAL(toggled(bool)), kcbtnHeaderBg, TQT_SLOT(setEnabled(bool)) );
+ connect( cbFooterEnableBgColor, TQT_SIGNAL(toggled(bool)), kcbtnFooterBg, TQT_SLOT(setEnabled(bool)) );
// set defaults
cbEnableHeader->setChecked( true );
leHeaderLeft->setText( "%y" );
leHeaderCenter->setText( "%f" );
leHeaderRight->setText( "%p" );
- kcbtnHeaderFg->setColor( QColor("black") );
+ kcbtnHeaderFg->setColor( TQColor("black") );
cbHeaderEnableBgColor->setChecked( true );
- kcbtnHeaderBg->setColor( QColor("lightgrey") );
+ kcbtnHeaderBg->setColor( TQColor("lightgrey") );
cbEnableFooter->setChecked( true );
leFooterRight->setText( "%U" );
- kcbtnFooterFg->setColor( QColor("black") );
+ kcbtnFooterFg->setColor( TQColor("black") );
cbFooterEnableBgColor->setChecked( true );
- kcbtnFooterBg->setColor( QColor("lightgrey") );
+ kcbtnFooterBg->setColor( TQColor("lightgrey") );
// whatsthis
- QString s = i18n("<p>Format of the page header. The following tags are supported:</p>");
- QString s1 = i18n(
+ TQString s = i18n("<p>Format of the page header. The following tags are supported:</p>");
+ TQString s1 = i18n(
"<ul><li><tt>%u</tt>: current user name</li>"
"<li><tt>%d</tt>: complete date/time in short format</li>"
"<li><tt>%D</tt>: complete date/time in long format</li>"
@@ -798,18 +798,18 @@ KatePrintHeaderFooter::KatePrintHeaderFooter( KPrinter * /*printer*/, QWidget *p
"<li><tt>%p</tt>: page number</li>"
"</ul><br>"
"<u>Note:</u> Do <b>not</b> use the '|' (vertical bar) character.");
- QWhatsThis::add(leHeaderRight, s + s1 );
- QWhatsThis::add(leHeaderCenter, s + s1 );
- QWhatsThis::add(leHeaderLeft, s + s1 );
+ TQWhatsThis::add(leHeaderRight, s + s1 );
+ TQWhatsThis::add(leHeaderCenter, s + s1 );
+ TQWhatsThis::add(leHeaderLeft, s + s1 );
s = i18n("<p>Format of the page footer. The following tags are supported:</p>");
- QWhatsThis::add(leFooterRight, s + s1 );
- QWhatsThis::add(leFooterCenter, s + s1 );
- QWhatsThis::add(leFooterLeft, s + s1 );
+ TQWhatsThis::add(leFooterRight, s + s1 );
+ TQWhatsThis::add(leFooterCenter, s + s1 );
+ TQWhatsThis::add(leFooterLeft, s + s1 );
}
-void KatePrintHeaderFooter::getOptions(QMap<QString,QString>& opts, bool )
+void KatePrintHeaderFooter::getOptions(TQMap<TQString,TQString>& opts, bool )
{
opts["app-kate-hffont"] = strFont;
@@ -826,12 +826,12 @@ void KatePrintHeaderFooter::getOptions(QMap<QString,QString>& opts, bool )
opts["app-kate-footerformat"] = leFooterLeft->text() + "|" + leFooterCenter->text() + "|" + leFooterRight->text();
}
-void KatePrintHeaderFooter::setOptions( const QMap<QString,QString>& opts )
+void KatePrintHeaderFooter::setOptions( const TQMap<TQString,TQString>& opts )
{
- QString v;
+ TQString v;
v = opts["app-kate-hffont"];
strFont = v;
- QFont f = font();
+ TQFont f = font();
if ( ! v.isEmpty() )
{
if (!strFont.isEmpty())
@@ -846,15 +846,15 @@ void KatePrintHeaderFooter::setOptions( const QMap<QString,QString>& opts )
cbEnableHeader->setChecked( v == "true" );
v = opts["app-kate-headerfg"];
if ( ! v.isEmpty() )
- kcbtnHeaderFg->setColor( QColor( v ) );
+ kcbtnHeaderFg->setColor( TQColor( v ) );
v = opts["app-kate-headerusebg"];
if ( ! v.isEmpty() )
cbHeaderEnableBgColor->setChecked( v == "true" );
v = opts["app-kate-headerbg"];
if ( ! v.isEmpty() )
- kcbtnHeaderBg->setColor( QColor( v ) );
+ kcbtnHeaderBg->setColor( TQColor( v ) );
- QStringList tags = QStringList::split('|', opts["app-kate-headerformat"], "true");
+ TQStringList tags = TQStringList::split('|', opts["app-kate-headerformat"], "true");
if (tags.count() == 3)
{
leHeaderLeft->setText(tags[0]);
@@ -867,15 +867,15 @@ void KatePrintHeaderFooter::setOptions( const QMap<QString,QString>& opts )
cbEnableFooter->setChecked( v == "true" );
v = opts["app-kate-footerfg"];
if ( ! v.isEmpty() )
- kcbtnFooterFg->setColor( QColor( v ) );
+ kcbtnFooterFg->setColor( TQColor( v ) );
v = opts["app-kate-footerusebg"];
if ( ! v.isEmpty() )
cbFooterEnableBgColor->setChecked( v == "true" );
v = opts["app-kate-footerbg"];
if ( ! v.isEmpty() )
- kcbtnFooterBg->setColor( QColor( v ) );
+ kcbtnFooterBg->setColor( TQColor( v ) );
- tags = QStringList::split('|', opts["app-kate-footerformat"], "true");
+ tags = TQStringList::split('|', opts["app-kate-footerformat"], "true");
if (tags.count() == 3)
{
leFooterLeft->setText(tags[0]);
@@ -886,7 +886,7 @@ void KatePrintHeaderFooter::setOptions( const QMap<QString,QString>& opts )
void KatePrintHeaderFooter::setHFFont()
{
- QFont fnt( lFontPreview->font() );
+ TQFont fnt( lFontPreview->font() );
// display a font dialog
if ( KFontDialog::getFont( fnt, false, this ) == KFontDialog::Accepted )
{
@@ -902,42 +902,42 @@ void KatePrintHeaderFooter::setHFFont()
//BEGIN KatePrintLayout
-KatePrintLayout::KatePrintLayout( KPrinter * /*printer*/, QWidget *parent, const char *name )
+KatePrintLayout::KatePrintLayout( KPrinter * /*printer*/, TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
setTitle( i18n("L&ayout") );
- QVBoxLayout *lo = new QVBoxLayout ( this );
+ TQVBoxLayout *lo = new TQVBoxLayout ( this );
lo->setSpacing( KDialog::spacingHint() );
- QHBox *hb = new QHBox( this );
+ TQHBox *hb = new TQHBox( this );
lo->addWidget( hb );
- QLabel *lSchema = new QLabel( i18n("&Schema:"), hb );
- cmbSchema = new QComboBox( false, hb );
+ TQLabel *lSchema = new TQLabel( i18n("&Schema:"), hb );
+ cmbSchema = new TQComboBox( false, hb );
lSchema->setBuddy( cmbSchema );
- cbDrawBackground = new QCheckBox( i18n("Draw bac&kground color"), this );
+ cbDrawBackground = new TQCheckBox( i18n("Draw bac&kground color"), this );
lo->addWidget( cbDrawBackground );
- cbEnableBox = new QCheckBox( i18n("Draw &boxes"), this );
+ cbEnableBox = new TQCheckBox( i18n("Draw &boxes"), this );
lo->addWidget( cbEnableBox );
- gbBoxProps = new QGroupBox( 2, Qt::Horizontal, i18n("Box Properties"), this );
+ gbBoxProps = new TQGroupBox( 2, Qt::Horizontal, i18n("Box Properties"), this );
lo->addWidget( gbBoxProps );
- QLabel *lBoxWidth = new QLabel( i18n("W&idth:"), gbBoxProps );
- sbBoxWidth = new QSpinBox( 1, 100, 1, gbBoxProps );
+ TQLabel *lBoxWidth = new TQLabel( i18n("W&idth:"), gbBoxProps );
+ sbBoxWidth = new TQSpinBox( 1, 100, 1, gbBoxProps );
lBoxWidth->setBuddy( sbBoxWidth );
- QLabel *lBoxMargin = new QLabel( i18n("&Margin:"), gbBoxProps );
- sbBoxMargin = new QSpinBox( 0, 100, 1, gbBoxProps );
+ TQLabel *lBoxMargin = new TQLabel( i18n("&Margin:"), gbBoxProps );
+ sbBoxMargin = new TQSpinBox( 0, 100, 1, gbBoxProps );
lBoxMargin->setBuddy( sbBoxMargin );
- QLabel *lBoxColor = new QLabel( i18n("Co&lor:"), gbBoxProps );
+ TQLabel *lBoxColor = new TQLabel( i18n("Co&lor:"), gbBoxProps );
kcbtnBoxColor = new KColorButton( gbBoxProps );
lBoxColor->setBuddy( kcbtnBoxColor );
- connect( cbEnableBox, SIGNAL(toggled(bool)), gbBoxProps, SLOT(setEnabled(bool)) );
+ connect( cbEnableBox, TQT_SIGNAL(toggled(bool)), gbBoxProps, TQT_SLOT(setEnabled(bool)) );
lo->addStretch( 1 );
// set defaults:
@@ -948,24 +948,24 @@ KatePrintLayout::KatePrintLayout( KPrinter * /*printer*/, QWidget *parent, const
// whatsthis
// FIXME uncomment when string freeze is over
-// QWhatsThis::add ( cmbSchema, i18n(
+// TQWhatsThis::add ( cmbSchema, i18n(
// "Select the color scheme to use for the print." ) );
- QWhatsThis::add( cbDrawBackground, i18n(
+ TQWhatsThis::add( cbDrawBackground, i18n(
"<p>If enabled, the background color of the editor will be used.</p>"
"<p>This may be useful if your color scheme is designed for a dark background.</p>") );
- QWhatsThis::add( cbEnableBox, i18n(
+ TQWhatsThis::add( cbEnableBox, i18n(
"<p>If enabled, a box as defined in the properties below will be drawn "
"around the contents of each page. The Header and Footer will be separated "
"from the contents with a line as well.</p>") );
- QWhatsThis::add( sbBoxWidth, i18n(
+ TQWhatsThis::add( sbBoxWidth, i18n(
"The width of the box outline" ) );
- QWhatsThis::add( sbBoxMargin, i18n(
+ TQWhatsThis::add( sbBoxMargin, i18n(
"The margin inside boxes, in pixels") );
- QWhatsThis::add( kcbtnBoxColor, i18n(
+ TQWhatsThis::add( kcbtnBoxColor, i18n(
"The line color to use for boxes") );
}
-void KatePrintLayout::getOptions(QMap<QString,QString>& opts, bool )
+void KatePrintLayout::getOptions(TQMap<TQString,TQString>& opts, bool )
{
opts["app-kate-colorscheme"] = cmbSchema->currentText();
opts["app-kate-usebackground"] = cbDrawBackground->isChecked() ? "true" : "false";
@@ -975,9 +975,9 @@ void KatePrintLayout::getOptions(QMap<QString,QString>& opts, bool )
opts["app-kate-boxcolor"] = kcbtnBoxColor->color().name();
}
-void KatePrintLayout::setOptions( const QMap<QString,QString>& opts )
+void KatePrintLayout::setOptions( const TQMap<TQString,TQString>& opts )
{
- QString v;
+ TQString v;
v = opts["app-kate-colorscheme"];
if ( ! v.isEmpty() )
cmbSchema->setCurrentItem( KateFactory::self()->schemaManager()->number( v ) );
@@ -995,7 +995,7 @@ void KatePrintLayout::setOptions( const QMap<QString,QString>& opts )
sbBoxMargin->setValue( v.toInt() );
v = opts["app-kate-boxcolor"];
if ( ! v.isEmpty() )
- kcbtnBoxColor->setColor( QColor( v ) );
+ kcbtnBoxColor->setColor( TQColor( v ) );
}
//END KatePrintLayout
diff --git a/kate/part/kateprinter.h b/kate/part/kateprinter.h
index f2fb0bc87..3f93b96ca 100644
--- a/kate/part/kateprinter.h
+++ b/kate/part/kateprinter.h
@@ -52,17 +52,17 @@ class KatePrintTextSettings : public KPrintDialogPage
{
Q_OBJECT
public:
- KatePrintTextSettings( KPrinter *printer, QWidget *parent=0, const char *name=0 );
+ KatePrintTextSettings( KPrinter *printer, TQWidget *parent=0, const char *name=0 );
~KatePrintTextSettings(){};
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
/* call if view has a selection, enables the seelction checkbox according to the arg */
void enableSelection( bool );
private:
- QCheckBox *cbSelection, *cbLineNumbers, *cbGuide;
+ TQCheckBox *cbSelection, *cbLineNumbers, *cbGuide;
};
//END Text Settings
@@ -79,26 +79,26 @@ class KatePrintHeaderFooter : public KPrintDialogPage
{
Q_OBJECT
public:
- KatePrintHeaderFooter( KPrinter *printer, QWidget *parent=0, const char *name=0 );
+ KatePrintHeaderFooter( KPrinter *printer, TQWidget *parent=0, const char *name=0 );
~KatePrintHeaderFooter(){};
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
public slots:
void setHFFont();
private:
- QCheckBox *cbEnableHeader, *cbEnableFooter;
- QLabel *lFontPreview;
- QString strFont;
- QGroupBox *gbHeader, *gbFooter;
- QLineEdit *leHeaderLeft, *leHeaderCenter, *leHeaderRight;
+ TQCheckBox *cbEnableHeader, *cbEnableFooter;
+ TQLabel *lFontPreview;
+ TQString strFont;
+ TQGroupBox *gbHeader, *gbFooter;
+ TQLineEdit *leHeaderLeft, *leHeaderCenter, *leHeaderRight;
KColorButton *kcbtnHeaderFg, *kcbtnHeaderBg;
- QCheckBox *cbHeaderEnableBgColor;
- QLineEdit *leFooterLeft, *leFooterCenter, *leFooterRight;
+ TQCheckBox *cbHeaderEnableBgColor;
+ TQLineEdit *leFooterLeft, *leFooterCenter, *leFooterRight;
KColorButton *kcbtnFooterFg, *kcbtnFooterBg;
- QCheckBox *cbFooterEnableBgColor;
+ TQCheckBox *cbFooterEnableBgColor;
};
//END Header/Footer
@@ -117,17 +117,17 @@ class KatePrintLayout : public KPrintDialogPage
{
Q_OBJECT
public:
- KatePrintLayout( KPrinter *printer, QWidget *parent=0, const char *name=0 );
+ KatePrintLayout( KPrinter *printer, TQWidget *parent=0, const char *name=0 );
~KatePrintLayout(){};
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
private:
- QComboBox *cmbSchema;
- QCheckBox *cbEnableBox, *cbDrawBackground;
- QGroupBox *gbBoxProps;
- QSpinBox *sbBoxWidth, *sbBoxMargin;
+ TQComboBox *cmbSchema;
+ TQCheckBox *cbEnableBox, *cbDrawBackground;
+ TQGroupBox *gbBoxProps;
+ TQSpinBox *sbBoxWidth, *sbBoxMargin;
KColorButton* kcbtnBoxColor;
};
//END Layout
diff --git a/kate/part/katerenderer.cpp b/kate/part/katerenderer.cpp
index 60851481d..265a98282 100644
--- a/kate/part/katerenderer.cpp
+++ b/kate/part/katerenderer.cpp
@@ -31,8 +31,8 @@
#include <kdebug.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
KateRenderer::KateRenderer(KateDocument* doc, KateView *view)
: m_doc(doc), m_view (view), m_caretStyle(KateRenderer::Insert)
@@ -120,7 +120,7 @@ void KateRenderer::setShowSelections(bool showSelections)
void KateRenderer::increaseFontSizes()
{
- QFont f ( *config()->font () );
+ TQFont f ( *config()->font () );
f.setPointSize (f.pointSize ()+1);
config()->setFont (f);
@@ -128,7 +128,7 @@ void KateRenderer::increaseFontSizes()
void KateRenderer::decreaseFontSizes()
{
- QFont f ( *config()->font () );
+ TQFont f ( *config()->font () );
if ((f.pointSize ()-1) > 0)
f.setPointSize (f.pointSize ()-1);
@@ -149,7 +149,7 @@ void KateRenderer::setPrinterFriendly(bool printerFriendly)
setDrawCaret(false);
}
-bool KateRenderer::paintTextLineBackground(QPainter& paint, int line, bool isCurrentLine, int xStart, int xEnd)
+bool KateRenderer::paintTextLineBackground(TQPainter& paint, int line, bool isCurrentLine, int xStart, int xEnd)
{
if (isPrinterFriendly())
return false;
@@ -158,7 +158,7 @@ bool KateRenderer::paintTextLineBackground(QPainter& paint, int line, bool isCur
KateFontStruct *fs = config()->fontStruct();
// Normal background color
- QColor backgroundColor( config()->backgroundColor() );
+ TQColor backgroundColor( config()->backgroundColor() );
bool selectionPainted = false;
if (showSelections() && m_view->lineSelected(line))
@@ -184,7 +184,7 @@ bool KateRenderer::paintTextLineBackground(QPainter& paint, int line, bool isCur
KTextEditor::MarkInterface::MarkTypes markType = (KTextEditor::MarkInterface::MarkTypes)(1<<bit);
if (mrk & markType)
{
- QColor markColor = config()->lineMarkerColor(markType);
+ TQColor markColor = config()->lineMarkerColor(markType);
if (markColor.isValid()) {
markCount++;
@@ -214,9 +214,9 @@ bool KateRenderer::paintTextLineBackground(QPainter& paint, int line, bool isCur
return selectionPainted;
}
-void KateRenderer::paintWhitespaceMarker(QPainter &paint, uint x, uint y)
+void KateRenderer::paintWhitespaceMarker(TQPainter &paint, uint x, uint y)
{
- QPen penBackup( paint.pen() );
+ TQPen penBackup( paint.pen() );
paint.setPen( config()->tabMarkerColor() );
paint.drawPoint(x, y);
paint.drawPoint(x + 1, y);
@@ -225,9 +225,9 @@ void KateRenderer::paintWhitespaceMarker(QPainter &paint, uint x, uint y)
}
-void KateRenderer::paintIndentMarker(QPainter &paint, uint x, uint row)
+void KateRenderer::paintIndentMarker(TQPainter &paint, uint x, uint row)
{
- QPen penBackup( paint.pen() );
+ TQPen penBackup( paint.pen() );
paint.setPen( config()->tabMarkerColor() );
const int top = paint.window().top();
@@ -250,7 +250,7 @@ void KateRenderer::paintIndentMarker(QPainter &paint, uint x, uint row)
}
-void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, int xStart, int xEnd, const KateTextCursor* cursor, const KateBracketRange* bracketmark)
+void KateRenderer::paintTextLine(TQPainter& paint, const KateLineRange* range, int xStart, int xEnd, const KateTextCursor* cursor, const KateBracketRange* bracketmark)
{
int line = range->line;
@@ -341,7 +341,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
// text attribs font/style data
KateAttribute* attr = m_doc->highlight()->attributes(m_schema)->data();
- const QColor *cursorColor = &attr[0].textColor();
+ const TQColor *cursorColor = &attr[0].textColor();
// Start arbitrary highlighting
KateTextCursor currentPos(line, startcol);
@@ -352,7 +352,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
// Draws the dashed underline at the start of a folded block of text.
if (range->startsInvisibleBlock) {
- paint.setPen(QPen(config()->wordWrapMarkerColor(), 1, Qt::DashLine));
+ paint.setPen(TQPen(config()->wordWrapMarkerColor(), 1, Qt::DashLine));
paint.drawLine(0, fs->fontHeight - 1, xEnd - xStart, fs->fontHeight - 1);
}
@@ -360,7 +360,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
if (range->xOffset() && range->xOffset() > xStart)
{
paint.fillRect(0, 0, range->xOffset() - xStart, fs->fontHeight,
- QBrush(config()->wordWrapMarkerColor(), QBrush::DiagCrossPattern));
+ TQBrush(config()->wordWrapMarkerColor(), TQBrush::DiagCrossPattern));
}
// painting loop
@@ -373,7 +373,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
if (showCursor && (cursor->col() >= int(startcol)))
{
cursorVisible = true;
- cursorXPos = xPos + cursor->col() * fs->myFontMetrics.width(QChar(' '));
+ cursorXPos = xPos + cursor->col() * fs->myFontMetrics.width(TQChar(' '));
}
}
else
@@ -385,8 +385,8 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
KateAttribute customHL;
- const QColor *curColor = 0;
- const QColor *oldColor = 0;
+ const TQColor *curColor = 0;
+ const TQColor *oldColor = 0;
KateAttribute* oldAt = &attr[0];
@@ -414,7 +414,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
const uint lastIndentColumn = textLine->firstChar();
// Could be precomputed.
- const uint spaceWidth = fs->width (QChar(' '), false, false, m_tabWidth);
+ const uint spaceWidth = fs->width (TQChar(' '), false, false, m_tabWidth);
// Get current x position.
int curPos = textLine->cursorX(curCol, m_tabWidth);
@@ -425,17 +425,17 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
// ### if uncommented, causes an O(n^2) behaviour
//Q_ASSERT(curPos == textLine->cursorX(curCol, m_tabWidth));
- QChar curChar = textLine->string()[curCol];
+ TQChar curChar = textLine->string()[curCol];
// Decide if this character is a tab - we treat the spacing differently
// TODO: move tab width calculation elsewhere?
- bool isTab = curChar == QChar('\t');
+ bool isTab = curChar == TQChar('\t');
// Determine current syntax highlighting attribute
// A bit legacy but doesn't need to change
KateAttribute* curAt = (noAttribs || ((*textAttributes) >= atLen)) ? &attr[0] : &attr[*textAttributes];
// X position calculation. Incorrect for fonts with non-zero leftBearing() and rightBearing() results.
- // TODO: make internal charWidth() function, use QFontMetrics::charWidth().
+ // TODO: make internal charWidth() function, use TQFontMetrics::charWidth().
xPosAfter += curAt->width(*fs, curChar, m_tabWidth);
// Tab special treatment, move to charWidth().
@@ -514,7 +514,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
// the next char is a tab (removed the "and this isn't" because that's dealt with above)
// i.e. we have to draw the current text so the tab can be rendered as above.
- || (textLine->string()[nextCol] == QChar('\t'))
+ || (textLine->string()[nextCol] == TQChar('\t'))
// input method edit area
|| ( m_view && (isIMEdit != m_view->isIMEdit( line, nextCol )) )
@@ -532,21 +532,21 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
{
bool paintBackground = true;
uint width = xPosAfter - oldXPos;
- QColor fillColor;
+ TQColor fillColor;
if (isIMSel && !isTab)
{
// input method selection
- fillColor = m_view->colorGroup().color(QColorGroup::Foreground);
+ fillColor = m_view->colorGroup().color(TQColorGroup::Foreground);
}
else if (isIMEdit && !isTab)
{
// XIM support
// input method edit area
- const QColorGroup& cg = m_view->colorGroup();
+ const TQColorGroup& cg = m_view->colorGroup();
int h1, s1, v1, h2, s2, v2;
- cg.color( QColorGroup::Base ).hsv( &h1, &s1, &v1 );
- cg.color( QColorGroup::Background ).hsv( &h2, &s2, &v2 );
+ cg.color( TQColorGroup::Base ).hsv( &h1, &s1, &v1 );
+ cg.color( TQColorGroup::Background ).hsv( &h2, &s2, &v2 );
fillColor.setHsv( h1, s1, ( v1 + v2 ) / 2 );
}
else if (!selectionPainted && (isSel || currentHL.itemSet(KateAttribute::BGColor)))
@@ -576,7 +576,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
if (isIMSel && paintBackground && !isTab)
{
paint.save();
- paint.setPen( m_view->colorGroup().color( QColorGroup::BrightText ) );
+ paint.setPen( m_view->colorGroup().color( TQColorGroup::BrightText ) );
}
// Draw indentation markers.
@@ -612,11 +612,11 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
if (isTab || (curCol >= trailingWhitespaceColumn))
{
// Draw spaces too, because it might be eg. underlined
- static QString spaces;
+ static TQString spaces;
if (int(spaces.length()) != m_tabWidth)
spaces.fill(' ', m_tabWidth);
- paint.drawText(oldXPos-xStart, y, isTab ? spaces : QString(" "));
+ paint.drawText(oldXPos-xStart, y, isTab ? spaces : TQString(" "));
if (showTabs())
{
@@ -636,7 +636,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
// Draw preedit's underline
if (isIMEdit) {
- QRect r( oldXPos - xStart, 0, xPosAfter - oldXPos, fs->fontHeight );
+ TQRect r( oldXPos - xStart, 0, xPosAfter - oldXPos, fs->fontHeight );
paint.drawLine( r.bottomLeft(), r.bottomRight() );
}
@@ -707,7 +707,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
if (showCursor && (cursor->col() >= int(curCol)))
{
cursorVisible = true;
- cursorXPos = xPos + (cursor->col() - int(curCol)) * fs->myFontMetrics.width(QChar(' '));
+ cursorXPos = xPos + (cursor->col() - int(curCol)) * fs->myFontMetrics.width(TQChar(' '));
cursorMaxWidth = xPosAfter - xPos;
cursorColor = &oldAt->textColor();
}
@@ -745,8 +745,8 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, int cursorCol)
KateFontStruct *fs = config()->fontStruct();
- const QChar *unicode = textLine->text();
- const QString &textString = textLine->string();
+ const TQChar *unicode = textLine->text();
+ const TQString &textString = textLine->string();
int x = 0;
int width;
@@ -758,12 +758,12 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, int cursorCol)
} else {
// DF: commented out. It happens all the time.
//Q_ASSERT(!m_doc->wrapCursor());
- width = a->width(*fs, QChar(' '), m_tabWidth);
+ width = a->width(*fs, TQChar(' '), m_tabWidth);
}
x += width;
- if (z < len && unicode[z] == QChar('\t'))
+ if (z < len && unicode[z] == TQChar('\t'))
x -= x % width;
}
@@ -787,8 +787,8 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, uint startcol, u
*needWrap = false;
const uint len = textLine->length();
- const QChar *unicode = textLine->text();
- const QString &textString = textLine->string();
+ const TQChar *unicode = textLine->text();
+ const TQString &textString = textLine->string();
uint z = startcol;
for (; z < len; z++)
@@ -800,7 +800,7 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, uint startcol, u
// How should tabs be treated when they word-wrap on a print-out?
// if startcol != 0, this messes up (then again, word wrapping messes up anyway)
- if (unicode[z] == QChar('\t'))
+ if (unicode[z] == TQChar('\t'))
x -= x % width;
if (unicode[z].isSpace())
@@ -887,8 +887,8 @@ uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol)
if (!textLine) return 0;
const uint len = textLine->length();
- const QChar *unicode = textLine->text();
- const QString &textString = textLine->string();
+ const TQChar *unicode = textLine->text();
+ const TQString &textString = textLine->string();
x = oldX = 0;
uint z = startCol;
@@ -902,11 +902,11 @@ uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol)
if (z < len)
width = a->width(*fs, textString, z, m_tabWidth);
else
- width = a->width(*fs, QChar(' '), m_tabWidth);
+ width = a->width(*fs, TQChar(' '), m_tabWidth);
x += width;
- if (z < len && unicode[z] == QChar('\t'))
+ if (z < len && unicode[z] == TQChar('\t'))
x -= x % width;
z++;
@@ -919,12 +919,12 @@ uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol)
return x;
}
-const QFont *KateRenderer::currentFont()
+const TQFont *KateRenderer::currentFont()
{
return config()->font();
}
-const QFontMetrics* KateRenderer::currentFontMetrics()
+const TQFontMetrics* KateRenderer::currentFontMetrics()
{
return config()->fontMetrics();
}
@@ -947,7 +947,7 @@ uint KateRenderer::textPos(const KateTextLine::Ptr &textLine, int xPos, uint sta
uint z = startCol;
const uint len = textLine->length();
- const QString &textString = textLine->string();
+ const TQString &textString = textLine->string();
while ( (x < xPos) && (z < len)) {
oldX = x;
@@ -1026,7 +1026,7 @@ void KateRenderer::updateConfig ()
uint KateRenderer::spaceWidth()
{
- return attribute(0)->width(*config()->fontStruct(), QChar(' '), m_tabWidth);
+ return attribute(0)->width(*config()->fontStruct(), TQChar(' '), m_tabWidth);
}
// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katerenderer.h b/kate/part/katerenderer.h
index fc4865ab1..1b9169efd 100644
--- a/kate/part/katerenderer.h
+++ b/kate/part/katerenderer.h
@@ -26,8 +26,8 @@
#include "kateattribute.h"
#include "katetextline.h"
-#include <qfont.h>
-#include <qfontmetrics.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
class KateDocument;
class KateView;
@@ -147,8 +147,8 @@ public:
*/
void increaseFontSizes();
void decreaseFontSizes();
- const QFont* currentFont();
- const QFontMetrics* currentFontMetrics();
+ const TQFont* currentFont();
+ const TQFontMetrics* currentFontMetrics();
/**
* @return whether the renderer is configured to paint in a
@@ -207,7 +207,7 @@ public:
* The text line is painted from the upper limit of (0,0). To move that,
* apply a transform to your painter.
*/
- void paintTextLine(QPainter& paint, const KateLineRange* range, int xStart, int xEnd, const KateTextCursor* cursor = 0L, const KateBracketRange* bracketmark = 0L);
+ void paintTextLine(TQPainter& paint, const KateLineRange* range, int xStart, int xEnd, const KateTextCursor* cursor = 0L, const KateBracketRange* bracketmark = 0L);
/**
* Paint the background of a line
@@ -218,7 +218,7 @@ public:
*
* @return whether the selection has been painted or not
*/
- bool paintTextLineBackground(QPainter& paint, int line, bool isCurrentLine, int xStart, int xEnd);
+ bool paintTextLineBackground(TQPainter& paint, int line, bool isCurrentLine, int xStart, int xEnd);
/**
* This takes an in index, and returns all the attributes for it.
@@ -235,10 +235,10 @@ public:
*
* Currently only used by the tabs, but it will also be used for highlighting trailing whitespace
*/
- void paintWhitespaceMarker(QPainter &paint, uint x, uint y);
+ void paintWhitespaceMarker(TQPainter &paint, uint x, uint y);
/** Paint a SciTE-like indent marker. */
- void paintIndentMarker(QPainter &paint, uint x, uint y);
+ void paintIndentMarker(TQPainter &paint, uint x, uint y);
KateDocument* m_doc;
KateView *m_view;
@@ -255,7 +255,7 @@ public:
bool m_showTabs;
bool m_printerFriendly;
- QMemArray<KateAttribute> *m_attributes;
+ TQMemArray<KateAttribute> *m_attributes;
/**
* Configuration
diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp
index e0a5d5dba..6e73a9f75 100644
--- a/kate/part/kateschema.cpp
+++ b/kate/part/kateschema.cpp
@@ -42,35 +42,35 @@
#include <kaboutdata.h>
#include <ktexteditor/markinterface.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qptrcollection.h>
-#include <qdialog.h>
-#include <qgrid.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qtextcodec.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qheader.h>
-#include <qlistbox.h>
-#include <qhbox.h>
-#include <qpainter.h>
-#include <qobjectlist.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqptrcollection.h>
+#include <tqdialog.h>
+#include <tqgrid.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqtextcodec.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqheader.h>
+#include <tqlistbox.h>
+#include <tqhbox.h>
+#include <tqpainter.h>
+#include <tqobjectlist.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqwhatsthis.h>
//END
//BEGIN KateStyleListViewItem decl
/*
- QListViewItem subclass to display/edit a style, bold/italic is check boxes,
+ TQListViewItem subclass to display/edit a style, bold/italic is check boxes,
normal and selected colors are boxes, which will display a color chooser when
activated.
The context name for the style will be drawn using the editor default font and
@@ -83,9 +83,9 @@
class KateStyleListItem : public QListViewItem
{
public:
- KateStyleListItem( QListViewItem *parent=0, const QString & stylename=0,
+ KateStyleListItem( TQListViewItem *parent=0, const TQString & stylename=0,
class KateAttribute* defaultstyle=0, class KateHlItemData *data=0 );
- KateStyleListItem( QListView *parent, const QString & stylename=0,
+ KateStyleListItem( TQListView *parent, const TQString & stylename=0,
class KateAttribute* defaultstyle=0, class KateHlItemData *data=0 );
~KateStyleListItem() { if (st) delete is; };
@@ -97,9 +97,9 @@ class KateStyleListItem : public QListViewItem
/* updates the hldata's style */
void updateStyle();
/* reimp */
- virtual int width ( const QFontMetrics & fm, const QListView * lv, int c ) const;
+ virtual int width ( const TQFontMetrics & fm, const TQListView * lv, int c ) const;
/* calls changeProperty() if it makes sense considering pos. */
- void activate( int column, const QPoint &localPos );
+ void activate( int column, const TQPoint &localPos );
/* For bool fields, toggles them, for color fields, display a color chooser */
void changeProperty( Property p );
/** unset a color.
@@ -107,7 +107,7 @@ class KateStyleListItem : public QListViewItem
*/
void unsetColor( int c );
/* style context name */
- QString contextName() { return text(0); };
+ TQString contextName() { return text(0); };
/* only true for a hl mode item using it's default style */
bool defStyle();
/* true for default styles */
@@ -118,7 +118,7 @@ class KateStyleListItem : public QListViewItem
protected:
/* reimp */
- void paintCell(QPainter *p, const QColorGroup& cg, int col, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup& cg, int col, int width, int align);
private:
/* private methods to change properties */
@@ -144,23 +144,23 @@ class KateStyleListItem : public QListViewItem
class KateStyleListCaption : public QListViewItem
{
public:
- KateStyleListCaption( QListView *parent, const QString & name );
+ KateStyleListCaption( TQListView *parent, const TQString & name );
~KateStyleListCaption() {};
protected:
- void paintCell(QPainter *p, const QColorGroup& cg, int col, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup& cg, int col, int width, int align);
};
//END
//BEGIN KateSchemaManager
-QString KateSchemaManager::normalSchema ()
+TQString KateSchemaManager::normalSchema ()
{
- return KApplication::kApplication()->aboutData()->appName () + QString (" - Normal");
+ return KApplication::kApplication()->aboutData()->appName () + TQString (" - Normal");
}
-QString KateSchemaManager::printingSchema ()
+TQString KateSchemaManager::printingSchema ()
{
- return KApplication::kApplication()->aboutData()->appName () + QString (" - Printing");
+ return KApplication::kApplication()->aboutData()->appName () + TQString (" - Printing");
}
KateSchemaManager::KateSchemaManager ()
@@ -206,7 +206,7 @@ KConfig *KateSchemaManager::schema (uint number)
return &m_config;
}
-void KateSchemaManager::addSchema (const QString &t)
+void KateSchemaManager::addSchema (const TQString &t)
{
m_config.setGroup (t);
m_config.writeEntry("Color Background", KGlobalSettings::baseColor());
@@ -235,7 +235,7 @@ bool KateSchemaManager::validSchema (uint number)
return false;
}
-uint KateSchemaManager::number (const QString &name)
+uint KateSchemaManager::number (const TQString &name)
{
if (name == normalSchema())
return 0;
@@ -250,7 +250,7 @@ uint KateSchemaManager::number (const QString &name)
return 0;
}
-QString KateSchemaManager::name (uint number)
+TQString KateSchemaManager::name (uint number)
{
if ((number>1) && (number < m_schemas.count()))
return m_schemas[number];
@@ -266,38 +266,38 @@ QString KateSchemaManager::name (uint number)
//
//BEGIN KateSchemaConfigColorTab -- 'Colors' tab
-KateSchemaConfigColorTab::KateSchemaConfigColorTab( QWidget *parent, const char * )
- : QWidget (parent)
+KateSchemaConfigColorTab::KateSchemaConfigColorTab( TQWidget *parent, const char * )
+ : TQWidget (parent)
{
m_schema = -1;
- QHBox *b;
- QLabel *label;
+ TQHBox *b;
+ TQLabel *label;
- QVBoxLayout *blay=new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout *blay=new TQVBoxLayout(this, 0, KDialog::spacingHint());
- QVGroupBox *gbTextArea = new QVGroupBox(i18n("Text Area Background"), this);
+ TQVGroupBox *gbTextArea = new TQVGroupBox(i18n("Text Area Background"), this);
- b = new QHBox (gbTextArea);
+ b = new TQHBox (gbTextArea);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Normal text:"), b);
+ label = new TQLabel( i18n("Normal text:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_back = new KColorButton(b);
- b = new QHBox (gbTextArea);
+ b = new TQHBox (gbTextArea);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Selected text:"), b);
+ label = new TQLabel( i18n("Selected text:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_selected = new KColorButton(b);
- b = new QHBox (gbTextArea);
+ b = new TQHBox (gbTextArea);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Current line:"), b);
+ label = new TQLabel( i18n("Current line:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_current = new KColorButton(b);
// Markers from kdelibs/interfaces/ktextinterface/markinterface.h
- b = new QHBox (gbTextArea);
+ b = new TQHBox (gbTextArea);
b->setSpacing(KDialog::spacingHint());
m_combobox = new KComboBox(b, "color_combo_box");
// add the predefined mark types as defined in markinterface.h
@@ -310,39 +310,39 @@ KateSchemaConfigColorTab::KateSchemaConfigColorTab( QWidget *parent, const char
m_combobox->insertItem(i18n("Error")); // markType07
m_combobox->setCurrentItem(0);
m_markers = new KColorButton(b, "marker_color_button");
- connect( m_combobox, SIGNAL( activated( int ) ), SLOT( slotComboBoxChanged( int ) ) );
+ connect( m_combobox, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotComboBoxChanged( int ) ) );
blay->addWidget(gbTextArea);
- QVGroupBox *gbBorder = new QVGroupBox(i18n("Additional Elements"), this);
+ TQVGroupBox *gbBorder = new TQVGroupBox(i18n("Additional Elements"), this);
- b = new QHBox (gbBorder);
+ b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Left border background:"), b);
+ label = new TQLabel( i18n("Left border background:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_iconborder = new KColorButton(b);
- b = new QHBox (gbBorder);
+ b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Line numbers:"), b);
+ label = new TQLabel( i18n("Line numbers:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_linenumber = new KColorButton(b);
- b = new QHBox (gbBorder);
+ b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Bracket highlight:"), b);
+ label = new TQLabel( i18n("Bracket highlight:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_bracket = new KColorButton(b);
- b = new QHBox (gbBorder);
+ b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Word wrap markers:"), b);
+ label = new TQLabel( i18n("Word wrap markers:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_wwmarker = new KColorButton(b);
- b = new QHBox (gbBorder);
+ b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Tab markers:"), b);
+ label = new TQLabel( i18n("Tab markers:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_tmarker = new KColorButton(b);
@@ -351,32 +351,32 @@ KateSchemaConfigColorTab::KateSchemaConfigColorTab( QWidget *parent, const char
blay->addStretch();
// connect signal changed(); changed is emitted by a ColorButton change!
- connect( this, SIGNAL( changed() ), parent->parentWidget(), SLOT( slotChanged() ) );
+ connect( this, TQT_SIGNAL( changed() ), parent->parentWidget(), TQT_SLOT( slotChanged() ) );
- // QWhatsThis help
- QWhatsThis::add(m_back, i18n("<p>Sets the background color of the editing area.</p>"));
- QWhatsThis::add(m_selected, i18n("<p>Sets the background color of the selection.</p>"
+ // TQWhatsThis help
+ TQWhatsThis::add(m_back, i18n("<p>Sets the background color of the editing area.</p>"));
+ TQWhatsThis::add(m_selected, i18n("<p>Sets the background color of the selection.</p>"
"<p>To set the text color for selected text, use the \"<b>Configure "
"Highlighting</b>\" dialog.</p>"));
- QWhatsThis::add(m_markers, i18n("<p>Sets the background color of the selected "
+ TQWhatsThis::add(m_markers, i18n("<p>Sets the background color of the selected "
"marker type.</p><p><b>Note</b>: The marker color is displayed lightly because "
"of transparency.</p>"));
- QWhatsThis::add(m_combobox, i18n("<p>Select the marker type you want to change.</p>"));
- QWhatsThis::add(m_current, i18n("<p>Sets the background color of the currently "
+ TQWhatsThis::add(m_combobox, i18n("<p>Select the marker type you want to change.</p>"));
+ TQWhatsThis::add(m_current, i18n("<p>Sets the background color of the currently "
"active line, which means the line where your cursor is positioned.</p>"));
- QWhatsThis::add( m_linenumber, i18n(
+ TQWhatsThis::add( m_linenumber, i18n(
"<p>This color will be used to draw the line numbers (if enabled) and the "
"lines in the code-folding pane.</p>" ) );
- QWhatsThis::add(m_bracket, i18n("<p>Sets the bracket matching color. This means, "
+ TQWhatsThis::add(m_bracket, i18n("<p>Sets the bracket matching color. This means, "
"if you place the cursor e.g. at a <b>(</b>, the matching <b>)</b> will "
"be highlighted with this color.</p>"));
- QWhatsThis::add(m_wwmarker, i18n(
+ TQWhatsThis::add(m_wwmarker, i18n(
"<p>Sets the color of Word Wrap-related markers:</p>"
"<dl><dt>Static Word Wrap</dt><dd>A vertical line which shows the column where "
"text is going to be wrapped</dd>"
"<dt>Dynamic Word Wrap</dt><dd>An arrow shown to the left of "
"visually-wrapped lines</dd></dl>"));
- QWhatsThis::add(m_tmarker, i18n(
+ TQWhatsThis::add(m_tmarker, i18n(
"<p>Sets the color of the tabulator marks:</p>"));
}
@@ -405,31 +405,31 @@ void KateSchemaConfigColorTab::schemaChanged ( int newSchema )
m_schema = newSchema;
// first disconnect all signals otherwise setColor emits changed
- m_back ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_selected ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_current ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_bracket ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_wwmarker ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_iconborder->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_tmarker ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_markers ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_linenumber->disconnect( SIGNAL( changed( const QColor & ) ) );
+ m_back ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_selected ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_current ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_bracket ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_wwmarker ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_iconborder->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_tmarker ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_markers ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_linenumber->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
// If we havent this schema, read in from config file
if ( ! m_schemas.contains( newSchema ) )
{
// fallback defaults
- QColor tmp0 (KGlobalSettings::baseColor());
- QColor tmp1 (KGlobalSettings::highlightColor());
- QColor tmp2 (KGlobalSettings::alternateBackgroundColor());
- QColor tmp3 ( "#FFFF99" );
- QColor tmp4 (tmp2.dark());
- QColor tmp5 ( KGlobalSettings::textColor() );
- QColor tmp6 ( "#EAE9E8" );
- QColor tmp7 ( "#000000" );
+ TQColor tmp0 (KGlobalSettings::baseColor());
+ TQColor tmp1 (KGlobalSettings::highlightColor());
+ TQColor tmp2 (KGlobalSettings::alternateBackgroundColor());
+ TQColor tmp3 ( "#FFFF99" );
+ TQColor tmp4 (tmp2.dark());
+ TQColor tmp5 ( KGlobalSettings::textColor() );
+ TQColor tmp6 ( "#EAE9E8" );
+ TQColor tmp7 ( "#000000" );
// same std colors like in KateDocument::markColor
- QValueVector <QColor> mark(KTextEditor::MarkInterface::reservedMarkersCount());
+ TQValueVector <TQColor> mark(KTextEditor::MarkInterface::reservedMarkersCount());
Q_ASSERT(mark.size() > 6);
mark[0] = Qt::blue;
mark[1] = Qt::red;
@@ -452,7 +452,7 @@ void KateSchemaConfigColorTab::schemaChanged ( int newSchema )
c.linenumber = config->readColorEntry("Color Line Number", &tmp7);
for (int i = 0; i < KTextEditor::MarkInterface::reservedMarkersCount(); i++)
- c.markerColors[i] = config->readColorEntry( QString("Color MarkType%1").arg(i+1), &mark[i] );
+ c.markerColors[i] = config->readColorEntry( TQString("Color MarkType%1").arg(i+1), &mark[i] );
m_schemas[ newSchema ] = c;
}
@@ -469,27 +469,27 @@ void KateSchemaConfigColorTab::schemaChanged ( int newSchema )
// map from 0..reservedMarkersCount()-1 - the same index as in markInterface
for (int i = 0; i < KTextEditor::MarkInterface::reservedMarkersCount(); i++)
{
- QPixmap pix(16, 16);
+ TQPixmap pix(16, 16);
pix.fill( m_schemas [ newSchema ].markerColors[i]);
m_combobox->changeItem(pix, m_combobox->text(i), i);
}
m_markers->setColor( m_schemas [ newSchema ].markerColors[ m_combobox->currentItem() ] );
- connect( m_back , SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_selected , SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_current , SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_bracket , SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_wwmarker , SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_iconborder, SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_tmarker , SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_linenumber, SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_markers , SIGNAL( changed( const QColor& ) ), SLOT( slotMarkerColorChanged( const QColor& ) ) );
+ connect( m_back , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_selected , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_current , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_bracket , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_wwmarker , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_iconborder, TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_tmarker , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_linenumber, TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_markers , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SLOT( slotMarkerColorChanged( const TQColor& ) ) );
}
void KateSchemaConfigColorTab::apply ()
{
schemaChanged( m_schema );
- QMap<int,SchemaColors>::Iterator it;
+ TQMap<int,SchemaColors>::Iterator it;
for ( it = m_schemas.begin(); it != m_schemas.end(); ++it )
{
kdDebug(13030)<<"APPLY scheme = "<<it.key()<<endl;
@@ -508,16 +508,16 @@ void KateSchemaConfigColorTab::apply ()
for (int i = 0; i < KTextEditor::MarkInterface::reservedMarkersCount(); i++)
{
- config->writeEntry(QString("Color MarkType%1").arg(i + 1), c.markerColors[i]);
+ config->writeEntry(TQString("Color MarkType%1").arg(i + 1), c.markerColors[i]);
}
}
}
-void KateSchemaConfigColorTab::slotMarkerColorChanged( const QColor& color)
+void KateSchemaConfigColorTab::slotMarkerColorChanged( const TQColor& color)
{
int index = m_combobox->currentItem();
m_schemas[ m_schema ].markerColors[ index ] = color;
- QPixmap pix(16, 16);
+ TQPixmap pix(16, 16);
pix.fill(color);
m_combobox->changeItem(pix, m_combobox->text(index), index);
@@ -527,25 +527,25 @@ void KateSchemaConfigColorTab::slotMarkerColorChanged( const QColor& color)
void KateSchemaConfigColorTab::slotComboBoxChanged(int index)
{
// temporarily disconnect the changed-signal because setColor emits changed as well
- m_markers->disconnect( SIGNAL( changed( const QColor& ) ) );
+ m_markers->disconnect( TQT_SIGNAL( changed( const TQColor& ) ) );
m_markers->setColor( m_schemas[m_schema].markerColors[index] );
- connect( m_markers, SIGNAL( changed( const QColor& ) ), SLOT( slotMarkerColorChanged( const QColor& ) ) );
+ connect( m_markers, TQT_SIGNAL( changed( const TQColor& ) ), TQT_SLOT( slotMarkerColorChanged( const TQColor& ) ) );
}
//END KateSchemaConfigColorTab
//BEGIN FontConfig -- 'Fonts' tab
-KateSchemaConfigFontTab::KateSchemaConfigFontTab( QWidget *parent, const char * )
- : QWidget (parent)
+KateSchemaConfigFontTab::KateSchemaConfigFontTab( TQWidget *parent, const char * )
+ : TQWidget (parent)
{
// sizemanagment
- QGridLayout *grid = new QGridLayout( this, 1, 1 );
+ TQGridLayout *grid = new TQGridLayout( this, 1, 1 );
- m_fontchooser = new KFontChooser ( this, 0L, false, QStringList(), false );
+ m_fontchooser = new KFontChooser ( this, 0L, false, TQStringList(), false );
m_fontchooser->enableColumn(KFontChooser::StyleList, false);
grid->addWidget( m_fontchooser, 0, 0);
- connect (this, SIGNAL( changed()), parent->parentWidget(), SLOT (slotChanged()));
+ connect (this, TQT_SIGNAL( changed()), parent->parentWidget(), TQT_SLOT (slotChanged()));
m_schema = -1;
}
@@ -553,7 +553,7 @@ KateSchemaConfigFontTab::~KateSchemaConfigFontTab()
{
}
-void KateSchemaConfigFontTab::slotFontSelected( const QFont &font )
+void KateSchemaConfigFontTab::slotFontSelected( const TQFont &font )
{
if ( m_schema > -1 )
{
@@ -578,30 +578,30 @@ void KateSchemaConfigFontTab::schemaChanged( int newSchema )
m_schema = newSchema;
- QFont f (KGlobalSettings::fixedFont());
+ TQFont f (KGlobalSettings::fixedFont());
m_fontchooser->disconnect ( this );
m_fontchooser->setFont ( KateFactory::self()->schemaManager()->schema( newSchema )->readFontEntry("Font", &f) );
m_fonts[ newSchema ] = m_fontchooser->font();
- connect (m_fontchooser, SIGNAL (fontSelected( const QFont & )), this, SLOT (slotFontSelected( const QFont & )));
+ connect (m_fontchooser, TQT_SIGNAL (fontSelected( const TQFont & )), this, TQT_SLOT (slotFontSelected( const TQFont & )));
}
//END FontConfig
//BEGIN FontColorConfig -- 'Normal Text Styles' tab
-KateSchemaConfigFontColorTab::KateSchemaConfigFontColorTab( QWidget *parent, const char * )
- : QWidget (parent)
+KateSchemaConfigFontColorTab::KateSchemaConfigFontColorTab( TQWidget *parent, const char * )
+ : TQWidget (parent)
{
m_defaultStyleLists.setAutoDelete(true);
// sizemanagment
- QGridLayout *grid = new QGridLayout( this, 1, 1 );
+ TQGridLayout *grid = new TQGridLayout( this, 1, 1 );
m_defaultStyles = new KateStyleListView( this, false );
grid->addWidget( m_defaultStyles, 0, 0);
- connect (m_defaultStyles, SIGNAL (changed()), parent->parentWidget(), SLOT (slotChanged()));
+ connect (m_defaultStyles, TQT_SIGNAL (changed()), parent->parentWidget(), TQT_SLOT (slotChanged()));
- QWhatsThis::add( m_defaultStyles, i18n(
+ TQWhatsThis::add( m_defaultStyles, i18n(
"This list displays the default styles for the current schema and "
"offers the means to edit them. The style name reflects the current "
"style settings."
@@ -634,17 +634,17 @@ void KateSchemaConfigFontColorTab::schemaChanged (uint schema)
KateAttributeList *l = attributeList (schema);
// set colors
- QPalette p ( m_defaultStyles->palette() );
- QColor _c ( KGlobalSettings::baseColor() );
- p.setColor( QColorGroup::Base,
+ TQPalette p ( m_defaultStyles->palette() );
+ TQColor _c ( KGlobalSettings::baseColor() );
+ p.setColor( TQColorGroup::Base,
KateFactory::self()->schemaManager()->schema(schema)->
readColorEntry( "Color Background", &_c ) );
_c = KGlobalSettings::highlightColor();
- p.setColor( QColorGroup::Highlight,
+ p.setColor( TQColorGroup::Highlight,
KateFactory::self()->schemaManager()->schema(schema)->
readColorEntry( "Color Selection", &_c ) );
_c = l->at(0)->textColor(); // not quite as much of an assumption ;)
- p.setColor( QColorGroup::Text, _c );
+ p.setColor( TQColorGroup::Text, _c );
m_defaultStyles->viewport()->setPalette( p );
// insert the default styles backwards to get them in the right order
@@ -662,15 +662,15 @@ void KateSchemaConfigFontColorTab::reload ()
void KateSchemaConfigFontColorTab::apply ()
{
- for ( QIntDictIterator<KateAttributeList> it( m_defaultStyleLists ); it.current(); ++it )
+ for ( TQIntDictIterator<KateAttributeList> it( m_defaultStyleLists ); it.current(); ++it )
KateHlManager::self()->setDefaults(it.currentKey(), *(it.current()));
}
//END FontColorConfig
//BEGIN KateSchemaConfigHighlightTab -- 'Highlighting Text Styles' tab
-KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( QWidget *parent, const char *, KateSchemaConfigFontColorTab *page, uint hl )
- : QWidget (parent)
+KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( TQWidget *parent, const char *, KateSchemaConfigFontColorTab *page, uint hl )
+ : TQWidget (parent)
{
m_defaults = page;
@@ -679,22 +679,22 @@ KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( QWidget *parent, con
m_hlDict.setAutoDelete (true);
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
// hl chooser
- QHBox *hbHl = new QHBox( this );
+ TQHBox *hbHl = new TQHBox( this );
layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
- QLabel *lHl = new QLabel( i18n("H&ighlight:"), hbHl );
- hlCombo = new QComboBox( false, hbHl );
+ TQLabel *lHl = new TQLabel( i18n("H&ighlight:"), hbHl );
+ hlCombo = new TQComboBox( false, hbHl );
lHl->setBuddy( hlCombo );
- connect( hlCombo, SIGNAL(activated(int)),
- this, SLOT(hlChanged(int)) );
+ connect( hlCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(hlChanged(int)) );
for( int i = 0; i < KateHlManager::self()->highlights(); i++) {
if (KateHlManager::self()->hlSection(i).length() > 0)
- hlCombo->insertItem(KateHlManager::self()->hlSection(i) + QString ("/") + KateHlManager::self()->hlNameTranslated(i));
+ hlCombo->insertItem(KateHlManager::self()->hlSection(i) + TQString ("/") + KateHlManager::self()->hlNameTranslated(i));
else
hlCombo->insertItem(KateHlManager::self()->hlNameTranslated(i));
}
@@ -707,7 +707,7 @@ KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( QWidget *parent, con
hlCombo->setCurrentItem ( hl );
hlChanged ( hl );
- QWhatsThis::add( m_styles, i18n(
+ TQWhatsThis::add( m_styles, i18n(
"This list displays the contexts of the current syntax highlight mode and "
"offers the means to edit them. The context name reflects the current "
"style settings.<p>To edit using the keyboard, press "
@@ -716,7 +716,7 @@ KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( QWidget *parent, con
"to edit from the popup menu.<p>You can unset the Background and Selected "
"Background colors from the context menu when appropriate.") );
- connect (m_styles, SIGNAL (changed()), parent->parentWidget(), SLOT (slotChanged()));
+ connect (m_styles, TQT_SIGNAL (changed()), parent->parentWidget(), TQT_SLOT (slotChanged()));
}
KateSchemaConfigHighlightTab::~KateSchemaConfigHighlightTab()
@@ -742,7 +742,7 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema)
{
kdDebug(13030) << "NEW SCHEMA, create dict" << endl;
- m_hlDict.insert (schema, new QIntDict<KateHlItemDataList>);
+ m_hlDict.insert (schema, new TQIntDict<KateHlItemDataList>);
m_hlDict[m_schema]->setAutoDelete (true);
}
@@ -761,20 +761,20 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema)
// We do that now, because we can now get the "normal text" color.
// TODO this reads of the KConfig object, which should be changed when
// the color tab is fixed.
- QPalette p ( m_styles->palette() );
- QColor _c ( KGlobalSettings::baseColor() );
- p.setColor( QColorGroup::Base,
+ TQPalette p ( m_styles->palette() );
+ TQColor _c ( KGlobalSettings::baseColor() );
+ p.setColor( TQColorGroup::Base,
KateFactory::self()->schemaManager()->schema(m_schema)->
readColorEntry( "Color Background", &_c ) );
_c = KGlobalSettings::highlightColor();
- p.setColor( QColorGroup::Highlight,
+ p.setColor( TQColorGroup::Highlight,
KateFactory::self()->schemaManager()->schema(m_schema)->
readColorEntry( "Color Selection", &_c ) );
_c = l->at(0)->textColor(); // not quite as much of an assumption ;)
- p.setColor( QColorGroup::Text, _c );
+ p.setColor( TQColorGroup::Text, _c );
m_styles->viewport()->setPalette( p );
- QDict<KateStyleListCaption> prefixes;
+ TQDict<KateStyleListCaption> prefixes;
for ( KateHlItemData *itemData = m_hlDict[m_schema]->find(m_hl)->last();
itemData != 0L;
itemData = m_hlDict[m_schema]->find(m_hl)->prev())
@@ -785,8 +785,8 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema)
// split them and put them into nice substructures.
int c = itemData->name.find(':');
if ( c > 0 ) {
- QString prefix = itemData->name.left(c);
- QString name = itemData->name.mid(c+1);
+ TQString prefix = itemData->name.left(c);
+ TQString name = itemData->name.mid(c+1);
KateStyleListCaption *parent = prefixes.find( prefix );
if ( ! parent )
@@ -812,8 +812,8 @@ void KateSchemaConfigHighlightTab::reload ()
void KateSchemaConfigHighlightTab::apply ()
{
- for ( QIntDictIterator< QIntDict<KateHlItemDataList> > it( m_hlDict ); it.current(); ++it )
- for ( QIntDictIterator< KateHlItemDataList > it2( *it.current() ); it2.current(); ++it2 )
+ for ( TQIntDictIterator< TQIntDict<KateHlItemDataList> > it( m_hlDict ); it.current(); ++it )
+ for ( TQIntDictIterator< KateHlItemDataList > it2( *it.current() ); it2.current(); ++it2 )
{
KateHlManager::self()->getHl( it2.currentKey() )->setKateHlItemDataList (it.currentKey(), *(it2.current()));
}
@@ -822,32 +822,32 @@ void KateSchemaConfigHighlightTab::apply ()
//END KateSchemaConfigHighlightTab
//BEGIN KateSchemaConfigPage -- Main dialog page
-KateSchemaConfigPage::KateSchemaConfigPage( QWidget *parent, KateDocument *doc )
+KateSchemaConfigPage::KateSchemaConfigPage( TQWidget *parent, KateDocument *doc )
: KateConfigPage( parent ),
m_lastSchema (-1)
{
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
- QHBox *hbHl = new QHBox( this );
+ TQHBox *hbHl = new TQHBox( this );
layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
- QLabel *lHl = new QLabel( i18n("&Schema:"), hbHl );
- schemaCombo = new QComboBox( false, hbHl );
+ TQLabel *lHl = new TQLabel( i18n("&Schema:"), hbHl );
+ schemaCombo = new TQComboBox( false, hbHl );
lHl->setBuddy( schemaCombo );
- connect( schemaCombo, SIGNAL(activated(int)),
- this, SLOT(schemaChanged(int)) );
+ connect( schemaCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(schemaChanged(int)) );
- QPushButton *btnnew = new QPushButton( i18n("&New..."), hbHl );
- connect( btnnew, SIGNAL(clicked()), this, SLOT(newSchema()) );
+ TQPushButton *btnnew = new TQPushButton( i18n("&New..."), hbHl );
+ connect( btnnew, TQT_SIGNAL(clicked()), this, TQT_SLOT(newSchema()) );
- btndel = new QPushButton( i18n("&Delete"), hbHl );
- connect( btndel, SIGNAL(clicked()), this, SLOT(deleteSchema()) );
+ btndel = new TQPushButton( i18n("&Delete"), hbHl );
+ connect( btndel, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteSchema()) );
- m_tabWidget = new QTabWidget ( this );
+ m_tabWidget = new TQTabWidget ( this );
m_tabWidget->setMargin (KDialog::marginHint());
layout->add (m_tabWidget);
- connect (m_tabWidget, SIGNAL (currentChanged (QWidget *)), this, SLOT (newCurrentPage (QWidget *)));
+ connect (m_tabWidget, TQT_SIGNAL (currentChanged (TQWidget *)), this, TQT_SLOT (newCurrentPage (TQWidget *)));
m_colorTab = new KateSchemaConfigColorTab (m_tabWidget);
m_tabWidget->addTab (m_colorTab, i18n("Colors"));
@@ -862,11 +862,11 @@ KateSchemaConfigPage::KateSchemaConfigPage( QWidget *parent, KateDocument *doc )
m_highlightTab = new KateSchemaConfigHighlightTab (m_tabWidget, "", m_fontColorTab, hl );
m_tabWidget->addTab (m_highlightTab, i18n("Highlighting Text Styles"));
- hbHl = new QHBox( this );
+ hbHl = new TQHBox( this );
layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
- lHl = new QLabel( i18n("&Default schema for %1:").arg(KApplication::kApplication()->aboutData()->programName ()), hbHl );
- defaultSchemaCombo = new QComboBox( false, hbHl );
+ lHl = new TQLabel( i18n("&Default schema for %1:").arg(KApplication::kApplication()->aboutData()->programName ()), hbHl );
+ defaultSchemaCombo = new TQComboBox( false, hbHl );
lHl->setBuddy( defaultSchemaCombo );
@@ -874,8 +874,8 @@ KateSchemaConfigPage::KateSchemaConfigPage( QWidget *parent, KateDocument *doc )
reload();
- connect( defaultSchemaCombo, SIGNAL(activated(int)),
- this, SLOT(slotChanged()) );
+ connect( defaultSchemaCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotChanged()) );
}
KateSchemaConfigPage::~KateSchemaConfigPage ()
@@ -963,7 +963,7 @@ void KateSchemaConfigPage::deleteSchema ()
void KateSchemaConfigPage::newSchema ()
{
- QString t = KInputDialog::getText (i18n("Name for New Schema"), i18n ("Name:"), i18n("New Schema"), 0, this);
+ TQString t = KInputDialog::getText (i18n("Name for New Schema"), i18n ("Name:"), i18n("New Schema"), 0, this);
KateFactory::self()->schemaManager()->addSchema (t);
@@ -991,7 +991,7 @@ void KateSchemaConfigPage::schemaChanged (int schema)
m_lastSchema = schema;
}
-void KateSchemaConfigPage::newCurrentPage (QWidget *w)
+void KateSchemaConfigPage::newCurrentPage (TQWidget *w)
{
if (w == m_highlightTab)
m_highlightTab->schemaChanged (m_lastSchema);
@@ -1004,7 +1004,7 @@ void KateViewSchemaAction::init()
m_view = 0;
last = 0;
- connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow()));
+ connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}
void KateViewSchemaAction::updateMenu (KateView *view)
@@ -1019,12 +1019,12 @@ void KateViewSchemaAction::slotAboutToShow()
for (int z=0; z<count; z++)
{
- QString hlName = KateFactory::self()->schemaManager()->list().operator[](z);
+ TQString hlName = KateFactory::self()->schemaManager()->list().operator[](z);
if (names.contains(hlName) < 1)
{
names << hlName;
- popupMenu()->insertItem ( hlName, this, SLOT(setSchema(int)), 0, z+1);
+ popupMenu()->insertItem ( hlName, this, TQT_SLOT(setSchema(int)), 0, z+1);
}
}
@@ -1046,25 +1046,25 @@ void KateViewSchemaAction::setSchema (int mode)
//END SCHEMA ACTION
//BEGIN KateStyleListView
-KateStyleListView::KateStyleListView( QWidget *parent, bool showUseDefaults )
- : QListView( parent )
+KateStyleListView::KateStyleListView( TQWidget *parent, bool showUseDefaults )
+ : TQListView( parent )
{
setSorting( -1 ); // disable sorting, let the styles appear in their defined order
addColumn( i18n("Context") );
- addColumn( SmallIconSet("text_bold"), QString::null );
- addColumn( SmallIconSet("text_italic"), QString::null );
- addColumn( SmallIconSet("text_under"), QString::null );
- addColumn( SmallIconSet("text_strike"), QString::null );
+ addColumn( SmallIconSet("text_bold"), TQString::null );
+ addColumn( SmallIconSet("text_italic"), TQString::null );
+ addColumn( SmallIconSet("text_under"), TQString::null );
+ addColumn( SmallIconSet("text_strike"), TQString::null );
addColumn( i18n("Normal") );
addColumn( i18n("Selected") );
addColumn( i18n("Background") );
addColumn( i18n("Background Selected") );
if ( showUseDefaults )
addColumn( i18n("Use Default Style") );
- connect( this, SIGNAL(mouseButtonPressed(int, QListViewItem*, const QPoint&, int)),
- this, SLOT(slotMousePressed(int, QListViewItem*, const QPoint&, int)) );
- connect( this, SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&, int)),
- this, SLOT(showPopupMenu(QListViewItem*, const QPoint&)) );
+ connect( this, TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(slotMousePressed(int, TQListViewItem*, const TQPoint&, int)) );
+ connect( this, TQT_SIGNAL(contextMenuRequested(TQListViewItem*,const TQPoint&, int)),
+ this, TQT_SLOT(showPopupMenu(TQListViewItem*, const TQPoint&)) );
// grap the bg color, selected color and default font
normalcol = KGlobalSettings::textColor();
bgcol = KateRendererConfig::global()->backgroundColor();
@@ -1074,7 +1074,7 @@ KateStyleListView::KateStyleListView( QWidget *parent, bool showUseDefaults )
viewport()->setPaletteBackgroundColor( bgcol );
}
-void KateStyleListView::showPopupMenu( KateStyleListItem *i, const QPoint &globalPos, bool showtitle )
+void KateStyleListView::showPopupMenu( KateStyleListItem *i, const TQPoint &globalPos, bool showtitle )
{
if ( !dynamic_cast<KateStyleListItem*>(i) ) return;
@@ -1083,32 +1083,32 @@ void KateStyleListView::showPopupMenu( KateStyleListItem *i, const QPoint &globa
int id;
// the title is used, because the menu obscures the context name when
// displayed on behalf of spacePressed().
- QPixmap cl(16,16);
+ TQPixmap cl(16,16);
cl.fill( i->style()->textColor() );
- QPixmap scl(16,16);
+ TQPixmap scl(16,16);
scl.fill( i->style()->selectedTextColor() );
- QPixmap bgcl(16,16);
+ TQPixmap bgcl(16,16);
bgcl.fill( i->style()->itemSet(KateAttribute::BGColor) ? i->style()->bgColor() : viewport()->colorGroup().base() );
- QPixmap sbgcl(16,16);
+ TQPixmap sbgcl(16,16);
sbgcl.fill( i->style()->itemSet(KateAttribute::SelectedBGColor) ? i->style()->selectedBGColor() : viewport()->colorGroup().base() );
if ( showtitle )
m.insertTitle( i->contextName(), KateStyleListItem::ContextName );
- id = m.insertItem( i18n("&Bold"), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Bold );
+ id = m.insertItem( i18n("&Bold"), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Bold );
m.setItemChecked( id, is->bold() );
- id = m.insertItem( i18n("&Italic"), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Italic );
+ id = m.insertItem( i18n("&Italic"), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Italic );
m.setItemChecked( id, is->italic() );
- id = m.insertItem( i18n("&Underline"), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Underline );
+ id = m.insertItem( i18n("&Underline"), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Underline );
m.setItemChecked( id, is->underline() );
- id = m.insertItem( i18n("S&trikeout"), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Strikeout );
+ id = m.insertItem( i18n("S&trikeout"), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Strikeout );
m.setItemChecked( id, is->strikeOut() );
m.insertSeparator();
- m.insertItem( QIconSet(cl), i18n("Normal &Color..."), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Color );
- m.insertItem( QIconSet(scl), i18n("&Selected Color..."), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::SelColor );
- m.insertItem( QIconSet(bgcl), i18n("&Background Color..."), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::BgColor );
- m.insertItem( QIconSet(sbgcl), i18n("S&elected Background Color..."), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::SelBgColor );
+ m.insertItem( TQIconSet(cl), i18n("Normal &Color..."), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Color );
+ m.insertItem( TQIconSet(scl), i18n("&Selected Color..."), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::SelColor );
+ m.insertItem( TQIconSet(bgcl), i18n("&Background Color..."), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::BgColor );
+ m.insertItem( TQIconSet(sbgcl), i18n("S&elected Background Color..."), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::SelBgColor );
// Unset [some] colors. I could show one only if that button was clicked, but that
// would disable setting this with the keyboard (how many aren't doing just
@@ -1119,20 +1119,20 @@ void KateStyleListView::showPopupMenu( KateStyleListItem *i, const QPoint &globa
{
m.insertSeparator();
if ( style->itemSet( KateAttribute::BGColor) )
- m.insertItem( i18n("Unset Background Color"), this, SLOT(unsetColor(int)), 0, 100 );
+ m.insertItem( i18n("Unset Background Color"), this, TQT_SLOT(unsetColor(int)), 0, 100 );
if ( style->itemSet( KateAttribute::SelectedBGColor ) )
- m.insertItem( i18n("Unset Selected Background Color"), this, SLOT(unsetColor(int)), 0, 101 );
+ m.insertItem( i18n("Unset Selected Background Color"), this, TQT_SLOT(unsetColor(int)), 0, 101 );
}
if ( ! i->isDefault() && ! i->defStyle() ) {
m.insertSeparator();
- id = m.insertItem( i18n("Use &Default Style"), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::UseDefStyle );
+ id = m.insertItem( i18n("Use &Default Style"), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::UseDefStyle );
m.setItemChecked( id, i->defStyle() );
}
m.exec( globalPos );
}
-void KateStyleListView::showPopupMenu( QListViewItem *i, const QPoint &pos )
+void KateStyleListView::showPopupMenu( TQListViewItem *i, const TQPoint &pos )
{
if ( dynamic_cast<KateStyleListItem*>(i) )
showPopupMenu( (KateStyleListItem*)i, pos, true );
@@ -1149,14 +1149,14 @@ void KateStyleListView::unsetColor( int c )
emitChanged();
}
-// Because QListViewItem::activatePos() is going to become deprecated,
+// Because TQListViewItem::activatePos() is going to become deprecated,
// and also because this attempt offers more control, I connect mousePressed to this.
-void KateStyleListView::slotMousePressed(int btn, QListViewItem* i, const QPoint& pos, int c)
+void KateStyleListView::slotMousePressed(int btn, TQListViewItem* i, const TQPoint& pos, int c)
{
if ( dynamic_cast<KateStyleListItem*>(i) ) {
if ( btn == Qt::LeftButton && c > 0 ) {
// map pos to item/column and call KateStyleListItem::activate(col, pos)
- ((KateStyleListItem*)i)->activate( c, viewport()->mapFromGlobal( pos ) - QPoint( 0, itemRect(i).top() ) );
+ ((KateStyleListItem*)i)->activate( c, viewport()->mapFromGlobal( pos ) - TQPoint( 0, itemRect(i).top() ) );
}
}
}
@@ -1167,18 +1167,18 @@ void KateStyleListView::slotMousePressed(int btn, QListViewItem* i, const QPoint
static const int BoxSize = 16;
static const int ColorBtnWidth = 32;
-KateStyleListItem::KateStyleListItem( QListViewItem *parent, const QString & stylename,
+KateStyleListItem::KateStyleListItem( TQListViewItem *parent, const TQString & stylename,
KateAttribute *style, KateHlItemData *data )
- : QListViewItem( parent, stylename ),
+ : TQListViewItem( parent, stylename ),
ds( style ),
st( data )
{
initStyle();
}
-KateStyleListItem::KateStyleListItem( QListView *parent, const QString & stylename,
+KateStyleListItem::KateStyleListItem( TQListView *parent, const TQString & stylename,
KateAttribute *style, KateHlItemData *data )
- : QListViewItem( parent, stylename ),
+ : TQListViewItem( parent, stylename ),
ds( style ),
st( data )
{
@@ -1275,14 +1275,14 @@ bool KateStyleListItem::defStyle() { return st && st->itemsSet() != ds->itemsSet
/* true for default styles */
bool KateStyleListItem::isDefault() { return st ? false : true; }
-int KateStyleListItem::width( const QFontMetrics & /*fm*/, const QListView * lv, int col ) const
+int KateStyleListItem::width( const TQFontMetrics & /*fm*/, const TQListView * lv, int col ) const
{
int m = lv->itemMargin() * 2;
switch ( col ) {
case ContextName:
// FIXME: width for name column should reflect bold/italic
// (relevant for non-fixed fonts only - nessecary?)
- return QListViewItem::width( QFontMetrics( ((KateStyleListView*)lv)->docfont), lv, col);
+ return TQListViewItem::width( TQFontMetrics( ((KateStyleListView*)lv)->docfont), lv, col);
case Bold:
case Italic:
case UseDefStyle:
@@ -1297,9 +1297,9 @@ int KateStyleListItem::width( const QFontMetrics & /*fm*/, const QListView * lv,
}
}
-void KateStyleListItem::activate( int column, const QPoint &localPos )
+void KateStyleListItem::activate( int column, const TQPoint &localPos )
{
- QListView *lv = listView();
+ TQListView *lv = listView();
int x = 0;
for( int c = 0; c < column-1; c++ )
x += lv->columnWidth( c );
@@ -1321,7 +1321,7 @@ void KateStyleListItem::activate( int column, const QPoint &localPos )
default:
return;
}
- if ( !QRect( x, 0, w, BoxSize ).contains( localPos ) )
+ if ( !TQRect( x, 0, w, BoxSize ).contains( localPos ) )
changeProperty( (Property)column );
}
@@ -1363,8 +1363,8 @@ void KateStyleListItem::toggleDefStyle()
void KateStyleListItem::setColor( int column )
{
- QColor c; // use this
- QColor d; // default color
+ TQColor c; // use this
+ TQColor d; // default color
if ( column == Color)
{
c = is->textColor();
@@ -1386,7 +1386,7 @@ void KateStyleListItem::setColor( int column )
d = ds->selectedBGColor();
}
- if ( KColorDialog::getColor( c, d, listView() ) != QDialog::Accepted) return;
+ if ( KColorDialog::getColor( c, d, listView() ) != TQDialog::Accepted) return;
bool def = ! c.isValid();
@@ -1453,49 +1453,49 @@ void KateStyleListItem::unsetColor( int c )
updateStyle();
}
-void KateStyleListItem::paintCell( QPainter *p, const QColorGroup& /*cg*/, int col, int width, int align )
+void KateStyleListItem::paintCell( TQPainter *p, const TQColorGroup& /*cg*/, int col, int width, int align )
{
if ( !p )
return;
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv )
return;
Q_ASSERT( lv ); //###
// use a private color group and set the text/highlighted text colors
- QColorGroup mcg = lv->viewport()->colorGroup();
+ TQColorGroup mcg = lv->viewport()->colorGroup();
if ( col ) // col 0 is drawn by the superclass method
- p->fillRect( 0, 0, width, height(), QBrush( mcg.base() ) );
+ p->fillRect( 0, 0, width, height(), TQBrush( mcg.base() ) );
int marg = lv->itemMargin();
- QColor c;
+ TQColor c;
switch ( col )
{
case ContextName:
{
- mcg.setColor(QColorGroup::Text, is->textColor());
- mcg.setColor(QColorGroup::HighlightedText, is->selectedTextColor());
+ mcg.setColor(TQColorGroup::Text, is->textColor());
+ mcg.setColor(TQColorGroup::HighlightedText, is->selectedTextColor());
// text background color
c = is->bgColor();
if ( c.isValid() && is->itemSet(KateAttribute::BGColor) )
- mcg.setColor( QColorGroup::Base, c );
+ mcg.setColor( TQColorGroup::Base, c );
if ( isSelected() && is->itemSet(KateAttribute::SelectedBGColor) )
{
c = is->selectedBGColor();
if ( c.isValid() )
- mcg.setColor( QColorGroup::Highlight, c );
+ mcg.setColor( TQColorGroup::Highlight, c );
}
- QFont f ( ((KateStyleListView*)lv)->docfont );
+ TQFont f ( ((KateStyleListView*)lv)->docfont );
p->setFont( is->font(f) );
// FIXME - repainting when text is cropped, and the column is enlarged is buggy.
// Maybe I need painting the string myself :(
// (wilbert) it depends on the font used
- QListViewItem::paintCell( p, mcg, col, width, align );
+ TQListViewItem::paintCell( p, mcg, col, width, align );
}
break;
case Bold:
@@ -1510,9 +1510,9 @@ void KateStyleListItem::paintCell( QPainter *p, const QColorGroup& /*cg*/, int c
int y = (height() - BoxSize) / 2;
if ( isEnabled() )
- p->setPen( QPen( mcg.text(), 2 ) );
+ p->setPen( TQPen( mcg.text(), 2 ) );
else
- p->setPen( QPen( lv->palette().color( QPalette::Disabled, QColorGroup::Text ), 2 ) );
+ p->setPen( TQPen( lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) );
p->drawRect( x+marg, y+2, BoxSize-4, BoxSize-4 );
x++;
@@ -1523,7 +1523,7 @@ void KateStyleListItem::paintCell( QPainter *p, const QColorGroup& /*cg*/, int c
(col == Strikeout && is->strikeOut()) ||
(col == UseDefStyle && *is == *ds ) )
{
- QPointArray a( 7*2 );
+ TQPointArray a( 7*2 );
int i, xx, yy;
xx = x+1+marg;
yy = y+5;
@@ -1573,12 +1573,12 @@ void KateStyleListItem::paintCell( QPainter *p, const QColorGroup& /*cg*/, int c
int x = 0;
int y = (height() - BoxSize) / 2;
if ( isEnabled() )
- p->setPen( QPen( mcg.text(), 2 ) );
+ p->setPen( TQPen( mcg.text(), 2 ) );
else
- p->setPen( QPen( lv->palette().color( QPalette::Disabled, QColorGroup::Text ), 2 ) );
+ p->setPen( TQPen( lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) );
p->drawRect( x+marg, y+2, ColorBtnWidth-4, BoxSize-4 );
- p->fillRect( x+marg+1,y+3,ColorBtnWidth-7,BoxSize-7,QBrush( c ) );
+ p->fillRect( x+marg+1,y+3,ColorBtnWidth-7,BoxSize-7,TQBrush( c ) );
// if this item is unset, draw a diagonal line over the button
if ( ! set )
p->drawLine( x+marg-1, BoxSize-3, ColorBtnWidth-4, y+1 );
@@ -1589,22 +1589,22 @@ void KateStyleListItem::paintCell( QPainter *p, const QColorGroup& /*cg*/, int c
//END
//BEGIN KateStyleListCaption
-KateStyleListCaption::KateStyleListCaption( QListView *parent, const QString & name )
- : QListViewItem( parent, name )
+KateStyleListCaption::KateStyleListCaption( TQListView *parent, const TQString & name )
+ : TQListViewItem( parent, name )
{
}
-void KateStyleListCaption::paintCell( QPainter *p, const QColorGroup& /*cg*/, int col, int width, int align )
+void KateStyleListCaption::paintCell( TQPainter *p, const TQColorGroup& /*cg*/, int col, int width, int align )
{
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv )
return;
Q_ASSERT( lv ); //###
// use the same colorgroup as the other items in the viewport
- QColorGroup mcg = lv->viewport()->colorGroup();
+ TQColorGroup mcg = lv->viewport()->colorGroup();
- QListViewItem::paintCell( p, mcg, col, width, align );
+ TQListViewItem::paintCell( p, mcg, col, width, align );
}
//END
diff --git a/kate/part/kateschema.h b/kate/part/kateschema.h
index 917530fcc..e5bc14b0d 100644
--- a/kate/part/kateschema.h
+++ b/kate/part/kateschema.h
@@ -23,11 +23,11 @@
#include "katehighlight.h"
#include "katedialogs.h"
-#include <qstringlist.h>
-#include <qintdict.h>
-#include <qmap.h>
-#include <qlistview.h>
-#include <qfont.h>
+#include <tqstringlist.h>
+#include <tqintdict.h>
+#include <tqmap.h>
+#include <tqlistview.h>
+#include <tqfont.h>
#include <kconfig.h>
#include <kaction.h>
@@ -57,7 +57,7 @@ class KateSchemaManager
*/
KConfig *schema (uint number);
- void addSchema (const QString &t);
+ void addSchema (const TQString &t);
void removeSchema (uint number);
@@ -69,24 +69,24 @@ class KateSchemaManager
/**
* if not found, defaults to 0
*/
- uint number (const QString &name);
+ uint number (const TQString &name);
/**
* group names in the end, no i18n involved
*/
- QString name (uint number);
+ TQString name (uint number);
/**
* Don't modify, list with the names of the schemas (i18n name for the default ones)
*/
- const QStringList &list () { return m_schemas; }
+ const TQStringList &list () { return m_schemas; }
- static QString normalSchema ();
- static QString printingSchema ();
+ static TQString normalSchema ();
+ static TQString printingSchema ();
private:
KConfig m_config;
- QStringList m_schemas;
+ TQStringList m_schemas;
};
@@ -95,7 +95,7 @@ class KateViewSchemaAction : public KActionMenu
Q_OBJECT
public:
- KateViewSchemaAction(const QString& text, QObject* parent = 0, const char* name = 0)
+ KateViewSchemaAction(const TQString& text, TQObject* parent = 0, const char* name = 0)
: KActionMenu(text, parent, name) { init(); };
~KateViewSchemaAction(){;};
@@ -105,8 +105,8 @@ class KateViewSchemaAction : public KActionMenu
private:
void init();
- QGuardedPtr<KateView> m_view;
- QStringList names;
+ TQGuardedPtr<KateView> m_view;
+ TQStringList names;
int last;
public slots:
@@ -121,7 +121,7 @@ class KateViewSchemaAction : public KActionMenu
//
/*
- QListView that automatically adds columns for KateStyleListItems and provides a
+ TQListView that automatically adds columns for KateStyleListItems and provides a
popup menu and a slot to edit a style using the keyboard.
Added by anders, jan 23 2002.
*/
@@ -132,22 +132,22 @@ class KateStyleListView : public QListView
friend class KateStyleListItem;
public:
- KateStyleListView( QWidget *parent=0, bool showUseDefaults=false);
+ KateStyleListView( TQWidget *parent=0, bool showUseDefaults=false);
~KateStyleListView() {};
/* Display a popupmenu for item i at the specified global position, eventually with a title,
promoting the context name of that item */
- void showPopupMenu( KateStyleListItem *i, const QPoint &globalPos, bool showtitle=false );
+ void showPopupMenu( KateStyleListItem *i, const TQPoint &globalPos, bool showtitle=false );
void emitChanged() { emit changed(); };
- void setBgCol( const QColor &c ) { bgcol = c; }
- void setSelCol( const QColor &c ) { selcol = c; }
- void setNormalCol( const QColor &c ) { normalcol = c; }
+ void setBgCol( const TQColor &c ) { bgcol = c; }
+ void setSelCol( const TQColor &c ) { selcol = c; }
+ void setNormalCol( const TQColor &c ) { normalcol = c; }
private slots:
/* Display a popupmenu for item i at item position */
- void showPopupMenu( QListViewItem *i, const QPoint &globalPos );
+ void showPopupMenu( TQListViewItem *i, const TQPoint &globalPos );
/* call item to change a property, or display a menu */
- void slotMousePressed( int, QListViewItem*, const QPoint&, int );
+ void slotMousePressed( int, TQListViewItem*, const TQPoint&, int );
/* asks item to change the property in q */
void mSlotPopupHandler( int z );
void unsetColor( int );
@@ -156,8 +156,8 @@ class KateStyleListView : public QListView
void changed();
private:
- QColor bgcol, selcol, normalcol;
- QFont docfont;
+ TQColor bgcol, selcol, normalcol;
+ TQFont docfont;
};
class KateSchemaConfigColorTab : public QWidget
@@ -165,7 +165,7 @@ class KateSchemaConfigColorTab : public QWidget
Q_OBJECT
public:
- KateSchemaConfigColorTab( QWidget *parent = 0, const char *name = 0 );
+ KateSchemaConfigColorTab( TQWidget *parent = 0, const char *name = 0 );
~KateSchemaConfigColorTab();
private:
@@ -184,12 +184,12 @@ class KateSchemaConfigColorTab : public QWidget
// Class for storing the properties on 1 schema.
class SchemaColors {
public:
- QColor back, selected, current, bracket, wwmarker, iconborder, tmarker, linenumber;
- QMap<int, QColor> markerColors; // stores all markerColors
+ TQColor back, selected, current, bracket, wwmarker, iconborder, tmarker, linenumber;
+ TQMap<int, TQColor> markerColors; // stores all markerColors
};
// schemaid=data, created when a schema is entered
- QMap<int,SchemaColors> m_schemas;
+ TQMap<int,SchemaColors> m_schemas;
// current schema
int m_schema;
@@ -198,21 +198,21 @@ class KateSchemaConfigColorTab : public QWidget
void schemaChanged( int newSchema );
signals:
- void changed(); // connected to parentWidget()->parentWidget() SLOT(slotChanged)
+ void changed(); // connected to parentWidget()->parentWidget() TQT_SLOT(slotChanged)
protected slots:
- void slotMarkerColorChanged(const QColor&);
+ void slotMarkerColorChanged(const TQColor&);
void slotComboBoxChanged(int index);
};
-typedef QMap<int,QFont> FontMap; // ### remove it
+typedef TQMap<int,TQFont> FontMap; // ### remove it
class KateSchemaConfigFontTab : public QWidget
{
Q_OBJECT
public:
- KateSchemaConfigFontTab( QWidget *parent = 0, const char *name = 0 );
+ KateSchemaConfigFontTab( TQWidget *parent = 0, const char *name = 0 );
~KateSchemaConfigFontTab();
public:
@@ -223,7 +223,7 @@ class KateSchemaConfigFontTab : public QWidget
void schemaChanged( int newSchema );
signals:
- void changed(); // connected to parentWidget()->parentWidget() SLOT(slotChanged)
+ void changed(); // connected to parentWidget()->parentWidget() TQT_SLOT(slotChanged)
private:
class KFontChooser *m_fontchooser;
@@ -231,7 +231,7 @@ class KateSchemaConfigFontTab : public QWidget
int m_schema;
private slots:
- void slotFontSelected( const QFont &font );
+ void slotFontSelected( const TQFont &font );
};
class KateSchemaConfigFontColorTab : public QWidget
@@ -239,7 +239,7 @@ class KateSchemaConfigFontColorTab : public QWidget
Q_OBJECT
public:
- KateSchemaConfigFontColorTab( QWidget *parent = 0, const char *name = 0 );
+ KateSchemaConfigFontColorTab( TQWidget *parent = 0, const char *name = 0 );
~KateSchemaConfigFontColorTab();
public:
@@ -251,7 +251,7 @@ class KateSchemaConfigFontColorTab : public QWidget
private:
KateStyleListView *m_defaultStyles;
- QIntDict<KateAttributeList> m_defaultStyleLists;
+ TQIntDict<KateAttributeList> m_defaultStyleLists;
};
class KateSchemaConfigHighlightTab : public QWidget
@@ -259,7 +259,7 @@ class KateSchemaConfigHighlightTab : public QWidget
Q_OBJECT
public:
- KateSchemaConfigHighlightTab( QWidget *parent = 0, const char *name = 0, KateSchemaConfigFontColorTab *page = 0, uint hl = 0 );
+ KateSchemaConfigHighlightTab( TQWidget *parent = 0, const char *name = 0, KateSchemaConfigFontColorTab *page = 0, uint hl = 0 );
~KateSchemaConfigHighlightTab();
public:
@@ -273,13 +273,13 @@ class KateSchemaConfigHighlightTab : public QWidget
private:
KateSchemaConfigFontColorTab *m_defaults;
- QComboBox *hlCombo;
+ TQComboBox *hlCombo;
KateStyleListView *m_styles;
uint m_schema;
int m_hl;
- QIntDict< QIntDict<KateHlItemDataList> > m_hlDict;
+ TQIntDict< TQIntDict<KateHlItemDataList> > m_hlDict;
};
class KateSchemaConfigPage : public KateConfigPage
@@ -287,7 +287,7 @@ class KateSchemaConfigPage : public KateConfigPage
Q_OBJECT
public:
- KateSchemaConfigPage ( QWidget *parent, class KateDocument *doc=0 );
+ KateSchemaConfigPage ( TQWidget *parent, class KateDocument *doc=0 );
~KateSchemaConfigPage ();
public slots:
@@ -302,16 +302,16 @@ class KateSchemaConfigPage : public KateConfigPage
void newSchema ();
void schemaChanged (int schema);
- void newCurrentPage (QWidget *w);
+ void newCurrentPage (TQWidget *w);
private:
int m_lastSchema;
int m_defaultSchema;
- class QTabWidget *m_tabWidget;
- class QPushButton *btndel;
- class QComboBox *defaultSchemaCombo;
- class QComboBox *schemaCombo;
+ class TQTabWidget *m_tabWidget;
+ class TQPushButton *btndel;
+ class TQComboBox *defaultSchemaCombo;
+ class TQComboBox *schemaCombo;
KateSchemaConfigColorTab *m_colorTab;
KateSchemaConfigFontTab *m_fontTab;
KateSchemaConfigFontColorTab *m_fontColorTab;
diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp
index 96f5128b0..742b57a3f 100644
--- a/kate/part/katesearch.cpp
+++ b/kate/part/katesearch.cpp
@@ -40,17 +40,17 @@
#include <kreplacedialog.h>
#include <kpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
//BEGIN KateSearch
-QStringList KateSearch::s_searchList = QStringList();
-QStringList KateSearch::s_replaceList = QStringList();
-QString KateSearch::s_pattern = QString();
+TQStringList KateSearch::s_searchList = TQStringList();
+TQStringList KateSearch::s_replaceList = TQStringList();
+TQString KateSearch::s_pattern = TQString();
static const bool arbitraryHLExample = false;
KateSearch::KateSearch( KateView* view )
- : QObject( view, "kate search" )
+ : TQObject( view, "kate search" )
, m_view( view )
, m_doc( view->doc() )
, replacePrompt( new KateReplacePrompt( view ) )
@@ -58,7 +58,7 @@ KateSearch::KateSearch( KateView* view )
m_arbitraryHLList = new KateSuperRangeList();
if (arbitraryHLExample) m_doc->arbitraryHL()->addHighlightToView(m_arbitraryHLList, m_view);
- connect(replacePrompt,SIGNAL(clicked()),this,SLOT(replaceSlot()));
+ connect(replacePrompt,TQT_SIGNAL(clicked()),this,TQT_SLOT(replaceSlot()));
}
KateSearch::~KateSearch()
@@ -68,20 +68,20 @@ KateSearch::~KateSearch()
void KateSearch::createActions( KActionCollection* ac )
{
- KStdAction::find( this, SLOT(find()), ac )->setWhatsThis(
+ KStdAction::find( this, TQT_SLOT(find()), ac )->setWhatsThis(
i18n("Look up the first occurrence of a piece of text or regular expression."));
- KStdAction::findNext( this, SLOT(slotFindNext()), ac )->setWhatsThis(
+ KStdAction::findNext( this, TQT_SLOT(slotFindNext()), ac )->setWhatsThis(
i18n("Look up the next occurrence of the search phrase."));
- KStdAction::findPrev( this, SLOT(slotFindPrev()), ac, "edit_find_prev" )->setWhatsThis(
+ KStdAction::findPrev( this, TQT_SLOT(slotFindPrev()), ac, "edit_find_prev" )->setWhatsThis(
i18n("Look up the previous occurrence of the search phrase."));
- KStdAction::replace( this, SLOT(replace()), ac )->setWhatsThis(
+ KStdAction::replace( this, TQT_SLOT(replace()), ac )->setWhatsThis(
i18n("Look up a piece of text or regular expression and replace the result with some given text."));
}
-void KateSearch::addToList( QStringList& list, const QString& s )
+void KateSearch::addToList( TQStringList& list, const TQString& s )
{
if( list.count() > 0 ) {
- QStringList::Iterator it = list.find( s );
+ TQStringList::Iterator it = list.find( s );
if( *it != 0L )
list.remove( it );
if( list.count() >= 16 )
@@ -103,17 +103,17 @@ void KateSearch::find()
findDialog->setPattern (getSearchText());
- if( findDialog->exec() == QDialog::Accepted ) {
+ if( findDialog->exec() == TQDialog::Accepted ) {
s_searchList = findDialog->findHistory () ;
- // Do *not* remove the QString() wrapping, it fixes a nasty crash
- find( QString(s_searchList.first()), findDialog->options(), true, true );
+ // Do *not* remove the TQString() wrapping, it fixes a nasty crash
+ find( TQString(s_searchList.first()), findDialog->options(), true, true );
}
delete findDialog;
m_view->repaintText ();
}
-void KateSearch::find( const QString &pattern, long flags, bool add, bool shownotfound )
+void KateSearch::find( const TQString &pattern, long flags, bool add, bool shownotfound )
{
KateViewConfig::global()->setSearchFlags( flags );
if( add )
@@ -165,21 +165,21 @@ void KateSearch::replace()
replaceDialog->setPattern (getSearchText());
- if( replaceDialog->exec() == QDialog::Accepted ) {
+ if( replaceDialog->exec() == TQDialog::Accepted ) {
long opts = replaceDialog->options();
m_replacement = replaceDialog->replacement();
s_searchList = replaceDialog->findHistory () ;
s_replaceList = replaceDialog->replacementHistory () ;
- // Do *not* remove the QString() wrapping, it fixes a nasty crash
- replace( QString(s_searchList.first()), m_replacement, opts );
+ // Do *not* remove the TQString() wrapping, it fixes a nasty crash
+ replace( TQString(s_searchList.first()), m_replacement, opts );
}
delete replaceDialog;
m_view->update ();
}
-void KateSearch::replace( const QString& pattern, const QString &replacement, long flags )
+void KateSearch::replace( const TQString& pattern, const TQString &replacement, long flags )
{
if (!doc()->isReadWrite()) return;
@@ -375,18 +375,18 @@ void KateSearch::promptReplace()
void KateSearch::replaceOne()
{
- QString replaceWith = m_replacement;
+ TQString replaceWith = m_replacement;
if ( s.flags.regExp && s.flags.useBackRefs ) {
// Replace each "\0"..."\9" with the corresponding capture,
// "\n" and "\t" with newline and tab,
// "\\" with "\",
// and remove the "\" for any other sequence.
- QRegExp br("\\\\(.)");
+ TQRegExp br("\\\\(.)");
int pos = br.search( replaceWith );
int ncaps = m_re.numCaptures();
while ( pos >= 0 ) {
- QString substitute;
- QChar argument = br.cap(1).at(0);
+ TQString substitute;
+ TQChar argument = br.cap(1).at(0);
if ( argument.isDigit() ) {
// the second character is a digit, this is a backreference
int ccap = argument.digitValue();
@@ -482,12 +482,12 @@ void KateSearch::replaceSlot() {
bool KateSearch::askContinue()
{
- QString made =
+ TQString made =
i18n( "%n replacement made.",
"%n replacements made.",
replaces );
- QString reached = !s.flags.backward ?
+ TQString reached = !s.flags.backward ?
i18n( "End of document reached." ) :
i18n( "Beginning of document reached." );
@@ -498,11 +498,11 @@ bool KateSearch::askContinue()
i18n( "Beginning of selection reached." );
}
- QString question = !s.flags.backward ?
+ TQString question = !s.flags.backward ?
i18n( "Continue from the beginning?" ) :
i18n( "Continue from the end?" );
- QString text = s.flags.replace ?
+ TQString text = s.flags.replace ?
made + "\n" + reached + "\n" + question :
reached + "\n" + question;
@@ -511,13 +511,13 @@ bool KateSearch::askContinue()
KStdGuiItem::cont(), i18n("&Stop") );
}
-QString KateSearch::getSearchText()
+TQString KateSearch::getSearchText()
{
// SelectionOnly: use selection
// WordOnly: use word under cursor
// SelectionWord: use selection if available, else use word under cursor
// WordSelection: use word if available, else use selection
- QString str;
+ TQString str;
int getFrom = view()->config()->textToSearchMode();
switch (getFrom)
@@ -553,8 +553,8 @@ QString KateSearch::getSearchText()
break;
}
- str.replace( QRegExp("^\\n"), "" );
- str.replace( QRegExp("\\n.*"), "" );
+ str.replace( TQRegExp("^\\n"), "" );
+ str.replace( TQRegExp("\\n.*"), "" );
return str;
}
@@ -571,7 +571,7 @@ KateTextCursor KateSearch::getCursor( SearchFlags flags )
return KateTextCursor(view()->cursorLine(), view()->cursorColumnReal());
}
-bool KateSearch::doSearch( const QString& text )
+bool KateSearch::doSearch( const TQString& text )
{
/*
rodda: Still Working on this... :)
@@ -622,7 +622,7 @@ bool KateSearch::doSearch( const QString& text )
do {
if( regExp ) {
- m_re = QRegExp( text, caseSensitive );
+ m_re = TQRegExp( text, caseSensitive );
found = doc()->searchText( line, col, m_re,
&foundLine, &foundCol,
&matchLen, backward );
@@ -732,7 +732,7 @@ bool KateSearch::doSearch( const QString& text )
hl->setTextColor(Qt::white);
hl->setBGColor(Qt::black);
// destroy the highlight upon change
- connect(hl, SIGNAL(contentsChanged()), hl, SIGNAL(eliminated()));
+ connect(hl, TQT_SIGNAL(contentsChanged()), hl, TQT_SIGNAL(eliminated()));
m_arbitraryHLList->append(hl);
}
@@ -761,17 +761,17 @@ void KateSearch::exposeFound( KateTextCursor &cursor, int slen )
//BEGIN KateReplacePrompt
// this dialog is not modal
-KateReplacePrompt::KateReplacePrompt ( QWidget *parent )
+KateReplacePrompt::KateReplacePrompt ( TQWidget *parent )
: KDialogBase ( parent, 0L, false, i18n( "Replace Confirmation" ),
User3 | User2 | User1 | Close | Ok , Ok, true,
i18n("Replace &All"), i18n("Re&place && Close"), i18n("&Replace") )
{
setButtonOK( i18n("&Find Next") );
- QWidget *page = new QWidget(this);
+ TQWidget *page = new TQWidget(this);
setMainWidget(page);
- QBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
- QLabel *label = new QLabel(i18n("Found an occurrence of your search term. What do you want to do?"),page);
+ TQBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
+ TQLabel *label = new TQLabel(i18n("Found an occurrence of your search term. What do you want to do?"),page);
topLayout->addWidget(label );
}
@@ -814,13 +814,13 @@ void KateReplacePrompt::done (int result)
//END KateReplacePrompt
//BEGIN SearchCommand
-bool SearchCommand::exec(class Kate::View *view, const QString &cmd, QString &msg)
+bool SearchCommand::exec(class Kate::View *view, const TQString &cmd, TQString &msg)
{
- QString flags, pattern, replacement;
+ TQString flags, pattern, replacement;
if ( cmd.startsWith( "find" ) )
{
- static QRegExp re_find("find(?::([bcersw]*))?\\s+(.+)");
+ static TQRegExp re_find("find(?::([bcersw]*))?\\s+(.+)");
if ( re_find.search( cmd ) < 0 )
{
msg = i18n("Usage: find[:[bcersw]] PATTERN");
@@ -832,7 +832,7 @@ bool SearchCommand::exec(class Kate::View *view, const QString &cmd, QString &ms
else if ( cmd.startsWith( "ifind" ) )
{
- static QRegExp re_ifind("ifind(?::([bcrs]*))?\\s+(.*)");
+ static TQRegExp re_ifind("ifind(?::([bcrs]*))?\\s+(.*)");
if ( re_ifind.search( cmd ) < 0 )
{
msg = i18n("Usage: ifind[:[bcrs]] PATTERN");
@@ -845,11 +845,11 @@ bool SearchCommand::exec(class Kate::View *view, const QString &cmd, QString &ms
else if ( cmd.startsWith( "replace" ) )
{
// Try if the pattern and replacement is quoted, using a quote character ["']
- static QRegExp re_rep("replace(?::([bceprsw]*))?\\s+([\"'])((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s+\\2((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s*$");
+ static TQRegExp re_rep("replace(?::([bceprsw]*))?\\s+([\"'])((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s+\\2((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s*$");
// Or one quoted argument
- QRegExp re_rep1("replace(?::([bceprsw]*))?\\s+([\"'])((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s*$");
+ TQRegExp re_rep1("replace(?::([bceprsw]*))?\\s+([\"'])((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s*$");
// Else, it's just one or two (space separated) words
- QRegExp re_rep2("replace(?::([bceprsw]*))?\\s+(\\S+)(.*)");
+ TQRegExp re_rep2("replace(?::([bceprsw]*))?\\s+(\\S+)(.*)");
#define unbackslash(s) p=0;\
while ( (p = pattern.find( '\\' + delim, p )) > -1 )\
{\
@@ -867,7 +867,7 @@ while ( (p = pattern.find( '\\' + delim, p )) > -1 )\
int p(0);
// unbackslash backslashed delimiter strings
// in pattern ..
- QString delim = re_rep.cap( 2 );
+ TQString delim = re_rep.cap( 2 );
unbackslash(pattern);
// .. and in replacement
unbackslash(replacement);
@@ -878,7 +878,7 @@ while ( (p = pattern.find( '\\' + delim, p )) > -1 )\
pattern = re_rep1.cap( 3 );
int p(0);
- QString delim = re_rep1.cap( 2 );
+ TQString delim = re_rep1.cap( 2 );
unbackslash(pattern);
}
else if ( re_rep2.search( cmd ) >= 0 )
@@ -920,7 +920,7 @@ while ( (p = pattern.find( '\\' + delim, p )) > -1 )\
return false;
}
-bool SearchCommand::help(class Kate::View *, const QString &cmd, QString &msg)
+bool SearchCommand::help(class Kate::View *, const TQString &cmd, TQString &msg)
{
if ( cmd == "find" )
msg = i18n("<p>Usage: <code>find[:bcersw] PATTERN</code></p>");
@@ -959,25 +959,25 @@ bool SearchCommand::help(class Kate::View *, const QString &cmd, QString &msg)
return true;
}
-QStringList SearchCommand::cmds()
+TQStringList SearchCommand::cmds()
{
- QStringList l;
+ TQStringList l;
l << "find" << "replace" << "ifind";
return l;
}
-bool SearchCommand::wantsToProcessText( const QString &cmdname )
+bool SearchCommand::wantsToProcessText( const TQString &cmdname )
{
return cmdname == "ifind";
}
-void SearchCommand::processText( Kate::View *view, const QString &cmd )
+void SearchCommand::processText( Kate::View *view, const TQString &cmd )
{
- static QRegExp re_ifind("ifind(?::([bcrs]*))?\\s(.*)");
+ static TQRegExp re_ifind("ifind(?::([bcrs]*))?\\s(.*)");
if ( re_ifind.search( cmd ) > -1 )
{
- QString flags = re_ifind.cap( 1 );
- QString pattern = re_ifind.cap( 2 );
+ TQString flags = re_ifind.cap( 1 );
+ TQString pattern = re_ifind.cap( 2 );
// if there is no setup, or the text length is 0, set up the properties
@@ -1005,7 +1005,7 @@ void SearchCommand::processText( Kate::View *view, const QString &cmd )
}
}
-void SearchCommand::ifindInit( const QString &flags )
+void SearchCommand::ifindInit( const TQString &flags )
{
long f = 0;
if ( flags.contains( 'b' ) ) f |= KFindDialog::FindBackwards;
diff --git a/kate/part/katesearch.h b/kate/part/katesearch.h
index 3f2ce2ec6..ebf228dcd 100644
--- a/kate/part/katesearch.h
+++ b/kate/part/katesearch.h
@@ -28,10 +28,10 @@
#include <kdialogbase.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
class KateView;
class KateDocument;
@@ -102,7 +102,7 @@ class KateSearch : public QObject
* That must now be explicitly required -- the find dialog does, but the commandline
* incremental search does not.
*/
- void find( const QString &pattern, long flags, bool add=true, bool shownotfound=false );
+ void find( const TQString &pattern, long flags, bool add=true, bool shownotfound=false );
void replace();
/**
* Replace @p pattern with @p replacement given @p flags.
@@ -112,7 +112,7 @@ class KateSearch : public QObject
* @param replacement Replacement string.
* @param flags OR'd combination of KFindDialog::Options
*/
- void replace( const QString &pattern, const QString &replacement, long flags );
+ void replace( const TQString &pattern, const TQString &replacement, long flags );
void findAgain( bool reverseDirection );
private slots:
@@ -121,12 +121,12 @@ class KateSearch : public QObject
void slotFindPrev() { findAgain( true ); }
private:
- static void addToList( QStringList&, const QString& );
- static void addToSearchList( const QString& s ) { addToList( s_searchList, s ); }
- static void addToReplaceList( const QString& s ) { addToList( s_replaceList, s ); }
- static QStringList s_searchList; ///< recent patterns
- static QStringList s_replaceList; ///< recent replacement strings
- static QString s_pattern; ///< the string to search for
+ static void addToList( TQStringList&, const TQString& );
+ static void addToSearchList( const TQString& s ) { addToList( s_searchList, s ); }
+ static void addToReplaceList( const TQString& s ) { addToList( s_replaceList, s ); }
+ static TQStringList s_searchList; ///< recent patterns
+ static TQStringList s_replaceList; ///< recent replacement strings
+ static TQString s_pattern; ///< the string to search for
void search( SearchFlags flags );
void wrapSearch();
@@ -138,9 +138,9 @@ class KateSearch : public QObject
void replaceOne();
void skipOne();
- QString getSearchText();
+ TQString getSearchText();
KateTextCursor getCursor( SearchFlags flags );
- bool doSearch( const QString& text );
+ bool doSearch( const TQString& text );
void exposeFound( KateTextCursor &cursor, int slen );
inline KateView* view() { return m_view; }
@@ -153,13 +153,13 @@ class KateSearch : public QObject
SConfig s;
- QValueList<SConfig> m_searchResults;
+ TQValueList<SConfig> m_searchResults;
int m_resultIndex;
int replaces;
- QDialog* replacePrompt;
- QString m_replacement;
- QRegExp m_re;
+ TQDialog* replacePrompt;
+ TQString m_replacement;
+ TQRegExp m_re;
};
/**
@@ -174,7 +174,7 @@ class KateReplacePrompt : public KDialogBase
* Constructor
* @param parent parent widget for the dialog
*/
- KateReplacePrompt(QWidget *parent);
+ KateReplacePrompt(TQWidget *parent);
signals:
/**
@@ -219,17 +219,17 @@ class SearchCommand : public Kate::Command, public Kate::CommandExtension
{
public:
SearchCommand() : m_ifindFlags(0) {;}
- bool exec(class Kate::View *view, const QString &cmd, QString &errorMsg);
- bool help(class Kate::View *, const QString &, QString &);
- QStringList cmds();
- bool wantsToProcessText( const QString &/*cmdname*/ );
- void processText( Kate::View *view, const QString& text );
+ bool exec(class Kate::View *view, const TQString &cmd, TQString &errorMsg);
+ bool help(class Kate::View *, const TQString &, TQString &);
+ TQStringList cmds();
+ bool wantsToProcessText( const TQString &/*cmdname*/ );
+ void processText( Kate::View *view, const TQString& text );
private:
/**
* set up properties for incremental find
*/
- void ifindInit( const QString &cmd );
+ void ifindInit( const TQString &cmd );
/**
* clear properties for incremental find
*/
diff --git a/kate/part/katespell.cpp b/kate/part/katespell.cpp
index 1afd8d53f..6ce2b2a72 100644
--- a/kate/part/katespell.cpp
+++ b/kate/part/katespell.cpp
@@ -34,7 +34,7 @@
#include <kmessagebox.h>
KateSpell::KateSpell( KateView* view )
- : QObject( view )
+ : TQObject( view )
, m_view (view)
, m_kspell (0)
{
@@ -53,11 +53,11 @@ KateSpell::~KateSpell()
void KateSpell::createActions( KActionCollection* ac )
{
- KStdAction::spelling( this, SLOT(spellcheck()), ac );
- KAction *a = new KAction( i18n("Spelling (from cursor)..."), "spellcheck", 0, this, SLOT(spellcheckFromCursor()), ac, "tools_spelling_from_cursor" );
+ KStdAction::spelling( this, TQT_SLOT(spellcheck()), ac );
+ KAction *a = new KAction( i18n("Spelling (from cursor)..."), "spellcheck", 0, this, TQT_SLOT(spellcheckFromCursor()), ac, "tools_spelling_from_cursor" );
a->setWhatsThis(i18n("Check the document's spelling from the cursor and forward"));
- m_spellcheckSelection = new KAction( i18n("Spellcheck Selection..."), "spellcheck", 0, this, SLOT(spellcheckSelection()), ac, "tools_spelling_selection" );
+ m_spellcheckSelection = new KAction( i18n("Spellcheck Selection..."), "spellcheck", 0, this, TQT_SLOT(spellcheckSelection()), ac, "tools_spelling_selection" );
m_spellcheckSelection->setWhatsThis(i18n("Check spelling of the selected text"));
}
@@ -98,7 +98,7 @@ void KateSpell::spellcheck( const KateTextCursor &from, const KateTextCursor &to
m_spellPosCursor = from;
m_spellLastPos = 0;
- QString mt = m_view->doc()->mimeType()/*->name()*/;
+ TQString mt = m_view->doc()->mimeType()/*->name()*/;
KSpell::SpellerType type = KSpell::Text;
if ( mt == "text/x-tex" || mt == "text/x-latex" )
@@ -107,7 +107,7 @@ void KateSpell::spellcheck( const KateTextCursor &from, const KateTextCursor &to
type = KSpell::HTML;
KSpellConfig *ksc = new KSpellConfig;
- QStringList ksEncodings;
+ TQStringList ksEncodings;
ksEncodings << "US-ASCII" << "ISO 8859-1" << "ISO 8859-2" << "ISO 8859-3"
<< "ISO 8859-4" << "ISO 8859-5" << "ISO 8859-7" << "ISO 8859-8"
<< "ISO 8859-9" << "ISO 8859-13" << "ISO 8859-15" << "UTF-8"
@@ -123,17 +123,17 @@ void KateSpell::spellcheck( const KateTextCursor &from, const KateTextCursor &to
kdDebug(13020)<<"KateSpell::spellCheck(): using encoding: "<<enc<<" and KSpell::Type "<<type<<" (for '"<<mt<<"')"<<endl;
m_kspell = new KSpell( m_view, i18n("Spellcheck"),
- this, SLOT(ready(KSpell *)), ksc, true, true, type );
+ this, TQT_SLOT(ready(KSpell *)), ksc, true, true, type );
- connect( m_kspell, SIGNAL(death()),
- this, SLOT(spellCleanDone()) );
+ connect( m_kspell, TQT_SIGNAL(death()),
+ this, TQT_SLOT(spellCleanDone()) );
- connect( m_kspell, SIGNAL(misspelling(const QString&, const QStringList&, unsigned int)),
- this, SLOT(misspelling(const QString&, const QStringList&, unsigned int)) );
- connect( m_kspell, SIGNAL(corrected(const QString&, const QString&, unsigned int)),
- this, SLOT(corrected(const QString&, const QString&, unsigned int)) );
- connect( m_kspell, SIGNAL(done(const QString&)),
- this, SLOT(spellResult(const QString&)) );
+ connect( m_kspell, TQT_SIGNAL(misspelling(const TQString&, const TQStringList&, unsigned int)),
+ this, TQT_SLOT(misspelling(const TQString&, const TQStringList&, unsigned int)) );
+ connect( m_kspell, TQT_SIGNAL(corrected(const TQString&, const TQString&, unsigned int)),
+ this, TQT_SLOT(corrected(const TQString&, const TQString&, unsigned int)) );
+ connect( m_kspell, TQT_SIGNAL(done(const TQString&)),
+ this, TQT_SLOT(spellResult(const TQString&)) );
}
void KateSpell::ready(KSpell *)
@@ -170,7 +170,7 @@ void KateSpell::locatePosition( uint pos, uint& line, uint& col )
col = m_spellPosCursor.col();
}
-void KateSpell::misspelling( const QString& origword, const QStringList&, unsigned int pos )
+void KateSpell::misspelling( const TQString& origword, const TQStringList&, unsigned int pos )
{
uint line, col;
@@ -180,7 +180,7 @@ void KateSpell::misspelling( const QString& origword, const QStringList&, unsign
m_view->setSelection( line, col, line, col + origword.length() );
}
-void KateSpell::corrected( const QString& originalword, const QString& newword, unsigned int pos )
+void KateSpell::corrected( const TQString& originalword, const TQString& newword, unsigned int pos )
{
uint line, col;
@@ -190,7 +190,7 @@ void KateSpell::corrected( const QString& originalword, const QString& newword,
m_view->doc()->insertText( line, col, newword );
}
-void KateSpell::spellResult( const QString& )
+void KateSpell::spellResult( const TQString& )
{
m_view->clearSelection();
m_kspell->cleanUp();
diff --git a/kate/part/katespell.h b/kate/part/katespell.h
index db7dfe0ed..f376ece49 100644
--- a/kate/part/katespell.h
+++ b/kate/part/katespell.h
@@ -60,9 +60,9 @@ class KateSpell : public QObject
void spellcheck( const KateTextCursor &from, const KateTextCursor &to=KateTextCursor() );
void ready(KSpell *);
- void misspelling( const QString&, const QStringList&, unsigned int );
- void corrected ( const QString&, const QString&, unsigned int);
- void spellResult( const QString& );
+ void misspelling( const TQString&, const TQStringList&, unsigned int );
+ void corrected ( const TQString&, const TQString&, unsigned int);
+ void spellResult( const TQString& );
void spellCleanDone();
void locatePosition( uint pos, uint& line, uint& col );
diff --git a/kate/part/katesupercursor.cpp b/kate/part/katesupercursor.cpp
index 774b695db..8a2689014 100644
--- a/kate/part/katesupercursor.cpp
+++ b/kate/part/katesupercursor.cpp
@@ -23,10 +23,10 @@
#include <kdebug.h>
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
-KateSuperCursor::KateSuperCursor(KateDocument* doc, bool privateC, const KateTextCursor& cursor, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperCursor::KateSuperCursor(KateDocument* doc, bool privateC, const KateTextCursor& cursor, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, KateDocCursor(cursor.line(), cursor.col(), doc)
, Kate::Cursor ()
, m_doc (doc)
@@ -38,8 +38,8 @@ KateSuperCursor::KateSuperCursor(KateDocument* doc, bool privateC, const KateTex
m_doc->addSuperCursor (this, privateC);
}
-KateSuperCursor::KateSuperCursor(KateDocument* doc, bool privateC, int lineNum, int col, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperCursor::KateSuperCursor(KateDocument* doc, bool privateC, int lineNum, int col, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, KateDocCursor(lineNum, col, doc)
, Kate::Cursor ()
, m_doc (doc)
@@ -67,7 +67,7 @@ bool KateSuperCursor::setPosition(uint line, uint col)
return KateDocCursor::setPosition(line, col);
}
-bool KateSuperCursor::insertText(const QString& s)
+bool KateSuperCursor::insertText(const TQString& s)
{
return KateDocCursor::insertText(s);
}
@@ -77,7 +77,7 @@ bool KateSuperCursor::removeText(uint nbChar)
return KateDocCursor::removeText(nbChar);
}
-QChar KateSuperCursor::currentChar() const
+TQChar KateSuperCursor::currentChar() const
{
return KateDocCursor::currentChar();
}
@@ -272,13 +272,13 @@ void KateSuperCursor::editLineRemoved(uint line)
emit positionUnChanged();
}
-KateSuperCursor::operator QString()
+KateSuperCursor::operator TQString()
{
- return QString("[%1,%1]").arg(line()).arg(col());
+ return TQString("[%1,%1]").arg(line()).arg(col());
}
-KateSuperRange::KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperRange::KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, m_start(start)
, m_end(end)
, m_evaluate(false)
@@ -290,8 +290,8 @@ KateSuperRange::KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, QOb
init();
}
-KateSuperRange::KateSuperRange(KateDocument* doc, const KateRange& range, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperRange::KateSuperRange(KateDocument* doc, const KateRange& range, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, m_start(new KateSuperCursor(doc, true, range.start()))
, m_end(new KateSuperCursor(doc, true, range.end()))
, m_evaluate(false)
@@ -303,8 +303,8 @@ KateSuperRange::KateSuperRange(KateDocument* doc, const KateRange& range, QObjec
init();
}
-KateSuperRange::KateSuperRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperRange::KateSuperRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, m_start(new KateSuperCursor(doc, true, start))
, m_end(new KateSuperCursor(doc, true, end))
, m_evaluate(false)
@@ -328,15 +328,15 @@ void KateSuperRange::init()
setBehaviour(DoNotExpand);
// Not necessarily the best implementation
- connect(m_start, SIGNAL(positionDirectlyChanged()), SIGNAL(contentsChanged()));
- connect(m_end, SIGNAL(positionDirectlyChanged()), SIGNAL(contentsChanged()));
+ connect(m_start, TQT_SIGNAL(positionDirectlyChanged()), TQT_SIGNAL(contentsChanged()));
+ connect(m_end, TQT_SIGNAL(positionDirectlyChanged()), TQT_SIGNAL(contentsChanged()));
- connect(m_start, SIGNAL(positionChanged()), SLOT(slotEvaluateChanged()));
- connect(m_end, SIGNAL(positionChanged()), SLOT(slotEvaluateChanged()));
- connect(m_start, SIGNAL(positionUnChanged()), SLOT(slotEvaluateUnChanged()));
- connect(m_end, SIGNAL(positionUnChanged()), SLOT(slotEvaluateUnChanged()));
- connect(m_start, SIGNAL(positionDeleted()), SIGNAL(boundaryDeleted()));
- connect(m_end, SIGNAL(positionDeleted()), SIGNAL(boundaryDeleted()));
+ connect(m_start, TQT_SIGNAL(positionChanged()), TQT_SLOT(slotEvaluateChanged()));
+ connect(m_end, TQT_SIGNAL(positionChanged()), TQT_SLOT(slotEvaluateChanged()));
+ connect(m_start, TQT_SIGNAL(positionUnChanged()), TQT_SLOT(slotEvaluateUnChanged()));
+ connect(m_end, TQT_SIGNAL(positionUnChanged()), TQT_SLOT(slotEvaluateUnChanged()));
+ connect(m_start, TQT_SIGNAL(positionDeleted()), TQT_SIGNAL(boundaryDeleted()));
+ connect(m_end, TQT_SIGNAL(positionDeleted()), TQT_SIGNAL(boundaryDeleted()));
}
KateSuperRange::~KateSuperRange()
@@ -411,7 +411,7 @@ bool KateSuperRange::owns(const KateTextCursor& cursor) const
if (!includes(cursor)) return false;
if (children())
- for (QObjectListIt it(*children()); *it; ++it)
+ for (TQObjectListIt it(*children()); *it; ++it)
if ((*it)->inherits("KateSuperRange"))
if (static_cast<KateSuperRange*>(*it)->owns(cursor))
return false;
@@ -446,7 +446,7 @@ bool KateSuperRange::boundaryOn(uint lineNum) const
void KateSuperRange::slotEvaluateChanged()
{
- if (sender() == static_cast<QObject*>(m_start)) {
+ if (sender() == static_cast<TQObject*>(m_start)) {
if (m_evaluate) {
if (!m_endChanged) {
// Only one was changed
@@ -484,7 +484,7 @@ void KateSuperRange::slotEvaluateChanged()
void KateSuperRange::slotEvaluateUnChanged()
{
- if (sender() == static_cast<QObject*>(m_start)) {
+ if (sender() == static_cast<TQObject*>(m_start)) {
if (m_evaluate) {
if (m_endChanged) {
// Only one changed
@@ -536,7 +536,7 @@ void KateSuperRange::evaluatePositionChanged()
emit positionChanged();
}
-int KateSuperCursorList::compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2)
+int KateSuperCursorList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2)
{
if (*(static_cast<KateSuperCursor*>(item1)) == *(static_cast<KateSuperCursor*>(item2)))
return 0;
@@ -544,8 +544,8 @@ int KateSuperCursorList::compareItems(QPtrCollection::Item item1, QPtrCollection
return *(static_cast<KateSuperCursor*>(item1)) < *(static_cast<KateSuperCursor*>(item2)) ? -1 : 1;
}
-KateSuperRangeList::KateSuperRangeList(bool autoManage, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperRangeList::KateSuperRangeList(bool autoManage, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, m_autoManage(autoManage)
, m_connect(true)
, m_trackingBoundaries(false)
@@ -553,8 +553,8 @@ KateSuperRangeList::KateSuperRangeList(bool autoManage, QObject* parent, const c
setAutoManage(autoManage);
}
-KateSuperRangeList::KateSuperRangeList(const QPtrList<KateSuperRange>& rangeList, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperRangeList::KateSuperRangeList(const TQPtrList<KateSuperRange>& rangeList, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, m_autoManage(false)
, m_connect(false)
, m_trackingBoundaries(false)
@@ -562,9 +562,9 @@ KateSuperRangeList::KateSuperRangeList(const QPtrList<KateSuperRange>& rangeList
appendList(rangeList);
}
-void KateSuperRangeList::appendList(const QPtrList<KateSuperRange>& rangeList)
+void KateSuperRangeList::appendList(const TQPtrList<KateSuperRange>& rangeList)
{
- for (QPtrListIterator<KateSuperRange> it = rangeList; *it; ++it)
+ for (TQPtrListIterator<KateSuperRange> it = rangeList; *it; ++it)
append(*it);
}
@@ -573,7 +573,7 @@ void KateSuperRangeList::clear()
for (KateSuperRange* range = first(); range; range = next())
emit rangeEliminated(range);
- QPtrList<KateSuperRange>::clear();
+ TQPtrList<KateSuperRange>::clear();
}
void KateSuperRangeList::connectAll()
@@ -581,8 +581,8 @@ void KateSuperRangeList::connectAll()
if (!m_connect) {
m_connect = true;
for (KateSuperRange* range = first(); range; range = next()) {
- connect(range, SIGNAL(destroyed(QObject*)), SLOT(slotDeleted(QObject*)));
- connect(range, SIGNAL(eliminated()), SLOT(slotEliminated()));
+ connect(range, TQT_SIGNAL(destroyed(TQObject*)), TQT_SLOT(slotDeleted(TQObject*)));
+ connect(range, TQT_SIGNAL(eliminated()), TQT_SLOT(slotEliminated()));
}
}
}
@@ -598,11 +598,11 @@ void KateSuperRangeList::setAutoManage(bool autoManage)
setAutoDelete(m_autoManage);
}
-QPtrList<KateSuperRange> KateSuperRangeList::rangesIncluding(const KateTextCursor& cursor)
+TQPtrList<KateSuperRange> KateSuperRangeList::rangesIncluding(const KateTextCursor& cursor)
{
sort();
- QPtrList<KateSuperRange> ret;
+ TQPtrList<KateSuperRange> ret;
for (KateSuperRange* r = first(); r; r = next())
if (r->includes(cursor))
@@ -611,11 +611,11 @@ QPtrList<KateSuperRange> KateSuperRangeList::rangesIncluding(const KateTextCurso
return ret;
}
-QPtrList<KateSuperRange> KateSuperRangeList::rangesIncluding(uint line)
+TQPtrList<KateSuperRange> KateSuperRangeList::rangesIncluding(uint line)
{
sort();
- QPtrList<KateSuperRange> ret;
+ TQPtrList<KateSuperRange> ret;
for (KateSuperRange* r = first(); r; r = next())
if (r->includes(line))
@@ -636,7 +636,7 @@ bool KateSuperRangeList::rangesInclude(const KateTextCursor& cursor)
void KateSuperRangeList::slotEliminated()
{
if (sender()) {
- KateSuperRange* range = static_cast<KateSuperRange*>(const_cast<QObject*>(sender()));
+ KateSuperRange* range = static_cast<KateSuperRange*>(const_cast<TQObject*>(sender()));
emit rangeEliminated(range);
if (m_trackingBoundaries) {
@@ -652,7 +652,7 @@ void KateSuperRangeList::slotEliminated()
}
}
-void KateSuperRangeList::slotDeleted(QObject* range)
+void KateSuperRangeList::slotDeleted(TQObject* range)
{
//kdDebug(13020)<<"KateSuperRangeList::slotDeleted"<<endl;
KateSuperRange* r = static_cast<KateSuperRange*>(range);
@@ -685,7 +685,7 @@ KateSuperCursor* KateSuperRangeList::firstBoundary(const KateTextCursor* start)
m_columnBoundaries.sort();
if (start)
- // OPTIMISE: QMap with QPtrList for each line? (==> sorting issues :( )
+ // OPTIMISE: TQMap with TQPtrList for each line? (==> sorting issues :( )
for (KateSuperCursor* c = m_columnBoundaries.first(); c; c = m_columnBoundaries.next())
if (*start <= *c)
break;
@@ -711,7 +711,7 @@ KateSuperCursor* KateSuperRangeList::currentBoundary()
return m_columnBoundaries.current();
}
-int KateSuperRangeList::compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2)
+int KateSuperRangeList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2)
{
if (static_cast<KateSuperRange*>(item1)->superStart() == static_cast<KateSuperRange*>(item2)->superStart()) {
if (static_cast<KateSuperRange*>(item1)->superEnd() == static_cast<KateSuperRange*>(item2)->superEnd()) {
@@ -724,12 +724,12 @@ int KateSuperRangeList::compareItems(QPtrCollection::Item item1, QPtrCollection:
return static_cast<KateSuperRange*>(item1)->superStart() < static_cast<KateSuperRange*>(item2)->superStart() ? -1 : 1;
}
-QPtrCollection::Item KateSuperRangeList::newItem(QPtrCollection::Item d)
+TQPtrCollection::Item KateSuperRangeList::newItem(TQPtrCollection::Item d)
{
if (m_connect) {
- connect(static_cast<KateSuperRange*>(d), SIGNAL(destroyed(QObject*)), SLOT(slotDeleted(QObject*)));
- connect(static_cast<KateSuperRange*>(d), SIGNAL(eliminated()), SLOT(slotEliminated()));
- connect(static_cast<KateSuperRange*>(d), SIGNAL(tagRange(KateSuperRange*)), SIGNAL(tagRange(KateSuperRange*)));
+ connect(static_cast<KateSuperRange*>(d), TQT_SIGNAL(destroyed(TQObject*)), TQT_SLOT(slotDeleted(TQObject*)));
+ connect(static_cast<KateSuperRange*>(d), TQT_SIGNAL(eliminated()), TQT_SLOT(slotEliminated()));
+ connect(static_cast<KateSuperRange*>(d), TQT_SIGNAL(tagRange(KateSuperRange*)), TQT_SIGNAL(tagRange(KateSuperRange*)));
// HACK HACK
static_cast<KateSuperRange*>(d)->slotTagRange();
@@ -740,7 +740,7 @@ QPtrCollection::Item KateSuperRangeList::newItem(QPtrCollection::Item d)
m_columnBoundaries.append(&(static_cast<KateSuperRange*>(d)->superEnd()));
}
- return QPtrList<KateSuperRange>::newItem(d);
+ return TQPtrList<KateSuperRange>::newItem(d);
}
// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katesupercursor.h b/kate/part/katesupercursor.h
index e6b16baa8..ef0fd378d 100644
--- a/kate/part/katesupercursor.h
+++ b/kate/part/katesupercursor.h
@@ -42,7 +42,7 @@ class KateView;
*
* @author Hamish Rodda
**/
-class KateSuperCursor : public QObject, public KateDocCursor, public Kate::Cursor
+class KateSuperCursor : public TQObject, public KateDocCursor, public Kate::Cursor
{
Q_OBJECT
@@ -52,8 +52,8 @@ public:
* all internally only used SuperCursors should be private or people could modify them from the
* outside breaking kate's internals
*/
- KateSuperCursor(KateDocument* doc, bool privateC, const KateTextCursor& cursor, QObject* parent = 0L, const char* name = 0L);
- KateSuperCursor(KateDocument* doc, bool privateC, int lineNum = 0, int col = 0, QObject* parent = 0L, const char* name = 0L);
+ KateSuperCursor(KateDocument* doc, bool privateC, const KateTextCursor& cursor, TQObject* parent = 0L, const char* name = 0L);
+ KateSuperCursor(KateDocument* doc, bool privateC, int lineNum = 0, int col = 0, TQObject* parent = 0L, const char* name = 0L);
~KateSuperCursor ();
@@ -61,9 +61,9 @@ public:
// KTextEditor::Cursor interface
void position(uint *line, uint *col) const;
bool setPosition(uint line, uint col);
- bool insertText(const QString& text);
+ bool insertText(const TQString& text);
bool removeText(uint numberOfCharacters);
- QChar currentChar() const;
+ TQChar currentChar() const;
/**
* @returns true if the cursor is situated at the start of the line, false if it isn't.
@@ -91,7 +91,7 @@ public:
/**
* Debug: output the position.
*/
- operator QString();
+ operator TQString();
// Reimplementations;
virtual void setLine(int lineNum);
@@ -165,7 +165,7 @@ public:
*
* Also tracks its position and emits useful signals.
*/
-class KateSuperRange : public QObject, public KateRange
+class KateSuperRange : public TQObject, public KateRange
{
friend class KateSuperRangeList;
@@ -185,9 +185,9 @@ public:
/**
* Constructor. Takes posession of @p start and @p end.
*/
- KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, QObject* parent = 0L, const char* name = 0L);
- KateSuperRange(KateDocument* doc, const KateRange& range, QObject* parent = 0L, const char* name = 0L);
- KateSuperRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, QObject* parent = 0L, const char* name = 0L);
+ KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, TQObject* parent = 0L, const char* name = 0L);
+ KateSuperRange(KateDocument* doc, const KateRange& range, TQObject* parent = 0L, const char* name = 0L);
+ KateSuperRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent = 0L, const char* name = 0L);
virtual ~KateSuperRange();
@@ -330,13 +330,13 @@ private:
bool m_allowZeroLength;
};
-class KateSuperCursorList : public QPtrList<KateSuperCursor>
+class KateSuperCursorList : public TQPtrList<KateSuperCursor>
{
protected:
- virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2);
+ virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2);
};
-class KateSuperRangeList : public QObject, public QPtrList<KateSuperRange>
+class KateSuperRangeList : public TQObject, public TQPtrList<KateSuperRange>
{
Q_OBJECT
@@ -344,7 +344,7 @@ public:
/**
* @sa autoManage()
*/
- KateSuperRangeList(bool autoManage = true, QObject* parent = 0L, const char* name = 0L);
+ KateSuperRangeList(bool autoManage = true, TQObject* parent = 0L, const char* name = 0L);
/**
* Semi-copy constructor.
@@ -355,7 +355,7 @@ public:
* Also, does not connect signals and slots to save time, as this is mainly
* used by the document itself while drawing (call connectAll() to re-constitute)
*/
- KateSuperRangeList(const QPtrList<KateSuperRange>& rangeList, QObject* parent = 0L, const char* name = 0L);
+ KateSuperRangeList(const TQPtrList<KateSuperRange>& rangeList, TQObject* parent = 0L, const char* name = 0L);
virtual ~KateSuperRangeList() {}
/**
@@ -363,7 +363,7 @@ public:
* If this object was created by the semi-copy constructor, it may not connect items
* (unless connectAll() has already been called), call connectAll().
*/
- void appendList(const QPtrList<KateSuperRange>& rangeList);
+ void appendList(const TQPtrList<KateSuperRange>& rangeList);
/**
* Connect items that are not connected. This only needs to be called once,
@@ -391,8 +391,8 @@ public:
* This is just a straight-forward list so that there is no confusion about whether
* this list should be auto-managed (ie. it shouldn't, to avoid double deletions).
*/
- QPtrList<KateSuperRange> rangesIncluding(const KateTextCursor& cursor);
- QPtrList<KateSuperRange> rangesIncluding(uint line);
+ TQPtrList<KateSuperRange> rangesIncluding(const KateTextCursor& cursor);
+ TQPtrList<KateSuperRange> rangesIncluding(uint line);
/**
* @retval true if one of the ranges in the list includes @p cursor
@@ -439,16 +439,16 @@ protected:
/**
* internal reimplementation
*/
- virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2);
+ virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2);
/**
* internal reimplementation
*/
- virtual QPtrCollection::Item newItem(QPtrCollection::Item d);
+ virtual TQPtrCollection::Item newItem(TQPtrCollection::Item d);
private slots:
void slotEliminated();
- void slotDeleted(QObject* range);
+ void slotDeleted(TQObject* range);
private:
bool m_autoManage;
diff --git a/kate/part/katesyntaxdocument.cpp b/kate/part/katesyntaxdocument.cpp
index e5c18c8ef..8e391b620 100644
--- a/kate/part/katesyntaxdocument.cpp
+++ b/kate/part/katesyntaxdocument.cpp
@@ -29,10 +29,10 @@
#include <kmessagebox.h>
#include <kconfig.h>
-#include <qfile.h>
+#include <tqfile.h>
KateSyntaxDocument::KateSyntaxDocument(bool force)
- : QDomDocument()
+ : TQDomDocument()
{
// Let's build the Mode List (katesyntaxhighlightingrc)
setupModeList(force);
@@ -48,20 +48,20 @@ KateSyntaxDocument::~KateSyntaxDocument()
the new one and assign some other things.
identifier = File name and path of the new xml needed
*/
-bool KateSyntaxDocument::setIdentifier(const QString& identifier)
+bool KateSyntaxDocument::setIdentifier(const TQString& identifier)
{
// if the current file is the same as the new one don't do anything.
if(currentFile != identifier)
{
// let's open the new file
- QFile f( identifier );
+ TQFile f( identifier );
if ( f.open(IO_ReadOnly) )
{
// Let's parse the contets of the xml file
/* The result of this function should be check for robustness,
a false returned means a parse error */
- QString errorMsg;
+ TQString errorMsg;
int line, col;
bool success=setContent(&f,&errorMsg,&line,&col);
@@ -100,7 +100,7 @@ bool KateSyntaxDocument::nextGroup( KateSyntaxContextData* data)
if (data->currentGroup.isNull())
{
// Skip over non-elements. So far non-elements are just comments
- QDomNode node = data->parent.firstChild();
+ TQDomNode node = data->parent.firstChild();
while (node.isComment())
node = node.nextSibling();
@@ -109,7 +109,7 @@ bool KateSyntaxDocument::nextGroup( KateSyntaxContextData* data)
else
{
// common case, iterate over siblings, skipping comments as we go
- QDomNode node = data->currentGroup.nextSibling();
+ TQDomNode node = data->currentGroup.nextSibling();
while (node.isComment())
node = node.nextSibling();
@@ -129,7 +129,7 @@ bool KateSyntaxDocument::nextItem( KateSyntaxContextData* data)
if (data->item.isNull())
{
- QDomNode node = data->currentGroup.firstChild();
+ TQDomNode node = data->currentGroup.firstChild();
while (node.isComment())
node = node.nextSibling();
@@ -137,7 +137,7 @@ bool KateSyntaxDocument::nextItem( KateSyntaxContextData* data)
}
else
{
- QDomNode node = data->item.nextSibling();
+ TQDomNode node = data->item.nextSibling();
while (node.isComment())
node = node.nextSibling();
@@ -150,9 +150,9 @@ bool KateSyntaxDocument::nextItem( KateSyntaxContextData* data)
/**
* This function is used to fetch the atributes of the tags of the item in a KateSyntaxContextData.
*/
-QString KateSyntaxDocument::groupItemData( const KateSyntaxContextData* data, const QString& name){
+TQString KateSyntaxDocument::groupItemData( const KateSyntaxContextData* data, const TQString& name){
if(!data)
- return QString::null;
+ return TQString::null;
// If there's no name just return the tag name of data->item
if ( (!data->item.isNull()) && (name.isEmpty()))
@@ -166,14 +166,14 @@ QString KateSyntaxDocument::groupItemData( const KateSyntaxContextData* data, co
return data->item.attribute(name);
}
- return QString::null;
+ return TQString::null;
}
-QString KateSyntaxDocument::groupData( const KateSyntaxContextData* data,const QString& name)
+TQString KateSyntaxDocument::groupData( const KateSyntaxContextData* data,const TQString& name)
{
if(!data)
- return QString::null;
+ return TQString::null;
if (!data->currentGroup.isNull())
{
@@ -181,7 +181,7 @@ QString KateSyntaxDocument::groupData( const KateSyntaxContextData* data,const Q
}
else
{
- return QString::null;
+ return TQString::null;
}
}
@@ -204,25 +204,25 @@ KateSyntaxContextData* KateSyntaxDocument::getSubItems(KateSyntaxContextData* da
return retval;
}
-bool KateSyntaxDocument::getElement (QDomElement &element, const QString &mainGroupName, const QString &config)
+bool KateSyntaxDocument::getElement (TQDomElement &element, const TQString &mainGroupName, const TQString &config)
{
kdDebug(13010) << "Looking for \"" << mainGroupName << "\" -> \"" << config << "\"." << endl;
- QDomNodeList nodes = documentElement().childNodes();
+ TQDomNodeList nodes = documentElement().childNodes();
// Loop over all these child nodes looking for mainGroupName
for (unsigned int i=0; i<nodes.count(); i++)
{
- QDomElement elem = nodes.item(i).toElement();
+ TQDomElement elem = nodes.item(i).toElement();
if (elem.tagName() == mainGroupName)
{
// Found mainGroupName ...
- QDomNodeList subNodes = elem.childNodes();
+ TQDomNodeList subNodes = elem.childNodes();
// ... so now loop looking for config
for (unsigned int j=0; j<subNodes.count(); j++)
{
- QDomElement subElem = subNodes.item(j).toElement();
+ TQDomElement subElem = subNodes.item(j).toElement();
if (subElem.tagName() == config)
{
// Found it!
@@ -241,12 +241,12 @@ bool KateSyntaxDocument::getElement (QDomElement &element, const QString &mainGr
}
/**
- * Get the KateSyntaxContextData of the QDomElement Config inside mainGroupName
- * KateSyntaxContextData::item will contain the QDomElement found
+ * Get the KateSyntaxContextData of the TQDomElement Config inside mainGroupName
+ * KateSyntaxContextData::item will contain the TQDomElement found
*/
-KateSyntaxContextData* KateSyntaxDocument::getConfig(const QString& mainGroupName, const QString &config)
+KateSyntaxContextData* KateSyntaxDocument::getConfig(const TQString& mainGroupName, const TQString &config)
{
- QDomElement element;
+ TQDomElement element;
if (getElement(element, mainGroupName, config))
{
KateSyntaxContextData *data = new KateSyntaxContextData;
@@ -257,12 +257,12 @@ KateSyntaxContextData* KateSyntaxDocument::getConfig(const QString& mainGroupNam
}
/**
- * Get the KateSyntaxContextData of the QDomElement Config inside mainGroupName
- * KateSyntaxContextData::parent will contain the QDomElement found
+ * Get the KateSyntaxContextData of the TQDomElement Config inside mainGroupName
+ * KateSyntaxContextData::parent will contain the TQDomElement found
*/
-KateSyntaxContextData* KateSyntaxDocument::getGroupInfo(const QString& mainGroupName, const QString &group)
+KateSyntaxContextData* KateSyntaxDocument::getGroupInfo(const TQString& mainGroupName, const TQString &group)
{
- QDomElement element;
+ TQDomElement element;
if (getElement(element, mainGroupName, group+"s"))
{
KateSyntaxContextData *data = new KateSyntaxContextData;
@@ -275,30 +275,30 @@ KateSyntaxContextData* KateSyntaxDocument::getGroupInfo(const QString& mainGroup
/**
* Returns a list with all the keywords inside the list type
*/
-QStringList& KateSyntaxDocument::finddata(const QString& mainGroup, const QString& type, bool clearList)
+TQStringList& KateSyntaxDocument::finddata(const TQString& mainGroup, const TQString& type, bool clearList)
{
kdDebug(13010)<<"Create a list of keywords \""<<type<<"\" from \""<<mainGroup<<"\"."<<endl;
if (clearList)
m_data.clear();
- for(QDomNode node = documentElement().firstChild(); !node.isNull(); node = node.nextSibling())
+ for(TQDomNode node = documentElement().firstChild(); !node.isNull(); node = node.nextSibling())
{
- QDomElement elem = node.toElement();
+ TQDomElement elem = node.toElement();
if (elem.tagName() == mainGroup)
{
kdDebug(13010)<<"\""<<mainGroup<<"\" found."<<endl;
- QDomNodeList nodelist1 = elem.elementsByTagName("list");
+ TQDomNodeList nodelist1 = elem.elementsByTagName("list");
for (uint l=0; l<nodelist1.count(); l++)
{
if (nodelist1.item(l).toElement().attribute("name") == type)
{
kdDebug(13010)<<"List with attribute name=\""<<type<<"\" found."<<endl;
- QDomNodeList childlist = nodelist1.item(l).toElement().childNodes();
+ TQDomNodeList childlist = nodelist1.item(l).toElement().childNodes();
for (uint i=0; i<childlist.count(); i++)
{
- QString element = childlist.item(i).toElement().text().stripWhiteSpace();
+ TQString element = childlist.item(i).toElement().text().stripWhiteSpace();
if (element.isEmpty())
continue;
#ifndef NDEBUG
@@ -346,13 +346,13 @@ void KateSyntaxDocument::setupModeList (bool force)
}
// Let's get a list of all the xml files for hl
- QStringList list = KGlobal::dirs()->findAllResources("data","katepart/syntax/*.xml",false,true);
+ TQStringList list = KGlobal::dirs()->findAllResources("data","katepart/syntax/*.xml",false,true);
// Let's iterate through the list and build the Mode List
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
// Each file has a group called:
- QString Group="Cache "+ *it;
+ TQString Group="Cache "+ *it;
// Let's go to this group
config.setGroup(Group);
@@ -360,7 +360,7 @@ void KateSyntaxDocument::setupModeList (bool force)
// stat the file
struct stat sbuf;
memset (&sbuf, 0, sizeof(sbuf));
- stat(QFile::encodeName(*it), &sbuf);
+ stat(TQFile::encodeName(*it), &sbuf);
// If the group exist and we're not forced to read the xml file, let's build myModeList for katesyntax..rc
if (!force && config.hasGroup(Group) && (sbuf.st_mtime == config.readNumEntry("lastModified")))
@@ -387,13 +387,13 @@ void KateSyntaxDocument::setupModeList (bool force)
kdDebug (13010) << "UPDATE hl cache for: " << *it << endl;
// We're forced to read the xml files or the mode doesn't exist in the katesyntax...rc
- QFile f(*it);
+ TQFile f(*it);
if (f.open(IO_ReadOnly))
{
// Ok we opened the file, let's read the contents and close the file
/* the return of setContent should be checked because a false return shows a parsing error */
- QString errMsg;
+ TQString errMsg;
int line, col;
bool success = setContent(&f,&errMsg,&line,&col);
@@ -402,7 +402,7 @@ void KateSyntaxDocument::setupModeList (bool force)
if (success)
{
- QDomElement root = documentElement();
+ TQDomElement root = documentElement();
if (!root.isNull())
{
@@ -421,7 +421,7 @@ void KateSyntaxDocument::setupModeList (bool force)
mli->author = root.attribute("author");
mli->license = root.attribute("license");
- QString hidden = root.attribute("hidden");
+ TQString hidden = root.attribute("hidden");
mli->hidden = (hidden == "true" || hidden == "TRUE");
mli->identifier = *it;
@@ -458,7 +458,7 @@ void KateSyntaxDocument::setupModeList (bool force)
emli->mimetype="invalid_file/invalid_file";
emli->extension="invalid_file.invalid_file";
emli->version="1.";
- emli->name=QString ("Error: %1").arg(*it); // internal
+ emli->name=TQString ("Error: %1").arg(*it); // internal
emli->nameTranslated=i18n("Error: %1").arg(*it); // translated
emli->identifier=(*it);
diff --git a/kate/part/katesyntaxdocument.h b/kate/part/katesyntaxdocument.h
index 1e5171390..93deb731d 100644
--- a/kate/part/katesyntaxdocument.h
+++ b/kate/part/katesyntaxdocument.h
@@ -20,8 +20,8 @@
#ifndef __KATE_SYNTAXDOCUMENT_H__
#define __KATE_SYNTAXDOCUMENT_H__
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
/**
* Information about each syntax hl Mode
@@ -29,23 +29,23 @@
class KateSyntaxModeListItem
{
public:
- QString name;
- QString nameTranslated;
- QString section;
- QString mimetype;
- QString extension;
- QString identifier;
- QString version;
- QString priority;
- QString author;
- QString license;
+ TQString name;
+ TQString nameTranslated;
+ TQString section;
+ TQString mimetype;
+ TQString extension;
+ TQString identifier;
+ TQString version;
+ TQString priority;
+ TQString author;
+ TQString license;
bool hidden;
};
/**
* List of the KateSyntaxModeListItems holding all the syntax mode list items
*/
-typedef QValueList<KateSyntaxModeListItem*> KateSyntaxModeList;
+typedef TQValueList<KateSyntaxModeListItem*> KateSyntaxModeList;
/**
* Class holding the data around the current QDomElement
@@ -53,9 +53,9 @@ typedef QValueList<KateSyntaxModeListItem*> KateSyntaxModeList;
class KateSyntaxContextData
{
public:
- QDomElement parent;
- QDomElement currentGroup;
- QDomElement item;
+ TQDomElement parent;
+ TQDomElement currentGroup;
+ TQDomElement item;
};
/**
@@ -82,7 +82,7 @@ class KateSyntaxDocument : public QDomDocument
* @param identifier file name and path of the new xml needed
* @return success
*/
- bool setIdentifier(const QString& identifier);
+ bool setIdentifier(const TQString& identifier);
/**
* Get the mode list
@@ -107,8 +107,8 @@ class KateSyntaxDocument : public QDomDocument
/**
* This function is used to fetch the atributes of the tags.
*/
- QString groupItemData(const KateSyntaxContextData* data,const QString& name);
- QString groupData(const KateSyntaxContextData* data,const QString& name);
+ TQString groupItemData(const KateSyntaxContextData* data,const TQString& name);
+ TQString groupData(const KateSyntaxContextData* data,const TQString& name);
void freeGroupInfo(KateSyntaxContextData* data);
KateSyntaxContextData* getSubItems(KateSyntaxContextData* data);
@@ -117,18 +117,18 @@ class KateSyntaxDocument : public QDomDocument
* Get the KateSyntaxContextData of the DomElement Config inside mainGroupName
* It just fills KateSyntaxContextData::item
*/
- KateSyntaxContextData* getConfig(const QString& mainGroupName, const QString &config);
+ KateSyntaxContextData* getConfig(const TQString& mainGroupName, const TQString &config);
/**
- * Get the KateSyntaxContextData of the QDomElement Config inside mainGroupName
- * KateSyntaxContextData::parent will contain the QDomElement found
+ * Get the KateSyntaxContextData of the TQDomElement Config inside mainGroupName
+ * KateSyntaxContextData::parent will contain the TQDomElement found
*/
- KateSyntaxContextData* getGroupInfo(const QString& mainGroupName, const QString &group);
+ KateSyntaxContextData* getGroupInfo(const TQString& mainGroupName, const TQString &group);
/**
* Returns a list with all the keywords inside the list type
*/
- QStringList& finddata(const QString& mainGroup,const QString& type,bool clearList=true);
+ TQStringList& finddata(const TQString& mainGroup,const TQString& type,bool clearList=true);
private:
/**
@@ -141,7 +141,7 @@ class KateSyntaxDocument : public QDomDocument
* Used by getConfig and getGroupInfo to traverse the xml nodes and
* evenually return the found element
*/
- bool getElement (QDomElement &element, const QString &mainGroupName, const QString &config);
+ bool getElement (TQDomElement &element, const TQString &mainGroupName, const TQString &config);
/**
* List of mode items
@@ -151,12 +151,12 @@ class KateSyntaxDocument : public QDomDocument
/**
* current parsed filename
*/
- QString currentFile;
+ TQString currentFile;
/**
* last found data out of the xml
*/
- QStringList m_data;
+ TQStringList m_data;
};
#endif
diff --git a/kate/part/katetemplatehandler.cpp b/kate/part/katetemplatehandler.cpp
index 3ca86ff70..52e07a2e4 100644
--- a/kate/part/katetemplatehandler.cpp
+++ b/kate/part/katetemplatehandler.cpp
@@ -21,16 +21,16 @@
#include "katesupercursor.h"
#include "katearbitraryhighlight.h"
#include "kateview.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
KateTemplateHandler::KateTemplateHandler(
KateDocument *doc,
uint line, uint column,
- const QString &templateString,
- const QMap<QString, QString> &initialValues )
- : QObject( doc )
+ const TQString &templateString,
+ const TQMap<TQString, TQString> &initialValues )
+ : TQObject( doc )
, KateKeyInterceptorFunctor()
, m_doc( doc )
, m_currentTabStop( -1 )
@@ -38,7 +38,7 @@ KateTemplateHandler::KateTemplateHandler(
, m_initOk( false )
, m_recursion( false )
{
- connect( m_doc, SIGNAL( destroyed() ), this, SLOT( slotDocumentDestroyed() ) );
+ connect( m_doc, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDocumentDestroyed() ) );
m_ranges = new KateSuperRangeList( false, this ); //false/*,this*/);
if ( !m_doc->setTabInterceptor( this ) )
@@ -53,12 +53,12 @@ KateTemplateHandler::KateTemplateHandler(
hlr->setUnderline(true);
hlr->setOverline(true);
l->append(hlr);*/
- QValueList<KateTemplateHandlerPlaceHolderInfo> buildList;
- QRegExp rx( "([$%])\\{([^}\\s]+)\\}" );
+ TQValueList<KateTemplateHandlerPlaceHolderInfo> buildList;
+ TQRegExp rx( "([$%])\\{([^}\\s]+)\\}" );
rx.setMinimal( true );
int pos = 0;
int opos = 0;
- QString insertString = templateString;
+ TQString insertString = templateString;
while ( pos >= 0 )
{
@@ -76,8 +76,8 @@ KateTemplateHandler::KateTemplateHandler(
}
}
- QString placeholder = rx.cap( 2 );
- QString value = initialValues[ placeholder ];
+ TQString placeholder = rx.cap( 2 );
+ TQString value = initialValues[ placeholder ];
// don't add %{MACRO} to the tab navigation, unless there was not value
if ( rx.cap( 1 ) != "%" || placeholder == value )
@@ -116,13 +116,13 @@ KateTemplateHandler::KateTemplateHandler(
m_doc->tagLines( ( *it ) ->start().line(), ( *it ) ->end().line() );
}
- /* connect(doc,SIGNAL(charactersInteractivelyInserted(int ,int ,const QString&)),this,
- SLOT(slotCharactersInteractivlyInserted(int,int,const QString&)));
- connect(doc,SIGNAL(charactersSemiInteractivelyInserted(int ,int ,const QString&)),this,
- SLOT(slotCharactersInteractivlyInserted(int,int,const QString&)));*/
- connect( doc, SIGNAL( textInserted( int, int ) ), this, SLOT( slotTextInserted( int, int ) ) );
- connect( doc, SIGNAL( aboutToRemoveText( const KateTextRange& ) ), this, SLOT( slotAboutToRemoveText( const KateTextRange& ) ) );
- connect( doc, SIGNAL( textRemoved() ), this, SLOT( slotTextRemoved() ) );
+ /* connect(doc,TQT_SIGNAL(charactersInteractivelyInserted(int ,int ,const TQString&)),this,
+ TQT_SLOT(slotCharactersInteractivlyInserted(int,int,const TQString&)));
+ connect(doc,TQT_SIGNAL(charactersSemiInteractivelyInserted(int ,int ,const TQString&)),this,
+ TQT_SLOT(slotCharactersInteractivlyInserted(int,int,const TQString&)));*/
+ connect( doc, TQT_SIGNAL( textInserted( int, int ) ), this, TQT_SLOT( slotTextInserted( int, int ) ) );
+ connect( doc, TQT_SIGNAL( aboutToRemoveText( const KateTextRange& ) ), this, TQT_SLOT( slotAboutToRemoveText( const KateTextRange& ) ) );
+ connect( doc, TQT_SIGNAL( textRemoved() ), this, TQT_SLOT( slotTextRemoved() ) );
( *this ) ( Qt::Key_Tab );
}
@@ -146,13 +146,13 @@ KateTemplateHandler::~KateTemplateHandler()
void KateTemplateHandler::slotDocumentDestroyed() {m_doc = 0;}
-void KateTemplateHandler::generateRangeTable( uint insertLine, uint insertCol, const QString& insertString, const QValueList<KateTemplateHandlerPlaceHolderInfo> &buildList )
+void KateTemplateHandler::generateRangeTable( uint insertLine, uint insertCol, const TQString& insertString, const TQValueList<KateTemplateHandlerPlaceHolderInfo> &buildList )
{
uint line = insertLine;
uint col = insertCol;
uint colInText = 0;
- for ( QValueList<KateTemplateHandlerPlaceHolderInfo>::const_iterator it = buildList.begin();it != buildList.end();++it )
+ for ( TQValueList<KateTemplateHandlerPlaceHolderInfo>::const_iterator it = buildList.begin();it != buildList.end();++it )
{
KateTemplatePlaceHolder *ph = m_dict[ ( *it ).placeholder ];
@@ -218,7 +218,7 @@ void KateTemplateHandler::slotTextInserted( int line, int col )
KateTemplatePlaceHolder *ph = m_tabOrder.at( m_currentTabStop );
- QString sourceText = m_doc->text ( m_currentRange->start().line(), m_currentRange->start().col(),
+ TQString sourceText = m_doc->text ( m_currentRange->start().line(), m_currentRange->start().col(),
m_currentRange->end().line(), m_currentRange->end().col(), false );
ph->isInitialValue = false;
@@ -324,9 +324,9 @@ void KateTemplateHandler::slotAboutToRemoveText( const KateTextRange &range )
if ( m_doc )
{
- disconnect( m_doc, SIGNAL( textInserted( int, int ) ), this, SLOT( slotTextInserted( int, int ) ) );
- disconnect( m_doc, SIGNAL( aboutToRemoveText( const KateTextRange& ) ), this, SLOT( slotAboutToRemoveText( const KateTextRange& ) ) );
- disconnect( m_doc, SIGNAL( textRemoved() ), this, SLOT( slotTextRemoved() ) );
+ disconnect( m_doc, TQT_SIGNAL( textInserted( int, int ) ), this, TQT_SLOT( slotTextInserted( int, int ) ) );
+ disconnect( m_doc, TQT_SIGNAL( aboutToRemoveText( const KateTextRange& ) ), this, TQT_SLOT( slotAboutToRemoveText( const KateTextRange& ) ) );
+ disconnect( m_doc, TQT_SIGNAL( textRemoved() ), this, TQT_SLOT( slotTextRemoved() ) );
}
deleteLater();
diff --git a/kate/part/katetemplatehandler.h b/kate/part/katetemplatehandler.h
index a2f41f518..d7d56e074 100644
--- a/kate/part/katetemplatehandler.h
+++ b/kate/part/katetemplatehandler.h
@@ -20,18 +20,18 @@
#include "katesupercursor.h"
#include "katekeyinterceptorfunctor.h"
-#include <qobject.h>
-#include <qmap.h>
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
class KateDocument;
-class KateTemplateHandler: public QObject, public KateKeyInterceptorFunctor {
+class KateTemplateHandler: public TQObject, public KateKeyInterceptorFunctor {
Q_OBJECT
public:
- KateTemplateHandler(KateDocument *doc,uint line,uint column, const QString &templateString, const QMap<QString,QString> &initialValues);
+ KateTemplateHandler(KateDocument *doc,uint line,uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues);
virtual ~KateTemplateHandler();
inline bool initOk() {return m_initOk;}
virtual bool operator()(KKey key);
@@ -44,16 +44,16 @@ class KateTemplateHandler: public QObject, public KateKeyInterceptorFunctor {
class KateTemplateHandlerPlaceHolderInfo{
public:
KateTemplateHandlerPlaceHolderInfo():begin(0),len(0),placeholder(""){};
- KateTemplateHandlerPlaceHolderInfo(uint begin_,uint len_,const QString& placeholder_):begin(begin_),len(len_),placeholder(placeholder_){}
+ KateTemplateHandlerPlaceHolderInfo(uint begin_,uint len_,const TQString& placeholder_):begin(begin_),len(len_),placeholder(placeholder_){}
uint begin;
uint len;
- QString placeholder;
+ TQString placeholder;
};
class KateSuperRangeList *m_ranges;
class KateDocument *m_doc;
- QPtrList<KateTemplatePlaceHolder> m_tabOrder;
- QDict<KateTemplatePlaceHolder> m_dict;
- void generateRangeTable(uint insertLine,uint insertCol, const QString& insertString, const QValueList<KateTemplateHandlerPlaceHolderInfo> &buildList);
+ TQPtrList<KateTemplatePlaceHolder> m_tabOrder;
+ TQDict<KateTemplatePlaceHolder> m_dict;
+ void generateRangeTable(uint insertLine,uint insertCol, const TQString& insertString, const TQValueList<KateTemplateHandlerPlaceHolderInfo> &buildList);
int m_currentTabStop;
KateSuperRange *m_currentRange;
void locateRange(const KateTextCursor &cursor );
diff --git a/kate/part/katetextline.cpp b/kate/part/katetextline.cpp
index 250be5236..e64b928c7 100644
--- a/kate/part/katetextline.cpp
+++ b/kate/part/katetextline.cpp
@@ -25,7 +25,7 @@
#include <kglobal.h>
-#include <qregexp.h>
+#include <tqregexp.h>
KateTextLine::KateTextLine ()
: m_flags(0)
@@ -36,7 +36,7 @@ KateTextLine::~KateTextLine()
{
}
-void KateTextLine::insertText (uint pos, uint insLen, const QChar *insText, uchar *insAttribs)
+void KateTextLine::insertText (uint pos, uint insLen, const TQChar *insText, uchar *insAttribs)
{
// nothing to do
if (insLen == 0)
@@ -110,7 +110,7 @@ void KateTextLine::truncate(uint newLen)
int KateTextLine::nextNonSpaceChar(uint pos) const
{
const uint len = m_text.length();
- const QChar *unicode = m_text.unicode();
+ const TQChar *unicode = m_text.unicode();
for(uint i = pos; i < len; i++)
{
@@ -128,7 +128,7 @@ int KateTextLine::previousNonSpaceChar(uint pos) const
if (pos >= (uint)len)
pos = len - 1;
- const QChar *unicode = m_text.unicode();
+ const TQChar *unicode = m_text.unicode();
for(int i = pos; i >= 0; i--)
{
@@ -149,23 +149,23 @@ int KateTextLine::lastChar() const
return previousNonSpaceChar(m_text.length() - 1);
}
-const QChar *KateTextLine::firstNonSpace() const
+const TQChar *KateTextLine::firstNonSpace() const
{
int first = firstChar();
- return (first > -1) ? ((QChar*)m_text.unicode())+first : m_text.unicode();
+ return (first > -1) ? ((TQChar*)m_text.unicode())+first : m_text.unicode();
}
uint KateTextLine::indentDepth (uint tabwidth) const
{
uint d = 0;
const uint len = m_text.length();
- const QChar *unicode = m_text.unicode();
+ const TQChar *unicode = m_text.unicode();
for(uint i = 0; i < len; i++)
{
if(unicode[i].isSpace())
{
- if (unicode[i] == QChar('\t'))
+ if (unicode[i] == TQChar('\t'))
d += tabwidth - (d % tabwidth);
else
d++;
@@ -177,7 +177,7 @@ uint KateTextLine::indentDepth (uint tabwidth) const
return d;
}
-bool KateTextLine::stringAtPos(uint pos, const QString& match) const
+bool KateTextLine::stringAtPos(uint pos, const TQString& match) const
{
const uint len = m_text.length();
const uint matchlen = match.length();
@@ -189,8 +189,8 @@ bool KateTextLine::stringAtPos(uint pos, const QString& match) const
// overflow again which (pos+matchlen > len) does not catch; see bugs #129263 and #129580
Q_ASSERT(pos < len);
- const QChar *unicode = m_text.unicode();
- const QChar *matchUnicode = match.unicode();
+ const TQChar *unicode = m_text.unicode();
+ const TQChar *matchUnicode = match.unicode();
for (uint i=0; i < matchlen; i++)
if (unicode[i+pos] != matchUnicode[i])
@@ -199,15 +199,15 @@ bool KateTextLine::stringAtPos(uint pos, const QString& match) const
return true;
}
-bool KateTextLine::startingWith(const QString& match) const
+bool KateTextLine::startingWith(const TQString& match) const
{
const uint matchlen = match.length();
if (matchlen > m_text.length())
return false;
- const QChar *unicode = m_text.unicode();
- const QChar *matchUnicode = match.unicode();
+ const TQChar *unicode = m_text.unicode();
+ const TQChar *matchUnicode = match.unicode();
for (uint i=0; i < matchlen; i++)
if (unicode[i] != matchUnicode[i])
@@ -216,15 +216,15 @@ bool KateTextLine::startingWith(const QString& match) const
return true;
}
-bool KateTextLine::endingWith(const QString& match) const
+bool KateTextLine::endingWith(const TQString& match) const
{
const uint matchlen = match.length();
if (matchlen > m_text.length())
return false;
- const QChar *unicode = m_text.unicode();
- const QChar *matchUnicode = match.unicode();
+ const TQChar *unicode = m_text.unicode();
+ const TQChar *matchUnicode = match.unicode();
uint start = m_text.length() - matchlen;
for (uint i=0; i < matchlen; i++)
@@ -239,11 +239,11 @@ int KateTextLine::cursorX(uint pos, uint tabChars) const
uint x = 0;
const uint n = kMin (pos, m_text.length());
- const QChar *unicode = m_text.unicode();
+ const TQChar *unicode = m_text.unicode();
for ( uint z = 0; z < n; z++)
{
- if (unicode[z] == QChar('\t'))
+ if (unicode[z] == TQChar('\t'))
x += tabChars - (x % tabChars);
else
x++;
@@ -257,11 +257,11 @@ uint KateTextLine::lengthWithTabs (uint tabChars) const
{
uint x = 0;
const uint len = m_text.length();
- const QChar *unicode = m_text.unicode();
+ const TQChar *unicode = m_text.unicode();
for ( uint z = 0; z < len; z++)
{
- if (unicode[z] == QChar('\t'))
+ if (unicode[z] == TQChar('\t'))
x += tabChars - (x % tabChars);
else
x++;
@@ -270,7 +270,7 @@ uint KateTextLine::lengthWithTabs (uint tabChars) const
return x;
}
-bool KateTextLine::searchText (uint startCol, const QString &text, uint *foundAtCol, uint *matchLen, bool casesensitive, bool backwards)
+bool KateTextLine::searchText (uint startCol, const TQString &text, uint *foundAtCol, uint *matchLen, bool casesensitive, bool backwards)
{
int index;
@@ -301,7 +301,7 @@ bool KateTextLine::searchText (uint startCol, const QString &text, uint *foundAt
return false;
}
-bool KateTextLine::searchText (uint startCol, const QRegExp &regexp, uint *foundAtCol, uint *matchLen, bool backwards)
+bool KateTextLine::searchText (uint startCol, const TQRegExp &regexp, uint *foundAtCol, uint *matchLen, bool backwards)
{
int index;
@@ -346,8 +346,8 @@ char *KateTextLine::dump (char *buf, bool withHighlighting) const
memcpy(buf, &l, sizeof(uint));
buf += sizeof(uint);
- memcpy(buf, (char *) m_text.unicode(), sizeof(QChar)*l);
- buf += sizeof(QChar) * l;
+ memcpy(buf, (char *) m_text.unicode(), sizeof(TQChar)*l);
+ buf += sizeof(TQChar) * l;
if (!withHighlighting)
return buf;
@@ -393,8 +393,8 @@ char *KateTextLine::restore (char *buf)
buf += sizeof(uint);
// text + attributes
- m_text.setUnicode ((QChar *) buf, l);
- buf += sizeof(QChar) * l;
+ m_text.setUnicode ((TQChar *) buf, l);
+ buf += sizeof(TQChar) * l;
// we just restore a KateTextLine from a buffer first time
if (f & KateTextLine::flagNoOtherData)
diff --git a/kate/part/katetextline.h b/kate/part/katetextline.h
index 9a6ed5e4d..2da0ca577 100644
--- a/kate/part/katetextline.h
+++ b/kate/part/katetextline.h
@@ -25,8 +25,8 @@
#include <ksharedptr.h>
-#include <qmemarray.h>
-#include <qstring.h>
+#include <tqmemarray.h>
+#include <tqstring.h>
class KateRenderer;
class QTextStream;
@@ -139,16 +139,16 @@ class KateTextLine : public KShared
/**
* Gets the char at the given position
* @param pos position
- * @return character at the given position or QChar::null if position is
+ * @return character at the given position or TQChar::null if position is
* beyond the length of the string
*/
- inline QChar getChar (uint pos) const { return m_text[pos]; }
+ inline TQChar getChar (uint pos) const { return m_text[pos]; }
/**
* Gets the text as a unicode representation
- * @return text of this line as QChar array
+ * @return text of this line as TQChar array
*/
- inline const QChar *text() const { return m_text.unicode(); }
+ inline const TQChar *text() const { return m_text.unicode(); }
/**
* Highlighting array
@@ -168,9 +168,9 @@ class KateTextLine : public KShared
/**
* Gets a QString
- * @return text of line as QString reference
+ * @return text of line as TQString reference
*/
- inline const QString& string() const { return m_text; }
+ inline const TQString& string() const { return m_text; }
/**
* Gets a substring.
@@ -178,14 +178,14 @@ class KateTextLine : public KShared
* @param length length of substring
* @return wanted substring
*/
- inline QString string(uint startCol, uint length) const
+ inline TQString string(uint startCol, uint length) const
{ return m_text.mid(startCol, length); }
/**
* Gets a null terminated pointer to first non space char
* @return array of QChars starting at first non-whitespace char
*/
- const QChar *firstNonSpace() const;
+ const TQChar *firstNonSpace() const;
/**
* indentation depth of this line
@@ -216,21 +216,21 @@ class KateTextLine : public KShared
* @param match string to match at given pos
* @return did the string match?
*/
- bool stringAtPos(uint pos, const QString& match) const;
+ bool stringAtPos(uint pos, const TQString& match) const;
/**
* Is the line starting with the given string
* @param match string to test
* @return does line start with given string?
*/
- bool startingWith(const QString& match) const;
+ bool startingWith(const TQString& match) const;
/**
* Is the line ending with the given string
* @param match string to test
* @return does the line end with given string?
*/
- bool endingWith(const QString& match) const;
+ bool endingWith(const TQString& match) const;
/**
* search given string
@@ -242,7 +242,7 @@ class KateTextLine : public KShared
* @param backwards search backwards?
* @return string found?
*/
- bool searchText (uint startCol, const QString &text,
+ bool searchText (uint startCol, const TQString &text,
uint *foundAtCol, uint *matchLen,
bool casesensitive = true,
bool backwards = false);
@@ -256,7 +256,7 @@ class KateTextLine : public KShared
* @param backwards search backwards?
* @return regexp found?
*/
- bool searchText (uint startCol, const QRegExp &regexp,
+ bool searchText (uint startCol, const TQRegExp &regexp,
uint *foundAtCol, uint *matchLen,
bool backwards = false);
@@ -278,7 +278,7 @@ class KateTextLine : public KShared
* context stack
* @return context stack
*/
- inline const QMemArray<short> &ctxArray () const { return m_ctx; };
+ inline const TQMemArray<short> &ctxArray () const { return m_ctx; };
/**
* @return true if any context at the line end has the noIndentBasedFolding flag set
@@ -289,13 +289,13 @@ class KateTextLine : public KShared
* folding list
* @return folding array
*/
- inline const QMemArray<uint> &foldingListArray () const { return m_foldingList; };
+ inline const TQMemArray<uint> &foldingListArray () const { return m_foldingList; };
/**
* indentation stack
* @return indentation array
*/
- inline const QMemArray<unsigned short> &indentationDepthArray () const { return m_indentationDepth; };
+ inline const TQMemArray<unsigned short> &indentationDepthArray () const { return m_indentationDepth; };
/**
* insert text into line
@@ -304,7 +304,7 @@ class KateTextLine : public KShared
* @param insText text to insert
* @param insAttribs attributes for the insert text
*/
- void insertText (uint pos, uint insLen, const QChar *insText, uchar *insAttribs = 0);
+ void insertText (uint pos, uint insLen, const TQChar *insText, uchar *insAttribs = 0);
/**
* remove text at given position
@@ -343,7 +343,7 @@ class KateTextLine : public KShared
* Sets the syntax highlight context number
* @param val new context array
*/
- inline void setContext (QMemArray<short> &val) { m_ctx.assign (val); }
+ inline void setContext (TQMemArray<short> &val) { m_ctx.assign (val); }
/**
* sets if for the next line indent based folding should be disabled
@@ -364,13 +364,13 @@ class KateTextLine : public KShared
* update folding list
* @param val new folding list
*/
- inline void setFoldingList (QMemArray<uint> &val) { m_foldingList.assign (val); m_foldingList.detach(); }
+ inline void setFoldingList (TQMemArray<uint> &val) { m_foldingList.assign (val); m_foldingList.detach(); }
/**
* update indentation stack
* @param val new indentation stack
*/
- inline void setIndentationDepth (QMemArray<unsigned short> &val) { m_indentationDepth.assign (val); }
+ inline void setIndentationDepth (TQMemArray<unsigned short> &val) { m_indentationDepth.assign (val); }
/**
* Methodes for dump/restore of the line in the buffer
@@ -385,7 +385,7 @@ class KateTextLine : public KShared
{
return ( 1
+ sizeof(uint)
- + (m_text.length() * sizeof(QChar))
+ + (m_text.length() * sizeof(TQChar))
+ ( withHighlighting ?
( (3 * sizeof(uint))
+ (m_text.length() * sizeof(uchar))
@@ -421,29 +421,29 @@ class KateTextLine : public KShared
/**
* text of line as unicode
*/
- QString m_text;
+ TQString m_text;
/**
* array of highlighting attributes
* This is exactly the same size as m_text.length()
* Each letter in m_text has a uchar attribute
*/
- QMemArray<uchar> m_attributes;
+ TQMemArray<uchar> m_attributes;
/**
* context stack
*/
- QMemArray<short> m_ctx;
+ TQMemArray<short> m_ctx;
/**
* list of folding starts/ends
*/
- QMemArray<uint> m_foldingList;
+ TQMemArray<uint> m_foldingList;
/**
* indentation stack
*/
- QMemArray<unsigned short> m_indentationDepth;
+ TQMemArray<unsigned short> m_indentationDepth;
/**
* flags
diff --git a/kate/part/kateundo.cpp b/kate/part/kateundo.cpp
index 0f8d3599f..379df16f0 100644
--- a/kate/part/kateundo.cpp
+++ b/kate/part/kateundo.cpp
@@ -38,7 +38,7 @@
* @param len lenght of change
* @param text text removed/inserted
*/
- KateUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text);
+ KateUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text);
/**
* Destructor
@@ -112,7 +112,7 @@
* text inserted/removed
* @return text
*/
- inline const QString& text() const { return m_text; };
+ inline const TQString& text() const { return m_text; };
private:
/**
@@ -138,10 +138,10 @@
/**
* text
*/
- QString m_text;
+ TQString m_text;
};
-KateUndo::KateUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text)
+KateUndo::KateUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text)
: m_type (type),
m_line (line),
m_col (col),
@@ -329,7 +329,7 @@ void KateUndoGroup::redo ()
m_doc->editEnd ();
}
-void KateUndoGroup::addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text)
+void KateUndoGroup::addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text)
{
addItem(new KateUndo(type, line, col, len, text));
}
diff --git a/kate/part/kateundo.h b/kate/part/kateundo.h
index 66905f5cd..4d0141189 100644
--- a/kate/part/kateundo.h
+++ b/kate/part/kateundo.h
@@ -21,8 +21,8 @@
#ifndef kate_undo_h
#define kate_undo_h
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
class KateDocument;
class KateUndo;
@@ -79,7 +79,7 @@ class KateUndoGroup
* @param len lenght of change
* @param text text removed/inserted
*/
- void addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text);
+ void addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text);
/**
* merge this group with an other
@@ -128,7 +128,7 @@ class KateUndoGroup
/**
* list of items contained
*/
- QPtrList<KateUndo> m_items;
+ TQPtrList<KateUndo> m_items;
/**
* prohibit merging with the next group
diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp
index 6592bc8cc..7840e79d5 100644
--- a/kate/part/kateview.cpp
+++ b/kate/part/kateview.cpp
@@ -71,17 +71,17 @@
#include <ktempfile.h>
#include <ksavefile.h>
-#include <qfont.h>
-#include <qfileinfo.h>
-#include <qstyle.h>
-#include <qevent.h>
-#include <qpopupmenu.h>
-#include <qlayout.h>
-#include <qclipboard.h>
-#include <qstylesheet.h>
+#include <tqfont.h>
+#include <tqfileinfo.h>
+#include <tqstyle.h>
+#include <tqevent.h>
+#include <tqpopupmenu.h>
+#include <tqlayout.h>
+#include <tqclipboard.h>
+#include <tqstylesheet.h>
//END includes
-KateView::KateView( KateDocument *doc, QWidget *parent, const char * name )
+KateView::KateView( KateDocument *doc, TQWidget *parent, const char * name )
: Kate::View( doc, parent, name )
, m_doc( doc )
, m_search( new KateSearch( this ) )
@@ -108,7 +108,7 @@ KateView::KateView( KateDocument *doc, QWidget *parent, const char * name )
m_renderer = new KateRenderer(doc, this);
- m_grid = new QGridLayout (this, 3, 3);
+ m_grid = new TQGridLayout (this, 3, 3);
m_grid->setRowStretch ( 0, 10 );
m_grid->setRowStretch ( 1, 0 );
@@ -159,8 +159,8 @@ KateView::KateView( KateDocument *doc, QWidget *parent, const char * name )
slotHlChanged();
/*test texthint
- connect(this,SIGNAL(needTextHint(int, int, QString &)),
- this,SLOT(slotNeedTextHint(int, int, QString &)));
+ connect(this,TQT_SIGNAL(needTextHint(int, int, TQString &)),
+ this,TQT_SLOT(slotNeedTextHint(int, int, TQString &)));
enableTextHints(1000);
test texthint*/
}
@@ -172,7 +172,7 @@ KateView::~KateView()
m_doc->removeView( this );
- // its a QObject. don't double-delete
+ // its a TQObject. don't double-delete
//delete m_viewInternal;
//delete m_codeCompletion;
@@ -186,22 +186,22 @@ KateView::~KateView()
void KateView::setupConnections()
{
- connect( m_doc, SIGNAL(undoChanged()),
- this, SLOT(slotNewUndo()) );
- connect( m_doc, SIGNAL(hlChanged()),
- this, SLOT(slotHlChanged()) );
- connect( m_doc, SIGNAL(canceled(const QString&)),
- this, SLOT(slotSaveCanceled(const QString&)) );
- connect( m_viewInternal, SIGNAL(dropEventPass(QDropEvent*)),
- this, SIGNAL(dropEventPass(QDropEvent*)) );
- connect(this,SIGNAL(cursorPositionChanged()),this,SLOT(slotStatusMsg()));
- connect(this,SIGNAL(newStatus()),this,SLOT(slotStatusMsg()));
- connect(m_doc, SIGNAL(undoChanged()), this, SLOT(slotStatusMsg()));
+ connect( m_doc, TQT_SIGNAL(undoChanged()),
+ this, TQT_SLOT(slotNewUndo()) );
+ connect( m_doc, TQT_SIGNAL(hlChanged()),
+ this, TQT_SLOT(slotHlChanged()) );
+ connect( m_doc, TQT_SIGNAL(canceled(const TQString&)),
+ this, TQT_SLOT(slotSaveCanceled(const TQString&)) );
+ connect( m_viewInternal, TQT_SIGNAL(dropEventPass(TQDropEvent*)),
+ this, TQT_SIGNAL(dropEventPass(TQDropEvent*)) );
+ connect(this,TQT_SIGNAL(cursorPositionChanged()),this,TQT_SLOT(slotStatusMsg()));
+ connect(this,TQT_SIGNAL(newStatus()),this,TQT_SLOT(slotStatusMsg()));
+ connect(m_doc, TQT_SIGNAL(undoChanged()), this, TQT_SLOT(slotStatusMsg()));
if ( m_doc->browserView() )
{
- connect( this, SIGNAL(dropEventPass(QDropEvent*)),
- this, SLOT(slotDropEventPass(QDropEvent*)) );
+ connect( this, TQT_SIGNAL(dropEventPass(TQDropEvent*)),
+ this, TQT_SLOT(slotDropEventPass(TQDropEvent*)) );
}
}
@@ -212,80 +212,80 @@ void KateView::setupActions()
m_toggleWriteLock = 0;
- m_cut = a=KStdAction::cut(this, SLOT(cut()), ac);
+ m_cut = a=KStdAction::cut(this, TQT_SLOT(cut()), ac);
a->setWhatsThis(i18n("Cut the selected text and move it to the clipboard"));
- m_paste = a=KStdAction::pasteText(this, SLOT(paste()), ac);
+ m_paste = a=KStdAction::pasteText(this, TQT_SLOT(paste()), ac);
a->setWhatsThis(i18n("Paste previously copied or cut clipboard contents"));
- m_copy = a=KStdAction::copy(this, SLOT(copy()), ac);
+ m_copy = a=KStdAction::copy(this, TQT_SLOT(copy()), ac);
a->setWhatsThis(i18n( "Use this command to copy the currently selected text to the system clipboard."));
- m_copyHTML = a = new KAction(i18n("Copy as &HTML"), "editcopy", 0, this, SLOT(copyHTML()), ac, "edit_copy_html");
+ m_copyHTML = a = new KAction(i18n("Copy as &HTML"), "editcopy", 0, this, TQT_SLOT(copyHTML()), ac, "edit_copy_html");
a->setWhatsThis(i18n( "Use this command to copy the currently selected text as HTML to the system clipboard."));
if (!m_doc->readOnly())
{
- a=KStdAction::save(this, SLOT(save()), ac);
+ a=KStdAction::save(this, TQT_SLOT(save()), ac);
a->setWhatsThis(i18n("Save the current document"));
- a=m_editUndo = KStdAction::undo(m_doc, SLOT(undo()), ac);
+ a=m_editUndo = KStdAction::undo(m_doc, TQT_SLOT(undo()), ac);
a->setWhatsThis(i18n("Revert the most recent editing actions"));
- a=m_editRedo = KStdAction::redo(m_doc, SLOT(redo()), ac);
+ a=m_editRedo = KStdAction::redo(m_doc, TQT_SLOT(redo()), ac);
a->setWhatsThis(i18n("Revert the most recent undo operation"));
- (new KAction(i18n("&Word Wrap Document"), "", 0, this, SLOT(applyWordWrap()), ac, "tools_apply_wordwrap"))->setWhatsThis(
+ (new KAction(i18n("&Word Wrap Document"), "", 0, this, TQT_SLOT(applyWordWrap()), ac, "tools_apply_wordwrap"))->setWhatsThis(
i18n("Use this command to wrap all lines of the current document which are longer than the width of the"
" current view, to fit into this view.<br><br> This is a static word wrap, meaning it is not updated"
" when the view is resized."));
// setup Tools menu
- a=new KAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, this, SLOT(indent()), ac, "tools_indent");
+ a=new KAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, this, TQT_SLOT(indent()), ac, "tools_indent");
a->setWhatsThis(i18n("Use this to indent a selected block of text.<br><br>"
"You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog."));
- a=new KAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, this, SLOT(unIndent()), ac, "tools_unindent");
+ a=new KAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, this, TQT_SLOT(unIndent()), ac, "tools_unindent");
a->setWhatsThis(i18n("Use this to unindent a selected block of text."));
- a=new KAction(i18n("&Clean Indentation"), 0, this, SLOT(cleanIndent()), ac, "tools_cleanIndent");
+ a=new KAction(i18n("&Clean Indentation"), 0, this, TQT_SLOT(cleanIndent()), ac, "tools_cleanIndent");
a->setWhatsThis(i18n("Use this to clean the indentation of a selected block of text (only tabs/only spaces)<br><br>"
"You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog."));
- a=new KAction(i18n("&Align"), 0, this, SLOT(align()), ac, "tools_align");
+ a=new KAction(i18n("&Align"), 0, this, TQT_SLOT(align()), ac, "tools_align");
a->setWhatsThis(i18n("Use this to align the current line or block of text to its proper indent level."));
- a=new KAction(i18n("C&omment"), CTRL+Qt::Key_D, this, SLOT(comment()),
+ a=new KAction(i18n("C&omment"), CTRL+Qt::Key_D, this, TQT_SLOT(comment()),
ac, "tools_comment");
a->setWhatsThis(i18n("This command comments out the current line or a selected block of text.<BR><BR>"
"The characters for single/multiple line comments are defined within the language's highlighting."));
- a=new KAction(i18n("Unco&mment"), CTRL+SHIFT+Qt::Key_D, this, SLOT(uncomment()),
+ a=new KAction(i18n("Unco&mment"), CTRL+SHIFT+Qt::Key_D, this, TQT_SLOT(uncomment()),
ac, "tools_uncomment");
a->setWhatsThis(i18n("This command removes comments from the current line or a selected block of text.<BR><BR>"
"The characters for single/multiple line comments are defined within the language's highlighting."));
a = m_toggleWriteLock = new KToggleAction(
i18n("&Read Only Mode"), 0, 0,
- this, SLOT( toggleWriteLock() ),
+ this, TQT_SLOT( toggleWriteLock() ),
ac, "tools_toggle_write_lock" );
a->setWhatsThis( i18n("Lock/unlock the document for writing") );
a = new KAction( i18n("Uppercase"), CTRL + Qt::Key_U, this,
- SLOT(uppercase()), ac, "tools_uppercase" );
+ TQT_SLOT(uppercase()), ac, "tools_uppercase" );
a->setWhatsThis( i18n("Convert the selection to uppercase, or the character to the "
"right of the cursor if no text is selected.") );
a = new KAction( i18n("Lowercase"), CTRL + SHIFT + Qt::Key_U, this,
- SLOT(lowercase()), ac, "tools_lowercase" );
+ TQT_SLOT(lowercase()), ac, "tools_lowercase" );
a->setWhatsThis( i18n("Convert the selection to lowercase, or the character to the "
"right of the cursor if no text is selected.") );
a = new KAction( i18n("Capitalize"), CTRL + ALT + Qt::Key_U, this,
- SLOT(capitalize()), ac, "tools_capitalize" );
+ TQT_SLOT(capitalize()), ac, "tools_capitalize" );
a->setWhatsThis( i18n("Capitalize the selection, or the word under the "
"cursor if no text is selected.") );
a = new KAction( i18n("Join Lines"), CTRL + Qt::Key_J, this,
- SLOT( joinLines() ), ac, "tools_join_lines" );
+ TQT_SLOT( joinLines() ), ac, "tools_join_lines" );
}
else
{
@@ -295,19 +295,19 @@ void KateView::setupActions()
m_editRedo = 0;
}
- a=KStdAction::print( m_doc, SLOT(print()), ac );
+ a=KStdAction::print( m_doc, TQT_SLOT(print()), ac );
a->setWhatsThis(i18n("Print the current document."));
- a=new KAction(i18n("Reloa&d"), "reload", KStdAccel::reload(), this, SLOT(reloadFile()), ac, "file_reload");
+ a=new KAction(i18n("Reloa&d"), "reload", KStdAccel::reload(), this, TQT_SLOT(reloadFile()), ac, "file_reload");
a->setWhatsThis(i18n("Reload the current document from disk."));
- a=KStdAction::saveAs(this, SLOT(saveAs()), ac);
+ a=KStdAction::saveAs(this, TQT_SLOT(saveAs()), ac);
a->setWhatsThis(i18n("Save the current document to disk, with a name of your choice."));
- a=KStdAction::gotoLine(this, SLOT(gotoLine()), ac);
+ a=KStdAction::gotoLine(this, TQT_SLOT(gotoLine()), ac);
a->setWhatsThis(i18n("This command opens a dialog and lets you choose a line that you want the cursor to move to."));
- a=new KAction(i18n("&Configure Editor..."), 0, m_doc, SLOT(configDialog()),ac, "set_confdlg");
+ a=new KAction(i18n("&Configure Editor..."), 0, m_doc, TQT_SLOT(configDialog()),ac, "set_confdlg");
a->setWhatsThis(i18n("Configure various aspects of this editor."));
KateViewHighlightAction *menu = new KateViewHighlightAction (i18n("&Highlighting"), ac, "set_highlight");
@@ -324,46 +324,46 @@ void KateView::setupActions()
new KateViewIndentationAction (m_doc, i18n("&Indentation"),ac,"tools_indentation");
// html export
- a = new KAction(i18n("E&xport as HTML..."), 0, 0, this, SLOT(exportAsHTML()), ac, "file_export_html");
+ a = new KAction(i18n("E&xport as HTML..."), 0, 0, this, TQT_SLOT(exportAsHTML()), ac, "file_export_html");
a->setWhatsThis(i18n("This command allows you to export the current document"
" with all highlighting information into a HTML document."));
- m_selectAll = a=KStdAction::selectAll(this, SLOT(selectAll()), ac);
+ m_selectAll = a=KStdAction::selectAll(this, TQT_SLOT(selectAll()), ac);
a->setWhatsThis(i18n("Select the entire text of the current document."));
- m_deSelect = a=KStdAction::deselect(this, SLOT(clearSelection()), ac);
+ m_deSelect = a=KStdAction::deselect(this, TQT_SLOT(clearSelection()), ac);
a->setWhatsThis(i18n("If you have selected something within the current document, this will no longer be selected."));
- a=new KAction(i18n("Enlarge Font"), "viewmag+", 0, m_viewInternal, SLOT(slotIncFontSizes()), ac, "incFontSizes");
+ a=new KAction(i18n("Enlarge Font"), "viewmag+", 0, m_viewInternal, TQT_SLOT(slotIncFontSizes()), ac, "incFontSizes");
a->setWhatsThis(i18n("This increases the display font size."));
- a=new KAction(i18n("Shrink Font"), "viewmag-", 0, m_viewInternal, SLOT(slotDecFontSizes()), ac, "decFontSizes");
+ a=new KAction(i18n("Shrink Font"), "viewmag-", 0, m_viewInternal, TQT_SLOT(slotDecFontSizes()), ac, "decFontSizes");
a->setWhatsThis(i18n("This decreases the display font size."));
a= m_toggleBlockSelection = new KToggleAction(
i18n("Bl&ock Selection Mode"), CTRL + SHIFT + Key_B,
- this, SLOT(toggleBlockSelectionMode()),
+ this, TQT_SLOT(toggleBlockSelectionMode()),
ac, "set_verticalSelect");
a->setWhatsThis(i18n("This command allows switching between the normal (line based) selection mode and the block selection mode."));
a= m_toggleInsert = new KToggleAction(
i18n("Overwr&ite Mode"), Key_Insert,
- this, SLOT(toggleInsert()),
+ this, TQT_SLOT(toggleInsert()),
ac, "set_insert" );
a->setWhatsThis(i18n("Choose whether you want the text you type to be inserted or to overwrite existing text."));
KToggleAction *toggleAction;
a= m_toggleDynWrap = toggleAction = new KToggleAction(
i18n("&Dynamic Word Wrap"), Key_F10,
- this, SLOT(toggleDynWordWrap()),
+ this, TQT_SLOT(toggleDynWordWrap()),
ac, "view_dynamic_word_wrap" );
a->setWhatsThis(i18n("If this option is checked, the text lines will be wrapped at the view border on the screen."));
a= m_setDynWrapIndicators = new KSelectAction(i18n("Dynamic Word Wrap Indicators"), 0, ac, "dynamic_word_wrap_indicators");
a->setWhatsThis(i18n("Choose when the Dynamic Word Wrap Indicators should be displayed"));
- connect(m_setDynWrapIndicators, SIGNAL(activated(int)), this, SLOT(setDynWrapIndicators(int)));
- QStringList list2;
+ connect(m_setDynWrapIndicators, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setDynWrapIndicators(int)));
+ TQStringList list2;
list2.append(i18n("&Off"));
list2.append(i18n("Follow &Line Numbers"));
list2.append(i18n("&Always On"));
@@ -371,14 +371,14 @@ void KateView::setupActions()
a= toggleAction=m_toggleFoldingMarkers = new KToggleAction(
i18n("Show Folding &Markers"), Key_F9,
- this, SLOT(toggleFoldingMarkers()),
+ this, TQT_SLOT(toggleFoldingMarkers()),
ac, "view_folding_markers" );
a->setWhatsThis(i18n("You can choose if the codefolding marks should be shown, if codefolding is possible."));
toggleAction->setCheckedState(i18n("Hide Folding &Markers"));
a= m_toggleIconBar = toggleAction = new KToggleAction(
i18n("Show &Icon Border"), Key_F6,
- this, SLOT(toggleIconBorder()),
+ this, TQT_SLOT(toggleIconBorder()),
ac, "view_border");
a=toggleAction;
a->setWhatsThis(i18n("Show/hide the icon border.<BR><BR> The icon border shows bookmark symbols, for instance."));
@@ -386,21 +386,21 @@ void KateView::setupActions()
a= toggleAction=m_toggleLineNumbers = new KToggleAction(
i18n("Show &Line Numbers"), Key_F11,
- this, SLOT(toggleLineNumbersOn()),
+ this, TQT_SLOT(toggleLineNumbersOn()),
ac, "view_line_numbers" );
a->setWhatsThis(i18n("Show/hide the line numbers on the left hand side of the view."));
toggleAction->setCheckedState(i18n("Hide &Line Numbers"));
a= m_toggleScrollBarMarks = toggleAction = new KToggleAction(
i18n("Show Scroll&bar Marks"), 0,
- this, SLOT(toggleScrollBarMarks()),
+ this, TQT_SLOT(toggleScrollBarMarks()),
ac, "view_scrollbar_marks");
a->setWhatsThis(i18n("Show/hide the marks on the vertical scrollbar.<BR><BR>The marks, for instance, show bookmarks."));
toggleAction->setCheckedState(i18n("Hide Scroll&bar Marks"));
a = toggleAction = m_toggleWWMarker = new KToggleAction(
i18n("Show Static &Word Wrap Marker"), 0,
- this, SLOT( toggleWWMarker() ),
+ this, TQT_SLOT( toggleWWMarker() ),
ac, "view_word_wrap_marker" );
a->setWhatsThis( i18n(
"Show/hide the Word Wrap Marker, a vertical line drawn at the word "
@@ -409,19 +409,19 @@ void KateView::setupActions()
a= m_switchCmdLine = new KAction(
i18n("Switch to Command Line"), Key_F7,
- this, SLOT(switchToCmdLine()),
+ this, TQT_SLOT(switchToCmdLine()),
ac, "switch_to_cmd_line" );
a->setWhatsThis(i18n("Show/hide the command line on the bottom of the view."));
a=m_setEndOfLine = new KSelectAction(i18n("&End of Line"), 0, ac, "set_eol");
a->setWhatsThis(i18n("Choose which line endings should be used, when you save the document"));
- QStringList list;
+ TQStringList list;
list.append("&UNIX");
list.append("&Windows/DOS");
list.append("&Macintosh");
m_setEndOfLine->setItems(list);
m_setEndOfLine->setCurrentItem (m_doc->config()->eol());
- connect(m_setEndOfLine, SIGNAL(activated(int)), this, SLOT(setEol(int)));
+ connect(m_setEndOfLine, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setEol(int)));
// encoding menu
new KateViewEncodingAction (m_doc, this, i18n("E&ncoding"), ac, "set_encoding");
@@ -432,7 +432,7 @@ void KateView::setupActions()
slotSelectionChanged ();
- connect (this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
+ connect (this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()));
}
void KateView::setupEditActions()
@@ -442,134 +442,134 @@ void KateView::setupEditActions()
new KAction(
i18n("Move Word Left"), CTRL + Key_Left,
- this,SLOT(wordLeft()),
+ this,TQT_SLOT(wordLeft()),
ac, "word_left" );
new KAction(
i18n("Select Character Left"), SHIFT + Key_Left,
- this,SLOT(shiftCursorLeft()),
+ this,TQT_SLOT(shiftCursorLeft()),
ac, "select_char_left" );
new KAction(
i18n("Select Word Left"), SHIFT + CTRL + Key_Left,
- this, SLOT(shiftWordLeft()),
+ this, TQT_SLOT(shiftWordLeft()),
ac, "select_word_left" );
new KAction(
i18n("Move Word Right"), CTRL + Key_Right,
- this, SLOT(wordRight()),
+ this, TQT_SLOT(wordRight()),
ac, "word_right" );
new KAction(
i18n("Select Character Right"), SHIFT + Key_Right,
- this, SLOT(shiftCursorRight()),
+ this, TQT_SLOT(shiftCursorRight()),
ac, "select_char_right" );
new KAction(
i18n("Select Word Right"), SHIFT + CTRL + Key_Right,
- this,SLOT(shiftWordRight()),
+ this,TQT_SLOT(shiftWordRight()),
ac, "select_word_right" );
new KAction(
i18n("Move to Beginning of Line"), Key_Home,
- this, SLOT(home()),
+ this, TQT_SLOT(home()),
ac, "beginning_of_line" );
new KAction(
i18n("Move to Beginning of Document"), KStdAccel::home(),
- this, SLOT(top()),
+ this, TQT_SLOT(top()),
ac, "beginning_of_document" );
new KAction(
i18n("Select to Beginning of Line"), SHIFT + Key_Home,
- this, SLOT(shiftHome()),
+ this, TQT_SLOT(shiftHome()),
ac, "select_beginning_of_line" );
new KAction(
i18n("Select to Beginning of Document"), SHIFT + CTRL + Key_Home,
- this, SLOT(shiftTop()),
+ this, TQT_SLOT(shiftTop()),
ac, "select_beginning_of_document" );
new KAction(
i18n("Move to End of Line"), Key_End,
- this, SLOT(end()),
+ this, TQT_SLOT(end()),
ac, "end_of_line" );
new KAction(
i18n("Move to End of Document"), KStdAccel::end(),
- this, SLOT(bottom()),
+ this, TQT_SLOT(bottom()),
ac, "end_of_document" );
new KAction(
i18n("Select to End of Line"), SHIFT + Key_End,
- this, SLOT(shiftEnd()),
+ this, TQT_SLOT(shiftEnd()),
ac, "select_end_of_line" );
new KAction(
i18n("Select to End of Document"), SHIFT + CTRL + Key_End,
- this, SLOT(shiftBottom()),
+ this, TQT_SLOT(shiftBottom()),
ac, "select_end_of_document" );
new KAction(
i18n("Select to Previous Line"), SHIFT + Key_Up,
- this, SLOT(shiftUp()),
+ this, TQT_SLOT(shiftUp()),
ac, "select_line_up" );
new KAction(
i18n("Scroll Line Up"),"", CTRL + Key_Up,
- this, SLOT(scrollUp()),
+ this, TQT_SLOT(scrollUp()),
ac, "scroll_line_up" );
- new KAction(i18n("Move to Next Line"), Key_Down, this, SLOT(down()),
+ new KAction(i18n("Move to Next Line"), Key_Down, this, TQT_SLOT(down()),
ac, "move_line_down");
- new KAction(i18n("Move to Previous Line"), Key_Up, this, SLOT(up()),
+ new KAction(i18n("Move to Previous Line"), Key_Up, this, TQT_SLOT(up()),
ac, "move_line_up");
new KAction(i18n("Move Character Right"), Key_Right, this,
- SLOT(cursorRight()), ac, "move_cursor_right");
+ TQT_SLOT(cursorRight()), ac, "move_cursor_right");
- new KAction(i18n("Move Character Left"), Key_Left, this, SLOT(cursorLeft()),
+ new KAction(i18n("Move Character Left"), Key_Left, this, TQT_SLOT(cursorLeft()),
ac, "move_cusor_left");
new KAction(
i18n("Select to Next Line"), SHIFT + Key_Down,
- this, SLOT(shiftDown()),
+ this, TQT_SLOT(shiftDown()),
ac, "select_line_down" );
new KAction(
i18n("Scroll Line Down"), CTRL + Key_Down,
- this, SLOT(scrollDown()),
+ this, TQT_SLOT(scrollDown()),
ac, "scroll_line_down" );
new KAction(
i18n("Scroll Page Up"), KStdAccel::prior(),
- this, SLOT(pageUp()),
+ this, TQT_SLOT(pageUp()),
ac, "scroll_page_up" );
new KAction(
i18n("Select Page Up"), SHIFT + Key_PageUp,
- this, SLOT(shiftPageUp()),
+ this, TQT_SLOT(shiftPageUp()),
ac, "select_page_up" );
new KAction(
i18n("Move to Top of View"), CTRL + Key_PageUp,
- this, SLOT(topOfView()),
+ this, TQT_SLOT(topOfView()),
ac, "move_top_of_view" );
new KAction(
i18n("Select to Top of View"), CTRL + SHIFT + Key_PageUp,
- this, SLOT(shiftTopOfView()),
+ this, TQT_SLOT(shiftTopOfView()),
ac, "select_top_of_view" );
new KAction(
i18n("Scroll Page Down"), KStdAccel::next(),
- this, SLOT(pageDown()),
+ this, TQT_SLOT(pageDown()),
ac, "scroll_page_down" );
new KAction(
i18n("Select Page Down"), SHIFT + Key_PageDown,
- this, SLOT(shiftPageDown()),
+ this, TQT_SLOT(shiftPageDown()),
ac, "select_page_down" );
new KAction(
i18n("Move to Bottom of View"), CTRL + Key_PageDown,
- this, SLOT(bottomOfView()),
+ this, TQT_SLOT(bottomOfView()),
ac, "move_bottom_of_view" );
new KAction(
i18n("Select to Bottom of View"), CTRL + SHIFT + Key_PageDown,
- this, SLOT(shiftBottomOfView()),
+ this, TQT_SLOT(shiftBottomOfView()),
ac, "select_bottom_of_view" );
new KAction(
i18n("Move to Matching Bracket"), CTRL + Key_6,
- this, SLOT(toMatchingBracket()),
+ this, TQT_SLOT(toMatchingBracket()),
ac, "to_matching_bracket" );
new KAction(
i18n("Select to Matching Bracket"), SHIFT + CTRL + Key_6,
- this, SLOT(shiftToMatchingBracket()),
+ this, TQT_SLOT(shiftToMatchingBracket()),
ac, "select_matching_bracket" );
// anders: shortcuts doing any changes should not be created in browserextension
@@ -577,40 +577,40 @@ void KateView::setupEditActions()
{
new KAction(
i18n("Transpose Characters"), CTRL + Key_T,
- this, SLOT(transpose()),
+ this, TQT_SLOT(transpose()),
ac, "transpose_char" );
new KAction(
i18n("Delete Line"), CTRL + Key_K,
- this, SLOT(killLine()),
+ this, TQT_SLOT(killLine()),
ac, "delete_line" );
new KAction(
i18n("Delete Word Left"), KStdAccel::deleteWordBack(),
- this, SLOT(deleteWordLeft()),
+ this, TQT_SLOT(deleteWordLeft()),
ac, "delete_word_left" );
new KAction(
i18n("Delete Word Right"), KStdAccel::deleteWordForward(),
- this, SLOT(deleteWordRight()),
+ this, TQT_SLOT(deleteWordRight()),
ac, "delete_word_right" );
new KAction(i18n("Delete Next Character"), Key_Delete,
- this, SLOT(keyDelete()),
+ this, TQT_SLOT(keyDelete()),
ac, "delete_next_character");
KAction *a = new KAction(i18n("Backspace"), Key_Backspace,
- this, SLOT(backspace()),
+ this, TQT_SLOT(backspace()),
ac, "backspace");
KShortcut cut = a->shortcut();
cut.append( KKey( SHIFT + Key_Backspace ) );
a->setShortcut( cut );
}
- connect( this, SIGNAL(gotFocus(Kate::View*)),
- this, SLOT(slotGotFocus()) );
- connect( this, SIGNAL(lostFocus(Kate::View*)),
- this, SLOT(slotLostFocus()) );
+ connect( this, TQT_SIGNAL(gotFocus(Kate::View*)),
+ this, TQT_SLOT(slotGotFocus()) );
+ connect( this, TQT_SIGNAL(lostFocus(Kate::View*)),
+ this, TQT_SLOT(slotLostFocus()) );
m_editActions->readShortcutSettings( "Katepart Shortcuts" );
@@ -626,18 +626,18 @@ void KateView::setupCodeFolding()
{
KActionCollection *ac=this->actionCollection();
new KAction( i18n("Collapse Toplevel"), CTRL+SHIFT+Key_Minus,
- m_doc->foldingTree(),SLOT(collapseToplevelNodes()),ac,"folding_toplevel");
+ m_doc->foldingTree(),TQT_SLOT(collapseToplevelNodes()),ac,"folding_toplevel");
new KAction( i18n("Expand Toplevel"), CTRL+SHIFT+Key_Plus,
- this,SLOT(slotExpandToplevel()),ac,"folding_expandtoplevel");
+ this,TQT_SLOT(slotExpandToplevel()),ac,"folding_expandtoplevel");
new KAction( i18n("Collapse One Local Level"), CTRL+Key_Minus,
- this,SLOT(slotCollapseLocal()),ac,"folding_collapselocal");
+ this,TQT_SLOT(slotCollapseLocal()),ac,"folding_collapselocal");
new KAction( i18n("Expand One Local Level"), CTRL+Key_Plus,
- this,SLOT(slotExpandLocal()),ac,"folding_expandlocal");
+ this,TQT_SLOT(slotExpandLocal()),ac,"folding_expandlocal");
#ifdef DEBUGACCELS
KAccel* debugAccels = new KAccel(this,this);
- debugAccels->insert("KATE_DUMP_REGION_TREE",i18n("Show the code folding region tree"),"","Ctrl+Shift+Alt+D",m_doc,SLOT(dumpRegionTree()));
- debugAccels->insert("KATE_TEMPLATE_TEST",i18n("Basic template code test"),"","Ctrl+Shift+Alt+T",m_doc,SLOT(testTemplateCode()));
+ debugAccels->insert("KATE_DUMP_REGION_TREE",i18n("Show the code folding region tree"),"","Ctrl+Shift+Alt+D",m_doc,TQT_SLOT(dumpRegionTree()));
+ debugAccels->insert("KATE_TEMPLATE_TEST",i18n("Basic template code test"),"","Ctrl+Shift+Alt+T",m_doc,TQT_SLOT(testTemplateCode()));
debugAccels->setEnabled(true);
#endif
}
@@ -664,16 +664,16 @@ void KateView::slotExpandLocal()
void KateView::setupCodeCompletion()
{
m_codeCompletion = new KateCodeCompletion(this);
- connect( m_codeCompletion, SIGNAL(completionAborted()),
- this, SIGNAL(completionAborted()));
- connect( m_codeCompletion, SIGNAL(completionDone()),
- this, SIGNAL(completionDone()));
- connect( m_codeCompletion, SIGNAL(argHintHidden()),
- this, SIGNAL(argHintHidden()));
- connect( m_codeCompletion, SIGNAL(completionDone(KTextEditor::CompletionEntry)),
- this, SIGNAL(completionDone(KTextEditor::CompletionEntry)));
- connect( m_codeCompletion, SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,QString*)),
- this, SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,QString*)));
+ connect( m_codeCompletion, TQT_SIGNAL(completionAborted()),
+ this, TQT_SIGNAL(completionAborted()));
+ connect( m_codeCompletion, TQT_SIGNAL(completionDone()),
+ this, TQT_SIGNAL(completionDone()));
+ connect( m_codeCompletion, TQT_SIGNAL(argHintHidden()),
+ this, TQT_SIGNAL(argHintHidden()));
+ connect( m_codeCompletion, TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry)),
+ this, TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry)));
+ connect( m_codeCompletion, TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString*)),
+ this, TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString*)));
}
void KateView::slotGotFocus()
@@ -695,7 +695,7 @@ void KateView::setDynWrapIndicators(int mode)
void KateView::slotStatusMsg ()
{
- QString ovrstr;
+ TQString ovrstr;
if (m_doc->isReadWrite())
{
if (m_doc->config()->configFlags() & KateDocument::cfOvr)
@@ -709,11 +709,11 @@ void KateView::slotStatusMsg ()
uint r = cursorLine() + 1;
uint c = cursorColumn() + 1;
- QString s1 = i18n(" Line: %1").arg(KGlobal::locale()->formatNumber(r, 0));
- QString s2 = i18n(" Col: %1").arg(KGlobal::locale()->formatNumber(c, 0));
+ TQString s1 = i18n(" Line: %1").arg(KGlobal::locale()->formatNumber(r, 0));
+ TQString s2 = i18n(" Col: %1").arg(KGlobal::locale()->formatNumber(c, 0));
- QString modstr = m_doc->isModified() ? QString (" * ") : QString (" ");
- QString blockstr = blockSelectionMode() ? i18n(" BLK ") : i18n(" NORM ");
+ TQString modstr = m_doc->isModified() ? TQString (" * ") : TQString (" ");
+ TQString blockstr = blockSelectionMode() ? i18n(" BLK ") : i18n(" NORM ");
emit viewStatusMsg (s1 + s2 + " " + ovrstr + blockstr + modstr);
}
@@ -751,7 +751,7 @@ void KateView::slotReadWriteChanged ()
m_cut->setEnabled (m_doc->isReadWrite());
m_paste->setEnabled (m_doc->isReadWrite());
- QStringList l;
+ TQStringList l;
l << "edit_replace" << "set_insert" << "tools_spelling" << "tools_indent"
<< "tools_unindent" << "tools_cleanIndent" << "tools_align" << "tools_comment"
@@ -778,7 +778,7 @@ void KateView::slotNewUndo()
m_editRedo->setEnabled(m_doc->redoCount() > 0);
}
-void KateView::slotDropEventPass( QDropEvent * ev )
+void KateView::slotDropEventPass( TQDropEvent * ev )
{
KURL::List lstDragURLs;
bool ok = KURLDrag::decode( ev, lstDragURLs );
@@ -788,12 +788,12 @@ void KateView::slotDropEventPass( QDropEvent * ev )
emit ext->openURLRequest( lstDragURLs.first() );
}
-void KateView::contextMenuEvent( QContextMenuEvent *ev )
+void KateView::contextMenuEvent( TQContextMenuEvent *ev )
{
if ( !m_doc || !m_doc->browserExtension() )
return;
emit m_doc->browserExtension()->popupMenu( /*this, */ev->globalPos(), m_doc->url(),
- QString::fromLatin1( "text/plain" ) );
+ TQString::fromLatin1( "text/plain" ) );
ev->accept();
}
@@ -804,12 +804,12 @@ bool KateView::setCursorPositionInternal( uint line, uint col, uint tabwidth, bo
if (!l)
return false;
- QString line_str = m_doc->textLine( line );
+ TQString line_str = m_doc->textLine( line );
uint z;
uint x = 0;
for (z = 0; z < line_str.length() && z < col; z++) {
- if (line_str[z] == QChar('\t')) x += tabwidth - (x % tabwidth); else x++;
+ if (line_str[z] == TQChar('\t')) x += tabwidth - (x % tabwidth); else x++;
}
m_viewInternal->updateCursor( KateTextCursor( line, x ), false, true, calledExternally );
@@ -860,7 +860,7 @@ KateView::saveResult KateView::saveAs()
{
KEncodingFileDialog::Result res=KEncodingFileDialog::getSaveURLAndEncoding(doc()->config()->encoding(),
- m_doc->url().url(),QString::null,this,i18n("Save File"));
+ m_doc->url().url(),TQString::null,this,i18n("Save File"));
// kdDebug()<<"urllist is emtpy?"<<res.URLs.isEmpty()<<endl;
// kdDebug()<<"url is:"<<res.URLs.first()<<endl;
@@ -880,7 +880,7 @@ bool KateView::checkOverwrite( KURL u )
if( !u.isLocalFile() )
return true;
- QFileInfo info( u.path() );
+ TQFileInfo info( u.path() );
if( !info.exists() )
return true;
@@ -893,7 +893,7 @@ bool KateView::checkOverwrite( KURL u )
);
}
-void KateView::slotSaveCanceled( const QString& error )
+void KateView::slotSaveCanceled( const TQString& error )
{
if ( !error.isEmpty() ) // happens when cancelling a job
KMessageBox::error( this, error );
@@ -903,7 +903,7 @@ void KateView::gotoLine()
{
KateGotoLineDialog *dlg = new KateGotoLineDialog (this, m_viewInternal->getCursor().line() + 1, m_doc->numLines());
- if (dlg->exec() == QDialog::Accepted)
+ if (dlg->exec() == TQDialog::Accepted)
gotoLineNumber( dlg->getLine() - 1 );
delete dlg;
@@ -1084,9 +1084,9 @@ void KateView::applyWordWrap ()
m_doc->wrapText (0, m_doc->lastLine());
}
-void KateView::slotNeedTextHint(int line, int col, QString &text)
+void KateView::slotNeedTextHint(int line, int col, TQString &text)
{
- text=QString("test %1 %2").arg(line).arg(col);
+ text=TQString("test %1 %2").arg(line).arg(col);
}
void KateView::find()
@@ -1094,7 +1094,7 @@ void KateView::find()
m_search->find();
}
-void KateView::find( const QString& pattern, long flags, bool add )
+void KateView::find( const TQString& pattern, long flags, bool add )
{
m_search->find( pattern, flags, add );
}
@@ -1104,7 +1104,7 @@ void KateView::replace()
m_search->replace();
}
-void KateView::replace( const QString &pattern, const QString &replacement, long flags )
+void KateView::replace( const TQString &pattern, const TQString &replacement, long flags )
{
m_search->replace( pattern, replacement, flags );
}
@@ -1141,12 +1141,12 @@ void KateView::switchToCmdLine ()
m_cmdLine->setFocus ();
}
-void KateView::showArgHint( QStringList arg1, const QString& arg2, const QString& arg3 )
+void KateView::showArgHint( TQStringList arg1, const TQString& arg2, const TQString& arg3 )
{
m_codeCompletion->showArgHint( arg1, arg2, arg3 );
}
-void KateView::showCompletionBox( QValueList<KTextEditor::CompletionEntry> arg1, int offset, bool cs )
+void KateView::showCompletionBox( TQValueList<KTextEditor::CompletionEntry> arg1, int offset, bool cs )
{
emit aboutToShowCompletionBox();
m_codeCompletion->showCompletionBox( arg1, offset, cs );
@@ -1251,7 +1251,7 @@ void KateView::updateFoldingConfig ()
m_toggleFoldingMarkers->setChecked( doit );
m_toggleFoldingMarkers->setEnabled( m_doc->highlight() && m_doc->highlight()->allowsFolding() );
- QStringList l;
+ TQStringList l;
l << "folding_toplevel" << "folding_expandtoplevel"
<< "folding_collapselocal" << "folding_expandlocal";
@@ -1421,7 +1421,7 @@ bool KateView::hasSelection() const
return selectStart != selectEnd;
}
-QString KateView::selection() const
+TQString KateView::selection() const
{
int sc = selectStart.col();
int ec = selectEnd.col();
@@ -1613,7 +1613,7 @@ void KateView::copy() const
if (!hasSelection())
return;
- QApplication::clipboard()->setText(selection ());
+ TQApplication::clipboard()->setText(selection ());
}
void KateView::copyHTML()
@@ -1623,16 +1623,16 @@ void KateView::copyHTML()
KMultipleDrag *drag = new KMultipleDrag();
- QTextDrag *htmltextdrag = new QTextDrag(selectionAsHtml()) ;
+ TQTextDrag *htmltextdrag = new TQTextDrag(selectionAsHtml()) ;
htmltextdrag->setSubtype("html");
drag->addDragObject( htmltextdrag);
- drag->addDragObject( new QTextDrag( selection()));
+ drag->addDragObject( new TQTextDrag( selection()));
- QApplication::clipboard()->setData(drag);
+ TQApplication::clipboard()->setData(drag);
}
-QString KateView::selectionAsHtml()
+TQString KateView::selectionAsHtml()
{
int sc = selectStart.col();
int ec = selectEnd.col();
@@ -1650,15 +1650,15 @@ QString KateView::selectionAsHtml()
return textAsHtml (selectStart.line(), sc, selectEnd.line(), ec, blockSelect);
}
-QString KateView::textAsHtml ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise)
+TQString KateView::textAsHtml ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise)
{
kdDebug(13020) << "textAsHtml" << endl;
if ( blockwise && (startCol > endCol) )
- return QString ();
+ return TQString ();
- QString s;
- QTextStream ts( &s, IO_WriteOnly );
- ts.setEncoding(QTextStream::UnicodeUTF8);
+ TQString s;
+ TQTextStream ts( &s, IO_WriteOnly );
+ ts.setEncoding(TQTextStream::UnicodeUTF8);
ts << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"DTD/xhtml1-strict.dtd\">" << endl;
ts << "<html xmlns=\"http://www.w3.org/1999/xhtml\">" << endl;
ts << "<head>" << endl;
@@ -1675,7 +1675,7 @@ QString KateView::textAsHtml ( uint startLine, uint startCol, uint endLine, uint
return s;
}
-void KateView::textAsHtmlStream ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise, QTextStream *ts)
+void KateView::textAsHtmlStream ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise, TQTextStream *ts)
{
if ( (blockwise || startLine == endLine) && (startCol > endCol) )
return;
@@ -1721,15 +1721,15 @@ void KateView::textAsHtmlStream ( uint startLine, uint startCol, uint endLine, u
// fully rewritten to use only inline CSS and support all used attribs.
// anders, 2005-11-01 23:39:43
-void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, QTextStream *outputStream)
+void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, TQTextStream *outputStream)
{
if(length == 0)
return;
// do not recalculate the style strings again and again
- QMap<uchar,QString> stylecache;
+ TQMap<uchar,TQString> stylecache;
// do not insert equally styled characters one by one
- QString textcache;
+ TQString textcache;
KateAttribute *charAttributes = 0;
@@ -1750,8 +1750,8 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, Q
if ( ! stylecache.contains( line->attribute(curPos) ) )
{
- QString textdecoration;
- QString style;
+ TQString textdecoration;
+ TQString style;
if ( charAttributes->bold() )
style.append("font-weight: bold;");
@@ -1765,12 +1765,12 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, Q
textdecoration.append(" line-trough" );
if ( !textdecoration.isEmpty() )
style.append("text-decoration: %1;").arg(textdecoration);
- // QColor::name() returns a string in the form "#RRGGBB" in Qt 3.
+ // TQColor::name() returns a string in the form "#RRGGBB" in Qt 3.
// NOTE Qt 4 returns "#AARRGGBB"
if ( charAttributes->itemSet(KateAttribute::BGColor) )
- style.append(QString("background-color: %1;").arg(charAttributes->bgColor().name()));
+ style.append(TQString("background-color: %1;").arg(charAttributes->bgColor().name()));
if ( charAttributes->itemSet(KateAttribute::TextColor) )
- style.append(QString("color: %1;").arg(charAttributes->textColor().name()));
+ style.append(TQString("color: %1;").arg(charAttributes->textColor().name()));
stylecache[line->attribute(curPos)] = style;
}
@@ -1779,7 +1779,7 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, Q
<< "\">";
}
- QString s( line->getChar(curPos) );
+ TQString s( line->getChar(curPos) );
if ( s == "&" ) s = "&amp;";
else if ( s == "<" ) s = "&lt;";
else if ( s == ">" ) s = "&gt;";
@@ -1796,7 +1796,7 @@ void KateView::exportAsHTML ()
if ( url.isEmpty() )
return;
- QString filename;
+ TQString filename;
KTempFile tmp; // ### only used for network export
if ( url.isLocalFile() )
@@ -1807,9 +1807,9 @@ void KateView::exportAsHTML ()
KSaveFile *savefile=new KSaveFile(filename);
if (!savefile->status())
{
- QTextStream *outputStream = savefile->textStream();
+ TQTextStream *outputStream = savefile->textStream();
- outputStream->setEncoding(QTextStream::UnicodeUTF8);
+ outputStream->setEncoding(TQTextStream::UnicodeUTF8);
// let's write the HTML header :
(*outputStream) << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
diff --git a/kate/part/kateview.h b/kate/part/kateview.h
index 0e2f310b8..8347c4174 100644
--- a/kate/part/kateview.h
+++ b/kate/part/kateview.h
@@ -32,7 +32,7 @@
#include <ktexteditor/viewstatusmsginterface.h>
#include <ktexteditor/texthintinterface.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class KateDocument;
class KateBookmarks;
@@ -69,7 +69,7 @@ class KateView : public Kate::View,
friend class KateCodeCompletion;
public:
- KateView( KateDocument* doc, QWidget* parent = 0L, const char* name = 0 );
+ KateView( KateDocument* doc, TQWidget* parent = 0L, const char* name = 0 );
~KateView ();
//
@@ -94,9 +94,9 @@ class KateView : public Kate::View,
// helper to export text as html stuff
private:
- QString selectionAsHtml ();
- QString textAsHtml ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise);
- void textAsHtmlStream ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise, QTextStream *ts);
+ TQString selectionAsHtml ();
+ TQString textAsHtml ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise);
+ void textAsHtmlStream ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise, TQTextStream *ts);
/**
* Gets a substring in valid-xml html.
@@ -110,7 +110,7 @@ class KateView : public Kate::View,
* attributes.
* @param outputStream A stream to write the html to
*/
- void lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, QTextStream *outputStream);
+ void lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, TQTextStream *outputStream);
public slots:
void exportAsHTML ();
@@ -119,14 +119,14 @@ class KateView : public Kate::View,
// KTextEditor::PopupMenuInterface
//
public:
- void installPopup( QPopupMenu* menu ) { m_rmbMenu = menu; }
- QPopupMenu* popup() const { return m_rmbMenu; }
+ void installPopup( TQPopupMenu* menu ) { m_rmbMenu = menu; }
+ TQPopupMenu* popup() const { return m_rmbMenu; }
//
// KTextEditor::ViewCursorInterface
//
public slots:
- QPoint cursorCoordinates()
+ TQPoint cursorCoordinates()
{ return m_viewInternal->cursorCoordinates(); }
void cursorPosition( uint* l, uint* c )
{ if( l ) *l = cursorLine(); if( c ) *c = cursorColumn(); }
@@ -149,15 +149,15 @@ class KateView : public Kate::View,
// KTextEditor::CodeCompletionInterface
//
public slots:
- void showArgHint( QStringList arg1, const QString& arg2, const QString& arg3 );
- void showCompletionBox( QValueList<KTextEditor::CompletionEntry> arg1, int offset = 0, bool cs = true );
+ void showArgHint( TQStringList arg1, const TQString& arg2, const TQString& arg3 );
+ void showCompletionBox( TQValueList<KTextEditor::CompletionEntry> arg1, int offset = 0, bool cs = true );
signals:
void completionAborted();
void completionDone();
void argHintHidden();
void completionDone(KTextEditor::CompletionEntry);
- void filterInsertString(KTextEditor::CompletionEntry*,QString *);
+ void filterInsertString(KTextEditor::CompletionEntry*,TQString *);
void aboutToShowCompletionBox();
//
@@ -168,7 +168,7 @@ class KateView : public Kate::View,
void disableTextHints();
signals:
- void needTextHint(int line, int col, QString &text);
+ void needTextHint(int line, int col, TQString &text);
//
// KTextEditor::DynWordWrapInterface
@@ -189,7 +189,7 @@ class KateView : public Kate::View,
bool clearSelection (bool redraw, bool finishedChangingSelection = true);
bool hasSelection () const;
- QString selection () const ;
+ TQString selection () const ;
bool removeSelectedText ();
@@ -282,16 +282,16 @@ class KateView : public Kate::View,
bool isOverwriteMode() const;
void setOverwriteMode( bool b );
- QString currentTextLine()
+ TQString currentTextLine()
{ return getDoc()->textLine( cursorLine() ); }
- QString currentWord()
+ TQString currentWord()
{ return m_doc->getWord( m_viewInternal->getCursor() ); }
- void insertText( const QString& mark )
+ void insertText( const TQString& mark )
{ getDoc()->insertText( cursorLine(), cursorColumnReal(), mark ); }
bool canDiscard();
int tabWidth() { return m_doc->config()->tabWidth(); }
void setTabWidth( int w ) { m_doc->config()->setTabWidth(w); }
- void setEncoding( QString e ) { m_doc->setEncoding(e); }
+ void setEncoding( TQString e ) { m_doc->setEncoding(e); }
bool isLastView() { return m_doc->isLastView(1); }
public slots:
@@ -377,9 +377,9 @@ class KateView : public Kate::View,
int getEol();
void setEol( int eol );
void find();
- void find( const QString&, long, bool add=true ); ///< proxy for KateSearch
+ void find( const TQString&, long, bool add=true ); ///< proxy for KateSearch
void replace();
- void replace( const QString&, const QString &, long ); ///< proxy for KateSearch
+ void replace( const TQString&, const TQString &, long ); ///< proxy for KateSearch
/** Highly confusing but KateSearch::findAgain() is backwards too. */
void findAgain( bool back );
void findAgain() { findAgain( false ); }
@@ -442,14 +442,14 @@ class KateView : public Kate::View,
void slotReadWriteChanged ();
signals:
- void dropEventPass(QDropEvent*);
- void viewStatusMsg (const QString &msg);
+ void dropEventPass(TQDropEvent*);
+ void viewStatusMsg (const TQString &msg);
public:
bool setCursorPositionInternal( uint line, uint col, uint tabwidth = 1, bool calledExternally = false );
protected:
- void contextMenuEvent( QContextMenuEvent* );
+ void contextMenuEvent( TQContextMenuEvent* );
bool checkOverwrite( KURL );
public slots:
@@ -458,9 +458,9 @@ class KateView : public Kate::View,
private slots:
void slotGotFocus();
void slotLostFocus();
- void slotDropEventPass( QDropEvent* ev );
+ void slotDropEventPass( TQDropEvent* ev );
void slotStatusMsg();
- void slotSaveCanceled( const QString& error );
+ void slotSaveCanceled( const TQString& error );
void slotExpandToplevel();
void slotCollapseLocal();
void slotExpandLocal();
@@ -504,19 +504,19 @@ class KateView : public Kate::View,
KateSearch* m_search;
KateSpell *m_spell;
KateBookmarks* m_bookmarks;
- QGuardedPtr<QPopupMenu> m_rmbMenu;
+ TQGuardedPtr<TQPopupMenu> m_rmbMenu;
KateCodeCompletion* m_codeCompletion;
KateCmdLine *m_cmdLine;
bool m_cmdLineOn;
- QGridLayout *m_grid;
+ TQGridLayout *m_grid;
bool m_active;
bool m_hasWrap;
private slots:
- void slotNeedTextHint(int line, int col, QString &text);
+ void slotNeedTextHint(int line, int col, TQString &text);
void slotHlChanged();
/**
diff --git a/kate/part/kateviewhelpers.cpp b/kate/part/kateviewhelpers.cpp
index 4ca753486..da88676bc 100644
--- a/kate/part/kateviewhelpers.cpp
+++ b/kate/part/kateviewhelpers.cpp
@@ -40,14 +40,14 @@
#include <kcharsets.h>
#include <kpopupmenu.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <math.h>
@@ -55,7 +55,7 @@
//BEGIN KateScrollBar
KateScrollBar::KateScrollBar (Orientation orientation, KateViewInternal* parent, const char* name)
- : QScrollBar (orientation, parent->m_view, name)
+ : TQScrollBar (orientation, parent->m_view, name)
, m_middleMouseDown (false)
, m_view(parent->m_view)
, m_doc(parent->m_doc)
@@ -65,67 +65,67 @@ KateScrollBar::KateScrollBar (Orientation orientation, KateViewInternal* parent,
, m_savVisibleLines(0)
, m_showMarks(false)
{
- connect(this, SIGNAL(valueChanged(int)), SLOT(sliderMaybeMoved(int)));
- connect(m_doc, SIGNAL(marksChanged()), this, SLOT(marksChanged()));
+ connect(this, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(sliderMaybeMoved(int)));
+ connect(m_doc, TQT_SIGNAL(marksChanged()), this, TQT_SLOT(marksChanged()));
m_lines.setAutoDelete(true);
}
-void KateScrollBar::mousePressEvent(QMouseEvent* e)
+void KateScrollBar::mousePressEvent(TQMouseEvent* e)
{
if (e->button() == MidButton)
m_middleMouseDown = true;
- QScrollBar::mousePressEvent(e);
+ TQScrollBar::mousePressEvent(e);
redrawMarks();
}
-void KateScrollBar::mouseReleaseEvent(QMouseEvent* e)
+void KateScrollBar::mouseReleaseEvent(TQMouseEvent* e)
{
- QScrollBar::mouseReleaseEvent(e);
+ TQScrollBar::mouseReleaseEvent(e);
m_middleMouseDown = false;
redrawMarks();
}
-void KateScrollBar::mouseMoveEvent(QMouseEvent* e)
+void KateScrollBar::mouseMoveEvent(TQMouseEvent* e)
{
- QScrollBar::mouseMoveEvent(e);
+ TQScrollBar::mouseMoveEvent(e);
if (e->state() | LeftButton)
redrawMarks();
}
-void KateScrollBar::paintEvent(QPaintEvent *e)
+void KateScrollBar::paintEvent(TQPaintEvent *e)
{
- QScrollBar::paintEvent(e);
+ TQScrollBar::paintEvent(e);
redrawMarks();
}
-void KateScrollBar::resizeEvent(QResizeEvent *e)
+void KateScrollBar::resizeEvent(TQResizeEvent *e)
{
- QScrollBar::resizeEvent(e);
+ TQScrollBar::resizeEvent(e);
recomputeMarksPositions();
}
-void KateScrollBar::styleChange(QStyle &s)
+void KateScrollBar::styleChange(TQStyle &s)
{
- QScrollBar::styleChange(s);
+ TQScrollBar::styleChange(s);
m_topMargin = -1;
recomputeMarksPositions();
}
void KateScrollBar::valueChange()
{
- QScrollBar::valueChange();
+ TQScrollBar::valueChange();
redrawMarks();
}
void KateScrollBar::rangeChange()
{
- QScrollBar::rangeChange();
+ TQScrollBar::rangeChange();
recomputeMarksPositions();
}
@@ -139,9 +139,9 @@ void KateScrollBar::redrawMarks()
if (!m_showMarks)
return;
- QPainter painter(this);
- QRect rect = sliderRect();
- for (QIntDictIterator<QColor> it(m_lines); it.current(); ++it)
+ TQPainter painter(this);
+ TQRect rect = sliderRect();
+ for (TQIntDictIterator<TQColor> it(m_lines); it.current(); ++it)
{
if (it.currentKey() < rect.top() || it.currentKey() > rect.bottom())
{
@@ -161,7 +161,7 @@ void KateScrollBar::recomputeMarksPositions(bool forceFullUpdate)
int realHeight = frameGeometry().height() - m_topMargin - m_bottomMargin;
- QPtrList<KTextEditor::Mark> marks = m_doc->marks();
+ TQPtrList<KTextEditor::Mark> marks = m_doc->marks();
KateCodeFoldingTree *tree = m_doc->foldingTree();
for (KTextEditor::Mark *mark = marks.first(); mark; mark = marks.next())
@@ -184,7 +184,7 @@ void KateScrollBar::recomputeMarksPositions(bool forceFullUpdate)
double d = (double)line / (m_savVisibleLines - 1);
m_lines.insert(m_topMargin + (int)(d * realHeight),
- new QColor(KateRendererConfig::global()->lineMarkerColor((KTextEditor::MarkInterface::MarkTypes)mark->type)));
+ new TQColor(KateRendererConfig::global()->lineMarkerColor((KTextEditor::MarkInterface::MarkTypes)mark->type)));
}
if (forceFullUpdate)
@@ -197,7 +197,7 @@ void KateScrollBar::watchScrollBarSize()
{
int savMax = maxValue();
setMaxValue(0);
- QRect rect = sliderRect();
+ TQRect rect = sliderRect();
setMaxValue(savMax);
m_topMargin = rect.top();
@@ -216,22 +216,22 @@ class KateCmdLnWhatsThis : public QWhatsThis
{
public:
KateCmdLnWhatsThis( KateCmdLine *parent )
- : QWhatsThis( parent )
+ : TQWhatsThis( parent )
, m_parent( parent ) {;}
- QString text( const QPoint & )
+ TQString text( const TQPoint & )
{
- QString beg = "<qt background=\"white\"><div><table width=\"100%\"><tr><td bgcolor=\"brown\"><font color=\"white\"><b>Help: <big>";
- QString mid = "</big></b></font></td></tr><tr><td>";
- QString end = "</td></tr></table></div><qt>";
+ TQString beg = "<qt background=\"white\"><div><table width=\"100%\"><tr><td bgcolor=\"brown\"><font color=\"white\"><b>Help: <big>";
+ TQString mid = "</big></b></font></td></tr><tr><td>";
+ TQString end = "</td></tr></table></div><qt>";
- QString t = m_parent->text();
- QRegExp re( "\\s*help\\s+(.*)" );
+ TQString t = m_parent->text();
+ TQRegExp re( "\\s*help\\s+(.*)" );
if ( re.search( t ) > -1 )
{
- QString s;
+ TQString s;
// get help for command
- QString name = re.cap( 1 );
+ TQString name = re.cap( 1 );
if ( name == "list" )
{
return beg + i18n("Available Commands") + mid
@@ -277,9 +277,9 @@ class KateCmdLineFlagCompletion : public KCompletion
public:
KateCmdLineFlagCompletion() {;}
- QString makeCompletion( const QString & string )
+ TQString makeCompletion( const TQString & string )
{
- return QString::null;
+ return TQString::null;
}
};
@@ -295,15 +295,15 @@ KateCmdLine::KateCmdLine (KateView *view)
, m_command( 0L )
, m_oldCompletionObject( 0L )
{
- connect (this, SIGNAL(returnPressed(const QString &)),
- this, SLOT(slotReturnPressed(const QString &)));
+ connect (this, TQT_SIGNAL(returnPressed(const TQString &)),
+ this, TQT_SLOT(slotReturnPressed(const TQString &)));
completionObject()->insertItems (KateCmd::self()->cmds());
setAutoDeleteCompletionObject( false );
m_help = new KateCmdLnWhatsThis( this );
}
-void KateCmdLine::slotReturnPressed ( const QString& text )
+void KateCmdLine::slotReturnPressed ( const TQString& text )
{
// silently ignore leading space
@@ -311,16 +311,16 @@ void KateCmdLine::slotReturnPressed ( const QString& text )
while( text[n].isSpace() )
n++;
- QString cmd = text.mid( n );
+ TQString cmd = text.mid( n );
// Built in help: if the command starts with "help", [try to] show some help
if ( cmd.startsWith( "help" ) )
{
- m_help->display( m_help->text( QPoint() ), mapToGlobal(QPoint(0,0)) );
+ m_help->display( m_help->text( TQPoint() ), mapToGlobal(TQPoint(0,0)) );
clear();
KateCmd::self()->appendHistory( cmd );
m_histpos = KateCmd::self()->historyLength();
- m_oldText = QString ();
+ m_oldText = TQString ();
return;
}
@@ -333,13 +333,13 @@ void KateCmdLine::slotReturnPressed ( const QString& text )
if (p)
{
- QString msg;
+ TQString msg;
if (p->exec (m_view, cmd, msg))
{
KateCmd::self()->appendHistory( cmd );
m_histpos = KateCmd::self()->historyLength();
- m_oldText = QString ();
+ m_oldText = TQString ();
if (msg.length() > 0)
setText (i18n ("Success: ") + msg);
@@ -375,7 +375,7 @@ void KateCmdLine::slotReturnPressed ( const QString& text )
m_cmdend = 0;
m_view->setFocus ();
- QTimer::singleShot( 4000, this, SLOT(hideMe()) );
+ TQTimer::singleShot( 4000, this, TQT_SLOT(hideMe()) );
}
void KateCmdLine::hideMe () // unless i have focus ;)
@@ -385,7 +385,7 @@ void KateCmdLine::hideMe () // unless i have focus ;)
}
}
-void KateCmdLine::focusInEvent ( QFocusEvent *ev )
+void KateCmdLine::focusInEvent ( TQFocusEvent *ev )
{
if (m_msgMode)
{
@@ -397,7 +397,7 @@ void KateCmdLine::focusInEvent ( QFocusEvent *ev )
KLineEdit::focusInEvent (ev);
}
-void KateCmdLine::keyPressEvent( QKeyEvent *ev )
+void KateCmdLine::keyPressEvent( TQKeyEvent *ev )
{
if (ev->key() == Key_Escape)
{
@@ -415,7 +415,7 @@ void KateCmdLine::keyPressEvent( QKeyEvent *ev )
// during typing, let us see if we have a valid command
if ( ! m_cmdend || cursorpos <= m_cmdend )
{
- QChar c;
+ TQChar c;
if ( ! ev->text().isEmpty() )
c = ev->text()[0];
@@ -443,7 +443,7 @@ void KateCmdLine::keyPressEvent( QKeyEvent *ev )
if ( m_command )
{
//kdDebug(13025)<<"keypress in commandline: We have a command! "<<m_command<<endl;
- QString t = text();
+ TQString t = text();
m_cmdend = 0;
bool b = false;
for ( ; m_cmdend < t.length(); m_cmdend++ )
@@ -512,7 +512,7 @@ void KateCmdLine::fromHistory( bool up )
if ( ! KateCmd::self()->historyLength() )
return;
- QString s;
+ TQString s;
if ( up )
{
@@ -539,7 +539,7 @@ void KateCmdLine::fromHistory( bool up )
{
// Select the argument part of the command, so that it is easy to overwrite
setText( s );
- static QRegExp reCmd = QRegExp(".*[\\w\\-]+(?:[^a-zA-Z0-9_-]|:\\w+)(.*)");
+ static TQRegExp reCmd = TQRegExp(".*[\\w\\-]+(?:[^a-zA-Z0-9_-]|:\\w+)(.*)");
if ( reCmd.search( text() ) == 0 )
setSelection( text().length() - reCmd.cap(1).length(), reCmd.cap(1).length() );
}
@@ -684,8 +684,8 @@ static const char * const bookmark_xpm[] = {
const int iconPaneWidth = 16;
const int halfIPW = 8;
-KateIconBorder::KateIconBorder ( KateViewInternal* internalView, QWidget *parent )
- : QWidget(parent, "", Qt::WStaticContents | Qt::WRepaintNoErase | Qt::WResizeNoErase )
+KateIconBorder::KateIconBorder ( KateViewInternal* internalView, TQWidget *parent )
+ : TQWidget(parent, "", Qt::WStaticContents | Qt::WRepaintNoErase | Qt::WResizeNoErase )
, m_view( internalView->m_view )
, m_doc( internalView->m_doc )
, m_viewInternal( internalView )
@@ -697,12 +697,12 @@ KateIconBorder::KateIconBorder ( KateViewInternal* internalView, QWidget *parent
, m_cachedLNWidth( 0 )
, m_maxCharWidth( 0 )
{
- setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
setBackgroundMode( NoBackground );
m_doc->setDescription( MarkInterface::markType01, i18n("Bookmark") );
- m_doc->setPixmap( MarkInterface::markType01, QPixmap((const char**)bookmark_xpm) );
+ m_doc->setPixmap( MarkInterface::markType01, TQPixmap((const char**)bookmark_xpm) );
updateFont();
}
@@ -716,7 +716,7 @@ void KateIconBorder::setIconBorderOn( bool enable )
updateGeometry();
- QTimer::singleShot( 0, this, SLOT(update()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(update()) );
}
void KateIconBorder::setLineNumbersOn( bool enable )
@@ -729,7 +729,7 @@ void KateIconBorder::setLineNumbersOn( bool enable )
updateGeometry();
- QTimer::singleShot( 0, this, SLOT(update()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(update()) );
}
void KateIconBorder::setDynWrapIndicators( int state )
@@ -742,7 +742,7 @@ void KateIconBorder::setDynWrapIndicators( int state )
updateGeometry ();
- QTimer::singleShot( 0, this, SLOT(update()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(update()) );
}
void KateIconBorder::setFoldingMarkersOn( bool enable )
@@ -754,10 +754,10 @@ void KateIconBorder::setFoldingMarkersOn( bool enable )
updateGeometry();
- QTimer::singleShot( 0, this, SLOT(update()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(update()) );
}
-QSize KateIconBorder::sizeHint() const
+TQSize KateIconBorder::sizeHint() const
{
int w = 0;
@@ -773,19 +773,19 @@ QSize KateIconBorder::sizeHint() const
w += 4;
- return QSize( w, 0 );
+ return TQSize( w, 0 );
}
// This function (re)calculates the maximum width of any of the digit characters (0 -> 9)
// for graceful handling of variable-width fonts as the linenumber font.
void KateIconBorder::updateFont()
{
- const QFontMetrics *fm = m_view->renderer()->config()->fontMetrics();
+ const TQFontMetrics *fm = m_view->renderer()->config()->fontMetrics();
m_maxCharWidth = 0;
// Loop to determine the widest numeric character in the current font.
// 48 is ascii '0'
for (int i = 48; i < 58; i++) {
- int charWidth = fm->width( QChar(i) );
+ int charWidth = fm->width( TQChar(i) );
m_maxCharWidth = kMax(m_maxCharWidth, charWidth);
}
}
@@ -801,11 +801,11 @@ int KateIconBorder::lineNumberWidth() const
int w = style().scrollBarExtent().width();
int h = m_view->renderer()->config()->fontMetrics()->height();
- QSize newSize(w, h);
+ TQSize newSize(w, h);
if ((m_arrow.size() != newSize || m_oldBackgroundColor != m_view->renderer()->config()->iconBarColor()) && !newSize.isEmpty()) {
m_arrow.resize(newSize);
- QPainter p(&m_arrow);
+ TQPainter p(&m_arrow);
p.fillRect( 0, 0, w, h, m_view->renderer()->config()->iconBarColor() );
h = m_view->renderer()->config()->fontMetrics()->ascent();
@@ -838,15 +838,15 @@ int KateIconBorder::lineNumberWidth() const
return width;
}
-void KateIconBorder::paintEvent(QPaintEvent* e)
+void KateIconBorder::paintEvent(TQPaintEvent* e)
{
paintBorder(e->rect().x(), e->rect().y(), e->rect().width(), e->rect().height());
}
void KateIconBorder::paintBorder (int /*x*/, int y, int /*width*/, int height)
{
- static QPixmap minus_px ((const char**)minus_xpm);
- static QPixmap plus_px ((const char**)plus_xpm);
+ static TQPixmap minus_px ((const char**)minus_xpm);
+ static TQPixmap plus_px ((const char**)plus_xpm);
uint h = m_view->renderer()->config()->fontStruct()->fontHeight;
uint startz = (y / h);
@@ -878,7 +878,7 @@ void KateIconBorder::paintBorder (int /*x*/, int y, int /*width*/, int height)
int w( this->width() ); // sane value/calc only once
- QPainter p ( this );
+ TQPainter p ( this );
p.setFont ( *m_view->renderer()->config()->font() ); // for line numbers
// the line number color is for the line numbers, vertical separator lines
// and for for the code folding lines.
@@ -922,7 +922,7 @@ void KateIconBorder::paintBorder (int /*x*/, int y, int /*width*/, int height)
MarkInterface::MarkTypes markType = (MarkInterface::MarkTypes)(1<<bit);
if( mrk & markType )
{
- QPixmap *px_mark (m_doc->markPixmap( markType ));
+ TQPixmap *px_mark (m_doc->markPixmap( markType ));
if (px_mark)
{
@@ -953,7 +953,7 @@ void KateIconBorder::paintBorder (int /*x*/, int y, int /*width*/, int height)
if (realLine > -1)
if (m_viewInternal->lineRanges[z].startCol == 0) {
if (m_lineNumbersOn)
- p.drawText( lnX + 1, y, lnWidth-4, h, Qt::AlignRight|Qt::AlignVCenter, QString("%1").arg( realLine + 1 ) );
+ p.drawText( lnX + 1, y, lnWidth-4, h, Qt::AlignRight|Qt::AlignVCenter, TQString("%1").arg( realLine + 1 ) );
} else if (m_view->dynWordWrap() && m_dynWrapIndicatorsOn) {
p.drawPixmap(lnX + lnWidth - m_arrow.width() - 4, y, m_arrow);
}
@@ -1016,7 +1016,7 @@ void KateIconBorder::paintBorder (int /*x*/, int y, int /*width*/, int height)
}
}
-KateIconBorder::BorderArea KateIconBorder::positionToArea( const QPoint& p ) const
+KateIconBorder::BorderArea KateIconBorder::positionToArea( const TQPoint& p ) const
{
int x = 0;
if( m_iconBorderOn ) {
@@ -1037,30 +1037,30 @@ KateIconBorder::BorderArea KateIconBorder::positionToArea( const QPoint& p ) con
return None;
}
-void KateIconBorder::mousePressEvent( QMouseEvent* e )
+void KateIconBorder::mousePressEvent( TQMouseEvent* e )
{
m_lastClickedLine = m_viewInternal->yToKateLineRange(e->y()).line;
if ( positionToArea( e->pos() ) != IconBorder )
{
- QMouseEvent forward( QEvent::MouseButtonPress,
- QPoint( 0, e->y() ), e->button(), e->state() );
+ TQMouseEvent forward( TQEvent::MouseButtonPress,
+ TQPoint( 0, e->y() ), e->button(), e->state() );
m_viewInternal->mousePressEvent( &forward );
}
e->accept();
}
-void KateIconBorder::mouseMoveEvent( QMouseEvent* e )
+void KateIconBorder::mouseMoveEvent( TQMouseEvent* e )
{
if ( positionToArea( e->pos() ) != IconBorder )
{
- QMouseEvent forward( QEvent::MouseMove,
- QPoint( 0, e->y() ), e->button(), e->state() );
+ TQMouseEvent forward( TQEvent::MouseMove,
+ TQPoint( 0, e->y() ), e->button(), e->state() );
m_viewInternal->mouseMoveEvent( &forward );
}
}
-void KateIconBorder::mouseReleaseEvent( QMouseEvent* e )
+void KateIconBorder::mouseReleaseEvent( TQMouseEvent* e )
{
uint cursorOnLine = m_viewInternal->yToKateLineRange(e->y()).line;
@@ -1076,12 +1076,12 @@ void KateIconBorder::mouseReleaseEvent( QMouseEvent* e )
else
m_doc->addMark( cursorOnLine, KateViewConfig::global()->defaultMarkType() );
} else {
- showMarkMenu( cursorOnLine, QCursor::pos() );
+ showMarkMenu( cursorOnLine, TQCursor::pos() );
}
}
else
if (e->button() == RightButton) {
- showMarkMenu( cursorOnLine, QCursor::pos() );
+ showMarkMenu( cursorOnLine, TQCursor::pos() );
}
}
@@ -1094,24 +1094,24 @@ void KateIconBorder::mouseReleaseEvent( QMouseEvent* e )
}
}
- QMouseEvent forward( QEvent::MouseButtonRelease,
- QPoint( 0, e->y() ), e->button(), e->state() );
+ TQMouseEvent forward( TQEvent::MouseButtonRelease,
+ TQPoint( 0, e->y() ), e->button(), e->state() );
m_viewInternal->mouseReleaseEvent( &forward );
}
-void KateIconBorder::mouseDoubleClickEvent( QMouseEvent* e )
+void KateIconBorder::mouseDoubleClickEvent( TQMouseEvent* e )
{
- QMouseEvent forward( QEvent::MouseButtonDblClick,
- QPoint( 0, e->y() ), e->button(), e->state() );
+ TQMouseEvent forward( TQEvent::MouseButtonDblClick,
+ TQPoint( 0, e->y() ), e->button(), e->state() );
m_viewInternal->mouseDoubleClickEvent( &forward );
}
-void KateIconBorder::showMarkMenu( uint line, const QPoint& pos )
+void KateIconBorder::showMarkMenu( uint line, const TQPoint& pos )
{
- QPopupMenu markMenu;
- QPopupMenu selectDefaultMark;
+ TQPopupMenu markMenu;
+ TQPopupMenu selectDefaultMark;
- typedef QValueVector<int> MarkTypeVector;
+ typedef TQValueVector<int> MarkTypeVector;
MarkTypeVector vec( 33 );
int i=1;
@@ -1167,23 +1167,23 @@ void KateIconBorder::showMarkMenu( uint line, const QPoint& pos )
}
//END KateIconBorder
-KateViewEncodingAction::KateViewEncodingAction(KateDocument *_doc, KateView *_view, const QString& text, QObject* parent, const char* name)
+KateViewEncodingAction::KateViewEncodingAction(KateDocument *_doc, KateView *_view, const TQString& text, TQObject* parent, const char* name)
: KActionMenu (text, parent, name), doc(_doc), view (_view)
{
- connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow()));
+ connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}
void KateViewEncodingAction::slotAboutToShow()
{
- QStringList modes (KGlobal::charsets()->descriptiveEncodingNames());
+ TQStringList modes (KGlobal::charsets()->descriptiveEncodingNames());
popupMenu()->clear ();
for (uint z=0; z<modes.size(); ++z)
{
- popupMenu()->insertItem ( modes[z], this, SLOT(setMode(int)), 0, z);
+ popupMenu()->insertItem ( modes[z], this, TQT_SLOT(setMode(int)), 0, z);
bool found = false;
- QTextCodec *codecForEnc = KGlobal::charsets()->codecForName(KGlobal::charsets()->encodingForName(modes[z]), found);
+ TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(KGlobal::charsets()->encodingForName(modes[z]), found);
if (found && codecForEnc)
{
@@ -1195,7 +1195,7 @@ void KateViewEncodingAction::slotAboutToShow()
void KateViewEncodingAction::setMode (int mode)
{
- QStringList modes (KGlobal::charsets()->descriptiveEncodingNames());
+ TQStringList modes (KGlobal::charsets()->descriptiveEncodingNames());
doc->config()->setEncoding( KGlobal::charsets()->encodingForName( modes[mode] ) );
// now we don't want the encoding changed again unless the user does so using the menu.
doc->setEncodingSticky( true );
diff --git a/kate/part/kateviewhelpers.h b/kate/part/kateviewhelpers.h
index 4687365f6..8e3fa94b3 100644
--- a/kate/part/kateviewhelpers.h
+++ b/kate/part/kateviewhelpers.h
@@ -24,11 +24,11 @@
#include <kaction.h>
#include <klineedit.h>
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qcolor.h>
-#include <qscrollbar.h>
-#include <qintdict.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqcolor.h>
+#include <tqscrollbar.h>
+#include <tqintdict.h>
class KateDocument;
class KateView;
@@ -59,12 +59,12 @@ class KateScrollBar : public QScrollBar
void sliderMMBMoved(int value);
protected:
- virtual void mousePressEvent(QMouseEvent* e);
- virtual void mouseReleaseEvent(QMouseEvent* e);
- virtual void mouseMoveEvent (QMouseEvent* e);
- virtual void paintEvent(QPaintEvent *);
- virtual void resizeEvent(QResizeEvent *);
- virtual void styleChange(QStyle &oldStyle);
+ virtual void mousePressEvent(TQMouseEvent* e);
+ virtual void mouseReleaseEvent(TQMouseEvent* e);
+ virtual void mouseMoveEvent (TQMouseEvent* e);
+ virtual void paintEvent(TQPaintEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
+ virtual void styleChange(TQStyle &oldStyle);
virtual void valueChange();
virtual void rangeChange();
@@ -87,7 +87,7 @@ class KateScrollBar : public QScrollBar
int m_bottomMargin;
uint m_savVisibleLines;
- QIntDict<QColor> m_lines;
+ TQIntDict<TQColor> m_lines;
bool m_showMarks;
};
@@ -100,18 +100,18 @@ class KateCmdLine : public KLineEdit
KateCmdLine (KateView *view);
private slots:
- void slotReturnPressed ( const QString& cmd );
+ void slotReturnPressed ( const TQString& cmd );
void hideMe ();
protected:
- void focusInEvent ( QFocusEvent *ev );
- void keyPressEvent( QKeyEvent *ev );
+ void focusInEvent ( TQFocusEvent *ev );
+ void keyPressEvent( TQKeyEvent *ev );
private:
void fromHistory( bool up );
KateView *m_view;
bool m_msgMode;
- QString m_oldText;
+ TQString m_oldText;
uint m_histpos; ///< position in the history
uint m_cmdend; ///< the point where a command ends in the text, if we have a valid one.
Kate::Command *m_command; ///< For completing flags/args and interactiveness
@@ -124,10 +124,10 @@ class KateIconBorder : public QWidget
Q_OBJECT
public:
- KateIconBorder( KateViewInternal* internalView, QWidget *parent );
+ KateIconBorder( KateViewInternal* internalView, TQWidget *parent );
// VERY IMPORTANT ;)
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
void updateFont();
int lineNumberWidth() const;
@@ -146,21 +146,21 @@ class KateIconBorder : public QWidget
bool foldingMarkersOn() const { return m_foldingMarkersOn; }
enum BorderArea { None, LineNumbers, IconBorder, FoldingMarkers };
- BorderArea positionToArea( const QPoint& ) const;
+ BorderArea positionToArea( const TQPoint& ) const;
signals:
void toggleRegionVisibility( unsigned int );
private:
- void paintEvent( QPaintEvent* );
+ void paintEvent( TQPaintEvent* );
void paintBorder (int x, int y, int width, int height);
- void mousePressEvent( QMouseEvent* );
- void mouseMoveEvent( QMouseEvent* );
- void mouseReleaseEvent( QMouseEvent* );
- void mouseDoubleClickEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
+ void mouseMoveEvent( TQMouseEvent* );
+ void mouseReleaseEvent( TQMouseEvent* );
+ void mouseDoubleClickEvent( TQMouseEvent* );
- void showMarkMenu( uint line, const QPoint& pos );
+ void showMarkMenu( uint line, const TQPoint& pos );
KateView *m_view;
KateDocument *m_doc;
@@ -178,8 +178,8 @@ class KateIconBorder : public QWidget
int m_maxCharWidth;
- mutable QPixmap m_arrow;
- mutable QColor m_oldBackgroundColor;
+ mutable TQPixmap m_arrow;
+ mutable TQColor m_oldBackgroundColor;
};
class KateViewEncodingAction : public KActionMenu
@@ -187,7 +187,7 @@ class KateViewEncodingAction : public KActionMenu
Q_OBJECT
public:
- KateViewEncodingAction(KateDocument *_doc, KateView *_view, const QString& text, QObject* parent = 0, const char* name = 0);
+ KateViewEncodingAction(KateDocument *_doc, KateView *_view, const TQString& text, TQObject* parent = 0, const char* name = 0);
~KateViewEncodingAction(){;};
diff --git a/kate/part/kateviewinternal.cpp b/kate/part/kateviewinternal.cpp
index 96edc1a9c..77f98643d 100644
--- a/kate/part/kateviewinternal.cpp
+++ b/kate/part/kateviewinternal.cpp
@@ -41,18 +41,18 @@
#include <kglobalsettings.h>
#include <kurldrag.h>
-#include <qstyle.h>
-#include <qdragobject.h>
-#include <qpopupmenu.h>
-#include <qdropsite.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qclipboard.h>
-#include <qpixmap.h>
-#include <qvbox.h>
+#include <tqstyle.h>
+#include <tqdragobject.h>
+#include <tqpopupmenu.h>
+#include <tqdropsite.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqclipboard.h>
+#include <tqpixmap.h>
+#include <tqvbox.h>
KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
- : QWidget (view, "", Qt::WStaticContents | Qt::WRepaintNoErase | Qt::WResizeNoErase )
+ : TQWidget (view, "", Qt::WStaticContents | Qt::WRepaintNoErase | Qt::WResizeNoErase )
, editSessionNumber (0)
, editIsRunning (false)
, m_view (view)
@@ -94,18 +94,18 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
//
// scrollbar for lines
//
- m_lineScroll = new KateScrollBar(QScrollBar::Vertical, this);
+ m_lineScroll = new KateScrollBar(TQScrollBar::Vertical, this);
m_lineScroll->show();
m_lineScroll->setTracking (true);
- m_lineLayout = new QVBoxLayout();
- m_colLayout = new QHBoxLayout();
+ m_lineLayout = new TQVBoxLayout();
+ m_colLayout = new TQHBoxLayout();
m_colLayout->addWidget(m_lineScroll);
m_lineLayout->addLayout(m_colLayout);
// bottom corner box
- m_dummy = new QWidget(m_view);
+ m_dummy = new TQWidget(m_view);
m_dummy->setFixedHeight(style().scrollBarExtent().width());
if (m_view->dynWordWrap())
@@ -116,14 +116,14 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
m_lineLayout->addWidget(m_dummy);
// Hijack the line scroller's controls, so we can scroll nicely for word-wrap
- connect(m_lineScroll, SIGNAL(prevPage()), SLOT(scrollPrevPage()));
- connect(m_lineScroll, SIGNAL(nextPage()), SLOT(scrollNextPage()));
+ connect(m_lineScroll, TQT_SIGNAL(prevPage()), TQT_SLOT(scrollPrevPage()));
+ connect(m_lineScroll, TQT_SIGNAL(nextPage()), TQT_SLOT(scrollNextPage()));
- connect(m_lineScroll, SIGNAL(prevLine()), SLOT(scrollPrevLine()));
- connect(m_lineScroll, SIGNAL(nextLine()), SLOT(scrollNextLine()));
+ connect(m_lineScroll, TQT_SIGNAL(prevLine()), TQT_SLOT(scrollPrevLine()));
+ connect(m_lineScroll, TQT_SIGNAL(nextLine()), TQT_SLOT(scrollNextLine()));
- connect(m_lineScroll, SIGNAL(sliderMoved(int)), SLOT(scrollLines(int)));
- connect(m_lineScroll, SIGNAL(sliderMMBMoved(int)), SLOT(scrollLines(int)));
+ connect(m_lineScroll, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(scrollLines(int)));
+ connect(m_lineScroll, TQT_SIGNAL(sliderMMBMoved(int)), TQT_SLOT(scrollLines(int)));
// catch wheel events, completing the hijack
m_lineScroll->installEventFilter(this);
@@ -131,7 +131,7 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
//
// scrollbar for columns
//
- m_columnScroll = new QScrollBar(QScrollBar::Horizontal,m_view);
+ m_columnScroll = new TQScrollBar(TQScrollBar::Horizontal,m_view);
// hide the column scrollbar in the dynamic word wrap mode
if (m_view->dynWordWrap())
@@ -142,8 +142,8 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
m_columnScroll->setTracking(true);
m_startX = 0;
- connect( m_columnScroll, SIGNAL( valueChanged (int) ),
- this, SLOT( scrollColumns (int) ) );
+ connect( m_columnScroll, TQT_SIGNAL( valueChanged (int) ),
+ this, TQT_SLOT( scrollColumns (int) ) );
//
// iconborder ;)
@@ -151,13 +151,13 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
leftBorder = new KateIconBorder( this, m_view );
leftBorder->show ();
- connect( leftBorder, SIGNAL(toggleRegionVisibility(unsigned int)),
- m_doc->foldingTree(), SLOT(toggleRegionVisibility(unsigned int)));
+ connect( leftBorder, TQT_SIGNAL(toggleRegionVisibility(unsigned int)),
+ m_doc->foldingTree(), TQT_SLOT(toggleRegionVisibility(unsigned int)));
- connect( doc->foldingTree(), SIGNAL(regionVisibilityChangedAt(unsigned int)),
- this, SLOT(slotRegionVisibilityChangedAt(unsigned int)));
- connect( doc, SIGNAL(codeFoldingUpdated()),
- this, SLOT(slotCodeFoldingChanged()) );
+ connect( doc->foldingTree(), TQT_SIGNAL(regionVisibilityChangedAt(unsigned int)),
+ this, TQT_SLOT(slotRegionVisibilityChangedAt(unsigned int)));
+ connect( doc, TQT_SIGNAL(codeFoldingUpdated()),
+ this, TQT_SLOT(slotCodeFoldingChanged()) );
displayCursor.setPos(0, 0);
cursor.setPos(0, 0);
@@ -182,28 +182,28 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
dragInfo.state = diNone;
// timers
- connect( &m_dragScrollTimer, SIGNAL( timeout() ),
- this, SLOT( doDragScroll() ) );
+ connect( &m_dragScrollTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( doDragScroll() ) );
- connect( &m_scrollTimer, SIGNAL( timeout() ),
- this, SLOT( scrollTimeout() ) );
+ connect( &m_scrollTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( scrollTimeout() ) );
- connect( &m_cursorTimer, SIGNAL( timeout() ),
- this, SLOT( cursorTimeout() ) );
+ connect( &m_cursorTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( cursorTimeout() ) );
- connect( &m_textHintTimer, SIGNAL( timeout() ),
- this, SLOT( textHintTimeout() ) );
+ connect( &m_textHintTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( textHintTimeout() ) );
// selection changed to set anchor
- connect( m_view, SIGNAL( selectionChanged() ),
- this, SLOT( viewSelectionChanged() ) );
+ connect( m_view, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( viewSelectionChanged() ) );
// this is a work arround for RTL desktops
// should be changed in kde 3.3
// BTW: this comment has been "ported" from 3.1.X tree
// any hacker with BIDI knowlege is welcomed to fix kate problems :)
- if (QApplication::reverseLayout()){
+ if (TQApplication::reverseLayout()){
m_view->m_grid->addMultiCellWidget(leftBorder, 0, 1, 2, 2);
m_view->m_grid->addMultiCellWidget(m_columnScroll, 1, 1, 0, 1);
m_view->m_grid->addMultiCellLayout(m_lineLayout, 0, 0, 0, 0);
@@ -722,7 +722,7 @@ void KateViewInternal::paintText (int x, int y, int width, int height, bool pain
uint endz = startz + 1 + (height / h);
uint lineRangesSize = lineRanges.size();
- static QPixmap drawBuffer;
+ static TQPixmap drawBuffer;
if (drawBuffer.width() < KateViewInternal::width() || drawBuffer.height() < (int)h)
drawBuffer.resize(KateViewInternal::width(), (int)h);
@@ -730,8 +730,8 @@ void KateViewInternal::paintText (int x, int y, int width, int height, bool pain
if (drawBuffer.isNull())
return;
- QPainter paint(this);
- QPainter paintDrawBuffer(&drawBuffer);
+ TQPainter paint(this);
+ TQPainter paintDrawBuffer(&drawBuffer);
// TODO put in the proper places
m_view->renderer()->setCaretStyle(m_view->isOverwriteMode() ? KateRenderer::Replace : KateRenderer::Insert);
@@ -839,11 +839,11 @@ void KateViewInternal::slotRegionBeginEndAddedRemoved(unsigned int)
leftBorder->update();
}
-void KateViewInternal::showEvent ( QShowEvent *e )
+void KateViewInternal::showEvent ( TQShowEvent *e )
{
updateView ();
- QWidget::showEvent (e);
+ TQWidget::showEvent (e);
}
uint KateViewInternal::linesDisplayed() const
@@ -854,17 +854,17 @@ uint KateViewInternal::linesDisplayed() const
return (h - (h % fh)) / fh;
}
-QPoint KateViewInternal::cursorCoordinates()
+TQPoint KateViewInternal::cursorCoordinates()
{
int viewLine = displayViewLine(displayCursor, true);
if (viewLine == -1)
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
uint y = viewLine * m_view->renderer()->fontHeight();
uint x = cXPos - m_startX - lineRanges[viewLine].startX + leftBorder->width() + lineRanges[viewLine].xOffset();
- return QPoint(x, y);
+ return TQPoint(x, y);
}
void KateViewInternal::updateMicroFocusHint()
@@ -1216,7 +1216,7 @@ void KateViewInternal::moveEdge( Bias bias, bool sel )
void KateViewInternal::home( bool sel )
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_Home, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Home, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -1257,7 +1257,7 @@ void KateViewInternal::home( bool sel )
void KateViewInternal::end( bool sel )
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_End, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_End, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -1652,13 +1652,13 @@ int KateViewInternal::lineMaxCursorX(const KateLineRange& range)
int maxX = range.endX;
if (maxX && range.wrap) {
- QChar lastCharInLine = textLine(range.line)->getChar(range.endCol - 1);
+ TQChar lastCharInLine = textLine(range.line)->getChar(range.endCol - 1);
- if (lastCharInLine == QChar('\t')) {
+ if (lastCharInLine == TQChar('\t')) {
int lineSize = 0;
int lastTabSize = 0;
for(int i = range.startCol; i < range.endCol; i++) {
- if (textLine(range.line)->getChar(i) == QChar('\t')) {
+ if (textLine(range.line)->getChar(i) == TQChar('\t')) {
lastTabSize = m_view->tabWidth() - (lineSize % m_view->tabWidth());
lineSize += lastTabSize;
} else {
@@ -1687,7 +1687,7 @@ int KateViewInternal::lineMaxCol(const KateLineRange& range)
void KateViewInternal::cursorUp(bool sel)
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_Up, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Up, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -1754,7 +1754,7 @@ void KateViewInternal::cursorUp(bool sel)
void KateViewInternal::cursorDown(bool sel)
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_Down, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Down, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -1889,7 +1889,7 @@ void KateViewInternal::setAutoCenterLines(int viewLines, bool updateView)
void KateViewInternal::pageUp( bool sel )
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_PageUp, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_PageUp, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -1938,7 +1938,7 @@ void KateViewInternal::pageUp( bool sel )
void KateViewInternal::pageDown( bool sel )
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_PageDown, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_PageDown, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -2025,7 +2025,7 @@ void KateViewInternal::bottom( bool sel )
void KateViewInternal::top_home( bool sel )
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_Home, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Home, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -2037,7 +2037,7 @@ void KateViewInternal::top_home( bool sel )
void KateViewInternal::bottom_end( bool sel )
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_End, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_End, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -2389,7 +2389,7 @@ void KateViewInternal::paintCursor()
}
// Point in content coordinates
-void KateViewInternal::placeCursor( const QPoint& p, bool keepSelection, bool updateSelection )
+void KateViewInternal::placeCursor( const TQPoint& p, bool keepSelection, bool updateSelection )
{
KateLineRange thisRange = yToKateLineRange(p.y());
@@ -2421,7 +2421,7 @@ void KateViewInternal::placeCursor( const QPoint& p, bool keepSelection, bool up
}
// Point in content coordinates
-bool KateViewInternal::isTargetSelected( const QPoint& p )
+bool KateViewInternal::isTargetSelected( const TQPoint& p )
{
KateLineRange thisRange = yToKateLineRange(p.y());
@@ -2436,26 +2436,26 @@ bool KateViewInternal::isTargetSelected( const QPoint& p )
//BEGIN EVENT HANDLING STUFF
-bool KateViewInternal::eventFilter( QObject *obj, QEvent *e )
+bool KateViewInternal::eventFilter( TQObject *obj, TQEvent *e )
{
if (obj == m_lineScroll)
{
// the second condition is to make sure a scroll on the vertical bar doesn't cause a horizontal scroll ;)
- if (e->type() == QEvent::Wheel && m_lineScroll->minValue() != m_lineScroll->maxValue())
+ if (e->type() == TQEvent::Wheel && m_lineScroll->minValue() != m_lineScroll->maxValue())
{
- wheelEvent((QWheelEvent*)e);
+ wheelEvent((TQWheelEvent*)e);
return true;
}
// continue processing
- return QWidget::eventFilter( obj, e );
+ return TQWidget::eventFilter( obj, e );
}
switch( e->type() )
{
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
{
- QKeyEvent *k = (QKeyEvent *)e;
+ TQKeyEvent *k = (TQKeyEvent *)e;
if (m_view->m_codeCompletion->codeCompletionVisible ())
{
@@ -2478,11 +2478,11 @@ bool KateViewInternal::eventFilter( QObject *obj, QEvent *e )
} break;
- case QEvent::DragMove:
+ case TQEvent::DragMove:
{
- QPoint currentPoint = ((QDragMoveEvent*) e)->pos();
+ TQPoint currentPoint = ((TQDragMoveEvent*) e)->pos();
- QRect doNotScrollRegion( scrollMargin, scrollMargin,
+ TQRect doNotScrollRegion( scrollMargin, scrollMargin,
width() - scrollMargin * 2,
height() - scrollMargin * 2 );
@@ -2490,18 +2490,18 @@ bool KateViewInternal::eventFilter( QObject *obj, QEvent *e )
{
startDragScroll();
// Keep sending move events
- ( (QDragMoveEvent*)e )->accept( QRect(0,0,0,0) );
+ ( (TQDragMoveEvent*)e )->accept( TQRect(0,0,0,0) );
}
- dragMoveEvent((QDragMoveEvent*)e);
+ dragMoveEvent((TQDragMoveEvent*)e);
} break;
- case QEvent::DragLeave:
+ case TQEvent::DragLeave:
// happens only when pressing ESC while dragging
stopDragScroll();
break;
- case QEvent::WindowBlocked:
+ case TQEvent::WindowBlocked:
// next focus originates from an internal dialog:
// don't show the modonhd prompt
m_doc->m_isasking = -1;
@@ -2511,10 +2511,10 @@ bool KateViewInternal::eventFilter( QObject *obj, QEvent *e )
break;
}
- return QWidget::eventFilter( obj, e );
+ return TQWidget::eventFilter( obj, e );
}
-void KateViewInternal::keyPressEvent( QKeyEvent* e )
+void KateViewInternal::keyPressEvent( TQKeyEvent* e )
{
KKey key(e);
@@ -2597,7 +2597,7 @@ void KateViewInternal::keyPressEvent( QKeyEvent* e )
if (m_view->hasSelection() || (m_doc->configFlags() & KateDocumentConfig::cfTabIndentsMode))
m_doc->indent( m_view, cursor.line(), 1 );
else if (m_doc->configFlags() & KateDocumentConfig::cfTabInsertsTab)
- m_doc->typeChars ( m_view, QString ("\t") );
+ m_doc->typeChars ( m_view, TQString ("\t") );
else
m_doc->insertIndentChars ( m_view );
@@ -2635,7 +2635,7 @@ void KateViewInternal::keyPressEvent( QKeyEvent* e )
e->ignore();
}
-void KateViewInternal::keyReleaseEvent( QKeyEvent* e )
+void KateViewInternal::keyReleaseEvent( TQKeyEvent* e )
{
KKey key(e);
@@ -2649,9 +2649,9 @@ void KateViewInternal::keyReleaseEvent( QKeyEvent* e )
if (m_selChangedByUser)
{
- QApplication::clipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->copy();
- QApplication::clipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
m_selChangedByUser = false;
}
@@ -2662,11 +2662,11 @@ void KateViewInternal::keyReleaseEvent( QKeyEvent* e )
return;
}
-void KateViewInternal::contextMenuEvent ( QContextMenuEvent * e )
+void KateViewInternal::contextMenuEvent ( TQContextMenuEvent * e )
{
// try to show popup menu
- QPoint p = e->pos();
+ TQPoint p = e->pos();
if ( m_view->m_doc->browserView() )
{
@@ -2674,7 +2674,7 @@ void KateViewInternal::contextMenuEvent ( QContextMenuEvent * e )
return;
}
- if ( e->reason() == QContextMenuEvent::Keyboard )
+ if ( e->reason() == TQContextMenuEvent::Keyboard )
{
makeVisible( cursor, 0 );
p = cursorCoordinates();
@@ -2689,7 +2689,7 @@ void KateViewInternal::contextMenuEvent ( QContextMenuEvent * e )
}
}
-void KateViewInternal::mousePressEvent( QMouseEvent* e )
+void KateViewInternal::mousePressEvent( TQMouseEvent* e )
{
switch (e->button())
{
@@ -2711,9 +2711,9 @@ void KateViewInternal::mousePressEvent( QMouseEvent* e )
m_view->selectLine( cursor );
}
- QApplication::clipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->copy();
- QApplication::clipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
// Keep the line at the select anchor selected during further
// mouse selection
@@ -2816,7 +2816,7 @@ void KateViewInternal::mousePressEvent( QMouseEvent* e )
}
}
-void KateViewInternal::mouseDoubleClickEvent(QMouseEvent *e)
+void KateViewInternal::mouseDoubleClickEvent(TQMouseEvent *e)
{
switch (e->button())
{
@@ -2889,9 +2889,9 @@ void KateViewInternal::mouseDoubleClickEvent(QMouseEvent *e)
// Move cursor to end (or beginning) of selected word
if (m_view->hasSelection())
{
- QApplication::clipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->copy();
- QApplication::clipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
// Shift+DC before the "cached" word should move the cursor to the
// beginning of the selection, not the end
@@ -2902,7 +2902,7 @@ void KateViewInternal::mouseDoubleClickEvent(QMouseEvent *e)
}
possibleTripleClick = true;
- QTimer::singleShot ( QApplication::doubleClickInterval(), this, SLOT(tripleClickTimeout()) );
+ TQTimer::singleShot ( TQApplication::doubleClickInterval(), this, TQT_SLOT(tripleClickTimeout()) );
scrollX = 0;
scrollY = 0;
@@ -2923,7 +2923,7 @@ void KateViewInternal::tripleClickTimeout()
possibleTripleClick = false;
}
-void KateViewInternal::mouseReleaseEvent( QMouseEvent* e )
+void KateViewInternal::mouseReleaseEvent( TQMouseEvent* e )
{
switch (e->button())
{
@@ -2933,9 +2933,9 @@ void KateViewInternal::mouseReleaseEvent( QMouseEvent* e )
if (m_selChangedByUser)
{
- QApplication::clipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->copy();
- QApplication::clipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
// Set cursor to edge of selection... which edge depends on what
// "direction" the selection was made in
if ( m_view->selectStart < selectAnchor )
@@ -2961,9 +2961,9 @@ void KateViewInternal::mouseReleaseEvent( QMouseEvent* e )
if( m_doc->isReadWrite() )
{
- QApplication::clipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->paste ();
- QApplication::clipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
}
e->accept ();
@@ -2975,7 +2975,7 @@ void KateViewInternal::mouseReleaseEvent( QMouseEvent* e )
}
}
-void KateViewInternal::mouseMoveEvent( QMouseEvent* e )
+void KateViewInternal::mouseMoveEvent( TQMouseEvent* e )
{
if( e->state() & LeftButton )
{
@@ -2983,7 +2983,7 @@ void KateViewInternal::mouseMoveEvent( QMouseEvent* e )
{
// we had a mouse down, but haven't confirmed a drag yet
// if the mouse has moved sufficiently, we will confirm
- QPoint p( e->pos() - dragInfo.start );
+ TQPoint p( e->pos() - dragInfo.start );
// we've left the drag square, we can start a real drag operation now
if( p.manhattanLength() > KGlobalSettings::dndEventDelay() )
@@ -3023,7 +3023,7 @@ void KateViewInternal::mouseMoveEvent( QMouseEvent* e )
scrollY = d;
}
- placeCursor( QPoint( mouseX, mouseY ), true );
+ placeCursor( TQPoint( mouseX, mouseY ), true );
}
else
@@ -3052,12 +3052,12 @@ void KateViewInternal::mouseMoveEvent( QMouseEvent* e )
}
}
-void KateViewInternal::paintEvent(QPaintEvent *e)
+void KateViewInternal::paintEvent(TQPaintEvent *e)
{
paintText(e->rect().x(), e->rect().y(), e->rect().width(), e->rect().height());
}
-void KateViewInternal::resizeEvent(QResizeEvent* e)
+void KateViewInternal::resizeEvent(TQResizeEvent* e)
{
bool expandedHorizontally = width() > e->oldSize().width();
bool expandedVertically = height() > e->oldSize().height();
@@ -3119,7 +3119,7 @@ void KateViewInternal::scrollTimeout ()
if (scrollX || scrollY)
{
scrollLines (startPos().line() + (scrollY / (int)m_view->renderer()->fontHeight()));
- placeCursor( QPoint( mouseX, mouseY ), true );
+ placeCursor( TQPoint( mouseX, mouseY ), true );
}
}
@@ -3145,14 +3145,14 @@ void KateViewInternal::textHintTimeout ()
KateTextCursor c(realLine, 0);
m_view->renderer()->textWidth( c, startX() + m_textHintMouseX, startCol);
- QString tmp;
+ TQString tmp;
emit m_view->needTextHint(c.line(), c.col(), tmp);
if (!tmp.isEmpty()) kdDebug(13030)<<"Hint text: "<<tmp<<endl;
}
-void KateViewInternal::focusInEvent (QFocusEvent *)
+void KateViewInternal::focusInEvent (TQFocusEvent *)
{
if (KApplication::cursorFlashTime() > 0)
m_cursorTimer.start ( KApplication::cursorFlashTime() / 2 );
@@ -3167,7 +3167,7 @@ void KateViewInternal::focusInEvent (QFocusEvent *)
emit m_view->gotFocus( m_view );
}
-void KateViewInternal::focusOutEvent (QFocusEvent *)
+void KateViewInternal::focusOutEvent (TQFocusEvent *)
{
if( m_view->renderer() && ! m_view->m_codeCompletion->codeCompletionVisible() )
{
@@ -3184,17 +3184,17 @@ void KateViewInternal::focusOutEvent (QFocusEvent *)
void KateViewInternal::doDrag()
{
dragInfo.state = diDragging;
- dragInfo.dragObject = new QTextDrag(m_view->selection(), this);
+ dragInfo.dragObject = new TQTextDrag(m_view->selection(), this);
dragInfo.dragObject->drag();
}
-void KateViewInternal::dragEnterEvent( QDragEnterEvent* event )
+void KateViewInternal::dragEnterEvent( TQDragEnterEvent* event )
{
- event->accept( (QTextDrag::canDecode(event) && m_doc->isReadWrite()) ||
+ event->accept( (TQTextDrag::canDecode(event) && m_doc->isReadWrite()) ||
KURLDrag::canDecode(event) );
}
-void KateViewInternal::dragMoveEvent( QDragMoveEvent* event )
+void KateViewInternal::dragMoveEvent( TQDragMoveEvent* event )
{
// track the cursor to the current drop location
placeCursor( event->pos(), true, false );
@@ -3204,17 +3204,17 @@ void KateViewInternal::dragMoveEvent( QDragMoveEvent* event )
event->acceptAction();
}
-void KateViewInternal::dropEvent( QDropEvent* event )
+void KateViewInternal::dropEvent( TQDropEvent* event )
{
if ( KURLDrag::canDecode(event) ) {
emit dropEventPass(event);
- } else if ( QTextDrag::canDecode(event) && m_doc->isReadWrite() ) {
+ } else if ( TQTextDrag::canDecode(event) && m_doc->isReadWrite() ) {
- QString text;
+ TQString text;
- if (!QTextDrag::decode(event, text))
+ if (!TQTextDrag::decode(event, text))
return;
// is the source our own document?
@@ -3235,7 +3235,7 @@ void KateViewInternal::dropEvent( QDropEvent* event )
m_doc->editStart ();
// on move: remove selected text; on copy: duplicate text
- if ( event->action() != QDropEvent::Copy )
+ if ( event->action() != TQDropEvent::Copy )
m_view->removeSelectedText();
m_doc->insertText( cursor.line(), cursor.col(), text );
@@ -3261,7 +3261,7 @@ void KateViewInternal::clear()
displayCursor.setPos(0, 0);
}
-void KateViewInternal::wheelEvent(QWheelEvent* e)
+void KateViewInternal::wheelEvent(TQWheelEvent* e)
{
if (m_lineScroll->minValue() != m_lineScroll->maxValue() && e->orientation() != Qt::Horizontal) {
// React to this as a vertical event
@@ -3271,15 +3271,15 @@ void KateViewInternal::wheelEvent(QWheelEvent* e)
else
scrollNextPage();
} else {
- scrollViewLines(-((e->delta() / 120) * QApplication::wheelScrollLines()));
+ scrollViewLines(-((e->delta() / 120) * TQApplication::wheelScrollLines()));
// maybe a menu was opened or a bubbled window title is on us -> we shall erase it
update();
leftBorder->update();
}
} else if (columnScrollingPossible()) {
- QWheelEvent copy = *e;
- QApplication::sendEvent(m_columnScroll, &copy);
+ TQWheelEvent copy = *e;
+ TQApplication::sendEvent(m_columnScroll, &copy);
} else {
e->ignore();
@@ -3301,7 +3301,7 @@ void KateViewInternal::stopDragScroll()
void KateViewInternal::doDragScroll()
{
- QPoint p = this->mapFromGlobal( QCursor::pos() );
+ TQPoint p = this->mapFromGlobal( TQCursor::pos() );
int dx = 0, dy = 0;
if ( p.y() < scrollMargin ) {
@@ -3411,7 +3411,7 @@ void KateViewInternal::viewSelectionChanged ()
}
//BEGIN IM INPUT STUFF
-void KateViewInternal::imStartEvent( QIMEvent *e )
+void KateViewInternal::imStartEvent( TQIMEvent *e )
{
if ( m_doc->m_bReadOnly ) {
e->ignore();
@@ -3429,7 +3429,7 @@ void KateViewInternal::imStartEvent( QIMEvent *e )
m_view->setIMSelectionValue( m_imPreeditStartLine, m_imPreeditStart, 0, 0, 0, true );
}
-void KateViewInternal::imComposeEvent( QIMEvent *e )
+void KateViewInternal::imComposeEvent( TQIMEvent *e )
{
if ( m_doc->m_bReadOnly ) {
e->ignore();
@@ -3462,7 +3462,7 @@ void KateViewInternal::imComposeEvent( QIMEvent *e )
updateView( true );
}
-void KateViewInternal::imEndEvent( QIMEvent *e )
+void KateViewInternal::imEndEvent( TQIMEvent *e )
{
if ( m_doc->m_bReadOnly ) {
e->ignore();
diff --git a/kate/part/kateviewinternal.h b/kate/part/kateviewinternal.h
index c5004d6be..815eb07c0 100644
--- a/kate/part/kateviewinternal.h
+++ b/kate/part/kateviewinternal.h
@@ -30,9 +30,9 @@
#include "katetextline.h"
#include "katedocument.h"
-#include <qpoint.h>
-#include <qtimer.h>
-#include <qintdict.h>
+#include <tqpoint.h>
+#include <tqtimer.h>
+#include <tqintdict.h>
class KateView;
class KateIconBorder;
@@ -151,37 +151,37 @@ class KateViewInternal : public QWidget
void bottom_end(bool sel=false);
inline const KateTextCursor& getCursor() { return cursor; }
- QPoint cursorCoordinates();
+ TQPoint cursorCoordinates();
void paintText (int x, int y, int width, int height, bool paintOnlyDirty = false);
// EVENT HANDLING STUFF - IMPORTANT
protected:
- void paintEvent(QPaintEvent *e);
- bool eventFilter( QObject *obj, QEvent *e );
- void keyPressEvent( QKeyEvent* );
- void keyReleaseEvent( QKeyEvent* );
- void resizeEvent( QResizeEvent* );
- void mousePressEvent( QMouseEvent* );
- void mouseDoubleClickEvent( QMouseEvent* );
- void mouseReleaseEvent( QMouseEvent* );
- void mouseMoveEvent( QMouseEvent* );
- void dragEnterEvent( QDragEnterEvent* );
- void dragMoveEvent( QDragMoveEvent* );
- void dropEvent( QDropEvent* );
- void showEvent ( QShowEvent *);
- void wheelEvent(QWheelEvent* e);
- void focusInEvent (QFocusEvent *);
- void focusOutEvent (QFocusEvent *);
-
- void contextMenuEvent ( QContextMenuEvent * e );
+ void paintEvent(TQPaintEvent *e);
+ bool eventFilter( TQObject *obj, TQEvent *e );
+ void keyPressEvent( TQKeyEvent* );
+ void keyReleaseEvent( TQKeyEvent* );
+ void resizeEvent( TQResizeEvent* );
+ void mousePressEvent( TQMouseEvent* );
+ void mouseDoubleClickEvent( TQMouseEvent* );
+ void mouseReleaseEvent( TQMouseEvent* );
+ void mouseMoveEvent( TQMouseEvent* );
+ void dragEnterEvent( TQDragEnterEvent* );
+ void dragMoveEvent( TQDragMoveEvent* );
+ void dropEvent( TQDropEvent* );
+ void showEvent ( TQShowEvent *);
+ void wheelEvent(TQWheelEvent* e);
+ void focusInEvent (TQFocusEvent *);
+ void focusOutEvent (TQFocusEvent *);
+
+ void contextMenuEvent ( TQContextMenuEvent * e );
private slots:
void tripleClickTimeout();
signals:
// emitted when KateViewInternal is not handling its own URI drops
- void dropEventPass(QDropEvent*);
+ void dropEventPass(TQDropEvent*);
private slots:
void slotRegionVisibilityChangedAt(unsigned int);
@@ -207,8 +207,8 @@ class KateViewInternal : public QWidget
void updateMicroFocusHint();
- void placeCursor( const QPoint& p, bool keepSelection = false, bool updateSelection = true );
- bool isTargetSelected( const QPoint& p );
+ void placeCursor( const TQPoint& p, bool keepSelection = false, bool updateSelection = true );
+ bool isTargetSelected( const TQPoint& p );
void doDrag();
@@ -236,8 +236,8 @@ class KateViewInternal : public QWidget
struct _dragInfo {
DragState state;
- QPoint start;
- QTextDrag* dragObject;
+ TQPoint start;
+ TQTextDrag* dragObject;
} dragInfo;
uint iconBorderHeight;
@@ -246,9 +246,9 @@ class KateViewInternal : public QWidget
// line scrollbar + first visible (virtual) line in the current view
//
KateScrollBar *m_lineScroll;
- QWidget* m_dummy;
- QVBoxLayout* m_lineLayout;
- QHBoxLayout* m_colLayout;
+ TQWidget* m_dummy;
+ TQVBoxLayout* m_lineLayout;
+ TQHBoxLayout* m_colLayout;
// These are now cursors to account for word-wrap.
KateSuperCursor m_startPos;
@@ -266,7 +266,7 @@ class KateViewInternal : public QWidget
//
// column scrollbar + x position
//
- QScrollBar *m_columnScroll;
+ TQScrollBar *m_columnScroll;
int m_startX;
// has selection changed while your mouse or shift key is pressed
@@ -284,7 +284,7 @@ class KateViewInternal : public QWidget
//
// lines Ranges, mostly useful to speedup + dyn. word wrap
//
- QMemArray<KateLineRange> lineRanges;
+ TQMemArray<KateLineRange> lineRanges;
// maximal lenght of textlines visible from given startLine
int maxLen(uint startLine);
@@ -353,10 +353,10 @@ class KateViewInternal : public QWidget
private:
// Timers
- QTimer m_dragScrollTimer;
- QTimer m_scrollTimer;
- QTimer m_cursorTimer;
- QTimer m_textHintTimer;
+ TQTimer m_dragScrollTimer;
+ TQTimer m_scrollTimer;
+ TQTimer m_cursorTimer;
+ TQTimer m_textHintTimer;
static const int scrollTime = 30;
static const int scrollMargin = 16;
@@ -381,9 +381,9 @@ class KateViewInternal : public QWidget
* IM input stuff
*/
protected:
- void imStartEvent( QIMEvent *e );
- void imComposeEvent( QIMEvent *e );
- void imEndEvent( QIMEvent *e );
+ void imStartEvent( TQIMEvent *e );
+ void imComposeEvent( TQIMEvent *e );
+ void imEndEvent( TQIMEvent *e );
private:
int m_imPreeditStartLine;
diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp
index af36f65f9..e3f9f52e6 100644
--- a/kate/part/test_regression.cpp
+++ b/kate/part/test_regression.cpp
@@ -33,8 +33,8 @@
#include <kapplication.h>
#include <kstandarddirs.h>
-#include <qimage.h>
-#include <qfile.h>
+#include <tqimage.h>
+#include <tqfile.h>
#include "test_regression.h"
#include <unistd.h>
#include <stdio.h>
@@ -47,22 +47,22 @@
#include <ksimpleconfig.h>
#include <kglobalsettings.h>
-#include <qcolor.h>
-#include <qcursor.h>
-#include <qdir.h>
-#include <qevent.h>
-#include <qobject.h>
-#include <qpushbutton.h>
-#include <qscrollview.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qvaluelist.h>
-#include <qwidget.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
+#include <tqcolor.h>
+#include <tqcursor.h>
+#include <tqdir.h>
+#include <tqevent.h>
+#include <tqobject.h>
+#include <tqpushbutton.h>
+#include <tqscrollview.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
#include <kstatusbar.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include "katedocument.h"
#include "kateview.h"
@@ -260,7 +260,7 @@ Value KateViewFunction::call(ExecState *exec, Object &/*thisObj*/, const List &a
REP_CALL(ShiftToMatchingBracket, shiftToMatchingBracket);
case Type: {
UString str = args[0].toString(exec);
- QString res = str.qstring();
+ TQString res = str.qstring();
return Boolean(m_view->doc()->typeChars(m_view, res));
}
}
@@ -316,13 +316,13 @@ bool OutputFunction::implementsCall() const
KJS::Value OutputFunction::call(KJS::ExecState *exec, KJS::Object &thisObj, const KJS::List &args)
{
- if (!*o->changed) *o->outstr = QString();
+ if (!*o->changed) *o->outstr = TQString();
switch (id) {
case Write:
case Writeln: {
// Gather all parameters and concatenate to string
- QString res;
+ TQString res;
for (int i = 0; i < args.size(); i++) {
res += args[i].toString(exec).qstring();
}
@@ -336,7 +336,7 @@ KJS::Value OutputFunction::call(KJS::ExecState *exec, KJS::Object &thisObj, cons
case WriteCursorPositionln:
case WriteCursorPosition: {
// Gather all parameters and concatenate to string
- QString res;
+ TQString res;
for (int i = 0; i < args.size(); i++) {
res += args[i].toString(exec).qstring();
}
@@ -344,7 +344,7 @@ KJS::Value OutputFunction::call(KJS::ExecState *exec, KJS::Object &thisObj, cons
// Append cursor position
uint l, c;
o->view->cursorPosition(&l, &c);
- res += "(" + QString::number(l) + "," + QString::number(c) + ")";
+ res += "(" + TQString::number(l) + "," + TQString::number(c) + ")";
if (id == WriteCursorPositionln)
res += "\n";
@@ -364,10 +364,10 @@ KJS::Value OutputFunction::call(KJS::ExecState *exec, KJS::Object &thisObj, cons
const char failureSnapshotPrefix[] = "testkateregressionrc-FS.";
-static QString findMostRecentFailureSnapshot() {
- QDir dir(kapp->dirs()->saveLocation("config"),
- QString(failureSnapshotPrefix)+"*",
- QDir::Time, QDir::Files);
+static TQString findMostRecentFailureSnapshot() {
+ TQDir dir(kapp->dirs()->saveLocation("config"),
+ TQString(failureSnapshotPrefix)+"*",
+ TQDir::Time, TQDir::Files);
return dir[0].mid(sizeof failureSnapshotPrefix - 1);
}
@@ -402,7 +402,7 @@ int main(int argc, char *argv[])
exit(1);
}
- QString kh("/var/tmp/%1_kate_non_existent");
+ TQString kh("/var/tmp/%1_kate_non_existent");
kh = kh.arg( pw->pw_name );
setenv( "KDEHOME", kh.latin1(), 1 );
setenv( "LC_ALL", "C", 1 );
@@ -416,12 +416,12 @@ int main(int argc, char *argv[])
KCmdLineArgs *args = KCmdLineArgs::parsedArgs( );
- QCString baseDir = args->getOption("base");
- QCString baseDirConfigFile(::getenv("HOME") + QCString(BASE_DIR_CONFIG));
+ TQCString baseDir = args->getOption("base");
+ TQCString baseDirConfigFile(::getenv("HOME") + TQCString(BASE_DIR_CONFIG));
{
- QFile baseDirConfig(baseDirConfigFile);
+ TQFile baseDirConfig(baseDirConfigFile);
if (baseDirConfig.open(IO_ReadOnly)) {
- QTextStream bds(&baseDirConfig);
+ TQTextStream bds(&baseDirConfig);
baseDir = bds.readLine().latin1();
}
}
@@ -449,12 +449,12 @@ int main(int argc, char *argv[])
int testcase_index = 0;
if (baseDir.isEmpty()) baseDir = args->arg(testcase_index++);
- QFileInfo bdInfo(baseDir);
- baseDir = QFile::encodeName(bdInfo.absFilePath());
+ TQFileInfo bdInfo(baseDir);
+ baseDir = TQFile::encodeName(bdInfo.absFilePath());
const char *subdirs[] = {"tests", "baseline", "output", "resources"};
for ( int i = 0; i < 2; i++ ) {
- QFileInfo sourceDir(QFile::encodeName( baseDir ) + "/" + subdirs[i]);
+ TQFileInfo sourceDir(TQFile::encodeName( baseDir ) + "/" + subdirs[i]);
if ( !sourceDir.exists() || !sourceDir.isDir() ) {
fprintf(stderr,"ERROR: Source directory \"%s/%s\": no such directory.\n", (const char *)baseDir, subdirs[i]);
exit(1);
@@ -501,7 +501,7 @@ int main(int argc, char *argv[])
7001, 7011, 6070, 6080, 6090, 0};
int channel = args->isSet( "debug" ) ? 2 : 4;
for ( int i = 0; areas[i]; ++i ) {
- dc.setGroup( QString::number( areas[i] ) );
+ dc.setGroup( TQString::number( areas[i] ) );
dc.writeEntry( "InfoOutput", channel );
}
dc.sync();
@@ -549,16 +549,16 @@ int main(int argc, char *argv[])
baseDir,
args->getOption("output"),
args->isSet("genoutput"));
- QObject::connect(part->browserExtension(), SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)),
- regressionTest, SLOT(slotOpenURL(const KURL&, const KParts::URLArgs &)));
- QObject::connect(part->browserExtension(), SIGNAL(resizeTopLevelWidget( int, int )),
- regressionTest, SLOT(resizeTopLevelWidget( int, int )));
+ TQObject::connect(part->browserExtension(), TQT_SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)),
+ regressionTest, TQT_SLOT(slotOpenURL(const KURL&, const KParts::URLArgs &)));
+ TQObject::connect(part->browserExtension(), TQT_SIGNAL(resizeTopLevelWidget( int, int )),
+ regressionTest, TQT_SLOT(resizeTopLevelWidget( int, int )));
regressionTest->m_keepOutput = args->isSet("keep-output");
regressionTest->m_showGui = args->isSet("show");
{
- QString failureSnapshot = args->getOption("cmp-failures");
+ TQString failureSnapshot = args->getOption("cmp-failures");
if (failureSnapshot.isEmpty())
failureSnapshot = findMostRecentFailureSnapshot();
if (!failureSnapshot.isEmpty())
@@ -568,7 +568,7 @@ int main(int argc, char *argv[])
}
if (args->isSet("save-failures")) {
- QString failureSaver = args->getOption("save-failures");
+ TQString failureSaver = args->getOption("save-failures");
regressionTest->setFailureSnapshotSaver(
new KSimpleConfig(failureSnapshotPrefix + failureSaver, false),
failureSaver);
@@ -580,7 +580,7 @@ int main(int argc, char *argv[])
for (; testcase_index < args->count(); testcase_index++)
tests << args->arg(testcase_index);
if (tests.count() > 0)
- for (QValueListConstIterator<QCString> it = tests.begin(); it != tests.end(); ++it) {
+ for (TQValueListConstIterator<TQCString> it = tests.begin(); it != tests.end(); ++it) {
result = regressionTest->runTests(*it,true);
if (!result) break;
}
@@ -614,18 +614,18 @@ int main(int argc, char *argv[])
if ( regressionTest->m_errors )
printf("Errors: %d\n",regressionTest->m_errors);
- QFile list( regressionTest->m_outputDir + "/links.html" );
+ TQFile list( regressionTest->m_outputDir + "/links.html" );
list.open( IO_WriteOnly|IO_Append );
- QString link, cl;
- link = QString( "<hr>%1 failures. (%2 expected failures)" )
+ TQString link, cl;
+ link = TQString( "<hr>%1 failures. (%2 expected failures)" )
.arg(regressionTest->m_failures_work )
.arg( regressionTest->m_failures_fail );
if (regressionTest->m_failures_new)
- link += QString(" <span style=\"color:red;font-weight:bold\">(%1 new failures since %2)</span>")
+ link += TQString(" <span style=\"color:red;font-weight:bold\">(%1 new failures since %2)</span>")
.arg(regressionTest->m_failures_new)
.arg(regressionTest->m_failureComp->group());
if (regressionTest->m_passes_new)
- link += QString(" <p style=\"color:green;font-weight:bold\">%1 new passes since %2</p>")
+ link += TQString(" <p style=\"color:green;font-weight:bold\">%1 new passes since %2</p>")
.arg(regressionTest->m_passes_new)
.arg(regressionTest->m_failureComp->group());
list.writeBlock( link.latin1(), link.length() );
@@ -651,9 +651,9 @@ int main(int argc, char *argv[])
RegressionTest *RegressionTest::curr = 0;
RegressionTest::RegressionTest(KateDocument *part, KConfig *baseConfig,
- const QString &baseDir,
- const QString &outputDir, bool _genOutput)
- : QObject(part)
+ const TQString &baseDir,
+ const TQString &outputDir, bool _genOutput)
+ : TQObject(part)
{
m_part = part;
m_view = static_cast<KateView *>(m_part->widget());
@@ -676,9 +676,9 @@ RegressionTest::RegressionTest(KateDocument *part, KConfig *baseConfig,
m_failures_work = m_failures_fail = m_failures_new = 0;
m_errors = 0;
- ::unlink( QFile::encodeName( m_outputDir + "/links.html" ) );
- QFile f( m_outputDir + "/empty.html" );
- QString s;
+ ::unlink( TQFile::encodeName( m_outputDir + "/links.html" ) );
+ TQFile f( m_outputDir + "/empty.html" );
+ TQString s;
f.open( IO_WriteOnly | IO_Truncate );
s = "<html><body>Follow the white rabbit";
f.writeBlock( s.latin1(), s.length() );
@@ -692,22 +692,22 @@ RegressionTest::RegressionTest(KateDocument *part, KConfig *baseConfig,
curr = this;
}
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
-static QStringList readListFile( const QString &filename )
+static TQStringList readListFile( const TQString &filename )
{
// Read ignore file for this directory
- QString ignoreFilename = filename;
- QFileInfo ignoreInfo(ignoreFilename);
- QStringList ignoreFiles;
+ TQString ignoreFilename = filename;
+ TQFileInfo ignoreInfo(ignoreFilename);
+ TQStringList ignoreFiles;
if (ignoreInfo.exists()) {
- QFile ignoreFile(ignoreFilename);
+ TQFile ignoreFile(ignoreFilename);
if (!ignoreFile.open(IO_ReadOnly)) {
fprintf(stderr,"Can't open %s\n",ignoreFilename.latin1());
exit(1);
}
- QTextStream ignoreStream(&ignoreFile);
- QString line;
+ TQTextStream ignoreStream(&ignoreFile);
+ TQString line;
while (!(line = ignoreStream.readLine()).isNull())
ignoreFiles.append(line);
ignoreFile.close();
@@ -723,23 +723,23 @@ RegressionTest::~RegressionTest()
delete m_failureSave;
}
-void RegressionTest::setFailureSnapshotConfig(KConfig *cfg, const QString &sname)
+void RegressionTest::setFailureSnapshotConfig(KConfig *cfg, const TQString &sname)
{
Q_ASSERT(cfg);
m_failureComp = cfg;
m_failureComp->setGroup(sname);
}
-void RegressionTest::setFailureSnapshotSaver(KConfig *cfg, const QString &sname)
+void RegressionTest::setFailureSnapshotSaver(KConfig *cfg, const TQString &sname)
{
Q_ASSERT(cfg);
m_failureSave = cfg;
m_failureSave->setGroup(sname);
}
-QStringList RegressionTest::concatListFiles(const QString &relPath, const QString &filename)
+TQStringList RegressionTest::concatListFiles(const TQString &relPath, const TQString &filename)
{
- QStringList cmds;
+ TQStringList cmds;
int pos = relPath.findRev('/');
if (pos >= 0)
cmds += concatListFiles(relPath.left(pos), filename);
@@ -747,17 +747,17 @@ QStringList RegressionTest::concatListFiles(const QString &relPath, const QStrin
return cmds;
}
-bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure)
+bool RegressionTest::runTests(TQString relPath, bool mustExist, int known_failure)
{
- m_currentOutput = QString::null;
+ m_currentOutput = TQString::null;
- if (!QFile(m_baseDir + "/tests/"+relPath).exists()) {
+ if (!TQFile(m_baseDir + "/tests/"+relPath).exists()) {
fprintf(stderr,"%s: No such file or directory\n",relPath.latin1());
return false;
}
- QString fullPath = m_baseDir + "/tests/"+relPath;
- QFileInfo info(fullPath);
+ TQString fullPath = m_baseDir + "/tests/"+relPath;
+ TQFileInfo info(fullPath);
if (!info.exists() && mustExist) {
fprintf(stderr,"%s: No such file or directory\n",relPath.latin1());
@@ -770,14 +770,14 @@ bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure
}
if (info.isDir()) {
- QStringList ignoreFiles = readListFile( m_baseDir + "/tests/"+relPath+"/ignore" );
- QStringList failureFiles = readListFile( m_baseDir + "/tests/"+relPath+"/KNOWN_FAILURES" );
+ TQStringList ignoreFiles = readListFile( m_baseDir + "/tests/"+relPath+"/ignore" );
+ TQStringList failureFiles = readListFile( m_baseDir + "/tests/"+relPath+"/KNOWN_FAILURES" );
// Run each test in this directory, recusively
- QDir sourceDir(m_baseDir + "/tests/"+relPath);
+ TQDir sourceDir(m_baseDir + "/tests/"+relPath);
for (uint fileno = 0; fileno < sourceDir.count(); fileno++) {
- QString filename = sourceDir[fileno];
- QString relFilename = relPath.isEmpty() ? filename : relPath+"/"+filename;
+ TQString filename = sourceDir[fileno];
+ TQString relFilename = relPath.isEmpty() ? filename : relPath+"/"+filename;
if (filename.startsWith(".") || ignoreFiles.contains(filename) )
continue;
@@ -791,8 +791,8 @@ bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure
}
else if (info.isFile()) {
- QString relativeDir = QFileInfo(relPath).dirPath();
- QString filename = info.fileName();
+ TQString relativeDir = TQFileInfo(relPath).dirPath();
+ TQString filename = info.fileName();
m_currentBase = m_baseDir + "/tests/"+relativeDir;
m_currentCategory = relativeDir;
m_currentTest = filename;
@@ -800,7 +800,7 @@ bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure
m_outputCustomised = false;
// gather commands
// directory-specific commands
- QStringList commands = concatListFiles(relPath, ".kateconfig-commands");
+ TQStringList commands = concatListFiles(relPath, ".kateconfig-commands");
// testcase-specific commands
commands += readListFile(m_currentBase + "/" + filename + "-commands");
@@ -827,14 +827,14 @@ bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure
return true;
}
-void RegressionTest::createLink( const QString& test, int failures )
+void RegressionTest::createLink( const TQString& test, int failures )
{
createMissingDirs( m_outputDir + "/" + test + "-compare.html" );
- QFile list( m_outputDir + "/links.html" );
+ TQFile list( m_outputDir + "/links.html" );
list.open( IO_WriteOnly|IO_Append );
- QString link;
- link = QString( "<a href=\"%1\" target=\"content\" title=\"%2\">" )
+ TQString link;
+ link = TQString( "<a href=\"%1\" target=\"content\" title=\"%2\">" )
.arg( test + "-compare.html" )
.arg( test );
link += m_currentTest;
@@ -858,10 +858,10 @@ void RegressionTest::createLink( const QString& test, int failures )
* @return path with all elements replaced by .. and concerning path elements
* to be relatively reachable from base.
*/
-static QString makeRelativePath(const QString &base, const QString &path)
+static TQString makeRelativePath(const TQString &base, const TQString &path)
{
- QString absBase = QFileInfo(base).absFilePath();
- QString absPath = QFileInfo(path).absFilePath();
+ TQString absBase = TQFileInfo(base).absFilePath();
+ TQString absPath = TQFileInfo(path).absFilePath();
// kdDebug() << "absPath: \"" << absPath << "\"" << endl;
// kdDebug() << "absBase: \"" << absBase << "\"" << endl;
@@ -871,8 +871,8 @@ static QString makeRelativePath(const QString &base, const QString &path)
pos++;
int newpos = absBase.find('/', pos);
if (newpos == -1) newpos = absBase.length();
- QConstString cmpPathComp(absPath.unicode() + pos, newpos - pos);
- QConstString cmpBaseComp(absBase.unicode() + pos, newpos - pos);
+ TQConstString cmpPathComp(absPath.unicode() + pos, newpos - pos);
+ TQConstString cmpBaseComp(absBase.unicode() + pos, newpos - pos);
// kdDebug() << "cmpPathComp: \"" << cmpPathComp.string() << "\"" << endl;
// kdDebug() << "cmpBaseComp: \"" << cmpBaseComp.string() << "\"" << endl;
// kdDebug() << "pos: " << pos << " newpos: " << newpos << endl;
@@ -884,10 +884,10 @@ static QString makeRelativePath(const QString &base, const QString &path)
// kdDebug() << "basepos " << basepos << " pathpos " << pathpos << endl;
- QString rel;
+ TQString rel;
{
- QConstString relBase(absBase.unicode() + basepos, absBase.length() - basepos);
- QConstString relPath(absPath.unicode() + pathpos, absPath.length() - pathpos);
+ TQConstString relBase(absBase.unicode() + basepos, absBase.length() - basepos);
+ TQConstString relPath(absPath.unicode() + pathpos, absPath.length() - pathpos);
// generate as many .. as there are path elements in relBase
if (relBase.string().length() > 0) {
for (int i = relBase.string().contains('/'); i > 0; --i)
@@ -903,43 +903,43 @@ static QString makeRelativePath(const QString &base, const QString &path)
/** processes events for at least \c msec milliseconds */
static void pause(int msec)
{
- QTime t;
+ TQTime t;
t.start();
do {
kapp->processEvents();
} while (t.elapsed() < msec);
}
-void RegressionTest::doFailureReport( const QString& test, int failures )
+void RegressionTest::doFailureReport( const TQString& test, int failures )
{
if ( failures == NoFailure ) {
- ::unlink( QFile::encodeName( m_outputDir + "/" + test + "-compare.html" ) );
+ ::unlink( TQFile::encodeName( m_outputDir + "/" + test + "-compare.html" ) );
return;
}
createLink( test, failures );
- QFile compare( m_outputDir + "/" + test + "-compare.html" );
+ TQFile compare( m_outputDir + "/" + test + "-compare.html" );
- QString testFile = QFileInfo(test).fileName();
+ TQString testFile = TQFileInfo(test).fileName();
- QString renderDiff;
- QString domDiff;
+ TQString renderDiff;
+ TQString domDiff;
- QString relOutputDir = makeRelativePath(m_baseDir, m_outputDir);
+ TQString relOutputDir = makeRelativePath(m_baseDir, m_outputDir);
// are blocking reads possible with KProcess?
char pwd[PATH_MAX];
(void) getcwd( pwd, PATH_MAX );
- chdir( QFile::encodeName( m_baseDir ) );
+ chdir( TQFile::encodeName( m_baseDir ) );
if ( failures & ResultFailure ) {
domDiff += "<pre>";
- FILE *pipe = popen( QString::fromLatin1( "diff -u baseline/%1-result %3/%2-result" )
+ FILE *pipe = popen( TQString::fromLatin1( "diff -u baseline/%1-result %3/%2-result" )
.arg ( test, test, relOutputDir ).latin1(), "r" );
- QTextIStream *is = new QTextIStream( pipe );
+ TQTextIStream *is = new TQTextIStream( pipe );
for ( int line = 0; line < 100 && !is->eof(); ++line ) {
- QString line = is->readLine();
+ TQString line = is->readLine();
line = line.replace( '<', "&lt;" );
line = line.replace( '>', "&gt;" );
domDiff += line + "\n";
@@ -952,13 +952,13 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
chdir( pwd );
// create a relative path so that it works via web as well. ugly
- QString relpath = makeRelativePath(m_outputDir + "/"
- + QFileInfo(test).dirPath(), m_baseDir);
+ TQString relpath = makeRelativePath(m_outputDir + "/"
+ + TQFileInfo(test).dirPath(), m_baseDir);
compare.open( IO_WriteOnly|IO_Truncate );
- QString cl;
- cl = QString( "<html><head><title>%1</title>" ).arg( test );
- cl += QString( "<script>\n"
+ TQString cl;
+ cl = TQString( "<html><head><title>%1</title>" ).arg( test );
+ cl += TQString( "<script>\n"
"var pics = new Array();\n"
"pics[0]=new Image();\n"
"pics[0].src = '%1';\n"
@@ -969,7 +969,7 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
"var lastb=0;\n" )
.arg( relpath+"/baseline/"+test+"-dump.png" )
.arg( testFile+"-dump.png" );
- cl += QString( "function toggleVisible(visible) {\n"
+ cl += TQString( "function toggleVisible(visible) {\n"
" document.getElementById('render').style.visibility= visible == 'render' ? 'visible' : 'hidden';\n"
" document.getElementById('image').style.visibility= visible == 'image' ? 'visible' : 'hidden';\n"
" document.getElementById('dom').style.visibility= visible == 'dom' ? 'visible' : 'hidden';\n"
@@ -978,7 +978,7 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
"document.getElementById('image').style.borderColor = t && !doflicker ? 'red' : 'gray';\n"
"toggleVisible('image');\n"
"}" );
- cl += QString ( "function runSlideShow(){\n"
+ cl += TQString ( "function runSlideShow(){\n"
" document.getElementById('image').src = pics[t].src;\n"
" if (doflicker)\n"
" t = 1 - t;\n"
@@ -995,24 +995,24 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
"}\n"
"</script>\n");
- cl += QString ("<style>\n"
+ cl += TQString ("<style>\n"
".buttondown { cursor: pointer; padding: 0px 20px; color: white; background-color: blue; border: inset blue 2px;}\n"
".button { cursor: pointer; padding: 0px 20px; color: black; background-color: white; border: outset blue 2px;}\n"
".diff { position: absolute; left: 10px; top: 100px; visibility: hidden; border: 1px black solid; background-color: white; color: black; /* width: 800; height: 600; overflow: scroll; */ }\n"
"</style>\n" );
- cl += QString( "<body onload=\"m(5); toggleVisible('dom');\"" );
- cl += QString(" text=black bgcolor=gray>\n<h1>%3</h1>\n" ).arg( test );
+ cl += TQString( "<body onload=\"m(5); toggleVisible('dom');\"" );
+ cl += TQString(" text=black bgcolor=gray>\n<h1>%3</h1>\n" ).arg( test );
if ( renderDiff.length() )
cl += "<span id='b4' class='button' onclick='showRender();m(4)'>R-DIFF</span>&nbsp;\n";
if ( domDiff.length() )
cl += "<span id='b5' class='button' onclick='showDom();m(5);'>D-DIFF</span>&nbsp;\n";
// The test file always exists - except for checkOutput called from *.js files
- if ( QFile::exists( m_baseDir + "/tests/"+ test ) )
- cl += QString( "<a class=button href=\"%1\">HTML</a>&nbsp;" )
+ if ( TQFile::exists( m_baseDir + "/tests/"+ test ) )
+ cl += TQString( "<a class=button href=\"%1\">HTML</a>&nbsp;" )
.arg( relpath+"/tests/"+test );
- cl += QString( "<hr>"
+ cl += TQString( "<hr>"
"<img style='border: solid 5px gray' src=\"%1\" id='image'>" )
.arg( relpath+"/baseline/"+test+"-dump.png" );
@@ -1024,7 +1024,7 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
compare.close();
}
-void RegressionTest::testStaticFile(const QString & filename, const QStringList &commands)
+void RegressionTest::testStaticFile(const TQString & filename, const TQStringList &commands)
{
qApp->mainWidget()->resize( 800, 600); // restore size
@@ -1035,16 +1035,16 @@ void RegressionTest::testStaticFile(const QString & filename, const QStringList
// load page
KURL url;
url.setProtocol("file");
- url.setPath(QFileInfo(m_baseDir + "/tests/"+filename).absFilePath());
+ url.setPath(TQFileInfo(m_baseDir + "/tests/"+filename).absFilePath());
m_part->openURL(url);
// inject commands
- for (QStringList::ConstIterator cit = commands.begin(); cit != commands.end(); ++cit) {
- QString str = (*cit).stripWhiteSpace();
+ for (TQStringList::ConstIterator cit = commands.begin(); cit != commands.end(); ++cit) {
+ TQString str = (*cit).stripWhiteSpace();
if (str.isEmpty() || str.startsWith("#")) continue;
Kate::Command *cmd = KateCmd::self()->queryCommand(str);
if (cmd) {
- QString msg;
+ TQString msg;
if (!cmd->exec(m_view, str, msg))
fprintf(stderr, "ERROR executing command '%s': %s\n", str.latin1(), msg.latin1());
}
@@ -1060,7 +1060,7 @@ void RegressionTest::testStaticFile(const QString & filename, const QStringList
TestJScriptEnv jsenv(m_part);
jsenv.output()->setChangedFlag(&m_outputCustomised);
jsenv.output()->setOutputString(&m_outputString);
- script_error = evalJS(jsenv.interpreter(), m_baseDir + "/tests/"+QFileInfo(filename).dirPath()+"/.kateconfig-script", true)
+ script_error = evalJS(jsenv.interpreter(), m_baseDir + "/tests/"+TQFileInfo(filename).dirPath()+"/.kateconfig-script", true)
&& evalJS(jsenv.interpreter(), m_baseDir + "/tests/"+filename+"-script");
}
@@ -1093,10 +1093,10 @@ bail_out:
m_part->closeURL();
}
-bool RegressionTest::evalJS(Interpreter &interp, const QString &filename, bool ignore_nonexistent)
+bool RegressionTest::evalJS(Interpreter &interp, const TQString &filename, bool ignore_nonexistent)
{
- QString fullSourceName = filename;
- QFile sourceFile(fullSourceName);
+ TQString fullSourceName = filename;
+ TQFile sourceFile(fullSourceName);
if (!sourceFile.open(IO_ReadOnly)) {
if (!ignore_nonexistent) {
@@ -1106,9 +1106,9 @@ bool RegressionTest::evalJS(Interpreter &interp, const QString &filename, bool i
return ignore_nonexistent;
}
- QTextStream stream ( &sourceFile );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
- QString code = stream.read();
+ TQTextStream stream ( &sourceFile );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQString code = stream.read();
sourceFile.close();
saw_failure = false;
@@ -1117,7 +1117,7 @@ bool RegressionTest::evalJS(Interpreter &interp, const QString &filename, bool i
if ( /*report_result &&*/ !ignore_errors) {
if (c.complType() == Throw) {
- QString errmsg = c.value().toString(interp.globalExec()).qstring();
+ TQString errmsg = c.value().toString(interp.globalExec()).qstring();
printf( "ERROR: %s (%s)\n",filename.latin1(), errmsg.latin1());
m_errors++;
return false;
@@ -1131,9 +1131,9 @@ public:
virtual UString className() const { return "global"; }
};
-RegressionTest::CheckResult RegressionTest::checkOutput(const QString &againstFilename)
+RegressionTest::CheckResult RegressionTest::checkOutput(const TQString &againstFilename)
{
- QString absFilename = QFileInfo(m_baseDir + "/baseline/" + againstFilename).absFilePath();
+ TQString absFilename = TQFileInfo(m_baseDir + "/baseline/" + againstFilename).absFilePath();
if ( svnIgnored( absFilename ) ) {
m_known_failures = NoFailure;
return Ignored;
@@ -1142,7 +1142,7 @@ RegressionTest::CheckResult RegressionTest::checkOutput(const QString &againstFi
CheckResult result = Success;
// compare result to existing file
- QString outputFilename = QFileInfo(m_outputDir + "/" + againstFilename).absFilePath();
+ TQString outputFilename = TQFileInfo(m_outputDir + "/" + againstFilename).absFilePath();
bool kf = false;
if ( m_known_failures & AllFailure )
kf = true;
@@ -1153,23 +1153,23 @@ RegressionTest::CheckResult RegressionTest::checkOutput(const QString &againstFi
outputFilename = absFilename;
// get existing content
- QString data;
+ TQString data;
if (m_outputCustomised) {
data = m_outputString;
} else {
data = m_part->text();
}
- QFile file(absFilename);
+ TQFile file(absFilename);
if (file.open(IO_ReadOnly)) {
- QTextStream stream ( &file );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream ( &file );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
- QString fileData = stream.read();
+ TQString fileData = stream.read();
result = ( fileData == data ) ? Success : Failure;
if ( !m_genOutput && result == Success && !m_keepOutput ) {
- ::unlink( QFile::encodeName( outputFilename ) );
+ ::unlink( TQFile::encodeName( outputFilename ) );
return Success;
}
} else if (!m_genOutput) {
@@ -1179,14 +1179,14 @@ RegressionTest::CheckResult RegressionTest::checkOutput(const QString &againstFi
// generate result file
createMissingDirs( outputFilename );
- QFile file2(outputFilename);
+ TQFile file2(outputFilename);
if (!file2.open(IO_WriteOnly)) {
fprintf(stderr,"Error writing to file %s\n",outputFilename.latin1());
exit(1);
}
- QTextStream stream2(&file2);
- stream2.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream2(&file2);
+ stream2.setEncoding( TQTextStream::UnicodeUTF8 );
stream2 << data;
if ( m_genOutput )
printf("Generated %s\n", outputFilename.latin1());
@@ -1202,7 +1202,7 @@ void RegressionTest::rereadConfig()
m_view->config()->readConfig(m_baseConfig);
}
-bool RegressionTest::reportResult(CheckResult result, const QString & description, bool *newfail)
+bool RegressionTest::reportResult(CheckResult result, const TQString & description, bool *newfail)
{
if ( result == Ignored ) {
//printf("IGNORED: ");
@@ -1212,14 +1212,14 @@ bool RegressionTest::reportResult(CheckResult result, const QString & descriptio
return reportResult( result == Success, description, newfail );
}
-bool RegressionTest::reportResult(bool passed, const QString & description, bool *newfail)
+bool RegressionTest::reportResult(bool passed, const TQString & description, bool *newfail)
{
if (newfail) *newfail = false;
if (m_genOutput)
return true;
- QString filename(m_currentTest + "-" + description);
+ TQString filename(m_currentTest + "-" + description);
if (!m_currentCategory.isEmpty())
filename = m_currentCategory + "/" + filename;
@@ -1262,7 +1262,7 @@ bool RegressionTest::reportResult(bool passed, const QString & description, bool
return passed;
}
-void RegressionTest::printDescription(const QString& description)
+void RegressionTest::printDescription(const TQString& description)
{
if (!m_currentCategory.isEmpty())
printf("%s/", m_currentCategory.latin1());
@@ -1270,7 +1270,7 @@ void RegressionTest::printDescription(const QString& description)
printf("%s", m_currentTest.latin1());
if (!description.isEmpty()) {
- QString desc = description;
+ TQString desc = description;
desc.replace( '\n', ' ' );
printf(" [%s]", desc.latin1());
}
@@ -1279,28 +1279,28 @@ void RegressionTest::printDescription(const QString& description)
fflush(stdout);
}
-void RegressionTest::createMissingDirs(const QString & filename)
+void RegressionTest::createMissingDirs(const TQString & filename)
{
- QFileInfo dif(filename);
- QFileInfo dirInfo( dif.dirPath() );
+ TQFileInfo dif(filename);
+ TQFileInfo dirInfo( dif.dirPath() );
if (dirInfo.exists())
return;
- QStringList pathComponents;
- QFileInfo parentDir = dirInfo;
+ TQStringList pathComponents;
+ TQFileInfo parentDir = dirInfo;
pathComponents.prepend(parentDir.absFilePath());
while (!parentDir.exists()) {
- QString parentPath = parentDir.absFilePath();
+ TQString parentPath = parentDir.absFilePath();
int slashPos = parentPath.findRev('/');
if (slashPos < 0)
break;
parentPath = parentPath.left(slashPos);
pathComponents.prepend(parentPath);
- parentDir = QFileInfo(parentPath);
+ parentDir = TQFileInfo(parentPath);
}
for (uint pathno = 1; pathno < pathComponents.count(); pathno++) {
- if (!QFileInfo(pathComponents[pathno]).exists() &&
- !QDir(pathComponents[pathno-1]).mkdir(pathComponents[pathno])) {
+ if (!TQFileInfo(pathComponents[pathno]).exists() &&
+ !TQDir(pathComponents[pathno-1]).mkdir(pathComponents[pathno])) {
fprintf(stderr,"Error creating directory %s\n",pathComponents[pathno].latin1());
exit(1);
}
@@ -1314,16 +1314,16 @@ void RegressionTest::slotOpenURL(const KURL &url, const KParts::URLArgs &args)
m_part->openURL(url);
}
-bool RegressionTest::svnIgnored( const QString &filename )
+bool RegressionTest::svnIgnored( const TQString &filename )
{
- QFileInfo fi( filename );
- QString ignoreFilename = fi.dirPath() + "/svnignore";
- QFile ignoreFile(ignoreFilename);
+ TQFileInfo fi( filename );
+ TQString ignoreFilename = fi.dirPath() + "/svnignore";
+ TQFile ignoreFile(ignoreFilename);
if (!ignoreFile.open(IO_ReadOnly))
return false;
- QTextStream ignoreStream(&ignoreFile);
- QString line;
+ TQTextStream ignoreStream(&ignoreFile);
+ TQString line;
while (!(line = ignoreStream.readLine()).isNull()) {
if ( line == fi.fileName() )
return true;
@@ -1335,8 +1335,8 @@ bool RegressionTest::svnIgnored( const QString &filename )
void RegressionTest::resizeTopLevelWidget( int w, int h )
{
qApp->mainWidget()->resize( w, h );
- // Since we're not visible, this doesn't have an immediate effect, QWidget posts the event
- QApplication::sendPostedEvents( 0, QEvent::Resize );
+ // Since we're not visible, this doesn't have an immediate effect, TQWidget posts the event
+ TQApplication::sendPostedEvents( 0, TQEvent::Resize );
}
#include "test_regression.moc"
diff --git a/kate/part/test_regression.h b/kate/part/test_regression.h
index bc528b4bc..3e4075e96 100644
--- a/kate/part/test_regression.h
+++ b/kate/part/test_regression.h
@@ -27,8 +27,8 @@
#include <katejscript.h>
#include <kateview.h>
#include <kurl.h>
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kjs/ustring.h>
#include <kjs/object.h>
#include <kjs/interpreter.h>
@@ -128,13 +128,13 @@ class OutputObject : public KJS::ObjectImp
virtual KJS::UString className() const;
void setChangedFlag(bool *flag) { changed = flag; }
- void setOutputString(QString *s) { outstr = s; }
+ void setOutputString(TQString *s) { outstr = s; }
private:
KateDocument *doc;
KateView *view;
bool *changed;
- QString *outstr;
+ TQString *outstr;
friend class OutputFunction;
};
@@ -166,40 +166,40 @@ class RegressionTest : public QObject
public:
RegressionTest(KateDocument *part, KConfig *baseConfig,
- const QString &baseDir, const QString &outputDir,
+ const TQString &baseDir, const TQString &outputDir,
bool _genOutput);
~RegressionTest();
enum OutputType { ResultDocument };
- void testStaticFile(const QString& filename, const QStringList &commands);
+ void testStaticFile(const TQString& filename, const TQStringList &commands);
enum CheckResult { Failure = 0, Success = 1, Ignored = 2 };
- CheckResult checkOutput(const QString& againstFilename);
+ CheckResult checkOutput(const TQString& againstFilename);
enum FailureType { NoFailure = 0, AllFailure = 1, ResultFailure = 4, NewFailure = 65536 };
- bool runTests(QString relPath = QString::null, bool mustExist = false, int known_failure = NoFailure);
- bool reportResult( bool passed, const QString & description = QString::null, bool *newfailure = 0 );
- bool reportResult(CheckResult result, const QString & description = QString::null, bool *newfailure = 0 );
+ bool runTests(TQString relPath = TQString::null, bool mustExist = false, int known_failure = NoFailure);
+ bool reportResult( bool passed, const TQString & description = TQString::null, bool *newfailure = 0 );
+ bool reportResult(CheckResult result, const TQString & description = TQString::null, bool *newfailure = 0 );
void rereadConfig();
- static void createMissingDirs(const QString &path);
+ static void createMissingDirs(const TQString &path);
- void setFailureSnapshotConfig(KConfig *cfg, const QString &snapshotname);
- void setFailureSnapshotSaver(KConfig *cfg, const QString &snapshotname);
+ void setFailureSnapshotConfig(KConfig *cfg, const TQString &snapshotname);
+ void setFailureSnapshotSaver(KConfig *cfg, const TQString &snapshotname);
- void createLink( const QString& test, int failures );
- void doFailureReport( const QString& test, int failures );
+ void createLink( const TQString& test, int failures );
+ void doFailureReport( const TQString& test, int failures );
KateDocument *m_part;
KateView *m_view;
KConfig *m_baseConfig;
- QString m_baseDir;
- QString m_outputDir;
+ TQString m_baseDir;
+ TQString m_outputDir;
bool m_genOutput;
- QString m_currentBase;
+ TQString m_currentBase;
KConfig *m_failureComp;
KConfig *m_failureSave;
- QString m_currentOutput;
- QString m_currentCategory;
- QString m_currentTest;
+ TQString m_currentOutput;
+ TQString m_currentCategory;
+ TQString m_currentTest;
bool m_keepOutput;
bool m_getOutput;
@@ -215,14 +215,14 @@ public:
bool ignore_errors;
int m_known_failures;
bool m_outputCustomised;
- QString m_outputString;
+ TQString m_outputString;
static RegressionTest *curr;
private:
- void printDescription(const QString& description);
+ void printDescription(const TQString& description);
- static bool svnIgnored( const QString &filename );
+ static bool svnIgnored( const TQString &filename );
private:
/**
@@ -231,14 +231,14 @@ private:
* return true nonetheless.
* @return true if script was valid, false otherwise
*/
- bool evalJS( KJS::Interpreter &interp, const QString &filename, bool ignore = false);
+ bool evalJS( KJS::Interpreter &interp, const TQString &filename, bool ignore = false);
/**
* concatenate contents of all list files down to but not including the
* tests directory.
* @param relPath relative path against tests-directory
* @param filename file name of the list files
*/
- QStringList concatListFiles(const QString &relPath, const QString &filename);
+ TQStringList concatListFiles(const TQString &relPath, const TQString &filename);
private slots:
void slotOpenURL(const KURL &url, const KParts::URLArgs &args);
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_