summaryrefslogtreecommitdiffstats
path: root/starter/baghiralinkdrag.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-25 20:03:28 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-25 20:03:28 +0100
commit2ee99ab520931c5efe91123c85ba10064a45e95d (patch)
treea367666e410de28d0f258aed77b11e17cafb28e4 /starter/baghiralinkdrag.cpp
parentcfa36e1a95e82492c17225ff376911abb3688f62 (diff)
downloadtde-style-baghira-2ee99ab520931c5efe91123c85ba10064a45e95d.tar.gz
tde-style-baghira-2ee99ab520931c5efe91123c85ba10064a45e95d.zip
Initial TQt conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'starter/baghiralinkdrag.cpp')
-rw-r--r--starter/baghiralinkdrag.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/starter/baghiralinkdrag.cpp b/starter/baghiralinkdrag.cpp
index 9c54011..a6ee43a 100644
--- a/starter/baghiralinkdrag.cpp
+++ b/starter/baghiralinkdrag.cpp
@@ -1,4 +1,4 @@
-#include <qbuffer.h>
+#include <tqbuffer.h>
#include "baghiralinkdrag.h"
static bool _accepted;
@@ -6,36 +6,36 @@ static bool _accepted;
#define _TLO_ 0
#define _TO_ 4*sizeof(int)
#define _CLO_ 1*sizeof(int)
-#define _CO_ 4*sizeof(int) + title.length()*sizeof(QChar)
-#define _CO2_ 4*sizeof(int) + title->length()*sizeof(QChar)
+#define _CO_ 4*sizeof(int) + title.length()*sizeof(TQChar)
+#define _CO2_ 4*sizeof(int) + title->length()*sizeof(TQChar)
#define _ILO_ 2*sizeof(int)
-#define _IO_ 4*sizeof(int) + (title.length()+command.length())*sizeof(QChar)
-#define _IO2_ 4*sizeof(int) + (title->length()+command->length())*sizeof(QChar)
+#define _IO_ 4*sizeof(int) + (title.length()+command.length())*sizeof(TQChar)
+#define _IO2_ 4*sizeof(int) + (title->length()+command->length())*sizeof(TQChar)
#define _IxO_ 3*sizeof(int)
-BaghiraLinkDrag::BaghiraLinkDrag(QString title, QString command, QString icon, int index, QWidget* dragSource) : QDragObject(dragSource, 0)
+BaghiraLinkDrag::BaghiraLinkDrag(TQString title, TQString command, TQString icon, int index, TQWidget* dragSource) : TQDragObject(dragSource, 0)
{
_accepted = false;
- a.resize((title.length()+command.length()+icon.length())*sizeof(QChar)+4*sizeof(int));
+ a.resize((title.length()+command.length()+icon.length())*sizeof(TQChar)+4*sizeof(int));
- QChar* tmpChar;
+ TQChar* tmpChar;
int tmpLength;
- tmpChar = const_cast<QChar*>(title.unicode());
+ tmpChar = const_cast<TQChar*>(title.unicode());
tmpLength = title.length();
memcpy(a.data(), &tmpLength, sizeof(int));
- memcpy(a.data() + _TO_ , tmpChar, tmpLength*sizeof(QChar));
+ memcpy(a.data() + _TO_ , tmpChar, tmpLength*sizeof(TQChar));
- tmpChar = const_cast<QChar*>(command.unicode());
+ tmpChar = const_cast<TQChar*>(command.unicode());
tmpLength = command.length();
memcpy(a.data() + _CLO_ , &tmpLength, sizeof(int));
- memcpy(a.data() + _CO_, tmpChar, tmpLength*sizeof(QChar));
+ memcpy(a.data() + _CO_, tmpChar, tmpLength*sizeof(TQChar));
- tmpChar = const_cast<QChar*>(icon.unicode());
+ tmpChar = const_cast<TQChar*>(icon.unicode());
tmpLength = icon.length();
memcpy(a.data() + _ILO_, &tmpLength, sizeof(int));
- memcpy(a.data() + _IO_, tmpChar, tmpLength*sizeof(QChar));
+ memcpy(a.data() + _IO_, tmpChar, tmpLength*sizeof(TQChar));
memcpy(a.data() + _IxO_, &index, sizeof(int));
}
@@ -44,33 +44,33 @@ BaghiraLinkDrag::~BaghiraLinkDrag()
{
}
-bool BaghiraLinkDrag::decode( const QMimeSource * e, QString * title, QString * command, QString * icon, int * index)
+bool BaghiraLinkDrag::decode( const TQMimeSource * e, TQString * title, TQString * command, TQString * icon, int * index)
{
- QByteArray a = e->encodedData("application/baghiralink");
+ TQByteArray a = e->encodedData("application/baghiralink");
if (a.size() < 4*sizeof(int)) // some empty stuff
{
return false;
}
- QChar* tmpChar;
+ TQChar* tmpChar;
int tmpLength;
memcpy(&tmpLength, a.data(), sizeof(int));
- tmpChar = new QChar[tmpLength];
- memcpy(tmpChar, a.data() + _TO_, tmpLength*sizeof(QChar));
+ tmpChar = new TQChar[tmpLength];
+ memcpy(tmpChar, a.data() + _TO_, tmpLength*sizeof(TQChar));
title->setUnicode(tmpChar, tmpLength);
delete tmpChar;
memcpy(&tmpLength, a.data() + _CLO_, sizeof(int));
- tmpChar = new QChar[tmpLength];
- memcpy(tmpChar, a.data() + _CO2_, tmpLength*sizeof(QChar));
+ tmpChar = new TQChar[tmpLength];
+ memcpy(tmpChar, a.data() + _CO2_, tmpLength*sizeof(TQChar));
command->setUnicode(tmpChar, tmpLength);
delete tmpChar;
memcpy(&tmpLength, a.data() + _ILO_, sizeof(int));
- tmpChar = new QChar[tmpLength];
- memcpy(tmpChar, a.data() + _IO2_, tmpLength*sizeof(QChar));
+ tmpChar = new TQChar[tmpLength];
+ memcpy(tmpChar, a.data() + _IO2_, tmpLength*sizeof(TQChar));
icon->setUnicode(tmpChar, tmpLength);
delete tmpChar; tmpChar = 0L;
@@ -84,7 +84,7 @@ bool BaghiraLinkDrag::accepted()
return _accepted;
}
-bool BaghiraLinkDrag::canDecode( const QMimeSource * e )
+bool BaghiraLinkDrag::canDecode( const TQMimeSource * e )
{
return e->provides("application/baghiralink");
#if 0
@@ -92,7 +92,7 @@ bool BaghiraLinkDrag::canDecode( const QMimeSource * e )
{
return false;
}
- QByteArray a = e->encodedData("application/baghiralink");
+ TQByteArray a = e->encodedData("application/baghiralink");
if (a.size() != BAGHIRALINK_BUFSIZE)
{
return false;
@@ -115,11 +115,11 @@ const char * BaghiraLinkDrag::format ( int i ) const
return 0;
}
-QByteArray BaghiraLinkDrag::encodedData ( const char * mimeType) const
+TQByteArray BaghiraLinkDrag::encodedData ( const char * mimeType) const
{
- if (QString("application/baghiralink") == mimeType)
+ if (TQString("application/baghiralink") == mimeType)
{
return a;
}
- return QByteArray();
+ return TQByteArray();
}