summaryrefslogtreecommitdiffstats
path: root/kpager
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 /kpager
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 'kpager')
-rw-r--r--kpager/config.cpp68
-rw-r--r--kpager/config.h16
-rw-r--r--kpager/desktop.cpp206
-rw-r--r--kpager/desktop.h50
-rw-r--r--kpager/kpager.cpp124
-rw-r--r--kpager/kpager.h28
-rw-r--r--kpager/main.cpp4
-rw-r--r--kpager/windowdrag.cpp14
-rw-r--r--kpager/windowdrag.h8
9 files changed, 259 insertions, 259 deletions
diff --git a/kpager/config.cpp b/kpager/config.cpp
index 60aa85f2a..5ff0d3def 100644
--- a/kpager/config.cpp
+++ b/kpager/config.cpp
@@ -21,13 +21,13 @@
***************************************************************************/
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qwidget.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqwidget.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
#include <kdialogbase.h>
#include <klocale.h>
@@ -42,51 +42,51 @@
#include "kpager.h"
-KPagerConfigDialog::KPagerConfigDialog (QWidget *parent)
+KPagerConfigDialog::KPagerConfigDialog (TQWidget *parent)
: KDialogBase ( parent, "configdialog", true, i18n("Configuration"), Ok|Cancel, Ok, true )
{
- QVBox *box = new QVBox( this );
- m_chkWindowDragging=new QCheckBox(i18n("Enable window dragging"),box,0);
+ TQVBox *box = new TQVBox( this );
+ m_chkWindowDragging=new TQCheckBox(i18n("Enable window dragging"),box,0);
(void ) new KSeparator( box );
- connect(m_chkWindowDragging, SIGNAL(toggled(bool)), this, SLOT(enableWindowDragging(bool)));
+ connect(m_chkWindowDragging, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableWindowDragging(bool)));
- QHBox *page = new QHBox( box );
- QVBox *lpage = new QVBox( page );
+ TQHBox *page = new TQHBox( box );
+ TQVBox *lpage = new TQVBox( page );
setMainWidget(box);
- m_chkShowName=new QCheckBox(i18n("Show name"),lpage,0);
- connect(m_chkShowName, SIGNAL(toggled(bool)), this, SLOT(setShowName(bool)));
- m_chkShowNumber=new QCheckBox(i18n("Show number"),lpage,0);
- connect(m_chkShowNumber, SIGNAL(toggled(bool)), this, SLOT(setShowNumber(bool)));
- m_chkShowBackground=new QCheckBox(i18n("Show background"),lpage,0);
- connect(m_chkShowBackground, SIGNAL(toggled(bool)), this, SLOT(setShowBackground(bool)));
- m_chkShowWindows=new QCheckBox(i18n("Show windows"),lpage,0);
- connect(m_chkShowWindows, SIGNAL(toggled(bool)), this, SLOT(setShowWindows(bool)));
+ m_chkShowName=new TQCheckBox(i18n("Show name"),lpage,0);
+ connect(m_chkShowName, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setShowName(bool)));
+ m_chkShowNumber=new TQCheckBox(i18n("Show number"),lpage,0);
+ connect(m_chkShowNumber, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setShowNumber(bool)));
+ m_chkShowBackground=new TQCheckBox(i18n("Show background"),lpage,0);
+ connect(m_chkShowBackground, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setShowBackground(bool)));
+ m_chkShowWindows=new TQCheckBox(i18n("Show windows"),lpage,0);
+ connect(m_chkShowWindows, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setShowWindows(bool)));
- m_grpWindowDrawMode=new QButtonGroup(i18n("Type of Window"),page);
+ m_grpWindowDrawMode=new TQButtonGroup(i18n("Type of Window"),page);
m_grpWindowDrawMode->setExclusive(true);
- QVBoxLayout *vbox = new QVBoxLayout(m_grpWindowDrawMode, KDialog::marginHint(),
+ TQVBoxLayout *vbox = new TQVBoxLayout(m_grpWindowDrawMode, KDialog::marginHint(),
KDialog::spacingHint());
vbox->addSpacing(fontMetrics().lineSpacing());
- vbox->addWidget(new QRadioButton(i18n("Plain"),m_grpWindowDrawMode));
- vbox->addWidget(new QRadioButton(i18n("Icon"),m_grpWindowDrawMode));
+ vbox->addWidget(new TQRadioButton(i18n("Plain"),m_grpWindowDrawMode));
+ vbox->addWidget(new TQRadioButton(i18n("Icon"),m_grpWindowDrawMode));
- QRadioButton *rbpix = new QRadioButton(i18n("Pixmap"),m_grpWindowDrawMode);
+ TQRadioButton *rbpix = new TQRadioButton(i18n("Pixmap"),m_grpWindowDrawMode);
// rbpix->setEnabled(false);
vbox->addWidget(rbpix);
- connect(m_grpWindowDrawMode, SIGNAL(clicked(int)), this, SLOT(setWindowDrawMode(int)));
+ connect(m_grpWindowDrawMode, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(setWindowDrawMode(int)));
- m_grpLayoutType=new QButtonGroup(i18n("Layout"),page);
+ m_grpLayoutType=new TQButtonGroup(i18n("Layout"),page);
m_grpLayoutType->setExclusive(true);
- vbox = new QVBoxLayout(m_grpLayoutType, KDialog::marginHint(), KDialog::spacingHint());
+ vbox = new TQVBoxLayout(m_grpLayoutType, KDialog::marginHint(), KDialog::spacingHint());
vbox->addSpacing(fontMetrics().lineSpacing());
- vbox->addWidget(new QRadioButton(i18n("Classical"),m_grpLayoutType));
- vbox->addWidget(new QRadioButton(i18n("Horizontal"),m_grpLayoutType));
- vbox->addWidget(new QRadioButton(i18n("Vertical"),m_grpLayoutType));
+ vbox->addWidget(new TQRadioButton(i18n("Classical"),m_grpLayoutType));
+ vbox->addWidget(new TQRadioButton(i18n("Horizontal"),m_grpLayoutType));
+ vbox->addWidget(new TQRadioButton(i18n("Vertical"),m_grpLayoutType));
- connect(m_grpLayoutType, SIGNAL(clicked(int)), this, SLOT(setLayout(int)));
- connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
+ connect(m_grpLayoutType, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(setLayout(int)));
+ connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(slotOk()));
loadConfiguration();
setMinimumSize(360, 160);
}
diff --git a/kpager/config.h b/kpager/config.h
index 153e025f9..683ee0176 100644
--- a/kpager/config.h
+++ b/kpager/config.h
@@ -33,7 +33,7 @@ class KPagerConfigDialog : public KDialogBase
Q_OBJECT
public:
- KPagerConfigDialog(QWidget *parent);
+ KPagerConfigDialog(TQWidget *parent);
public slots:
void setShowName(bool show);
@@ -59,13 +59,13 @@ public:
static bool m_windowDragging;
protected:
- QCheckBox *m_chkShowName;
- QCheckBox *m_chkShowNumber;
- QCheckBox *m_chkShowBackground;
- QCheckBox *m_chkShowWindows;
- QButtonGroup *m_grpWindowDrawMode;
- QButtonGroup *m_grpLayoutType;
- QCheckBox* m_chkWindowDragging;
+ TQCheckBox *m_chkShowName;
+ TQCheckBox *m_chkShowNumber;
+ TQCheckBox *m_chkShowBackground;
+ TQCheckBox *m_chkShowWindows;
+ TQButtonGroup *m_grpWindowDrawMode;
+ TQButtonGroup *m_grpLayoutType;
+ TQCheckBox* m_chkWindowDragging;
bool m_tmpShowName;
bool m_tmpShowNumber;
bool m_tmpShowBackground;
diff --git a/kpager/desktop.cpp b/kpager/desktop.cpp
index cb41bb04c..311378171 100644
--- a/kpager/desktop.cpp
+++ b/kpager/desktop.cpp
@@ -39,17 +39,17 @@
#include <kpixmapio.h>
#include <kpopupmenu.h>
#include <netwm.h>
-#include <qcstring.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qpoint.h>
+#include <tqcstring.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqpoint.h>
#include "desktop.h"
#include "config.h"
#include "windowdrag.h"
-Desktop::Desktop( int desk, QString desktopName, QWidget *parent, const char *name): QWidget(parent,name)
+Desktop::Desktop( int desk, TQString desktopName, TQWidget *parent, const char *name): TQWidget(parent,name)
{
m_desk = desk;
m_name = desktopName;
@@ -74,18 +74,18 @@ Desktop::~Desktop()
delete m_bgSmallPixmap;
}
-void Desktop::mouseMoveEvent( QMouseEvent *ev )
+void Desktop::mouseMoveEvent( TQMouseEvent *ev )
{
if ( !KPagerConfigDialog::m_windowDragging )
return;
if ( (ev->state() & LeftButton) == 0 )
return;
- QPoint p( ev->pos() - pressPos );
+ TQPoint p( ev->pos() - pressPos );
if ( p.manhattanLength() >= qApp->startDragDistance() )
startDrag( pressPos );
}
-void Desktop::mousePressEvent( QMouseEvent * ev)
+void Desktop::mousePressEvent( TQMouseEvent * ev)
{
bool showWindows= KPagerConfigDialog::m_showWindows;
if (ev->button()==LeftButton){
@@ -94,7 +94,7 @@ void Desktop::mousePressEvent( QMouseEvent * ev)
else if ((ev->button()==MidButton)&&(showWindows))
startDrag(ev->pos());
else if (ev->button()==RightButton) {
- QPoint pos;
+ TQPoint pos;
KWin::WindowInfo *info = windowAtPosition(ev->pos(), &pos);
if ( info && showWindows )
pager()->showPopupMenu(info->win(), mapToGlobal(ev->pos()));
@@ -103,14 +103,14 @@ void Desktop::mousePressEvent( QMouseEvent * ev)
}
}
-void Desktop::mouseReleaseEvent( QMouseEvent *ev )
+void Desktop::mouseReleaseEvent( TQMouseEvent *ev )
{
/** Note that mouseReleaseEvent is not called when releasing the mouse
to drop a window in this desktop */
if (ev->button()==LeftButton)
{
bool showWindows= KPagerConfigDialog::m_showWindows;
- QPoint pos;
+ TQPoint pos;
KWin::setCurrentDesktop(m_desk);
if (showWindows)
{
@@ -126,14 +126,14 @@ void Desktop::mouseReleaseEvent( QMouseEvent *ev )
}
}
-KWin::WindowInfo *Desktop::windowAtPosition(const QPoint &p, QPoint *internalpos)
+KWin::WindowInfo *Desktop::windowAtPosition(const TQPoint &p, TQPoint *internalpos)
{
- QRect r;
- const QValueList<WId> &list(pager()->kwin()->stackingOrder());
+ TQRect r;
+ const TQValueList<WId> &list(pager()->kwin()->stackingOrder());
if (list.count() <= 0)
return 0L;
- for (QValueList<WId>::ConstIterator it = list.fromLast(); ; --it)
+ for (TQValueList<WId>::ConstIterator it = list.fromLast(); ; --it)
{
KWin::WindowInfo* info = pager()->info( *it );
if (shouldPaintWindow(info))
@@ -157,9 +157,9 @@ KWin::WindowInfo *Desktop::windowAtPosition(const QPoint &p, QPoint *internalpos
return 0L;
}
-void Desktop::convertRectS2P(QRect &r)
+void Desktop::convertRectS2P(TQRect &r)
{
- QRect tmp(r);
+ TQRect tmp(r);
r.setRect(deskX()+tmp.x()*deskWidth()/kapp->desktop()->width(),
deskY()+tmp.y()*deskHeight()/kapp->desktop()->height(),
tmp.width()*deskWidth()/kapp->desktop()->width(),
@@ -172,25 +172,25 @@ void Desktop::convertCoordP2S(int &x, int &y)
y=(y-deskY())*(kapp->desktop()->height())/deskHeight();
}
-QPixmap scalePixmap(const QPixmap &pixmap, int width, int height)
+TQPixmap scalePixmap(const TQPixmap &pixmap, int width, int height)
{
if (pixmap.width()>100)
{
KPixmapIO io;
- QImage img(io.convertToImage(pixmap));
+ TQImage img(io.convertToImage(pixmap));
return io.convertToPixmap(img.smoothScale(width,height));
}
- QImage img(pixmap.convertToImage().smoothScale(width,height));
- QPixmap pix;
+ TQImage img(pixmap.convertToImage().smoothScale(width,height));
+ TQPixmap pix;
pix.convertFromImage(img);
return pix;
}
-QPixmap fastScalePixmap(const QPixmap &pixmap, int width, int height)
+TQPixmap fastScalePixmap(const TQPixmap &pixmap, int width, int height)
{
- QWMatrix m;
+ TQWMatrix m;
m.scale(width/(double)pixmap.width(),
height/(double)pixmap.height());
return pixmap.xForm(m);
@@ -204,12 +204,12 @@ void Desktop::loadBgPixmap(void)
DCOPClient *client = kapp->dcopClient();
if (!client->isAttached())
client->attach();
- QByteArray data, data2, replyData;
- QCString replyType;
+ TQByteArray data, data2, replyData;
+ TQCString replyType;
if (client->call("kdesktop", "KBackgroundIface", "isCommon()",
data, replyType, replyData))
{
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "bool") {
reply >> m_isCommon;
}
@@ -217,14 +217,14 @@ void Desktop::loadBgPixmap(void)
if ( m_isCommon && m_desk!=1 ) return;
/*
- QDataStream args2( data2, IO_WriteOnly );
+ TQDataStream args2( data2, IO_WriteOnly );
args2 << m_desk-1 << 0 << 0 << -1 << -1 << 200 << 150 ;
if (client->call("kdesktop", "KBackgroundIface",
"wallpaper(int,int,int,int,int,int,int)", data2, replyType, replyData))
{
- QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QPixmap") {
- QPixmap pixmap;
+ TQDataStream reply(replyData, IO_ReadOnly);
+ if (replyType == "TQPixmap") {
+ TQPixmap pixmap;
reply >> pixmap;
if (!pixmap.isNull())
{
@@ -233,7 +233,7 @@ void Desktop::loadBgPixmap(void)
{
if (m_bgSmallPixmap) { delete m_bgSmallPixmap; m_bgSmallPixmap=0L; }
- if (!m_bgCommonSmallPixmap) m_bgCommonSmallPixmap=new QPixmap(pixmap);
+ if (!m_bgCommonSmallPixmap) m_bgCommonSmallPixmap=new TQPixmap(pixmap);
else *m_bgCommonSmallPixmap=pixmap;
}
else
@@ -244,7 +244,7 @@ void Desktop::loadBgPixmap(void)
m_bgCommonSmallPixmap=0L;
}
- if (!m_bgSmallPixmap) m_bgSmallPixmap=new QPixmap(pixmap);
+ if (!m_bgSmallPixmap) m_bgSmallPixmap=new TQPixmap(pixmap);
else *m_bgSmallPixmap=pixmap;
}
return;
@@ -257,20 +257,20 @@ void Desktop::loadBgPixmap(void)
if (!m_bgPixmap)
{
m_bgPixmap = new KSharedPixmap;
- connect(m_bgPixmap, SIGNAL(done(bool)), SLOT(backgroundLoaded(bool)));
+ connect(m_bgPixmap, TQT_SIGNAL(done(bool)), TQT_SLOT(backgroundLoaded(bool)));
}
- retval = m_bgPixmap->loadFromShared(QString("DESKTOP%1").arg(m_isCommon?1:m_desk));
+ retval = m_bgPixmap->loadFromShared(TQString("DESKTOP%1").arg(m_isCommon?1:m_desk));
if (retval == false) {
- QDataStream args( data, IO_WriteOnly );
+ TQDataStream args( data, IO_WriteOnly );
args << 1; // Argument is 1 (true)
client->send("kdesktop", "KBackgroundIface", "setExport(int)", data);
- retval = m_bgPixmap->loadFromShared(QString("DESKTOP%1").arg(m_isCommon?1:m_desk));
+ retval = m_bgPixmap->loadFromShared(TQString("DESKTOP%1").arg(m_isCommon?1:m_desk));
}
}
-void Desktop::paintWindow(QPainter &p, const KWin::WindowInfo *info, bool onDesktop)
+void Desktop::paintWindow(TQPainter &p, const KWin::WindowInfo *info, bool onDesktop)
{
switch (static_cast<WindowDrawMode>(KPagerConfigDialog::m_windowDrawMode ) )
{
@@ -280,59 +280,59 @@ void Desktop::paintWindow(QPainter &p, const KWin::WindowInfo *info, bool onDesk
}
}
-QPixmap *Desktop::paintNewWindow(const KWin::WindowInfo *info)
+TQPixmap *Desktop::paintNewWindow(const KWin::WindowInfo *info)
{
- QRect r = info->frameGeometry();
- int dw = QApplication::desktop()->width();
- int dh = QApplication::desktop()->height();
- r = QRect( r.x() * width() / dw, 2 + r.y() * height() / dh,
+ TQRect r = info->frameGeometry();
+ int dw = TQApplication::desktop()->width();
+ int dh = TQApplication::desktop()->height();
+ r = TQRect( r.x() * width() / dw, 2 + r.y() * height() / dh,
r.width() * width() / dw, r.height() * height() / dh );
- r.moveTopLeft(QPoint(0,0));
+ r.moveTopLeft(TQPoint(0,0));
- QPixmap *pixmap=new QPixmap(r.width(),r.height());
- QPainter p;
+ TQPixmap *pixmap=new TQPixmap(r.width(),r.height());
+ TQPainter p;
p.begin(pixmap);
p.setFont(font());
- p.fillRect( r, colorGroup().brush(QColorGroup::Dark));
+ p.fillRect( r, colorGroup().brush(TQColorGroup::Dark));
paintWindow(p, info, false);
p.end();
return pixmap;
}
-void Desktop::startDrag(const QPoint &p)
+void Desktop::startDrag(const TQPoint &p)
{
- QPoint dragpos;
+ TQPoint dragpos;
KWin::WindowInfo *info=windowAtPosition(p,&dragpos);
if ( (!info)/* || (info->state & NET::Max)*/ ) return;
- QPixmap *pixmap=paintNewWindow(info);
+ TQPixmap *pixmap=paintNewWindow(info);
int deltax=dragpos.x();
int deltay=dragpos.y();
PagerWindowDrag *wdrag= new PagerWindowDrag( info->win(), deltax, deltay,
m_desk, this);
- wdrag->setPixmap( *pixmap, QPoint( deltax, deltay) );
+ wdrag->setPixmap( *pixmap, TQPoint( deltax, deltay) );
delete pixmap;
wdrag->dragCopy();
}
-void Desktop::dragEnterEvent(QDragEnterEvent *ev)
+void Desktop::dragEnterEvent(TQDragEnterEvent *ev)
{
if (PagerWindowDrag::canDecode( ev )) ev->accept();
}
-void Desktop::dragMoveEvent(QDragMoveEvent *)
+void Desktop::dragMoveEvent(TQDragMoveEvent *)
{
// TODO Moving the window while dragging would be cool, wouldn't it ?
// Matthias: No, is way to slow on low end machines.
// Antonio:Ok, I'll make it configurable after 2.0 (it would add a string)
}
-void Desktop::dropEvent(QDropEvent *ev)
+void Desktop::dropEvent(TQDropEvent *ev)
{
WId win=0;
int deltax,deltay;
@@ -408,24 +408,24 @@ bool Desktop::shouldPaintWindow( KWin::WindowInfo *info )
void Desktop::paintFrame(bool active)
{
- QPainter p(this);
+ TQPainter p(this);
if ( active )
p.setPen(yellow);
else
- p.setPen(QColorGroup::Base);
+ p.setPen(TQColorGroup::Base);
p.drawRect(rect());
p.end();
}
-void Desktop::paintEvent( QPaintEvent * )
+void Desktop::paintEvent( TQPaintEvent * )
{
- QPixmap pixmap(width(),height());
- QPainter p;
+ TQPixmap pixmap(width(),height());
+ TQPainter p;
p.begin(&pixmap);
// p.setFont(font());
-// p.fillRect(rect(), colorGroup().brush(QColorGroup::Dark));
+// p.fillRect(rect(), colorGroup().brush(TQColorGroup::Dark));
// p.setPen(Qt::black);
// p.drawRect(rect());
@@ -439,7 +439,7 @@ void Desktop::paintEvent( QPaintEvent * )
|| ( m_isCommon &&
m_bgCommonSmallPixmap && !m_bgCommonSmallPixmap->isNull() ) )
{
- QPixmap tmp;
+ TQPixmap tmp;
if ( m_isCommon )
tmp=fastScalePixmap(*m_bgCommonSmallPixmap, width(),height());
else
@@ -450,43 +450,43 @@ void Desktop::paintEvent( QPaintEvent * )
else pixmap.fill(Qt::gray);
}
else
- p.fillRect(rect(), colorGroup().brush(QColorGroup::Mid));
+ p.fillRect(rect(), colorGroup().brush(TQColorGroup::Mid));
// set in/active pen
if (isCurrent())
p.setPen(yellow);
else
- p.setPen(QColorGroup::Base);
+ p.setPen(TQColorGroup::Base);
// paint number & name
bool sname=KPagerConfigDialog::m_showName;
bool snumber=KPagerConfigDialog::m_showNumber;
if ( sname || snumber ) {
- QString txt;
+ TQString txt;
// set font
if (sname) {
- QFont f(KGlobalSettings::generalFont().family(), 10, QFont::Bold);
+ TQFont f(KGlobalSettings::generalFont().family(), 10, TQFont::Bold);
p.setFont(f);
}
else {
- QFont f(KGlobalSettings::generalFont().family(), 12, QFont::Bold);
+ TQFont f(KGlobalSettings::generalFont().family(), 12, TQFont::Bold);
p.setFont(f);
}
// draw text
if ( sname && snumber )
- txt=QString("%1. %2").arg(m_desk).arg(pager()->kwin()->desktopName( m_desk ));
+ txt=TQString("%1. %2").arg(m_desk).arg(pager()->kwin()->desktopName( m_desk ));
else if ( sname )
txt=pager()->kwin()->desktopName( m_desk );
else if ( snumber )
- txt=QString::number( m_desk );
+ txt=TQString::number( m_desk );
p.drawText(2, 0, width()-4, height(), AlignCenter, txt );
}
// paint windows
if ( KPagerConfigDialog::m_showWindows ) {
- QValueList<WId>::ConstIterator it;
+ TQValueList<WId>::ConstIterator it;
for ( it = pager()->kwin()->stackingOrder().begin();
it != pager()->kwin()->stackingOrder().end(); ++it ) {
@@ -509,26 +509,26 @@ void Desktop::paintEvent( QPaintEvent * )
m_grabWindows=false;
}
-void Desktop::paintWindowPlain(QPainter &p, const KWin::WindowInfo *info, bool onDesktop)
+void Desktop::paintWindowPlain(TQPainter &p, const KWin::WindowInfo *info, bool onDesktop)
{
- QRect r = info->frameGeometry();
- int dw = QApplication::desktop()->width();
- int dh = QApplication::desktop()->height();
- r = QRect( r.x() * width() / dw, 2 + r.y() * height() / dh,
+ TQRect r = info->frameGeometry();
+ int dw = TQApplication::desktop()->width();
+ int dh = TQApplication::desktop()->height();
+ r = TQRect( r.x() * width() / dw, 2 + r.y() * height() / dh,
r.width() * width() / dw, r.height() * height() / dh );
if ( !onDesktop )
- r.moveTopLeft(QPoint(0,0));
+ r.moveTopLeft(TQPoint(0,0));
bool isActive=(pager()->kwin()->activeWindow() == info->win());
- QBrush brush;
+ TQBrush brush;
- if ( isActive ) brush=colorGroup().brush( QColorGroup::Highlight );
- else brush=colorGroup().brush( QColorGroup::Button );
+ if ( isActive ) brush=colorGroup().brush( TQColorGroup::Highlight );
+ else brush=colorGroup().brush( TQColorGroup::Button );
if ( m_transparentMode==AllWindows
|| (m_transparentMode==MaximizedWindows && ( info->state() & NET::Max )) )
- brush.setStyle(QBrush::Dense4Pattern);
+ brush.setStyle(TQBrush::Dense4Pattern);
if ( isActive )
{
@@ -543,14 +543,14 @@ void Desktop::paintWindowPlain(QPainter &p, const KWin::WindowInfo *info, bool o
}
-void Desktop::paintWindowIcon(QPainter &p, const KWin::WindowInfo *info, bool onDesktop)
+void Desktop::paintWindowIcon(TQPainter &p, const KWin::WindowInfo *info, bool onDesktop)
{
- QRect r = info->frameGeometry();
- int dw = QApplication::desktop()->width();
- int dh = QApplication::desktop()->height();
- r = QRect( r.x() * width() / dw, 2 + r.y() * height() / dh,
+ TQRect r = info->frameGeometry();
+ int dw = TQApplication::desktop()->width();
+ int dh = TQApplication::desktop()->height();
+ r = TQRect( r.x() * width() / dw, 2 + r.y() * height() / dh,
r.width() * width() / dw, r.height() * height() / dh );
- QPixmap icon=KWin::icon( info->win(), int(r.width()*0.8),
+ TQPixmap icon=KWin::icon( info->win(), int(r.width()*0.8),
int(r.height()*0.8), true);
NET::WindowType type = info->windowType( NET::NormalMask | NET::DesktopMask
@@ -560,36 +560,36 @@ void Desktop::paintWindowIcon(QPainter &p, const KWin::WindowInfo *info, bool on
paintWindowPlain(p,info,onDesktop);
if ( !onDesktop )
- r.moveTopLeft(QPoint(0,0));
+ r.moveTopLeft(TQPoint(0,0));
- p.drawPixmap( r.topLeft()+ QPoint(int(r.width()*0.1),int(r.height()*0.1)),
+ p.drawPixmap( r.topLeft()+ TQPoint(int(r.width()*0.1),int(r.height()*0.1)),
icon );
}
-void Desktop::paintWindowPixmap(QPainter &p, const KWin::WindowInfo *info,
+void Desktop::paintWindowPixmap(TQPainter &p, const KWin::WindowInfo *info,
bool onDesktop)
{
const int knDefaultPixmapWd = 100;
const int knDefaultPixmapHg = 75;
- QRect rSmall, r = info->frameGeometry();
+ TQRect rSmall, r = info->frameGeometry();
- int dw = QApplication::desktop()->width();
- int dh = QApplication::desktop()->height();
- rSmall = QRect( r.x() * width() / dw, 2 + r.y() * height() / dh,
+ int dw = TQApplication::desktop()->width();
+ int dh = TQApplication::desktop()->height();
+ rSmall = TQRect( r.x() * width() / dw, 2 + r.y() * height() / dh,
r.width() * width() / dw, r.height() * height() / dh );
- QPixmap *pixmap=m_windowPixmaps[info->win()];
+ TQPixmap *pixmap=m_windowPixmaps[info->win()];
bool isDirty=m_windowPixmapsDirty[info->win()];
if ( !pixmap || isDirty || m_grabWindows )
{
if ( isCurrent() )
{
- QPixmap tmp=QPixmap::grabWindow(info->win(),
+ TQPixmap tmp=TQPixmap::grabWindow(info->win(),
0,0,r.width(),r.height());
if (!tmp.isNull() && tmp.width() > 0 && tmp.height() > 0)
{
- tmp.setOptimization(QPixmap::BestOptim);
+ tmp.setOptimization(TQPixmap::BestOptim);
int nWd, nHg;
if (rSmall.width() > knDefaultPixmapWd || rSmall.height() > knDefaultPixmapHg)
{
@@ -601,7 +601,7 @@ void Desktop::paintWindowPixmap(QPainter &p, const KWin::WindowInfo *info,
nWd = rSmall.width();
nHg = rSmall.height();
}
- pixmap=new QPixmap(fastScalePixmap(tmp, nWd, nHg));
+ pixmap=new TQPixmap(fastScalePixmap(tmp, nWd, nHg));
m_windowPixmaps.replace(info->win(),pixmap);
m_windowPixmapsDirty.replace(info->win(),false);
}
@@ -617,11 +617,11 @@ void Desktop::paintWindowPixmap(QPainter &p, const KWin::WindowInfo *info,
}
if ( !onDesktop )
- rSmall.moveTopLeft(QPoint(0,0));
+ rSmall.moveTopLeft(TQPoint(0,0));
if (rSmall.width() != pixmap->width() || rSmall.height() != pixmap->height())
{
- QPixmap pixmapSmall(fastScalePixmap(*pixmap,rSmall.width(),rSmall.height()));
+ TQPixmap pixmapSmall(fastScalePixmap(*pixmap,rSmall.width(),rSmall.height()));
p.drawPixmap( rSmall.topLeft(), pixmapSmall );
}
else
@@ -669,15 +669,15 @@ void Desktop::backgroundLoaded(bool b)
} else kdDebug() << "Error getting the background\n";
}
-QSize Desktop::sizeHint() const
+TQSize Desktop::sizeHint() const
{
- return QSize(67,50);
+ return TQSize(67,50);
}
-QPixmap *Desktop::m_bgCommonSmallPixmap=0L;
+TQPixmap *Desktop::m_bgCommonSmallPixmap=0L;
bool Desktop::m_isCommon=false;
-QIntDict<QPixmap> Desktop::m_windowPixmaps;
-QMap<int,bool> Desktop::m_windowPixmapsDirty;
+TQIntDict<TQPixmap> Desktop::m_windowPixmaps;
+TQMap<int,bool> Desktop::m_windowPixmapsDirty;
// Default Configuration -------------------------------------------------
diff --git a/kpager/desktop.h b/kpager/desktop.h
index acdf4f517..067555b58 100644
--- a/kpager/desktop.h
+++ b/kpager/desktop.h
@@ -25,8 +25,8 @@
#ifndef __DESKTOP_H
#define __DESKTOP_H
-#include <qwidget.h>
-#include <qintdict.h>
+#include <tqwidget.h>
+#include <tqintdict.h>
#include <kwin.h>
class KSharedPixmap;
@@ -40,7 +40,7 @@ class Desktop : public QWidget
Q_OBJECT
public:
- Desktop( int desk, QString desktopName, QWidget *parent=0,
+ Desktop( int desk, TQString desktopName, TQWidget *parent=0,
const char *name=0);
~Desktop();
@@ -65,16 +65,16 @@ public:
virtual int deskWidth() const { return width(); };
virtual int deskHeight() const { return height(); };
- void startDrag(const QPoint &point);
- void dragEnterEvent(QDragEnterEvent *ev);
- void dragMoveEvent(QDragMoveEvent *);
- void dropEvent(QDropEvent *ev);
- void convertRectS2P(QRect &r);
+ void startDrag(const TQPoint &point);
+ void dragEnterEvent(TQDragEnterEvent *ev);
+ void dragMoveEvent(TQDragMoveEvent *);
+ void dropEvent(TQDropEvent *ev);
+ void convertRectS2P(TQRect &r);
void convertCoordP2S(int &x, int &y);
static void removeCachedPixmap(int nWin) { m_windowPixmaps.remove(nWin); };
- QSize sizeHint() const;
+ TQSize sizeHint() const;
/**
* active is a bool that specifies if the frame is the active
@@ -89,41 +89,41 @@ public slots:
void loadBgPixmap();
protected:
- void mousePressEvent( QMouseEvent *ev );
- void mouseMoveEvent( QMouseEvent *ev );
- void mouseReleaseEvent( QMouseEvent *ev );
+ void mousePressEvent( TQMouseEvent *ev );
+ void mouseMoveEvent( TQMouseEvent *ev );
+ void mouseReleaseEvent( TQMouseEvent *ev );
- void paintEvent( QPaintEvent *ev );
+ void paintEvent( TQPaintEvent *ev );
- KWin::WindowInfo *windowAtPosition (const QPoint &p, QPoint *internalpos);
+ KWin::WindowInfo *windowAtPosition (const TQPoint &p, TQPoint *internalpos);
bool shouldPaintWindow( KWin::WindowInfo *info );
int m_desk;
- QString m_name;
+ TQString m_name;
KSharedPixmap *m_bgPixmap;
bool m_bgDirty;
- QPixmap *m_bgSmallPixmap;
- static QPixmap *m_bgCommonSmallPixmap;
+ TQPixmap *m_bgSmallPixmap;
+ static TQPixmap *m_bgCommonSmallPixmap;
static bool m_isCommon;
- static QIntDict<QPixmap> m_windowPixmaps;
- static QMap<int,bool> m_windowPixmapsDirty;
+ static TQIntDict<TQPixmap> m_windowPixmaps;
+ static TQMap<int,bool> m_windowPixmapsDirty;
WindowTransparentMode m_transparentMode;
- QPixmap *paintNewWindow(const KWin::WindowInfo *info);
+ TQPixmap *paintNewWindow(const KWin::WindowInfo *info);
- void paintWindow(QPainter &p, const KWin::WindowInfo *info,
+ void paintWindow(TQPainter &p, const KWin::WindowInfo *info,
bool onDesktop=true);
- void paintWindowPlain(QPainter &p, const KWin::WindowInfo *info,
+ void paintWindowPlain(TQPainter &p, const KWin::WindowInfo *info,
bool onDesktop=true);
- void paintWindowIcon(QPainter &p, const KWin::WindowInfo *info,
+ void paintWindowIcon(TQPainter &p, const KWin::WindowInfo *info,
bool onDesktop=true);
- void paintWindowPixmap(QPainter &p, const KWin::WindowInfo *info,
+ void paintWindowPixmap(TQPainter &p, const KWin::WindowInfo *info,
bool onDesktop=true);
private:
class KPager* pager() const;
- QPoint pressPos;
+ TQPoint pressPos;
};
diff --git a/kpager/kpager.cpp b/kpager/kpager.cpp
index b405e633b..e521f1e28 100644
--- a/kpager/kpager.cpp
+++ b/kpager/kpager.cpp
@@ -36,11 +36,11 @@
#include "config.h"
#include "kpager.h"
-#include <qintdict.h>
-#include <qptrlist.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qtimer.h>
+#include <tqintdict.h>
+#include <tqptrlist.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kglobalsettings.h>
@@ -54,12 +54,12 @@
#include <kwinmodule.h>
#include <netwm.h>
#include "desktop.h"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kpopupmenu.h>
#include <kiconloader.h>
#include <assert.h>
-KPagerMainWindow::KPagerMainWindow(QWidget *parent, const char *name)
+KPagerMainWindow::KPagerMainWindow(TQWidget *parent, const char *name)
: DCOPObject("KPagerIface"), KMainWindow(parent, name)
{
m_reallyClose=false;
@@ -110,8 +110,8 @@ KPagerMainWindow::KPagerMainWindow(QWidget *parent, const char *name)
XSetWMHints(x11Display(), winId(), hints);
XFree(reinterpret_cast<char *>(hints));
- timeout=new QTimer(this,"timeoutToQuit");
- connect(timeout,SIGNAL(timeout()),this, SLOT(reallyClose()));
+ timeout=new TQTimer(this,"timeoutToQuit");
+ connect(timeout,TQT_SIGNAL(timeout()),this, TQT_SLOT(reallyClose()));
}
KPagerMainWindow::~KPagerMainWindow()
@@ -141,7 +141,7 @@ bool KPagerMainWindow::queryClose()
return false;
}
-void KPagerMainWindow::showEvent( QShowEvent *ev )
+void KPagerMainWindow::showEvent( TQShowEvent *ev )
{
timeout->stop();
KMainWindow::showEvent(ev);
@@ -178,7 +178,7 @@ void KPagerMainWindow::toggleShow(int x, int y)
}
KPager::KPager(KPagerMainWindow *parent, const char *name)
- : QFrame (parent, name, WStyle_Customize | WStyle_NoBorder | WStyle_Tool)
+ : TQFrame (parent, name, WStyle_Customize | WStyle_NoBorder | WStyle_Tool)
, m_layout(0)
, m_mnu(0)
, m_smnu(0)
@@ -190,8 +190,8 @@ KPager::KPager(KPagerMainWindow *parent, const char *name)
m_winmodule=new KWinModule(this);
m_currentDesktop=m_winmodule->currentDesktop();
- m_grabWinTimer=new QTimer(this,"grabWinTimer");
- connect(m_grabWinTimer, SIGNAL(timeout()), this, SLOT(slotGrabWindows()));
+ m_grabWinTimer=new TQTimer(this,"grabWinTimer");
+ connect(m_grabWinTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotGrabWindows()));
KPagerConfigDialog::initConfiguration();
@@ -208,31 +208,31 @@ KPager::KPager(KPagerMainWindow *parent, const char *name)
m_layoutType=static_cast<enum KPager::LayoutTypes>( KPagerConfigDialog::m_layoutType );
- connect( m_winmodule, SIGNAL( activeWindowChanged(WId)),
- SLOT(slotActiveWindowChanged(WId)));
- connect( m_winmodule, SIGNAL( windowAdded(WId) ),
- SLOT( slotWindowAdded(WId) ) );
- connect( m_winmodule, SIGNAL( windowRemoved(WId) ),
- SLOT( slotWindowRemoved(WId) ) );
- connect( m_winmodule, SIGNAL( windowChanged(WId,unsigned int) ),
- SLOT( slotWindowChanged(WId,unsigned int) ) );
- connect( m_winmodule, SIGNAL( stackingOrderChanged() ),
- SLOT( slotStackingOrderChanged() ) );
- connect( m_winmodule, SIGNAL( desktopNamesChanged() ),
- SLOT( slotDesktopNamesChanged() ) );
- connect( m_winmodule, SIGNAL( numberOfDesktopsChanged(int) ),
- SLOT( slotNumberOfDesktopsChanged(int) ) );
- connect( m_winmodule, SIGNAL( currentDesktopChanged(int)),
- SLOT( slotCurrentDesktopChanged(int) ) );
- connect(kapp, SIGNAL(backgroundChanged(int)),
- SLOT(slotBackgroundChanged(int)));
-
- QFont defFont(KGlobalSettings::generalFont().family(), 10, QFont::Bold);
+ connect( m_winmodule, TQT_SIGNAL( activeWindowChanged(WId)),
+ TQT_SLOT(slotActiveWindowChanged(WId)));
+ connect( m_winmodule, TQT_SIGNAL( windowAdded(WId) ),
+ TQT_SLOT( slotWindowAdded(WId) ) );
+ connect( m_winmodule, TQT_SIGNAL( windowRemoved(WId) ),
+ TQT_SLOT( slotWindowRemoved(WId) ) );
+ connect( m_winmodule, TQT_SIGNAL( windowChanged(WId,unsigned int) ),
+ TQT_SLOT( slotWindowChanged(WId,unsigned int) ) );
+ connect( m_winmodule, TQT_SIGNAL( stackingOrderChanged() ),
+ TQT_SLOT( slotStackingOrderChanged() ) );
+ connect( m_winmodule, TQT_SIGNAL( desktopNamesChanged() ),
+ TQT_SLOT( slotDesktopNamesChanged() ) );
+ connect( m_winmodule, TQT_SIGNAL( numberOfDesktopsChanged(int) ),
+ TQT_SLOT( slotNumberOfDesktopsChanged(int) ) );
+ connect( m_winmodule, TQT_SIGNAL( currentDesktopChanged(int)),
+ TQT_SLOT( slotCurrentDesktopChanged(int) ) );
+ connect(kapp, TQT_SIGNAL(backgroundChanged(int)),
+ TQT_SLOT(slotBackgroundChanged(int)));
+
+ TQFont defFont(KGlobalSettings::generalFont().family(), 10, TQFont::Bold);
defFont = cfg->readFontEntry("Font", &defFont);
setFont(defFont);
- m_prefs_action = KStdAction::preferences(this, SLOT(configureDialog()), parent->actionCollection());
- m_quit_action = KStdAction::quit(kapp, SLOT(quit()), parent->actionCollection());
+ m_prefs_action = KStdAction::preferences(this, TQT_SLOT(configureDialog()), parent->actionCollection());
+ m_quit_action = KStdAction::quit(kapp, TQT_SLOT(quit()), parent->actionCollection());
updateLayout();
}
@@ -242,7 +242,7 @@ KPager::~KPager()
}
-const QString KPager::lWidth()
+const TQString KPager::lWidth()
{
switch (m_layoutType) {
case (Classical) : return "layoutClassicalWidth";break;
@@ -252,7 +252,7 @@ const QString KPager::lWidth()
return "Width";
}
-const QString KPager::lHeight()
+const TQString KPager::lHeight()
{
switch (m_layoutType) {
case (Classical) : return "layoutClassicalHeight";break;
@@ -271,12 +271,12 @@ void KPager::updateLayout()
switch (m_layoutType)
{
- case (Classical) : m_layout=new QGridLayout(this, 2, 0); break;
- case (Horizontal) : m_layout=new QGridLayout(this, 0, 1); break;
- case (Vertical) : m_layout=new QGridLayout(this, 1, 0); break;
+ case (Classical) : m_layout=new TQGridLayout(this, 2, 0); break;
+ case (Horizontal) : m_layout=new TQGridLayout(this, 0, 1); break;
+ case (Vertical) : m_layout=new TQGridLayout(this, 1, 0); break;
};
- QValueList <Desktop *>::Iterator it;
+ TQValueList <Desktop *>::Iterator it;
int i,j;
i=j=0;
int ndesks=0;
@@ -305,11 +305,11 @@ void KPager::updateLayout()
}
-void KPager::showPopupMenu( WId wid, QPoint pos)
+void KPager::showPopupMenu( WId wid, TQPoint pos)
{
if (wid <= 0) {
if(!m_smnu) {
- m_smnu = new QPopupMenu(this);
+ m_smnu = new TQPopupMenu(this);
m_prefs_action->plug(m_smnu);
m_quit_action->plug(m_smnu);
}
@@ -321,20 +321,20 @@ void KPager::showPopupMenu( WId wid, QPoint pos)
if (!m_mnu) {
m_mnu = new KPopupMenu(this);
- m_mnu->insertTitle( QString::fromUtf8("KPager"), 1);
+ m_mnu->insertTitle( TQString::fromUtf8("KPager"), 1);
m_mnu->setCheckable(true);
- connect(m_mnu, SIGNAL(aboutToShow()), SLOT(clientPopupAboutToShow()));
- connect(m_mnu, SIGNAL(activated(int)), SLOT(clientPopupActivated(int)));
+ connect(m_mnu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(clientPopupAboutToShow()));
+ connect(m_mnu, TQT_SIGNAL(activated(int)), TQT_SLOT(clientPopupActivated(int)));
- m_dmnu = new QPopupMenu(m_mnu);
+ m_dmnu = new TQPopupMenu(m_mnu);
m_dmnu->setCheckable(true);
- connect(m_dmnu, SIGNAL(aboutToShow()), SLOT(desktopPopupAboutToShow()));
- connect(m_dmnu, SIGNAL(activated(int)), SLOT(sendToDesktop(int)));
+ connect(m_dmnu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(desktopPopupAboutToShow()));
+ connect(m_dmnu, TQT_SIGNAL(activated(int)), TQT_SLOT(sendToDesktop(int)));
m_mnu->insertItem( i18n("Mi&nimize"), IconifyOp );
m_mnu->insertItem( i18n("Ma&ximize"), MaximizeOp );
if (m_showStickyOption)
- m_mnu->insertItem( QString("&Sticky"), StickyOp ); // Add translation
+ m_mnu->insertItem( TQString("&Sticky"), StickyOp ); // Add translation
m_mnu->insertSeparator();
m_mnu->insertItem(i18n("&To Desktop"), m_dmnu );
@@ -357,8 +357,8 @@ void KPager::configureDialog()
{
m_layoutType=static_cast<enum KPager::LayoutTypes>(KPagerConfigDialog::m_layoutType);
KConfig *cfg=KGlobal::config();
- int nWd = (parent() ? ((QWidget *)parent())->width() : width());
- int nHg = (parent() ? ((QWidget *)parent())->width() : width());
+ int nWd = (parent() ? ((TQWidget *)parent())->width() : width());
+ int nHg = (parent() ? ((TQWidget *)parent())->width() : width());
cfg->setGroup("KPager");
@@ -373,7 +373,7 @@ void KPager::configureDialog()
cfg->writeEntry("windowDragging",KPagerConfigDialog::m_windowDragging);
updateLayout();
- for( QValueList <Desktop *>::Iterator it = m_desktops.begin(); it != m_desktops.end(); ++it )
+ for( TQValueList <Desktop *>::Iterator it = m_desktops.begin(); it != m_desktops.end(); ++it )
(*it)->repaint();
}
}
@@ -494,8 +494,8 @@ void KPager::slotDesktopNamesChanged()
{
for ( int i=1; i <= (int) m_desktops.count(); ++i)
{
- QToolTip::remove(m_desktops[i-1]);
- QToolTip::add(m_desktops[i-1], kwin()->desktopName(i));
+ TQToolTip::remove(m_desktops[i-1]);
+ TQToolTip::add(m_desktops[i-1], kwin()->desktopName(i));
}
update();
@@ -507,7 +507,7 @@ void KPager::slotNumberOfDesktopsChanged(int ndesktops)
unsigned int nDesktops=static_cast<unsigned int>(ndesktops);
if (nDesktops<m_desktops.count())
{
- QValueList <Desktop *>::Iterator it;
+ TQValueList <Desktop *>::Iterator it;
for ( int i=m_desktops.count()-nDesktops; i > 0; i--)
{
it = m_desktops.fromLast();
@@ -581,7 +581,7 @@ void KPager::clientPopupAboutToShow()
m_mnu->setItemChecked(MaximizeOp, m_winfo.state() & NET::Max);
if (m_showStickyOption) // Add translation
m_mnu->changeItem(StickyOp,
- (m_winfo.onAllDesktops()) ? QString("Un&sticky"):QString("&Sticky"));
+ (m_winfo.onAllDesktops()) ? TQString("Un&sticky"):TQString("&Sticky"));
}
void KPager::desktopPopupAboutToShow()
@@ -597,7 +597,7 @@ void KPager::desktopPopupAboutToShow()
int id;
for ( int i = 1; i <= m_winmodule->numberOfDesktops(); i++ ) {
- id = m_dmnu->insertItem( QString("&")+QString::number(i )+QString(" ")
+ id = m_dmnu->insertItem( TQString("&")+TQString::number(i )+TQString(" ")
+ m_winmodule->desktopName(i), i );
if ( m_winfo.desktop() == i )
m_dmnu->setItemChecked( id, TRUE );
@@ -641,7 +641,7 @@ void KPager::clientPopupActivated( int id )
void KPager::redrawDesktops()
{
- QValueList <Desktop *>::Iterator it;
+ TQValueList <Desktop *>::Iterator it;
for( it = m_desktops.begin(); it != m_desktops.end(); ++it )
(*it)->repaint();
}
@@ -652,12 +652,12 @@ void KPager::slotGrabWindows()
m_desktops[m_currentDesktop-1]->repaint();
}
-QSize KPager::sizeHint() const
+TQSize KPager::sizeHint() const
{
int n=m_desktops.count();
int w=-1,h=-1;
- QSize size=m_desktops[0]->sizeHint();
+ TQSize size=m_desktops[0]->sizeHint();
int wDsk=size.width();
int hDsk=size.height();
switch (m_layoutType)
@@ -666,7 +666,7 @@ QSize KPager::sizeHint() const
case (Horizontal) : w=wDsk*n; h=hDsk;break;
case (Vertical) : w=wDsk; h=hDsk*n;break;
};
- return QSize(w,h);
+ return TQSize(w,h);
}
const KPager::LayoutTypes KPager::c_defLayout=KPager::Horizontal;
diff --git a/kpager/kpager.h b/kpager/kpager.h
index 9fe67942c..a659c7592 100644
--- a/kpager/kpager.h
+++ b/kpager/kpager.h
@@ -25,8 +25,8 @@
#ifndef __KPAGER_H
#define __KPAGER_H
-#include <qwidget.h>
-#include <qintdict.h>
+#include <tqwidget.h>
+#include <tqintdict.h>
#include <kmainwindow.h>
#include <kwin.h>
#include "kpagerIface.h"
@@ -39,7 +39,7 @@ class KPagerMainWindow : public KMainWindow, public virtual KPagerIface
Q_OBJECT
public:
- KPagerMainWindow(QWidget *parent=0, const char *name=0);
+ KPagerMainWindow(TQWidget *parent=0, const char *name=0);
~KPagerMainWindow();
virtual void showAt(int x, int y);
@@ -50,10 +50,10 @@ public slots:
protected:
bool queryClose();
- void showEvent(QShowEvent *ev);
+ void showEvent(TQShowEvent *ev);
KPager *m_pPager;
- class QTimer *timeout;
+ class TQTimer *timeout;
bool m_reallyClose;
};
@@ -72,11 +72,11 @@ public:
void redrawDesktops();
- void showPopupMenu( WId wid, QPoint pos);
+ void showPopupMenu( WId wid, TQPoint pos);
KWin::WindowInfo* info( WId win );
- QSize sizeHint() const;
+ TQSize sizeHint() const;
enum LayoutTypes { Classical=0, Horizontal, Vertical };
@@ -111,25 +111,25 @@ protected:
protected:
KWinModule *m_winmodule;
- QValueList<class Desktop *> m_desktops;
+ TQValueList<class Desktop *> m_desktops;
- QIntDict<KWin::WindowInfo> m_windows;
+ TQIntDict<KWin::WindowInfo> m_windows;
WId m_activeWin;
- const QString lWidth();
- const QString lHeight();
+ const TQString lWidth();
+ const TQString lHeight();
LayoutTypes m_layoutType;
- class QGridLayout *m_layout;
+ class TQGridLayout *m_layout;
KPopupMenu *m_mnu;
- QPopupMenu *m_smnu, *m_dmnu;
+ TQPopupMenu *m_smnu, *m_dmnu;
KAction *m_quit_action;
KAction *m_prefs_action;
KWin::WindowInfo m_winfo;
bool m_showStickyOption; // To be removed after the message freeze
- QTimer *m_grabWinTimer;
+ TQTimer *m_grabWinTimer;
int m_currentDesktop;
public:
diff --git a/kpager/main.cpp b/kpager/main.cpp
index cf943f4f0..c2932478b 100644
--- a/kpager/main.cpp
+++ b/kpager/main.cpp
@@ -25,10 +25,10 @@
#include <klocale.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include <stdlib.h>
-#include <qsessionmanager.h>
+#include <tqsessionmanager.h>
#include "kpager.h"
diff --git a/kpager/windowdrag.cpp b/kpager/windowdrag.cpp
index 2f9c59cbd..fc854b8a9 100644
--- a/kpager/windowdrag.cpp
+++ b/kpager/windowdrag.cpp
@@ -25,12 +25,12 @@
#include "windowdrag.h"
-PagerWindowDrag::PagerWindowDrag(WId w,int deltax,int deltay, int origdesk,QWidget *parent)
- : QStoredDrag("application/x-kpager",parent,"windowdrag")
+PagerWindowDrag::PagerWindowDrag(WId w,int deltax,int deltay, int origdesk,TQWidget *parent)
+ : TQStoredDrag("application/x-kpager",parent,"windowdrag")
{
- QString tmp;
+ TQString tmp;
tmp.sprintf("%d %d %d %d", static_cast<int>(w), deltax, deltay, origdesk);
- QByteArray data;
+ TQByteArray data;
data.setRawData(tmp.latin1(),tmp.length()+1);
setEncodedData(data);
@@ -41,14 +41,14 @@ PagerWindowDrag::~PagerWindowDrag()
{
}
-bool PagerWindowDrag::canDecode (QDragMoveEvent *e)
+bool PagerWindowDrag::canDecode (TQDragMoveEvent *e)
{
return e->provides("application/x-kpager");
}
-bool PagerWindowDrag::decode( QDropEvent *e, WId &w,int &deltax,int &deltay,int &origdesk)
+bool PagerWindowDrag::decode( TQDropEvent *e, WId &w,int &deltax,int &deltay,int &origdesk)
{
- QByteArray data=e->data("application/x-kpager");
+ TQByteArray data=e->data("application/x-kpager");
if (data.size())
{
char *tmp=data.data();
diff --git a/kpager/windowdrag.h b/kpager/windowdrag.h
index d1886ba68..e42927459 100644
--- a/kpager/windowdrag.h
+++ b/kpager/windowdrag.h
@@ -24,17 +24,17 @@
#ifndef WINDOWDRAG_H
#define WINDOWDRAG_H
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include <X11/Xlib.h>
class PagerWindowDrag : public QStoredDrag
{
public:
- PagerWindowDrag(WId w,int deltax,int deltay,int origdesk,QWidget *parent);
+ PagerWindowDrag(WId w,int deltax,int deltay,int origdesk,TQWidget *parent);
virtual ~PagerWindowDrag();
- static bool canDecode( QDragMoveEvent *e);
- static bool decode ( QDropEvent *e, WId &w,int &deltax,int &deltay,int &origdesk);
+ static bool canDecode( TQDragMoveEvent *e);
+ static bool decode ( TQDropEvent *e, WId &w,int &deltax,int &deltay,int &origdesk);
};