diff options
Diffstat (limited to 'noatun/modules/winskin/waRegion.cpp')
-rw-r--r-- | noatun/modules/winskin/waRegion.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/noatun/modules/winskin/waRegion.cpp b/noatun/modules/winskin/waRegion.cpp index ab4d2e57..06f6851e 100644 --- a/noatun/modules/winskin/waRegion.cpp +++ b/noatun/modules/winskin/waRegion.cpp @@ -11,9 +11,9 @@ */ #include <ksimpleconfig.h> -#include <qbitmap.h> -#include <qpainter.h> -#include <qregexp.h> +#include <tqbitmap.h> +#include <tqpainter.h> +#include <tqregexp.h> #include "waSkinModel.h" #include "waSkins.h" @@ -26,7 +26,7 @@ WaRegion *windowRegion = NULL; const char *pointListNames[] = {"PointList", "pointlist", "Pointlist", "pointList", "POINTLIST", 0}; const char *numPointsNames[] = {"NumPoints", "numpoints", "Numpoints", "numPoints", "NUMPOINTS", 0}; -WaRegion::WaRegion(QString filename) { +WaRegion::WaRegion(TQString filename) { // Load the region file, which happens to be in KConfig format KSimpleConfig regionFile(filename, true); @@ -35,19 +35,19 @@ WaRegion::WaRegion(QString filename) { shade_mask = 0; // Make the new bitmaps, default window size - window_mask = new QBitmap(WaSkinModel::instance()->getMapGeometry(_WA_MAPPING_MAIN).size(), true); - shade_mask = new QBitmap(WaSkinModel::instance()->getMapGeometry(_WA_MAPPING_TITLE).size(), true); + window_mask = new TQBitmap(WaSkinModel::instance()->getMapGeometry(_WA_MAPPING_MAIN).size(), true); + shade_mask = new TQBitmap(WaSkinModel::instance()->getMapGeometry(_WA_MAPPING_TITLE).size(), true); // Load the normal window mask data regionFile.setGroup("Normal"); - QValueList<int> num_points; + TQValueList<int> num_points; for (int x = 0;numPointsNames[x];x++) { if (regionFile.hasKey(numPointsNames[x])) num_points = parseList(regionFile.readEntry(numPointsNames[x])); } - QValueList<int> point_list; + TQValueList<int> point_list; for (int x = 0;pointListNames[x];x++) { if (regionFile.hasKey(pointListNames[x])) point_list = parseList(regionFile.readEntry(pointListNames[x])); @@ -71,27 +71,27 @@ WaRegion::~WaRegion() { delete shade_mask; } -void WaRegion::buildPixmap(const QValueList<int> &num_points_list, const QValueList<int> &points_list, QBitmap *dest) { +void WaRegion::buildPixmap(const TQValueList<int> &num_points_list, const TQValueList<int> &points_list, TQBitmap *dest) { if (!num_points_list.count()) { dest->fill(Qt::color1); return; } - QValueList<int>::const_iterator points = points_list.begin(); + TQValueList<int>::const_iterator points = points_list.begin(); - QPainter p(dest); + TQPainter p(dest); // Coordinates in REGION.TXT can go one pixel beyond the window size - QBitmap bm(dest->width()+1,dest->height()+1,true); - QPainter bmp(&bm); + TQBitmap bm(dest->width()+1,dest->height()+1,true); + TQPainter bmp(&bm); bmp.setBrush(Qt::color1); bmp.setPen(Qt::NoPen); // The polygon border itself should not be part of the visible window // Go over each "region" in the file - for (QValueList<int>::const_iterator num_points = num_points_list.begin();num_points != num_points_list.end();num_points++) { + for (TQValueList<int>::const_iterator num_points = num_points_list.begin();num_points != num_points_list.end();num_points++) { // Make a new point array - QPointArray point_array(*num_points); + TQPointArray point_array(*num_points); // Populate it for (int i = 0;i < *num_points;i++) { @@ -112,14 +112,14 @@ void WaRegion::buildPixmap(const QValueList<int> &num_points_list, const QValueL // The winamp list format is absolutely insane, it will accept either // commas or whitespace as the delimiter. This function deals with // that. -QValueList<int> WaRegion::parseList(const QString &list) const { - QValueList<int> temp_list; +TQValueList<int> WaRegion::parseList(const TQString &list) const { + TQValueList<int> temp_list; if (list.isEmpty()) return temp_list; - QStringList open=QStringList::split(QRegExp("[,\\s]+"), list); - for (QStringList::Iterator i=open.begin(); i != open.end(); ++i) + TQStringList open=TQStringList::split(TQRegExp("[,\\s]+"), list); + for (TQStringList::Iterator i=open.begin(); i != open.end(); ++i) temp_list.append((*i).toInt()); return temp_list; |