summaryrefslogtreecommitdiffstats
path: root/kcontrol/kfontinst
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kcontrol/kfontinst
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/kfontinst')
-rw-r--r--kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp138
-rw-r--r--kcontrol/kfontinst/kcmfontinst/KCmFontInst.h14
-rw-r--r--kcontrol/kfontinst/kcmfontinst/KFileFontIconView.cpp16
-rw-r--r--kcontrol/kfontinst/kcmfontinst/KFileFontIconView.h10
-rw-r--r--kcontrol/kfontinst/kcmfontinst/KFileFontView.cpp136
-rw-r--r--kcontrol/kfontinst/kcmfontinst/KFileFontView.h60
-rw-r--r--kcontrol/kfontinst/kcmfontinst/PrintDialog.cpp24
-rw-r--r--kcontrol/kfontinst/kcmfontinst/PrintDialog.h6
-rw-r--r--kcontrol/kfontinst/kcmfontinst/SettingsDialog.cpp26
-rw-r--r--kcontrol/kfontinst/kcmfontinst/SettingsDialog.h4
-rw-r--r--kcontrol/kfontinst/kfile-plugin/KFileFont.cpp42
-rw-r--r--kcontrol/kfontinst/kfile-plugin/KFileFont.h2
-rw-r--r--kcontrol/kfontinst/kfontinst/FontEngine.cpp26
-rw-r--r--kcontrol/kfontinst/kfontinst/FontEngine.h18
-rw-r--r--kcontrol/kfontinst/kfontinst/Fontmap.cpp102
-rw-r--r--kcontrol/kfontinst/kfontinst/Fontmap.h24
-rw-r--r--kcontrol/kfontinst/kfontinst/Main.cpp16
-rw-r--r--kcontrol/kfontinst/kfontinst/XConfig.cpp44
-rw-r--r--kcontrol/kfontinst/kfontinst/XConfig.h24
-rw-r--r--kcontrol/kfontinst/kio/KioFonts.cpp396
-rw-r--r--kcontrol/kfontinst/kio/KioFonts.h50
-rw-r--r--kcontrol/kfontinst/lib/FcEngine.cpp158
-rw-r--r--kcontrol/kfontinst/lib/FcEngine.h52
-rw-r--r--kcontrol/kfontinst/lib/Misc.cpp48
-rw-r--r--kcontrol/kfontinst/lib/Misc.h40
-rw-r--r--kcontrol/kfontinst/thumbnail/FontThumbnail.cpp10
-rw-r--r--kcontrol/kfontinst/thumbnail/FontThumbnail.h2
-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
36 files changed, 840 insertions, 840 deletions
diff --git a/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp b/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp
index 4a6b0b3ee..c525cd337 100644
--- a/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp
+++ b/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp
@@ -34,11 +34,11 @@
#include "KfiPrint.h"
#include "FcEngine.h"
#endif
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qsettings.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqsettings.h>
#include <kaboutdata.h>
#include <kgenericfactory.h>
#include <kdiroperator.h>
@@ -59,7 +59,7 @@
#include <kdirlister.h>
#include <kpushbutton.h>
#include <kguiitem.h>
-#include <qsplitter.h>
+#include <tqsplitter.h>
#define CFG_GROUP "Main Settings"
#define CFG_LISTVIEW "ListView"
@@ -68,13 +68,13 @@
#define CFG_SHOW_BITMAP "ShowBitmap"
#define CFG_FONT_SIZE "FontSize"
-typedef KGenericFactory<KFI::CKCmFontInst, QWidget> FontInstallFactory;
+typedef KGenericFactory<KFI::CKCmFontInst, TQWidget> FontInstallFactory;
K_EXPORT_COMPONENT_FACTORY(kcm_fontinst, FontInstallFactory("kcmfontinst"))
namespace KFI
{
-CKCmFontInst::CKCmFontInst(QWidget *parent, const char *, const QStringList&)
+CKCmFontInst::CKCmFontInst(TQWidget *parent, const char *, const TQStringList&)
: KCModule(parent, "kfontinst"),
#ifdef HAVE_XFT
itsPreview(NULL),
@@ -97,25 +97,25 @@ CKCmFontInst::CKCmFontInst(QWidget *parent, const char *, const QStringList&)
itsEmbeddedAdmin=Misc::root() && (NULL==appName || strcmp("kcontrol", appName) &&
KCmdLineArgs::parsedArgs()->isSet("embed"));
- itsStatusLabel = new QLabel(this);
- itsStatusLabel->setFrameShape(QFrame::Panel);
- itsStatusLabel->setFrameShadow(QFrame::Sunken);
+ itsStatusLabel = new TQLabel(this);
+ itsStatusLabel->setFrameShape(TQFrame::Panel);
+ itsStatusLabel->setFrameShadow(TQFrame::Sunken);
itsStatusLabel->setLineWidth(1);
itsConfig.setGroup(CFG_GROUP);
- QFrame *fontsFrame;
+ TQFrame *fontsFrame;
#ifdef HAVE_XFT
KLibFactory *factory=KLibLoader::self()->factory("libkfontviewpart");
if(factory)
{
- itsSplitter=new QSplitter(this);
- fontsFrame=new QFrame(itsSplitter),
+ itsSplitter=new TQSplitter(this);
+ fontsFrame=new TQFrame(itsSplitter),
itsPreview=(KParts::ReadOnlyPart *)factory->create(itsSplitter, "kcmfontinst", "KParts::ReadOnlyPart");
- itsSplitter->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ itsSplitter->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
- QValueList<int> sizes(itsConfig.readIntListEntry(CFG_SPLITTER_SIZES));
+ TQValueList<int> sizes(itsConfig.readIntListEntry(CFG_SPLITTER_SIZES));
if(2!=sizes.count())
{
@@ -128,37 +128,37 @@ CKCmFontInst::CKCmFontInst(QWidget *parent, const char *, const QStringList&)
else
{
#endif
- fontsFrame=new QFrame(this);
- fontsFrame->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ fontsFrame=new TQFrame(this);
+ fontsFrame->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
#ifdef HAVE_XFT
}
#endif
- QGridLayout *fontsLayout=new QGridLayout(fontsFrame, 1, 1, 0, 1);
- QVBoxLayout *layout=new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQGridLayout *fontsLayout=new TQGridLayout(fontsFrame, 1, 1, 0, 1);
+ TQVBoxLayout *layout=new TQVBoxLayout(this, 0, KDialog::spacingHint());
KToolBar *toolbar=new KToolBar(this);
bool showBitmap(itsConfig.readBoolEntry(CFG_SHOW_BITMAP, false));
fontsFrame->setLineWidth(0);
- toolbar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
+ toolbar->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum);
toolbar->setMovingEnabled(false);
- QString previousPath=itsConfig.readEntry(CFG_PATH);
+ TQString previousPath=itsConfig.readEntry(CFG_PATH);
- itsDirOp = new KDirOperator(Misc::root() ? QString("fonts:/") : QString("fonts:/")+i18n(KFI_KIO_FONTS_USER),
+ itsDirOp = new KDirOperator(Misc::root() ? TQString("fonts:/") : TQString("fonts:/")+i18n(KFI_KIO_FONTS_USER),
fontsFrame);
itsDirOp->setViewConfig(&itsConfig, "ListView Settings");
- itsDirOp->setMinimumSize(QSize(96, 64));
+ itsDirOp->setMinimumSize(TQSize(96, 64));
setMimeTypes(showBitmap);
itsDirOp->dirLister()->setMainWindow(this);
- itsDirOp->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ itsDirOp->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
fontsLayout->addMultiCellWidget(itsDirOp, 0, 0, 0, 1);
KPushButton *button=new KPushButton(KGuiItem(i18n("Add Fonts..."), "newfont"), fontsFrame);
- connect(button, SIGNAL(clicked()), SLOT(addFonts()));
- button->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(addFonts()));
+ button->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
fontsLayout->addWidget(button, 1, 0);
- fontsLayout->addItem(new QSpacerItem(4, 4, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ fontsLayout->addItem(new TQSpacerItem(4, 4, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
layout->addWidget(toolbar);
#ifdef HAVE_XFT
@@ -181,15 +181,15 @@ CKCmFontInst::CKCmFontInst(QWidget *parent, const char *, const QStringList&)
itsViewMenuAct=dynamic_cast<KActionMenu *>(itsDirOp->actionCollection()->action("view menu"));
topMnu->popupMenu()->clear();
- connect(topMnu->popupMenu(), SIGNAL(aboutToShow()), SLOT(setupMenu()));
+ connect(topMnu->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(setupMenu()));
if((act=itsDirOp->actionCollection()->action("up")))
- act->disconnect(SIGNAL(activated()), itsDirOp, SLOT(cdUp()));
+ act->disconnect(TQT_SIGNAL(activated()), itsDirOp, TQT_SLOT(cdUp()));
if((act=itsDirOp->actionCollection()->action("home")))
- act->disconnect(SIGNAL(activated()), itsDirOp, SLOT(home()));
+ act->disconnect(TQT_SIGNAL(activated()), itsDirOp, TQT_SLOT(home()));
if((act=itsDirOp->actionCollection()->action("back")))
- act->disconnect(SIGNAL(activated()), itsDirOp, SLOT(back()));
+ act->disconnect(TQT_SIGNAL(activated()), itsDirOp, TQT_SLOT(back()));
if((act=itsDirOp->actionCollection()->action("forward")))
- act->disconnect(SIGNAL(activated()), itsDirOp, SLOT(forward()));
+ act->disconnect(TQT_SIGNAL(activated()), itsDirOp, TQT_SLOT(forward()));
if((act=itsDirOp->actionCollection()->action("reload")))
act->plug(toolbar);
@@ -198,26 +198,26 @@ CKCmFontInst::CKCmFontInst(QWidget *parent, const char *, const QStringList&)
if((itsIconAct=dynamic_cast<KRadioAction *>(itsDirOp->actionCollection()->action("short view"))))
{
- disconnect(itsIconAct, SIGNAL(activated()), itsDirOp, SLOT(slotSimpleView()));
- connect(itsIconAct, SIGNAL(activated()), SLOT(iconView()));
+ disconnect(itsIconAct, TQT_SIGNAL(activated()), itsDirOp, TQT_SLOT(slotSimpleView()));
+ connect(itsIconAct, TQT_SIGNAL(activated()), TQT_SLOT(iconView()));
itsIconAct->plug(toolbar);
}
if((itsListAct=dynamic_cast<KRadioAction *>(itsDirOp->actionCollection()->action("detailed view"))))
{
- disconnect(itsListAct, SIGNAL(activated()), itsDirOp, SLOT(slotDetailedView()));
- connect(itsListAct, SIGNAL(activated()), SLOT(listView()));
+ disconnect(itsListAct, TQT_SIGNAL(activated()), itsDirOp, TQT_SLOT(slotDetailedView()));
+ connect(itsListAct, TQT_SIGNAL(activated()), TQT_SLOT(listView()));
itsListAct->plug(toolbar);
}
- itsShowBitmapAct=new KToggleAction(i18n("Show Bitmap Fonts"), "font_bitmap", 0, this, SLOT(filterFonts()),
+ itsShowBitmapAct=new KToggleAction(i18n("Show Bitmap Fonts"), "font_bitmap", 0, this, TQT_SLOT(filterFonts()),
itsDirOp->actionCollection(), "showbitmap");
itsShowBitmapAct->setChecked(showBitmap);
itsShowBitmapAct->plug(toolbar);
toolbar->insertLineSeparator();
- act=new KAction(i18n("Add Fonts..."), "newfont", 0, this, SLOT(addFonts()), itsDirOp->actionCollection(), "addfonts");
+ act=new KAction(i18n("Add Fonts..."), "newfont", 0, this, TQT_SLOT(addFonts()), itsDirOp->actionCollection(), "addfonts");
act->plug(toolbar);
topMnu->insert(act);
@@ -226,24 +226,24 @@ CKCmFontInst::CKCmFontInst(QWidget *parent, const char *, const QStringList&)
itsDeleteAct->plug(toolbar);
itsDeleteAct->setEnabled(false);
topMnu->insert(itsDeleteAct);
- disconnect(itsDeleteAct, SIGNAL(activated()), itsDirOp, SLOT(deleteSelected()));
- connect(itsDeleteAct, SIGNAL(activated()), this, SLOT(removeFonts()));
+ disconnect(itsDeleteAct, TQT_SIGNAL(activated()), itsDirOp, TQT_SLOT(deleteSelected()));
+ connect(itsDeleteAct, TQT_SIGNAL(activated()), this, TQT_SLOT(removeFonts()));
}
toolbar->insertLineSeparator();
- act=new KAction(i18n("Configure..."), "configure", 0, this, SLOT(configure()), itsDirOp->actionCollection(), "configure");
+ act=new KAction(i18n("Configure..."), "configure", 0, this, TQT_SLOT(configure()), itsDirOp->actionCollection(), "configure");
act->plug(toolbar);
#ifdef HAVE_XFT
toolbar->insertLineSeparator();
- act=new KAction(i18n("Print..."), "fileprint", 0, this, SLOT(print()), itsDirOp->actionCollection(), "print");
+ act=new KAction(i18n("Print..."), "fileprint", 0, this, TQT_SLOT(print()), itsDirOp->actionCollection(), "print");
act->plug(toolbar);
#endif
if( (itsSepDirsAct=itsDirOp->actionCollection()->action("separate dirs")) &&
(itsShowHiddenAct=itsDirOp->actionCollection()->action("show hidden")))
{
- //disconnect(itsViewMenuAct->popupMenu(), SIGNAL(aboutToShow()), itsDirOp, SLOT(insertViewDependentActions()));
- connect(itsViewMenuAct->popupMenu(), SIGNAL(aboutToShow()), SLOT(setupViewMenu()));
+ //disconnect(itsViewMenuAct->popupMenu(), TQT_SIGNAL(aboutToShow()), itsDirOp, TQT_SLOT(insertViewDependentActions()));
+ connect(itsViewMenuAct->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(setupViewMenu()));
setupViewMenu();
}
@@ -266,12 +266,12 @@ CKCmFontInst::CKCmFontInst(QWidget *parent, const char *, const QStringList&)
itsDirOp->dirLister()->setShowingDotFiles(true);
- connect(itsDirOp, SIGNAL(fileHighlighted(const KFileItem *)), SLOT(fileHighlighted(const KFileItem *)));
- connect(itsDirOp, SIGNAL(finishedLoading()), SLOT(loadingFinished()));
- connect(itsDirOp, SIGNAL(dropped(const KFileItem *, QDropEvent *, const KURL::List &)),
- SLOT(dropped(const KFileItem *, QDropEvent *, const KURL::List &)));
- connect(itsDirOp->dirLister(), SIGNAL(infoMessage(const QString &)), SLOT(infoMessage(const QString &)));
- connect(itsDirOp, SIGNAL(updateInformation(int, int)), SLOT(updateInformation(int, int)));
+ connect(itsDirOp, TQT_SIGNAL(fileHighlighted(const KFileItem *)), TQT_SLOT(fileHighlighted(const KFileItem *)));
+ connect(itsDirOp, TQT_SIGNAL(finishedLoading()), TQT_SLOT(loadingFinished()));
+ connect(itsDirOp, TQT_SIGNAL(dropped(const KFileItem *, TQDropEvent *, const KURL::List &)),
+ TQT_SLOT(dropped(const KFileItem *, TQDropEvent *, const KURL::List &)));
+ connect(itsDirOp->dirLister(), TQT_SIGNAL(infoMessage(const TQString &)), TQT_SLOT(infoMessage(const TQString &)));
+ connect(itsDirOp, TQT_SIGNAL(updateInformation(int, int)), TQT_SLOT(updateInformation(int, int)));
}
CKCmFontInst::~CKCmFontInst()
@@ -288,7 +288,7 @@ CKCmFontInst::~CKCmFontInst()
void CKCmFontInst::setMimeTypes(bool showBitmap)
{
- QStringList mimeTypes;
+ TQStringList mimeTypes;
mimeTypes << "application/x-font-ttf"
<< "application/x-font-otf"
@@ -311,7 +311,7 @@ void CKCmFontInst::filterFonts()
itsConfig.sync();
}
-QString CKCmFontInst::quickHelp() const
+TQString CKCmFontInst::quickHelp() const
{
return Misc::root()
? i18n("<h1>Font Installer</h1><p> This module allows you to"
@@ -398,13 +398,13 @@ void CKCmFontInst::fileHighlighted(const KFileItem *item)
void CKCmFontInst::loadingFinished()
{
- QListView *lView=dynamic_cast<QListView *>(itsDirOp->view());
+ TQListView *lView=dynamic_cast<TQListView *>(itsDirOp->view());
if(lView)
lView->sort();
else
{
- QIconView *iView=dynamic_cast<QIconView *>(itsDirOp->view());
+ TQIconView *iView=dynamic_cast<TQIconView *>(itsDirOp->view());
if(iView)
iView->sort();
@@ -414,7 +414,7 @@ void CKCmFontInst::loadingFinished()
void CKCmFontInst::addFonts()
{
- KURL::List list=KFileDialog::getOpenURLs(QString::null, "application/x-font-ttf application/x-font-otf "
+ KURL::List list=KFileDialog::getOpenURLs(TQString::null, "application/x-font-ttf application/x-font-otf "
"application/x-font-ttc application/x-font-type1 "
"application/x-font-pcf application/x-font-bdf",
//"application/x-font-snf application/x-font-speedo",
@@ -431,7 +431,7 @@ void CKCmFontInst::removeFonts()
else
{
KURL::List urls;
- QStringList files;
+ TQStringList files;
KFileItemListIterator it(*(itsDirOp->selectedItems()));
for(; it.current(); ++it)
@@ -464,7 +464,7 @@ void CKCmFontInst::removeFonts()
if(doIt)
{
KIO::DeleteJob *job = KIO::del(urls, false, true);
- connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(delResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(delResult(KIO::Job *)));
job->setWindow(this);
job->setAutoErrorHandlingEnabled(true, this);
}
@@ -508,8 +508,8 @@ void CKCmFontInst::print()
{
static const int constSizes[]={0, 12, 18, 24, 36, 48};
- QStringList items;
- QValueVector<int> sizes;
+ TQStringList items;
+ TQValueVector<int> sizes;
CFcEngine engine;
if(dlg.outputAll())
@@ -537,18 +537,18 @@ void CKCmFontInst::print()
#endif
}
-void CKCmFontInst::dropped(const KFileItem *i, QDropEvent *, const KURL::List &urls)
+void CKCmFontInst::dropped(const KFileItem *i, TQDropEvent *, const KURL::List &urls)
{
if(urls.count())
addFonts(urls, i && i->isDir() ? i->url() : itsDirOp->url());
}
-void CKCmFontInst::infoMessage(const QString &msg)
+void CKCmFontInst::infoMessage(const TQString &msg)
{
itsStatusLabel->setText(msg);
}
-static QString family(const QString &name)
+static TQString family(const TQString &name)
{
int commaPos=name.find(',');
@@ -558,8 +558,8 @@ static QString family(const QString &name)
void CKCmFontInst::updateInformation(int, int fonts)
{
KIO::filesize_t size=0;
- QString text(i18n("One Font", "%n Fonts", fonts));
- QStringList families;
+ TQString text(i18n("One Font", "%n Fonts", fonts));
+ TQStringList families;
if(fonts>0)
{
@@ -567,7 +567,7 @@ void CKCmFontInst::updateInformation(int, int fonts)
for (item=itsDirOp->view()->firstFileItem(); item; item=itsDirOp->view()->nextItem(item))
{
- QString fam(family(item->text()));
+ TQString fam(family(item->text()));
size+=item->size();
if(-1==families.findIndex(fam))
@@ -590,8 +590,8 @@ void CKCmFontInst::delResult(KIO::Job *job)
//
// To speed up font deletion, we dont rescan font list each time - so after this has completed, we need
// to refresh font list before updating the directory listing...
- QByteArray packedArgs;
- QDataStream stream(packedArgs, IO_WriteOnly);
+ TQByteArray packedArgs;
+ TQDataStream stream(packedArgs, IO_WriteOnly);
stream << KFI::SPECIAL_RESCAN;
@@ -636,7 +636,7 @@ void CKCmFontInst::addFonts(const KURL::List &src, const KURL &dest)
}
KIO::CopyJob *job=KIO::copy(copy, dest, true);
- connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(jobResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(jobResult(KIO::Job *)));
job->setWindow(this);
job->setAutoErrorHandlingEnabled(true, this);
}
diff --git a/kcontrol/kfontinst/kcmfontinst/KCmFontInst.h b/kcontrol/kfontinst/kcmfontinst/KCmFontInst.h
index add6c4c36..bbb072a2a 100644
--- a/kcontrol/kfontinst/kcmfontinst/KCmFontInst.h
+++ b/kcontrol/kfontinst/kcmfontinst/KCmFontInst.h
@@ -33,7 +33,7 @@
#include "config.h"
#endif
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kcmodule.h>
#include <kurl.h>
#include <kconfig.h>
@@ -62,7 +62,7 @@ class CKCmFontInst : public KCModule
public:
- CKCmFontInst(QWidget *parent=NULL, const char *name=NULL, const QStringList &list=QStringList());
+ CKCmFontInst(TQWidget *parent=NULL, const char *name=NULL, const TQStringList &list=TQStringList());
virtual ~CKCmFontInst();
void setMimeTypes(bool showBitmap);
@@ -70,7 +70,7 @@ class CKCmFontInst : public KCModule
public slots:
void filterFonts();
- QString quickHelp() const;
+ TQString quickHelp() const;
void listView();
void iconView();
void setupMenu();
@@ -81,8 +81,8 @@ class CKCmFontInst : public KCModule
void removeFonts();
void configure();
void print();
- void dropped(const KFileItem *i, QDropEvent *e, const KURL::List &urls);
- void infoMessage(const QString &msg);
+ void dropped(const KFileItem *i, TQDropEvent *e, const KURL::List &urls);
+ void infoMessage(const TQString &msg);
void updateInformation(int dirs, int fonts);
void delResult(KIO::Job *job);
void jobResult(KIO::Job *job);
@@ -105,10 +105,10 @@ class CKCmFontInst : public KCModule
#ifdef HAVE_XFT
KParts::ReadOnlyPart *itsPreview;
#endif
- QSplitter *itsSplitter;
+ TQSplitter *itsSplitter;
KConfig itsConfig;
bool itsEmbeddedAdmin;
- QLabel *itsStatusLabel;
+ TQLabel *itsStatusLabel;
};
}
diff --git a/kcontrol/kfontinst/kcmfontinst/KFileFontIconView.cpp b/kcontrol/kfontinst/kcmfontinst/KFileFontIconView.cpp
index d814d0c6b..241ac88bf 100644
--- a/kcontrol/kfontinst/kcmfontinst/KFileFontIconView.cpp
+++ b/kcontrol/kfontinst/kcmfontinst/KFileFontIconView.cpp
@@ -26,7 +26,7 @@
// (C) Craig Drummond, 2003, 2004
////////////////////////////////////////////////////////////////////////////////
-#include <qevent.h>
+#include <tqevent.h>
#include <kfileitem.h>
#include <kurldrag.h>
#include "KFileFontIconView.h"
@@ -35,7 +35,7 @@ namespace KFI
{
// CPD: KDE4 should make acceptDrag() virtual there fore can get rid of all these ::contentsX functions...
-void CKFileFontIconView::contentsDragEnterEvent(QDragEnterEvent *e)
+void CKFileFontIconView::contentsDragEnterEvent(TQDragEnterEvent *e)
{
if(acceptDrag(e))
KFileIconView::contentsDragEnterEvent(e);
@@ -43,7 +43,7 @@ void CKFileFontIconView::contentsDragEnterEvent(QDragEnterEvent *e)
e->ignore();
}
-void CKFileFontIconView::contentsDragMoveEvent(QDragMoveEvent *e)
+void CKFileFontIconView::contentsDragMoveEvent(TQDragMoveEvent *e)
{
if(acceptDrag(e))
KFileIconView::contentsDragMoveEvent(e);
@@ -51,7 +51,7 @@ void CKFileFontIconView::contentsDragMoveEvent(QDragMoveEvent *e)
e->ignore();
}
-void CKFileFontIconView::contentsDropEvent(QDropEvent *e)
+void CKFileFontIconView::contentsDropEvent(TQDropEvent *e)
{
contentsDragLeaveEvent(NULL);
@@ -61,28 +61,28 @@ void CKFileFontIconView::contentsDropEvent(QDropEvent *e)
e->ignore();
}
-bool CKFileFontIconView::acceptDrag(QDropEvent *e) const
+bool CKFileFontIconView::acceptDrag(TQDropEvent *e) const
{
#if 0 // Crashes - seems to be called to quick???
bool ok=false;
KURL::List urls;
if(KURLDrag::canDecode(e) && (e->source()!=const_cast<CKFileFontIconView *>(this)) &&
- (QDropEvent::Copy==e->action() || QDropEvent::Move==e->action()) &&
+ (TQDropEvent::Copy==e->action() || TQDropEvent::Move==e->action()) &&
KURLDrag::decode(e, urls) && !urls.isEmpty())
{
KURL::List::Iterator it;
ok=true;
for(it=urls.begin(); ok && it!=urls.end(); ++it)
- if(!CFontEngine::isAFontOrAfm(QFile::encodeName((*it).path())))
+ if(!CFontEngine::isAFontOrAfm(TQFile::encodeName((*it).path())))
ok=false;
}
return ok;
#endif
return KURLDrag::canDecode(e) && (e->source()!= const_cast<CKFileFontIconView*>(this)) &&
- (QDropEvent::Copy==e->action() || QDropEvent::Move==e->action());
+ (TQDropEvent::Copy==e->action() || TQDropEvent::Move==e->action());
}
}
diff --git a/kcontrol/kfontinst/kcmfontinst/KFileFontIconView.h b/kcontrol/kfontinst/kcmfontinst/KFileFontIconView.h
index 936bb5bca..bb5ccfa5a 100644
--- a/kcontrol/kfontinst/kcmfontinst/KFileFontIconView.h
+++ b/kcontrol/kfontinst/kcmfontinst/KFileFontIconView.h
@@ -38,16 +38,16 @@ class CKFileFontIconView : public KFileIconView
{
public:
- CKFileFontIconView(QWidget *parent, const char *name) : KFileIconView(parent, name) {}
+ CKFileFontIconView(TQWidget *parent, const char *name) : KFileIconView(parent, name) {}
virtual ~CKFileFontIconView() {}
protected:
// DND support
- void contentsDragEnterEvent(QDragEnterEvent *e);
- void contentsDragMoveEvent(QDragMoveEvent *e);
- void contentsDropEvent(QDropEvent *e);
- bool acceptDrag(QDropEvent *e) const;
+ void contentsDragEnterEvent(TQDragEnterEvent *e);
+ void contentsDragMoveEvent(TQDragMoveEvent *e);
+ void contentsDropEvent(TQDropEvent *e);
+ bool acceptDrag(TQDropEvent *e) const;
};
}
diff --git a/kcontrol/kfontinst/kcmfontinst/KFileFontView.cpp b/kcontrol/kfontinst/kcmfontinst/KFileFontView.cpp
index 7346ca6c8..1ba7822ec 100644
--- a/kcontrol/kfontinst/kcmfontinst/KFileFontView.cpp
+++ b/kcontrol/kfontinst/kcmfontinst/KFileFontView.cpp
@@ -33,11 +33,11 @@
// 2000, 2001 Carsten Pfeiffer <[email protected]>
//
-#include <qevent.h>
-#include <qkeycode.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqevent.h>
+#include <tqkeycode.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kapplication.h>
#include <kfileitem.h>
#include <kglobal.h>
@@ -60,10 +60,10 @@ class CKFileFontView::CKFileFontViewPrivate
CKFileFontViewPrivate() : itsDropItem(0) {}
CFontListViewItem *itsDropItem;
- QTimer itsAutoOpenTimer;
+ TQTimer itsAutoOpenTimer;
};
-CKFileFontView::CKFileFontView(QWidget *parent, const char *name)
+CKFileFontView::CKFileFontView(TQWidget *parent, const char *name)
: KListView(parent, name),
KFileView(),
d(new CKFileFontViewPrivate())
@@ -79,15 +79,15 @@ CKFileFontView::CKFileFontView(QWidget *parent, const char *name)
setAllColumnsShowFocus(true);
setDragEnabled(false);
- connect(header(), SIGNAL(sectionClicked(int)), SLOT(slotSortingChanged(int)));
- connect(this, SIGNAL(returnPressed(QListViewItem *)), SLOT(slotActivate(QListViewItem *)));
- connect(this, SIGNAL(clicked(QListViewItem *, const QPoint&, int)), SLOT(selected( QListViewItem *)));
- connect(this, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)), SLOT(slotActivate(QListViewItem *)));
- connect(this, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),
- this, SLOT(slotActivateMenu(QListViewItem *, const QPoint &)));
+ connect(header(), TQT_SIGNAL(sectionClicked(int)), TQT_SLOT(slotSortingChanged(int)));
+ connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)), TQT_SLOT(slotActivate(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(clicked(TQListViewItem *, const TQPoint&, int)), TQT_SLOT(selected( TQListViewItem *)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)), TQT_SLOT(slotActivate(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT(slotActivateMenu(TQListViewItem *, const TQPoint &)));
// DND
- connect(&(d->itsAutoOpenTimer), SIGNAL(timeout()), this, SLOT(slotAutoOpen()));
+ connect(&(d->itsAutoOpenTimer), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoOpen()));
setSelectionMode(KFileView::selectionMode());
itsResolver = new KMimeTypeResolver<CFontListViewItem, CKFileFontView>(this);
}
@@ -144,7 +144,7 @@ void CKFileFontView::invertSelection()
KListView::invertSelection();
}
-void CKFileFontView::slotActivateMenu(QListViewItem *item,const QPoint& pos)
+void CKFileFontView::slotActivateMenu(TQListViewItem *item,const TQPoint& pos)
{
if (!item)
sig->activateMenu(0, pos);
@@ -165,7 +165,7 @@ void CKFileFontView::insertItem(KFileItem *i)
{
KFileView::insertItem(i);
- CFontListViewItem *item = new CFontListViewItem((QListView*) this, i);
+ CFontListViewItem *item = new CFontListViewItem((TQListView*) this, i);
setSortingKey(item, i);
@@ -175,7 +175,7 @@ void CKFileFontView::insertItem(KFileItem *i)
itsResolver->m_lstPendingMimeIconItems.append(item);
}
-void CKFileFontView::slotActivate(QListViewItem *item)
+void CKFileFontView::slotActivate(TQListViewItem *item)
{
if (item)
{
@@ -186,7 +186,7 @@ void CKFileFontView::slotActivate(QListViewItem *item)
}
}
-void CKFileFontView::selected(QListViewItem *item)
+void CKFileFontView::selected(TQListViewItem *item)
{
if (item && !(KApplication::keyboardMouseState() & (ShiftButton|ControlButton)) &&
KGlobalSettings::singleClick())
@@ -198,7 +198,7 @@ void CKFileFontView::selected(QListViewItem *item)
}
}
-void CKFileFontView::highlighted( QListViewItem *item )
+void CKFileFontView::highlighted( TQListViewItem *item )
{
if (item)
{
@@ -211,31 +211,31 @@ void CKFileFontView::highlighted( QListViewItem *item )
void CKFileFontView::setSelectionMode(KFile::SelectionMode sm)
{
- disconnect(SIGNAL(selectionChanged()), this);
- disconnect(SIGNAL(selectionChanged(QListViewItem *)), this);
+ disconnect(TQT_SIGNAL(selectionChanged()), this);
+ disconnect(TQT_SIGNAL(selectionChanged(TQListViewItem *)), this);
switch (sm)
{
case KFile::Multi:
- QListView::setSelectionMode(QListView::Multi);
+ TQListView::setSelectionMode(TQListView::Multi);
break;
case KFile::Extended:
- QListView::setSelectionMode(QListView::Extended);
+ TQListView::setSelectionMode(TQListView::Extended);
break;
case KFile::NoSelection:
- QListView::setSelectionMode(QListView::NoSelection);
+ TQListView::setSelectionMode(TQListView::NoSelection);
break;
default: // fall through
case KFile::Single:
- QListView::setSelectionMode(QListView::Single);
+ TQListView::setSelectionMode(TQListView::Single);
break;
}
// for highlighting
if (KFile::Multi==sm || KFile::Extended==sm)
- connect(this, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+ connect(this, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
else
- connect(this, SIGNAL(selectionChanged(QListViewItem *)), SLOT(highlighted(QListViewItem * )));
+ connect(this, TQT_SIGNAL(selectionChanged(TQListViewItem *)), TQT_SLOT(highlighted(TQListViewItem * )));
}
bool CKFileFontView::isSelected(const KFileItem *i) const
@@ -254,7 +254,7 @@ void CKFileFontView::updateView(bool b)
{
if (b)
{
- QListViewItemIterator it((QListView*)this);
+ TQListViewItemIterator it((TQListView*)this);
for (; it.current(); ++it)
{
@@ -281,9 +281,9 @@ void CKFileFontView::updateView(const KFileItem *i)
void CKFileFontView::setSortingKey(CFontListViewItem *item, const KFileItem *i)
{
- QDir::SortSpec spec = KFileView::sorting();
+ TQDir::SortSpec spec = KFileView::sorting();
- if (spec&QDir::Size)
+ if (spec&TQDir::Size)
item->setKey(sortingKey(i->size(), i->isDir(), spec));
else
item->setKey(sortingKey(i->text(), i->isDir(), spec));
@@ -304,44 +304,44 @@ void CKFileFontView::removeItem(const KFileItem *i)
void CKFileFontView::slotSortingChanged(int col)
{
- QDir::SortSpec sort = sorting();
+ TQDir::SortSpec sort = sorting();
int sortSpec = -1;
- bool reversed = col == itsSortingCol && (sort & QDir::Reversed) == 0;
+ bool reversed = col == itsSortingCol && (sort & TQDir::Reversed) == 0;
itsSortingCol = col;
switch(col)
{
case COL_NAME:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Name);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Name);
break;
case COL_SIZE:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Size);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Size);
break;
- // the following columns have no equivalent in QDir, so we set it
- // to QDir::Unsorted and remember the column (itsSortingCol)
+ // the following columns have no equivalent in TQDir, so we set it
+ // to TQDir::Unsorted and remember the column (itsSortingCol)
case COL_TYPE:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Time);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Time);
break;
default:
break;
}
if (reversed)
- sortSpec|=QDir::Reversed;
+ sortSpec|=TQDir::Reversed;
else
- sortSpec&=~QDir::Reversed;
+ sortSpec&=~TQDir::Reversed;
- if (sort & QDir::IgnoreCase)
- sortSpec|=QDir::IgnoreCase;
+ if (sort & TQDir::IgnoreCase)
+ sortSpec|=TQDir::IgnoreCase;
else
- sortSpec&=~QDir::IgnoreCase;
+ sortSpec&=~TQDir::IgnoreCase;
- KFileView::setSorting(static_cast<QDir::SortSpec>(sortSpec));
+ KFileView::setSorting(static_cast<TQDir::SortSpec>(sortSpec));
KFileItem *item;
KFileItemListIterator it(*items());
- if ( sortSpec & QDir::Size )
+ if ( sortSpec & TQDir::Size )
{
for (; (item = it.current()); ++it )
{
@@ -361,23 +361,23 @@ void CKFileFontView::slotSortingChanged(int col)
KListView::sort();
if (!itsBlockSortingSignal)
- sig->changeSorting( static_cast<QDir::SortSpec>( sortSpec ) );
+ sig->changeSorting( static_cast<TQDir::SortSpec>( sortSpec ) );
}
-void CKFileFontView::setSorting(QDir::SortSpec spec)
+void CKFileFontView::setSorting(TQDir::SortSpec spec)
{
- if (spec & QDir::Size)
+ if (spec & TQDir::Size)
itsSortingCol=COL_SIZE;
else
itsSortingCol=COL_NAME;
// inversed, because slotSortingChanged will reverse it
- if (spec & QDir::Reversed)
- spec = (QDir::SortSpec) (spec & ~QDir::Reversed);
+ if (spec & TQDir::Reversed)
+ spec = (TQDir::SortSpec) (spec & ~TQDir::Reversed);
else
- spec = (QDir::SortSpec) (spec | QDir::Reversed);
+ spec = (TQDir::SortSpec) (spec | TQDir::Reversed);
- KFileView::setSorting((QDir::SortSpec) spec);
+ KFileView::setSorting((TQDir::SortSpec) spec);
// don't emit sortingChanged() when called via setSorting()
itsBlockSortingSignal = true; // can't use blockSignals()
@@ -433,7 +433,7 @@ KFileItem * CKFileFontView::prevItem(const KFileItem *fileItem) const
return firstFileItem();
}
-void CKFileFontView::keyPressEvent(QKeyEvent *e)
+void CKFileFontView::keyPressEvent(TQKeyEvent *e)
{
KListView::keyPressEvent(e);
@@ -463,13 +463,13 @@ void CKFileFontView::listingCompleted()
itsResolver->start();
}
-QDragObject *CKFileFontView::dragObject()
+TQDragObject *CKFileFontView::dragObject()
{
// create a list of the URL:s that we want to drag
KURL::List urls;
KFileItemListIterator it(* KFileView::selectedItems());
- QPixmap pixmap;
- QPoint hotspot;
+ TQPixmap pixmap;
+ TQPoint hotspot;
for ( ; it.current(); ++it )
urls.append( (*it)->url() );
@@ -482,7 +482,7 @@ QDragObject *CKFileFontView::dragObject()
hotspot.setX(pixmap.width() / 2);
hotspot.setY(pixmap.height() / 2);
- QDragObject *dragObject=new KURLDrag(urls, widget());
+ TQDragObject *dragObject=new KURLDrag(urls, widget());
if(dragObject)
dragObject->setPixmap(pixmap, hotspot);
@@ -503,7 +503,7 @@ void CKFileFontView::slotAutoOpen()
}
}
-bool CKFileFontView::acceptDrag(QDropEvent *e) const
+bool CKFileFontView::acceptDrag(TQDropEvent *e) const
{
#if 0 // Following doesn't seem to work, why???
bool ok=false;
@@ -511,14 +511,14 @@ bool CKFileFontView::acceptDrag(QDropEvent *e) const
if((e->source()!=const_cast<CKFileFontView *>(this)) &&
- (QDropEvent::Copy==e->action() || QDropEvent::Move==e->action()) &&
+ (TQDropEvent::Copy==e->action() || TQDropEvent::Move==e->action()) &&
KURLDrag::decode(e, urls) && !urls.isEmpty())
{
KURL::List::Iterator it;
ok=true;
for(it=urls.begin(); ok && it!=urls.end(); ++it)
- if(!CFontEngine::isAFontOrAfm(QFile::encodeName((*it).path())))
+ if(!CFontEngine::isAFontOrAfm(TQFile::encodeName((*it).path())))
ok=false;
}
@@ -526,10 +526,10 @@ bool CKFileFontView::acceptDrag(QDropEvent *e) const
#endif
return KURLDrag::canDecode(e) && (e->source()!= const_cast<CKFileFontView*>(this)) &&
- (QDropEvent::Copy==e->action() || QDropEvent::Move==e->action());
+ (TQDropEvent::Copy==e->action() || TQDropEvent::Move==e->action());
}
-void CKFileFontView::contentsDragEnterEvent(QDragEnterEvent *e)
+void CKFileFontView::contentsDragEnterEvent(TQDragEnterEvent *e)
{
if (!acceptDrag(e)) // can we decode this ?
e->ignore(); // No
@@ -554,7 +554,7 @@ void CKFileFontView::contentsDragEnterEvent(QDragEnterEvent *e)
}
}
-void CKFileFontView::contentsDragMoveEvent(QDragMoveEvent *e)
+void CKFileFontView::contentsDragMoveEvent(TQDragMoveEvent *e)
{
if (!acceptDrag(e)) // can we decode this ?
e->ignore(); // No
@@ -583,13 +583,13 @@ void CKFileFontView::contentsDragMoveEvent(QDragMoveEvent *e)
}
}
-void CKFileFontView::contentsDragLeaveEvent(QDragLeaveEvent *)
+void CKFileFontView::contentsDragLeaveEvent(TQDragLeaveEvent *)
{
d->itsDropItem = 0;
d->itsAutoOpenTimer.stop();
}
-void CKFileFontView::contentsDropEvent(QDropEvent *e)
+void CKFileFontView::contentsDropEvent(TQDropEvent *e)
{
d->itsDropItem = 0;
d->itsAutoOpenTimer.stop();
@@ -614,15 +614,15 @@ void CKFileFontView::contentsDropEvent(QDropEvent *e)
}
}
-void CKFileFontView::readConfig(KConfig *kc, const QString &group)
+void CKFileFontView::readConfig(KConfig *kc, const TQString &group)
{
- restoreLayout(kc, group.isEmpty() ? QString("CFileFontView") : group);
+ restoreLayout(kc, group.isEmpty() ? TQString("CFileFontView") : group);
slotSortingChanged(sortColumn());
}
-void CKFileFontView::writeConfig(KConfig *kc, const QString &group)
+void CKFileFontView::writeConfig(KConfig *kc, const TQString &group)
{
- saveLayout(kc, group.isEmpty() ? QString("CFileFontView") : group);
+ saveLayout(kc, group.isEmpty() ? TQString("CFileFontView") : group);
}
/////////////////////////////////////////////////////////////////
diff --git a/kcontrol/kfontinst/kcmfontinst/KFileFontView.h b/kcontrol/kfontinst/kcmfontinst/KFileFontView.h
index a58f9d908..295be9106 100644
--- a/kcontrol/kfontinst/kcmfontinst/KFileFontView.h
+++ b/kcontrol/kfontinst/kcmfontinst/KFileFontView.h
@@ -52,7 +52,7 @@ class CFontListViewItem : public KListViewItem
{
public:
- CFontListViewItem(QListView *parent, const QString &text, const QPixmap &icon, KFileItem *fi)
+ CFontListViewItem(TQListView *parent, const TQString &text, const TQPixmap &icon, KFileItem *fi)
: KListViewItem(parent, text),
itsInf(fi)
{
@@ -60,14 +60,14 @@ class CFontListViewItem : public KListViewItem
setText(0, text);
}
- CFontListViewItem(QListView *parent, KFileItem *fi)
+ CFontListViewItem(TQListView *parent, KFileItem *fi)
: KListViewItem(parent),
itsInf(fi)
{
init();
}
- CFontListViewItem(QListView *parent, const QString &text, const QPixmap &icon, KFileItem *fi, QListViewItem *after)
+ CFontListViewItem(TQListView *parent, const TQString &text, const TQPixmap &icon, KFileItem *fi, TQListViewItem *after)
: KListViewItem(parent, after),
itsInf(fi)
{
@@ -82,15 +82,15 @@ class CFontListViewItem : public KListViewItem
*/
KFileItem *fileInfo() const { return itsInf; }
- virtual QString key( int /*column*/, bool /*ascending*/ ) const { return itsKey; }
+ virtual TQString key( int /*column*/, bool /*ascending*/ ) const { return itsKey; }
- void setKey( const QString& key ) { itsKey = key; }
+ void setKey( const TQString& key ) { itsKey = key; }
- QRect rect() const
+ TQRect rect() const
{
- QRect r = listView()->itemRect(this);
+ TQRect r = listView()->itemRect(this);
- return QRect(listView()->viewportToContents(r.topLeft()), QSize(r.width(), r.height()));
+ return TQRect(listView()->viewportToContents(r.topLeft()), TQSize(r.width(), r.height()));
}
void init();
@@ -98,7 +98,7 @@ class CFontListViewItem : public KListViewItem
private:
KFileItem *itsInf;
- QString itsKey;
+ TQString itsKey;
class CFontListViewItemPrivate;
@@ -119,10 +119,10 @@ class CKFileFontView : public KListView, public KFileView
public:
- CKFileFontView(QWidget *parent, const char *name);
+ CKFileFontView(TQWidget *parent, const char *name);
virtual ~CKFileFontView();
- virtual QWidget * widget() { return this; }
+ virtual TQWidget * widget() { return this; }
virtual void clearView();
virtual void setAutoUpdate(bool) {} // ### unused. remove in KDE4
virtual void setSelectionMode( KFile::SelectionMode sm );
@@ -142,38 +142,38 @@ class CKFileFontView : public KListView, public KFileView
virtual KFileItem * prevItem(const KFileItem *i) const;
virtual void insertItem( KFileItem *i);
- void readConfig(KConfig *kc, const QString &group);
- void writeConfig(KConfig *kc, const QString &group);
+ void readConfig(KConfig *kc, const TQString &group);
+ void writeConfig(KConfig *kc, const TQString &group);
// implemented to get noticed about sorting changes (for sortingIndicator)
- virtual void setSorting(QDir::SortSpec s);
+ virtual void setSorting(TQDir::SortSpec s);
void ensureItemVisible(const KFileItem *i);
// for KMimeTypeResolver
void mimeTypeDeterminationFinished();
void determineIcon(CFontListViewItem *item);
- QScrollView * scrollWidget() const { return (QScrollView*) this; }
+ TQScrollView * scrollWidget() const { return (TQScrollView*) this; }
signals:
// The user dropped something.
// fileItem points to the item dropped on or can be 0 if the
// user dropped on empty space.
- void dropped(QDropEvent *event, KFileItem *fileItem);
+ void dropped(TQDropEvent *event, KFileItem *fileItem);
// The user dropped the URLs urls.
// url points to the item dropped on or can be empty if the
// user dropped on empty space.
- void dropped(QDropEvent *event, const KURL::List &urls, const KURL &url);
+ void dropped(TQDropEvent *event, const KURL::List &urls, const KURL &url);
protected:
- virtual void keyPressEvent(QKeyEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
// DND support
- QDragObject * dragObject();
- void contentsDragEnterEvent(QDragEnterEvent *e);
- void contentsDragMoveEvent(QDragMoveEvent *e);
- void contentsDragLeaveEvent(QDragLeaveEvent *e);
- void contentsDropEvent(QDropEvent *e);
- bool acceptDrag(QDropEvent *e) const;
+ TQDragObject * dragObject();
+ void contentsDragEnterEvent(TQDragEnterEvent *e);
+ void contentsDragMoveEvent(TQDragMoveEvent *e);
+ void contentsDragLeaveEvent(TQDragLeaveEvent *e);
+ void contentsDropEvent(TQDropEvent *e);
+ bool acceptDrag(TQDropEvent *e) const;
int itsSortingCol;
@@ -184,17 +184,17 @@ class CKFileFontView : public KListView, public KFileView
private slots:
void slotSortingChanged(int c);
- void selected(QListViewItem *item);
- void slotActivate(QListViewItem *item);
- void highlighted(QListViewItem *item);
- void slotActivateMenu(QListViewItem *item, const QPoint& pos);
+ void selected(TQListViewItem *item);
+ void slotActivate(TQListViewItem *item);
+ void highlighted(TQListViewItem *item);
+ void slotActivateMenu(TQListViewItem *item, const TQPoint& pos);
void slotAutoOpen();
private:
- virtual void insertItem(QListViewItem *i) { KListView::insertItem(i); }
+ virtual void insertItem(TQListViewItem *i) { KListView::insertItem(i); }
virtual void setSorting(int i, bool b) { KListView::setSorting(i, b); }
- virtual void setSelected(QListViewItem *i, bool b) { KListView::setSelected(i, b); }
+ virtual void setSelected(TQListViewItem *i, bool b) { KListView::setSelected(i, b); }
inline CFontListViewItem * viewItem( const KFileItem *item ) const
{
diff --git a/kcontrol/kfontinst/kcmfontinst/PrintDialog.cpp b/kcontrol/kfontinst/kcmfontinst/PrintDialog.cpp
index e902fa1e1..afd9fa204 100644
--- a/kcontrol/kfontinst/kcmfontinst/PrintDialog.cpp
+++ b/kcontrol/kfontinst/kcmfontinst/PrintDialog.cpp
@@ -27,27 +27,27 @@
////////////////////////////////////////////////////////////////////////////////
#include "PrintDialog.h"
-#include <qlayout.h>
-#include <qframe.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqframe.h>
+#include <tqlabel.h>
#include <klocale.h>
namespace KFI
{
-CPrintDialog::CPrintDialog(QWidget *parent)
+CPrintDialog::CPrintDialog(TQWidget *parent)
: KDialogBase(Plain, i18n("Print Font Samples"), Ok|Cancel, Ok, parent, NULL, true, false)
{
- QFrame *page=plainPage();
- QGridLayout *layout=new QGridLayout(page, 1, 1, 0, spacingHint());
+ TQFrame *page=plainPage();
+ TQGridLayout *layout=new TQGridLayout(page, 1, 1, 0, spacingHint());
- layout->addWidget(new QLabel(i18n("Output:"), page), 0, 0);
- itsOutput=new QComboBox(page);
+ layout->addWidget(new TQLabel(i18n("Output:"), page), 0, 0);
+ itsOutput=new TQComboBox(page);
itsOutput->insertItem(i18n("All Fonts"), 0);
itsOutput->insertItem(i18n("Selected Fonts"), 1);
layout->addWidget(itsOutput, 0, 1);
- layout->addWidget(new QLabel(i18n("Font size:"), page), 1, 0);
- itsSize=new QComboBox(page);
+ layout->addWidget(new TQLabel(i18n("Font size:"), page), 1, 0);
+ itsSize=new TQComboBox(page);
itsSize->insertItem(i18n("Waterfall"), 0);
itsSize->insertItem(i18n("12pt"), 1);
itsSize->insertItem(i18n("18pt"), 2);
@@ -55,7 +55,7 @@ CPrintDialog::CPrintDialog(QWidget *parent)
itsSize->insertItem(i18n("36pt"), 4);
itsSize->insertItem(i18n("48pt"), 5);
layout->addWidget(itsSize, 1, 1);
- layout->addItem(new QSpacerItem(2, 2), 2, 1);
+ layout->addItem(new TQSpacerItem(2, 2), 2, 1);
}
bool CPrintDialog::exec(bool select, int size)
@@ -68,7 +68,7 @@ bool CPrintDialog::exec(bool select, int size)
else
itsOutput->setCurrentItem(1);
itsSize->setCurrentItem(size);
- return QDialog::Accepted==QDialog::exec();
+ return TQDialog::Accepted==TQDialog::exec();
}
}
diff --git a/kcontrol/kfontinst/kcmfontinst/PrintDialog.h b/kcontrol/kfontinst/kcmfontinst/PrintDialog.h
index 9be67f6d4..f63118d66 100644
--- a/kcontrol/kfontinst/kcmfontinst/PrintDialog.h
+++ b/kcontrol/kfontinst/kcmfontinst/PrintDialog.h
@@ -30,7 +30,7 @@
////////////////////////////////////////////////////////////////////////////////
#include <kdialogbase.h>
-#include <qcombobox.h>
+#include <tqcombobox.h>
namespace KFI
{
@@ -39,7 +39,7 @@ class CPrintDialog : public KDialogBase
{
public:
- CPrintDialog(QWidget *parent);
+ CPrintDialog(TQWidget *parent);
bool exec(bool select, int size);
int chosenSize() { return itsSize->currentItem(); }
@@ -47,7 +47,7 @@ class CPrintDialog : public KDialogBase
private:
- QComboBox *itsOutput,
+ TQComboBox *itsOutput,
*itsSize;
};
diff --git a/kcontrol/kfontinst/kcmfontinst/SettingsDialog.cpp b/kcontrol/kfontinst/kcmfontinst/SettingsDialog.cpp
index 255fca709..8b8a88167 100644
--- a/kcontrol/kfontinst/kcmfontinst/SettingsDialog.cpp
+++ b/kcontrol/kfontinst/kcmfontinst/SettingsDialog.cpp
@@ -29,10 +29,10 @@
#include "SettingsDialog.h"
#include "KfiConstants.h"
#include "Misc.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kconfig.h>
#include <kmessagebox.h>
@@ -42,20 +42,20 @@
namespace KFI
{
-CSettingsDialog::CSettingsDialog(QWidget *parent)
+CSettingsDialog::CSettingsDialog(TQWidget *parent)
: KDialogBase(parent, "settingsdialog", true, i18n("Settings"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true)
{
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- itsDoX=new QCheckBox(i18n("Configure fonts for legacy X applications"), page);
- QWhatsThis::add(itsDoX, i18n("<p>Modern applications use a system called \"FontConfig\" to obtain the list of fonts. "
+ itsDoX=new TQCheckBox(i18n("Configure fonts for legacy X applications"), page);
+ TQWhatsThis::add(itsDoX, i18n("<p>Modern applications use a system called \"FontConfig\" to obtain the list of fonts. "
"Older applications, such as OpenOffice 1.x, GIMP 1.x, etc. use the previous \"core X fonts\" mechanism for "
"this.</p><p>Selecting this option will inform the installer to create the necessary files so that these "
"older applications can use the fonts you install.</p><p>Please note, however, that this will slow down "
"the installation process.<p>"));
- itsDoGs=new QCheckBox(i18n("Configure fonts for Ghostscript"), page);
- QWhatsThis::add(itsDoGs, i18n("<p>When printing, most applications create what is know as PostScript. This is then sent to a special "
+ itsDoGs=new TQCheckBox(i18n("Configure fonts for Ghostscript"), page);
+ TQWhatsThis::add(itsDoGs, i18n("<p>When printing, most applications create what is know as PostScript. This is then sent to a special "
"application, named Ghostscript, which can interpret the PostScript and send the appropriate instructions "
"to your printer. If your application does not embed whatever fonts it uses into the PostScript, then "
"Ghostscript needs to be informed as to which fonts you have installed, and where they are located.</p>"
@@ -83,10 +83,10 @@ void CSettingsDialog::slotOk()
if( ((!oldDoX && itsDoX->isChecked()) || (!oldDoGs && itsDoGs->isChecked())) &&
KMessageBox::Yes==KMessageBox::questionYesNo(this, i18n("You have enabled a previously disabled option. Would you like the config "
"files updated now? (Normally they are only updated upon installing, or "
- "removing, a font.)"), QString::null, i18n("Update"),i18n("Do Not Update")))
+ "removing, a font.)"), TQString::null, i18n("Update"),i18n("Do Not Update")))
{
- QByteArray packedArgs;
- QDataStream stream(packedArgs, IO_WriteOnly);
+ TQByteArray packedArgs;
+ TQDataStream stream(packedArgs, IO_WriteOnly);
stream << KFI::SPECIAL_RECONFIG;
diff --git a/kcontrol/kfontinst/kcmfontinst/SettingsDialog.h b/kcontrol/kfontinst/kcmfontinst/SettingsDialog.h
index b41820e38..0edac64dd 100644
--- a/kcontrol/kfontinst/kcmfontinst/SettingsDialog.h
+++ b/kcontrol/kfontinst/kcmfontinst/SettingsDialog.h
@@ -40,7 +40,7 @@ class CSettingsDialog : public KDialogBase
{
public:
- CSettingsDialog(QWidget *parent);
+ CSettingsDialog(TQWidget *parent);
private slots:
@@ -48,7 +48,7 @@ class CSettingsDialog : public KDialogBase
private:
- QCheckBox *itsDoX,
+ TQCheckBox *itsDoX,
*itsDoGs;
};
diff --git a/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp b/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp
index 31fbaa83e..112e3562b 100644
--- a/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp
+++ b/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp
@@ -28,19 +28,19 @@
#include "KFileFont.h"
#include "KfiConstants.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kgenericfactory.h>
#include <kio/netaccess.h>
-static void addEntry(int face, QString &existing, const QString &add)
+static void addEntry(int face, TQString &existing, const TQString &add)
{
if(face>0)
existing.append(", ");
existing.append(add);
}
-static int strToWeight(const QString &str)
+static int strToWeight(const TQString &str)
{
if(NULL==str)
return FC_WEIGHT_MEDIUM;
@@ -79,7 +79,7 @@ static int strToWeight(const QString &str)
}
#ifndef KFI_FC_NO_WIDTHS
-static int strToWidth(const QString &str)
+static int strToWidth(const TQString &str)
{
if(str.isEmpty())
return FC_WIDTH_NORMAL;
@@ -171,13 +171,13 @@ static const char * getFoundry(const char *notice)
return NULL;
}
-static bool readAfm(const QString &file, QString &full, QString &family, QString &foundry, QString &weight,
+static bool readAfm(const TQString &file, TQString &full, TQString &family, TQString &foundry, TQString &weight,
#ifndef KFI_FC_NO_WIDTHS
- QString &width,
+ TQString &width,
#endif
- QString &spacing, QString &slant)
+ TQString &spacing, TQString &slant)
{
- QFile f(file);
+ TQFile f(file);
bool foundName=false,
foundFamily=false;
int intSpacing=FC_PROPORTIONAL,
@@ -190,8 +190,8 @@ static bool readAfm(const QString &file, QString &full, QString &family, QString
if(f.open(IO_ReadOnly))
{
- QTextStream stream(&f);
- QString line;
+ TQTextStream stream(&f);
+ TQString line;
bool inMetrics=false;
while(!stream.atEnd())
@@ -265,7 +265,7 @@ K_EXPORT_COMPONENT_FACTORY(kfile_font, KFileFontPluginFactory("kfontinst"))
namespace KFI
{
-KFileFontPlugin::KFileFontPlugin(QObject *parent, const char *name, const QStringList& args)
+KFileFontPlugin::KFileFontPlugin(TQObject *parent, const char *name, const TQStringList& args)
: KFilePlugin(parent, name, args)
{
KGlobal::locale()->insertCatalogue(KFI_CATALOGUE);
@@ -286,20 +286,20 @@ void KFileFontPlugin::addMimeType(const char *mime)
KFileMimeTypeInfo *info=addMimeTypeInfo(mime);
KFileMimeTypeInfo::GroupInfo *group=addGroupInfo(info, "General", i18n("General"));
- addItemInfo(group, "Full", i18n("Full Name"), QVariant::String);
- addItemInfo(group, "Family", i18n("Family"), QVariant::String);
- addItemInfo(group, "Foundry", i18n("Foundry"), QVariant::String);
- addItemInfo(group, "Weight", i18n("Weight"), QVariant::String);
+ addItemInfo(group, "Full", i18n("Full Name"), TQVariant::String);
+ addItemInfo(group, "Family", i18n("Family"), TQVariant::String);
+ addItemInfo(group, "Foundry", i18n("Foundry"), TQVariant::String);
+ addItemInfo(group, "Weight", i18n("Weight"), TQVariant::String);
#ifndef KFI_FC_NO_WIDTHS
- addItemInfo(group, "Width", i18n("Width"), QVariant::String);
+ addItemInfo(group, "Width", i18n("Width"), TQVariant::String);
#endif
- addItemInfo(group, "Spacing", i18n("Spacing"), QVariant::String);
- addItemInfo(group, "Slant", i18n("Slant"), QVariant::String);
+ addItemInfo(group, "Spacing", i18n("Spacing"), TQVariant::String);
+ addItemInfo(group, "Slant", i18n("Slant"), TQVariant::String);
}
bool KFileFontPlugin::readInfo(KFileMetaInfo& info, uint what)
{
- QString full,
+ TQString full,
lastFull,
family,
foundry,
@@ -319,7 +319,7 @@ bool KFileFontPlugin::readInfo(KFileMetaInfo& info, uint what)
spacingAll,
slantAll;
KURL url(info.url());
- QString fName;
+ TQString fName;
bool fontsProt = KFI_KIO_FONTS_PROTOCOL == url.protocol(),
fileProt = "file" == url.protocol(),
downloaded = false,
diff --git a/kcontrol/kfontinst/kfile-plugin/KFileFont.h b/kcontrol/kfontinst/kfile-plugin/KFileFont.h
index b06ab2a57..d33079e0b 100644
--- a/kcontrol/kfontinst/kfile-plugin/KFileFont.h
+++ b/kcontrol/kfontinst/kfile-plugin/KFileFont.h
@@ -39,7 +39,7 @@ class KFileFontPlugin : public KFilePlugin
{
public:
- KFileFontPlugin(QObject *parent, const char *name, const QStringList& args);
+ KFileFontPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual ~KFileFontPlugin() {}
bool readInfo(KFileMetaInfo& info, uint what = KFileMetaInfo::Fastest);
diff --git a/kcontrol/kfontinst/kfontinst/FontEngine.cpp b/kcontrol/kfontinst/kfontinst/FontEngine.cpp
index ff5dcd623..4fe823c23 100644
--- a/kcontrol/kfontinst/kfontinst/FontEngine.cpp
+++ b/kcontrol/kfontinst/kfontinst/FontEngine.cpp
@@ -35,8 +35,8 @@
#include <stdlib.h>
#include <iostream>
#include <stdio.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <ft2build.h>
#include FT_SFNT_NAMES_H
#include FT_TRUETYPE_IDS_H
@@ -46,7 +46,7 @@
namespace KFI
{
-bool CFontEngine::openFont(const QString &file, int face)
+bool CFontEngine::openFont(const TQString &file, int face)
{
bool ok=false;
@@ -62,7 +62,7 @@ bool CFontEngine::openFont(const QString &file, int face)
itsItalic=ITALIC_NONE;
itsPath=file;
itsFaceIndex=face;
- itsPsName=QString();
+ itsPsName=TQString();
if(!openFontFt(file) && !itsPsName.isEmpty())
itsType=NONE;
@@ -74,12 +74,12 @@ bool CFontEngine::openFont(const QString &file, int face)
void CFontEngine::closeFont()
{
closeFaceFt();
- itsPath=QString::null;
+ itsPath=TQString::null;
itsFaceIndex=-1;
itsType=NONE;
}
-QString CFontEngine::weightStr(enum EWeight w)
+TQString CFontEngine::weightStr(enum EWeight w)
{
switch(w)
{
@@ -155,12 +155,12 @@ CFontEngine::EWeight CFontEngine::strToWeight(const char *str)
return WEIGHT_MEDIUM; // WEIGHT_UNKNOWN;
}
-static void removeSymbols(QString &str)
+static void removeSymbols(TQString &str)
{
- str.replace(QRegExp("[\\-\\[\\]()]"), " ");
+ str.replace(TQRegExp("[\\-\\[\\]()]"), " ");
int len=str.length();
- QChar space(' ');
+ TQChar space(' ');
for(int c=0; c<len; ++c)
if(str[c].unicode()<0x20 || str[c].unicode()>0x7E)
@@ -210,10 +210,10 @@ static bool lookupName(FT_Face face, int nid, int pid, int eid, FT_SfntName *nam
return false;
}
-static QCString getName(FT_Face face, int nid)
+static TQCString getName(FT_Face face, int nid)
{
FT_SfntName name;
- QCString str;
+ TQCString str;
if(lookupName(face, nid, TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, &name) ||
lookupName(face, nid, TT_PLATFORM_APPLE_UNICODE, -1, &name))
@@ -226,7 +226,7 @@ static QCString getName(FT_Face face, int nid)
return str;
}
-bool CFontEngine::openFontFt(const QString &file)
+bool CFontEngine::openFontFt(const TQString &file)
{
enum ETtfWeight
{
@@ -242,7 +242,7 @@ bool CFontEngine::openFontFt(const QString &file)
TTF_WEIGHT_BLACK = 900 +50
};
- bool status=FT_New_Face(itsFt.library, QFile::encodeName(file), 0, &itsFt.face) ? false : true;
+ bool status=FT_New_Face(itsFt.library, TQFile::encodeName(file), 0, &itsFt.face) ? false : true;
if(status)
itsFt.open=true;
diff --git a/kcontrol/kfontinst/kfontinst/FontEngine.h b/kcontrol/kfontinst/kfontinst/FontEngine.h
index 06218c0ae..c534a5ef5 100644
--- a/kcontrol/kfontinst/kfontinst/FontEngine.h
+++ b/kcontrol/kfontinst/kfontinst/FontEngine.h
@@ -35,8 +35,8 @@
#include <ft2build.h>
#include FT_FREETYPE_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
namespace KFI
{
@@ -99,18 +99,18 @@ class CFontEngine
~CFontEngine() { closeFont(); }
static EType getType(const char *fname);
- static QString weightStr(EWeight w);
- static QString italicStr(EItalic i) { return ITALIC_NONE==i ? "r" : ITALIC_ITALIC==i ? "i" : "o"; }
+ static TQString weightStr(EWeight w);
+ static TQString italicStr(EItalic i) { return ITALIC_NONE==i ? "r" : ITALIC_ITALIC==i ? "i" : "o"; }
//
// General functions - these should be used instead of specfic ones below...
//
- bool openFont(const QString &file, int face=0);
+ bool openFont(const TQString &file, int face=0);
void closeFont();
//
- const QString & getFamilyName() { return itsFamily; }
- const QString & getPsName() { return itsPsName; }
+ const TQString & getFamilyName() { return itsFamily; }
+ const TQString & getPsName() { return itsPsName; }
EWeight getWeight() { return itsWeight; }
EItalic getItalic() { return itsItalic; }
EType getType() { return itsType; }
@@ -121,7 +121,7 @@ class CFontEngine
private:
- bool openFontFt(const QString &file);
+ bool openFontFt(const TQString &file);
void closeFaceFt();
private:
@@ -129,7 +129,7 @@ class CFontEngine
EWeight itsWeight;
EType itsType;
EItalic itsItalic;
- QString itsFamily,
+ TQString itsFamily,
itsPsName,
itsPath;
int itsNumFaces,
diff --git a/kcontrol/kfontinst/kfontinst/Fontmap.cpp b/kcontrol/kfontinst/kfontinst/Fontmap.cpp
index 6e0c165e9..476b422bd 100644
--- a/kcontrol/kfontinst/kfontinst/Fontmap.cpp
+++ b/kcontrol/kfontinst/kfontinst/Fontmap.cpp
@@ -32,13 +32,13 @@
#include "FcEngine.h"
#include "KfiConstants.h"
#include <ksavefile.h>
-#include <qtextstream.h>
-#include <qdir.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <fstream>
#include <unistd.h>
@@ -52,7 +52,7 @@ static const char * findSpace(const char *str)
return str;
}
-static bool parseLine(const char *line, QString &ps, QString &fname, bool &isAlias)
+static bool parseLine(const char *line, TQString &ps, TQString &fname, bool &isAlias)
{
static const int constMaxLen = 127;
static const int constFileMaxLen = 1023;
@@ -107,13 +107,13 @@ static bool parseLine(const char *line, QString &ps, QString &fname, bool &isAli
//
// Returns a PS name from an X family name...
// e.g. "Times New Roman" -> "TimesNewRoman"
-static QString createX11PsName(const QString &font)
+static TQString createX11PsName(const TQString &font)
{
- QString newName(font);
+ TQString newName(font);
unsigned int ch;
bool newWord=true;
- newName.replace(QRegExp("\\-"), "_");
+ newName.replace(TQRegExp("\\-"), "_");
for(ch=0; ch<newName.length(); ++ch)
{
@@ -136,7 +136,7 @@ static QString createX11PsName(const QString &font)
}
}
- newName.replace(" ", QString::null);
+ newName.replace(" ", TQString::null);
return newName;
}
@@ -156,10 +156,10 @@ static const char * getItalicStr(KFI::CFontEngine::EItalic it)
//
// Create a full Ps name
-static QString createName(const QString &family, const QString &weight, const char *italic)
+static TQString createName(const TQString &family, const TQString &weight, const char *italic)
{
- QString name;
- QTextOStream str(&name);
+ TQString name;
+ TQTextOStream str(&name);
str << family;
if(!weight.isEmpty() || NULL!=italic)
@@ -174,26 +174,26 @@ static QString createName(const QString &family, const QString &weight, const ch
return name;
}
-static QString getEntry(QStringList &list, const QString &name)
+static TQString getEntry(TQStringList &list, const TQString &name)
{
- QStringList::Iterator it(list.begin()),
+ TQStringList::Iterator it(list.begin()),
end(list.end());
for( ; it!=end; ++it)
if(0==(*it).find('/'+name+' '))
return *it;
- return QString::null;
+ return TQString::null;
}
-inline bool isAlias(const QString &entry)
+inline bool isAlias(const TQString &entry)
{
- return -1==entry.findRev(QRegExp(")\\s*;\\s*$"));
+ return -1==entry.findRev(TQRegExp(")\\s*;\\s*$"));
}
-static void addEntry(QStringList &list, const QString &name, const QString &file, const QString &fmapDir)
+static void addEntry(TQStringList &list, const TQString &name, const TQString &file, const TQString &fmapDir)
{
- QString existing(getEntry(list, name));
+ TQString existing(getEntry(list, name));
bool insert=true;
if(!existing.isEmpty())
@@ -204,8 +204,8 @@ static void addEntry(QStringList &list, const QString &name, const QString &file
if(insert)
{
- QString entry;
- QTextOStream str(&entry);
+ TQString entry;
+ TQTextOStream str(&entry);
str << '/' << name << " (";
@@ -219,16 +219,16 @@ static void addEntry(QStringList &list, const QString &name, const QString &file
}
}
-static void addAliasEntry(QStringList &list, const QString &x11Name, const QString &psName)
+static void addAliasEntry(TQStringList &list, const TQString &x11Name, const TQString &psName)
{
if(x11Name!=psName)
{
- QString existing(getEntry(list, x11Name));
+ TQString existing(getEntry(list, x11Name));
if(existing.isEmpty())
{
- QString entry;
- QTextOStream str(&entry);
+ TQString entry;
+ TQTextOStream str(&entry);
str << '/' << x11Name << " /" << psName << " ;";
list.append(entry);
@@ -236,11 +236,11 @@ static void addAliasEntry(QStringList &list, const QString &x11Name, const QStri
}
}
-static QString locateFile(const char *dir, const char *file, int level=0)
+static TQString locateFile(const char *dir, const char *file, int level=0)
{
if(level<5)
{
- QDir d(dir);
+ TQDir d(dir);
if(d.isReadable())
{
@@ -249,14 +249,14 @@ static QString locateFile(const char *dir, const char *file, int level=0)
if(fList)
{
QFileInfoListIterator it(*fList);
- QFileInfo *fInfo;
- QString str;
+ TQFileInfo *fInfo;
+ TQString str;
for(; NULL!=(fInfo=it.current()); ++it)
if("."!=fInfo->fileName() && ".."!=fInfo->fileName())
if(fInfo->isDir())
{
- if(!(str=locateFile(QFile::encodeName(fInfo->filePath()+"/"), file, level+1)).isEmpty())
+ if(!(str=locateFile(TQFile::encodeName(fInfo->filePath()+"/"), file, level+1)).isEmpty())
return str;
}
else
@@ -266,19 +266,19 @@ static QString locateFile(const char *dir, const char *file, int level=0)
}
}
- return QString::null;
+ return TQString::null;
}
-static QString locateFile(const char *file, const char **dirs)
+static TQString locateFile(const char *file, const char **dirs)
{
int d;
- QString str;
+ TQString str;
for(d=0; dirs[d]; ++d)
if(!(str=locateFile(dirs[d], file)).isEmpty())
return str;
- return QString::null;
+ return TQString::null;
}
#define FONTMAP "Fontmap"
@@ -289,13 +289,13 @@ namespace KFI
namespace Fontmap
{
-bool create(const QString &dir, CFontEngine &fe)
+bool create(const TQString &dir, CFontEngine &fe)
{
bool root(Misc::root()),
added=false;
- QString fmapDir(Misc::dirSyntax(root ? KFI_ROOT_CFG_DIR : dir));
+ TQString fmapDir(Misc::dirSyntax(root ? KFI_ROOT_CFG_DIR : dir));
CFile old(fmapDir);
- QStringList entries;
+ TQStringList entries;
int i;
FcPattern *pat = FcPatternCreate();
FcObjectSet *os = FcObjectSetBuild(FC_FILE, FC_SCALABLE, (void*)0);
@@ -306,13 +306,13 @@ bool create(const QString &dir, CFontEngine &fe)
for (i = 0; i<fs->nfont; i++)
{
- QString fName(Misc::fileSyntax(CFcEngine::getFcString(fs->fonts[i], FC_FILE)));
+ TQString fName(Misc::fileSyntax(CFcEngine::getFcString(fs->fonts[i], FC_FILE)));
FcBool scalable=FcFalse;
if(!fName.isEmpty() && (root || dir.isEmpty() || 0==fName.find(dir)) &&
FcResultMatch==FcPatternGetBool(fs->fonts[i], FC_SCALABLE, 0, &scalable) && scalable)
{
- const QStringList *existing=old.getEntries(fName);
+ const TQStringList *existing=old.getEntries(fName);
if(existing && existing->count())
entries+=(*existing);
@@ -342,7 +342,7 @@ bool create(const QString &dir, CFontEngine &fe)
case CFontEngine::WEIGHT_MEDIUM:
case CFontEngine::WEIGHT_REGULAR:
{
- QString x11Ps(createX11PsName(fe.getFamilyName()));
+ TQString x11Ps(createX11PsName(fe.getFamilyName()));
if(CFontEngine::ITALIC_ITALIC!=fe.getItalic() &&
CFontEngine::ITALIC_OBLIQUE!=fe.getItalic())
@@ -378,11 +378,11 @@ bool create(const QString &dir, CFontEngine &fe)
if(added || entries.count()!=old.getLineCount())
{
KSaveFile out(fmapDir+FONTMAP);
- QTextStream *stream=out.textStream();
+ TQTextStream *stream=out.textStream();
if(stream)
{
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it=entries.begin(); it!=entries.end(); ++it)
*stream << *it << endl;
@@ -403,7 +403,7 @@ bool create(const QString &dir, CFontEngine &fe)
NULL
};
- QString gsFile=locateFile(FONTMAP, constGhostscriptDirs);
+ TQString gsFile=locateFile(FONTMAP, constGhostscriptDirs);
if(!gsFile.isEmpty())
{
@@ -411,11 +411,11 @@ bool create(const QString &dir, CFontEngine &fe)
const char *constRLF=".runlibfile";
char line[constMaxLineLen];
- ifstream in(QFile::encodeName(gsFile));
+ ifstream in(TQFile::encodeName(gsFile));
if(in)
{
- QCString fmap(QFile::encodeName(fmapDir+FONTMAP));
+ TQCString fmap(TQFile::encodeName(fmapDir+FONTMAP));
int lineNum=0,
kfiLine=-1,
gsLine=-1,
@@ -492,7 +492,7 @@ bool create(const QString &dir, CFontEngine &fe)
if(added) // Don't re-write GS's Fontmap unless we've actually added something...
{
KSaveFile out(gsFile);
- QTextStream *stream=out.textStream();
+ TQTextStream *stream=out.textStream();
if(stream)
*stream << buffer;
@@ -507,11 +507,11 @@ bool create(const QString &dir, CFontEngine &fe)
return status;
}
-CFile::CFile(const QString &dir)
+CFile::CFile(const TQString &dir)
: itsDir(dir),
itsLineCount(0)
{
- ifstream f(QFile::encodeName(dir+FONTMAP));
+ ifstream f(TQFile::encodeName(dir+FONTMAP));
itsEntries.setAutoDelete(true);
@@ -528,7 +528,7 @@ CFile::CFile(const QString &dir)
if(!f.eof())
{
- QString ps,
+ TQString ps,
fname;
bool isAlias;
@@ -550,14 +550,14 @@ CFile::CFile(const QString &dir)
}
}
-const QStringList * CFile::getEntries(const QString &fname)
+const TQStringList * CFile::getEntries(const TQString &fname)
{
TEntry *entry=findEntry(0==fname.find(itsDir) ? fname.mid(itsDir.length()) : fname, false);
return entry ? &entry->entries : NULL;
}
-CFile::TEntry * CFile::findEntry(const QString &fname, bool isAlias)
+CFile::TEntry * CFile::findEntry(const TQString &fname, bool isAlias)
{
TEntry *entry=NULL;
@@ -568,7 +568,7 @@ CFile::TEntry * CFile::findEntry(const QString &fname, bool isAlias)
return entry;
}
-CFile::TEntry * CFile::getEntry(TEntry **current, const QString &fname, bool isAlias)
+CFile::TEntry * CFile::getEntry(TEntry **current, const TQString &fname, bool isAlias)
{
//
// See if its the current one...
diff --git a/kcontrol/kfontinst/kfontinst/Fontmap.h b/kcontrol/kfontinst/kfontinst/Fontmap.h
index 28d5c9d7e..92d64f5fb 100644
--- a/kcontrol/kfontinst/kfontinst/Fontmap.h
+++ b/kcontrol/kfontinst/kfontinst/Fontmap.h
@@ -29,8 +29,8 @@
// (C) Craig Drummond, 2003, 2004
////////////////////////////////////////////////////////////////////////////////
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
namespace KFI
{
@@ -45,33 +45,33 @@ namespace Fontmap
struct TEntry
{
- TEntry(const QString &fname) : filename(fname) {}
+ TEntry(const TQString &fname) : filename(fname) {}
- QString filename,
+ TQString filename,
psName;
- QStringList entries;
+ TQStringList entries;
};
public:
- CFile(const QString &dir);
+ CFile(const TQString &dir);
- const QStringList * getEntries(const QString &fname);
+ const TQStringList * getEntries(const TQString &fname);
unsigned int getLineCount() { return itsLineCount; }
private:
- TEntry * findEntry(const QString &fname, bool isAlias=false);
- TEntry * getEntry(TEntry **current, const QString &fname, bool isAlias=false);
+ TEntry * findEntry(const TQString &fname, bool isAlias=false);
+ TEntry * getEntry(TEntry **current, const TQString &fname, bool isAlias=false);
private:
- QString itsDir;
- QPtrList<TEntry> itsEntries;
+ TQString itsDir;
+ TQPtrList<TEntry> itsEntries;
unsigned int itsLineCount;
};
- extern bool create(const QString &dir, CFontEngine &fe);
+ extern bool create(const TQString &dir, CFontEngine &fe);
}
}
diff --git a/kcontrol/kfontinst/kfontinst/Main.cpp b/kcontrol/kfontinst/kfontinst/Main.cpp
index 2da9a8997..a2aa5766b 100644
--- a/kcontrol/kfontinst/kfontinst/Main.cpp
+++ b/kcontrol/kfontinst/kfontinst/Main.cpp
@@ -36,7 +36,7 @@
#include "XConfig.h"
#include "kxftconfig.h"
#include <fontconfig/fontconfig.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <stdio.h>
//
@@ -105,8 +105,8 @@ KFI::CXConfig * getXCfg(bool root)
// ...note on some systems (Solaris and HP-UX) only the xfs file will be found
bool xfs=false;
KFI::CXConfig *xcfg=NULL;
- QString xConfigFile=getFile(QFile::encodeName(constXConfigFiles[0]), constXConfigFiles),
- xfsConfigFile=getFile(QFile::encodeName(constXfsConfigFiles[0]), constXfsConfigFiles);
+ TQString xConfigFile=getFile(TQFile::encodeName(constXConfigFiles[0]), constXConfigFiles),
+ xfsConfigFile=getFile(TQFile::encodeName(constXfsConfigFiles[0]), constXfsConfigFiles);
// If found xfs, but not X - then assume that xfs is being used...
if(!xfsConfigFile.isEmpty() && xConfigFile.isEmpty())
@@ -253,7 +253,7 @@ int main(int argc, char *argv[])
usage(argv[0]);
else
{
- QString folder;
+ TQString folder;
if(folderRequired)
{
@@ -261,15 +261,15 @@ int main(int argc, char *argv[])
unsigned int len=folder.length();
// Remove quotes...
- if( (folder[0]==QChar('\'') || folder[0]==QChar('\"')) &&
- (folder[len-1]==QChar('\'') || folder[len-1]==QChar('\"')))
+ if( (folder[0]==TQChar('\'') || folder[0]==TQChar('\"')) &&
+ (folder[len-1]==TQChar('\'') || folder[len-1]==TQChar('\"')))
folder=folder.mid(1, len-2);
folder=KFI::Misc::dirSyntax(folder);
}
if(folderRequired && !KFI::Misc::dExists(folder))
{
- std::cerr << "ERROR: " << QFile::encodeName(folder) << " does not exist!" << std::endl;
+ std::cerr << "ERROR: " << TQFile::encodeName(folder) << " does not exist!" << std::endl;
rv=-2;
}
else
@@ -323,7 +323,7 @@ int main(int argc, char *argv[])
if(0==rv && doGs)
{
KFI::CFontEngine fe;
- rv=KFI::Fontmap::create(root ? QString::null : folder, fe) ? 0 : -6;
+ rv=KFI::Fontmap::create(root ? TQString::null : folder, fe) ? 0 : -6;
}
}
else if(0==rv)
diff --git a/kcontrol/kfontinst/kfontinst/XConfig.cpp b/kcontrol/kfontinst/kfontinst/XConfig.cpp
index aa63e52af..112ab3d3c 100644
--- a/kcontrol/kfontinst/kfontinst/XConfig.cpp
+++ b/kcontrol/kfontinst/kfontinst/XConfig.cpp
@@ -30,11 +30,11 @@
#include "FontEngine.h"
#include "kxftconfig.h"
#include <ksavefile.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <fstream>
#include <string.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <sys/types.h>
#include <signal.h>
@@ -50,7 +50,7 @@ extern "C" unsigned int kfi_getPid(const char *proc, unsigned int ppid);
namespace KFI
{
-CXConfig::CXConfig(EType type, const QString &file)
+CXConfig::CXConfig(EType type, const TQString &file)
: itsType(type),
itsFileName(file),
itsOk(false),
@@ -60,13 +60,13 @@ CXConfig::CXConfig(EType type, const QString &file)
readConfig();
}
-bool CXConfig::configureDir(const QString &dir)
+bool CXConfig::configureDir(const TQString &dir)
{
//
// On systems without mkfontscale, the following will fail, so cant base
// return value upon that - hence only check return value of mkfontdir
- Misc::doCmd("mkfontscale", QFile::encodeName(dir));
- return Misc::doCmd("mkfontdir", QFile::encodeName(dir));
+ Misc::doCmd("mkfontscale", TQFile::encodeName(dir));
+ return Misc::doCmd("mkfontdir", TQFile::encodeName(dir));
}
bool CXConfig::readConfig()
@@ -144,11 +144,11 @@ bool CXConfig::madeChanges()
return false;
}
-void CXConfig::addPath(const QString &dir, bool unscaled)
+void CXConfig::addPath(const TQString &dir, bool unscaled)
{
if(itsWritable)
{
- QString ds(Misc::dirSyntax(dir));
+ TQString ds(Misc::dirSyntax(dir));
if(Misc::dExists(dir))
{
@@ -184,7 +184,7 @@ void CXConfig::refreshPaths(bool xfs)
if(xfsPid)
{
- QString pid;
+ TQString pid;
kill(xfsPid, SIGUSR1);
}
@@ -194,10 +194,10 @@ void CXConfig::refreshPaths(bool xfs)
Misc::doCmd("xset", "fp", "rehash");
}
-CXConfig::TPath * CXConfig::findPath(const QString &dir)
+CXConfig::TPath * CXConfig::findPath(const TQString &dir)
{
TPath *path=NULL;
- QString ds(Misc::dirSyntax(dir));
+ TQString ds(Misc::dirSyntax(dir));
for(path=itsPaths.first(); path; path=itsPaths.next())
if(path->dir==ds)
@@ -206,7 +206,7 @@ CXConfig::TPath * CXConfig::findPath(const QString &dir)
return NULL;
}
-static void processPath(char *str, QString &path, bool &unscaled)
+static void processPath(char *str, TQString &path, bool &unscaled)
{
char *unsc=NULL;
@@ -396,7 +396,7 @@ static char * getItem(char **start, char **end, const char *key, unsigned int &s
bool CXConfig::processX11(bool read)
{
- std::ifstream x11(QFile::encodeName(itsFileName));
+ std::ifstream x11(TQFile::encodeName(itsFileName));
bool ok=false;
if(x11)
@@ -437,7 +437,7 @@ bool CXConfig::processX11(bool read)
while(NULL!=(item=getItem(&pos, &filesEnd, "FontPath", size, !read, buffer)))
if(read) // Then save paths...
{
- QString path;
+ TQString path;
bool unscaled;
processPath(item, path, unscaled);
@@ -487,7 +487,7 @@ bool CXConfig::processX11(bool read)
for(path=itsPaths.first(); path; path=itsPaths.next())
if(TPath::DIR!=path->type || Misc::dExists(path->dir))
{
- QCString cPath(QFile::encodeName(Misc::xDirSyntax(path->dir)));
+ TQCString cPath(TQFile::encodeName(Misc::xDirSyntax(path->dir)));
fputs(" FontPath \t\"", fstream);
fwrite(cPath.data(), 1, cPath.length(), fstream);
@@ -612,7 +612,7 @@ static char * getXfsPath(char *buffer, unsigned int &totalSize, unsigned int off
bool CXConfig::processXfs(bool read)
{
- std::ifstream xfs(QFile::encodeName(itsFileName));
+ std::ifstream xfs(TQFile::encodeName(itsFileName));
bool ok=false;
if(xfs)
@@ -681,7 +681,7 @@ bool CXConfig::processXfs(bool read)
while(NULL!=(path=getXfsPath(cat, size, size-(cat-buffer))))
if(read)
{
- QString str;
+ TQString str;
bool unscaled;
processPath(path, str, unscaled);
@@ -706,7 +706,7 @@ bool CXConfig::processXfs(bool read)
for(p=itsPaths.first(); p; p=itsPaths.next())
if(Misc::dExists(p->dir))
{
- QCString cPath(QFile::encodeName(Misc::xDirSyntax(p->dir)));
+ TQCString cPath(TQFile::encodeName(Misc::xDirSyntax(p->dir)));
if(!first)
{
@@ -744,11 +744,11 @@ bool CXConfig::processXfs(bool read)
}
-CXConfig::TPath::EType CXConfig::TPath::getType(const QString &d)
+CXConfig::TPath::EType CXConfig::TPath::getType(const TQString &d)
{
- QString str(d);
+ TQString str(d);
- str.replace(QRegExp("\\s*"), "");
+ str.replace(TQRegExp("\\s*"), "");
return 0==str.find("unix/:")
? FONT_SERVER
diff --git a/kcontrol/kfontinst/kfontinst/XConfig.h b/kcontrol/kfontinst/kfontinst/XConfig.h
index 5a8ed1624..127b243fa 100644
--- a/kcontrol/kfontinst/kfontinst/XConfig.h
+++ b/kcontrol/kfontinst/kfontinst/XConfig.h
@@ -30,9 +30,9 @@
///////////////////////////////////////////////////////////////////////////////
#include "Misc.h"
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <time.h>
namespace KFI
@@ -53,12 +53,12 @@ class CXConfig
FONT_CONFIG
};
- TPath(const QString &d, bool u=false, EType t=DIR, bool o=true)
+ TPath(const TQString &d, bool u=false, EType t=DIR, bool o=true)
: dir(DIR==t ? Misc::dirSyntax(d) : d), unscaled(u), orig(o), type(t) {}
- static EType getType(const QString &d);
+ static EType getType(const TQString &d);
- QString dir;
+ TQString dir;
bool unscaled,
orig; // Was dir in file when read?
EType type;
@@ -72,16 +72,16 @@ class CXConfig
public:
- CXConfig(EType type, const QString &file);
+ CXConfig(EType type, const TQString &file);
- static bool configureDir(const QString &dir);
+ static bool configureDir(const TQString &dir);
bool ok() { return itsOk; }
bool writable() { return itsWritable; }
bool readConfig();
bool writeConfig();
bool madeChanges();
- void addPath(const QString &dir, bool unscaled=false);
+ void addPath(const TQString &dir, bool unscaled=false);
bool inPath(TPath::EType type);
bool xfsInPath() { return inPath(TPath::FONT_SERVER); }
bool fcInPath() { return inPath(TPath::FONT_CONFIG); }
@@ -96,13 +96,13 @@ class CXConfig
bool processX11(bool read);
bool processXfs(bool read);
- TPath * findPath(const QString &dir);
+ TPath * findPath(const TQString &dir);
private:
EType itsType;
- QPtrList<TPath> itsPaths;
- QString itsFileName,
+ TQPtrList<TPath> itsPaths;
+ TQString itsFileName,
itsInsertPos;
bool itsOk,
itsWritable;
diff --git a/kcontrol/kfontinst/kio/KioFonts.cpp b/kcontrol/kfontinst/kio/KioFonts.cpp
index e5bc2d6af..ee1d2dc3c 100644
--- a/kcontrol/kfontinst/kio/KioFonts.cpp
+++ b/kcontrol/kfontinst/kio/KioFonts.cpp
@@ -49,13 +49,13 @@
#include <kio/netaccess.h>
#include <kio/slaveinterface.h>
#include <kio/connection.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kmimetype.h>
#include <kmessagebox.h>
#include <kprocess.h>
-#include <qdir.h>
-#include <qdatastream.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqdatastream.h>
+#include <tqregexp.h>
#include <kinstance.h>
#include <klargefile.h>
#include <ktempfile.h>
@@ -76,8 +76,8 @@
#ifdef KFI_FORCE_DEBUG_TO_STDERR
-#include <qtextstream.h>
-QTextOStream ostr(stderr);
+#include <tqtextstream.h>
+TQTextOStream ostr(stderr);
#define KFI_DBUG ostr << "[" << (int)(getpid()) << "] "
#else
@@ -121,32 +121,32 @@ int kdemain(int argc, char **argv)
namespace KFI
{
-inline bool isSysFolder(const QString &sect)
+inline bool isSysFolder(const TQString &sect)
{
return i18n(KFI_KIO_FONTS_SYS)==sect || KFI_KIO_FONTS_SYS==sect;
}
-inline bool isUserFolder(const QString &sect)
+inline bool isUserFolder(const TQString &sect)
{
return i18n(KFI_KIO_FONTS_USER)==sect || KFI_KIO_FONTS_USER==sect;
}
-static QString removeMultipleExtension(const KURL &url)
+static TQString removeMultipleExtension(const KURL &url)
{
- QString fname(url.fileName());
+ TQString fname(url.fileName());
int pos;
- if(-1!=(pos=fname.findRev(QString::fromLatin1(constMultipleExtension))))
+ if(-1!=(pos=fname.findRev(TQString::fromLatin1(constMultipleExtension))))
fname=fname.left(pos);
return fname;
}
-static QString modifyName(const QString &fname)
+static TQString modifyName(const TQString &fname)
{
static const char constSymbols[]={ '-', ' ', ':', 0 };
- QString rv(fname);
+ TQString rv(fname);
int dotPos=rv.findRev('.');
if(-1!=dotPos)
@@ -163,7 +163,7 @@ static QString modifyName(const QString &fname)
return rv;
}
-static int getSize(const QCString &file)
+static int getSize(const TQCString &file)
{
KDE_struct_stat buff;
@@ -185,12 +185,12 @@ static int getSize(const QCString &file)
return -1;
}
-static int getFontSize(const QString &file)
+static int getFontSize(const TQString &file)
{
int size=0;
KURL::List urls;
- QStringList files;
+ TQStringList files;
Misc::getAssociatedUrls(KURL(file), urls);
@@ -205,12 +205,12 @@ static int getFontSize(const QString &file)
files.append((*uIt).path());
}
- QStringList::Iterator it(files.begin()),
+ TQStringList::Iterator it(files.begin()),
end(files.end());
for(; it!=end; ++it)
{
- int s=getSize(QFile::encodeName(*it));
+ int s=getSize(TQFile::encodeName(*it));
if(s>-1)
size+=s;
@@ -219,9 +219,9 @@ static int getFontSize(const QString &file)
return size;
}
-static int getSize(QValueList<FcPattern *> &patterns)
+static int getSize(TQValueList<FcPattern *> &patterns)
{
- QValueList<FcPattern *>::Iterator it,
+ TQValueList<FcPattern *>::Iterator it,
end=patterns.end();
int size=0;
@@ -231,7 +231,7 @@ static int getSize(QValueList<FcPattern *> &patterns)
return size;
}
-static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l, const QString &s=QString::null)
+static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l, const TQString &s=TQString::null)
{
KIO::UDSAtom atom;
atom.m_uds = ID;
@@ -240,12 +240,12 @@ static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l, const QString
entry.append(atom);
}
-static bool createFolderUDSEntry(KIO::UDSEntry &entry, const QString &name, const QString &path, bool sys)
+static bool createFolderUDSEntry(KIO::UDSEntry &entry, const TQString &name, const TQString &path, bool sys)
{
KFI_DBUG << "createFolderUDSEntry " << name << ' ' << path << ' ' << sys << ' ' << endl;
KDE_struct_stat buff;
- QCString cPath(QFile::encodeName(path));
+ TQCString cPath(TQFile::encodeName(path));
entry.clear();
@@ -262,7 +262,7 @@ static bool createFolderUDSEntry(KIO::UDSEntry &entry, const QString &name, cons
if(n!= -1)
buffer2[n]='\0';
- addAtom(entry, KIO::UDS_LINK_DEST, 0, QString::fromLocal8Bit(buffer2));
+ addAtom(entry, KIO::UDS_LINK_DEST, 0, TQString::fromLocal8Bit(buffer2));
if(-1==KDE_stat(cPath, &buff))
{
@@ -282,17 +282,17 @@ static bool createFolderUDSEntry(KIO::UDSEntry &entry, const QString &name, cons
addAtom(entry, KIO::UDS_MODIFICATION_TIME, buff.st_mtime);
struct passwd *user = getpwuid(buff.st_uid);
- addAtom(entry, KIO::UDS_USER, 0, user ? user->pw_name : QString::number(buff.st_uid).latin1());
+ addAtom(entry, KIO::UDS_USER, 0, user ? user->pw_name : TQString::number(buff.st_uid).latin1());
struct group *grp = getgrgid(buff.st_gid);
- addAtom(entry, KIO::UDS_GROUP, 0, grp ? grp->gr_name : QString::number(buff.st_gid).latin1());
+ addAtom(entry, KIO::UDS_GROUP, 0, grp ? grp->gr_name : TQString::number(buff.st_gid).latin1());
addAtom(entry, KIO::UDS_ACCESS_TIME, buff.st_atime);
addAtom(entry, KIO::UDS_MIME_TYPE, 0, sys
? KFI_KIO_FONTS_PROTOCOL"/system-folder"
: KFI_KIO_FONTS_PROTOCOL"/folder");
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, "application/octet-stream");
- QString url(KFI_KIO_FONTS_PROTOCOL+QString::fromLatin1(":/"));
+ TQString url(KFI_KIO_FONTS_PROTOCOL+TQString::fromLatin1(":/"));
return true;
}
else if (sys && !Misc::root()) // Default system fonts folder does not actually exist yet!
@@ -313,7 +313,7 @@ static bool createFolderUDSEntry(KIO::UDSEntry &entry, const QString &name, cons
return false;
}
-static bool createFontUDSEntry(KIO::UDSEntry &entry, const QString &name, QValueList<FcPattern *> &patterns, bool sys)
+static bool createFontUDSEntry(KIO::UDSEntry &entry, const TQString &name, TQValueList<FcPattern *> &patterns, bool sys)
{
KFI_DBUG << "createFontUDSEntry " << name << ' ' << patterns.count() << endl;
@@ -331,8 +331,8 @@ static bool createFontUDSEntry(KIO::UDSEntry &entry, const QString &name, QValue
//
// In case of mixed bitmap/scalable - prefer scalable
- QValueList<FcPattern *> sortedPatterns;
- QValueList<FcPattern *>::Iterator it,
+ TQValueList<FcPattern *> sortedPatterns;
+ TQValueList<FcPattern *>::Iterator it,
end(patterns.end());
FcBool b=FcFalse;
@@ -348,8 +348,8 @@ static bool createFontUDSEntry(KIO::UDSEntry &entry, const QString &name, QValue
for(it=sortedPatterns.begin(); it!=end; ++it)
{
- QString path(CFcEngine::getFcString(*it, FC_FILE));
- QCString cPath(QFile::encodeName(path));
+ TQString path(CFcEngine::getFcString(*it, FC_FILE));
+ TQCString cPath(TQFile::encodeName(path));
KDE_struct_stat buff;
if(-1!=KDE_lstat(cPath, &buff))
@@ -366,7 +366,7 @@ static bool createFontUDSEntry(KIO::UDSEntry &entry, const QString &name, QValue
if(n!= -1)
buffer2[n]='\0';
- addAtom(entry, KIO::UDS_LINK_DEST, 0, QString::fromLocal8Bit(buffer2));
+ addAtom(entry, KIO::UDS_LINK_DEST, 0, TQString::fromLocal8Bit(buffer2));
if(-1==KDE_stat(cPath, &buff))
{
@@ -384,24 +384,24 @@ static bool createFontUDSEntry(KIO::UDSEntry &entry, const QString &name, QValue
addAtom(entry, KIO::UDS_MODIFICATION_TIME, buff.st_mtime);
struct passwd *user = getpwuid(buff.st_uid);
- addAtom(entry, KIO::UDS_USER, 0, user ? user->pw_name : QString::number(buff.st_uid).latin1());
+ addAtom(entry, KIO::UDS_USER, 0, user ? user->pw_name : TQString::number(buff.st_uid).latin1());
struct group *grp = getgrgid(buff.st_gid);
- addAtom(entry, KIO::UDS_GROUP, 0, grp ? grp->gr_name : QString::number(buff.st_gid).latin1());
+ addAtom(entry, KIO::UDS_GROUP, 0, grp ? grp->gr_name : TQString::number(buff.st_gid).latin1());
addAtom(entry, KIO::UDS_ACCESS_TIME, buff.st_atime);
addAtom(entry, KIO::UDS_MIME_TYPE, 0, KMimeType::findByPath(path, 0, true)->name());
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, "application/octet-stream");
- QString url(KFI_KIO_FONTS_PROTOCOL+QString::fromLatin1(":/"));
+ TQString url(KFI_KIO_FONTS_PROTOCOL+TQString::fromLatin1(":/"));
if(!Misc::root())
{
url+=sys ? i18n(KFI_KIO_FONTS_SYS) : i18n(KFI_KIO_FONTS_USER);
- url+=QString::fromLatin1("/");
+ url+=TQString::fromLatin1("/");
}
if(multiple)
- url+=name+QString::fromLatin1(constMultipleExtension);
+ url+=name+TQString::fromLatin1(constMultipleExtension);
else
url+=Misc::getFile(path);
addAtom(entry, KIO::UDS_URL, 0, url);
@@ -423,7 +423,7 @@ static KURL getRedirect(const KURL &u)
// Go from fonts:/System to fonts:/
KURL redirect(u);
- QString path(u.path()),
+ TQString path(u.path()),
sect(CKioFonts::getSect(path));
path.remove(sect);
@@ -439,13 +439,13 @@ static bool nonRootSys(const KURL &u)
return !Misc::root() && isSysFolder(CKioFonts::getSect(u.path()));
}
-static QString getFontFolder(const QString &defaultDir, const QString &root, QStringList &dirs)
+static TQString getFontFolder(const TQString &defaultDir, const TQString &root, TQStringList &dirs)
{
if(dirs.contains(defaultDir))
return defaultDir;
else
{
- QStringList::Iterator it,
+ TQStringList::Iterator it,
end=dirs.end();
bool found=false;
@@ -454,7 +454,7 @@ static QString getFontFolder(const QString &defaultDir, const QString &root, QSt
return *it;
}
- return QString::null;
+ return TQString::null;
}
static bool writeAll(int fd, const char *buf, size_t len)
@@ -479,16 +479,16 @@ static bool checkExt(const char *fname, const char *ext)
: false;
}
-static bool isAAfm(const QString &fname)
+static bool isAAfm(const TQString &fname)
{
- if(checkExt(QFile::encodeName(fname), "afm")) // CPD? Is this a necessary check?
+ if(checkExt(TQFile::encodeName(fname), "afm")) // CPD? Is this a necessary check?
{
- QFile file(fname);
+ TQFile file(fname);
if(file.open(IO_ReadOnly))
{
- QTextStream stream(&file);
- QString line;
+ TQTextStream stream(&file);
+ TQString line;
for(int lc=0; lc<30 && !stream.atEnd(); ++lc)
{
@@ -508,17 +508,17 @@ static bool isAAfm(const QString &fname)
return false;
}
-static bool isAPfm(const QString &fname)
+static bool isAPfm(const TQString &fname)
{
bool ok=false;
// I know extension checking is bad, but Ghostscript's pf2afm requires the pfm file to
// have the .pfm extension...
- if(checkExt(QFile::encodeName(fname), "pfm"))
+ if(checkExt(TQFile::encodeName(fname), "pfm"))
{
//
// OK, the extension matches, so perform a little contents checking...
- FILE *f=fopen(QFile::encodeName(fname).data(), "r");
+ FILE *f=fopen(TQFile::encodeName(fname).data(), "r");
if(f)
{
@@ -561,14 +561,14 @@ static bool isAPfm(const QString &fname)
//
// This function is *only* used for the generation of AFMs from PFMs.
-static bool isAType1(const QString &fname)
+static bool isAType1(const TQString &fname)
{
static const char * constStr="%!PS-AdobeFont-";
static const unsigned int constStrLen=15;
static const unsigned int constPfbOffset=6;
static const unsigned int constPfbLen=constStrLen+constPfbOffset;
- QCString name(QFile::encodeName(fname));
+ TQCString name(TQFile::encodeName(fname));
char buffer[constPfbLen];
bool match=false;
@@ -600,53 +600,53 @@ static bool isAType1(const QString &fname)
return match;
}
-static QString getMatch(const QString &file, const char *extension)
+static TQString getMatch(const TQString &file, const char *extension)
{
- QString f(Misc::changeExt(file, extension));
+ TQString f(Misc::changeExt(file, extension));
- return Misc::fExists(f) ? f : QString::null;
+ return Misc::fExists(f) ? f : TQString::null;
}
inline bool isHidden(const KURL &u)
{
- return QChar('.')==u.fileName()[0];
+ return TQChar('.')==u.fileName()[0];
}
struct FontList
{
struct Path
{
- Path(const QString &p=QString::null) : orig(p) { }
+ Path(const TQString &p=TQString::null) : orig(p) { }
- QString orig,
+ TQString orig,
modified;
bool operator==(const Path &p) const { return p.orig==orig; }
};
- FontList(const QString &n=QString::null, const QString &p=QString::null) : name(n) { if(!p.isEmpty()) paths.append(Path(p)); }
+ FontList(const TQString &n=TQString::null, const TQString &p=TQString::null) : name(n) { if(!p.isEmpty()) paths.append(Path(p)); }
- QString name;
- QValueList<Path> paths;
+ TQString name;
+ TQValueList<Path> paths;
bool operator==(const FontList &f) const { return f.name==name; }
};
//
// This function returns a set of maping of from -> to for copy/move operations
-static bool getFontList(const QStringList &files, QMap<QString, QString> &map)
+static bool getFontList(const TQStringList &files, TQMap<TQString, TQString> &map)
{
//
// First of all create a list of font files, and their paths
- QStringList::ConstIterator it=files.begin(),
+ TQStringList::ConstIterator it=files.begin(),
end=files.end();
- QValueList<FontList> list;
+ TQValueList<FontList> list;
for(;it!=end; ++it)
{
- QString name(Misc::getFile(*it)),
+ TQString name(Misc::getFile(*it)),
path(Misc::getDir(*it));
- QValueList<FontList>::Iterator entry=list.find(FontList(name));
+ TQValueList<FontList>::Iterator entry=list.find(FontList(name));
if(entry!=list.end())
{
@@ -657,12 +657,12 @@ static bool getFontList(const QStringList &files, QMap<QString, QString> &map)
list.append(FontList(name, path));
}
- QValueList<FontList>::Iterator fIt(list.begin()),
+ TQValueList<FontList>::Iterator fIt(list.begin()),
fEnd(list.end());
for(; fIt!=fEnd; ++fIt)
{
- QValueList<FontList::Path>::Iterator pBegin((*fIt).paths.begin()),
+ TQValueList<FontList::Path>::Iterator pBegin((*fIt).paths.begin()),
pIt(++pBegin),
pEnd((*fIt).paths.end());
--pBegin;
@@ -705,7 +705,7 @@ static bool getFontList(const QStringList &files, QMap<QString, QString> &map)
return list.count() ? true : false;
}
-CKioFonts::CKioFonts(const QCString &pool, const QCString &app)
+CKioFonts::CKioFonts(const TQCString &pool, const TQCString &app)
: KIO::SlaveBase(KFI_KIO_FONTS_PROTOCOL, pool, app),
itsRoot(Misc::root()),
itsUsingFcFpe(false),
@@ -735,7 +735,7 @@ CKioFonts::CKioFonts(const QCString &pool, const QCString &app)
// 4. If either are not found, then add to local.conf / .fonts.conf
FcStrList *list=FcConfigGetFontDirs(FcInitLoadConfigAndFonts());
- QStringList dirs;
+ TQStringList dirs;
FcChar8 *dir;
while((dir=FcStrListNext(list)))
@@ -745,8 +745,8 @@ CKioFonts::CKioFonts(const QCString &pool, const QCString &app)
if(!itsRoot)
{
- QString home(Misc::dirSyntax(QDir::homeDirPath())),
- defaultDir(Misc::dirSyntax(QDir::homeDirPath()+"/.fonts/")),
+ TQString home(Misc::dirSyntax(TQDir::homeDirPath())),
+ defaultDir(Misc::dirSyntax(TQDir::homeDirPath()+"/.fonts/")),
dir(getFontFolder(defaultDir, home, dirs));
if(dir.isEmpty()) // Then no $HOME/ was found in fontconfigs dirs!
@@ -760,7 +760,7 @@ CKioFonts::CKioFonts(const QCString &pool, const QCString &app)
itsFolders[FOLDER_USER].location=dir;
}
- QString sysDefault("/usr/local/share/fonts/"),
+ TQString sysDefault("/usr/local/share/fonts/"),
sysDir(getFontFolder(sysDefault, "/usr/local/share/", dirs));
if(sysDir.isEmpty())
@@ -804,9 +804,9 @@ CKioFonts::CKioFonts(const QCString &pool, const QCString &app)
}
else
{
- QString str(paths[path]);
+ TQString str(paths[path]);
- str.replace(QRegExp("\\s*"), "");
+ str.replace(TQRegExp("\\s*"), "");
if(0==str.find("unix/:"))
itsUsingXfsFpe=true;
@@ -833,14 +833,14 @@ void CKioFonts::listDir(const KURL &url)
KIO::UDSEntry entry;
int size=0;
- if(itsRoot || QStringList::split('/', url.path(), false).count()!=0)
+ if(itsRoot || TQStringList::split('/', url.path(), false).count()!=0)
{
EFolder folder=getFolder(url);
totalSize(itsFolders[folder].fontMap.count());
if(itsFolders[folder].fontMap.count())
{
- QMap<QString, QValueList<FcPattern *> >::Iterator it=itsFolders[folder].fontMap.begin(),
+ TQMap<TQString, TQValueList<FcPattern *> >::Iterator it=itsFolders[folder].fontMap.begin(),
end=itsFolders[folder].fontMap.end();
for ( ; it != end; ++it)
@@ -874,7 +874,7 @@ void CKioFonts::stat(const KURL &url)
if(updateFontList() && checkUrl(url, true))
{
- QString path(url.path(-1));
+ TQString path(url.path(-1));
if(path.isEmpty())
{
@@ -882,7 +882,7 @@ void CKioFonts::stat(const KURL &url)
return;
}
- QStringList pathList(QStringList::split('/', path, false));
+ TQStringList pathList(TQStringList::split('/', path, false));
KIO::UDSEntry entry;
bool err=false;
@@ -925,7 +925,7 @@ bool CKioFonts::createStatEntry(KIO::UDSEntry &entry, const KURL &url, EFolder f
{
KFI_DBUG << "createStatEntry " << url.path() << endl;
- QMap<QString, QValueList<FcPattern *> >::Iterator it=getMap(url);
+ TQMap<TQString, TQValueList<FcPattern *> >::Iterator it=getMap(url);
if(it!=itsFolders[folder].fontMap.end())
return createFontUDSEntry(entry, it.key(), it.data(), FOLDER_SYS==folder);
@@ -937,7 +937,7 @@ void CKioFonts::get(const KURL &url)
KFI_DBUG << "get " << url.path() << " query:" << url.query() << endl;
bool thumb="1"==metaData("thumbnail");
- QStringList srcFiles;
+ TQStringList srcFiles;
if(updateFontList() && checkUrl(url) && getSourceFiles(url, srcFiles)) // Any error will be logged in getSourceFiles
{
@@ -948,8 +948,8 @@ void CKioFonts::get(const KURL &url)
// read this and just ask Xft/fontconfig for the font data.
if(thumb)
{
- QByteArray array;
- QTextOStream stream(array);
+ TQByteArray array;
+ TQTextOStream stream(array);
emit mimeType("text/plain");
@@ -959,13 +959,13 @@ void CKioFonts::get(const KURL &url)
totalSize(array.size());
data(array);
processedSize(array.size());
- data(QByteArray());
+ data(TQByteArray());
processedSize(array.size());
finished();
return;
}
- QString realPath,
+ TQString realPath,
useMime;
KDE_struct_stat buff;
bool multiple=false;
@@ -982,11 +982,11 @@ void CKioFonts::get(const KURL &url)
if(tar.open(IO_WriteOnly))
{
- QMap<QString, QString> map;
+ TQMap<TQString, TQString> map;
getFontList(srcFiles, map);
- QMap<QString, QString>::Iterator fIt(map.begin()),
+ TQMap<TQString, TQString>::Iterator fIt(map.begin()),
fEnd(map.end());
//
@@ -999,7 +999,7 @@ void CKioFonts::get(const KURL &url)
}
}
- QCString realPathC(QFile::encodeName(realPath));
+ TQCString realPathC(TQFile::encodeName(realPath));
KFI_DBUG << "real: " << realPathC << endl;
if (-2==KDE_stat(realPathC.data(), &buff))
@@ -1024,7 +1024,7 @@ void CKioFonts::get(const KURL &url)
KIO::filesize_t processed=0;
char buffer[MAX_IPC_SIZE];
- QByteArray array;
+ TQByteArray array;
while(1)
{
@@ -1050,7 +1050,7 @@ void CKioFonts::get(const KURL &url)
processedSize(processed);
}
- data(QByteArray());
+ data(TQByteArray());
close(fd);
processedSize(buff.st_size);
@@ -1080,9 +1080,9 @@ void CKioFonts::put(const KURL &u, int mode, bool overwrite, bool resume)
bool changed=confirmUrl(url),
nrs=nonRootSys(url);
EFolder destFolder(getFolder(url));
- QString dest=itsFolders[destFolder].location+modifyName(url.fileName()),
+ TQString dest=itsFolders[destFolder].location+modifyName(url.fileName()),
passwd;
- QCString destC=QFile::encodeName(dest);
+ TQCString destC=TQFile::encodeName(dest);
KDE_struct_stat buffDest;
bool destExists=(KDE_lstat(destC.data(), &buffDest)!= -1);
@@ -1111,7 +1111,7 @@ void CKioFonts::put(const KURL &u, int mode, bool overwrite, bool resume)
// an AFM or PFM file
// 3. If its OK, then get the fonts "name" from
KTempFile tmpFile;
- QCString tmpFileC(QFile::encodeName(tmpFile.name()));
+ TQCString tmpFileC(TQFile::encodeName(tmpFile.name()));
tmpFile.setAutoDelete(true);
@@ -1122,20 +1122,20 @@ void CKioFonts::put(const KURL &u, int mode, bool overwrite, bool resume)
if(nrs) // Ask root to copy the font...
{
- QCString cmd;
+ TQCString cmd;
if(!Misc::dExists(itsFolders[destFolder].location))
{
cmd+="mkdir ";
- cmd+=QFile::encodeName(KProcess::quote(itsFolders[destFolder].location));
+ cmd+=TQFile::encodeName(KProcess::quote(itsFolders[destFolder].location));
cmd+=" && chmod 0755 ";
- cmd+=QFile::encodeName(KProcess::quote(itsFolders[destFolder].location));
+ cmd+=TQFile::encodeName(KProcess::quote(itsFolders[destFolder].location));
cmd+=" && ";
}
cmd+="cp -f ";
- cmd+=QFile::encodeName(KProcess::quote(tmpFileC));
+ cmd+=TQFile::encodeName(KProcess::quote(tmpFileC));
cmd+=" ";
- cmd+=QFile::encodeName(KProcess::quote(destC));
+ cmd+=TQFile::encodeName(KProcess::quote(destC));
cmd+=" && chmod 0644 ";
cmd+=destC;
@@ -1177,16 +1177,16 @@ void CKioFonts::put(const KURL &u, int mode, bool overwrite, bool resume)
}
}
-bool CKioFonts::putReal(const QString &destOrig, const QCString &destOrigC, bool origExists,
+bool CKioFonts::putReal(const TQString &destOrig, const TQCString &destOrigC, bool origExists,
int mode, bool resume)
{
bool markPartial=config()->readBoolEntry("MarkPartial", true);
- QString dest;
+ TQString dest;
if (markPartial)
{
- QString destPart(destOrig+QString::fromLatin1(".part"));
- QCString destPartC(QFile::encodeName(destPart));
+ TQString destPart(destOrig+TQString::fromLatin1(".part"));
+ TQCString destPartC(TQFile::encodeName(destPart));
dest = destPart;
@@ -1218,7 +1218,7 @@ bool CKioFonts::putReal(const QString &destOrig, const QCString &destOrigC, bool
// Catch errors when we try to open the file.
}
- QCString destC(QFile::encodeName(dest));
+ TQCString destC(TQFile::encodeName(dest));
int fd;
@@ -1244,7 +1244,7 @@ bool CKioFonts::putReal(const QString &destOrig, const QCString &destOrigC, bool
// Loop until we got 0 (end of data)
do
{
- QByteArray buffer;
+ TQByteArray buffer;
dataReq(); // Request for data
result = readData(buffer);
@@ -1324,14 +1324,14 @@ void CKioFonts::copy(const KURL &src, const KURL &d, int mode, bool overwrite)
{
//checkUrl(u) // CPD as per comment in ::put()
- QStringList srcFiles;
+ TQStringList srcFiles;
if(getSourceFiles(src, srcFiles)) // Any error will be logged in getSourceFiles
{
KURL dest(d);
bool changed=confirmUrl(dest);
EFolder destFolder(getFolder(dest));
- QMap<QString, QString> map;
+ TQMap<TQString, TQString> map;
if(!fromFonts)
map[src.path()]=src.fileName();
@@ -1345,28 +1345,28 @@ void CKioFonts::copy(const KURL &src, const KURL &d, int mode, bool overwrite)
{
if(nonRootSys(dest))
{
- QCString cmd;
+ TQCString cmd;
int size=0;
if(!Misc::dExists(itsFolders[destFolder].location))
{
cmd+="mkdir ";
- cmd+=QFile::encodeName(KProcess::quote(itsFolders[destFolder].location));
+ cmd+=TQFile::encodeName(KProcess::quote(itsFolders[destFolder].location));
cmd+=" && chmod 0755 ";
- cmd+=QFile::encodeName(KProcess::quote(itsFolders[destFolder].location));
+ cmd+=TQFile::encodeName(KProcess::quote(itsFolders[destFolder].location));
cmd+=" && ";
}
- QMap<QString, QString>::Iterator fIt(map.begin()),
+ TQMap<TQString, TQString>::Iterator fIt(map.begin()),
fEnd(map.end());
for(; fIt!=fEnd; ++fIt)
{
cmd+="cp -f ";
- cmd+=QFile::encodeName(KProcess::quote(fIt.key()));
+ cmd+=TQFile::encodeName(KProcess::quote(fIt.key()));
cmd+=" ";
- cmd+=QFile::encodeName(KProcess::quote(itsFolders[destFolder].location+modifyName(fIt.data())));
- int s=getSize(QFile::encodeName(fIt.key()));
+ cmd+=TQFile::encodeName(KProcess::quote(itsFolders[destFolder].location+modifyName(fIt.data())));
+ int s=getSize(TQFile::encodeName(fIt.key()));
if(s>0)
size+=s;
if(++fIt!=fEnd)
@@ -1379,7 +1379,7 @@ void CKioFonts::copy(const KURL &src, const KURL &d, int mode, bool overwrite)
totalSize(size);
- QString passwd=getRootPasswd();
+ TQString passwd=getRootPasswd();
if(doRootCmd(cmd, passwd))
{
@@ -1396,13 +1396,13 @@ void CKioFonts::copy(const KURL &src, const KURL &d, int mode, bool overwrite)
}
else
{
- QMap<QString, QString>::Iterator fIt(map.begin()),
+ TQMap<TQString, TQString>::Iterator fIt(map.begin()),
fEnd(map.end());
for(; fIt!=fEnd; ++fIt)
{
- QCString realSrc(QFile::encodeName(fIt.key())),
- realDest(QFile::encodeName(itsFolders[destFolder].location+modifyName(fIt.data())));
+ TQCString realSrc(TQFile::encodeName(fIt.key())),
+ realDest(TQFile::encodeName(itsFolders[destFolder].location+modifyName(fIt.data())));
KDE_struct_stat buffSrc;
if(-1==KDE_stat(realSrc.data(), &buffSrc))
@@ -1437,7 +1437,7 @@ void CKioFonts::copy(const KURL &src, const KURL &d, int mode, bool overwrite)
KIO::filesize_t processed = 0;
char buffer[MAX_IPC_SIZE];
- QByteArray array;
+ TQByteArray array;
while(1)
{
@@ -1521,34 +1521,34 @@ void CKioFonts::rename(const KURL &src, const KURL &d, bool overwrite)
// Can't rename from/to file:/ -> therefore rename can only be from fonts:/System to fonts:/Personal,
// or vice versa.
- QStringList srcFiles;
+ TQStringList srcFiles;
if(getSourceFiles(src, srcFiles)) // Any error will be logged in getSourceFiles
{
KURL dest(d);
bool changed=confirmUrl(dest);
EFolder destFolder(getFolder(dest));
- QMap<QString, QString> map;
+ TQMap<TQString, TQString> map;
if(confirmMultiple(src, srcFiles, FOLDER_SYS==destFolder ? FOLDER_USER : FOLDER_SYS, OP_MOVE) &&
getFontList(srcFiles, map) &&
checkDestFiles(src, map, dest, destFolder, overwrite))
{
- QMap<QString, QString>::Iterator fIt(map.begin()),
+ TQMap<TQString, TQString>::Iterator fIt(map.begin()),
fEnd(map.end());
bool askPasswd=true,
toSys=FOLDER_SYS==destFolder;
- QCString userId,
+ TQCString userId,
groupId,
- destDir(QFile::encodeName(KProcess::quote(itsFolders[destFolder].location)));
+ destDir(TQFile::encodeName(KProcess::quote(itsFolders[destFolder].location)));
userId.setNum(toSys ? 0 : getuid());
groupId.setNum(toSys ? 0 : getgid());
for(; fIt!=fEnd; ++fIt)
{
- QCString cmd,
- destFile(QFile::encodeName(KProcess::quote(itsFolders[destFolder].location+fIt.data())));
+ TQCString cmd,
+ destFile(TQFile::encodeName(KProcess::quote(itsFolders[destFolder].location+fIt.data())));
if(toSys && !Misc::dExists(itsFolders[destFolder].location))
{
@@ -1558,7 +1558,7 @@ void CKioFonts::rename(const KURL &src, const KURL &d, bool overwrite)
}
cmd+="mv -f ";
- cmd+=QFile::encodeName(KProcess::quote(fIt.key()));
+ cmd+=TQFile::encodeName(KProcess::quote(fIt.key()));
cmd+=" ";
cmd+=destFile;
cmd+=" && chmod -f 0644 ";
@@ -1570,7 +1570,7 @@ void CKioFonts::rename(const KURL &src, const KURL &d, bool overwrite)
cmd+=" ";
cmd+=destFile;
- QString sysDir,
+ TQString sysDir,
userDir;
if(FOLDER_SYS==destFolder)
@@ -1610,28 +1610,28 @@ void CKioFonts::del(const KURL &url, bool)
{
KFI_DBUG << "del " << url.path() << endl;
- QValueList<FcPattern *> *entries;
+ TQValueList<FcPattern *> *entries;
if(checkUrl(url) && checkAllowed(url) &&
updateFontList() && (entries=getEntries(url)) && entries->count() &&
confirmMultiple(url, entries, getFolder(url), OP_DELETE))
{
- QValueList<FcPattern *>::Iterator it,
+ TQValueList<FcPattern *>::Iterator it,
end=entries->end();
CDirList modifiedDirs;
bool clearList=KFI_KIO_NO_CLEAR!=url.query();
if(nonRootSys(url))
{
- QCString cmd("rm -f");
+ TQCString cmd("rm -f");
for(it=entries->begin(); it!=end; ++it)
{
- QString file(CFcEngine::getFcString(*it, FC_FILE));
+ TQString file(CFcEngine::getFcString(*it, FC_FILE));
modifiedDirs.add(Misc::getDir(file));
cmd+=" ";
- cmd+=QFile::encodeName(KProcess::quote(file));
+ cmd+=TQFile::encodeName(KProcess::quote(file));
KURL::List urls;
@@ -1645,7 +1645,7 @@ void CKioFonts::del(const KURL &url, bool)
for(uIt=urls.begin(); uIt!=uEnd; ++uIt)
{
cmd+=" ";
- cmd+=QFile::encodeName(KProcess::quote((*uIt).path()));
+ cmd+=TQFile::encodeName(KProcess::quote((*uIt).path()));
}
}
}
@@ -1662,9 +1662,9 @@ void CKioFonts::del(const KURL &url, bool)
{
for(it=entries->begin(); it!=end; ++it)
{
- QString file(CFcEngine::getFcString(*it, FC_FILE));
+ TQString file(CFcEngine::getFcString(*it, FC_FILE));
- if (0!=unlink(QFile::encodeName(file).data()))
+ if (0!=unlink(TQFile::encodeName(file).data()))
error(EACCES==errno || EPERM==errno
? KIO::ERR_ACCESS_DENIED
: EISDIR==errno
@@ -1685,7 +1685,7 @@ void CKioFonts::del(const KURL &url, bool)
uEnd=urls.end();
for(uIt=urls.begin(); uIt!=uEnd; ++uIt)
- unlink(QFile::encodeName((*uIt).path()).data());
+ unlink(TQFile::encodeName((*uIt).path()).data());
}
}
}
@@ -1732,13 +1732,13 @@ void CKioFonts::modified(EFolder folder, bool clearList, const CDirList &dirs)
clearFontList(); // List of fonts has changed.../
}
-void CKioFonts::special(const QByteArray &a)
+void CKioFonts::special(const TQByteArray &a)
{
KFI_DBUG << "special" << endl;
if(a.size())
{
- QDataStream stream(a, IO_ReadOnly);
+ TQDataStream stream(a, IO_ReadOnly);
int cmd;
stream >> cmd;
@@ -1760,14 +1760,14 @@ void CKioFonts::special(const QByteArray &a)
finished();
break;
default:
- error( KIO::ERR_UNSUPPORTED_ACTION, QString::number(cmd));
+ error( KIO::ERR_UNSUPPORTED_ACTION, TQString::number(cmd));
}
}
else
doModified();
}
-void CKioFonts::createRootRefreshCmd(QCString &cmd, const CDirList &dirs, bool reparseCfg)
+void CKioFonts::createRootRefreshCmd(TQCString &cmd, const CDirList &dirs, bool reparseCfg)
{
if(reparseCfg)
reparseConfig();
@@ -1784,7 +1784,7 @@ void CKioFonts::createRootRefreshCmd(QCString &cmd, const CDirList &dirs, bool r
for(; it!=end; ++it)
{
- QCString tmpCmd;
+ TQCString tmpCmd;
if(*it==itsFolders[FOLDER_SYS].location)
{
@@ -1800,7 +1800,7 @@ void CKioFonts::createRootRefreshCmd(QCString &cmd, const CDirList &dirs, bool r
cmd+=" && kfontinst ";
cmd+=tmpCmd;
cmd+=" ";
- cmd+=QFile::encodeName(KProcess::quote(*it));
+ cmd+=TQFile::encodeName(KProcess::quote(*it));
}
}
}
@@ -1809,7 +1809,7 @@ void CKioFonts::createRootRefreshCmd(QCString &cmd, const CDirList &dirs, bool r
cmd+=" && kfontinst ";
cmd+=itsNrsKfiParams;
cmd+=" ";
- cmd+=QFile::encodeName(KProcess::quote(itsFolders[FOLDER_SYS].location));
+ cmd+=TQFile::encodeName(KProcess::quote(itsFolders[FOLDER_SYS].location));
}
}
@@ -1846,7 +1846,7 @@ void CKioFonts::doModified()
for(; it!=end; ++it)
{
- Misc::doCmd("kfontinst", itsKfiParams, QFile::encodeName(*it));
+ Misc::doCmd("kfontinst", itsKfiParams, TQFile::encodeName(*it));
KFI_DBUG << "RUN(root): kfontinst " << itsKfiParams << ' ' << *it << endl;
}
@@ -1859,7 +1859,7 @@ void CKioFonts::doModified()
}
else
{
- QCString cmd;
+ TQCString cmd;
createRootRefreshCmd(cmd, itsFolders[FOLDER_SYS].modified, false);
if(doRootCmd(cmd, false) && itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location))
@@ -1885,7 +1885,7 @@ void CKioFonts::doModified()
for(; it!=end; ++it)
{
- Misc::doCmd("kfontinst", itsKfiParams, QFile::encodeName(*it));
+ Misc::doCmd("kfontinst", itsKfiParams, TQFile::encodeName(*it));
KFI_DBUG << "RUN(non-root): kfontinst " << itsKfiParams << ' ' << *it << endl;
}
}
@@ -1896,14 +1896,14 @@ void CKioFonts::doModified()
}
#define SYS_USER "root"
-QString CKioFonts::getRootPasswd(bool askPasswd)
+TQString CKioFonts::getRootPasswd(bool askPasswd)
{
KFI_DBUG << "getRootPasswd" << endl;
KIO::AuthInfo authInfo;
SuProcess proc(SYS_USER);
bool error=false;
int attempts=0;
- QString errorMsg;
+ TQString errorMsg;
authInfo.url=KURL(KFI_KIO_FONTS_PROTOCOL ":///");
authInfo.username=SYS_USER;
@@ -1923,10 +1923,10 @@ QString CKioFonts::getRootPasswd(bool askPasswd)
}
else
error=proc.checkInstall(authInfo.password.local8Bit()) ? true : false;
- return error ? QString::null : authInfo.password;
+ return error ? TQString::null : authInfo.password;
}
-bool CKioFonts::doRootCmd(const char *cmd, const QString &passwd)
+bool CKioFonts::doRootCmd(const char *cmd, const TQString &passwd)
{
KFI_DBUG << "doRootCmd " << cmd << endl;
@@ -1950,7 +1950,7 @@ bool CKioFonts::confirmUrl(KURL &url)
KFI_DBUG << "confirmUrl " << url.path() << endl;
if(!itsRoot)
{
- QString sect(getSect(url.path()));
+ TQString sect(getSect(url.path()));
if(!isSysFolder(sect) && !isUserFolder(sect))
{
@@ -1971,12 +1971,12 @@ bool CKioFonts::confirmUrl(KURL &url)
if(changeToSystem)
{
itsLastDest=DEST_SYS;
- url.setPath(QChar('/')+i18n(KFI_KIO_FONTS_SYS)+QChar('/')+url.fileName());
+ url.setPath(TQChar('/')+i18n(KFI_KIO_FONTS_SYS)+TQChar('/')+url.fileName());
}
else
{
itsLastDest=DEST_USER;
- url.setPath(QChar('/')+i18n(KFI_KIO_FONTS_USER)+QChar('/')+url.fileName());
+ url.setPath(TQChar('/')+i18n(KFI_KIO_FONTS_USER)+TQChar('/')+url.fileName());
}
KFI_DBUG << "Changed URL to:" << url.path() << endl;
@@ -2030,25 +2030,25 @@ bool CKioFonts::updateFontList()
if (itsFontList)
{
- QString home(Misc::dirSyntax(QDir::homeDirPath()));
+ TQString home(Misc::dirSyntax(TQDir::homeDirPath()));
for (int i = 0; i < itsFontList->nfont; i++)
{
EFolder folder=FOLDER_SYS;
- QString file(Misc::fileSyntax(CFcEngine::getFcString(itsFontList->fonts[i], FC_FILE)));
+ TQString file(Misc::fileSyntax(CFcEngine::getFcString(itsFontList->fonts[i], FC_FILE)));
if(!file.isEmpty())
{
if(!itsRoot && 0==file.find(home))
folder=FOLDER_USER;
- QValueList<FcPattern *> &patterns=
+ TQValueList<FcPattern *> &patterns=
itsFolders[folder].fontMap[CFcEngine::createName(itsFontList->fonts[i])];
bool use=true;
if(patterns.count()) // Check for duplicates...
{
- QValueList<FcPattern *>::Iterator it,
+ TQValueList<FcPattern *>::Iterator it,
end=patterns.end();
for(it=patterns.begin(); use && it!=end; ++it)
@@ -2076,10 +2076,10 @@ CKioFonts::EFolder CKioFonts::getFolder(const KURL &url)
return itsRoot || isSysFolder(getSect(url.path())) ? FOLDER_SYS : FOLDER_USER;
}
-QMap<QString, QValueList<FcPattern *> >::Iterator CKioFonts::getMap(const KURL &url)
+TQMap<TQString, TQValueList<FcPattern *> >::Iterator CKioFonts::getMap(const KURL &url)
{
EFolder folder(getFolder(url));
- QMap<QString, QValueList<FcPattern *> >::Iterator it=itsFolders[folder].fontMap.find(removeMultipleExtension(url));
+ TQMap<TQString, TQValueList<FcPattern *> >::Iterator it=itsFolders[folder].fontMap.find(removeMultipleExtension(url));
if(it==itsFolders[folder].fontMap.end()) // Perhaps it was fonts:/System/times.ttf ???
{
@@ -2092,9 +2092,9 @@ QMap<QString, QValueList<FcPattern *> >::Iterator CKioFonts::getMap(const KURL &
return it;
}
-QValueList<FcPattern *> * CKioFonts::getEntries(const KURL &url)
+TQValueList<FcPattern *> * CKioFonts::getEntries(const KURL &url)
{
- QMap<QString, QValueList<FcPattern *> >::Iterator it=getMap(url);
+ TQMap<TQString, TQValueList<FcPattern *> >::Iterator it=getMap(url);
if(it!=itsFolders[getFolder(url)].fontMap.end())
return &(it.data());
@@ -2103,14 +2103,14 @@ QValueList<FcPattern *> * CKioFonts::getEntries(const KURL &url)
return NULL;
}
-FcPattern * CKioFonts::getEntry(EFolder folder, const QString &file, bool full)
+FcPattern * CKioFonts::getEntry(EFolder folder, const TQString &file, bool full)
{
- QMap<QString, QValueList<FcPattern *> >::Iterator it,
+ TQMap<TQString, TQValueList<FcPattern *> >::Iterator it,
end=itsFolders[folder].fontMap.end();
for(it=itsFolders[folder].fontMap.begin(); it!=end; ++it)
{
- QValueList<FcPattern *>::Iterator patIt,
+ TQValueList<FcPattern *>::Iterator patIt,
patEnd=it.data().end();
for(patIt=it.data().begin(); patIt!=patEnd; ++patIt)
@@ -2122,9 +2122,9 @@ FcPattern * CKioFonts::getEntry(EFolder folder, const QString &file, bool full)
return NULL;
}
-bool CKioFonts::checkFile(const QString &file)
+bool CKioFonts::checkFile(const TQString &file)
{
- QCString cFile(QFile::encodeName(file));
+ TQCString cFile(TQFile::encodeName(file));
//
// To speed things up, check the files extension 1st...
@@ -2135,7 +2135,7 @@ bool CKioFonts::checkFile(const QString &file)
//
// No exension match, so try querying with FreeType...
int count=0;
- FcPattern *pat=FcFreeTypeQuery((const FcChar8 *)(QFile::encodeName(file).data()), 0, NULL, &count);
+ FcPattern *pat=FcFreeTypeQuery((const FcChar8 *)(TQFile::encodeName(file).data()), 0, NULL, &count);
if(pat)
{
@@ -2148,15 +2148,15 @@ bool CKioFonts::checkFile(const QString &file)
return false;
}
-bool CKioFonts::getSourceFiles(const KURL &src, QStringList &files)
+bool CKioFonts::getSourceFiles(const KURL &src, TQStringList &files)
{
if(KFI_KIO_FONTS_PROTOCOL==src.protocol())
{
- QValueList<FcPattern *> *entries=getEntries(src);
+ TQValueList<FcPattern *> *entries=getEntries(src);
if(entries && entries->count())
{
- QValueList<FcPattern *>::Iterator it,
+ TQValueList<FcPattern *>::Iterator it,
end=entries->end();
for(it=entries->begin(); it!=end; ++it)
@@ -2165,7 +2165,7 @@ bool CKioFonts::getSourceFiles(const KURL &src, QStringList &files)
if(files.count())
{
- QStringList::Iterator sIt,
+ TQStringList::Iterator sIt,
sEnd=files.end();
for(sIt=files.begin(); sIt!=sEnd; ++sIt)
@@ -2195,12 +2195,12 @@ bool CKioFonts::getSourceFiles(const KURL &src, QStringList &files)
if(files.count())
{
- QStringList::Iterator it,
+ TQStringList::Iterator it,
end=files.end();
for(it=files.begin(); it!=end; ++it)
{
- QCString realSrc=QFile::encodeName(*it);
+ TQCString realSrc=TQFile::encodeName(*it);
KDE_struct_stat buffSrc;
if (-1==KDE_stat(realSrc.data(), &buffSrc))
@@ -2241,7 +2241,7 @@ bool CKioFonts::checkDestFile(const KURL &src, const KURL &dest, EFolder destFol
return true;
}
-bool CKioFonts::checkDestFiles(const KURL &src, QMap<QString, QString> &map, const KURL &dest, EFolder destFolder, bool overwrite)
+bool CKioFonts::checkDestFiles(const KURL &src, TQMap<TQString, TQString> &map, const KURL &dest, EFolder destFolder, bool overwrite)
{
//
// Check whether files exist at destination...
@@ -2256,7 +2256,7 @@ bool CKioFonts::checkDestFiles(const KURL &src, QMap<QString, QString> &map, con
if(!overwrite)
{
- QMap<QString, QString>::Iterator fIt(map.begin()),
+ TQMap<TQString, TQString>::Iterator fIt(map.begin()),
fEnd(map.end());
for(; fIt!=fEnd; ++fIt)
@@ -2273,14 +2273,14 @@ bool CKioFonts::checkDestFiles(const KURL &src, QMap<QString, QString> &map, con
//
// Gather the number and names of the font faces located in "files". If there is more than 1 face
// (such as there would be for a TTC font), then ask the user for confirmation of the action.
-bool CKioFonts::confirmMultiple(const KURL &url, const QStringList &files, EFolder folder, EOp op)
+bool CKioFonts::confirmMultiple(const KURL &url, const TQStringList &files, EFolder folder, EOp op)
{
if(KFI_KIO_FONTS_PROTOCOL!=url.protocol())
return true;
- QStringList::ConstIterator it,
+ TQStringList::ConstIterator it,
end=files.end();
- QStringList fonts;
+ TQStringList fonts;
for(it=files.begin(); it!=files.end(); ++it)
{
@@ -2288,7 +2288,7 @@ bool CKioFonts::confirmMultiple(const KURL &url, const QStringList &files, EFold
if(pat)
{
- QString name(CFcEngine::createName(pat));
+ TQString name(CFcEngine::createName(pat));
if(-1==fonts.findIndex(name))
fonts.append(name);
@@ -2297,12 +2297,12 @@ bool CKioFonts::confirmMultiple(const KURL &url, const QStringList &files, EFold
if(fonts.count()>1)
{
- QString out;
- QStringList::Iterator it,
+ TQString out;
+ TQStringList::Iterator it,
end=fonts.end();
for(it=fonts.begin(); it!=end; ++it)
- out+=QString("<li>")+*it+QString("</li>");
+ out+=TQString("<li>")+*it+TQString("</li>");
if(KMessageBox::No==messageBox(QuestionYesNo,
OP_MOVE==op
@@ -2328,16 +2328,16 @@ bool CKioFonts::confirmMultiple(const KURL &url, const QStringList &files, EFold
return true;
}
-bool CKioFonts::confirmMultiple(const KURL &url, QValueList<FcPattern *> *patterns, EFolder folder, EOp op)
+bool CKioFonts::confirmMultiple(const KURL &url, TQValueList<FcPattern *> *patterns, EFolder folder, EOp op)
{
if(KFI_KIO_FONTS_PROTOCOL!=url.protocol())
return true;
- QStringList files;
+ TQStringList files;
if(patterns && patterns->count())
{
- QValueList<FcPattern *>::Iterator it,
+ TQValueList<FcPattern *>::Iterator it,
end=patterns->end();
for(it=patterns->begin(); it!=end; ++it)
@@ -2351,7 +2351,7 @@ bool CKioFonts::checkUrl(const KURL &u, bool rootOk)
{
if(KFI_KIO_FONTS_PROTOCOL==u.protocol() && (!rootOk || (rootOk && "/"!=u.path())))
{
- QString sect(getSect(u.path()));
+ TQString sect(getSect(u.path()));
if(itsRoot)
{
@@ -2381,12 +2381,12 @@ bool CKioFonts::checkAllowed(const KURL &u)
{
if (KFI_KIO_FONTS_PROTOCOL==u.protocol())
{
- QString ds(Misc::dirSyntax(u.path()));
+ TQString ds(Misc::dirSyntax(u.path()));
- if(ds==QString(QChar('/')+i18n(KFI_KIO_FONTS_USER)+QChar('/')) ||
- ds==QString(QChar('/')+i18n(KFI_KIO_FONTS_SYS)+QChar('/')) ||
- ds==QString(QChar('/')+QString::fromLatin1(KFI_KIO_FONTS_USER)+QChar('/')) ||
- ds==QString(QChar('/')+QString::fromLatin1(KFI_KIO_FONTS_SYS)+QChar('/')))
+ if(ds==TQString(TQChar('/')+i18n(KFI_KIO_FONTS_USER)+TQChar('/')) ||
+ ds==TQString(TQChar('/')+i18n(KFI_KIO_FONTS_SYS)+TQChar('/')) ||
+ ds==TQString(TQChar('/')+TQString::fromLatin1(KFI_KIO_FONTS_USER)+TQChar('/')) ||
+ ds==TQString(TQChar('/')+TQString::fromLatin1(KFI_KIO_FONTS_SYS)+TQChar('/')))
{
error(KIO::ERR_SLAVE_DEFINED, i18n("Sorry, you cannot rename, move, copy, or delete either \"%1\" or \"%2\".")
.arg(i18n(KFI_KIO_FONTS_USER)).arg(i18n(KFI_KIO_FONTS_SYS))); \
@@ -2399,7 +2399,7 @@ bool CKioFonts::checkAllowed(const KURL &u)
//
// Create an AFM from a Type 1 (pfa/pfb) font and its PFM file...
-void CKioFonts::createAfm(const QString &file, bool nrs, const QString &passwd)
+void CKioFonts::createAfm(const TQString &file, bool nrs, const TQString &passwd)
{
if(nrs && passwd.isEmpty())
return;
@@ -2409,12 +2409,12 @@ void CKioFonts::createAfm(const QString &file, bool nrs, const QString &passwd)
if(type1 || pfm)
{
- QString afm=getMatch(file, "afm"); // pf2afm wants files with lowercase extension, so just check for lowercase!
+ TQString afm=getMatch(file, "afm"); // pf2afm wants files with lowercase extension, so just check for lowercase!
// -- when a font is installed, the extensio is converted to lowercase anyway...
if(afm.isEmpty()) // No point creating if AFM already exists!
{
- QString pfm,
+ TQString pfm,
t1;
if(type1) // Its a Type1, so look for existing PFM
@@ -2432,16 +2432,16 @@ void CKioFonts::createAfm(const QString &file, bool nrs, const QString &passwd)
if(!t1.isEmpty() && !pfm.isEmpty()) // Do we have both Type1 and PFM?
{
- QString name(t1.left(t1.length()-4)); // pf2afm wants name without extension...
+ TQString name(t1.left(t1.length()-4)); // pf2afm wants name without extension...
if(nrs)
{
- QCString cmd("pf2afm ");
- cmd+=QFile::encodeName(KProcess::quote(name));
+ TQCString cmd("pf2afm ");
+ cmd+=TQFile::encodeName(KProcess::quote(name));
doRootCmd(cmd, passwd);
}
else
- Misc::doCmd("pf2afm", QFile::encodeName(name));
+ Misc::doCmd("pf2afm", TQFile::encodeName(name));
}
}
}
diff --git a/kcontrol/kfontinst/kio/KioFonts.h b/kcontrol/kfontinst/kio/KioFonts.h
index abfd6b042..57dc8516a 100644
--- a/kcontrol/kfontinst/kio/KioFonts.h
+++ b/kcontrol/kfontinst/kio/KioFonts.h
@@ -34,10 +34,10 @@
#include <kio/slavebase.h>
#include <kurl.h>
#include <klocale.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include "Misc.h"
#include "KfiConstants.h"
@@ -80,24 +80,24 @@ class CKioFonts : public KIO::SlaveBase
public:
CDirList() { }
- CDirList(const QString &str) : QStringList(str) { }
+ CDirList(const TQString &str) : TQStringList(str) { }
- void add(const QString &d) { if (!contains(d)) append(d); }
+ void add(const TQString &d) { if (!contains(d)) append(d); }
};
struct TFolder
{
- QString location;
+ TQString location;
CDirList modified;
- QMap<QString, QValueList<FcPattern *> > fontMap; // Maps from "Times New Roman" -> $HOME/.fonts/times.ttf
+ TQMap<TQString, TQValueList<FcPattern *> > fontMap; // Maps from "Times New Roman" -> $HOME/.fonts/times.ttf
};
public:
- CKioFonts(const QCString &pool, const QCString &app);
+ CKioFonts(const TQCString &pool, const TQCString &app);
virtual ~CKioFonts();
- static QString getSect(const QString &f) { return f.section('/', 1, 1); }
+ static TQString getSect(const TQString &f) { return f.section('/', 1, 1); }
void listDir(const KURL &url);
void stat(const KURL &url);
@@ -110,30 +110,30 @@ class CKioFonts : public KIO::SlaveBase
private:
- bool putReal(const QString &destOrig, const QCString &destOrigC, bool origExists, int mode, bool resume);
+ bool putReal(const TQString &destOrig, const TQCString &destOrigC, bool origExists, int mode, bool resume);
void modified(EFolder folder, bool clearList=true, const CDirList &dirs=CDirList());
- void special(const QByteArray &a);
- void createRootRefreshCmd(QCString &cmd, const CDirList &dirs=CDirList(), bool reparseCfg=true);
+ void special(const TQByteArray &a);
+ void createRootRefreshCmd(TQCString &cmd, const CDirList &dirs=CDirList(), bool reparseCfg=true);
void doModified();
- QString getRootPasswd(bool askPasswd=true);
- bool doRootCmd(const char *cmd, const QString &passwd);
+ TQString getRootPasswd(bool askPasswd=true);
+ bool doRootCmd(const char *cmd, const TQString &passwd);
bool doRootCmd(const char *cmd, bool askPasswd=true) { return doRootCmd(cmd, getRootPasswd(askPasswd)); }
bool confirmUrl(KURL &url);
void clearFontList();
bool updateFontList();
EFolder getFolder(const KURL &url);
- QMap<QString, QValueList<FcPattern *> >::Iterator getMap(const KURL &url);
- QValueList<FcPattern *> * getEntries(const KURL &url);
- FcPattern * getEntry(EFolder folder, const QString &file, bool full=false);
- bool checkFile(const QString &file);
- bool getSourceFiles(const KURL &src, QStringList &files);
+ TQMap<TQString, TQValueList<FcPattern *> >::Iterator getMap(const KURL &url);
+ TQValueList<FcPattern *> * getEntries(const KURL &url);
+ FcPattern * getEntry(EFolder folder, const TQString &file, bool full=false);
+ bool checkFile(const TQString &file);
+ bool getSourceFiles(const KURL &src, TQStringList &files);
bool checkDestFile(const KURL &src, const KURL &dest, EFolder destFolder, bool overwrite);
- bool checkDestFiles(const KURL &src, QMap<QString, QString> &map, const KURL &dest, EFolder destFolder, bool overwrite);
- bool confirmMultiple(const KURL &url, const QStringList &files, EFolder folder, EOp op);
- bool confirmMultiple(const KURL &url, QValueList<FcPattern *> *patterns, EFolder folder, EOp op);
+ bool checkDestFiles(const KURL &src, TQMap<TQString, TQString> &map, const KURL &dest, EFolder destFolder, bool overwrite);
+ bool confirmMultiple(const KURL &url, const TQStringList &files, EFolder folder, EOp op);
+ bool confirmMultiple(const KURL &url, TQValueList<FcPattern *> *patterns, EFolder folder, EOp op);
bool checkUrl(const KURL &u, bool rootOk=false);
bool checkAllowed(const KURL &u);
- void createAfm(const QString &file, bool nrs=false, const QString &passwd=QString::null);
+ void createAfm(const TQString &file, bool nrs=false, const TQString &passwd=TQString::null);
void reparseConfig();
private:
@@ -144,7 +144,7 @@ class CKioFonts : public KIO::SlaveBase
itsUsingXfsFpe,
itsHasSys,
itsAddToSysFc;
- QString itsPasswd;
+ TQString itsPasswd;
unsigned int itsFontChanges;
EDest itsLastDest;
time_t itsLastDestTime,
diff --git a/kcontrol/kfontinst/lib/FcEngine.cpp b/kcontrol/kfontinst/lib/FcEngine.cpp
index 0b3e51767..44d180fd2 100644
--- a/kcontrol/kfontinst/lib/FcEngine.cpp
+++ b/kcontrol/kfontinst/lib/FcEngine.cpp
@@ -1,8 +1,8 @@
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qfontmetrics.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqfontmetrics.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kurl.h>
#include <kconfig.h>
#include <kglobalsettings.h>
@@ -23,7 +23,7 @@
#define KFI_PREVIEW_STRING_KEY "String"
#ifdef HAVE_XFT
-#define KFI_DISPLAY(pix) (pix ? pix->x11Display() : QPaintDevice::x11AppDisplay())
+#define KFI_DISPLAY(pix) (pix ? pix->x11Display() : TQPaintDevice::x11AppDisplay())
#endif
namespace KFI
@@ -73,25 +73,25 @@ static int fcToQtWeight(int weight)
case FC_WEIGHT_THIN:
return 0;
case FC_WEIGHT_ULTRALIGHT:
- return QFont::Light>>1;
+ return TQFont::Light>>1;
case FC_WEIGHT_LIGHT:
- return QFont::Light;
+ return TQFont::Light;
default:
case FC_WEIGHT_NORMAL:
- return QFont::Normal;
+ return TQFont::Normal;
case FC_WEIGHT_MEDIUM:
#ifdef KFI_HAVE_MEDIUM_WEIGHT
- return (QFont::Normal+QFont::DemiBold)>>1;
+ return (TQFont::Normal+TQFont::DemiBold)>>1;
#endif
- return QFont::Normal;
+ return TQFont::Normal;
case FC_WEIGHT_SEMIBOLD:
- return QFont::DemiBold;
+ return TQFont::DemiBold;
case FC_WEIGHT_BOLD:
- return QFont::Bold;
+ return TQFont::Bold;
case FC_WEIGHT_ULTRABOLD:
- return (QFont::Bold+QFont::Black)>>1;
+ return (TQFont::Bold+TQFont::Black)>>1;
case FC_WEIGHT_HEAVY:
- return QFont::Black;
+ return TQFont::Black;
}
}
@@ -130,24 +130,24 @@ static int fcToQtWidth(int weight)
switch(weight)
{
case FC_WIDTH_ULTRACONDENSED:
- return QFont::UltraCondensed;
+ return TQFont::UltraCondensed;
case FC_WIDTH_EXTRACONDENSED:
- return QFont::ExtraCondensed;
+ return TQFont::ExtraCondensed;
case FC_WIDTH_CONDENSED:
- return QFont::Condensed;
+ return TQFont::Condensed;
case FC_WIDTH_SEMICONDENSED:
- return QFont::SemiCondensed;
+ return TQFont::SemiCondensed;
default:
case FC_WIDTH_NORMAL:
- return QFont::Unstretched;
+ return TQFont::Unstretched;
case FC_WIDTH_SEMIEXPANDED:
- return QFont::SemiExpanded;
+ return TQFont::SemiExpanded;
case FC_WIDTH_EXPANDED:
- return QFont::Expanded;
+ return TQFont::Expanded;
case FC_WIDTH_EXTRAEXPANDED:
- return QFont::ExtraExpanded;
+ return TQFont::ExtraExpanded;
case FC_WIDTH_ULTRAEXPANDED:
- return QFont::UltraExpanded;
+ return TQFont::UltraExpanded;
}
}
#endif
@@ -183,7 +183,7 @@ static int fcSpacing(int spacing)
return FC_CHARCELL;
}
-static int strToWeight(const QString &str, QString &newStr)
+static int strToWeight(const TQString &str, TQString &newStr)
{
if(0==str.find(i18n(KFI_WEIGHT_THIN), 0, false))
{
@@ -261,7 +261,7 @@ static int strToWeight(const QString &str, QString &newStr)
}
#ifndef KFI_FC_NO_WIDTHS
-static int strToWidth(const QString &str, QString &newStr)
+static int strToWidth(const TQString &str, TQString &newStr)
{
if(0==str.find(i18n(KFI_WIDTH_ULTRACONDENSED), 0, false))
{
@@ -314,7 +314,7 @@ static int strToWidth(const QString &str, QString &newStr)
}
#endif
-static int strToSlant(const QString &str)
+static int strToSlant(const TQString &str)
{
if(-1!=str.find(i18n(KFI_SLANT_ITALIC)))
return FC_SLANT_ITALIC;
@@ -323,9 +323,9 @@ static int strToSlant(const QString &str)
return FC_SLANT_ROMAN;
}
-static void drawText(QPainter &painter, int x, int y, int width, const QString &str)
+static void drawText(TQPainter &painter, int x, int y, int width, const TQString &str)
{
- QString s(str);
+ TQString s(str);
bool addedElipses=false;
width-=x*2;
@@ -366,7 +366,7 @@ inline bool equalSlant(int a, int b)
}
#ifdef HAVE_XFT
-static bool drawChar(QPixmap &pix, XftDraw *xftDraw, XftFont *xftFont, XftColor *xftCol, const QString &text, int pos,
+static bool drawChar(TQPixmap &pix, XftDraw *xftDraw, XftFont *xftFont, XftColor *xftCol, const TQString &text, int pos,
int &x, int &y, int w, int h, int fSize, int offset)
{
XGlyphInfo extents;
@@ -389,7 +389,7 @@ static bool drawChar(QPixmap &pix, XftDraw *xftDraw, XftFont *xftFont, XftColor
return false;
}
-static bool drawString(QPixmap &pix, XftDraw *xftDraw, XftFont *xftFont, XftColor *xftCol, const QString &text,
+static bool drawString(TQPixmap &pix, XftDraw *xftDraw, XftFont *xftFont, XftColor *xftCol, const TQString &text,
int x, int &y, int h, int offset)
{
XGlyphInfo extents;
@@ -406,7 +406,7 @@ static bool drawString(QPixmap &pix, XftDraw *xftDraw, XftFont *xftFont, XftColo
return false;
}
-static bool drawGlyph(QPixmap &pix, XftDraw *xftDraw, XftFont *xftFont, XftColor *xftCol, FT_UInt i,
+static bool drawGlyph(TQPixmap &pix, XftDraw *xftDraw, XftFont *xftFont, XftColor *xftCol, FT_UInt i,
int &x, int &y, int &w, int &h, int fSize, int offset)
{
XGlyphInfo extents;
@@ -430,10 +430,10 @@ static bool drawGlyph(QPixmap &pix, XftDraw *xftDraw, XftFont *xftFont, XftColor
inline int point2Pixel(int point)
{
- return (point*QPaintDevice::x11AppDpiX()+36)/72;
+ return (point*TQPaintDevice::x11AppDpiX()+36)/72;
}
-static bool hasStr(XftFont *font, QString &str)
+static bool hasStr(XftFont *font, TQString &str)
{
unsigned int slen=str.length(),
ch;
@@ -457,7 +457,7 @@ CFcEngine::~CFcEngine()
FcConfigAppFontClear(FcConfigGetCurrent());
}
-QString CFcEngine::getName(const KURL &url, int faceNo)
+TQString CFcEngine::getName(const KURL &url, int faceNo)
{
if(url!=itsLastUrl || faceNo!=itsIndex)
parseUrl(url, faceNo);
@@ -466,7 +466,7 @@ QString CFcEngine::getName(const KURL &url, int faceNo)
}
#ifdef HAVE_XFT
-bool CFcEngine::draw(const KURL &url, int w, int h, QPixmap &pix, int faceNo, bool thumb)
+bool CFcEngine::draw(const KURL &url, int w, int h, TQPixmap &pix, int faceNo, bool thumb)
{
bool rv=false;
@@ -493,7 +493,7 @@ bool CFcEngine::draw(const KURL &url, int w, int h, QPixmap &pix, int faceNo, bo
pix.resize(w, h);
pix.fill(Qt::white);
- QPainter painter(&pix);
+ TQPainter painter(&pix);
getSizes(&pix);
@@ -519,7 +519,7 @@ bool CFcEngine::draw(const KURL &url, int w, int h, QPixmap &pix, int faceNo, bo
if(thumb)
{
- QString text(i18n("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789"));
+ TQString text(i18n("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789"));
//
// Calculate size of text...
@@ -569,7 +569,7 @@ bool CFcEngine::draw(const KURL &url, int w, int h, QPixmap &pix, int faceNo, bo
}
else
{
- QString lowercase(getLowercaseLetters()),
+ TQString lowercase(getLowercaseLetters()),
uppercase(getUppercaseLetters()),
punctuation(getPunctuation()),
title(itsDescriptiveName.isEmpty()
@@ -614,7 +614,7 @@ bool CFcEngine::draw(const KURL &url, int w, int h, QPixmap &pix, int faceNo, bo
y+=8;
}
- QString previewString(getPreviewString());
+ TQString previewString(getPreviewString());
bool stop=false;
if(!drawGlyphs)
@@ -685,20 +685,20 @@ bool CFcEngine::draw(const KURL &url, int w, int h, QPixmap &pix, int faceNo, bo
}
#endif
-QString CFcEngine::getPreviewString()
+TQString CFcEngine::getPreviewString()
{
KConfig cfg(KFI_UI_CFG_FILE);
cfg.setGroup(KFI_PREVIEW_GROUP);
- QString str(cfg.readEntry(KFI_PREVIEW_STRING_KEY));
+ TQString str(cfg.readEntry(KFI_PREVIEW_STRING_KEY));
return str.isEmpty() ? i18n("A sentence that uses all of the letters of the alphabet",
"The quick brown fox jumps over the lazy dog")
: str;
}
-void CFcEngine::setPreviewString(const QString &str)
+void CFcEngine::setPreviewString(const TQString &str)
{
KConfig cfg(KFI_UI_CFG_FILE);
@@ -706,36 +706,36 @@ void CFcEngine::setPreviewString(const QString &str)
cfg.writeEntry(KFI_PREVIEW_STRING_KEY, str);
}
-QString CFcEngine::getUppercaseLetters()
+TQString CFcEngine::getUppercaseLetters()
{
return i18n("All of the letters of the alphabet, uppercase", "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
}
-QString CFcEngine::getLowercaseLetters()
+TQString CFcEngine::getLowercaseLetters()
{
return i18n("All of the letters of the alphabet, lowercase", "abcdefghijklmnopqrstuvwxyz");
}
-QString CFcEngine::getPunctuation()
+TQString CFcEngine::getPunctuation()
{
return i18n("Numbers and characters", "0123456789.:,;(*!?'/\\\")£$€%^&-+@~#<>{}[]");
}
-QString CFcEngine::getFcString(FcPattern *pat, const char *val, int faceNo)
+TQString CFcEngine::getFcString(FcPattern *pat, const char *val, int faceNo)
{
- QString rv;
+ TQString rv;
FcChar8 *fcStr;
if(FcResultMatch==FcPatternGetString(pat, val, faceNo, &fcStr))
- rv=QString::fromUtf8((char *)fcStr);
+ rv=TQString::fromUtf8((char *)fcStr);
return rv;
}
-QString CFcEngine::createName(FcPattern *pat, int faceNo)
+TQString CFcEngine::createName(FcPattern *pat, int faceNo)
{
//CPD: TODO: the names *need* to match up with kfontchooser's...
- QString name(getFcString(pat, FC_FAMILY, faceNo)),
+ TQString name(getFcString(pat, FC_FAMILY, faceNo)),
str;
int intVal;
bool comma=false;
@@ -745,7 +745,7 @@ QString CFcEngine::createName(FcPattern *pat, int faceNo)
str=weightStr(intVal);
if(!str.isEmpty())
{
- name+=QString(", ")+str;
+ name+=TQString(", ")+str;
comma=true;
}
}
@@ -757,10 +757,10 @@ QString CFcEngine::createName(FcPattern *pat, int faceNo)
{
if(!comma)
{
- name+=QChar(',');
+ name+=TQChar(',');
comma=true;
}
- name+=QChar(' ')+str;
+ name+=TQChar(' ')+str;
}
}
@@ -769,14 +769,14 @@ QString CFcEngine::createName(FcPattern *pat, int faceNo)
{
str=widthStr(intVal);
if(!str.isEmpty())
- name+=QChar(' ')+str;
+ name+=TQChar(' ')+str;
}
#endif
return name;
}
-QString CFcEngine::weightStr(int weight, bool emptyNormal)
+TQString CFcEngine::weightStr(int weight, bool emptyNormal)
{
switch(fcWeight(weight))
{
@@ -787,7 +787,7 @@ QString CFcEngine::weightStr(int weight, bool emptyNormal)
case FC_WEIGHT_LIGHT:
return i18n(KFI_WEIGHT_LIGHT);
case FC_WEIGHT_NORMAL:
- return emptyNormal ? QString::null : i18n(KFI_WEIGHT_NORMAL);
+ return emptyNormal ? TQString::null : i18n(KFI_WEIGHT_NORMAL);
case FC_WEIGHT_MEDIUM:
return i18n(KFI_WEIGHT_MEDIUM);
case FC_WEIGHT_DEMIBOLD:
@@ -802,7 +802,7 @@ QString CFcEngine::weightStr(int weight, bool emptyNormal)
}
#ifndef KFI_FC_NO_WIDTHS
-QString CFcEngine::widthStr(int width, bool emptyNormal)
+TQString CFcEngine::widthStr(int width, bool emptyNormal)
{
switch(fcWidth(width))
{
@@ -815,7 +815,7 @@ QString CFcEngine::widthStr(int width, bool emptyNormal)
case FC_WIDTH_SEMICONDENSED:
return i18n(KFI_WIDTH_SEMICONDENSED);
case FC_WIDTH_NORMAL:
- return emptyNormal ? QString::null : i18n(KFI_WIDTH_NORMAL);
+ return emptyNormal ? TQString::null : i18n(KFI_WIDTH_NORMAL);
case FC_WIDTH_SEMIEXPANDED:
return i18n(KFI_WIDTH_SEMIEXPANDED);
case FC_WIDTH_EXPANDED:
@@ -828,7 +828,7 @@ QString CFcEngine::widthStr(int width, bool emptyNormal)
}
#endif
-QString CFcEngine::slantStr(int slant, bool emptyNormal)
+TQString CFcEngine::slantStr(int slant, bool emptyNormal)
{
switch(fcSlant(slant))
{
@@ -837,11 +837,11 @@ QString CFcEngine::slantStr(int slant, bool emptyNormal)
case FC_SLANT_ITALIC:
return i18n(KFI_SLANT_ITALIC);
default:
- return emptyNormal ? QString::null : i18n(KFI_SLANT_ROMAN);
+ return emptyNormal ? TQString::null : i18n(KFI_SLANT_ROMAN);
}
}
-QString CFcEngine::spacingStr(int spacing)
+TQString CFcEngine::spacingStr(int spacing)
{
switch(fcSpacing(spacing))
{
@@ -854,11 +854,11 @@ QString CFcEngine::spacingStr(int spacing)
}
}
-bool CFcEngine::getInfo(const KURL &url, int faceNo, QString &full, QString &family, QString &foundry, QString &weight,
+bool CFcEngine::getInfo(const KURL &url, int faceNo, TQString &full, TQString &family, TQString &foundry, TQString &weight,
#ifndef KFI_FC_NO_WIDTHS
- QString &width,
+ TQString &width,
#endif
- QString &spacing, QString &slant)
+ TQString &spacing, TQString &slant)
{
if(parseUrl(url, faceNo, true))
{
@@ -887,11 +887,11 @@ bool CFcEngine::getInfo(const KURL &url, int faceNo, QString &full, QString &fam
return false;
}
-QFont CFcEngine::getQFont(const QString &name, int size)
+TQFont CFcEngine::getQFont(const TQString &name, int size)
{
parseName(name, 0, false);
- QFont font(itsName, size, fcToQtWeight(itsWeight), fcToQtSlant(itsSlant));
+ TQFont font(itsName, size, fcToQtWeight(itsWeight), fcToQtSlant(itsSlant));
#ifndef KFI_FC_NO_WIDTHS
font.setStretch(fcToQtWidth(itsWidth));
@@ -912,7 +912,7 @@ bool CFcEngine::parseUrl(const KURL &url, int faceNo, bool all)
if(KFI_KIO_FONTS_PROTOCOL==url.protocol())
{
KIO::UDSEntry udsEntry;
- QString name;
+ TQString name;
FcInitReinitialize();
if(KIO::NetAccess::stat(url, udsEntry, NULL)) // Need to stat the url to get its font name...
@@ -939,13 +939,13 @@ bool CFcEngine::parseUrl(const KURL &url, int faceNo, bool all)
else if(url.isLocalFile())
{
// Now lets see if its from the thumbnail job! if so, then file will just contain the URL!
- QFile file(url.path());
+ TQFile file(url.path());
bool isThumbnailUrl=false;
if(file.size()<2048 && file.open(IO_ReadOnly)) // Urls should be less than 2k, and fonts usually above!
{
- QString thumbUrl;
- QTextStream stream(&file);
+ TQString thumbUrl;
+ TQTextStream stream(&file);
thumbUrl=stream.readLine();
isThumbnailUrl=0==thumbUrl.find(KFI_KIO_FONTS_PROTOCOL) && parseUrl(KURL(thumbUrl), faceNo, all);
@@ -957,7 +957,7 @@ bool CFcEngine::parseUrl(const KURL &url, int faceNo, bool all)
itsName=url.path();
int count;
- FcPattern *pat=FcFreeTypeQuery((const FcChar8 *)(QFile::encodeName(itsName).data()), 0, NULL, &count);
+ FcPattern *pat=FcFreeTypeQuery((const FcChar8 *)(TQFile::encodeName(itsName).data()), 0, NULL, &count);
itsWeight=FC_WEIGHT_NORMAL;
#ifndef KFI_FC_NO_WIDTHS
@@ -984,7 +984,7 @@ bool CFcEngine::parseUrl(const KURL &url, int faceNo, bool all)
FcPatternDestroy(pat);
}
else
- itsDescriptiveName=QString::null;
+ itsDescriptiveName=TQString::null;
itsInstalled=false;
itsIndex=faceNo;
@@ -997,7 +997,7 @@ bool CFcEngine::parseUrl(const KURL &url, int faceNo, bool all)
return true;
}
-void CFcEngine::parseName(const QString &name, int faceNo, bool all)
+void CFcEngine::parseName(const TQString &name, int faceNo, bool all)
{
int pos;
@@ -1014,7 +1014,7 @@ void CFcEngine::parseName(const QString &name, int faceNo, bool all)
}
else
{
- QString style(name.mid(pos+2));
+ TQString style(name.mid(pos+2));
itsWeight=strToWeight(style, style);
#ifndef KFI_FC_NO_WIDTHS
@@ -1052,7 +1052,7 @@ void CFcEngine::parseName(const QString &name, int faceNo, bool all)
}
#ifdef HAVE_XFT
-XftFont * CFcEngine::getFont(int size, QPixmap *pix)
+XftFont * CFcEngine::getFont(int size, TQPixmap *pix)
{
if(itsInstalled)
return XftFontOpen(KFI_DISPLAY(pix), 0,
@@ -1067,7 +1067,7 @@ XftFont * CFcEngine::getFont(int size, QPixmap *pix)
else
{
FcPattern *pattern = FcPatternBuild(NULL,
- FC_FILE, FcTypeString, QFile::encodeName(itsName).data(),
+ FC_FILE, FcTypeString, TQFile::encodeName(itsName).data(),
FC_INDEX, FcTypeInteger, itsIndex,
FC_PIXEL_SIZE, FcTypeDouble, (double)size,
NULL);
@@ -1075,7 +1075,7 @@ XftFont * CFcEngine::getFont(int size, QPixmap *pix)
}
}
-void CFcEngine::getSizes(QPixmap *pix)
+void CFcEngine::getSizes(TQPixmap *pix)
{
static const int constNumSizes=11;
static const int constNumSizeRanges=2;
@@ -1152,7 +1152,7 @@ void CFcEngine::getSizes(QPixmap *pix)
FcResultMatch==FcPatternGetInteger(f->pattern, FC_WIDTH, 0, &iv) && equalWidth(iv, itsWidth) &&
#endif
FcResultMatch==FcPatternGetString(f->pattern, FC_FAMILY, 0, &str) && str &&
- QString::fromUtf8((char *)str)==itsName)
+ TQString::fromUtf8((char *)str)==itsName)
{
itsSizes.push_back(constSizes[l][i]);
gotSizes=true;
diff --git a/kcontrol/kfontinst/lib/FcEngine.h b/kcontrol/kfontinst/lib/FcEngine.h
index 4a09b8a55..594a9192a 100644
--- a/kcontrol/kfontinst/lib/FcEngine.h
+++ b/kcontrol/kfontinst/lib/FcEngine.h
@@ -5,9 +5,9 @@
#include "config.h"
#endif
-#include <qstring.h>
-#include <qvaluevector.h>
-#include <qfont.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
+#include <tqfont.h>
#include <kurl.h>
#include <kdeversion.h>
#include <fontconfig/fontconfig.h>
@@ -53,33 +53,33 @@ class KDE_EXPORT CFcEngine
~CFcEngine();
#ifdef HAVE_XFT
- bool draw(const KURL &url, int w, int h, QPixmap &pix, int faceNo, bool thumb);
+ bool draw(const KURL &url, int w, int h, TQPixmap &pix, int faceNo, bool thumb);
#endif
int getNumIndexes() { return itsIndexCount; } // Only valid after draw has been called!
- QString getName(const KURL &url, int faceNo=0);
- bool getInfo(const KURL &url, int faceNo, QString &full, QString &family, QString &foundry, QString &weight,
+ TQString getName(const KURL &url, int faceNo=0);
+ bool getInfo(const KURL &url, int faceNo, TQString &full, TQString &family, TQString &foundry, TQString &weight,
#ifndef KFI_FC_NO_WIDTHS
- QString &width,
+ TQString &width,
#endif
- QString &spacing, QString &slant);
- QFont getQFont(const QString &name, int size);
+ TQString &spacing, TQString &slant);
+ TQFont getQFont(const TQString &name, int size);
- const QValueVector<int> & sizes() const { return itsSizes; }
+ const TQValueVector<int> & sizes() const { return itsSizes; }
int alphaSize() const { return itsAlphaSize; }
- static QString getPreviewString();
- static void setPreviewString(const QString &str);
- static QString getUppercaseLetters();
- static QString getLowercaseLetters();
- static QString getPunctuation();
- static QString getFcString(FcPattern *pat, const char *val, int faceNo=0);
- static QString createName(FcPattern *pat, int faceNo=0);
- static QString weightStr(int weight, bool emptyNormal=true);
+ static TQString getPreviewString();
+ static void setPreviewString(const TQString &str);
+ static TQString getUppercaseLetters();
+ static TQString getLowercaseLetters();
+ static TQString getPunctuation();
+ static TQString getFcString(FcPattern *pat, const char *val, int faceNo=0);
+ static TQString createName(FcPattern *pat, int faceNo=0);
+ static TQString weightStr(int weight, bool emptyNormal=true);
#ifndef KFI_FC_NO_WIDTHS
- static QString widthStr(int width, bool emptyNormal=true);
+ static TQString widthStr(int width, bool emptyNormal=true);
#endif
- static QString slantStr(int slant, bool emptyNormal=true);
- static QString spacingStr(int spacing);
+ static TQString slantStr(int slant, bool emptyNormal=true);
+ static TQString spacingStr(int spacing);
static const int constScalableSizes[];
static const int constDefaultAlphaSize;
@@ -87,16 +87,16 @@ class KDE_EXPORT CFcEngine
private:
bool parseUrl(const KURL &url, int faceNo, bool all=false);
- void parseName(const QString &name, int faceNo, bool all=false);
+ void parseName(const TQString &name, int faceNo, bool all=false);
#ifdef HAVE_XFT
- XftFont * getFont(int size, QPixmap *pix=NULL);
- void getSizes(QPixmap *pix=NULL);
+ XftFont * getFont(int size, TQPixmap *pix=NULL);
+ void getSizes(TQPixmap *pix=NULL);
#endif
private:
bool itsInstalled;
- QString itsName,
+ TQString itsName,
itsDescriptiveName,
itsFoundry;
int itsIndex,
@@ -108,7 +108,7 @@ class KDE_EXPORT CFcEngine
itsSlant,
itsSpacing,
itsAlphaSize;
- QValueVector<int> itsSizes;
+ TQValueVector<int> itsSizes;
KURL itsLastUrl;
FcBool itsScalable;
};
diff --git a/kcontrol/kfontinst/lib/Misc.cpp b/kcontrol/kfontinst/lib/Misc.cpp
index 4606ad0ca..1e779b514 100644
--- a/kcontrol/kfontinst/lib/Misc.cpp
+++ b/kcontrol/kfontinst/lib/Misc.cpp
@@ -27,7 +27,7 @@
////////////////////////////////////////////////////////////////////////////////
#include "Misc.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kprocess.h>
#include <kstandarddirs.h>
#include <klargefile.h>
@@ -40,14 +40,14 @@ namespace KFI
namespace Misc
{
-QString linkedTo(const QString &i)
+TQString linkedTo(const TQString &i)
{
- QString d;
+ TQString d;
if(isLink(i))
{
char buffer[1000];
- int n=readlink(QFile::encodeName(i), buffer, 1000);
+ int n=readlink(TQFile::encodeName(i), buffer, 1000);
if(n!=-1)
{
@@ -59,11 +59,11 @@ QString linkedTo(const QString &i)
return d;
}
-QString dirSyntax(const QString &d)
+TQString dirSyntax(const TQString &d)
{
if(!d.isEmpty())
{
- QString ds(d);
+ TQString ds(d);
ds.replace("//", "/");
@@ -78,11 +78,11 @@ QString dirSyntax(const QString &d)
return d;
}
-QString xDirSyntax(const QString &d)
+TQString xDirSyntax(const TQString &d)
{
if(!d.isEmpty())
{
- QString ds(d);
+ TQString ds(d);
ds.replace("//", "/");
@@ -96,9 +96,9 @@ QString xDirSyntax(const QString &d)
return d;
}
-QString getDir(const QString &f)
+TQString getDir(const TQString &f)
{
- QString d(f);
+ TQString d(f);
int slashPos=d.findRev('/');
@@ -108,9 +108,9 @@ QString getDir(const QString &f)
return dirSyntax(d);
}
-QString getFile(const QString &f)
+TQString getFile(const TQString &f)
{
- QString d(f);
+ TQString d(f);
int slashPos=d.findRev('/');
@@ -120,7 +120,7 @@ QString getFile(const QString &f)
return d;
}
-bool createDir(const QString &dir)
+bool createDir(const TQString &dir)
{
//
// Clear any umask before dir is created
@@ -131,7 +131,7 @@ bool createDir(const QString &dir)
return status;
}
-bool doCmd(const QString &cmd, const QString &p1, const QString &p2, const QString &p3)
+bool doCmd(const TQString &cmd, const TQString &p1, const TQString &p2, const TQString &p3)
{
KProcess proc;
@@ -149,13 +149,13 @@ bool doCmd(const QString &cmd, const QString &p1, const QString &p2, const QStri
return proc.normalExit() && proc.exitStatus()==0;
}
-QString changeExt(const QString &f, const QString &newExt)
+TQString changeExt(const TQString &f, const TQString &newExt)
{
- QString newStr(f);
+ TQString newStr(f);
int dotPos=newStr.findRev('.');
if(-1==dotPos)
- newStr+=QChar('.')+newExt;
+ newStr+=TQChar('.')+newExt;
else
{
newStr.remove(dotPos+1, newStr.length());
@@ -164,9 +164,9 @@ QString changeExt(const QString &f, const QString &newExt)
return newStr;
}
-void createBackup(const QString &f)
+void createBackup(const TQString &f)
{
- const QString constExt(".bak");
+ const TQString constExt(".bak");
if(!fExists(f+constExt) && fExists(f))
doCmd("cp", "-f", f, f+constExt);
@@ -179,7 +179,7 @@ void createBackup(const QString &f)
//
// Associated: /home/a/courier.afm /home/a/courier.pfm
//
-void getAssociatedUrls(const KURL &url, KURL::List &list, bool afmAndPfm, QWidget *widget)
+void getAssociatedUrls(const KURL &url, KURL::List &list, bool afmAndPfm, TQWidget *widget)
{
const char *afm[]={"afm", "AFM", "Afm", "AFm", "AfM", "aFM", "aFm", "afM", NULL},
*pfm[]={"pfm", "PFM", "Pfm", "PFm", "PfM", "pFM", "pFm", "pfM", NULL};
@@ -217,18 +217,18 @@ void getAssociatedUrls(const KURL &url, KURL::List &list, bool afmAndPfm, QWidge
}
}
-time_t getTimeStamp(const QString &item)
+time_t getTimeStamp(const TQString &item)
{
KDE_struct_stat info;
- return !item.isEmpty() && 0==KDE_lstat(QFile::encodeName(item), &info) ? info.st_mtime : 0;
+ return !item.isEmpty() && 0==KDE_lstat(TQFile::encodeName(item), &info) ? info.st_mtime : 0;
}
-bool check(const QString &path, unsigned int fmt, bool checkW)
+bool check(const TQString &path, unsigned int fmt, bool checkW)
{
KDE_struct_stat info;
- QCString pathC(QFile::encodeName(path));
+ TQCString pathC(TQFile::encodeName(path));
return 0==KDE_lstat(pathC, &info) && (info.st_mode&S_IFMT)==fmt && (!checkW || 0==::access(pathC, W_OK));
}
diff --git a/kcontrol/kfontinst/lib/Misc.h b/kcontrol/kfontinst/lib/Misc.h
index a624f44f9..d20f08358 100644
--- a/kcontrol/kfontinst/lib/Misc.h
+++ b/kcontrol/kfontinst/lib/Misc.h
@@ -33,8 +33,8 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
class QWidget;
@@ -50,25 +50,25 @@ namespace Misc
DIR_PERMS = 0755
};
- extern KDE_EXPORT bool check(const QString &path, unsigned int fmt, bool checkW=false);
- inline KDE_EXPORT bool fExists(const QString &p) { return check(p, S_IFREG, false); }
- inline KDE_EXPORT bool dExists(const QString &p) { return check(p, S_IFDIR, false); }
- inline KDE_EXPORT bool fWritable(const QString &p) { return check(p, S_IFREG, true); }
- inline KDE_EXPORT bool dWritable(const QString &p) { return check(p, S_IFDIR, true); }
- inline KDE_EXPORT bool isLink(const QString &i) { return check(i, S_IFLNK, false); }
- extern KDE_EXPORT QString linkedTo(const QString &i);
- extern KDE_EXPORT QString dirSyntax(const QString &d); // Has trailing slash: /file/path/
- extern KDE_EXPORT QString xDirSyntax(const QString &d); // No trailing slash: /file/path
- inline KDE_EXPORT QString fileSyntax(const QString &f) { return xDirSyntax(f); }
- extern KDE_EXPORT QString getDir(const QString &f);
- extern KDE_EXPORT QString getFile(const QString &f);
- extern KDE_EXPORT bool createDir(const QString &dir);
- extern KDE_EXPORT QString changeExt(const QString &f, const QString &newExt);
- extern KDE_EXPORT bool doCmd(const QString &cmd, const QString &p1=QString::null, const QString &p2=QString::null, const QString &p3=QString::null);
+ extern KDE_EXPORT bool check(const TQString &path, unsigned int fmt, bool checkW=false);
+ inline KDE_EXPORT bool fExists(const TQString &p) { return check(p, S_IFREG, false); }
+ inline KDE_EXPORT bool dExists(const TQString &p) { return check(p, S_IFDIR, false); }
+ inline KDE_EXPORT bool fWritable(const TQString &p) { return check(p, S_IFREG, true); }
+ inline KDE_EXPORT bool dWritable(const TQString &p) { return check(p, S_IFDIR, true); }
+ inline KDE_EXPORT bool isLink(const TQString &i) { return check(i, S_IFLNK, false); }
+ extern KDE_EXPORT TQString linkedTo(const TQString &i);
+ extern KDE_EXPORT TQString dirSyntax(const TQString &d); // Has trailing slash: /file/path/
+ extern KDE_EXPORT TQString xDirSyntax(const TQString &d); // No trailing slash: /file/path
+ inline KDE_EXPORT TQString fileSyntax(const TQString &f) { return xDirSyntax(f); }
+ extern KDE_EXPORT TQString getDir(const TQString &f);
+ extern KDE_EXPORT TQString getFile(const TQString &f);
+ extern KDE_EXPORT bool createDir(const TQString &dir);
+ extern KDE_EXPORT TQString changeExt(const TQString &f, const TQString &newExt);
+ extern KDE_EXPORT bool doCmd(const TQString &cmd, const TQString &p1=TQString::null, const TQString &p2=TQString::null, const TQString &p3=TQString::null);
inline KDE_EXPORT bool root() { return 0==getuid(); }
- extern KDE_EXPORT void getAssociatedUrls(const KURL &url, KURL::List &list, bool afmAndPfm=true, QWidget *widget=NULL);
- extern KDE_EXPORT void createBackup(const QString &f);
- extern KDE_EXPORT time_t getTimeStamp(const QString &item);
+ extern KDE_EXPORT void getAssociatedUrls(const KURL &url, KURL::List &list, bool afmAndPfm=true, TQWidget *widget=NULL);
+ extern KDE_EXPORT void createBackup(const TQString &f);
+ extern KDE_EXPORT time_t getTimeStamp(const TQString &item);
}
}
diff --git a/kcontrol/kfontinst/thumbnail/FontThumbnail.cpp b/kcontrol/kfontinst/thumbnail/FontThumbnail.cpp
index 86794377b..363ebe064 100644
--- a/kcontrol/kfontinst/thumbnail/FontThumbnail.cpp
+++ b/kcontrol/kfontinst/thumbnail/FontThumbnail.cpp
@@ -28,9 +28,9 @@
#include "FontThumbnail.h"
#include "KfiConstants.h"
-#include <qimage.h>
-#include <qbitmap.h>
-#include <qpainter.h>
+#include <tqimage.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include <kglobalsettings.h>
#include <klocale.h>
@@ -52,9 +52,9 @@ CFontThumbnail::CFontThumbnail()
KGlobal::locale()->insertCatalogue(KFI_CATALOGUE);
}
-bool CFontThumbnail::create(const QString &path, int width, int height, QImage &img)
+bool CFontThumbnail::create(const TQString &path, int width, int height, TQImage &img)
{
- QPixmap pix;
+ TQPixmap pix;
if(itsEngine.draw(KURL(path), width, height, pix, 0, true))
{
diff --git a/kcontrol/kfontinst/thumbnail/FontThumbnail.h b/kcontrol/kfontinst/thumbnail/FontThumbnail.h
index c2d1294e4..456e38b65 100644
--- a/kcontrol/kfontinst/thumbnail/FontThumbnail.h
+++ b/kcontrol/kfontinst/thumbnail/FontThumbnail.h
@@ -42,7 +42,7 @@ class CFontThumbnail : public ThumbCreator
CFontThumbnail();
~CFontThumbnail() {}
- bool create(const QString &path, int width, int height, QImage &img);
+ bool create(const TQString &path, int width, int height, TQImage &img);
Flags flags() const;
private:
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);
}
}