summaryrefslogtreecommitdiffstats
path: root/ktnef/gui
diff options
context:
space:
mode:
Diffstat (limited to 'ktnef/gui')
-rw-r--r--ktnef/gui/attachpropertydialog.cpp18
-rw-r--r--ktnef/gui/attachpropertydialog.h2
-rw-r--r--ktnef/gui/attachpropertydialogbase.ui36
-rw-r--r--ktnef/gui/ktnefmain.cpp32
-rw-r--r--ktnef/gui/ktnefmain.h9
-rw-r--r--ktnef/gui/ktnefview.cpp16
-rw-r--r--ktnef/gui/ktnefview.h3
-rw-r--r--ktnef/gui/messagepropertydialog.cpp4
-rw-r--r--ktnef/gui/messagepropertydialog.h3
-rw-r--r--ktnef/gui/metafuncs.h144
-rw-r--r--ktnef/gui/qwmf.cpp268
-rw-r--r--ktnef/gui/qwmf.h22
-rw-r--r--ktnef/gui/wmfstruct.h6
13 files changed, 283 insertions, 280 deletions
diff --git a/ktnef/gui/attachpropertydialog.cpp b/ktnef/gui/attachpropertydialog.cpp
index 06e2685d6..7fd6cacf5 100644
--- a/ktnef/gui/attachpropertydialog.cpp
+++ b/ktnef/gui/attachpropertydialog.cpp
@@ -33,8 +33,8 @@
#include <tqdatastream.h>
#include <tqpicture.h>
-AttachPropertyDialog::AttachPropertyDialog(TQWidget *parent, const char *name)
- : AttachPropertyDialogBase(parent, name, true)
+AttachPropertyDialog::AttachPropertyDialog(TQWidget *tqparent, const char *name)
+ : AttachPropertyDialogBase(tqparent, name, true)
{
}
@@ -44,7 +44,7 @@ AttachPropertyDialog::~AttachPropertyDialog()
void AttachPropertyDialog::setAttachment(KTNEFAttach *attach)
{
- QString s = (attach->fileName().isEmpty() ? attach->name() : attach->fileName());
+ TQString s = (attach->fileName().isEmpty() ? attach->name() : attach->fileName());
filename_->setText("<b>"+s+"</b>");
setCaption(s);
display_->setText(attach->displayName());
@@ -113,19 +113,19 @@ void formatPropertySet( KTNEFPropertySet *pSet, TQListView *lv )
formatProperties( pSet->attributes(), 0, item, "attr" );
}
-void saveProperty( TQListView *lv, KTNEFPropertySet *pSet, TQWidget *parent )
+void saveProperty( TQListView *lv, KTNEFPropertySet *pSet, TQWidget *tqparent )
{
TQListViewItem *item = lv->selectedItem();
if ( !item )
- KMessageBox::error( parent, i18n( "Select an item." ) );
+ KMessageBox::error( tqparent, i18n( "Select an item." ) );
else if ( item->text( 2 ).isEmpty() )
- KMessageBox::error( parent, i18n( "The selected item cannot be saved." ) );
+ KMessageBox::error( tqparent, i18n( "The selected item cannot be saved." ) );
else
{
TQString tag = item->text( 2 );
int key = tag.mid( 5 ).toInt();
TQVariant prop = ( tag.startsWith( "attr_" ) ? pSet->attribute( key ) : pSet->property( key ) );
- TQString filename = KFileDialog::getSaveFileName( tag, TQString::null, parent );
+ TQString filename = KFileDialog::getSaveFileName( tag, TQString(), tqparent );
if ( !filename.isEmpty() )
{
TQFile f( filename );
@@ -146,7 +146,7 @@ void saveProperty( TQListView *lv, KTNEFPropertySet *pSet, TQWidget *parent )
f.close();
}
else
- KMessageBox::error( parent, i18n( "Unable to open file for writing, check file permissions." ) );
+ KMessageBox::error( tqparent, i18n( "Unable to open file for writing, check file permissions." ) );
}
}
}
@@ -170,7 +170,7 @@ TQPixmap loadRenderingPixmap( KTNEFPropertySet *pSet, const TQColor& bgColor )
if ( type == 1 && w > 0 && h > 0 )
{
// Load WMF data
- QWinMetaFile wmfLoader;
+ TQWinMetaFile wmfLoader;
TQBuffer wmfBuffer( wmf.asByteArray() );
wmfBuffer.open( IO_ReadOnly );
wmfLoader.setBbox( TQRect( 0, 0, w, h ) );
diff --git a/ktnef/gui/attachpropertydialog.h b/ktnef/gui/attachpropertydialog.h
index aa5e2bf3a..b390caffe 100644
--- a/ktnef/gui/attachpropertydialog.h
+++ b/ktnef/gui/attachpropertydialog.h
@@ -31,7 +31,7 @@ class TQListViewItem;
class AttachPropertyDialog : public AttachPropertyDialogBase
{
public:
- AttachPropertyDialog(TQWidget *parent = 0, const char *name = 0);
+ AttachPropertyDialog(TQWidget *tqparent = 0, const char *name = 0);
~AttachPropertyDialog();
void setAttachment(KTNEFAttach *attach);
diff --git a/ktnef/gui/attachpropertydialogbase.ui b/ktnef/gui/attachpropertydialogbase.ui
index a06db962b..eaf9a5989 100644
--- a/ktnef/gui/attachpropertydialogbase.ui
+++ b/ktnef/gui/attachpropertydialogbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>AttachPropertyDialogBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>AttachPropertyDialogBase</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel" row="1" column="1" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="1" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>display_</cstring>
</property>
@@ -35,7 +35,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="2" column="1" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="2" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>description_</cstring>
</property>
@@ -48,7 +48,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="3" column="1" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="3" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>mime_</cstring>
</property>
@@ -61,7 +61,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="4" column="1" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="4" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>size_</cstring>
</property>
@@ -74,7 +74,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="5" column="1" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="5" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>index_</cstring>
</property>
@@ -101,7 +101,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>displayLabel_</cstring>
</property>
@@ -117,7 +117,7 @@
<string>Comment:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>descriptionLabel_</cstring>
</property>
@@ -125,7 +125,7 @@
<string>Description:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>mimeLabel_</cstring>
</property>
@@ -133,7 +133,7 @@
<string>Mime type:</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>sizeLabel_</cstring>
</property>
@@ -141,7 +141,7 @@
<string>File size:</string>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>indexLabel_</cstring>
</property>
@@ -149,7 +149,7 @@
<string>Index:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>filename_</cstring>
</property>
@@ -165,7 +165,7 @@
<enum>RichText</enum>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>icon_</cstring>
</property>
@@ -209,7 +209,7 @@
<enum>AllColumns</enum>
</property>
</widget>
- <widget class="QLayoutWidget" row="8" column="0" rowspan="1" colspan="3">
+ <widget class="TQLayoutWidget" row="8" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>tqlayout2</cstring>
</property>
@@ -234,7 +234,7 @@
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>save_</cstring>
</property>
@@ -242,7 +242,7 @@
<string>&amp;Save</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>close_</cstring>
</property>
@@ -271,9 +271,9 @@
<slot>saveClicked()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot access="protected">saveClicked()</slot>
-</slots>
+</Q_SLOTS>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
diff --git a/ktnef/gui/ktnefmain.cpp b/ktnef/gui/ktnefmain.cpp
index ea44edbe1..fd9438e6c 100644
--- a/ktnef/gui/ktnefmain.cpp
+++ b/ktnef/gui/ktnefmain.cpp
@@ -57,8 +57,8 @@
#define NOT_IMPLEMENTED TQMessageBox::information(this, "ktnef", "Not implemented yet", TQMessageBox::Ok|TQMessageBox::Default, 0)
-KTNEFMain::KTNEFMain(TQWidget *parent, const char *name)
- : KMainWindow(parent, name)
+KTNEFMain::KTNEFMain(TQWidget *tqparent, const char *name)
+ : KMainWindow(tqparent, name)
{
setupActions();
setupStatusbar();
@@ -154,7 +154,7 @@ void KTNEFMain::loadFile(const TQString& filename)
else
{
TQPtrList<KTNEFAttach> list = parser_->message()->attachmentList();
- QString msg;
+ TQString msg;
msg = i18n( "%n attachment found", "%n attachments found", list.count() );
statusBar()->changeItem(msg, 0);
view_->setAttachments(&list);
@@ -165,7 +165,7 @@ void KTNEFMain::loadFile(const TQString& filename)
void KTNEFMain::openFile()
{
- QString filename = KFileDialog::getOpenFileName(0,0,this,0);
+ TQString filename = KFileDialog::getOpenFileName(0,0,this,0);
if (!filename.isEmpty()) loadFile(filename);
}
@@ -173,7 +173,7 @@ void KTNEFMain::viewFile()
{
KTNEFAttach *attach = view_->getSelection()->first();
KURL url("file:"+extractTemp(attach));
- QString mimename(attach->mimeTag());
+ TQString mimename(attach->mimeTag());
if (mimename.isEmpty() || mimename == "application/octet-stream")
{
@@ -189,7 +189,7 @@ void KTNEFMain::viewFile()
TQString KTNEFMain::extractTemp(KTNEFAttach *att)
{
- QString dir = KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp/";
+ TQString dir = KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp/";
parser_->extractFileTo(att->name(), dir);
dir.append(att->name());
return dir;
@@ -210,7 +210,7 @@ void KTNEFMain::extractFile()
void KTNEFMain::extractFileTo()
{
- QString dir = KFileDialog::getExistingDirectory(lastdir_, this);
+ TQString dir = KFileDialog::getExistingDirectory(lastdir_, this);
if (!dir.isEmpty())
{
extractTo(dir);
@@ -220,7 +220,7 @@ void KTNEFMain::extractFileTo()
void KTNEFMain::extractAllFiles()
{
- QString dir = KFileDialog::getExistingDirectory(lastdir_, this);
+ TQString dir = KFileDialog::getExistingDirectory(lastdir_, this);
if (!dir.isEmpty())
{
lastdir_ = dir;
@@ -230,7 +230,7 @@ void KTNEFMain::extractAllFiles()
for (;it.current();++it)
if (!parser_->extractFileTo(it.current()->name(), dir))
{
- QString msg = i18n( "Unable to extract file \"%1\"" ).arg( it.current()->name() );
+ TQString msg = i18n( "Unable to extract file \"%1\"" ).arg( it.current()->name() );
TQMessageBox::critical(this,i18n("Error"),msg,TQMessageBox::Ok|TQMessageBox::Default,0);
return;
}
@@ -247,7 +247,7 @@ void KTNEFMain::propertiesFile()
void KTNEFMain::optionDefaultDir()
{
- QString dirname = KFileDialog::getExistingDirectory(defaultdir_, this);
+ TQString dirname = KFileDialog::getExistingDirectory(defaultdir_, this);
if (!dirname.isEmpty())
{
defaultdir_ = dirname;
@@ -285,23 +285,23 @@ void KTNEFMain::enableSingleAction(bool on)
void KTNEFMain::cleanup()
{
- QDir d(KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp/");
- const QFileInfoList *list = d.entryInfoList(TQDir::Files|TQDir::Hidden,TQDir::Unsorted);
- QFileInfoListIterator it(*list);
+ TQDir d(KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp/");
+ const TQFileInfoList *list = d.entryInfoList(TQDir::Files|TQDir::Hidden,TQDir::Unsorted);
+ TQFileInfoListIterator it(*list);
for (;it.current();++it)
d.remove(it.current()->absFilePath());
}
void KTNEFMain::extractTo(const TQString& dirname)
{
- QString dir = dirname;
+ TQString dir = dirname;
if (dir.right(1) != "/") dir.append("/");
TQPtrList<KTNEFAttach> *list = view_->getSelection();
TQPtrListIterator<KTNEFAttach> it(*list);
for (;it.current();++it)
if (!parser_->extractFileTo(it.current()->name(), dir))
{
- QString msg = i18n("Unable to extract file \"%1\"").arg( it.current()->name() );
+ TQString msg = i18n("Unable to extract file \"%1\"").arg( it.current()->name() );
TQMessageBox::critical(this,i18n("Error"),msg,TQMessageBox::Ok|TQMessageBox::Default,0);
return;
}
@@ -390,7 +390,7 @@ void KTNEFMain::slotShowMessageText()
void KTNEFMain::slotSaveMessageText()
{
TQString rtf = parser_->message()->rtfString();
- TQString filename = KFileDialog::getSaveFileName( TQString::null, TQString::null, this );
+ TQString filename = KFileDialog::getSaveFileName( TQString(), TQString(), this );
if ( !filename.isEmpty() )
{
TQFile f( filename );
diff --git a/ktnef/gui/ktnefmain.h b/ktnef/gui/ktnefmain.h
index 5f15f3d95..1b645d1e5 100644
--- a/ktnef/gui/ktnefmain.h
+++ b/ktnef/gui/ktnefmain.h
@@ -29,9 +29,10 @@ class KTNEFAttach;
class KTNEFMain : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
- KTNEFMain(TQWidget *parent = 0, const char *name = 0);
+ KTNEFMain(TQWidget *tqparent = 0, const char *name = 0);
~KTNEFMain();
void loadFile(const TQString& filename);
@@ -73,9 +74,9 @@ private:
private:
KTNEFView *view_;
KTNEFParser *parser_;
- QString filename_;
- QString defaultdir_;
- QString lastdir_;
+ TQString filename_;
+ TQString defaultdir_;
+ TQString lastdir_;
};
#endif
diff --git a/ktnef/gui/ktnefview.cpp b/ktnef/gui/ktnefview.cpp
index 79d5f073b..dcf401ab3 100644
--- a/ktnef/gui/ktnefview.cpp
+++ b/ktnef/gui/ktnefview.cpp
@@ -30,10 +30,10 @@
#include <kmimetype.h>
-class Attachment : public QListViewItem
+class Attachment : public TQListViewItem
{
public:
- Attachment(TQListView *parent, KTNEFAttach *attach);
+ Attachment(TQListView *tqparent, KTNEFAttach *attach);
~Attachment();
KTNEFAttach* getAttachment() const { return attach_; }
@@ -42,14 +42,14 @@ private:
KTNEFAttach *attach_;
};
-Attachment::Attachment(TQListView *parent, KTNEFAttach *attach)
- : TQListViewItem(parent, attach->name()), attach_(attach)
+Attachment::Attachment(TQListView *tqparent, KTNEFAttach *attach)
+ : TQListViewItem(tqparent, attach->name()), attach_(attach)
{
setText(2, TQString::number( attach_->size() ));
if (!attach_->fileName().isEmpty()) setText(0, attach_->fileName());
KMimeType::Ptr mimeType = KMimeType::mimeType( attach_->mimeTag() );
setText(1, mimeType->comment());
- TQPixmap pix = loadRenderingPixmap( attach, parent->tqcolorGroup().base() );
+ TQPixmap pix = loadRenderingPixmap( attach, tqparent->tqcolorGroup().base() );
if ( !pix.isNull() )
setPixmap( 0, pix );
else
@@ -63,8 +63,8 @@ Attachment::~Attachment()
//------------------------------------------------------------------------------------------------------
-KTNEFView::KTNEFView(TQWidget *parent, const char *name)
- : KListView(parent,name)
+KTNEFView::KTNEFView(TQWidget *tqparent, const char *name)
+ : KListView(tqparent,name)
{
attachments_.setAutoDelete(false);
addColumn(i18n("File Name"));
@@ -103,7 +103,7 @@ void KTNEFView::resizeEvent(TQResizeEvent *e)
TQPtrList<KTNEFAttach>* KTNEFView::getSelection()
{
attachments_.clear();
- QListViewItem *item = firstChild();
+ TQListViewItem *item = firstChild();
while (item)
{
if (item->isSelected()) attachments_.append(((Attachment*)item)->getAttachment());
diff --git a/ktnef/gui/ktnefview.h b/ktnef/gui/ktnefview.h
index faa3262ae..8fbe5e4bf 100644
--- a/ktnef/gui/ktnefview.h
+++ b/ktnef/gui/ktnefview.h
@@ -27,9 +27,10 @@ class KTNEFAttach;
class KDE_EXPORT KTNEFView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KTNEFView(TQWidget *parent = 0, const char *name = 0);
+ KTNEFView(TQWidget *tqparent = 0, const char *name = 0);
~KTNEFView();
void setAttachments(TQPtrList<KTNEFAttach> *list);
diff --git a/ktnef/gui/messagepropertydialog.cpp b/ktnef/gui/messagepropertydialog.cpp
index a2b1f75f9..075b4823b 100644
--- a/ktnef/gui/messagepropertydialog.cpp
+++ b/ktnef/gui/messagepropertydialog.cpp
@@ -22,8 +22,8 @@
#include <klistview.h>
#include <klocale.h>
-MessagePropertyDialog::MessagePropertyDialog( TQWidget *parent, KTNEFMessage *msg )
- : KDialogBase( parent, "MessagePropertyDialog", true, i18n( "Message Properties" ),
+MessagePropertyDialog::MessagePropertyDialog( TQWidget *tqparent, KTNEFMessage *msg )
+ : KDialogBase( tqparent, "MessagePropertyDialog", true, i18n( "Message Properties" ),
KDialogBase::Close|KDialogBase::User1, KDialogBase::Close, false,
KStdGuiItem::save() )
{
diff --git a/ktnef/gui/messagepropertydialog.h b/ktnef/gui/messagepropertydialog.h
index 7d1ee7aa6..d7db44def 100644
--- a/ktnef/gui/messagepropertydialog.h
+++ b/ktnef/gui/messagepropertydialog.h
@@ -26,8 +26,9 @@ class KTNEFMessage;
class MessagePropertyDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- MessagePropertyDialog( TQWidget *parent, KTNEFMessage *msg );
+ MessagePropertyDialog( TQWidget *tqparent, KTNEFMessage *msg );
protected slots:
void slotUser1();
diff --git a/ktnef/gui/metafuncs.h b/ktnef/gui/metafuncs.h
index 8675851e0..e8f1232de 100644
--- a/ktnef/gui/metafuncs.h
+++ b/ktnef/gui/metafuncs.h
@@ -4,86 +4,86 @@
#ifndef metafunc_h
#define metafunc_h
-class QWinMetaFile;
+class TQWinMetaFile;
static const struct MetaFuncRec
{
const char* name;
unsigned short func;
- void ( QWinMetaFile::*method )( long, short* );
+ void ( TQWinMetaFile::*method )( long, short* );
} metaFuncTab[] =
{
- { "SETBKCOLOR", 0x0201, &QWinMetaFile::setBkColor },
- { "SETBKMODE", 0x0102, &QWinMetaFile::setBkMode },
- { "SETMAPMODE", 0x0103, &QWinMetaFile::noop },
- { "SETROP2", 0x0104, &QWinMetaFile::setRop },
- { "SETRELABS", 0x0105, &QWinMetaFile::noop },
- { "SETPOLYFILLMODE", 0x0106, &QWinMetaFile::setPolyFillMode },
- { "SETSTRETCHBLTMODE", 0x0107, &QWinMetaFile::noop },
- { "SETTEXTCHAREXTRA", 0x0108, &QWinMetaFile::noop },
- { "SETTEXTCOLOR", 0x0209, &QWinMetaFile::setTextColor },
- { "SETTEXTJUSTIFICATION", 0x020A, &QWinMetaFile::noop },
- { "SETWINDOWORG", 0x020B, &QWinMetaFile::setWindowOrg },
- { "SETWINDOWEXT", 0x020C, &QWinMetaFile::setWindowExt },
- { "SETVIEWPORTORG", 0x020D, &QWinMetaFile::noop },
- { "SETVIEWPORTEXT", 0x020E, &QWinMetaFile::noop },
- { "OFFSETWINDOWORG", 0x020F, &QWinMetaFile::noop },
- { "SCALEWINDOWEXT", 0x0410, &QWinMetaFile::noop },
- { "OFFSETVIEWPORTORG", 0x0211, &QWinMetaFile::noop },
- { "SCALEVIEWPORTEXT", 0x0412, &QWinMetaFile::noop },
- { "LINETO", 0x0213, &QWinMetaFile::lineTo },
- { "MOVETO", 0x0214, &QWinMetaFile::moveTo },
- { "EXCLUDECLIPRECT", 0x0415, &QWinMetaFile::excludeClipRect },
- { "INTERSECTCLIPRECT", 0x0416, &QWinMetaFile::intersectClipRect },
- { "ARC", 0x0817, &QWinMetaFile::arc },
- { "ELLIPSE", 0x0418, &QWinMetaFile::ellipse },
- { "FLOODFILL", 0x0419, &QWinMetaFile::noop },
- { "PIE", 0x081A, &QWinMetaFile::pie },
- { "RECTANGLE", 0x041B, &QWinMetaFile::rectangle },
- { "ROUNDRECT", 0x061C, &QWinMetaFile::roundRect },
- { "PATBLT", 0x061D, &QWinMetaFile::noop },
- { "SAVEDC", 0x001E, &QWinMetaFile::saveDC },
- { "SETPIXEL", 0x041F, &QWinMetaFile::setPixel },
- { "OFFSETCLIPRGN", 0x0220, &QWinMetaFile::noop },
- { "TEXTOUT", 0x0521, &QWinMetaFile::textOut },
- { "BITBLT", 0x0922, &QWinMetaFile::noop },
- { "STRETCHBLT", 0x0B23, &QWinMetaFile::noop },
- { "POLYGON", 0x0324, &QWinMetaFile::polygon },
- { "POLYLINE", 0x0325, &QWinMetaFile::polyline },
- { "ESCAPE", 0x0626, &QWinMetaFile::noop },
- { "RESTOREDC", 0x0127, &QWinMetaFile::restoreDC },
- { "FILLREGION", 0x0228, &QWinMetaFile::noop },
- { "FRAMEREGION", 0x0429, &QWinMetaFile::noop },
- { "INVERTREGION", 0x012A, &QWinMetaFile::noop },
- { "PAINTREGION", 0x012B, &QWinMetaFile::noop },
- { "SELECTCLIPREGION", 0x012C, &QWinMetaFile::noop },
- { "SELECTOBJECT", 0x012D, &QWinMetaFile::selectObject },
- { "SETTEXTALIGN", 0x012E, &QWinMetaFile::setTextAlign },
- { "CHORD", 0x0830, &QWinMetaFile::chord },
- { "SETMAPPERFLAGS", 0x0231, &QWinMetaFile::noop },
- { "EXTTEXTOUT", 0x0a32, &QWinMetaFile::extTextOut },
- { "SETDIBTODEV", 0x0d33, &QWinMetaFile::noop },
- { "SELECTPALETTE", 0x0234, &QWinMetaFile::noop },
- { "REALIZEPALETTE", 0x0035, &QWinMetaFile::noop },
- { "ANIMATEPALETTE", 0x0436, &QWinMetaFile::noop },
- { "SETPALENTRIES", 0x0037, &QWinMetaFile::noop },
- { "POLYPOLYGON", 0x0538, &QWinMetaFile::polyPolygon },
- { "RESIZEPALETTE", 0x0139, &QWinMetaFile::noop },
- { "DIBBITBLT", 0x0940, &QWinMetaFile::dibBitBlt },
- { "DIBSTRETCHBLT", 0x0b41, &QWinMetaFile::dibStretchBlt },
- { "DIBCREATEPATTERNBRUSH", 0x0142, &QWinMetaFile::dibCreatePatternBrush },
- { "STRETCHDIB", 0x0f43, &QWinMetaFile::stretchDib },
- { "EXTFLOODFILL", 0x0548, &QWinMetaFile::noop },
- { "DELETEOBJECT", 0x01f0, &QWinMetaFile::deleteObject },
- { "CREATEPALETTE", 0x00f7, &QWinMetaFile::createEmptyObject },
- { "CREATEPATTERNBRUSH", 0x01F9, &QWinMetaFile::createEmptyObject },
- { "CREATEPENINDIRECT", 0x02FA, &QWinMetaFile::createPenIndirect },
- { "CREATEFONTINDIRECT", 0x02FB, &QWinMetaFile::createFontIndirect },
- { "CREATEBRUSHINDIRECT", 0x02FC, &QWinMetaFile::createBrushIndirect },
- { "CREATEREGION", 0x06FF, &QWinMetaFile::createEmptyObject },
- { "END", 0, &QWinMetaFile::end },
+ { "SETBKCOLOR", 0x0201, &TQWinMetaFile::setBkColor },
+ { "SETBKMODE", 0x0102, &TQWinMetaFile::setBkMode },
+ { "SETMAPMODE", 0x0103, &TQWinMetaFile::noop },
+ { "SETROP2", 0x0104, &TQWinMetaFile::setRop },
+ { "SETRELABS", 0x0105, &TQWinMetaFile::noop },
+ { "SETPOLYFILLMODE", 0x0106, &TQWinMetaFile::setPolyFillMode },
+ { "SETSTRETCHBLTMODE", 0x0107, &TQWinMetaFile::noop },
+ { "SETTEXTCHAREXTRA", 0x0108, &TQWinMetaFile::noop },
+ { "SETTEXTCOLOR", 0x0209, &TQWinMetaFile::setTextColor },
+ { "SETTEXTJUSTIFICATION", 0x020A, &TQWinMetaFile::noop },
+ { "SETWINDOWORG", 0x020B, &TQWinMetaFile::setWindowOrg },
+ { "SETWINDOWEXT", 0x020C, &TQWinMetaFile::setWindowExt },
+ { "SETVIEWPORTORG", 0x020D, &TQWinMetaFile::noop },
+ { "SETVIEWPORTEXT", 0x020E, &TQWinMetaFile::noop },
+ { "OFFSETWINDOWORG", 0x020F, &TQWinMetaFile::noop },
+ { "SCALEWINDOWEXT", 0x0410, &TQWinMetaFile::noop },
+ { "OFFSETVIEWPORTORG", 0x0211, &TQWinMetaFile::noop },
+ { "SCALEVIEWPORTEXT", 0x0412, &TQWinMetaFile::noop },
+ { "LINETO", 0x0213, &TQWinMetaFile::lineTo },
+ { "MOVETO", 0x0214, &TQWinMetaFile::moveTo },
+ { "EXCLUDECLIPRECT", 0x0415, &TQWinMetaFile::excludeClipRect },
+ { "INTERSECTCLIPRECT", 0x0416, &TQWinMetaFile::intersectClipRect },
+ { "ARC", 0x0817, &TQWinMetaFile::arc },
+ { "ELLIPSE", 0x0418, &TQWinMetaFile::ellipse },
+ { "FLOODFILL", 0x0419, &TQWinMetaFile::noop },
+ { "PIE", 0x081A, &TQWinMetaFile::pie },
+ { "RECTANGLE", 0x041B, &TQWinMetaFile::rectangle },
+ { "ROUNDRECT", 0x061C, &TQWinMetaFile::roundRect },
+ { "PATBLT", 0x061D, &TQWinMetaFile::noop },
+ { "SAVEDC", 0x001E, &TQWinMetaFile::saveDC },
+ { "SETPIXEL", 0x041F, &TQWinMetaFile::setPixel },
+ { "OFFSETCLIPRGN", 0x0220, &TQWinMetaFile::noop },
+ { "TEXTOUT", 0x0521, &TQWinMetaFile::textOut },
+ { "BITBLT", 0x0922, &TQWinMetaFile::noop },
+ { "STRETCHBLT", 0x0B23, &TQWinMetaFile::noop },
+ { "POLYGON", 0x0324, &TQWinMetaFile::polygon },
+ { "POLYLINE", 0x0325, &TQWinMetaFile::polyline },
+ { "ESCAPE", 0x0626, &TQWinMetaFile::noop },
+ { "RESTOREDC", 0x0127, &TQWinMetaFile::restoreDC },
+ { "FILLREGION", 0x0228, &TQWinMetaFile::noop },
+ { "FRAMEREGION", 0x0429, &TQWinMetaFile::noop },
+ { "INVERTREGION", 0x012A, &TQWinMetaFile::noop },
+ { "PAINTREGION", 0x012B, &TQWinMetaFile::noop },
+ { "SELECTCLIPREGION", 0x012C, &TQWinMetaFile::noop },
+ { "SELECTOBJECT", 0x012D, &TQWinMetaFile::selectObject },
+ { "SETTEXTALIGN", 0x012E, &TQWinMetaFile::setTextAlign },
+ { "CHORD", 0x0830, &TQWinMetaFile::chord },
+ { "SETMAPPERFLAGS", 0x0231, &TQWinMetaFile::noop },
+ { "EXTTEXTOUT", 0x0a32, &TQWinMetaFile::extTextOut },
+ { "SETDIBTODEV", 0x0d33, &TQWinMetaFile::noop },
+ { "SELECTPALETTE", 0x0234, &TQWinMetaFile::noop },
+ { "REALIZEPALETTE", 0x0035, &TQWinMetaFile::noop },
+ { "ANIMATEPALETTE", 0x0436, &TQWinMetaFile::noop },
+ { "SETPALENTRIES", 0x0037, &TQWinMetaFile::noop },
+ { "POLYPOLYGON", 0x0538, &TQWinMetaFile::polyPolygon },
+ { "RESIZEPALETTE", 0x0139, &TQWinMetaFile::noop },
+ { "DIBBITBLT", 0x0940, &TQWinMetaFile::dibBitBlt },
+ { "DIBSTRETCHBLT", 0x0b41, &TQWinMetaFile::dibStretchBlt },
+ { "DIBCREATEPATTERNBRUSH", 0x0142, &TQWinMetaFile::dibCreatePatternBrush },
+ { "STRETCHDIB", 0x0f43, &TQWinMetaFile::stretchDib },
+ { "EXTFLOODFILL", 0x0548, &TQWinMetaFile::noop },
+ { "DELETEOBJECT", 0x01f0, &TQWinMetaFile::deleteObject },
+ { "CREATEPALETTE", 0x00f7, &TQWinMetaFile::createEmptyObject },
+ { "CREATEPATTERNBRUSH", 0x01F9, &TQWinMetaFile::createEmptyObject },
+ { "CREATEPENINDIRECT", 0x02FA, &TQWinMetaFile::createPenIndirect },
+ { "CREATEFONTINDIRECT", 0x02FB, &TQWinMetaFile::createFontIndirect },
+ { "CREATEBRUSHINDIRECT", 0x02FC, &TQWinMetaFile::createBrushIndirect },
+ { "CREATEREGION", 0x06FF, &TQWinMetaFile::createEmptyObject },
+ { "END", 0, &TQWinMetaFile::end },
// always the latest in the table : in case of unknown function
- { NULL, 0, &QWinMetaFile::noop },
+ { NULL, 0, &TQWinMetaFile::noop },
};
diff --git a/ktnef/gui/qwmf.cpp b/ktnef/gui/qwmf.cpp
index f8e19411e..8f8cd4d28 100644
--- a/ktnef/gui/qwmf.cpp
+++ b/ktnef/gui/qwmf.cpp
@@ -33,7 +33,7 @@ bool qwmfDebug = false;
#include "wmfstruct.h"
#include "metafuncs.h"
-#define QWMF_DEBUG 0
+#define TQWMF_DEBUG 0
class WmfCmd
@@ -112,7 +112,7 @@ void WinObjFontHandle::apply( TQPainter& p )
//-----------------------------------------------------------------------------
-QWinMetaFile::QWinMetaFile()
+TQWinMetaFile::TQWinMetaFile()
{
mValid = false;
mFirstCmd = NULL;
@@ -122,7 +122,7 @@ QWinMetaFile::QWinMetaFile()
//-----------------------------------------------------------------------------
-QWinMetaFile::~QWinMetaFile()
+TQWinMetaFile::~TQWinMetaFile()
{
if ( mFirstCmd ) delete mFirstCmd;
if ( mObjHandleTab ) delete[] mObjHandleTab;
@@ -130,7 +130,7 @@ QWinMetaFile::~QWinMetaFile()
//-----------------------------------------------------------------------------
-bool QWinMetaFile::load( const TQString &filename )
+bool TQWinMetaFile::load( const TQString &filename )
{
TQFile file( filename );
@@ -155,7 +155,7 @@ bool QWinMetaFile::load( const TQString &filename )
}
//-----------------------------------------------------------------------------
-bool QWinMetaFile::load( TQBuffer &buffer )
+bool TQWinMetaFile::load( TQBuffer &buffer )
{
TQDataStream st;
WmfEnhMetaHeader eheader;
@@ -169,12 +169,12 @@ bool QWinMetaFile::load( TQBuffer &buffer )
mTextAlign = 0;
mRotation = 0;
- mTextColor = Qt::black;
+ mTextColor = TQt::black;
if ( mFirstCmd ) delete mFirstCmd;
mFirstCmd = NULL;
st.setDevice( &buffer );
- st.setByteOrder( TQDataStream::LittleEndian ); // Great, I love Qt !
+ st.setByteOrder( TQDataStream::LittleEndian ); // Great, I love TQt !
//----- Read placeable metafile header
st >> pheader.key;
@@ -198,7 +198,7 @@ bool QWinMetaFile::load( TQBuffer &buffer )
mBBox.setRight( pheader.bbox.right );
mBBox.setBottom( pheader.bbox.bottom );
mHeaderBoundingBox = mBBox;
- if ( QWMF_DEBUG )
+ if ( TQWMF_DEBUG )
{
kdDebug() << endl << "-------------------------------------------------" << endl;
kdDebug() << "WMF Placeable Header ( " << static_cast<int>(sizeof( pheader ) ) << "):" << endl;
@@ -240,7 +240,7 @@ bool QWinMetaFile::load( TQBuffer &buffer )
st >> eheader.szlMillimeters.width;
st >> eheader.szlMillimeters.height;
- if ( QWMF_DEBUG )
+ if ( TQWMF_DEBUG )
{
kdDebug() << endl << "-------------------------------------------------" << endl;
kdDebug() << "WMF Extended Header:" << endl;
@@ -265,7 +265,7 @@ bool QWinMetaFile::load( TQBuffer &buffer )
st >> header.mtNoObjects;
st >> header.mtMaxRecord;
st >> header.mtNoParameters;
- if ( QWMF_DEBUG ) {
+ if ( TQWMF_DEBUG ) {
kdDebug() << "WMF Header: " << "mtSize=" << header.mtSize << endl;
}
}
@@ -329,7 +329,7 @@ bool QWinMetaFile::load( TQBuffer &buffer )
//-----------------------------------------------------------------------------
-bool QWinMetaFile::paint( const TQPaintDevice* aTarget, bool absolute )
+bool TQWinMetaFile::paint( const TQPaintDevice* aTarget, bool absolute )
{
int idx, i;
WmfCmd* cmd;
@@ -349,7 +349,7 @@ bool QWinMetaFile::paint( const TQPaintDevice* aTarget, bool absolute )
mAbsoluteCoord = absolute;
mPainter.begin( aTarget );
- if ( QWMF_DEBUG ) {
+ if ( TQWMF_DEBUG ) {
kdDebug() << "Bounding box : " << mBBox.left()
<< " " << mBBox.top() << " " << mBBox.right() << " " << mBBox.bottom() << endl;
}
@@ -364,12 +364,12 @@ bool QWinMetaFile::paint( const TQPaintDevice* aTarget, bool absolute )
idx = cmd->funcIndex;
( this->*metaFuncTab[ idx ].method )( cmd->numParm, cmd->parm );
- if ( QWMF_DEBUG ) {
+ if ( TQWMF_DEBUG ) {
TQString str = "", param;
if ( metaFuncTab[ idx ].name == NULL ) {
str += "UNKNOWN ";
}
- if ( metaFuncTab[ idx ].method == &QWinMetaFile::noop ) {
+ if ( metaFuncTab[ idx ].method == &TQWinMetaFile::noop ) {
str += "UNIMPLEMENTED ";
}
str += metaFuncTab[ idx ].name;
@@ -389,7 +389,7 @@ bool QWinMetaFile::paint( const TQPaintDevice* aTarget, bool absolute )
mWindowsCoord += 1;
if ( mWindowsCoord == 2 ) {
kdDebug() << "DRAW ANGLES " << endl;
- mPainter.setPen( Qt::white );
+ mPainter.setPen( TQt::white );
mPainter.drawPoint( mBBox.left(), mBBox.top() );
mPainter.drawPoint( mBBox.right(), mBBox.bottom() );
}
@@ -402,7 +402,7 @@ bool QWinMetaFile::paint( const TQPaintDevice* aTarget, bool absolute )
//----------------s-------------------------------------------------------------
// Metafile painter methods
//-----------------------------------------------------------------------------
-void QWinMetaFile::setWindowOrg( long, short* parm )
+void TQWinMetaFile::setWindowOrg( long, short* parm )
{
if ( mAbsoluteCoord ) {
TQRect r = mPainter.window();
@@ -421,9 +421,9 @@ void QWinMetaFile::setWindowOrg( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::setWindowExt( long, short* parm )
+void TQWinMetaFile::setWindowExt( long, short* parm )
{
- // negative value allowed for width and height : QABS() forbidden
+ // negative value allowed for width and height : TQABS() forbidden
if ( mAbsoluteCoord ) {
TQRect r = mPainter.window();
mPainter.setWindow( r.left(), r.top(), parm[ 1 ], parm[ 0 ] );
@@ -456,28 +456,28 @@ void QWinMetaFile::setWindowExt( long, short* parm )
//-----------------------------------------------------------------------------
// Drawing
//-----------------------------------------------------------------------------
-void QWinMetaFile::lineTo( long, short* parm )
+void TQWinMetaFile::lineTo( long, short* parm )
{
mPainter.lineTo( parm[ 1 ], parm[ 0 ] );
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::moveTo( long, short* parm )
+void TQWinMetaFile::moveTo( long, short* parm )
{
mPainter.moveTo( parm[ 1 ], parm[ 0 ] );
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::ellipse( long, short* parm )
+void TQWinMetaFile::ellipse( long, short* parm )
{
mPainter.drawEllipse( parm[ 3 ], parm[ 2 ], parm[ 1 ]-parm[ 3 ], parm[ 0 ]-parm[ 2 ] );
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::polygon( long, short* parm )
+void TQWinMetaFile::polygon( long, short* parm )
{
TQPointArray* pa;
@@ -487,7 +487,7 @@ void QWinMetaFile::polygon( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::polyPolygon( long, short* parm )
+void TQWinMetaFile::polyPolygon( long, short* parm )
{
TQRegion region;
int i, j, startPolygon;
@@ -512,9 +512,9 @@ void QWinMetaFile::polyPolygon( long, short* parm )
mPainter.fillRect( win.left(), win.top(), win.width(), win.height(), mPainter.brush() );
// draw polygon's border if necessary
- if ( mPainter.pen().style() != Qt::NoPen ) {
+ if ( mPainter.pen().style() != TQt::NoPen ) {
mPainter.setClipping( false );
- mPainter.setBrush( Qt::NoBrush );
+ mPainter.setBrush( TQt::NoBrush );
TQPointArray* pa;
int idxPolygon = 1 + parm[ 0 ];
@@ -530,7 +530,7 @@ void QWinMetaFile::polyPolygon( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::polyline( long, short* parm )
+void TQWinMetaFile::polyline( long, short* parm )
{
TQPointArray* pa;
@@ -540,14 +540,14 @@ void QWinMetaFile::polyline( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::rectangle( long, short* parm )
+void TQWinMetaFile::rectangle( long, short* parm )
{
mPainter.drawRect( parm[ 3 ], parm[ 2 ], parm[ 1 ]-parm[ 3 ], parm[ 0 ]-parm[ 2 ] );
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::roundRect( long, short* parm )
+void TQWinMetaFile::roundRect( long, short* parm )
{
int xRnd = 0, yRnd = 0;
@@ -562,7 +562,7 @@ void QWinMetaFile::roundRect( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::arc( long, short* parm )
+void TQWinMetaFile::arc( long, short* parm )
{
int xCenter, yCenter, angleStart, aLength;
@@ -576,7 +576,7 @@ void QWinMetaFile::arc( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::chord( long, short* parm )
+void TQWinMetaFile::chord( long, short* parm )
{
int xCenter, yCenter, angleStart, aLength;
@@ -590,7 +590,7 @@ void QWinMetaFile::chord( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::pie( long, short* parm )
+void TQWinMetaFile::pie( long, short* parm )
{
int xCenter, yCenter, angleStart, aLength;
@@ -604,29 +604,29 @@ void QWinMetaFile::pie( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::setPolyFillMode( long, short* parm )
+void TQWinMetaFile::setPolyFillMode( long, short* parm )
{
mWinding = parm[ 0 ];
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::setBkColor( long, short* parm )
+void TQWinMetaFile::setBkColor( long, short* parm )
{
mPainter.setBackgroundColor( color( parm ) );
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::setBkMode( long, short* parm )
+void TQWinMetaFile::setBkMode( long, short* parm )
{
- if ( parm[ 0 ]==1 ) mPainter.setBackgroundMode( Qt::TransparentMode );
- else mPainter.setBackgroundMode( Qt::OpaqueMode );
+ if ( parm[ 0 ]==1 ) mPainter.setBackgroundMode( TQt::TransparentMode );
+ else mPainter.setBackgroundMode( TQt::OpaqueMode );
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::setPixel( long, short* parm )
+void TQWinMetaFile::setPixel( long, short* parm )
{
TQPen pen = mPainter.pen();
mPainter.setPen( color( parm ) );
@@ -636,21 +636,21 @@ void QWinMetaFile::setPixel( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::setRop( long, short* parm )
+void TQWinMetaFile::setRop( long, short* parm )
{
- mPainter.setRasterOp( winToQtRaster( parm[ 0 ] ) );
+ mPainter.setRasterOp( winToTQtRaster( parm[ 0 ] ) );
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::saveDC( long, short* )
+void TQWinMetaFile::saveDC( long, short* )
{
mPainter.save();
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::restoreDC( long, short *parm )
+void TQWinMetaFile::restoreDC( long, short *parm )
{
for ( int i=0; i > parm[ 0 ] ; i-- )
mPainter.restore();
@@ -658,7 +658,7 @@ void QWinMetaFile::restoreDC( long, short *parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::intersectClipRect( long, short* parm )
+void TQWinMetaFile::intersectClipRect( long, short* parm )
{
/* TODO: better implementation : need QT 3.0.2
TQRegion region = mPainter.clipRegion();
@@ -675,7 +675,7 @@ void QWinMetaFile::intersectClipRect( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::excludeClipRect( long, short* parm )
+void TQWinMetaFile::excludeClipRect( long, short* parm )
{
/* TODO: better implementation : need QT 3.0.2
TQRegion region = mPainter.clipRegion();
@@ -694,21 +694,21 @@ void QWinMetaFile::excludeClipRect( long, short* parm )
//-----------------------------------------------------------------------------
// Text
//-----------------------------------------------------------------------------
-void QWinMetaFile::setTextColor( long, short* parm )
+void TQWinMetaFile::setTextColor( long, short* parm )
{
mTextColor = color( parm );
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::setTextAlign( long, short* parm )
+void TQWinMetaFile::setTextAlign( long, short* parm )
{
mTextAlign = parm[ 0 ];
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::textOut( long num, short* parm )
+void TQWinMetaFile::textOut( long num, short* parm )
{
short *copyParm = new short[ num + 1 ];
@@ -727,7 +727,7 @@ void QWinMetaFile::textOut( long num, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::extTextOut( long num, short* parm )
+void TQWinMetaFile::extTextOut( long num, short* parm )
{
char* ptStr;
int x, y, width, height;
@@ -773,14 +773,14 @@ void QWinMetaFile::extTextOut( long num, short* parm )
if ( ( parm[ 2 ] > 1 ) && ( num >= (idxOffset + parm[ 2 ]) ) && ( parm[ 3 ] == 0 ) ) {
// offset for each char
int left = x;
- mPainter.drawText( left, y, width, height, Qt::AlignLeft | Qt::AlignTop, text.mid(0, 1) );
+ mPainter.drawText( left, y, width, height, TQt::AlignLeft | TQt::AlignTop, text.mid(0, 1) );
for ( int i = 1; i < parm[ 2 ] ; i++ ) {
left += parm[ idxOffset + i - 1 ];
- mPainter.drawText( left, y, width, height, Qt::AlignLeft | Qt::AlignTop, text.mid(i, 1) );
+ mPainter.drawText( left, y, width, height, TQt::AlignLeft | TQt::AlignTop, text.mid(i, 1) );
}
}
else {
- mPainter.drawText( x, y, width, height, Qt::AlignLeft | Qt::AlignTop, text );
+ mPainter.drawText( x, y, width, height, TQt::AlignLeft | TQt::AlignTop, text );
}
mPainter.restore();
@@ -792,7 +792,7 @@ void QWinMetaFile::extTextOut( long num, short* parm )
//-----------------------------------------------------------------------------
// Bitmap
//-----------------------------------------------------------------------------
-void QWinMetaFile::dibBitBlt( long num, short* parm )
+void TQWinMetaFile::dibBitBlt( long num, short* parm )
{
if ( num > 9 ) { // DIB image
TQImage bmpSrc;
@@ -800,7 +800,7 @@ void QWinMetaFile::dibBitBlt( long num, short* parm )
if ( dibToBmp( bmpSrc, (char*)&parm[ 8 ], (num - 8) * 2 ) ) {
long raster = toDWord( parm );
- mPainter.setRasterOp( winToQtRaster( raster ) );
+ mPainter.setRasterOp( winToTQtRaster( raster ) );
// wmf file allow negative width or height
mPainter.save();
@@ -817,20 +817,20 @@ void QWinMetaFile::dibBitBlt( long num, short* parm )
}
}
else {
- kdDebug() << "QWinMetaFile::dibBitBlt without image: not implemented " << endl;
+ kdDebug() << "TQWinMetaFile::dibBitBlt without image: not implemented " << endl;
}
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::dibStretchBlt( long num, short* parm )
+void TQWinMetaFile::dibStretchBlt( long num, short* parm )
{
TQImage bmpSrc;
if ( dibToBmp( bmpSrc, (char*)&parm[ 10 ], (num - 10) * 2 ) ) {
long raster = toDWord( parm );
- mPainter.setRasterOp( winToQtRaster( raster ) );
+ mPainter.setRasterOp( winToTQtRaster( raster ) );
// wmf file allow negative width or height
mPainter.save();
@@ -852,14 +852,14 @@ void QWinMetaFile::dibStretchBlt( long num, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::stretchDib( long num, short* parm )
+void TQWinMetaFile::stretchDib( long num, short* parm )
{
TQImage bmpSrc;
if ( dibToBmp( bmpSrc, (char*)&parm[ 11 ], (num - 11) * 2 ) ) {
long raster = toDWord( parm );
- mPainter.setRasterOp( winToQtRaster( raster ) );
+ mPainter.setRasterOp( winToTQtRaster( raster ) );
// wmf file allow negative width or height
mPainter.save();
@@ -881,7 +881,7 @@ void QWinMetaFile::stretchDib( long num, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::dibCreatePatternBrush( long num, short* parm )
+void TQWinMetaFile::dibCreatePatternBrush( long num, short* parm )
{
WinObjPatternBrushHandle* handle = new WinObjPatternBrushHandle;
addHandle( handle );
@@ -897,7 +897,7 @@ void QWinMetaFile::dibCreatePatternBrush( long num, short* parm )
//-----------------------------------------------------------------------------
// Object handle
//-----------------------------------------------------------------------------
-void QWinMetaFile::selectObject( long, short* parm )
+void TQWinMetaFile::selectObject( long, short* parm )
{
int idx = parm[ 0 ];
if ( idx>=0 && idx < MAX_OBJHANDLE && mObjHandleTab[ idx ] )
@@ -906,45 +906,45 @@ void QWinMetaFile::selectObject( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::deleteObject( long, short* parm )
+void TQWinMetaFile::deleteObject( long, short* parm )
{
deleteHandle( parm[ 0 ] );
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::createEmptyObject( long, short* )
+void TQWinMetaFile::createEmptyObject( long, short* )
{
// allocation of an empty object (to keep object counting in sync)
WinObjPenHandle* handle = new WinObjPenHandle;
addHandle( handle );
- kdDebug() << "QWinMetaFile: unimplemented createObject " << endl;
+ kdDebug() << "TQWinMetaFile: unimplemented createObject " << endl;
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::createBrushIndirect( long, short* parm )
+void TQWinMetaFile::createBrushIndirect( long, short* parm )
{
- static Qt::BrushStyle hatchedStyleTab[] =
+ static TQt::BrushStyle hatchedStyleTab[] =
{
- Qt::HorPattern,
- Qt::FDiagPattern,
- Qt::BDiagPattern,
- Qt::CrossPattern,
- Qt::DiagCrossPattern
+ TQt::HorPattern,
+ TQt::FDiagPattern,
+ TQt::BDiagPattern,
+ TQt::CrossPattern,
+ TQt::DiagCrossPattern
};
- static Qt::BrushStyle styleTab[] =
- { Qt::SolidPattern,
- Qt::NoBrush,
- Qt::FDiagPattern, /* hatched */
- Qt::Dense4Pattern, /* should be custom bitmap pattern */
- Qt::HorPattern, /* should be BS_INDEXED (?) */
- Qt::VerPattern, /* should be device-independent bitmap */
- Qt::Dense6Pattern, /* should be device-independent packed-bitmap */
- Qt::Dense2Pattern, /* should be BS_PATTERN8x8 */
- Qt::Dense3Pattern /* should be device-independent BS_DIBPATTERN8x8 */
+ static TQt::BrushStyle styleTab[] =
+ { TQt::SolidPattern,
+ TQt::NoBrush,
+ TQt::FDiagPattern, /* hatched */
+ TQt::Dense4Pattern, /* should be custom bitmap pattern */
+ TQt::HorPattern, /* should be BS_INDEXED (?) */
+ TQt::VerPattern, /* should be tqdevice-independent bitmap */
+ TQt::Dense6Pattern, /* should be tqdevice-independent packed-bitmap */
+ TQt::Dense2Pattern, /* should be BS_PATTERN8x8 */
+ TQt::Dense3Pattern /* should be tqdevice-independent BS_DIBPATTERN8x8 */
};
- Qt::BrushStyle style;
+ TQt::BrushStyle style;
short arg;
WinObjBrushHandle* handle = new WinObjBrushHandle;
addHandle( handle );
@@ -956,16 +956,16 @@ void QWinMetaFile::createBrushIndirect( long, short* parm )
if ( arg>=0 && arg<5 ) style = hatchedStyleTab[ arg ];
else
{
- kdDebug() << "QWinMetaFile::createBrushIndirect: invalid hatched brush " << arg << endl;
- style = Qt::SolidPattern;
+ kdDebug() << "TQWinMetaFile::createBrushIndirect: invalid hatched brush " << arg << endl;
+ style = TQt::SolidPattern;
}
}
else if ( arg>=0 && arg<9 )
style = styleTab[ arg ];
else
{
- kdDebug() << "QWinMetaFile::createBrushIndirect: invalid brush " << arg << endl;
- style = Qt::SolidPattern;
+ kdDebug() << "TQWinMetaFile::createBrushIndirect: invalid brush " << arg << endl;
+ style = TQt::SolidPattern;
}
handle->brush.setStyle( style );
handle->brush.setColor( color( parm+1 ) );
@@ -973,28 +973,28 @@ void QWinMetaFile::createBrushIndirect( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::createPenIndirect( long, short* parm )
+void TQWinMetaFile::createPenIndirect( long, short* parm )
{
- static Qt::PenStyle styleTab[] =
- { Qt::SolidLine, Qt::DashLine, Qt::DotLine, Qt::DashDotLine, Qt::DashDotDotLine,
- Qt::NoPen, Qt::SolidLine };
- Qt::PenStyle style;
+ static TQt::PenStyle styleTab[] =
+ { TQt::SolidLine, TQt::DashLine, TQt::DotLine, TQt::DashDotLine, TQt::DashDotDotLine,
+ TQt::NoPen, TQt::SolidLine };
+ TQt::PenStyle style;
WinObjPenHandle* handle = new WinObjPenHandle;
addHandle( handle );
if ( parm[ 0 ]>=0 && parm[ 0 ]<6 ) style=styleTab[ parm[ 0 ] ];
else
{
- kdDebug() << "QWinMetaFile::createPenIndirect: invalid pen " << parm[ 0 ] << endl;
- style = Qt::SolidLine;
+ kdDebug() << "TQWinMetaFile::createPenIndirect: invalid pen " << parm[ 0 ] << endl;
+ style = TQt::SolidLine;
}
handle->pen.setStyle( style );
handle->pen.setColor( color( parm+3 ) );
- handle->pen.setCapStyle( Qt::RoundCap );
+ handle->pen.setCapStyle( TQt::RoundCap );
//int width = 0;
- // TODO : width of pen proportional to device context width
+ // TODO : width of pen proportional to tqdevice context width
// DOESN'T WORK
/*
TQRect devRec;
@@ -1010,7 +1010,7 @@ void QWinMetaFile::createPenIndirect( long, short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::createFontIndirect( long , short* parm)
+void TQWinMetaFile::createFontIndirect( long , short* parm)
{
WinObjFontHandle* handle = new WinObjFontHandle;
addHandle( handle );
@@ -1022,7 +1022,7 @@ void QWinMetaFile::createFontIndirect( long , short* parm)
handle->font.setFamily( family );
handle->font.setFixedPitch( ((parm[ 8 ] & 0x01) == 0) );
// TODO: investigation why some test case need -2. (size of font in logical point)
- handle->font.setPointSize( QABS(parm[ 0 ]) - 2 );
+ handle->font.setPointSize( TQABS(parm[ 0 ]) - 2 );
handle->font.setWeight( (parm[ 4 ] >> 3) );
handle->font.setItalic( (parm[ 5 ] & 0x01) );
handle->font.setUnderline( (parm[ 5 ] & 0x100) );
@@ -1032,12 +1032,12 @@ void QWinMetaFile::createFontIndirect( long , short* parm)
//-----------------------------------------------------------------------------
// Misc
//-----------------------------------------------------------------------------
-void QWinMetaFile::noop( long, short* )
+void TQWinMetaFile::noop( long, short* )
{
}
-void QWinMetaFile::end( long, short* )
+void TQWinMetaFile::end( long, short* )
{
// end of file :
// kdDebug() << "END bbox=( " << mBBox.left() << "; " << mBBox.top() << "; " << mBBox.width() << "; " << mBBox.height() << ")" << endl;
@@ -1045,7 +1045,7 @@ void QWinMetaFile::end( long, short* )
//-----------------------------------------------------------------------------
-unsigned short QWinMetaFile::calcCheckSum( WmfPlaceableHeader* apmfh )
+unsigned short TQWinMetaFile::calcCheckSum( WmfPlaceableHeader* apmfh )
{
WORD* lpWord;
WORD wResult, i;
@@ -1062,7 +1062,7 @@ unsigned short QWinMetaFile::calcCheckSum( WmfPlaceableHeader* apmfh )
//-----------------------------------------------------------------------------
-int QWinMetaFile::findFunc( unsigned short aFunc ) const
+int TQWinMetaFile::findFunc( unsigned short aFunc ) const
{
int i;
@@ -1074,7 +1074,7 @@ int QWinMetaFile::findFunc( unsigned short aFunc ) const
}
//-----------------------------------------------------------------------------
-TQPointArray* QWinMetaFile::pointArray( short num, short* parm )
+TQPointArray* TQWinMetaFile::pointArray( short num, short* parm )
{
int i;
@@ -1087,7 +1087,7 @@ TQPointArray* QWinMetaFile::pointArray( short num, short* parm )
}
//-----------------------------------------------------------------------------
-unsigned int QWinMetaFile::toDWord( short* parm )
+unsigned int TQWinMetaFile::toDWord( short* parm )
{
unsigned int l;
@@ -1109,7 +1109,7 @@ unsigned int QWinMetaFile::toDWord( short* parm )
//-----------------------------------------------------------------------------
-TQColor QWinMetaFile::color( short* parm )
+TQColor TQWinMetaFile::color( short* parm )
{
unsigned int colorRef;
int red, green, blue;
@@ -1124,7 +1124,7 @@ TQColor QWinMetaFile::color( short* parm )
//-----------------------------------------------------------------------------
-void QWinMetaFile::xyToAngle( int xStart, int yStart, int xEnd, int yEnd, int& angleStart, int& angleLength )
+void TQWinMetaFile::xyToAngle( int xStart, int yStart, int xEnd, int yEnd, int& angleStart, int& angleLength )
{
float aStart, aLength;
@@ -1138,7 +1138,7 @@ void QWinMetaFile::xyToAngle( int xStart, int yStart, int xEnd, int yEnd, int& a
//-----------------------------------------------------------------------------
-void QWinMetaFile::addHandle( WinObjHandle* handle )
+void TQWinMetaFile::addHandle( WinObjHandle* handle )
{
int idx;
@@ -1148,11 +1148,11 @@ void QWinMetaFile::addHandle( WinObjHandle* handle )
if ( idx < MAX_OBJHANDLE )
mObjHandleTab[ idx ] = handle;
else
- kdDebug() << "QWinMetaFile error: handle table full !" << endl;
+ kdDebug() << "TQWinMetaFile error: handle table full !" << endl;
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::deleteHandle( int idx )
+void TQWinMetaFile::deleteHandle( int idx )
{
if ( idx >= 0 && idx < MAX_OBJHANDLE && mObjHandleTab[ idx ] )
{
@@ -1162,25 +1162,25 @@ void QWinMetaFile::deleteHandle( int idx )
}
//-----------------------------------------------------------------------------
-Qt::RasterOp QWinMetaFile::winToQtRaster( short parm ) const
+TQt::RasterOp TQWinMetaFile::winToTQtRaster( short parm ) const
{
- static const Qt::RasterOp opTab[] =
+ static const TQt::RasterOp opTab[] =
{
- Qt::CopyROP,
- Qt::ClearROP, Qt::NandROP, Qt::NotAndROP, Qt::NotCopyROP,
- Qt::AndNotROP, Qt::NotROP, Qt::XorROP, Qt::NorROP,
- Qt::AndROP, Qt::NotXorROP, Qt::NopROP, Qt::NotOrROP,
- Qt::CopyROP, Qt::OrNotROP, Qt::OrROP, Qt::SetROP
+ TQt::CopyROP,
+ TQt::ClearROP, TQt::NandROP, TQt::NotAndROP, TQt::NotCopyROP,
+ TQt::AndNotROP, TQt::NotROP, TQt::XorROP, TQt::NorROP,
+ TQt::AndROP, TQt::NotXorROP, TQt::NopROP, TQt::NotOrROP,
+ TQt::CopyROP, TQt::OrNotROP, TQt::OrROP, TQt::SetROP
};
if ( parm > 0 && parm <= 16 )
return opTab[ parm ];
else
- return Qt::CopyROP;
+ return TQt::CopyROP;
}
//-----------------------------------------------------------------------------
-Qt::RasterOp QWinMetaFile::winToQtRaster( long parm ) const
+TQt::RasterOp TQWinMetaFile::winToTQtRaster( long parm ) const
{
/* TODO: Ternary raster operations
0x00C000CA dest = (source AND pattern)
@@ -1190,24 +1190,24 @@ Qt::RasterOp QWinMetaFile::winToQtRaster( long parm ) const
static const struct OpTab
{
long winRasterOp;
- Qt::RasterOp qtRasterOp;
+ TQt::RasterOp qtRasterOp;
} opTab[] =
{
- { 0x00CC0020, Qt::CopyROP },
- { 0x00EE0086, Qt::OrROP },
- { 0x008800C6, Qt::AndROP },
- { 0x00660046, Qt::XorROP },
- { 0x00440328, Qt::AndNotROP },
- { 0x00330008, Qt::NotCopyROP },
- { 0x001100A6, Qt::NandROP },
- { 0x00C000CA, Qt::CopyROP },
- { 0x00BB0226, Qt::NotOrROP },
- { 0x00F00021, Qt::CopyROP },
- { 0x00FB0A09, Qt::CopyROP },
- { 0x005A0049, Qt::CopyROP },
- { 0x00550009, Qt::NotROP },
- { 0x00000042, Qt::ClearROP },
- { 0x00FF0062, Qt::SetROP }
+ { 0x00CC0020, TQt::CopyROP },
+ { 0x00EE0086, TQt::OrROP },
+ { 0x008800C6, TQt::AndROP },
+ { 0x00660046, TQt::XorROP },
+ { 0x00440328, TQt::AndNotROP },
+ { 0x00330008, TQt::NotCopyROP },
+ { 0x001100A6, TQt::NandROP },
+ { 0x00C000CA, TQt::CopyROP },
+ { 0x00BB0226, TQt::NotOrROP },
+ { 0x00F00021, TQt::CopyROP },
+ { 0x00FB0A09, TQt::CopyROP },
+ { 0x005A0049, TQt::CopyROP },
+ { 0x00550009, TQt::NotROP },
+ { 0x00000042, TQt::ClearROP },
+ { 0x00FF0062, TQt::SetROP }
};
int i;
@@ -1218,11 +1218,11 @@ Qt::RasterOp QWinMetaFile::winToQtRaster( long parm ) const
if ( i < 15 )
return opTab[ i ].qtRasterOp;
else
- return Qt::CopyROP;
+ return TQt::CopyROP;
}
//-----------------------------------------------------------------------------
-bool QWinMetaFile::dibToBmp( TQImage& bmp, const char* dib, long size )
+bool TQWinMetaFile::dibToBmp( TQImage& bmp, const char* dib, long size )
{
typedef struct _BMPFILEHEADER {
WORD bmType;
@@ -1245,7 +1245,7 @@ bool QWinMetaFile::dibToBmp( TQImage& bmp, const char* dib, long size )
bmpHeader->bmSize = sizeBmp;
if ( !bmp.loadFromData( (const uchar*)bmpHeader, pattern.size(), "BMP" ) ) {
- kdDebug() << "QWinMetaFile::dibToBmp: invalid bitmap " << endl;
+ kdDebug() << "TQWinMetaFile::dibToBmp: invalid bitmap " << endl;
return false;
}
else {
diff --git a/ktnef/gui/qwmf.h b/ktnef/gui/qwmf.h
index 5717b3938..2ac861d77 100644
--- a/ktnef/gui/qwmf.h
+++ b/ktnef/gui/qwmf.h
@@ -37,21 +37,21 @@ class WinObjBrushHandle;
struct WmfPlaceableHeader;
/**
- * QWinMetaFile is a WMF viewer based on QT toolkit
- * How to use QWinMetaFile :
+ * TQWinMetaFile is a WMF viewer based on QT toolkit
+ * How to use TQWinMetaFile :
* #include "qwmf.h"
- * QWinMetaFile wmf;
+ * TQWinMetaFile wmf;
* TQPicture pic; // or TQImage pic;
* if ( wmf.load( filename )
*   wmf.paint( &pic );
*/
-class QWinMetaFile
+class TQWinMetaFile
{
public:
- QWinMetaFile();
- virtual ~QWinMetaFile();
+ TQWinMetaFile();
+ virtual ~TQWinMetaFile();
/**
* Load WMF file. Returns true on success.
@@ -60,7 +60,7 @@ public:
virtual bool load( TQBuffer &buffer );
/**
- * Paint metafile to given paint-device using absolute or relative coordinate.
+ * Paint metafile to given paint-tqdevice using absolute or relative coordinate.
* abosute coord. reset the world transfomation Matrix
* relative coord. use the existing world transfomation Matrix
* Returns true on success.
@@ -124,9 +124,9 @@ public: // should be protected but cannot
void setPixel( long num, short* parms );
// Set raster operation mode
void setRop( long num, short* parms );
- /* save device context */
+ /* save tqdevice context */
void saveDC( long num, short* parms );
- /* restore device context */
+ /* restore tqdevice context */
void restoreDC( long num, short* parms );
/* clipping region is the intersection of this region and the original region */
void intersectClipRect( long num, short* parms );
@@ -198,8 +198,8 @@ protected:
void deleteHandle( int );
/** Convert windows rasterOp in QT rasterOp */
- Qt::RasterOp winToQtRaster( short parm ) const;
- Qt::RasterOp winToQtRaster( long parm ) const;
+ TQt::RasterOp winToTQtRaster( short parm ) const;
+ TQt::RasterOp winToTQtRaster( long parm ) const;
/** Converts DIB to BMP */
bool dibToBmp( TQImage& bmp, const char* dib, long size);
diff --git a/ktnef/gui/wmfstruct.h b/ktnef/gui/wmfstruct.h
index 33a4a67c2..5e50f022e 100644
--- a/ktnef/gui/wmfstruct.h
+++ b/ktnef/gui/wmfstruct.h
@@ -43,7 +43,7 @@ struct WmfEnhMetaHeader
DWORD iType; // Record type EMR_HEADER
DWORD nSize; // Record size in bytes. This may be greater
// than the sizeof( ENHMETAHEADER ).
- RECTL rclBounds; // Inclusive-inclusive bounds in device units
+ RECTL rclBounds; // Inclusive-inclusive bounds in tqdevice units
RECTL rclFrame; // Inclusive-inclusive Picture Frame of metafile
// in .01 mm units
DWORD dSignature; // Signature. Must be ENHMETA_SIGNATURE.
@@ -58,8 +58,8 @@ struct WmfEnhMetaHeader
DWORD offDescription; // Offset to the metafile description record.
// This is 0 if there is no description string
DWORD nPalEntries; // Number of entries in the metafile palette.
- SIZEL szlDevice; // Size of the reference device in pels
- SIZEL szlMillimeters; // Size of the reference device in millimeters
+ SIZEL szlDevice; // Size of the reference tqdevice in pels
+ SIZEL szlMillimeters; // Size of the reference tqdevice in millimeters
};
#define ENHMETA_SIGNATURE 0x464D4520