summaryrefslogtreecommitdiffstats
path: root/kcontrol/kfontinst/viewpart
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/kfontinst/viewpart')
-rw-r--r--kcontrol/kfontinst/viewpart/FontPreview.cpp22
-rw-r--r--kcontrol/kfontinst/viewpart/FontPreview.h24
-rw-r--r--kcontrol/kfontinst/viewpart/FontViewPart.cpp86
-rw-r--r--kcontrol/kfontinst/viewpart/FontViewPart.h8
-rw-r--r--kcontrol/kfontinst/viewpart/FontViewPartFactory.cpp6
-rw-r--r--kcontrol/kfontinst/viewpart/FontViewPartFactory.h2
-rw-r--r--kcontrol/kfontinst/viewpart/FontViewerApp.cpp10
-rw-r--r--kcontrol/kfontinst/viewpart/KfiPrint.cpp30
-rw-r--r--kcontrol/kfontinst/viewpart/KfiPrint.h4
9 files changed, 96 insertions, 96 deletions
diff --git a/kcontrol/kfontinst/viewpart/FontPreview.cpp b/kcontrol/kfontinst/viewpart/FontPreview.cpp
index ddd8171cb..3679be252 100644
--- a/kcontrol/kfontinst/viewpart/FontPreview.cpp
+++ b/kcontrol/kfontinst/viewpart/FontPreview.cpp
@@ -29,15 +29,15 @@
#include "FontPreview.h"
#include <kapplication.h>
#include <klocale.h>
-#include <qpainter.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqimage.h>
#include <stdlib.h>
namespace KFI
{
-CFontPreview::CFontPreview(QWidget *parent, const char *name)
- : QWidget(parent, name),
+CFontPreview::CFontPreview(TQWidget *parent, const char *name)
+ : TQWidget(parent, name),
itsCurrentFace(1),
itsLastWidth(0),
itsLastHeight(0),
@@ -71,7 +71,7 @@ void CFontPreview::showFont()
}
else
{
- QPixmap nullPix;
+ TQPixmap nullPix;
setEraseColor(itsBgndCol);
itsPixmap=nullPix;
@@ -80,9 +80,9 @@ void CFontPreview::showFont()
}
}
-void CFontPreview::paintEvent(QPaintEvent *)
+void CFontPreview::paintEvent(TQPaintEvent *)
{
- QPainter paint(this);
+ TQPainter paint(this);
if(itsPixmap.isNull())
{
@@ -103,14 +103,14 @@ void CFontPreview::paintEvent(QPaintEvent *)
}
}
-QSize CFontPreview::sizeHint() const
+TQSize CFontPreview::sizeHint() const
{
- return QSize(132, 132);
+ return TQSize(132, 132);
}
-QSize CFontPreview::minimumSizeHint() const
+TQSize CFontPreview::minimumSizeHint() const
{
- return QSize(32, 32);
+ return TQSize(32, 32);
}
}
diff --git a/kcontrol/kfontinst/viewpart/FontPreview.h b/kcontrol/kfontinst/viewpart/FontPreview.h
index 673adeb2d..a57e9b9c9 100644
--- a/kcontrol/kfontinst/viewpart/FontPreview.h
+++ b/kcontrol/kfontinst/viewpart/FontPreview.h
@@ -29,11 +29,11 @@
// (C) Craig Drummond, 2001, 2002, 2003, 2004
////////////////////////////////////////////////////////////////////////////////
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qsize.h>
-#include <qwidget.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqsize.h>
+#include <tqwidget.h>
+#include <tqcolor.h>
#include <kurl.h>
#include "FcEngine.h"
@@ -46,12 +46,12 @@ class CFontPreview : public QWidget
public:
- CFontPreview(QWidget *parent, const char *name=NULL);
+ CFontPreview(TQWidget *parent, const char *name=NULL);
virtual ~CFontPreview() {}
- void paintEvent(QPaintEvent *);
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
+ void paintEvent(TQPaintEvent *);
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
void showFont(const KURL &url);
void showFont();
@@ -69,13 +69,13 @@ class CFontPreview : public QWidget
private:
CFcEngine itsEngine;
- QPixmap itsPixmap;
+ TQPixmap itsPixmap;
KURL itsCurrentUrl;
int itsCurrentFace,
itsLastWidth,
itsLastHeight;
- QColor itsBgndCol;
- QString itsFontName;
+ TQColor itsBgndCol;
+ TQString itsFontName;
};
}
diff --git a/kcontrol/kfontinst/viewpart/FontViewPart.cpp b/kcontrol/kfontinst/viewpart/FontViewPart.cpp
index aaa3bc5ff..14bda4024 100644
--- a/kcontrol/kfontinst/viewpart/FontViewPart.cpp
+++ b/kcontrol/kfontinst/viewpart/FontViewPart.cpp
@@ -32,18 +32,18 @@
#include "KfiConstants.h"
#include "KfiPrint.h"
#include <klocale.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qframe.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qvalidator.h>
-#include <qregexp.h>
-#include <qsettings.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqframe.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqvalidator.h>
+#include <tqregexp.h>
+#include <tqsettings.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kio/netaccess.h>
#include <kinstance.h>
#include <kmessagebox.h>
@@ -58,40 +58,40 @@
static KURL getDest(const KURL &url, bool system)
{
return KURL(KFI::Misc::root()
- ? QString("fonts:/") + url.fileName()
- : QString("fonts:/") + QString(system ? i18n(KFI_KIO_FONTS_SYS) : i18n(KFI_KIO_FONTS_USER))
- + QChar('/') + url.fileName());
+ ? TQString("fonts:/") + url.fileName()
+ : TQString("fonts:/") + TQString(system ? i18n(KFI_KIO_FONTS_SYS) : i18n(KFI_KIO_FONTS_USER))
+ + TQChar('/') + url.fileName());
}
namespace KFI
{
-CFontViewPart::CFontViewPart(QWidget *parent, const char *name)
+CFontViewPart::CFontViewPart(TQWidget *parent, const char *name)
{
bool kcm=0==strcmp(name, "kcmfontinst");
- itsFrame=new QFrame(parent, "frame");
+ itsFrame=new TQFrame(parent, "frame");
- QFrame *previewFrame=new QFrame(itsFrame);
+ TQFrame *previewFrame=new TQFrame(itsFrame);
- itsToolsFrame=new QFrame(itsFrame);
+ itsToolsFrame=new TQFrame(itsFrame);
- QVBoxLayout *layout=new QVBoxLayout(itsFrame, kcm ? 0 : KDialog::marginHint(), kcm ? 0 : KDialog::spacingHint());
- QGridLayout *previewLayout=new QGridLayout(previewFrame, 1, 1, 1, 1);
- QHBoxLayout *toolsLayout=new QHBoxLayout(itsToolsFrame, 0, KDialog::spacingHint());
+ TQVBoxLayout *layout=new TQVBoxLayout(itsFrame, kcm ? 0 : KDialog::marginHint(), kcm ? 0 : KDialog::spacingHint());
+ TQGridLayout *previewLayout=new TQGridLayout(previewFrame, 1, 1, 1, 1);
+ TQHBoxLayout *toolsLayout=new TQHBoxLayout(itsToolsFrame, 0, KDialog::spacingHint());
- itsFrame->setFrameShape(QFrame::NoFrame);
- itsFrame->setFocusPolicy(QWidget::ClickFocus);
- itsToolsFrame->setFrameShape(QFrame::NoFrame);
- previewFrame->setFrameShadow(kcm ? QFrame::Sunken : QFrame::Raised);
- previewFrame->setFrameShape(QFrame::Panel);
+ itsFrame->setFrameShape(TQFrame::NoFrame);
+ itsFrame->setFocusPolicy(TQWidget::ClickFocus);
+ itsToolsFrame->setFrameShape(TQFrame::NoFrame);
+ previewFrame->setFrameShadow(kcm ? TQFrame::Sunken : TQFrame::Raised);
+ previewFrame->setFrameShape(TQFrame::Panel);
setInstance(new KInstance("kfontview"));
itsPreview=new CFontPreview(previewFrame, "FontViewPart::Preview");
- itsPreview->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
- itsFaceLabel=new QLabel(i18n("Face:"), itsToolsFrame);
+ itsPreview->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ itsFaceLabel=new TQLabel(i18n("Face:"), itsToolsFrame);
itsFaceSelector=new KIntNumInput(1, itsToolsFrame);
- itsInstallButton=new QPushButton(i18n("Install..."), itsToolsFrame, "button");
+ itsInstallButton=new TQPushButton(i18n("Install..."), itsToolsFrame, "button");
itsInstallButton->hide();
previewLayout->addWidget(itsPreview, 0, 0);
layout->addWidget(previewFrame);
@@ -100,17 +100,17 @@ CFontViewPart::CFontViewPart(QWidget *parent, const char *name)
toolsLayout->addWidget(itsFaceSelector);
itsFaceLabel->hide();
itsFaceSelector->hide();
- toolsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum));
+ toolsLayout->addItem(new TQSpacerItem(5, 5, TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum));
toolsLayout->addWidget(itsInstallButton);
itsToolsFrame->hide();
- connect(itsPreview, SIGNAL(status(bool)), SLOT(previewStatus(bool)));
- connect(itsInstallButton, SIGNAL(clicked()), SLOT(install()));
- connect(itsFaceSelector, SIGNAL(valueChanged(int)), itsPreview, SLOT(showFace(int)));
+ connect(itsPreview, TQT_SIGNAL(status(bool)), TQT_SLOT(previewStatus(bool)));
+ connect(itsInstallButton, TQT_SIGNAL(clicked()), TQT_SLOT(install()));
+ connect(itsFaceSelector, TQT_SIGNAL(valueChanged(int)), itsPreview, TQT_SLOT(showFace(int)));
itsChangeTextAction=new KAction(i18n("Change Text..."), "text", KShortcut(),
- this, SLOT(changeText()), actionCollection(), "changeText");
+ this, TQT_SLOT(changeText()), actionCollection(), "changeText");
itsChangeTextAction->setEnabled(false);
- itsPrintAction=KStdAction::print(this, SLOT(print()), actionCollection(), "print");
+ itsPrintAction=KStdAction::print(this, TQT_SLOT(print()), actionCollection(), "print");
itsPrintAction->setEnabled(false);
setXMLFile("kfontviewpart.rc");
@@ -143,7 +143,7 @@ bool CFontViewPart::openFile()
{
// NOTE: Cant do the real open here, as dont seem to be able to use KIO::NetAccess functions during initial start-up.
// Bug report 111535 indicates that calling "konqueror <font>" crashes.
- QTimer::singleShot(0, this, SLOT(timeout()));
+ TQTimer::singleShot(0, this, TQT_SLOT(timeout()));
return true;
}
@@ -164,17 +164,17 @@ void CFontViewPart::timeout()
// Not from fonts:/, so try to see if font is already installed...
if(Misc::root())
{
- destUrl=QString("fonts:/")+itsPreview->engine().getName(m_url);
+ destUrl=TQString("fonts:/")+itsPreview->engine().getName(m_url);
itsShowInstallButton=!KIO::NetAccess::exists(destUrl, true, itsFrame->parentWidget());
}
else
{
- destUrl=QString("fonts:/")+i18n(KFI_KIO_FONTS_SYS)+QChar('/')+itsPreview->engine().getName(m_url);
+ destUrl=TQString("fonts:/")+i18n(KFI_KIO_FONTS_SYS)+TQChar('/')+itsPreview->engine().getName(m_url);
if(KIO::NetAccess::exists(destUrl, true, itsFrame->parentWidget()))
itsShowInstallButton=false;
else
{
- destUrl=QString("fonts:/")+i18n(KFI_KIO_FONTS_USER)+QChar('/')+itsPreview->engine().getName(m_url);
+ destUrl=TQString("fonts:/")+i18n(KFI_KIO_FONTS_USER)+TQChar('/')+itsPreview->engine().getName(m_url);
itsShowInstallButton=!KIO::NetAccess::exists(destUrl, true, itsFrame->parentWidget());
}
}
@@ -255,8 +255,8 @@ void CFontViewPart::install()
void CFontViewPart::changeText()
{
bool status;
- QRegExpValidator validator(QRegExp(".*"), 0L);
- QString oldStr(itsPreview->engine().getPreviewString()),
+ TQRegExpValidator validator(TQRegExp(".*"), 0L);
+ TQString oldStr(itsPreview->engine().getPreviewString()),
newStr(KInputDialog::getText(i18n("Preview String"), i18n("Please enter new string:"),
oldStr, &status, itsFrame,
"preview string dialog", &validator));
@@ -270,7 +270,7 @@ void CFontViewPart::changeText()
void CFontViewPart::print()
{
- QStringList items;
+ TQStringList items;
items.append(itsPreview->engine().getName(m_url));
diff --git a/kcontrol/kfontinst/viewpart/FontViewPart.h b/kcontrol/kfontinst/viewpart/FontViewPart.h
index 7ffdbb8f4..565ac3b7a 100644
--- a/kcontrol/kfontinst/viewpart/FontViewPart.h
+++ b/kcontrol/kfontinst/viewpart/FontViewPart.h
@@ -49,7 +49,7 @@ class CFontViewPart : public KParts::ReadOnlyPart
public:
- CFontViewPart(QWidget *parent=0, const char *name=0);
+ CFontViewPart(TQWidget *parent=0, const char *name=0);
virtual ~CFontViewPart() {}
bool openURL(const KURL &url);
@@ -69,10 +69,10 @@ class CFontViewPart : public KParts::ReadOnlyPart
private:
CFontPreview *itsPreview;
- QPushButton *itsInstallButton;
- QFrame *itsFrame,
+ TQPushButton *itsInstallButton;
+ TQFrame *itsFrame,
*itsToolsFrame;
- QLabel *itsFaceLabel;
+ TQLabel *itsFaceLabel;
KIntNumInput *itsFaceSelector;
KAction *itsChangeTextAction,
*itsPrintAction;
diff --git a/kcontrol/kfontinst/viewpart/FontViewPartFactory.cpp b/kcontrol/kfontinst/viewpart/FontViewPartFactory.cpp
index 52783c1a7..dd695a033 100644
--- a/kcontrol/kfontinst/viewpart/FontViewPartFactory.cpp
+++ b/kcontrol/kfontinst/viewpart/FontViewPartFactory.cpp
@@ -60,15 +60,15 @@ CFontViewPartFactory::~CFontViewPartFactory()
theirInstance=0L;
}
-QObject * CFontViewPartFactory::createObject(QObject *parent, const char *name, const char *, const QStringList &)
+TQObject * CFontViewPartFactory::createObject(TQObject *parent, const char *name, const char *, const TQStringList &)
{
if(parent && !parent->isWidgetType())
{
- kdDebug() << "CFontViewPartFactory: parent does not inherit QWidget" << endl;
+ kdDebug() << "CFontViewPartFactory: parent does not inherit TQWidget" << endl;
return 0L;
}
- return new CFontViewPart((QWidget*) parent, name);
+ return new CFontViewPart((TQWidget*) parent, name);
}
KInstance* CFontViewPartFactory::instance()
diff --git a/kcontrol/kfontinst/viewpart/FontViewPartFactory.h b/kcontrol/kfontinst/viewpart/FontViewPartFactory.h
index 777d07ebe..d5999d8b0 100644
--- a/kcontrol/kfontinst/viewpart/FontViewPartFactory.h
+++ b/kcontrol/kfontinst/viewpart/FontViewPartFactory.h
@@ -45,7 +45,7 @@ class CFontViewPartFactory : public KLibFactory
CFontViewPartFactory();
virtual ~CFontViewPartFactory();
- virtual QObject *createObject(QObject *parent = 0, const char *name = 0, const char *classname = "QObject", const QStringList &args = QStringList());
+ virtual TQObject *createObject(TQObject *parent = 0, const char *name = 0, const char *classname = "TQObject", const TQStringList &args = TQStringList());
static KInstance * instance();
diff --git a/kcontrol/kfontinst/viewpart/FontViewerApp.cpp b/kcontrol/kfontinst/viewpart/FontViewerApp.cpp
index 5ed5cf455..56540171e 100644
--- a/kcontrol/kfontinst/viewpart/FontViewerApp.cpp
+++ b/kcontrol/kfontinst/viewpart/FontViewerApp.cpp
@@ -43,14 +43,14 @@ namespace KFI
{
CFontViewerAppMainWindow::CFontViewerAppMainWindow()
- : KParts::MainWindow((QWidget *)0L)
+ : KParts::MainWindow((TQWidget *)0L)
{
KLibFactory *factory=KLibLoader::self()->factory("libkfontviewpart");
if(factory)
{
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
itsPreview=(KParts::ReadOnlyPart *)factory->create(this, "fontvier", "KParts::ReadOnlyPart");
@@ -71,7 +71,7 @@ CFontViewerAppMainWindow::CFontViewerAppMainWindow()
if(!openURL.isEmpty())
itsPreview->openURL(openURL);
- QSize defSize(450, 380);
+ TQSize defSize(450, 380);
KConfigGroupSaver saver(kapp->config(), CFG_GROUP);
resize(kapp->config()->readSizeEntry(CFG_SIZE_KEY, &defSize));
@@ -90,7 +90,7 @@ CFontViewerAppMainWindow::~CFontViewerAppMainWindow()
void CFontViewerAppMainWindow::fileOpen()
{
- KURL url(KFileDialog::getOpenURL(QString::null, "application/x-font-ttf application/x-font-otf "
+ KURL url(KFileDialog::getOpenURL(TQString::null, "application/x-font-ttf application/x-font-otf "
"application/x-font-ttc application/x-font-type1 "
"application/x-font-bdf application/x-font-pcf ",
this, i18n("Select Font to View")));
diff --git a/kcontrol/kfontinst/viewpart/KfiPrint.cpp b/kcontrol/kfontinst/viewpart/KfiPrint.cpp
index 02366922a..5e2d9deeb 100644
--- a/kcontrol/kfontinst/viewpart/KfiPrint.cpp
+++ b/kcontrol/kfontinst/viewpart/KfiPrint.cpp
@@ -28,13 +28,13 @@
#include "KfiPrint.h"
#include "FcEngine.h"
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qsettings.h>
-#include <qstringlist.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqsettings.h>
+#include <tqstringlist.h>
#include <kprinter.h>
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#ifdef HAVE_LOCALE_H
#include <locale.h>
#endif
@@ -70,13 +70,13 @@ static bool sufficientSpace(int y, int titleFontHeight, const int *sizes, int pa
return (y+required)<pageHeight;
}
-bool printable(const QString &mime)
+bool printable(const TQString &mime)
{
return "application/x-font-type1"==mime || "application/x-font-ttf"==mime || "application/x-font-otf"==mime ||
"application/x-font-ttc"==mime || "application/x-font-ghostscript"==mime;
}
-void printItems(const QStringList &items, int size, QWidget *parent, CFcEngine &engine)
+void printItems(const TQStringList &items, int size, TQWidget *parent, CFcEngine &engine)
{
#ifdef HAVE_LOCALE_H
char *oldLocale=setlocale(LC_NUMERIC, "C"),
@@ -88,13 +88,13 @@ void printItems(const QStringList &items, int size, QWidget *parent, CFcEngine &
if(printer.setup(parent))
{
- QPainter painter;
- QFont sans("sans", 12, QFont::Bold);
- QSettings settings;
+ TQPainter painter;
+ TQFont sans("sans", 12, TQFont::Bold);
+ TQSettings settings;
bool entryExists,
embedFonts,
set=false;
- QString str(engine.getPreviewString());
+ TQString str(engine.getPreviewString());
//
// Cehck whether the user has enabled font embedding...
@@ -107,7 +107,7 @@ void printItems(const QStringList &items, int size, QWidget *parent, CFcEngine &
printer.setResolution(72);
painter.begin(&printer);
- QPaintDeviceMetrics metrics(painter.device());
+ TQPaintDeviceMetrics metrics(painter.device());
int margin=(int)((2/2.54)*metrics.logicalDpiY()), // 2 cm margins
pageWidth=metrics.width()-(2*margin),
pageHeight=metrics.height()-(2*margin),
@@ -122,7 +122,7 @@ void printItems(const QStringList &items, int size, QWidget *parent, CFcEngine &
painter.setClipping(true);
painter.setClipRect(margin, margin, pageWidth, pageHeight);
- QStringList::ConstIterator it(items.begin()),
+ TQStringList::ConstIterator it(items.begin()),
end(items.end());
for(; it!=end; ++it)
@@ -130,7 +130,7 @@ void printItems(const QStringList &items, int size, QWidget *parent, CFcEngine &
unsigned int s=0;
painter.setFont(sans);
- QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput, 0);
+ TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 0);
if(!firstFont && !sufficientSpace(y, painter.fontMetrics().height(), sizes, pageHeight, size))
{
diff --git a/kcontrol/kfontinst/viewpart/KfiPrint.h b/kcontrol/kfontinst/viewpart/KfiPrint.h
index 5b927a57a..01889273a 100644
--- a/kcontrol/kfontinst/viewpart/KfiPrint.h
+++ b/kcontrol/kfontinst/viewpart/KfiPrint.h
@@ -40,8 +40,8 @@ class CFcEngine;
namespace Print
{
-extern void printItems(const QStringList &items, int size, QWidget *parent, CFcEngine &engine);
-extern bool printable(const QString &mime);
+extern void printItems(const TQStringList &items, int size, TQWidget *parent, CFcEngine &engine);
+extern bool printable(const TQString &mime);
}
}