summaryrefslogtreecommitdiffstats
path: root/kate/interfaces
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kate/interfaces
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/interfaces')
-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
5 files changed, 78 insertions, 78 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.