diff options
Diffstat (limited to 'quanta/utility/quantacommon.h')
-rw-r--r-- | quanta/utility/quantacommon.h | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/quanta/utility/quantacommon.h b/quanta/utility/quantacommon.h index a88276b7..c9e283fa 100644 --- a/quanta/utility/quantacommon.h +++ b/quanta/utility/quantacommon.h @@ -26,7 +26,7 @@ *@author Andras Mantia */ -#define DEFAULT_DTD QString("-//W3C//DTD HTML 4.01 Transitional//EN") +#define DEFAULT_DTD TQString("-//W3C//DTD HTML 4.01 Transitional//EN") class QString; class DCOPReply; @@ -42,8 +42,8 @@ class KPopupMenu; class Abbreviation{ public: /*A list with abbreviations in the for of: <template templatename, code> */ - QMap<QString, QString> abbreviations; - QStringList dteps; + TQMap<TQString, TQString> abbreviations; + TQStringList dteps; }; @@ -53,7 +53,7 @@ public: //Tag style options uint tagCase; uint attrCase; - QChar attrValueQuotation; + TQChar attrValueQuotation; bool closeOptionalTags; bool closeTags; bool updateClosingTags; @@ -61,17 +61,17 @@ public: //editor settings bool useAutoCompletion; bool enableDTDToolbar; - QString defaultEncoding; + TQString defaultEncoding; //parser options bool instantUpdate; bool showEmptyNodes; bool showClosingTags; uint refreshFrequency; - QString defaultDocType; + TQString defaultDocType; uint expandLevel; bool showDTDSelectDialog; - QString showCloseButtons; ///< can be Disabled, ShowAlways or ShowDelayed + TQString showCloseButtons; ///< can be Disabled, ShowAlways or ShowDelayed uint toolviewTabs; ///< how does the toolview tabs look like //kafka sync options @@ -84,30 +84,30 @@ public: bool inlineNodeIndentation; //environment options - QString globalDataDir; //not stored, initialized on app startup - QStringList pluginSearchPaths; //global but read from plugins.rc - QString markupMimeTypes; - QString scriptMimeTypes; - QString imageMimeTypes; - QString textMimeTypes; - QString previewPosition; - QString docPosition; - QString windowLayout; + TQString globalDataDir; //not stored, initialized on app startup + TQStringList pluginSearchPaths; //global but read from plugins.rc + TQString markupMimeTypes; + TQString scriptMimeTypes; + TQString imageMimeTypes; + TQString textMimeTypes; + TQString previewPosition; + TQString docPosition; + TQString windowLayout; uint autosaveInterval; - QString backupDirPath; - QString quantaPID; + TQString backupDirPath; + TQString quantaPID; bool showHiddenFiles; ///< show hidden files in files treeview? bool saveTrees; ///< save tree status for local trees? - QMap<QString, Abbreviation> abbreviations; ///< the abbreviation groups + TQMap<TQString, Abbreviation> abbreviations; ///< the abbreviation groups bool replaceAccented; ///< replace or not the accented characters bool replaceNotInEncoding; ///< replace characters with their entity number if they cannot be saved in the current encoding of the document. bool smartTagInsertion; //enable/disable smartTagInsertion }; typedef struct DirInfo{ - QString mimeType; - QString preText; - QString postText; + TQString mimeType; + TQString preText; + TQString postText; bool usePrePostText; }; @@ -121,30 +121,30 @@ public: ~QuantaCommon(); /** convert tag to upper or lower case */ - static QString tagCase( const QString& tag); + static TQString tagCase( const TQString& tag); /** convert tag to upper or lower case */ - static QString attrCase( const QString& attr); + static TQString attrCase( const TQString& attr); /** returns the attribute value in quoted form, by taking care of the quotation setting*/ - static QString quoteAttributeValue(const QString& value); + static TQString quoteAttributeValue(const TQString& value); /** Set's up the url correctly from urlString. */ - static void setUrl(KURL &url, const QString& urlString); + static void setUrl(KURL &url, const TQString& urlString); /** No descriptions */ - static bool isSingleTag(const QString& dtdName, const QString& tag); + static bool isSingleTag(const TQString& dtdName, const TQString& tag); /** No descriptions */ - static bool isOptionalTag(const QString& dtdName, const QString& tag); + static bool isOptionalTag(const TQString& dtdName, const TQString& tag); /** No descriptions */ - static bool isKnownTag(const QString& dtdName, const QString& tag); + static bool isKnownTag(const TQString& dtdName, const TQString& tag); /** No descriptions */ - static AttributeList* tagAttributes(const QString& dtdName, const QString& tag); + static AttributeList* tagAttributes(const TQString& dtdName, const TQString& tag); /** Returns the QTag object for the tag "tag" from the DTD named "dtdname". */ - static QTag* tagFromDTD(const QString& dtdName, const QString& tag); + static QTag* tagFromDTD(const TQString& dtdName, const TQString& tag); /** Returns the QTag object for the tag "tag" from the DTD. */ - static QTag* tagFromDTD(const DTDStruct* dtd, const QString& tag); + static QTag* tagFromDTD(const DTDStruct* dtd, const TQString& tag); /** Returns the QTag object for the node "node" from node's DTD. */ static QTag* tagFromDTD(Node *node); /** Returns an XML style string containing the GUI for attributes. */ - static QString xmlFromAttributes(AttributeList* attributes); + static TQString xmlFromAttributes(AttributeList* attributes); /** Returns 0 if the (line,col) is inside the area specified by the other arguments, -1 if it is before the area and 1 if it is after. */ static int isBetween(int line, int col, int bLine, int bCol, int eLine, int eCol); @@ -153,47 +153,47 @@ pointer must be deleted by the caller!! */ static KStandardDirs* pluginDirs(const char *type); /** Return true, if the url has the mimetype starting with type. */ - static bool checkMimeGroup(const KURL& url, const QString& type); + static bool checkMimeGroup(const KURL& url, const TQString& type); /** Return true, if the url has the mimetype type. */ - static bool checkMimeType(const KURL& url, const QString& type); + static bool checkMimeType(const KURL& url, const TQString& type); /** Return true, if the url has exactly the mimetype type. */ - static bool checkExactMimeType(const KURL& url, const QString& type); + static bool checkExactMimeType(const KURL& url, const TQString& type); /** Returns the url without the filename. */ static KURL convertToPath(const KURL& url); /** Return a string to be used when an url is saved to the project file. Returns url.url() if it's an absolute url and url.path() if the url is relative */ - static QString qUrl(const KURL& url); + static TQString qUrl(const KURL& url); /** No descriptions */ - static void dirCreationError(QWidget *widget, const KURL& url); + static void dirCreationError(TQWidget *widget, const KURL& url); /** Adds the backslash before the special chars (like ?, *, . ) so the returned string can be used in regular expressions. */ - static QString makeRxCompatible(const QString& s); + static TQString makeRxCompatible(const TQString& s); /** Returns the translated a_str in English. A "back-translation" useful e.g in case of CSS elements selected from a listbox. */ - static QString i18n2normal(const QString& a_str); + static TQString i18n2normal(const TQString& a_str); /** No descriptions */ - static void normalizeStructure(QString f,QStringList& l); + static void normalizeStructure(TQString f,TQStringList& l); /**Returns true if tag2 is the closing pair of tag1. It's namespace aware.*/ static bool closesTag(Tag *tag1, Tag *tag2); - static bool closesTag(QString namespaceName, QString tagName, bool caseSensitive, - QString namespaceName2, QString tagName2, bool caseSensitive2); - static int denyBinaryInsert(QWidget *window); - static void removeCommentsAndQuotes(QString& str, const DTDStruct* dtd); - static bool insideCommentsOrQuotes(int position, const QString &string, const DTDStruct *dtd); + static bool closesTag(TQString namespaceName, TQString tagName, bool caseSensitive, + TQString namespaceName2, TQString tagName2, bool caseSensitive2); + static int denyBinaryInsert(TQWidget *window); + static void removeCommentsAndQuotes(TQString& str, const DTDStruct* dtd); + static bool insideCommentsOrQuotes(int position, const TQString &string, const DTDStruct *dtd); /** Calls a Quanta DCOP method. * @param interface the DCOP interface the method belongs to * @param method the DCOP method name (with the argument types) * @param arguments comma separated list of argument * @return the return value of the DCOP caller */ - static DCOPReply callDCOPMethod(const QString& interface, const QString& method, const QString& arguments); + static DCOPReply callDCOPMethod(const TQString& interface, const TQString& method, const TQString& arguments); /** Checks if url exists and shows a question about overwriting it. * @param url the url to check * @return true if the user answered yes, false otherwise. */ - static bool checkOverwrite(const KURL& url, QWidget *window); + static bool checkOverwrite(const KURL& url, TQWidget *window); /** * Same as KConfigBase::readPathListEntry, but resolves symlinks @@ -201,7 +201,7 @@ pointer must be deleted by the caller!! */ * @param pKey * @return */ - static QStringList readPathListEntry(KConfig *config, const QString &pKey); + static TQStringList readPathListEntry(KConfig *config, const TQString &pKey); /** * Same as KConfigBase::readPathEntry, but resolves symlinks @@ -209,7 +209,7 @@ pointer must be deleted by the caller!! */ * @param pKey * @return */ - static QString readPathEntry(KConfig *config, const QString &pKey); + static TQString readPathEntry(KConfig *config, const TQString &pKey); /** * Returns the HTML encoding string for character with the specified code. @@ -218,7 +218,7 @@ pointer must be deleted by the caller!! */ * @param code the numeric code of the character * @return the encoded string */ - static QString encodedChar(uint code); + static TQString encodedChar(uint code); }; |