summaryrefslogtreecommitdiffstats
path: root/konq-plugins/fsview
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins/fsview')
-rw-r--r--konq-plugins/fsview/fsview.cpp92
-rw-r--r--konq-plugins/fsview/fsview.h32
-rw-r--r--konq-plugins/fsview/fsview_part.cpp104
-rw-r--r--konq-plugins/fsview/fsview_part.h8
-rw-r--r--konq-plugins/fsview/inode.cpp56
-rw-r--r--konq-plugins/fsview/inode.h24
-rw-r--r--konq-plugins/fsview/main.cpp20
-rw-r--r--konq-plugins/fsview/scan.cpp32
-rw-r--r--konq-plugins/fsview/scan.h34
-rw-r--r--konq-plugins/fsview/treemap.cpp338
-rw-r--r--konq-plugins/fsview/treemap.h178
11 files changed, 459 insertions, 459 deletions
diff --git a/konq-plugins/fsview/fsview.cpp b/konq-plugins/fsview/fsview.cpp
index b0c82d8..931c43f 100644
--- a/konq-plugins/fsview/fsview.cpp
+++ b/konq-plugins/fsview/fsview.cpp
@@ -21,9 +21,9 @@
*/
-#include <qdir.h>
-#include <qpopupmenu.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -41,9 +41,9 @@
// FSView
-QMap<QString, MetricEntry> FSView::_dirMetric;
+TQMap<TQString, MetricEntry> FSView::_dirMetric;
-FSView::FSView(Inode* base, QWidget* parent, const char* name)
+FSView::FSView(Inode* base, TQWidget* parent, const char* name)
: TreeMapWidget(base, parent, name)
{
setFieldType(0, i18n("Name"));
@@ -81,25 +81,25 @@ FSView::FSView(Inode* base, QWidget* parent, const char* name)
_config = new KConfig("fsviewrc");
// restore TreeMap visualization options of last execution
- KConfigGroup tmconfig(_config, QCString("TreeMap"));
+ KConfigGroup tmconfig(_config, TQCString("TreeMap"));
restoreOptions(&tmconfig);
- QString str = tmconfig.readEntry("ColorMode");
+ TQString str = tmconfig.readEntry("ColorMode");
if (!str.isEmpty()) setColorMode(str);
if (_dirMetric.count() == 0) {
// restore metric cache
- KConfigGroup cconfig(_config, QCString("MetricCache"));
+ KConfigGroup cconfig(_config, TQCString("MetricCache"));
int ccount = cconfig.readNumEntry("Count", 0);
int i, f, d;
double s;
- QString str;
+ TQString str;
for (i=1;i<=ccount;i++) {
- str = QString("Dir%1").arg(i);
+ str = TQString("Dir%1").arg(i);
if (!cconfig.hasKey(str)) continue;
str = cconfig.readPathEntry(str);
- s = cconfig.readDoubleNumEntry(QString("Size%1").arg(i), 0.0);
- f = cconfig.readNumEntry(QString("Files%1").arg(i), 0);
- d = cconfig.readNumEntry(QString("Dirs%1").arg(i), 0);
+ s = cconfig.readDoubleNumEntry(TQString("Size%1").arg(i), 0.0);
+ f = cconfig.readNumEntry(TQString("Files%1").arg(i), 0);
+ d = cconfig.readNumEntry(TQString("Dirs%1").arg(i), 0);
if (s==0.0 || f==0 || d==0) continue;
setDirMetric(str, s, f, d);
}
@@ -118,7 +118,7 @@ void FSView::stop()
_sm.stopScan();
}
-void FSView::setPath(QString p)
+void FSView::setPath(TQString p)
{
Inode* b = (Inode*)base();
if (!b) return;
@@ -128,7 +128,7 @@ void FSView::setPath(QString p)
// stop any previous updating
stop();
- QFileInfo fi(p);
+ TQFileInfo fi(p);
_path = fi.absFilePath();
if (!fi.isDir()) {
_path = fi.dirPath(true);
@@ -139,7 +139,7 @@ void FSView::setPath(QString p)
u.setPath(_path);
if (!kapp->authorizeURLAction("list", KURL(), u))
{
- QString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, u.prettyURL());
+ TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, u.prettyURL());
KMessageBox::queuedMessageBox(this, KMessageBox::Sorry, msg);
}
@@ -147,7 +147,7 @@ void FSView::setPath(QString p)
b->setPeer(d);
- setCaption(QString("%1 - FSView").arg(_path));
+ setCaption(TQString("%1 - FSView").arg(_path));
requestUpdate(b);
}
@@ -165,10 +165,10 @@ KURL::List FSView::selectedUrls()
return urls;
}
-bool FSView::getDirMetric(const QString& k,
+bool FSView::getDirMetric(const TQString& k,
double& s, unsigned int& f, unsigned int& d)
{
- QMap<QString, MetricEntry>::iterator it;
+ TQMap<TQString, MetricEntry>::iterator it;
it = _dirMetric.find(k);
if (it == _dirMetric.end()) return false;
@@ -183,7 +183,7 @@ bool FSView::getDirMetric(const QString& k,
return true;
}
-void FSView::setDirMetric(const QString& k,
+void FSView::setDirMetric(const TQString& k,
double s, unsigned int f, unsigned int d)
{
if (0) kdDebug(90100) << "setDirMetric '" << k << "': size "
@@ -203,8 +203,8 @@ void FSView::requestUpdate(Inode* i)
i->clear();
if (!_sm.scanRunning()) {
- QTimer::singleShot(0, this, SLOT(doUpdate()));
- QTimer::singleShot(100, this, SLOT(doRedraw()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doUpdate()));
+ TQTimer::singleShot(100, this, TQT_SLOT(doRedraw()));
/* start new progress chunk */
_progressPhase = 1;
@@ -266,14 +266,14 @@ void FSView::selected(TreeMapItem* i)
setPath(((Inode*)i)->path());
}
-void FSView::contextMenu(TreeMapItem* i, const QPoint& p)
+void FSView::contextMenu(TreeMapItem* i, const TQPoint& p)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
- QPopupMenu* spopup = new QPopupMenu();
- QPopupMenu* dpopup = new QPopupMenu();
- QPopupMenu* apopup = new QPopupMenu();
- QPopupMenu* fpopup = new QPopupMenu();
+ TQPopupMenu* spopup = new TQPopupMenu();
+ TQPopupMenu* dpopup = new TQPopupMenu();
+ TQPopupMenu* apopup = new TQPopupMenu();
+ TQPopupMenu* fpopup = new TQPopupMenu();
// choosing from the selection menu will give a selectionChanged() signal
addSelectionItems(spopup, 901, i);
@@ -297,10 +297,10 @@ void FSView::contextMenu(TreeMapItem* i, const QPoint& p)
popup.insertSeparator();
- QPopupMenu* cpopup = new QPopupMenu();
+ TQPopupMenu* cpopup = new TQPopupMenu();
addColorItems(cpopup, 1401);
popup.insertItem(i18n("Color Mode"), cpopup, 1400);
- QPopupMenu* vpopup = new QPopupMenu();
+ TQPopupMenu* vpopup = new TQPopupMenu();
addVisualizationItems(vpopup, 1301);
popup.insertItem(i18n("Visualization"), vpopup, 1300);
@@ -328,13 +328,13 @@ void FSView::contextMenu(TreeMapItem* i, const QPoint& p)
void FSView::saveMetric(KConfigGroup* g)
{
- QMap<QString, MetricEntry>::iterator it;
+ TQMap<TQString, MetricEntry>::iterator it;
int c = 1;
for (it=_dirMetric.begin();it!=_dirMetric.end();++it) {
- g->writePathEntry(QString("Dir%1").arg(c), it.key());
- g->writeEntry(QString("Size%1").arg(c), (*it).size);
- g->writeEntry(QString("Files%1").arg(c), (*it).fileCount);
- g->writeEntry(QString("Dirs%1").arg(c), (*it).dirCount);
+ g->writePathEntry(TQString("Dir%1").arg(c), it.key());
+ g->writeEntry(TQString("Size%1").arg(c), (*it).size);
+ g->writeEntry(TQString("Files%1").arg(c), (*it).fileCount);
+ g->writeEntry(TQString("Dirs%1").arg(c), (*it).dirCount);
c++;
}
g->writeEntry("Count", c-1);
@@ -348,7 +348,7 @@ void FSView::setColorMode(FSView::ColorMode cm)
redraw();
}
-bool FSView::setColorMode(QString mode)
+bool FSView::setColorMode(TQString mode)
{
if (mode == "None") setColorMode(None);
else if (mode == "Depth") setColorMode(Depth);
@@ -361,9 +361,9 @@ bool FSView::setColorMode(QString mode)
return true;
}
-QString FSView::colorModeString() const
+TQString FSView::colorModeString() const
{
- QString mode;
+ TQString mode;
switch(_colorMode) {
case None: mode = "None"; break;
case Depth: mode = "Depth"; break;
@@ -376,13 +376,13 @@ QString FSView::colorModeString() const
return mode;
}
-void FSView::addColorItems(QPopupMenu* popup, int id)
+void FSView::addColorItems(TQPopupMenu* popup, int id)
{
_colorID = id;
popup->setCheckable(true);
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(colorActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(colorActivated(int)));
popup->insertItem(i18n("None"), id);
popup->insertItem(i18n("Depth"), id+1);
@@ -414,14 +414,14 @@ void FSView::colorActivated(int id)
void FSView::saveFSOptions()
{
- KConfigGroup tmconfig(_config, QCString("TreeMap"));
+ KConfigGroup tmconfig(_config, TQCString("TreeMap"));
saveOptions(&tmconfig);
tmconfig.writeEntry("ColorMode", colorModeString());
- KConfigGroup gconfig(_config, QCString("General"));
+ KConfigGroup gconfig(_config, TQCString("General"));
gconfig.writeEntry("Path", _path);
- KConfigGroup cconfig(_config, QCString("MetricCache"));
+ KConfigGroup cconfig(_config, TQCString("MetricCache"));
saveMetric(&cconfig);
}
@@ -458,7 +458,7 @@ void FSView::doRedraw()
redo = true;
if (redo) {
- QTimer::singleShot(500, this, SLOT(doRedraw()));
+ TQTimer::singleShot(500, this, TQT_SLOT(doRedraw()));
redrawCounter++;
}
}
@@ -532,7 +532,7 @@ void FSView::doUpdate()
}
if (_sm.scanRunning())
- QTimer::singleShot(0, this, SLOT(doUpdate()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doUpdate()));
else
emit completed(_dirsFinished);
}
diff --git a/konq-plugins/fsview/fsview.h b/konq-plugins/fsview/fsview.h
index 17d926f..2e12986 100644
--- a/konq-plugins/fsview/fsview.h
+++ b/konq-plugins/fsview/fsview.h
@@ -23,10 +23,10 @@
#ifndef FSVIEW_H
#define FSVIEW_H
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qfileinfo.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
#include <kmimetype.h>
@@ -62,20 +62,20 @@ class FSView : public TreeMapWidget, public ScanListener
public:
enum ColorMode { None = 0, Depth, Name, Owner, Group, Mime };
- FSView(Inode*, QWidget* parent=0, const char* name=0);
+ FSView(Inode*, TQWidget* parent=0, const char* name=0);
~FSView();
KConfig* config() { return _config; }
- void setPath(QString);
- QString path() { return _path; }
+ void setPath(TQString);
+ TQString path() { return _path; }
int pathDepth() { return _pathDepth; }
void setColorMode(FSView::ColorMode cm);
FSView::ColorMode colorMode() const { return _colorMode; }
// returns true if string was recognized
- bool setColorMode(QString);
- QString colorModeString() const;
+ bool setColorMode(TQString);
+ TQString colorModeString() const;
void requestUpdate(Inode*);
@@ -85,19 +85,19 @@ public:
void stop();
- static bool getDirMetric(const QString&, double&, unsigned int&, unsigned int&);
- static void setDirMetric(const QString&, double, unsigned int, unsigned int);
+ static bool getDirMetric(const TQString&, double&, unsigned int&, unsigned int&);
+ static void setDirMetric(const TQString&, double, unsigned int, unsigned int);
void saveMetric(KConfigGroup*);
void saveFSOptions();
// for color mode
- void addColorItems(QPopupMenu*, int);
+ void addColorItems(TQPopupMenu*, int);
KURL::List selectedUrls();
public slots:
void selected(TreeMapItem*);
- void contextMenu(TreeMapItem*, const QPoint &);
+ void contextMenu(TreeMapItem*, const TQPoint &);
void quit();
void doUpdate();
void doRedraw();
@@ -105,7 +105,7 @@ public slots:
signals:
void started();
- void progress(int percent, int dirs, const QString& lastDir);
+ void progress(int percent, int dirs, const TQString& lastDir);
void completed(int dirs);
private:
@@ -115,11 +115,11 @@ public slots:
// when a contextMenu is shown, we don't allow async. refreshs
bool _allowRefresh;
// a cache for directory sizes with long lasting updates
- static QMap<QString, MetricEntry> _dirMetric;
+ static TQMap<TQString, MetricEntry> _dirMetric;
// current root path
int _pathDepth;
- QString _path;
+ TQString _path;
// for progress info
int _progressPhase;
diff --git a/konq-plugins/fsview/fsview_part.cpp b/konq-plugins/fsview/fsview_part.cpp
index 745cb63..02df4c6 100644
--- a/konq-plugins/fsview/fsview_part.cpp
+++ b/konq-plugins/fsview/fsview_part.cpp
@@ -20,9 +20,9 @@
* The KPart embedding the FSView widget
*/
-#include <qclipboard.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
+#include <tqclipboard.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
#include <kinstance.h>
#include <kfiledialog.h>
@@ -57,8 +57,8 @@ FSJob::FSJob(FSView* v)
: KIO::Job(false)
{
_view = v;
- QObject::connect(v, SIGNAL(progress(int,int,const QString&)),
- this, SLOT(progressSlot(int,int,const QString&)));
+ TQObject::connect(v, TQT_SIGNAL(progress(int,int,const TQString&)),
+ this, TQT_SLOT(progressSlot(int,int,const TQString&)));
}
void FSJob::kill(bool quietly)
@@ -68,7 +68,7 @@ void FSJob::kill(bool quietly)
Job::kill(quietly);
}
-void FSJob::progressSlot(int percent, int dirs, const QString& cDir)
+void FSJob::progressSlot(int percent, int dirs, const TQString& cDir)
{
if (percent<100) {
emitPercent(percent, 100);
@@ -93,16 +93,16 @@ KAboutData* FSViewPart::createAboutData()
return aboutData;
}
-FSViewPart::FSViewPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList& /* args */)
+FSViewPart::FSViewPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList& /* args */)
: KParts::ReadOnlyPart(parent, name)
{
// we need an instance
setInstance( FSViewPartFactory::instance() );
_view = new FSView(new Inode(), parentWidget, widgetName);
- QWhatsThis::add(_view, i18n("<p>This is the FSView plugin, a graphical "
+ TQWhatsThis::add(_view, i18n("<p>This is the FSView plugin, a graphical "
"browsing mode showing filesystem utilization "
"by using a tree map visualization.</p>"
"<p>Note that in this mode, automatic updating "
@@ -129,40 +129,40 @@ FSViewPart::FSViewPart(QWidget *parentWidget, const char *widgetName,
KAction* action;
action = new KAction( i18n( "&FSView Manual" ), "fsview",
- KShortcut(), this, SLOT(showHelp()),
+ KShortcut(), this, TQT_SLOT(showHelp()),
actionCollection(), "help_fsview" );
action->setToolTip(i18n("Show FSView manual"));
action->setWhatsThis(i18n("Opens the help browser with the "
"FSView documentation"));
- QObject::connect (_visMenu->popupMenu(), SIGNAL (aboutToShow()),
- SLOT (slotShowVisMenu()));
- QObject::connect (_areaMenu->popupMenu(), SIGNAL (aboutToShow()),
- SLOT (slotShowAreaMenu()));
- QObject::connect (_depthMenu->popupMenu(), SIGNAL (aboutToShow()),
- SLOT (slotShowDepthMenu()));
- QObject::connect (_colorMenu->popupMenu(), SIGNAL (aboutToShow()),
- SLOT (slotShowColorMenu()));
+ TQObject::connect (_visMenu->popupMenu(), TQT_SIGNAL (aboutToShow()),
+ TQT_SLOT (slotShowVisMenu()));
+ TQObject::connect (_areaMenu->popupMenu(), TQT_SIGNAL (aboutToShow()),
+ TQT_SLOT (slotShowAreaMenu()));
+ TQObject::connect (_depthMenu->popupMenu(), TQT_SIGNAL (aboutToShow()),
+ TQT_SLOT (slotShowDepthMenu()));
+ TQObject::connect (_colorMenu->popupMenu(), TQT_SIGNAL (aboutToShow()),
+ TQT_SLOT (slotShowColorMenu()));
slotSettingsChanged(KApplication::SETTINGS_MOUSE);
if (kapp)
- connect( kapp, SIGNAL( settingsChanged(int) ),
- SLOT( slotSettingsChanged(int) ) );
-
- QObject::connect(_view,SIGNAL(returnPressed(TreeMapItem*)),
- _ext,SLOT(selected(TreeMapItem*)));
- QObject::connect(_view,SIGNAL(selectionChanged()),
- _ext,SLOT(updateActions()));
- QObject::connect(_view,
- SIGNAL(contextMenuRequested(TreeMapItem*,const QPoint&)),
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ),
+ TQT_SLOT( slotSettingsChanged(int) ) );
+
+ TQObject::connect(_view,TQT_SIGNAL(returnPressed(TreeMapItem*)),
+ _ext,TQT_SLOT(selected(TreeMapItem*)));
+ TQObject::connect(_view,TQT_SIGNAL(selectionChanged()),
+ _ext,TQT_SLOT(updateActions()));
+ TQObject::connect(_view,
+ TQT_SIGNAL(contextMenuRequested(TreeMapItem*,const TQPoint&)),
_ext,
- SLOT(contextMenu(TreeMapItem*, const QPoint&)));
+ TQT_SLOT(contextMenu(TreeMapItem*, const TQPoint&)));
- QObject::connect(_view, SIGNAL(started()), this, SLOT(startedSlot()));
- QObject::connect(_view, SIGNAL(completed(int)),
- this, SLOT(completedSlot(int)));
+ TQObject::connect(_view, TQT_SIGNAL(started()), this, TQT_SLOT(startedSlot()));
+ TQObject::connect(_view, TQT_SIGNAL(completed(int)),
+ this, TQT_SLOT(completedSlot(int)));
- QTimer::singleShot(1, this, SLOT(showInfo()));
+ TQTimer::singleShot(1, this, TQT_SLOT(showInfo()));
setXMLFile( "fsview_part.rc" );
}
@@ -180,34 +180,34 @@ void FSViewPart::slotSettingsChanged(int category)
{
if (category != KApplication::SETTINGS_MOUSE) return;
- QObject::disconnect(_view,SIGNAL(clicked(TreeMapItem*)),
- _ext,SLOT(selected(TreeMapItem*)));
- QObject::disconnect(_view,SIGNAL(doubleClicked(TreeMapItem*)),
- _ext,SLOT(selected(TreeMapItem*)));
+ TQObject::disconnect(_view,TQT_SIGNAL(clicked(TreeMapItem*)),
+ _ext,TQT_SLOT(selected(TreeMapItem*)));
+ TQObject::disconnect(_view,TQT_SIGNAL(doubleClicked(TreeMapItem*)),
+ _ext,TQT_SLOT(selected(TreeMapItem*)));
if (KGlobalSettings::singleClick())
- QObject::connect(_view,SIGNAL(clicked(TreeMapItem*)),
- _ext,SLOT(selected(TreeMapItem*)));
+ TQObject::connect(_view,TQT_SIGNAL(clicked(TreeMapItem*)),
+ _ext,TQT_SLOT(selected(TreeMapItem*)));
else
- QObject::connect(_view,SIGNAL(doubleClicked(TreeMapItem*)),
- _ext,SLOT(selected(TreeMapItem*)));
+ TQObject::connect(_view,TQT_SIGNAL(doubleClicked(TreeMapItem*)),
+ _ext,TQT_SLOT(selected(TreeMapItem*)));
}
void FSViewPart::showInfo()
{
- QString info;
+ TQString info;
info = i18n("FSView intentionally does not support automatic updates "
"when changes are made to files or directories, "
"currently visible in FSView, from the outside.\n"
"For details, see the 'Help/FSView Manual'.");
- KMessageBox::information( _view, info, QString::null, "ShowFSViewInfo");
+ KMessageBox::information( _view, info, TQString::null, "ShowFSViewInfo");
}
void FSViewPart::showHelp()
{
KApplication::startServiceByDesktopName("khelpcenter",
- QString("help:/konq-plugins/fsview/index.html"));
+ TQString("help:/konq-plugins/fsview/index.html"));
}
void FSViewPart::startedSlot()
@@ -219,12 +219,12 @@ void FSViewPart::startedSlot()
void FSViewPart::completedSlot(int dirs)
{
if (_job) {
- _job->progressSlot(100, dirs, QString::null);
+ _job->progressSlot(100, dirs, TQString::null);
delete _job;
_job = 0;
}
- KConfigGroup cconfig(_view->config(), QCString("MetricCache"));
+ KConfigGroup cconfig(_view->config(), TQCString("MetricCache"));
_view->saveMetric(&cconfig);
emit completed();
@@ -331,20 +331,20 @@ void FSViewBrowserExtension::del()
// - search for the KonqOperations child of _view (name "KonqOperations")
// - connect to destroyed signal
KonqOperations* o = (KonqOperations*) _view->child("KonqOperations");
- if (o) connect(o, SIGNAL(destroyed()), SLOT(refresh()));
+ if (o) connect(o, TQT_SIGNAL(destroyed()), TQT_SLOT(refresh()));
}
void FSViewBrowserExtension::trash()
{
KonqOperations::del(_view, KonqOperations::TRASH, _view->selectedUrls());
KonqOperations* o = (KonqOperations*) _view->child("KonqOperations");
- if (o) connect(o, SIGNAL(destroyed()), SLOT(refresh()));
+ if (o) connect(o, TQT_SIGNAL(destroyed()), TQT_SLOT(refresh()));
}
void FSViewBrowserExtension::copySelection( bool move )
{
KonqDrag *urlData = KonqDrag::newDrag( _view->selectedUrls(), move );
- QApplication::clipboard()->setData( urlData );
+ TQApplication::clipboard()->setData( urlData );
}
void FSViewBrowserExtension::editMimeType()
@@ -386,7 +386,7 @@ void FSViewBrowserExtension::selected(TreeMapItem* i)
emit openURLRequest(url);
}
-void FSViewBrowserExtension::contextMenu(TreeMapItem* /*item*/,const QPoint& p)
+void FSViewBrowserExtension::contextMenu(TreeMapItem* /*item*/,const TQPoint& p)
{
TreeMapItemList s = _view->selection();
TreeMapItem* i;
@@ -396,8 +396,8 @@ void FSViewBrowserExtension::contextMenu(TreeMapItem* /*item*/,const QPoint& p)
for(i=s.first();i;i=s.next()) {
KURL u;
u.setPath( ((Inode*)i)->path() );
- QString mimetype = ((Inode*)i)->mimeType()->name();
- const QFileInfo& info = ((Inode*)i)->fileInfo();
+ TQString mimetype = ((Inode*)i)->mimeType()->name();
+ const TQFileInfo& info = ((Inode*)i)->fileInfo();
mode_t mode =
info.isFile() ? S_IFREG :
info.isDir() ? S_IFDIR :
diff --git a/konq-plugins/fsview/fsview_part.h b/konq-plugins/fsview/fsview_part.h
index 4f2c734..ff0a17e 100644
--- a/konq-plugins/fsview/fsview_part.h
+++ b/konq-plugins/fsview/fsview_part.h
@@ -44,7 +44,7 @@ public:
protected slots:
void selected(TreeMapItem*);
- void contextMenu(TreeMapItem*,const QPoint&);
+ void contextMenu(TreeMapItem*,const TQPoint&);
void updateActions();
void refresh();
@@ -71,7 +71,7 @@ public:
virtual void kill( bool quietly = true );
public slots:
- void progressSlot(int percent, int dirs, const QString& lastDir);
+ void progressSlot(int percent, int dirs, const TQString& lastDir);
private:
FSView* _view;
@@ -83,8 +83,8 @@ class FSViewPart : public KParts::ReadOnlyPart
Q_OBJECT
Q_PROPERTY( bool supportsUndo READ supportsUndo )
public:
- FSViewPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList &args);
+ FSViewPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList &args);
virtual ~FSViewPart();
diff --git a/konq-plugins/fsview/inode.cpp b/konq-plugins/fsview/inode.cpp
index 0411d3a..6f5073c 100644
--- a/konq-plugins/fsview/inode.cpp
+++ b/konq-plugins/fsview/inode.cpp
@@ -43,7 +43,7 @@ Inode::Inode()
Inode::Inode(ScanDir* d, Inode* parent)
: TreeMapItem(parent)
{
- QString absPath;
+ TQString absPath;
if (parent) {
absPath = parent->path();
if (!absPath.endsWith("/")) absPath += "/";
@@ -59,7 +59,7 @@ Inode::Inode(ScanDir* d, Inode* parent)
Inode::Inode(ScanFile* f, Inode* parent)
: TreeMapItem(parent)
{
- QString absPath;
+ TQString absPath;
if (parent)
absPath = parent->path() + "/";
absPath += f->name();
@@ -95,17 +95,17 @@ void Inode::setPeer(ScanDir* d)
init(d->name());
}
-QString Inode::path() const
+TQString Inode::path() const
{
return _info.absFilePath();
}
-void Inode::init(const QString& path)
+void Inode::init(const TQString& path)
{
if (0) kdDebug(90100) << "Inode::init [" << path
<< "]" << endl;
- _info = QFileInfo(path);
+ _info = TQFileInfo(path);
if (!FSView::getDirMetric(path, _sizeEstimation,
_fileCountEstimation,
@@ -260,16 +260,16 @@ unsigned int Inode::dirCount() const
}
-QColor Inode::backColor() const
+TQColor Inode::backColor() const
{
- QString n;
+ TQString n;
int id = 0;
switch( ((FSView*)widget())->colorMode() ) {
case FSView::Depth:
{
int d = ((FSView*)widget())->pathDepth() + depth();
- return QColor((100*d)%360, 192,128, QColor::Hsv);
+ return TQColor((100*d)%360, 192,128, TQColor::Hsv);
}
case FSView::Name: n = text(0); break;
@@ -281,7 +281,7 @@ QColor Inode::backColor() const
break;
}
- if (id>0) n = QString::number(id);
+ if (id>0) n = TQString::number(id);
if (n.isEmpty())
return widget()->colorGroup().button();
@@ -293,7 +293,7 @@ QColor Inode::backColor() const
s = (s * 17 + h* (unsigned)*str) % 192;
str++;
}
- return QColor(h, 64+s, 192, QColor::Hsv);
+ return TQColor(h, 64+s, 192, TQColor::Hsv);
}
KMimeType::Ptr Inode::mimeType() const
@@ -308,10 +308,10 @@ KMimeType::Ptr Inode::mimeType() const
return _mimeType;
}
-QString Inode::text(int i) const
+TQString Inode::text(int i) const
{
if (i==0) {
- QString name;
+ TQString name;
if (_dirPeer) {
name = _dirPeer->name();
if (!name.endsWith("/")) name += "/";
@@ -321,25 +321,25 @@ QString Inode::text(int i) const
return name;
}
if (i==1) {
- QString text;
+ TQString text;
double s = size();
if (s < 1000)
- text = QString("%1 B").arg((int)(s+.5));
+ text = TQString("%1 B").arg((int)(s+.5));
else if (s < 10 * 1024)
- text = QString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.005,2));
+ text = TQString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.005,2));
else if (s < 100 * 1024)
- text = QString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.05,1));
+ text = TQString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.05,1));
else if (s < 1000 * 1024)
- text = QString("%1 kB").arg((int)(s/1024+.5));
+ text = TQString("%1 kB").arg((int)(s/1024+.5));
else if (s < 10 * 1024 * 1024)
- text = QString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.005,2));
+ text = TQString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.005,2));
else if (s < 100 * 1024 * 1024)
- text = QString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.05,1));
+ text = TQString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.05,1));
else if (s < 1000 * 1024 * 1024)
- text = QString("%1 MB").arg((int)(s/1024/1024+.5));
+ text = TQString("%1 MB").arg((int)(s/1024/1024+.5));
else
- text = QString("%1 GB").arg(KGlobal::locale()->formatNumber(s/1024/1024/1024+.005,2));
+ text = TQString("%1 GB").arg(KGlobal::locale()->formatNumber(s/1024/1024/1024+.005,2));
if (_sizeEstimation>0) text += "+";
return text;
@@ -347,17 +347,17 @@ QString Inode::text(int i) const
if ((i==2) || (i==3)) {
/* file/dir count makes no sense for files */
- if (_filePeer) return QString();
+ if (_filePeer) return TQString();
- QString text;
+ TQString text;
unsigned int f = (i==2) ? fileCount() : dirCount();
if (f>0) {
while (f>1000) {
- text = QString("%1 %2").arg(QString::number(f).right(3)).arg(text);
+ text = TQString("%1 %2").arg(TQString::number(f).right(3)).arg(text);
f /= 1000;
}
- text = QString("%1 %2").arg(QString::number(f)).arg(text);
+ text = TQString("%1 %2").arg(TQString::number(f)).arg(text);
if (_fileCountEstimation>0) text += "+";
}
return text;
@@ -367,12 +367,12 @@ QString Inode::text(int i) const
if (i==5) return _info.owner();
if (i==6) return _info.group();
if (i==7) return mimeType()->comment();
- return QString();
+ return TQString();
}
-QPixmap Inode::pixmap(int i) const
+TQPixmap Inode::pixmap(int i) const
{
- if (i!=0) return QPixmap();
+ if (i!=0) return TQPixmap();
if (!_mimePixmapSet) {
KURL u;
diff --git a/konq-plugins/fsview/inode.h b/konq-plugins/fsview/inode.h
index 8289f6b..eb1e3dd 100644
--- a/konq-plugins/fsview/inode.h
+++ b/konq-plugins/fsview/inode.h
@@ -23,10 +23,10 @@
#ifndef INODE_H
#define INODE_H
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qfileinfo.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
#include <kmimetype.h>
@@ -49,7 +49,7 @@ public:
Inode(ScanDir*, Inode*);
Inode(ScanFile*, Inode*);
~Inode();
- void init(const QString&);
+ void init(const TQString&);
void setPeer(ScanDir*);
@@ -59,13 +59,13 @@ public:
double size() const;
unsigned int fileCount() const;
unsigned int dirCount() const;
- QString path() const;
- QString text(int i) const;
- QPixmap pixmap(int i) const;
- QColor backColor() const;
+ TQString path() const;
+ TQString text(int i) const;
+ TQPixmap pixmap(int i) const;
+ TQColor backColor() const;
KMimeType::Ptr mimeType() const;
- const QFileInfo& fileInfo() const { return _info; }
+ const TQFileInfo& fileInfo() const { return _info; }
ScanDir* dirPeer() { return _dirPeer; }
ScanFile* filePeer() { return _filePeer; }
bool isDir() { return (_dirPeer != 0); }
@@ -78,7 +78,7 @@ public:
private:
void setMetrics(double, unsigned int);
- QFileInfo _info;
+ TQFileInfo _info;
ScanDir* _dirPeer;
ScanFile* _filePeer;
@@ -91,7 +91,7 @@ private:
// This means a change even in const methods, thus has to be "mutable"
mutable bool _mimeSet, _mimePixmapSet;
mutable KMimeType::Ptr _mimeType;
- mutable QPixmap _mimePixmap;
+ mutable TQPixmap _mimePixmap;
};
#endif
diff --git a/konq-plugins/fsview/main.cpp b/konq-plugins/fsview/main.cpp
index da18dcf..5a93886 100644
--- a/konq-plugins/fsview/main.cpp
+++ b/konq-plugins/fsview/main.cpp
@@ -31,8 +31,8 @@ int main(int argc, char* argv[])
KCmdLineArgs::addCmdLineOptions(options);
KApplication a;
- KConfigGroup gconfig(KGlobal::config(), QCString("General"));
- QString path = gconfig.readPathEntry("Path", ".");
+ KConfigGroup gconfig(KGlobal::config(), TQCString("General"));
+ TQString path = gconfig.readPathEntry("Path", ".");
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if (args->count()>0) path = args->arg(0);
@@ -40,17 +40,17 @@ int main(int argc, char* argv[])
// TreeMap Widget as toplevel window
FSView w(new Inode());
- QObject::connect(&w,SIGNAL(clicked(TreeMapItem*)),
- &w,SLOT(selected(TreeMapItem*)));
- QObject::connect(&w,SIGNAL(returnPressed(TreeMapItem*)),
- &w,SLOT(selected(TreeMapItem*)));
- QObject::connect(&w,
- SIGNAL(contextMenuRequested(TreeMapItem*,const QPoint&)),
- &w,SLOT(contextMenu(TreeMapItem*, const QPoint&)));
+ TQObject::connect(&w,TQT_SIGNAL(clicked(TreeMapItem*)),
+ &w,TQT_SLOT(selected(TreeMapItem*)));
+ TQObject::connect(&w,TQT_SIGNAL(returnPressed(TreeMapItem*)),
+ &w,TQT_SLOT(selected(TreeMapItem*)));
+ TQObject::connect(&w,
+ TQT_SIGNAL(contextMenuRequested(TreeMapItem*,const TQPoint&)),
+ &w,TQT_SLOT(contextMenu(TreeMapItem*, const TQPoint&)));
w.setPath(path);
w.show();
- a.connect( &a, SIGNAL( lastWindowClosed() ), &w, SLOT( quit() ) );
+ a.connect( &a, TQT_SIGNAL( lastWindowClosed() ), &w, TQT_SLOT( quit() ) );
return a.exec();
}
diff --git a/konq-plugins/fsview/scan.cpp b/konq-plugins/fsview/scan.cpp
index ed691e3..1d3d06a 100644
--- a/konq-plugins/fsview/scan.cpp
+++ b/konq-plugins/fsview/scan.cpp
@@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qstringlist.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -34,7 +34,7 @@ ScanManager::ScanManager()
_listener = 0;
}
-ScanManager::ScanManager(const QString& path)
+ScanManager::ScanManager(const TQString& path)
{
_topDir = 0;
_listener = 0;
@@ -52,7 +52,7 @@ void ScanManager::setListener(ScanListener* l)
_listener = l;
}
-ScanDir* ScanManager::setTop(const QString& path, int data)
+ScanDir* ScanManager::setTop(const TQString& path, int data)
{
stopScan();
if (_topDir) {
@@ -120,7 +120,7 @@ ScanFile::ScanFile()
_listener = 0;
}
-ScanFile::ScanFile(const QString& n, KIO::fileoffset_t s)
+ScanFile::ScanFile(const TQString& n, KIO::fileoffset_t s)
{
_name = n;
_size = s;
@@ -145,7 +145,7 @@ ScanDir::ScanDir()
_data = 0;
}
-ScanDir::ScanDir(const QString& n, ScanManager* m,
+ScanDir::ScanDir(const TQString& n, ScanManager* m,
ScanDir* p, int data)
: _name(n)
{
@@ -168,10 +168,10 @@ void ScanDir::setListener(ScanListener* l)
_listener = l;
}
-QString ScanDir::path()
+TQString ScanDir::path()
{
if (_parent) {
- QString p = _parent->path();
+ TQString p = _parent->path();
if (!p.endsWith("/")) p += "/";
return p + _name;
}
@@ -231,30 +231,30 @@ int ScanDir::scan(ScanItem* si, ScanItemList& list, int data)
return 0;
}
- QDir d(si->absPath);
- QStringList fileList = d.entryList( QDir::Files |
- QDir::Hidden | QDir::NoSymLinks );
+ TQDir d(si->absPath);
+ TQStringList fileList = d.entryList( TQDir::Files |
+ TQDir::Hidden | TQDir::NoSymLinks );
if (fileList.count()>0) {
KDE_struct_stat buff;
_files.reserve(fileList.count());
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = fileList.begin(); it != fileList.end(); ++it ) {
- KDE_lstat( QFile::encodeName(si->absPath + "/" + (*it)), &buff );
+ KDE_lstat( TQFile::encodeName(si->absPath + "/" + (*it)), &buff );
_files.append( ScanFile(*it, buff.st_size) );
_fileSize += buff.st_size;
}
}
- QStringList dirList = d.entryList( QDir::Dirs |
- QDir::Hidden | QDir::NoSymLinks );
+ TQStringList dirList = d.entryList( TQDir::Dirs |
+ TQDir::Hidden | TQDir::NoSymLinks );
if (dirList.count()>2) {
_dirs.reserve(dirList.count()-2);
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = dirList.begin(); it != dirList.end(); ++it ) {
if ( ((*it) == "..") || ((*it) == ".") ) continue;
_dirs.append( ScanDir(*it, _manager, this, data) );
diff --git a/konq-plugins/fsview/scan.h b/konq-plugins/fsview/scan.h
index 38b015c..ca4ce4f 100644
--- a/konq-plugins/fsview/scan.h
+++ b/konq-plugins/fsview/scan.h
@@ -23,9 +23,9 @@
#ifndef FSDIR_H
#define FSDIR_H
-#include <qptrlist.h>
-#include <qvaluevector.h>
-#include <qfile.h>
+#include <tqptrlist.h>
+#include <tqvaluevector.h>
+#include <tqfile.h>
/* Use KDE_lstat and KIO::fileoffset_t for 64-bit sizes */
#include <klargefile.h>
@@ -37,14 +37,14 @@ class ScanFile;
class ScanItem
{
public:
- ScanItem(const QString& p, ScanDir* d)
+ ScanItem(const TQString& p, ScanDir* d)
{ absPath = p; dir = d; }
- QString absPath;
+ TQString absPath;
ScanDir* dir;
};
-typedef QPtrList<ScanItem> ScanItemList;
+typedef TQPtrList<ScanItem> ScanItemList;
/**
@@ -83,13 +83,13 @@ class ScanManager
{
public:
ScanManager();
- ScanManager(const QString& path);
+ ScanManager(const TQString& path);
~ScanManager();
/** Set the top path for scanning
* The ScanDir object created gets attribute data.
*/
- ScanDir* setTop(const QString& path, int data = 0);
+ ScanDir* setTop(const TQString& path, int data = 0);
ScanDir* top() { return _topDir; }
bool scanRunning();
@@ -131,10 +131,10 @@ class ScanFile
{
public:
ScanFile();
- ScanFile(const QString& n, KIO::fileoffset_t s);
+ ScanFile(const TQString& n, KIO::fileoffset_t s);
~ScanFile();
- const QString& name() { return _name; }
+ const TQString& name() { return _name; }
KIO::fileoffset_t size() { return _size; }
/* set listener to get callbacks from this ScanDir */
@@ -142,13 +142,13 @@ class ScanFile
ScanListener* listener() { return _listener; }
private:
- QString _name;
+ TQString _name;
KIO::fileoffset_t _size;
ScanListener* _listener;
};
-typedef QValueVector<ScanFile> ScanFileVector;
-typedef QValueVector<ScanDir> ScanDirVector;
+typedef TQValueVector<ScanFile> ScanFileVector;
+typedef TQValueVector<ScanDir> ScanDirVector;
/**
* A directory to scan.
@@ -159,7 +159,7 @@ class ScanDir
{
public:
ScanDir();
- ScanDir(const QString& n, ScanManager* m,
+ ScanDir(const TQString& n, ScanManager* m,
ScanDir* p = 0, int data = 0);
~ScanDir();
@@ -180,7 +180,7 @@ class ScanDir
void setupChildRescan();
/* Absolute path. Warning: Slow, loops to top parent. */
- QString path();
+ TQString path();
/* get integer data attribute */
int data() { return _data; }
@@ -188,7 +188,7 @@ class ScanDir
ScanFileVector& files() { return _files; }
ScanDirVector& dirs() { return _dirs; }
- const QString& name() { return _name; }
+ const TQString& name() { return _name; }
KIO::fileoffset_t size() { update(); return _size; }
unsigned int fileCount() { update(); return _fileCount; }
unsigned int dirCount() { update(); return _dirCount; }
@@ -217,7 +217,7 @@ class ScanDir
ScanFileVector _files;
ScanDirVector _dirs;
- QString _name;
+ TQString _name;
bool _dirty; /* needs a call to update() */
KIO::fileoffset_t _size, _fileSize;
unsigned int _fileCount, _dirCount;
diff --git a/konq-plugins/fsview/treemap.cpp b/konq-plugins/fsview/treemap.cpp
index 8de5c01..5a42c75 100644
--- a/konq-plugins/fsview/treemap.cpp
+++ b/konq-plugins/fsview/treemap.cpp
@@ -18,16 +18,16 @@
/*
* A Widget for visualizing hierarchical metrics as areas.
- * The API is similar to QListView.
+ * The API is similar to TQListView.
*/
#include <math.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kconfig.h>
@@ -56,7 +56,7 @@ StoredDrawParams::StoredDrawParams()
// field array has size 0
}
-StoredDrawParams::StoredDrawParams(QColor c,
+StoredDrawParams::StoredDrawParams(TQColor c,
bool selected, bool current)
{
_backColor = c;
@@ -69,18 +69,18 @@ StoredDrawParams::StoredDrawParams(QColor c,
// field array has size 0
}
-QString StoredDrawParams::text(int f) const
+TQString StoredDrawParams::text(int f) const
{
if ((f<0) || (f >= (int)_field.size()))
- return QString::null;
+ return TQString::null;
return _field[f].text;
}
-QPixmap StoredDrawParams::pixmap(int f) const
+TQPixmap StoredDrawParams::pixmap(int f) const
{
if ((f<0) || (f >= (int)_field.size()))
- return QPixmap();
+ return TQPixmap();
return _field[f].pix;
}
@@ -101,10 +101,10 @@ int StoredDrawParams::maxLines(int f) const
return _field[f].maxLines;
}
-const QFont& StoredDrawParams::font() const
+const TQFont& StoredDrawParams::font() const
{
- static QFont* f = 0;
- if (!f) f = new QFont(QApplication::font());
+ static TQFont* f = 0;
+ if (!f) f = new TQFont(TQApplication::font());
return *f;
}
@@ -124,7 +124,7 @@ void StoredDrawParams::ensureField(int f)
}
-void StoredDrawParams::setField(int f, const QString& t, QPixmap pm,
+void StoredDrawParams::setField(int f, const TQString& t, TQPixmap pm,
Position p, int maxLines)
{
if (f<0 || f>=MAX_FIELD) return;
@@ -136,7 +136,7 @@ void StoredDrawParams::setField(int f, const QString& t, QPixmap pm,
_field[f].maxLines = maxLines;
}
-void StoredDrawParams::setText(int f, const QString& t)
+void StoredDrawParams::setText(int f, const TQString& t)
{
if (f<0 || f>=MAX_FIELD) return;
ensureField(f);
@@ -144,7 +144,7 @@ void StoredDrawParams::setText(int f, const QString& t)
_field[f].text = t;
}
-void StoredDrawParams::setPixmap(int f, const QPixmap& pm)
+void StoredDrawParams::setPixmap(int f, const TQPixmap& pm)
{
if (f<0 || f>=MAX_FIELD) return;
ensureField(f);
@@ -174,7 +174,7 @@ void StoredDrawParams::setMaxLines(int f, int m)
// RectDrawing
//
-RectDrawing::RectDrawing(QRect r)
+RectDrawing::RectDrawing(TQRect r)
{
_fm = 0;
_dp = 0;
@@ -203,7 +203,7 @@ void RectDrawing::setDrawParams(DrawParams* dp)
_dp = dp;
}
-void RectDrawing::setRect(QRect r)
+void RectDrawing::setRect(TQRect r)
{
_rect = r;
@@ -217,7 +217,7 @@ void RectDrawing::setRect(QRect r)
_fontHeight = 0;
}
-QRect RectDrawing::remainingRect(DrawParams* dp)
+TQRect RectDrawing::remainingRect(DrawParams* dp)
{
if (!dp) dp = drawParams();
@@ -242,19 +242,19 @@ QRect RectDrawing::remainingRect(DrawParams* dp)
}
-void RectDrawing::drawBack(QPainter* p, DrawParams* dp)
+void RectDrawing::drawBack(TQPainter* p, DrawParams* dp)
{
if (!dp) dp = drawParams();
if (_rect.width()<=0 || _rect.height()<=0) return;
- QRect r = _rect;
- QColor normal = dp->backColor();
+ TQRect r = _rect;
+ TQColor normal = dp->backColor();
if (dp->selected()) normal = normal.light();
bool isCurrent = dp->current();
// 3D raised/sunken frame effect...
- QColor high = normal.light();
- QColor low = normal.dark();
+ TQColor high = normal.light();
+ TQColor low = normal.dark();
p->setPen( isCurrent ? low:high);
p->drawLine(r.left(), r.top(), r.right(), r.top());
p->drawLine(r.left(), r.top(), r.left(), r.bottom());
@@ -269,7 +269,7 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp)
bool goDark = qGray(normal.rgb())>128;
int rBase, gBase, bBase;
normal.rgb(&rBase, &gBase, &bBase);
- p->setBrush(QBrush::NoBrush);
+ p->setBrush(TQBrush::NoBrush);
// shade parameters:
int d = 7;
@@ -290,7 +290,7 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp)
int gDiff = goDark ? -gBase/d : (255-gBase)/d;
int bDiff = goDark ? -bBase/d : (255-bBase)/d;
- QColor shadeColor;
+ TQColor shadeColor;
while (factor<.95) {
shadeColor.setRgb((int)(rBase+factor*rDiff+.5),
(int)(gBase+factor*gDiff+.5),
@@ -329,22 +329,22 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp)
}
// fill inside
- p->setPen(QPen::NoPen);
+ p->setPen(TQPen::NoPen);
p->setBrush(normal);
p->drawRect(r);
}
-bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
+bool RectDrawing::drawField(TQPainter* p, int f, DrawParams* dp)
{
if (!dp) dp = drawParams();
if (!_fm) {
- _fm = new QFontMetrics(dp->font());
+ _fm = new TQFontMetrics(dp->font());
_fontHeight = _fm->height();
}
- QRect r = _rect;
+ TQRect r = _rect;
if (0) kdDebug(90100) << "DrawField: Rect " << r.x() << "/" << r.y()
<< " - " << r.width() << "x" << r.height() << endl;
@@ -484,9 +484,9 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
// get text and pixmap now, only if we need to, because it is possible
// that they are calculated on demand (and this can take some time)
- QString name = dp->text(f);
+ TQString name = dp->text(f);
if (name.isEmpty()) return 0;
- QPixmap pix = dp->pixmap(f);
+ TQPixmap pix = dp->pixmap(f);
// check if pixmap can be drawn
int pixW = pix.width();
@@ -548,14 +548,14 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
* If the text is to be written at the bottom, we start with the
* end of the string (so everything is reverted)
*/
- QString remaining;
+ TQString remaining;
int origLines = lines;
while (lines>0) {
if (w>width && lines>1) {
int lastBreakPos = name.length(), lastWidth = w;
int len = name.length();
- QChar::Category caOld, ca;
+ TQChar::Category caOld, ca;
if (!isBottom) {
// start with comparing categories of last 2 chars
@@ -565,8 +565,8 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
ca = name[len-1].category();
if (ca != caOld) {
// "Aa" has no break between...
- if (ca == QChar::Letter_Uppercase &&
- caOld == QChar::Letter_Lowercase) {
+ if (ca == TQChar::Letter_Uppercase &&
+ caOld == TQChar::Letter_Lowercase) {
caOld = ca;
continue;
}
@@ -580,7 +580,7 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
w = lastWidth;
remaining = name.mid(lastBreakPos);
// remove space on break point
- if (name[lastBreakPos-1].category() == QChar::Separator_Space)
+ if (name[lastBreakPos-1].category() == TQChar::Separator_Space)
name = name.left(lastBreakPos-1);
else
name = name.left(lastBreakPos);
@@ -594,8 +594,8 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
if (ca != caOld) {
// "Aa" has no break between...
- if (caOld == QChar::Letter_Uppercase &&
- ca == QChar::Letter_Lowercase) {
+ if (caOld == TQChar::Letter_Uppercase &&
+ ca == TQChar::Letter_Lowercase) {
caOld = ca;
continue;
}
@@ -609,14 +609,14 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
w = lastWidth;
remaining = name.left(l-lastBreakPos);
// remove space on break point
- if (name[l-lastBreakPos].category() == QChar::Separator_Space)
+ if (name[l-lastBreakPos].category() == TQChar::Separator_Space)
name = name.right(lastBreakPos-1);
else
name = name.right(lastBreakPos);
}
}
else
- remaining = QString::null;
+ remaining = TQString::null;
/* truncate and add ... if needed */
if (w>width) {
@@ -776,8 +776,8 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value)
TreeMapItem::TreeMapItem(TreeMapItem* parent, double value,
- QString text1, QString text2,
- QString text3, QString text4)
+ TQString text1, TQString text2,
+ TQString text3, TQString text4)
{
_value = value;
_parent = parent;
@@ -861,13 +861,13 @@ void TreeMapItem::refresh()
}
-QStringList TreeMapItem::path(int textNo) const
+TQStringList TreeMapItem::path(int textNo) const
{
- QStringList list(text(textNo));
+ TQStringList list(text(textNo));
TreeMapItem* i = _parent;
while (i) {
- QString text = i->text(textNo);
+ TQString text = i->text(textNo);
if (!text.isEmpty())
list.prepend(i->text(textNo));
i = i->_parent;
@@ -934,7 +934,7 @@ DrawParams::Position TreeMapItem::position(int f) const
}
// use widget font
-const QFont& TreeMapItem::font() const
+const TQFont& TreeMapItem::font() const
{
return _widget->currentFont();
}
@@ -1013,7 +1013,7 @@ TreeMapItemList* TreeMapItem::children()
void TreeMapItem::clearItemRect()
{
- _rect = QRect();
+ _rect = TQRect();
clearFreeRects();
}
@@ -1022,13 +1022,13 @@ void TreeMapItem::clearFreeRects()
if (_freeRects) _freeRects->clear();
}
-void TreeMapItem::addFreeRect(const QRect& r)
+void TreeMapItem::addFreeRect(const TQRect& r)
{
// don't add invalid rects
if ((r.width() < 1) || (r.height() < 1)) return;
if (!_freeRects) {
- _freeRects = new QPtrList<QRect>;
+ _freeRects = new TQPtrList<TQRect>;
_freeRects->setAutoDelete(true);
}
@@ -1036,9 +1036,9 @@ void TreeMapItem::addFreeRect(const QRect& r)
<< r.x() << "/" << r.y() << "-"
<< r.width() << "x" << r.height() << ")" << endl;
- QRect* last = _freeRects->last();
+ TQRect* last = _freeRects->last();
if (!last) {
- _freeRects->append(new QRect(r));
+ _freeRects->append(new TQRect(r));
return;
}
@@ -1060,7 +1060,7 @@ void TreeMapItem::addFreeRect(const QRect& r)
}
if (!replaced) {
- _freeRects->append(new QRect(r));
+ _freeRects->append(new TQRect(r));
return;
}
@@ -1075,13 +1075,13 @@ void TreeMapItem::addFreeRect(const QRect& r)
class TreeMapTip: public QToolTip
{
public:
- TreeMapTip( QWidget* p ):QToolTip(p) {}
+ TreeMapTip( TQWidget* p ):TQToolTip(p) {}
protected:
- void maybeTip( const QPoint & );
+ void maybeTip( const TQPoint & );
};
-void TreeMapTip::maybeTip( const QPoint& pos )
+void TreeMapTip::maybeTip( const TQPoint& pos )
{
if ( !parentWidget()->inherits( "TreeMapWidget" ) )
return;
@@ -1089,9 +1089,9 @@ void TreeMapTip::maybeTip( const QPoint& pos )
TreeMapWidget* p = (TreeMapWidget*)parentWidget();
TreeMapItem* i;
i = p->item(pos.x(), pos.y());
- QPtrList<QRect>* rList = i ? i->freeRects() : 0;
+ TQPtrList<TQRect>* rList = i ? i->freeRects() : 0;
if (rList) {
- QRect* r;
+ TQRect* r;
for(r=rList->first();r;r=rList->next())
if (r->contains(pos))
tip(*r, p->tipString(i));
@@ -1103,8 +1103,8 @@ void TreeMapTip::maybeTip( const QPoint& pos )
// TreeMapWidget
TreeMapWidget::TreeMapWidget(TreeMapItem* base,
- QWidget* parent, const char* name)
- : QWidget(parent, name)
+ TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
_base = base;
_base->setWidget(this);
@@ -1140,7 +1140,7 @@ TreeMapWidget::TreeMapWidget(TreeMapItem* base,
_needsRefresh = _base;
setBackgroundMode(Qt::NoBackground);
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
_tip = new TreeMapTip(this);
}
@@ -1148,7 +1148,7 @@ TreeMapWidget::~TreeMapWidget()
{
}
-const QFont& TreeMapWidget::currentFont() const
+const TQFont& TreeMapWidget::currentFont() const
{
return _font;
}
@@ -1166,7 +1166,7 @@ TreeMapItem::SplitMode TreeMapWidget::splitMode() const
return _splitMode;
}
-bool TreeMapWidget::setSplitMode(QString mode)
+bool TreeMapWidget::setSplitMode(TQString mode)
{
if (mode == "Bisection") setSplitMode(TreeMapItem::Bisection);
else if (mode == "Columns") setSplitMode(TreeMapItem::Columns);
@@ -1182,9 +1182,9 @@ bool TreeMapWidget::setSplitMode(QString mode)
return true;
}
-QString TreeMapWidget::splitModeString() const
+TQString TreeMapWidget::splitModeString() const
{
- QString mode;
+ TQString mode;
switch(splitMode()) {
case TreeMapItem::Bisection: mode = "Bisection"; break;
case TreeMapItem::Columns: mode = "Columns"; break;
@@ -1250,14 +1250,14 @@ void TreeMapWidget::setMaxDrawingDepth(int d)
redraw();
}
-QString TreeMapWidget::defaultFieldType(int f) const
+TQString TreeMapWidget::defaultFieldType(int f) const
{
return i18n("Text %1").arg(f+1);
}
-QString TreeMapWidget::defaultFieldStop(int) const
+TQString TreeMapWidget::defaultFieldStop(int) const
{
- return QString();
+ return TQString();
}
bool TreeMapWidget::defaultFieldVisible(int f) const
@@ -1302,7 +1302,7 @@ bool TreeMapWidget::resizeAttr(int size)
return true;
}
-void TreeMapWidget::setFieldType(int f, QString type)
+void TreeMapWidget::setFieldType(int f, TQString type)
{
if (((int)_attr.size() < f+1) &&
(type == defaultFieldType(f))) return;
@@ -1311,13 +1311,13 @@ void TreeMapWidget::setFieldType(int f, QString type)
// no need to redraw: the type string is not visible in the TreeMap
}
-QString TreeMapWidget::fieldType(int f) const
+TQString TreeMapWidget::fieldType(int f) const
{
if (f<0 || (int)_attr.size()<f+1) return defaultFieldType(f);
return _attr[f].type;
}
-void TreeMapWidget::setFieldStop(int f, QString stop)
+void TreeMapWidget::setFieldStop(int f, TQString stop)
{
if (((int)_attr.size() < f+1) &&
(stop == defaultFieldStop(f))) return;
@@ -1327,7 +1327,7 @@ void TreeMapWidget::setFieldStop(int f, QString stop)
}
}
-QString TreeMapWidget::fieldStop(int f) const
+TQString TreeMapWidget::fieldStop(int f) const
{
if (f<0 || (int)_attr.size()<f+1) return defaultFieldStop(f);
return _attr[f].stop;
@@ -1390,7 +1390,7 @@ DrawParams::Position TreeMapWidget::fieldPosition(int f) const
return _attr[f].pos;
}
-void TreeMapWidget::setFieldPosition(int f, QString pos)
+void TreeMapWidget::setFieldPosition(int f, TQString pos)
{
if (pos == "TopLeft")
setFieldPosition(f, DrawParams::TopLeft);
@@ -1408,17 +1408,17 @@ void TreeMapWidget::setFieldPosition(int f, QString pos)
setFieldPosition(f, DrawParams::Default);
}
-QString TreeMapWidget::fieldPositionString(int f) const
+TQString TreeMapWidget::fieldPositionString(int f) const
{
TreeMapItem::Position pos = fieldPosition(f);
- if (pos == DrawParams::TopLeft) return QString("TopLeft");
- if (pos == DrawParams::TopCenter) return QString("TopCenter");
- if (pos == DrawParams::TopRight) return QString("TopRight");
- if (pos == DrawParams::BottomLeft) return QString("BottomLeft");
- if (pos == DrawParams::BottomCenter) return QString("BottomCenter");
- if (pos == DrawParams::BottomRight) return QString("BottomRight");
- if (pos == DrawParams::Default) return QString("Default");
- return QString("unknown");
+ if (pos == DrawParams::TopLeft) return TQString("TopLeft");
+ if (pos == DrawParams::TopCenter) return TQString("TopCenter");
+ if (pos == DrawParams::TopRight) return TQString("TopRight");
+ if (pos == DrawParams::BottomLeft) return TQString("BottomLeft");
+ if (pos == DrawParams::BottomCenter) return TQString("BottomCenter");
+ if (pos == DrawParams::BottomRight) return TQString("BottomRight");
+ if (pos == DrawParams::Default) return TQString("Default");
+ return TQString("unknown");
}
void TreeMapWidget::setMinimalArea(int area)
@@ -1453,9 +1453,9 @@ void TreeMapWidget::deletingItem(TreeMapItem* i)
}
-QString TreeMapWidget::tipString(TreeMapItem* i) const
+TQString TreeMapWidget::tipString(TreeMapItem* i) const
{
- QString tip, itemTip;
+ TQString tip, itemTip;
while (i) {
if (!i->text(0).isEmpty()) {
@@ -1572,7 +1572,7 @@ void TreeMapWidget::setSelected(TreeMapItem* item, bool selected)
redraw(changed);
if (0) kdDebug(90100) << (selected ? "S":"Des") << "elected Item "
- << (item ? item->path(0).join("") : QString("(null)"))
+ << (item ? item->path(0).join("") : TQString("(null)"))
<< " (depth " << (item ? item->depth() : -1)
<< ")" << endl;
}
@@ -1764,16 +1764,16 @@ TreeMapItem* TreeMapWidget::setTmpRangeSelection(TreeMapItem* i1,
return changed;
}
-void TreeMapWidget::contextMenuEvent( QContextMenuEvent* e )
+void TreeMapWidget::contextMenuEvent( TQContextMenuEvent* e )
{
//kdDebug(90100) << "TreeMapWidget::contextMenuEvent" << endl;
- if ( receivers( SIGNAL(contextMenuRequested(TreeMapItem*, const QPoint &)) ) )
+ if ( receivers( TQT_SIGNAL(contextMenuRequested(TreeMapItem*, const TQPoint &)) ) )
e->accept();
- if ( e->reason() == QContextMenuEvent::Keyboard ) {
- QRect r = (_current) ? _current->itemRect() : _base->itemRect();
- QPoint p = QPoint(r.left() + r.width()/2, r.top() + r.height()/2);
+ if ( e->reason() == TQContextMenuEvent::Keyboard ) {
+ TQRect r = (_current) ? _current->itemRect() : _base->itemRect();
+ TQPoint p = TQPoint(r.left() + r.width()/2, r.top() + r.height()/2);
emit contextMenuRequested(_current, p);
}
else {
@@ -1783,7 +1783,7 @@ void TreeMapWidget::contextMenuEvent( QContextMenuEvent* e )
}
-void TreeMapWidget::mousePressEvent( QMouseEvent* e )
+void TreeMapWidget::mousePressEvent( TQMouseEvent* e )
{
//kdDebug(90100) << "TreeMapWidget::mousePressEvent" << endl;
@@ -1851,7 +1851,7 @@ void TreeMapWidget::mousePressEvent( QMouseEvent* e )
}
}
-void TreeMapWidget::mouseMoveEvent( QMouseEvent* e )
+void TreeMapWidget::mouseMoveEvent( TQMouseEvent* e )
{
//kdDebug(90100) << "TreeMapWidget::mouseMoveEvent" << endl;
@@ -1894,7 +1894,7 @@ void TreeMapWidget::mouseMoveEvent( QMouseEvent* e )
redraw(changed);
}
-void TreeMapWidget::mouseReleaseEvent( QMouseEvent* )
+void TreeMapWidget::mouseReleaseEvent( TQMouseEvent* )
{
//kdDebug(90100) << "TreeMapWidget::mouseReleaseEvent" << endl;
@@ -1924,7 +1924,7 @@ void TreeMapWidget::mouseReleaseEvent( QMouseEvent* )
}
-void TreeMapWidget::mouseDoubleClickEvent( QMouseEvent* e )
+void TreeMapWidget::mouseDoubleClickEvent( TQMouseEvent* e )
{
TreeMapItem* over = item(e->x(), e->y());
@@ -1943,7 +1943,7 @@ int nextVisible(TreeMapItem* i)
while (idx < (int)p->children()->count()-1) {
idx++;
- QRect r = p->children()->at(idx)->itemRect();
+ TQRect r = p->children()->at(idx)->itemRect();
if (r.width()>1 && r.height()>1)
return idx;
}
@@ -1961,7 +1961,7 @@ int prevVisible(TreeMapItem* i)
while (idx > 0) {
idx--;
- QRect r = p->children()->at(idx)->itemRect();
+ TQRect r = p->children()->at(idx)->itemRect();
if (r.width()>1 && r.height()>1)
return idx;
}
@@ -1971,7 +1971,7 @@ int prevVisible(TreeMapItem* i)
-void TreeMapWidget::keyPressEvent( QKeyEvent* e )
+void TreeMapWidget::keyPressEvent( TQKeyEvent* e )
{
if (e->key() == Key_Escape && _pressed) {
@@ -2085,24 +2085,24 @@ void TreeMapWidget::keyPressEvent( QKeyEvent* e )
}
}
-void TreeMapWidget::fontChange( const QFont& )
+void TreeMapWidget::fontChange( const TQFont& )
{
redraw();
}
-void TreeMapWidget::resizeEvent( QResizeEvent * )
+void TreeMapWidget::resizeEvent( TQResizeEvent * )
{
// this automatically redraws (as size is changed)
drawTreeMap();
}
-void TreeMapWidget::paintEvent( QPaintEvent * )
+void TreeMapWidget::paintEvent( TQPaintEvent * )
{
drawTreeMap();
}
-void TreeMapWidget::showEvent( QShowEvent * )
+void TreeMapWidget::showEvent( TQShowEvent * )
{
// refresh only if needed
drawTreeMap();
@@ -2125,14 +2125,14 @@ void TreeMapWidget::drawTreeMap()
if (_needsRefresh == _base) {
// redraw whole widget
- _pixmap = QPixmap(size());
+ _pixmap = TQPixmap(size());
_pixmap.fill(backgroundColor());
}
- QPainter p(&_pixmap);
+ TQPainter p(&_pixmap);
if (_needsRefresh == _base) {
p.setPen(black);
- p.drawRect(QRect(2, 2, QWidget::width()-4, QWidget::height()-4));
- _base->setItemRect(QRect(3, 3, QWidget::width()-6, QWidget::height()-6));
+ p.drawRect(TQRect(2, 2, TQWidget::width()-4, TQWidget::height()-4));
+ _base->setItemRect(TQRect(3, 3, TQWidget::width()-6, TQWidget::height()-6));
}
else {
// only subitem
@@ -2148,12 +2148,12 @@ void TreeMapWidget::drawTreeMap()
}
bitBlt( this, 0, 0, &_pixmap, 0, 0,
- QWidget::width(), QWidget::height(), CopyROP, true);
+ TQWidget::width(), TQWidget::height(), CopyROP, true);
if (hasFocus()) {
- QPainter p(this);
- style().drawPrimitive( QStyle::PE_FocusRect, &p,
- QRect(0, 0, QWidget::width(), QWidget::height()),
+ TQPainter p(this);
+ style().drawPrimitive( TQStyle::PE_FocusRect, &p,
+ TQRect(0, 0, TQWidget::width(), TQWidget::height()),
colorGroup() );
}
}
@@ -2177,7 +2177,7 @@ void TreeMapWidget::redraw(TreeMapItem* i)
}
}
-void TreeMapWidget::drawItem(QPainter* p,
+void TreeMapWidget::drawItem(TQPainter* p,
TreeMapItem* item)
{
bool isSelected = false;
@@ -2206,7 +2206,7 @@ void TreeMapWidget::drawItem(QPainter* p,
}
-bool TreeMapWidget::horizontal(TreeMapItem* i, const QRect& r)
+bool TreeMapWidget::horizontal(TreeMapItem* i, const TQRect& r)
{
switch(i->splitMode()) {
case TreeMapItem::HAlternate:
@@ -2227,7 +2227,7 @@ bool TreeMapWidget::horizontal(TreeMapItem* i, const QRect& r)
/**
* Draw TreeMapItems recursive, starting from item
*/
-void TreeMapWidget::drawItems(QPainter* p,
+void TreeMapWidget::drawItems(TQPainter* p,
TreeMapItem* item)
{
if (DEBUG_DRAWING)
@@ -2240,9 +2240,9 @@ void TreeMapWidget::drawItems(QPainter* p,
drawItem(p, item);
item->clearFreeRects();
- QRect origRect = item->itemRect();
+ TQRect origRect = item->itemRect();
int bw = item->borderWidth();
- QRect r = QRect(origRect.x()+bw, origRect.y()+bw,
+ TQRect r = TQRect(origRect.x()+bw, origRect.y()+bw,
origRect.width()-2*bw, origRect.height()-2*bw);
TreeMapItemList* list = item->children();
@@ -2266,7 +2266,7 @@ void TreeMapWidget::drawItems(QPainter* p,
// stop drawing if stopAtText is reached
if (!stopDrawing)
for (int no=0;no<(int)_attr.size();no++) {
- QString stopAt = fieldStop(no);
+ TQString stopAt = fieldStop(no);
if (!stopAt.isEmpty() && (item->text(no) == stopAt)) {
stopDrawing = true;
break;
@@ -2320,7 +2320,7 @@ void TreeMapWidget::drawItems(QPainter* p,
<< i->value() << endl;
}
- QRect orig = r;
+ TQRect orig = r;
// if we have space for text...
if ((r.height() >= _fontHeight) && (r.width() >= _fontHeight)) {
@@ -2337,12 +2337,12 @@ void TreeMapWidget::drawItems(QPainter* p,
if (orig.x() == r.x()) {
// Strings on top
- item->addFreeRect(QRect(orig.x(), orig.y(),
+ item->addFreeRect(TQRect(orig.x(), orig.y(),
orig.width(), orig.height()-r.height()));
}
else {
// Strings on the left
- item->addFreeRect(QRect(orig.x(), orig.y(),
+ item->addFreeRect(TQRect(orig.x(), orig.y(),
orig.width()-r.width(), orig.height()));
}
@@ -2389,7 +2389,7 @@ void TreeMapWidget::drawItems(QPainter* p,
self / user_sum + .5);
if (self_length > 0) {
// take space for self cost
- QRect sr = r;
+ TQRect sr = r;
if (rotate) {
sr.setWidth( self_length );
r.setRect(r.x()+sr.width(), r.y(), r.width()-sr.width(), r.height());
@@ -2450,7 +2450,7 @@ void TreeMapWidget::drawItems(QPainter* p,
// we always split horizontally
int nextPos = (int)((double)r.width() * valSum / user_sum);
- QRect firstRect = QRect(r.x(), r.y(), nextPos, r.height());
+ TQRect firstRect = TQRect(r.x(), r.y(), nextPos, r.height());
if (nextPos < _visibleWidth) {
if (item->sorting(0) == -1) {
@@ -2501,7 +2501,7 @@ void TreeMapWidget::drawItems(QPainter* p,
// we always split horizontally
int nextPos = (int)((double)r.height() * valSum / user_sum);
- QRect firstRect = QRect(r.x(), r.y(), r.width(), nextPos);
+ TQRect firstRect = TQRect(r.x(), r.y(), r.width(), nextPos);
if (nextPos < _visibleWidth) {
if (item->sorting(0) == -1) {
@@ -2538,7 +2538,7 @@ void TreeMapWidget::drawItems(QPainter* p,
}
// fills area with a pattern if to small to draw children
-void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r)
+void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r)
{
p->setBrush(Qt::Dense4Pattern);
p->setPen(Qt::NoPen);
@@ -2547,7 +2547,7 @@ void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r)
}
// fills area with a pattern if to small to draw children
-void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r,
+void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r,
TreeMapItemListIterator it, int len, bool goBack)
{
if (DEBUG_DRAWING)
@@ -2577,8 +2577,8 @@ void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r,
}
// returns false if rect gets to small
-bool TreeMapWidget::drawItemArray(QPainter* p, TreeMapItem* item,
- QRect& r, double user_sum,
+bool TreeMapWidget::drawItemArray(TQPainter* p, TreeMapItem* item,
+ TQRect& r, double user_sum,
TreeMapItemListIterator it, int len,
bool goBack)
{
@@ -2618,14 +2618,14 @@ bool TreeMapWidget::drawItemArray(QPainter* p, TreeMapItem* item,
if (r.width() > r.height()) {
int halfPos = (int)((double)r.width() * valSum / user_sum);
- QRect firstRect = QRect(r.x(), r.y(), halfPos, r.height());
+ TQRect firstRect = TQRect(r.x(), r.y(), halfPos, r.height());
drawOn = drawItemArray(p, item, firstRect,
valSum, first, len-lenLeft, goBack);
r.setRect(r.x()+halfPos, r.y(), r.width()-halfPos, r.height());
}
else {
int halfPos = (int)((double)r.height() * valSum / user_sum);
- QRect firstRect = QRect(r.x(), r.y(), r.width(), halfPos);
+ TQRect firstRect = TQRect(r.x(), r.y(), r.width(), halfPos);
drawOn = drawItemArray(p, item, firstRect,
valSum, first, len-lenLeft, goBack);
r.setRect(r.x(), r.y()+halfPos, r.width(), r.height()-halfPos);
@@ -2694,7 +2694,7 @@ bool TreeMapWidget::drawItemArray(QPainter* p, TreeMapItem* item,
return false;
}
- QRect currRect = r;
+ TQRect currRect = r;
if (hor)
currRect.setWidth(nextPos);
@@ -2769,13 +2769,13 @@ void TreeMapWidget::splitActivated(int id)
}
-void TreeMapWidget::addSplitDirectionItems(QPopupMenu* popup, int id)
+void TreeMapWidget::addSplitDirectionItems(TQPopupMenu* popup, int id)
{
_splitID = id;
popup->setCheckable(true);
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(splitActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(splitActivated(int)));
popup->insertItem(i18n("Recursive Bisection"), id);
popup->insertItem(i18n("Columns"), id+1);
@@ -2824,21 +2824,21 @@ void TreeMapWidget::visualizationActivated(int id)
else if ((id%10) == 8) setFieldPosition(f, DrawParams::BottomRight);
}
-void TreeMapWidget::addVisualizationItems(QPopupMenu* popup, int id)
+void TreeMapWidget::addVisualizationItems(TQPopupMenu* popup, int id)
{
_visID = id;
popup->setCheckable(true);
- QPopupMenu* bpopup = new QPopupMenu();
+ TQPopupMenu* bpopup = new TQPopupMenu();
bpopup->setCheckable(true);
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(visualizationActivated(int)));
- connect(bpopup, SIGNAL(activated(int)),
- this, SLOT(visualizationActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(visualizationActivated(int)));
+ connect(bpopup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(visualizationActivated(int)));
- QPopupMenu* spopup = new QPopupMenu();
+ TQPopupMenu* spopup = new TQPopupMenu();
addSplitDirectionItems(spopup, id+100);
popup->insertItem(i18n("Nesting"), spopup, id);
@@ -2864,10 +2864,10 @@ void TreeMapWidget::addVisualizationItems(QPopupMenu* popup, int id)
popup->insertSeparator();
int f;
- QPopupMenu* tpopup;
+ TQPopupMenu* tpopup;
id += 20;
for (f=0;f<(int)_attr.size();f++, id+=10) {
- tpopup = new QPopupMenu();
+ tpopup = new TQPopupMenu();
tpopup->setCheckable(true);
popup->insertItem(_attr[f].type, tpopup, id);
tpopup->insertItem(i18n("Visible"), id+1);
@@ -2896,8 +2896,8 @@ void TreeMapWidget::addVisualizationItems(QPopupMenu* popup, int id)
tpopup->setItemChecked(id+7,_attr[f].pos == DrawParams::BottomCenter);
tpopup->setItemChecked(id+8,_attr[f].pos == DrawParams::BottomRight);
- connect(tpopup, SIGNAL(activated(int)),
- this, SLOT(visualizationActivated(int)));
+ connect(tpopup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(visualizationActivated(int)));
}
}
@@ -2913,7 +2913,7 @@ void TreeMapWidget::selectionActivated(int id)
setSelected(i, true);
}
-void TreeMapWidget::addSelectionItems(QPopupMenu* popup,
+void TreeMapWidget::addSelectionItems(TQPopupMenu* popup,
int id, TreeMapItem* i)
{
if (!i) return;
@@ -2921,11 +2921,11 @@ void TreeMapWidget::addSelectionItems(QPopupMenu* popup,
_selectionID = id;
_menuItem = i;
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(selectionActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(selectionActivated(int)));
while (i) {
- QString name = i->text(0);
+ TQString name = i->text(0);
if (name.isEmpty()) break;
popup->insertItem(i->text(0), id++);
i = i->parent();
@@ -2934,7 +2934,7 @@ void TreeMapWidget::addSelectionItems(QPopupMenu* popup,
void TreeMapWidget::fieldStopActivated(int id)
{
- if (id == _fieldStopID) setFieldStop(0, QString::null);
+ if (id == _fieldStopID) setFieldStop(0, TQString::null);
else {
TreeMapItem* i = _menuItem;
id -= _fieldStopID+1;
@@ -2947,13 +2947,13 @@ void TreeMapWidget::fieldStopActivated(int id)
}
}
-void TreeMapWidget::addFieldStopItems(QPopupMenu* popup,
+void TreeMapWidget::addFieldStopItems(TQPopupMenu* popup,
int id, TreeMapItem* i)
{
_fieldStopID = id;
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(fieldStopActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(fieldStopActivated(int)));
popup->insertItem(i18n("No %1 Limit").arg(fieldType(0)), id);
popup->setItemChecked(id, fieldStop(0).isEmpty());
@@ -2964,7 +2964,7 @@ void TreeMapWidget::addFieldStopItems(QPopupMenu* popup,
while (i) {
id++;
- QString name = i->text(0);
+ TQString name = i->text(0);
if (name.isEmpty()) break;
popup->insertItem(i->text(0), id);
if (fieldStop(0) == i->text(0)) {
@@ -2996,14 +2996,14 @@ void TreeMapWidget::areaStopActivated(int id)
else if (id == _areaStopID+6) setMinimalArea(minimalArea()/2);
}
-void TreeMapWidget::addAreaStopItems(QPopupMenu* popup,
+void TreeMapWidget::addAreaStopItems(TQPopupMenu* popup,
int id, TreeMapItem* i)
{
_areaStopID = id;
_menuItem = i;
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(areaStopActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(areaStopActivated(int)));
bool foundArea = false;
@@ -3061,14 +3061,14 @@ void TreeMapWidget::depthStopActivated(int id)
else if (id == _depthStopID+6) setMaxDrawingDepth(6);
}
-void TreeMapWidget::addDepthStopItems(QPopupMenu* popup,
+void TreeMapWidget::addDepthStopItems(TQPopupMenu* popup,
int id, TreeMapItem* i)
{
_depthStopID = id;
_menuItem = i;
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(depthStopActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(depthStopActivated(int)));
bool foundDepth = false;
@@ -3117,7 +3117,7 @@ void TreeMapWidget::addDepthStopItems(QPopupMenu* popup,
* Option saving/restoring
*/
-void TreeMapWidget::saveOptions(KConfigGroup* config, QString prefix)
+void TreeMapWidget::saveOptions(KConfigGroup* config, TQString prefix)
{
config->writeEntry(prefix+"Nesting", splitModeString());
config->writeEntry(prefix+"AllowRotation", allowRotation());
@@ -3130,23 +3130,23 @@ void TreeMapWidget::saveOptions(KConfigGroup* config, QString prefix)
int f, fCount = _attr.size();
config->writeEntry(prefix+"FieldCount", fCount);
for (f=0;f<fCount;f++) {
- config->writeEntry(QString(prefix+"FieldVisible%1").arg(f),
+ config->writeEntry(TQString(prefix+"FieldVisible%1").arg(f),
_attr[f].visible);
- config->writeEntry(QString(prefix+"FieldForced%1").arg(f),
+ config->writeEntry(TQString(prefix+"FieldForced%1").arg(f),
_attr[f].forced);
- config->writeEntry(QString(prefix+"FieldStop%1").arg(f),
+ config->writeEntry(TQString(prefix+"FieldStop%1").arg(f),
_attr[f].stop);
- config->writeEntry(QString(prefix+"FieldPosition%1").arg(f),
+ config->writeEntry(TQString(prefix+"FieldPosition%1").arg(f),
fieldPositionString(f));
}
}
-void TreeMapWidget::restoreOptions(KConfigGroup* config, QString prefix)
+void TreeMapWidget::restoreOptions(KConfigGroup* config, TQString prefix)
{
bool enabled;
int num;
- QString str;
+ TQString str;
str = config->readEntry(prefix+"Nesting");
if (!str.isEmpty()) setSplitMode(str);
@@ -3180,18 +3180,18 @@ void TreeMapWidget::restoreOptions(KConfigGroup* config, QString prefix)
int f;
for (f=0;f<num;f++) {
- str = QString(prefix+"FieldVisible%1").arg(f);
+ str = TQString(prefix+"FieldVisible%1").arg(f);
if (config->hasKey(str))
setFieldVisible(f, config->readBoolEntry(str));
- str = QString(prefix+"FieldForced%1").arg(f);
+ str = TQString(prefix+"FieldForced%1").arg(f);
if (config->hasKey(str))
setFieldForced(f, config->readBoolEntry(str));
- str = config->readEntry(QString(prefix+"FieldStop%1").arg(f));
+ str = config->readEntry(TQString(prefix+"FieldStop%1").arg(f));
setFieldStop(f, str);
- str = config->readEntry(QString(prefix+"FieldPosition%1").arg(f));
+ str = config->readEntry(TQString(prefix+"FieldPosition%1").arg(f));
if (!str.isEmpty()) setFieldPosition(f, str);
}
}
diff --git a/konq-plugins/fsview/treemap.h b/konq-plugins/fsview/treemap.h
index a834d23..1deee35 100644
--- a/konq-plugins/fsview/treemap.h
+++ b/konq-plugins/fsview/treemap.h
@@ -18,7 +18,7 @@
/**
* A Widget for visualizing hierarchical metrics as areas.
- * The API is similar to QListView.
+ * The API is similar to TQListView.
*
* This file defines the following classes:
* DrawParams, RectDrawing, TreeMapItem, TreeMapWidget
@@ -30,14 +30,14 @@
#ifndef TREEMAP_H
#define TREEMAP_H
-#include <qstring.h>
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qvaluevector.h>
-#include <qcolor.h>
-#include <qapplication.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqvaluevector.h>
+#include <tqcolor.h>
+#include <tqapplication.h>
+#include <tqstringlist.h>
class QPopupMenu;
class TreeMapTip;
@@ -74,15 +74,15 @@ public:
// no constructor as this is an abstract class
virtual ~DrawParams() {}
- virtual QString text(int) const = 0;
- virtual QPixmap pixmap(int) const = 0;
+ virtual TQString text(int) const = 0;
+ virtual TQPixmap pixmap(int) const = 0;
virtual Position position(int) const = 0;
// 0: no limit, negative: leave at least -maxLines() free
virtual int maxLines(int) const { return 0; }
virtual int fieldCount() const { return 0; }
- virtual QColor backColor() const { return Qt::white; }
- virtual const QFont& font() const = 0;
+ virtual TQColor backColor() const { return Qt::white; }
+ virtual const TQFont& font() const = 0;
virtual bool selected() const { return false; }
virtual bool current() const { return false; }
@@ -98,39 +98,39 @@ class StoredDrawParams: public DrawParams
{
public:
StoredDrawParams();
- StoredDrawParams(QColor c,
+ StoredDrawParams(TQColor c,
bool selected = false, bool current = false);
// getters
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
Position position(int) const;
int maxLines(int) const;
int fieldCount() const { return _field.size(); }
- QColor backColor() const { return _backColor; }
+ TQColor backColor() const { return _backColor; }
bool selected() const { return _selected; }
bool current() const { return _current; }
bool shaded() const { return _shaded; }
bool rotated() const { return _rotated; }
- const QFont& font() const;
+ const TQFont& font() const;
// attribute setters
- void setField(int f, const QString& t, QPixmap pm = QPixmap(),
+ void setField(int f, const TQString& t, TQPixmap pm = TQPixmap(),
Position p = Default, int maxLines = 0);
- void setText(int f, const QString&);
- void setPixmap(int f, const QPixmap&);
+ void setText(int f, const TQString&);
+ void setPixmap(int f, const TQPixmap&);
void setPosition(int f, Position);
void setMaxLines(int f, int);
- void setBackColor(const QColor& c) { _backColor = c; }
+ void setBackColor(const TQColor& c) { _backColor = c; }
void setSelected(bool b) { _selected = b; }
void setCurrent(bool b) { _current = b; }
void setShaded(bool b) { _shaded = b; }
void setRotated(bool b) { _rotated = b; }
protected:
- QColor _backColor;
+ TQColor _backColor;
bool _selected, _current, _shaded, _rotated;
private:
@@ -138,13 +138,13 @@ private:
void ensureField(int f);
struct Field {
- QString text;
- QPixmap pix;
+ TQString text;
+ TQPixmap pix;
Position pos;
int maxLines;
};
- QValueVector<Field> _field;
+ TQValueVector<Field> _field;
};
@@ -160,7 +160,7 @@ private:
class RectDrawing
{
public:
- RectDrawing(QRect);
+ RectDrawing(TQRect);
~RectDrawing();
// The default DrawParams object used.
@@ -168,33 +168,33 @@ public:
// we take control over the given object (i.e. delete at destruction)
void setDrawParams(DrawParams*);
- // draw on a given QPainter, use this class as info provider per default
- void drawBack(QPainter*, DrawParams* dp = 0);
+ // draw on a given TQPainter, use this class as info provider per default
+ void drawBack(TQPainter*, DrawParams* dp = 0);
/* Draw field at position() from pixmap()/text() with maxLines().
* Returns true if something was drawn
*/
- bool drawField(QPainter*, int f, DrawParams* dp = 0);
+ bool drawField(TQPainter*, int f, DrawParams* dp = 0);
// resets rectangle for free space
- void setRect(QRect);
+ void setRect(TQRect);
// Returns the rectangle area still free of text/pixmaps after
// a number of drawText() calls.
- QRect remainingRect(DrawParams* dp = 0);
+ TQRect remainingRect(DrawParams* dp = 0);
private:
int _usedTopLeft, _usedTopCenter, _usedTopRight;
int _usedBottomLeft, _usedBottomCenter, _usedBottomRight;
- QRect _rect;
+ TQRect _rect;
// temporary
int _fontHeight;
- QFontMetrics* _fm;
+ TQFontMetrics* _fm;
DrawParams* _dp;
};
-class TreeMapItemList: public QPtrList<TreeMapItem>
+class TreeMapItemList: public TQPtrList<TreeMapItem>
{
public:
TreeMapItem* commonParent();
@@ -202,7 +202,7 @@ protected:
int compareItems ( Item item1, Item item2 );
};
-typedef QPtrListIterator<TreeMapItem> TreeMapItemListIterator;
+typedef TQPtrListIterator<TreeMapItem> TreeMapItemListIterator;
/**
@@ -239,8 +239,8 @@ public:
TreeMapItem(TreeMapItem* parent = 0, double value = 1.0 );
TreeMapItem(TreeMapItem* parent, double value,
- QString text1, QString text2 = QString::null,
- QString text3 = QString::null, QString text4 = QString::null);
+ TQString text1, TQString text2 = TQString::null,
+ TQString text3 = TQString::null, TQString text4 = TQString::null);
virtual ~TreeMapItem();
bool isChildOf(TreeMapItem*);
@@ -272,7 +272,7 @@ public:
* Returns a list of text strings of specified text number,
* from root up to this item.
*/
- QStringList path(int) const;
+ TQStringList path(int) const;
/**
* Depth of this item. This is the distance to root.
@@ -288,9 +288,9 @@ public:
* Temporary rectangle used for drawing this item the last time.
* This is internally used to map from a point to an item.
*/
- void setItemRect(const QRect& r) { _rect = r; }
+ void setItemRect(const TQRect& r) { _rect = r; }
void clearItemRect();
- const QRect& itemRect() const { return _rect; }
+ const TQRect& itemRect() const { return _rect; }
int width() const { return _rect.width(); }
int height() const { return _rect.height(); }
@@ -299,8 +299,8 @@ public:
* Used internally to enable tooltip.
*/
void clearFreeRects();
- QPtrList<QRect>* freeRects() const { return _freeRects; }
- void addFreeRect(const QRect& r);
+ TQPtrList<TQRect>* freeRects() const { return _freeRects; }
+ void addFreeRect(const TQRect& r);
/**
* Temporary child item index of the child that was current() recently.
@@ -323,7 +323,7 @@ public:
virtual double value() const;
// replace "Default" position with setting from TreeMapWidget
virtual Position position(int) const;
- virtual const QFont& font() const;
+ virtual const TQFont& font() const;
virtual bool isMarked(int) const;
virtual int borderWidth() const;
@@ -373,8 +373,8 @@ private:
bool _sortAscending;
// temporary layout
- QRect _rect;
- QPtrList<QRect>* _freeRects;
+ TQRect _rect;
+ TQPtrList<TQRect>* _freeRects;
int _depth;
// temporary self value (when using level skipping)
@@ -400,7 +400,7 @@ public:
*/
enum SelectionMode { Single, Multi, Extended, NoSelection };
- TreeMapWidget(TreeMapItem* base, QWidget* parent=0, const char* name=0);
+ TreeMapWidget(TreeMapItem* base, TQWidget* parent=0, const char* name=0);
~TreeMapWidget();
/**
@@ -411,7 +411,7 @@ public:
/**
* Returns a reference to the current widget font.
*/
- const QFont& currentFont() const;
+ const TQFont& currentFont() const;
/**
* Returns the area item at position x/y, independent from any
@@ -493,8 +493,8 @@ public:
void setSplitMode(TreeMapItem::SplitMode m);
TreeMapItem::SplitMode splitMode() const;
// returns true if string was recognized
- bool setSplitMode(QString);
- QString splitModeString() const;
+ bool setSplitMode(TQString);
+ TQString splitModeString() const;
/*
@@ -542,8 +542,8 @@ public:
int minimalArea() const { return _minimalArea; }
/* defaults for text attributes */
- QString defaultFieldType(int) const;
- QString defaultFieldStop(int) const;
+ TQString defaultFieldType(int) const;
+ TQString defaultFieldStop(int) const;
bool defaultFieldVisible(int) const;
bool defaultFieldForced(int) const;
DrawParams::Position defaultFieldPosition(int) const;
@@ -553,14 +553,14 @@ public:
* This is important for the visualization menu generated
* with visualizationMenu()
*/
- void setFieldType(int, QString);
- QString fieldType(int) const;
+ void setFieldType(int, TQString);
+ TQString fieldType(int) const;
/**
* Stop drawing at item with name
*/
- void setFieldStop(int, QString);
- QString fieldStop(int) const;
+ void setFieldStop(int, TQString);
+ TQString fieldStop(int) const;
/**
* Should the text with number textNo be visible?
@@ -583,8 +583,8 @@ public:
*/
void setFieldPosition(int, DrawParams::Position);
DrawParams::Position fieldPosition(int) const;
- void setFieldPosition(int, QString);
- QString fieldPositionString(int) const;
+ void setFieldPosition(int, TQString);
+ TQString fieldPositionString(int) const;
/**
* Do we allow the texts to be rotated by 90 degrees for better fitting?
@@ -598,8 +598,8 @@ public:
/**
* Save/restore options.
*/
- void saveOptions(KConfigGroup*, QString prefix = QString::null);
- void restoreOptions(KConfigGroup*, QString prefix = QString::null);
+ void saveOptions(KConfigGroup*, TQString prefix = TQString::null);
+ void restoreOptions(KConfigGroup*, TQString prefix = TQString::null);
/**
* These functions populate given popup menus.
@@ -607,12 +607,12 @@ public:
*
* The int is the menu id where to start for the items (100 IDs reserved).
*/
- void addSplitDirectionItems(QPopupMenu*, int);
- void addSelectionItems(QPopupMenu*, int, TreeMapItem*);
- void addFieldStopItems(QPopupMenu*, int, TreeMapItem*);
- void addAreaStopItems(QPopupMenu*, int, TreeMapItem*);
- void addDepthStopItems(QPopupMenu*, int, TreeMapItem*);
- void addVisualizationItems(QPopupMenu*, int);
+ void addSplitDirectionItems(TQPopupMenu*, int);
+ void addSelectionItems(TQPopupMenu*, int, TreeMapItem*);
+ void addFieldStopItems(TQPopupMenu*, int, TreeMapItem*);
+ void addAreaStopItems(TQPopupMenu*, int, TreeMapItem*);
+ void addDepthStopItems(TQPopupMenu*, int, TreeMapItem*);
+ void addVisualizationItems(TQPopupMenu*, int);
TreeMapWidget* widget() { return this; }
TreeMapItem* current() const { return _current; }
@@ -625,7 +625,7 @@ public:
* Return tooltip string to show for a item (can be rich text)
* Default implementation gives lines with "text0 (text1)" going to root.
*/
- virtual QString tipString(TreeMapItem* i) const;
+ virtual TQString tipString(TreeMapItem* i) const;
/**
* Redraws an item with all children.
@@ -666,20 +666,20 @@ signals:
void clicked(TreeMapItem*);
void returnPressed(TreeMapItem*);
void doubleClicked(TreeMapItem*);
- void rightButtonPressed(TreeMapItem*, const QPoint &);
- void contextMenuRequested(TreeMapItem*, const QPoint &);
+ void rightButtonPressed(TreeMapItem*, const TQPoint &);
+ void contextMenuRequested(TreeMapItem*, const TQPoint &);
protected:
- void mousePressEvent( QMouseEvent * );
- void contextMenuEvent( QContextMenuEvent * );
- void mouseReleaseEvent( QMouseEvent * );
- void mouseMoveEvent( QMouseEvent * );
- void mouseDoubleClickEvent( QMouseEvent * );
- void keyPressEvent( QKeyEvent* );
- void paintEvent( QPaintEvent * );
- void resizeEvent( QResizeEvent * );
- void showEvent( QShowEvent * );
- void fontChange( const QFont& );
+ void mousePressEvent( TQMouseEvent * );
+ void contextMenuEvent( TQContextMenuEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void mouseDoubleClickEvent( TQMouseEvent * );
+ void keyPressEvent( TQKeyEvent* );
+ void paintEvent( TQPaintEvent * );
+ void resizeEvent( TQResizeEvent * );
+ void showEvent( TQShowEvent * );
+ void fontChange( const TQFont& );
private:
TreeMapItemList diff(TreeMapItemList&, TreeMapItemList&);
@@ -689,13 +689,13 @@ private:
TreeMapItem* i2, bool selected);
bool isTmpSelected(TreeMapItem* i);
- void drawItem(QPainter* p, TreeMapItem*);
- void drawItems(QPainter* p, TreeMapItem*);
- bool horizontal(TreeMapItem* i, const QRect& r);
- void drawFill(TreeMapItem*,QPainter* p, QRect& r);
- void drawFill(TreeMapItem*,QPainter* p, QRect& r,
+ void drawItem(TQPainter* p, TreeMapItem*);
+ void drawItems(TQPainter* p, TreeMapItem*);
+ bool horizontal(TreeMapItem* i, const TQRect& r);
+ void drawFill(TreeMapItem*,TQPainter* p, TQRect& r);
+ void drawFill(TreeMapItem*,TQPainter* p, TQRect& r,
TreeMapItemListIterator it, int len, bool goBack);
- bool drawItemArray(QPainter* p, TreeMapItem*, QRect& r, double,
+ bool drawItemArray(TQPainter* p, TreeMapItem*, TQRect& r, double,
TreeMapItemListIterator it, int len, bool);
bool resizeAttr(int);
@@ -706,11 +706,11 @@ private:
// attributes for field, per textNo
struct FieldAttr {
- QString type, stop;
+ TQString type, stop;
bool visible, forced;
DrawParams::Position pos;
};
- QValueVector<FieldAttr> _attr;
+ TQValueVector<FieldAttr> _attr;
SelectionMode _selectionMode;
TreeMapItem::SplitMode _splitMode;
@@ -732,11 +732,11 @@ private:
bool _inShiftDrag, _inControlDrag;
// temporary widget font metrics while drawing
- QFont _font;
+ TQFont _font;
int _fontHeight;
// back buffer pixmap
- QPixmap _pixmap;
+ TQPixmap _pixmap;
};
#endif