summaryrefslogtreecommitdiffstats
path: root/quanta/src/document.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /quanta/src/document.h
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/src/document.h')
-rw-r--r--quanta/src/document.h140
1 files changed, 70 insertions, 70 deletions
diff --git a/quanta/src/document.h b/quanta/src/document.h
index 7b6ef151..ac5e3f84 100644
--- a/quanta/src/document.h
+++ b/quanta/src/document.h
@@ -19,10 +19,10 @@
#define DOCUMENT_H
//qt includes
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include <kurl.h>
#include <ktexteditor/markinterfaceextension.h>
@@ -71,39 +71,39 @@ class Document : public QWidget{
public:
Document(KTextEditor::Document *doc,
- QWidget *parent = 0, const char *name = 0, WFlags f=0);
+ TQWidget *parent = 0, const char *name = 0, WFlags f=0);
~Document();
KURL url();
bool isUntitled();
- void setUntitledUrl(const QString &url);
+ void setUntitledUrl(const TQString &url);
/** Returns tag name at specified position */
- QString getTagNameAt(int line, int col );
+ TQString getTagNameAt(int line, int col );
void selectText(int x1, int y1, int x2, int y2 );
- void replaceSelected(const QString &s);
+ void replaceSelected(const TQString &s);
/** insert tag in document */
- void insertTag(const QString &s1, const QString &s2 = QString::null);
+ void insertTag(const TQString &s1, const TQString &s2 = TQString::null);
/** Change the current tag's attributes with those from dict */
- void changeTag(Tag *tag, QDict<QString> *dict );
+ void changeTag(Tag *tag, TQDict<TQString> *dict );
/**Change the attr value of the called attrName to attrValue*/
- void changeTagAttribute(Tag *tag, const QString& attrName, const QString&attrValue);
+ void changeTagAttribute(Tag *tag, const TQString& attrName, const TQString&attrValue);
/**Change the namespace in a tag. Add if it's not present, or remove if the
namespace argument is empty*/
- void changeTagNamespace(Tag *tag, const QString& nameSpace);
+ void changeTagNamespace(Tag *tag, const TQString& nameSpace);
/** Insert the content of the url into the document. */
void insertFile(const KURL& url);
/** Inserts text at the current cursor position */
- void insertText(const QString &text, bool adjustCursor = true, bool reparse = true);
+ void insertText(const TQString &text, bool adjustCursor = true, bool reparse = true);
/** Recursively insert the mandatory childs of tag. Returns true if a child was
inserted.*/
bool insertChildTags(QTag *tag, QTag* lastTag = 0L);
- QPoint getGlobalCursorPos();
- QString find(const QRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
- QString findRev(const QRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
+ TQPoint getGlobalCursorPos();
+ TQString find(const TQRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
+ TQString findRev(const TQRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
/** Get the view of the document */
KTextEditor::View* view();
/** Get the KTextEditor::Document of the document */
@@ -118,24 +118,24 @@ public:
void createTempFile();
/** Closes and removes the temporary file. */
void closeTempFile();
- /** Returns the name of the temporary file, QString::null if no temporary file exists. */
- QString tempFileName();
+ /** Returns the name of the temporary file, TQString::null if no temporary file exists. */
+ TQString tempFileName();
/** Returns the DTD identifier for the document */
- QString getDTDIdentifier();
+ TQString getDTDIdentifier();
/** Sets the DTD identifier */
- void setDTDIdentifier(const QString &id);
+ void setDTDIdentifier(const TQString &id);
/** Get a pointer to the current active DTD. If fallback is true, this always gives back a valid and known DTD pointer: the active, the document specified and in last case the application default document type. */
const DTDStruct* currentDTD(bool fallback = true);
/** Get a pointer to the default DTD (document, or app). */
const DTDStruct* defaultDTD() const;
/** Find the DTD name for a part of the document. */
- QString findDTDName(Tag **tag);
+ TQString findDTDName(Tag **tag);
/** Retrives the text from the specified rectangle. The KTextEditor::EditInterface::text seems to not
work correctly. */
- QString text(int bLine, int bCol, int eLine, int eCol) const;
+ TQString text(int bLine, int bCol, int eLine, int eCol) const;
/** Same as the above, but using AreaStruct as an argument */
- QString text(const AreaStruct &area) const;
+ TQString text(const AreaStruct &area) const;
/** Code completion was requested by the user. */
void codeCompletionRequested();
/** Bring up the code completion tooltip. */
@@ -150,11 +150,11 @@ work correctly. */
/** Save the document under a new name and calculate the new md5sum. */
bool saveAs(const KURL& url);
/** Enable or disable the visibility of groups for a DTEP.*/
- void enableGroupsForDTEP(const QString& dtepName, bool enable = true);
+ void enableGroupsForDTEP(const TQString& dtepName, bool enable = true);
/** Clears the selected DTEP list */
void resetGroupsForDTEPList();
/** Find the word until the first word boundary backwards */
- QString findWordRev(const QString& textToSearch, const DTDStruct *dtd = 0L);
+ TQString findWordRev(const TQString& textToSearch, const DTDStruct *dtd = 0L);
/** Returns the changed status since the last query. Resets changed.*/
bool hasChanged();
/** Sets the changed status.*/
@@ -167,7 +167,7 @@ work correctly. */
bool parserActivated() {return reparseEnabled;}
/** returns all the areas that are between tag and it's closing pair */
- QStringList tagAreas(const QString &tag, bool includeCoordinates, bool skipFoundContent);
+ TQStringList tagAreas(const TQString &tag, bool includeCoordinates, bool skipFoundContent);
/** disable/enable the repaint of the Kate view */
void activateRepaintView(bool activation);
@@ -178,25 +178,25 @@ work correctly. */
void convertCase();
/** returns the word under the cursor */
- QString currentWord();
+ TQString currentWord();
/** Opens the url. The url must be valid and the file pointed to it must exists. */
- void open(const KURL &url, const QString &encoding);
+ void open(const KURL &url, const TQString &encoding);
/**
* Opens a file in the editor part.
* @param url
*/
bool openURL(const KURL& url);
/** Reads the DTD info from the file, tries to find the correct DTD and builds the tag/attribute list from the DTD file. */
- void processDTD(const QString& documentType = QString::null);
+ void processDTD(const TQString& documentType = TQString::null);
/** Resets the list of DTEPs found in the document */
void resetDTEPs();
/** Adds a DTEP to the list of DTEPs present in the document */
- void addDTEP(const QString &dtepName);
+ void addDTEP(const TQString &dtepName);
/** Returns the list of DTEPs that should appear in the structure tree. By default
this is the list of DTEPs present in the document, but the user can turn on/
off them with the help of RMB->Show Groups For in the structure tree */
- QStringList groupsForDTEPs();
+ TQStringList groupsForDTEPs();
bool busy;
@@ -219,17 +219,17 @@ work correctly. */
/** Creates an automatic backup copy for the crash recovering mechanism */
void createBackup(KConfig* config);
/** No descriptions */
- QString backupPathEntryValue();
+ TQString backupPathEntryValue();
/** No descriptions */
- void setBackupPathEntryValue(const QString& ev);
+ void setBackupPathEntryValue(const TQString& ev);
/** Removes automatic backup copies */
void removeBackup(KConfig *config);
/** create a string using document path string */
- static QString hashFilePath(const QString& p);
- QString annotationText(uint line);
- void setAnnotationText(uint line, const QString& text);
- QMap<uint, QPair<QString, QString> > annotations() {return m_annotations;}
- void addAnnotation(uint line, const QPair<QString, QString>& annotation);
+ static TQString hashFilePath(const TQString& p);
+ TQString annotationText(uint line);
+ void setAnnotationText(uint line, const TQString& text);
+ TQMap<uint, QPair<TQString, TQString> > annotations() {return m_annotations;}
+ void addAnnotation(uint line, const QPair<TQString, TQString>& annotation);
void clearAnnotations();
public slots:
@@ -237,9 +237,9 @@ public slots:
/** Called after a completion is inserted */
void slotCompletionDone( KTextEditor::CompletionEntry completion );
/** Called when a user selects a completion, we then can modify it */
- void slotFilterCompletion(KTextEditor::CompletionEntry*,QString *);
+ void slotFilterCompletion(KTextEditor::CompletionEntry*,TQString *);
/** Called whenever a user inputs text */
- void slotCharactersInserted(int ,int ,const QString&);
+ void slotCharactersInserted(int ,int ,const TQString&);
/** Called when the code completion is aborted.*/
void slotCompletionAborted();
/** Called whenever the text in the document is changed. */
@@ -259,44 +259,44 @@ signals:
void breakpointMarked(Document*, int);
void breakpointUnmarked(Document*, int);
- void showAnnotation(uint, const QString&, const QPair<QString, QString>&);
+ void showAnnotation(uint, const TQString&, const QPair<TQString, TQString>&);
private slots:
void slotReplaceChar();
void slotOpeningCompleted();
- void slotOpeningFailed(const QString &errorMessage);
+ void slotOpeningFailed(const TQString &errorMessage);
/** Called when a file on the disk has changed. */
- void slotFileDirty(const QString& fileName);
+ void slotFileDirty(const TQString& fileName);
void slotMarkChanged(KTextEditor::Mark mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction action);
private:
/**
* Finds the beginning of a tag in the document, starting from a position.
* @param position start to look from this position backwards
- * @return the position of the starting character or an empty QPoint if not found
+ * @return the position of the starting character or an empty TQPoint if not found
*/
- QPoint findTagBeginning(const QPoint& position);
- QPoint findTagEnd(const QPoint& position);
+ TQPoint findTagBeginning(const TQPoint& position);
+ TQPoint findTagEnd(const TQPoint& position);
- QMap<uint, QPair<QString, QString> > m_annotations;
- QString untitledUrl;
+ TQMap<uint, QPair<TQString, TQString> > m_annotations;
+ TQString untitledUrl;
int m_replaceLine;
int m_replaceCol;
- QString m_replaceStr;
+ TQString m_replaceStr;
KTextEditor::Document *m_doc;
KTextEditor::View *m_view;
KTempFile *tempFile;
- QString m_tempFileName;
- QDateTime m_modifTime;
+ TQString m_tempFileName;
+ TQDateTime m_modifTime;
/* path of the backup copy file of the document */
- QString m_backupPathValue;
- QString dtdName;
- QString m_encoding;
- QTextCodec *m_codec;
+ TQString m_backupPathValue;
+ TQString dtdName;
+ TQString m_encoding;
+ TQTextCodec *m_codec;
/*The DTD valid in the place where the completion was invoked.*/
const DTDStruct *completionDTD;
@@ -310,42 +310,42 @@ private:
bool delayedTextChangedEnabled;
/** True if the document is dirty (has been modified outside). */
bool m_dirty;
- QString m_md5sum;
+ TQString m_md5sum;
Project *m_project;
/** Parse the document according to this DTD. */
- QStringList m_groupsForDTEPs; ///< The list of the DTEPs for which the groups should appear in the structure tree
- QStringList m_DTEPList; ///< The list of all DTEPs found in the document
+ TQStringList m_groupsForDTEPs; ///< The list of the DTEPs for which the groups should appear in the structure tree
+ TQStringList m_DTEPList; ///< The list of all DTEPs found in the document
//stores the data after an autocompletion. Used when bringing up the
//autocompletion box delayed with the singleshot timer (workaround for
//a bug: the box is not showing up if it is called from slotCompletionDone)
int m_lastLine, m_lastCol;
- QValueList<KTextEditor::CompletionEntry>* m_lastCompletionList;
+ TQValueList<KTextEditor::CompletionEntry>* m_lastCompletionList;
/** Get list of possibile variable name completions */
- QValueList<KTextEditor::CompletionEntry>* getGroupCompletions(Node *node, const StructTreeGroup& groupName, int line, int col);
+ TQValueList<KTextEditor::CompletionEntry>* getGroupCompletions(Node *node, const StructTreeGroup& groupName, int line, int col);
/** Get list of possibile tag name completions */
- QValueList<KTextEditor::CompletionEntry>* getTagCompletions(int line, int col);
+ TQValueList<KTextEditor::CompletionEntry>* getTagCompletions(int line, int col);
/** Get list of possibile tag attribute completions */
- QValueList<KTextEditor::CompletionEntry>* getAttributeCompletions(const QString& tagName,const QString& startsWith=QString::null);
+ TQValueList<KTextEditor::CompletionEntry>* getAttributeCompletions(const TQString& tagName,const TQString& startsWith=TQString::null);
/** Get list of possibile tag attribute value completions */
- QValueList<KTextEditor::CompletionEntry>* getAttributeValueCompletions(const QString& tagName, const QString& attribute, const QString& startsWith=QString::null);
+ TQValueList<KTextEditor::CompletionEntry>* getAttributeValueCompletions(const TQString& tagName, const TQString& attribute, const TQString& startsWith=TQString::null);
/** Get list of possibile completions in normal text input (nt creating a tag) */
- QValueList<KTextEditor::CompletionEntry>* getCharacterCompletions(const QString& starstWith=QString::null);
+ TQValueList<KTextEditor::CompletionEntry>* getCharacterCompletions(const TQString& starstWith=TQString::null);
/** Invoke code completion dialog for XML like tags according to the position (line, col), using DTD dtd. */
bool xmlCodeCompletion(int line, int col);
/** Returns list of values for attribute. If deleteResult is true after the call,
the caller must delete the returned list. */
- QStringList* tagAttributeValues(const QString& dtdName, const QString& tag, const QString& attribute, bool &deleteResult);
+ TQStringList* tagAttributeValues(const TQString& dtdName, const TQString& tag, const TQString& attribute, bool &deleteResult);
/** Brings up list of code completions */
- void showCodeCompletions( QValueList<KTextEditor::CompletionEntry> *completions );
+ void showCodeCompletions( TQValueList<KTextEditor::CompletionEntry> *completions );
/** Called whenever a user inputs text in an XML type document. */
- bool xmlAutoCompletion(int , int , const QString & );
+ bool xmlAutoCompletion(int , int , const TQString & );
/** Called whenever a user inputs text in a script type document. */
- bool scriptAutoCompletion(int line, int col, const QString &insertedString);
+ bool scriptAutoCompletion(int line, int col, const TQString &insertedString);
/** Returns true if the number of " (excluding \") inside text is even. */
- bool evenQuotes(const QString &text);
+ bool evenQuotes(const TQString &text);
void handleCodeCompletion();
- bool isDerivatedFrom(const QString& className, const QString &baseClass);
+ bool isDerivatedFrom(const TQString& className, const TQString &baseClass);
};
#endif