summaryrefslogtreecommitdiffstats
path: root/kbabel/addons
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kbabel/addons
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbabel/addons')
-rw-r--r--kbabel/addons/kfile-plugins/kfile_po.cpp20
-rw-r--r--kbabel/addons/kfile-plugins/kfile_po.h2
-rw-r--r--kbabel/addons/preview/pothumbcreator.cpp42
-rw-r--r--kbabel/addons/preview/pothumbcreator.h2
4 files changed, 33 insertions, 33 deletions
diff --git a/kbabel/addons/kfile-plugins/kfile_po.cpp b/kbabel/addons/kfile-plugins/kfile_po.cpp
index 190d81fc..457e4bd9 100644
--- a/kbabel/addons/kfile-plugins/kfile_po.cpp
+++ b/kbabel/addons/kfile-plugins/kfile_po.cpp
@@ -30,7 +30,7 @@
#include "kfile_po.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "poinfo.h"
#include <kgenericfactory.h>
@@ -40,8 +40,8 @@ using namespace KBabel;
typedef KGenericFactory<KPoPlugin> POFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_po, POFactory("kfile_po"))
-KPoPlugin::KPoPlugin(QObject *parent, const char *name,
- const QStringList& args)
+KPoPlugin::KPoPlugin(TQObject *parent, const char *name,
+ const TQStringList& args)
: KFilePlugin(parent, name, args)
{
KFileMimeTypeInfo* info = addMimeTypeInfo("application/x-gettext");
@@ -50,18 +50,18 @@ KPoPlugin::KPoPlugin(QObject *parent, const char *name,
addGroupInfo(info, "CatalogInfo", i18n("Catalog Information"));
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Total", i18n("Total Messages"), QVariant::Int);
- item = addItemInfo(group, "Fuzzy", i18n("Fuzzy Messages"), QVariant::Int);
- item = addItemInfo(group, "Untranslated", i18n("Untranslated Messages"), QVariant::Int);
- item = addItemInfo(group, "LastTranslator", i18n("Last Translator"), QVariant::String);
- item = addItemInfo(group, "LanguageTeam", i18n("Language Team"), QVariant::String);
- item = addItemInfo(group, "Revision", i18n("Revision"), QVariant::String);
+ item = addItemInfo(group, "Total", i18n("Total Messages"), TQVariant::Int);
+ item = addItemInfo(group, "Fuzzy", i18n("Fuzzy Messages"), TQVariant::Int);
+ item = addItemInfo(group, "Untranslated", i18n("Untranslated Messages"), TQVariant::Int);
+ item = addItemInfo(group, "LastTranslator", i18n("Last Translator"), TQVariant::String);
+ item = addItemInfo(group, "LanguageTeam", i18n("Language Team"), TQVariant::String);
+ item = addItemInfo(group, "Revision", i18n("Revision"), TQVariant::String);
}
bool KPoPlugin::readInfo(KFileMetaInfo& metaInfo, uint)
{
PoInfo poInfo;
- QStringList wordList;
+ TQStringList wordList;
ConversionStatus status = PoInfo::info(metaInfo.path(), poInfo, wordList, false, false, false);
if (status == OK) {
KFileMetaInfoGroup group = appendGroup(metaInfo, "CatalogInfo");
diff --git a/kbabel/addons/kfile-plugins/kfile_po.h b/kbabel/addons/kfile-plugins/kfile_po.h
index 8e69a0ce..9b707a8f 100644
--- a/kbabel/addons/kfile-plugins/kfile_po.h
+++ b/kbabel/addons/kfile-plugins/kfile_po.h
@@ -42,7 +42,7 @@ class KPoPlugin : public KFilePlugin
Q_OBJECT
public:
- KPoPlugin(QObject *parent, const char *name, const QStringList& args);
+ KPoPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint);
};
diff --git a/kbabel/addons/preview/pothumbcreator.cpp b/kbabel/addons/preview/pothumbcreator.cpp
index f067948a..0883025c 100644
--- a/kbabel/addons/preview/pothumbcreator.cpp
+++ b/kbabel/addons/preview/pothumbcreator.cpp
@@ -33,9 +33,9 @@
*/
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -67,35 +67,35 @@ PoThumbCreator::~PoThumbCreator()
delete m_splitter;
}
-bool PoThumbCreator::create(const QString &path, int width, int height, QImage &img)
+bool PoThumbCreator::create(const TQString &path, int width, int height, TQImage &img)
{
if ( !m_splitter )
{
m_splitter = new KPixmapSplitter;
- QString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" );
+ TQString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" );
if ( !pixmap.isEmpty() )
{
- m_splitter->setPixmap( QPixmap( pixmap ));
- m_splitter->setItemSize( QSize( 4, 7 ));
+ m_splitter->setPixmap( TQPixmap( pixmap ));
+ m_splitter->setItemSize( TQSize( 4, 7 ));
}
}
bool ok = false;
PoInfo poInfo;
- QStringList wordList;
+ TQStringList wordList;
// We do not call msgfmt, as a thumbnail must be created fast.
if( PoInfo::info( path, poInfo, wordList, false, true, false ) == OK )
{
ok = true;
- QPixmap pix;
+ TQPixmap pix;
if (height * 3 > width * 4)
pix.resize(width, width * 4 / 3);
else
pix.resize(height * 3 / 4, height);
- pix.fill( QColor( 245, 245, 245 ) ); // light-grey background
+ pix.fill( TQColor( 245, 245, 245 ) ); // light-grey background
@@ -114,7 +114,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
xBorder = (pix.width()-d)/2;
yBorder = (pix.height()*2/3-d)/2;
- QPainter p(&pix);
+ TQPainter p(&pix);
if(fuzzyAngle>0)
{
@@ -163,9 +163,9 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
- QRect rect;
+ TQRect rect;
- QSize chSize = m_splitter->itemSize(); // the size of one char
+ TQSize chSize = m_splitter->itemSize(); // the size of one char
int xOffset = chSize.width();
int yOffset = chSize.height();
@@ -186,7 +186,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
// end centering
- QString text;
+ TQString text;
if(numCharsPerLine < 30)
{
@@ -250,9 +250,9 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
text = locale->formatNumber(p,0)+'%';
*/
// find the maximum string length to center the text
- QStringList lineList=QStringList::split('\n',text);
+ TQStringList lineList=TQStringList::split('\n',text);
uint max=0;
- for( QStringList::Iterator it = lineList.begin(); it != lineList.end()
+ for( TQStringList::Iterator it = lineList.begin(); it != lineList.end()
; ++it )
{
if((*it).length() > max)
@@ -269,7 +269,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
int posLastLine = pix.height() - (chSize.height() + yBorder);
bool newLine = false;
Q_ASSERT( posNewLine > 0 );
- const QPixmap *fontPixmap = &(m_splitter->pixmap());
+ const TQPixmap *fontPixmap = &(m_splitter->pixmap());
for ( uint i = 0; i < text.length(); i++ )
@@ -295,7 +295,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
}
// check for newlines in the text (unix,dos)
- QChar ch = text.at( i );
+ TQChar ch = text.at( i );
if ( ch == '\n' )
{
newLine = true;
@@ -311,7 +311,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
rect = m_splitter->coordinates( ch );
if ( !rect.isEmpty() )
{
- bitBlt( &pix, QPoint(x,y), fontPixmap, rect, Qt::CopyROP );
+ bitBlt( &pix, TQPoint(x,y), fontPixmap, rect, Qt::CopyROP );
}
x += xOffset; // next character
@@ -321,7 +321,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
// in this seldom cases they are usually hidden ;-)
if(pix.width() > 40 && KApplication::random()%2000 == 0)
{
- QPixmap kbabelPix;
+ TQPixmap kbabelPix;
if(pix.width() < 80)
{
kbabelPix = KGlobal::iconLoader()->loadIcon("kbabel"
@@ -342,7 +342,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
x = QMAX(x,0);
if(!kbabelPix.isNull())
{
- bitBlt(&pix, QPoint(x,4), &kbabelPix, kbabelPix.rect()
+ bitBlt(&pix, TQPoint(x,4), &kbabelPix, kbabelPix.rect()
, Qt::CopyROP);
}
}
diff --git a/kbabel/addons/preview/pothumbcreator.h b/kbabel/addons/preview/pothumbcreator.h
index 401e9431..25a1f7ab 100644
--- a/kbabel/addons/preview/pothumbcreator.h
+++ b/kbabel/addons/preview/pothumbcreator.h
@@ -44,7 +44,7 @@ class PoThumbCreator : public ThumbCreator
public:
PoThumbCreator();
virtual ~PoThumbCreator();
- virtual bool create(const QString &path, int width, int height, QImage &img);
+ virtual bool create(const TQString &path, int width, int height, TQImage &img);
virtual Flags flags() const;
private: