summaryrefslogtreecommitdiffstats
path: root/src/tools.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-17 08:20:48 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-17 08:20:48 +0000
commitaa0726b20f398264f0a2abc60215be044b106f9c (patch)
tree070fdbc19a1106cfdd7f651a8ce76bb1b89a513d /src/tools.h
parentd3cf5b3e75aadc3b02d0b56f030d4c3f8c2c749d (diff)
downloadbasket-aa0726b20f398264f0a2abc60215be044b106f9c.tar.gz
basket-aa0726b20f398264f0a2abc60215be044b106f9c.zip
TQt4 port basket
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/basket@1232416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/tools.h')
-rw-r--r--src/tools.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/tools.h b/src/tools.h
index 338abfd..a925638 100644
--- a/src/tools.h
+++ b/src/tools.h
@@ -21,9 +21,9 @@
#ifndef TOOLS_H
#define TOOLS_H
-class QString;
-class QColor;
-class QMimeSource;
+class TQString;
+class TQColor;
+class TQMimeSource;
class StopWatch
{
@@ -31,9 +31,9 @@ class StopWatch
static void start(uint id);
static void check(uint id);
private:
- static QMemArray<QTime> starts;
- static QMemArray<double> totals;
- static QMemArray<uint> counts;
+ static TQMemArray<TQTime> starts;
+ static TQMemArray<double> totals;
+ static TQMemArray<uint> counts;
};
/** Some useful functions for that application.
@@ -42,54 +42,54 @@ class StopWatch
namespace Tools
{
// Text <-> HTML Conversions and Tools:
- QString textToHTML(const QString &text);
- QString textToHTMLWithoutP(const QString &text);
- QString htmlToParagraph(const QString &html);
- QString htmlToText(const QString &html);
- QString tagURLs(const QString &test);
- QString cssFontDefinition(const QFont &font, bool onlyFontFamily = false);
+ TQString textToHTML(const TQString &text);
+ TQString textToHTMLWithoutP(const TQString &text);
+ TQString htmlToParagraph(const TQString &html);
+ TQString htmlToText(const TQString &html);
+ TQString tagURLs(const TQString &test);
+ TQString cssFontDefinition(const TQFont &font, bool onlyFontFamily = false);
// String Manipulations:
- QString stripEndWhiteSpaces(const QString &string);
+ TQString stripEndWhiteSpaces(const TQString &string);
// Pixmap Manipulations:
/** @Return true if it is a Web color
*/
- bool isWebColor(const QColor &color);
+ bool isWebColor(const TQColor &color);
/** @Return a color that is 50% of @p color1 and 50% of @p color2.
*/
- QColor mixColor(const QColor &color1, const QColor &color2);
+ TQColor mixColor(const TQColor &color1, const TQColor &color2);
/** @Return true if the color is too dark to be darkened one more time.
*/
- bool tooDark(const QColor &color);
+ bool tooDark(const TQColor &color);
/** Make sure the @p pixmap is of the size (@p width, @p height) and @return a pixmap of this size.
* If @p height <= 0, then width will be used to make the picture square.
*/
- QPixmap normalizePixmap(const QPixmap &pixmap, int width, int height = 0);
+ TQPixmap normalizePixmap(const TQPixmap &pixmap, int width, int height = 0);
/** @Return the pixmap @p source with depth*deltaX transparent pixels added to the left.\n
* If @p deltaX is <= 0, then an indent delta is computed depending on the @p source width.
*/
- QPixmap indentPixmap(const QPixmap &source, int depth, int deltaX = 0);
+ TQPixmap indentPixmap(const TQPixmap &source, int depth, int deltaX = 0);
// File and Folder Manipulations:
/** Delete the folder @p folderOrFile recursively (to remove sub-folders and child files too).
*/
- void deleteRecursively(const QString &folderOrFile);
+ void deleteRecursively(const TQString &folderOrFile);
/** @Return a new filename that doesn't already exist in @p destFolder.
* If @p wantedName alread exist in @p destFolder, a dash and a number will be added before the extenssion.
* Id there were already such a number in @p wantedName, it is incremented until a free filename is found.
*/
- QString fileNameForNewFile(const QString &wantedName, const QString &destFolder);
+ TQString fileNameForNewFile(const TQString &wantedName, const TQString &destFolder);
// Other:
//void iconForURL(const KURL &url);
/** @Return true if the source is from a file cutting in Konqueror.
* @Return false if it was just a copy or if it was a drag.
*/
- bool isAFileCut(QMimeSource *source);
+ bool isAFileCut(TQMimeSource *source);
// Debug
- void printChildren(QObject* parent);
+ void printChildren(TQObject* tqparent);
}
#endif // TOOLS_H