summaryrefslogtreecommitdiffstats
path: root/src/dragsupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dragsupport.cpp')
-rw-r--r--src/dragsupport.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/dragsupport.cpp b/src/dragsupport.cpp
index e20207f..f597022 100644
--- a/src/dragsupport.cpp
+++ b/src/dragsupport.cpp
@@ -17,42 +17,42 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qbrush.h>
-#include <qfontmetrics.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqbrush.h>
+#include <tqfontmetrics.h>
#include "dragsupport.h"
namespace DragSupport
{
-QPixmap makePixmap(const QString &text, const QFont &font)
+TQPixmap makePixmap(const TQString &text, const TQFont &font)
{
- QColor background(234, 178, 230);
- QFontMetrics fm(font);
+ TQColor background(234, 178, 230);
+ TQFontMetrics fm(font);
int height = 2 * fm.height();
- QSize bonusSize (height, 0);
- QSize size(fm.width(text), height);
- QImage image(size + bonusSize, 32);
+ TQSize bonusSize (height, 0);
+ TQSize size(fm.width(text), height);
+ TQImage image(size + bonusSize, 32);
image.setAlphaBuffer(false);
image.fill(0); // All transparent pixels
image.setAlphaBuffer(true);
- QPixmap pix(size + bonusSize);
- pix.fill(Qt::magenta); // Watch for incoming hacks
+ TQPixmap pix(size + bonusSize);
+ pix.fill(TQt::magenta); // Watch for incoming hacks
- QPainter painter(&pix);
+ TQPainter painter(&pix);
painter.setFont(font);
// Outline black, background white
- painter.setPen(Qt::black);
+ painter.setPen(TQt::black);
painter.setBrush(background);
// roundRect is annoying in that the four "pies" in each corner aren't
@@ -64,19 +64,19 @@ QPixmap makePixmap(const QString &text, const QFont &font)
int textLeft = height / 2;
// Draw text
- painter.setPen(Qt::black);
+ painter.setPen(TQt::black);
painter.drawText(textLeft, height / 4, size.width(), size.height(), 0, text);
- QImage overlay(pix.convertToImage());
+ TQImage overlay(pix.convertToImage());
// The images should have the same size, copy pixels from overlay to the
// bottom unless the pixel is called magenta. The pixels we don't copy
- // are transparent in the QImage, and will remain transparent when
- // converted to a QPixmap.
+ // are transparent in the TQImage, and will remain transparent when
+ // converted to a TQPixmap.
for(int i = 0; i < image.width(); ++i)
for(int j = 0; j < image.height(); ++j) {
- if(QColor(overlay.pixel(i, j)) != Qt::magenta)
+ if(TQColor(overlay.pixel(i, j)) != TQt::magenta)
image.setPixel(i, j, overlay.pixel(i, j));
}