summaryrefslogtreecommitdiffstats
path: root/kpager
diff options
context:
space:
mode:
Diffstat (limited to 'kpager')
-rw-r--r--kpager/desktop.cpp40
-rw-r--r--kpager/desktop.h4
-rw-r--r--kpager/kpager.cpp46
-rw-r--r--kpager/kpager.h4
-rw-r--r--kpager/main.cpp2
-rw-r--r--kpager/windowdrag.h2
6 files changed, 49 insertions, 49 deletions
diff --git a/kpager/desktop.cpp b/kpager/desktop.cpp
index 3319418a1..8f4fc19ba 100644
--- a/kpager/desktop.cpp
+++ b/kpager/desktop.cpp
@@ -78,22 +78,22 @@ void Desktop::mouseMoveEvent( TQMouseEvent *ev )
{
if ( !KPagerConfigDialog::m_windowDragging )
return;
- if ( (ev->state() & LeftButton) == 0 )
+ if ( (ev->state() & Qt::LeftButton) == 0 )
return;
TQPoint p( ev->pos() - pressPos );
- if ( p.manhattanLength() >= qApp->startDragDistance() )
+ if ( p.manhattanLength() >= tqApp->startDragDistance() )
startDrag( pressPos );
}
void Desktop::mousePressEvent( TQMouseEvent * ev)
{
bool showWindows= KPagerConfigDialog::m_showWindows;
- if (ev->button()==LeftButton){
+ if (ev->button()==Qt::LeftButton){
pressPos = ev->pos();
}
- else if ((ev->button()==MidButton)&&(showWindows))
+ else if ((ev->button()==Qt::MidButton)&&(showWindows))
startDrag(ev->pos());
- else if (ev->button()==RightButton) {
+ else if (ev->button()==Qt::RightButton) {
TQPoint pos;
KWin::WindowInfo *info = windowAtPosition(ev->pos(), &pos);
if ( info && showWindows )
@@ -107,7 +107,7 @@ 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)
+ if (ev->button()==Qt::LeftButton)
{
bool showWindows= KPagerConfigDialog::m_showWindows;
TQPoint pos;
@@ -120,7 +120,7 @@ void Desktop::mouseReleaseEvent( TQMouseEvent *ev )
KWin::forceActiveWindow(info->win());
// if ( static_cast<WindowDrawMode>( KPagerConfigDialog::m_windowDrawMode ) == Pixmap )
- // m_windowPixmapsDirty.replace(info->win,true);
+ // m_windowPixmapsDirty.tqreplace(info->win,true);
}
}
}
@@ -140,7 +140,7 @@ KWin::WindowInfo *Desktop::windowAtPosition(const TQPoint &p, TQPoint *internalp
{
r=info->geometry();
convertRectS2P(r);
- if (r.contains(p))
+ if (r.tqcontains(p))
{
if (internalpos)
{
@@ -181,7 +181,7 @@ TQPixmap scalePixmap(const TQPixmap &pixmap, int width, int height)
return io.convertToPixmap(img.smoothScale(width,height));
}
- TQImage img(pixmap.convertToImage().smoothScale(width,height));
+ TQImage img(TQImage(pixmap.convertToImage()).smoothScale(width,height));
TQPixmap pix;
pix.convertFromImage(img);
@@ -295,7 +295,7 @@ TQPixmap *Desktop::paintNewWindow(const KWin::WindowInfo *info)
p.begin(pixmap);
p.setFont(font());
- p.fillRect( r, colorGroup().brush(TQColorGroup::Dark));
+ p.fillRect( r, tqcolorGroup().brush(TQColorGroup::Dark));
paintWindow(p, info, false);
p.end();
@@ -425,7 +425,7 @@ void Desktop::paintEvent( TQPaintEvent * )
p.begin(&pixmap);
// p.setFont(font());
-// p.fillRect(rect(), colorGroup().brush(TQColorGroup::Dark));
+// p.fillRect(rect(), tqcolorGroup().brush(TQColorGroup::Dark));
// p.setPen(Qt::black);
// p.drawRect(rect());
@@ -450,7 +450,7 @@ void Desktop::paintEvent( TQPaintEvent * )
else pixmap.fill(Qt::gray);
}
else
- p.fillRect(rect(), colorGroup().brush(TQColorGroup::Mid));
+ p.fillRect(rect(), tqcolorGroup().brush(TQColorGroup::Mid));
// set in/active pen
if (isCurrent())
@@ -523,21 +523,21 @@ void Desktop::paintWindowPlain(TQPainter &p, const KWin::WindowInfo *info, bool
TQBrush brush;
- if ( isActive ) brush=colorGroup().brush( TQColorGroup::Highlight );
- else brush=colorGroup().brush( TQColorGroup::Button );
+ if ( isActive ) brush=tqcolorGroup().brush( TQColorGroup::Highlight );
+ else brush=tqcolorGroup().brush( TQColorGroup::Button );
if ( m_transparentMode==AllWindows
|| (m_transparentMode==MaximizedWindows && ( info->state() & NET::Max )) )
- brush.setStyle(TQBrush::Dense4Pattern);
+ brush.setStyle(Qt::Dense4Pattern);
if ( isActive )
{
- qDrawShadeRect( &p, r, colorGroup(), false, 1, 0, &brush );
+ qDrawShadeRect( &p, r, tqcolorGroup(), false, 1, 0, &brush );
}
else
{
p.fillRect( r, brush );
- qDrawShadeRect( &p, r, colorGroup(), true, 1, 0 );
+ qDrawShadeRect( &p, r, tqcolorGroup(), true, 1, 0 );
}
}
@@ -602,8 +602,8 @@ void Desktop::paintWindowPixmap(TQPainter &p, const KWin::WindowInfo *info,
nHg = rSmall.height();
}
pixmap=new TQPixmap(fastScalePixmap(tmp, nWd, nHg));
- m_windowPixmaps.replace(info->win(),pixmap);
- m_windowPixmapsDirty.replace(info->win(),false);
+ m_windowPixmaps.tqreplace(info->win(),pixmap);
+ m_windowPixmapsDirty.tqreplace(info->win(),false);
}
}
@@ -669,7 +669,7 @@ void Desktop::backgroundLoaded(bool b)
} else kdDebug() << "Error getting the background\n";
}
-TQSize Desktop::sizeHint() const
+TQSize Desktop::tqsizeHint() const
{
return TQSize(67,50);
}
diff --git a/kpager/desktop.h b/kpager/desktop.h
index 74997dba3..bfaef5baf 100644
--- a/kpager/desktop.h
+++ b/kpager/desktop.h
@@ -35,7 +35,7 @@ class KPopupMenu;
class TQPainter;
class TQPoint;
-class Desktop : public QWidget
+class Desktop : public TQWidget
{
Q_OBJECT
@@ -74,7 +74,7 @@ public:
static void removeCachedPixmap(int nWin) { m_windowPixmaps.remove(nWin); };
- TQSize sizeHint() const;
+ TQSize tqsizeHint() const;
/**
* active is a bool that specifies if the frame is the active
diff --git a/kpager/kpager.cpp b/kpager/kpager.cpp
index e521f1e28..b8ecf9ddf 100644
--- a/kpager/kpager.cpp
+++ b/kpager/kpager.cpp
@@ -76,7 +76,7 @@ KPagerMainWindow::KPagerMainWindow(TQWidget *parent, const char *name)
if (w > 0 && h > 0)
resize(w,h);
else
- resize(m_pPager->sizeHint());
+ resize(m_pPager->tqsizeHint());
// resize(cfg->readNumEntry(lWidth(),200),cfg->readNumEntry(lHeight(),90));
int xpos=cfg->readNumEntry("xPos",-1);
@@ -91,7 +91,7 @@ KPagerMainWindow::KPagerMainWindow(TQWidget *parent, const char *name)
// rect.pos.y+rect.size.height-m_pPager->height());
// antonio:The above lines don't work. I should look at them when I have
// more time
- move(kapp->desktop()->width()-m_pPager->sizeHint().width()-5,kapp->desktop()->height()-m_pPager->sizeHint().height()-25);
+ move(kapp->desktop()->width()-m_pPager->tqsizeHint().width()-5,kapp->desktop()->height()-m_pPager->tqsizeHint().height()-25);
}
// Set the wm flags to this window
@@ -178,7 +178,7 @@ void KPagerMainWindow::toggleShow(int x, int y)
}
KPager::KPager(KPagerMainWindow *parent, const char *name)
- : TQFrame (parent, name, WStyle_Customize | WStyle_NoBorder | WStyle_Tool)
+ : TQFrame (parent, name, (WFlags)(WStyle_Customize | WStyle_NoBorder | WStyle_Tool))
, m_layout(0)
, m_mnu(0)
, m_smnu(0)
@@ -187,7 +187,7 @@ KPager::KPager(KPagerMainWindow *parent, const char *name)
m_windows.setAutoDelete(true); // delete windows info after removal
setBackgroundColor( black );
- m_winmodule=new KWinModule(this);
+ m_winmodule=new KWinModule(TQT_TQOBJECT(this));
m_currentDesktop=m_winmodule->currentDesktop();
m_grabWinTimer=new TQTimer(this,"grabWinTimer");
@@ -231,8 +231,8 @@ KPager::KPager(KPagerMainWindow *parent, const char *name)
defFont = cfg->readFontEntry("Font", &defFont);
setFont(defFont);
- m_prefs_action = KStdAction::preferences(this, TQT_SLOT(configureDialog()), parent->actionCollection());
- m_quit_action = KStdAction::quit(kapp, TQT_SLOT(quit()), parent->actionCollection());
+ m_prefs_action = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(configureDialog()), parent->actionCollection());
+ m_quit_action = KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), parent->actionCollection());
updateLayout();
}
@@ -374,7 +374,7 @@ void KPager::configureDialog()
updateLayout();
for( TQValueList <Desktop *>::Iterator it = m_desktops.begin(); it != m_desktops.end(); ++it )
- (*it)->repaint();
+ (*it)->tqrepaint();
}
}
@@ -409,7 +409,7 @@ void KPager::slotActiveWindowChanged( WId win )
{
if ( (inf1 && inf1->isOnDesktop(i))
|| (inf2 && inf2->isOnDesktop(i) ) )
- m_desktops[i-1]->repaint(false);
+ m_desktops[i-1]->tqrepaint(false);
}
}
@@ -422,7 +422,7 @@ void KPager::slotWindowAdded( WId win)
for ( int i=1; i <= (int) m_desktops.count(); ++i)
{
if ( inf->isOnDesktop( i ))
- m_desktops[i-1]->repaint(false);
+ m_desktops[i-1]->tqrepaint(false);
}
}
@@ -438,14 +438,14 @@ void KPager::slotWindowRemoved( WId win )
for (int i = 1; i <= (int) m_desktops.count(); ++i)
{
if (onAllDesktops || desktop == i)
- m_desktops[i-1]->repaint(false);
+ m_desktops[i-1]->tqrepaint(false);
}
}
}
void KPager::slotWindowChanged( WId win , unsigned int prop)
{
- bool repaint=false;
+ bool tqrepaint=false;
KWin::WindowInfo* inf = m_windows[win];
if (!inf)
@@ -453,7 +453,7 @@ void KPager::slotWindowChanged( WId win , unsigned int prop)
inf=info(win);
prop=0; // info already calls KWin::info, so there's no need
// to update anything else.
- repaint=true;
+ tqrepaint=true;
};
bool onAllDesktops = inf ? inf->onAllDesktops() : false;
@@ -466,15 +466,15 @@ void KPager::slotWindowChanged( WId win , unsigned int prop)
}
if((prop & ~( NET::WMName | NET::WMVisibleName )) != 0 )
- repaint = true;
+ tqrepaint = true;
- if (repaint)
+ if (tqrepaint)
for ( int i=1; i <= (int) m_desktops.count(); ++i)
{
if ((inf && (inf->isOnDesktop(i)))
|| onAllDesktops || desktop == i )
{
- m_desktops[i-1]->repaint(false);
+ m_desktops[i-1]->tqrepaint(false);
}
}
// redrawDesktops();
@@ -485,9 +485,9 @@ void KPager::slotStackingOrderChanged()
m_desktops[m_currentDesktop-1]->m_grabWindows=true;
for ( int i=1; i <= (int) m_desktops.count(); ++i)
{
- m_desktops[i-1]->repaint(false);
+ m_desktops[i-1]->tqrepaint(false);
}
-// repaint(true);
+// tqrepaint(true);
}
void KPager::slotDesktopNamesChanged()
@@ -547,8 +547,8 @@ void KPager::slotCurrentDesktopChanged(int desk)
m_desktops[m_currentDesktop-1]->update();
m_desktops[desk-1]->paintFrame( true );
m_desktops[desk-1]->update();
-// m_desktops[m_currentDesktop-1]->repaint();
-// m_desktops[desk-1]->repaint();
+// m_desktops[m_currentDesktop-1]->tqrepaint();
+// m_desktops[desk-1]->tqrepaint();
m_currentDesktop=desk;
@@ -643,21 +643,21 @@ void KPager::redrawDesktops()
{
TQValueList <Desktop *>::Iterator it;
for( it = m_desktops.begin(); it != m_desktops.end(); ++it )
- (*it)->repaint();
+ (*it)->tqrepaint();
}
void KPager::slotGrabWindows()
{
m_desktops[m_currentDesktop-1]->m_grabWindows=true;
- m_desktops[m_currentDesktop-1]->repaint();
+ m_desktops[m_currentDesktop-1]->tqrepaint();
}
-TQSize KPager::sizeHint() const
+TQSize KPager::tqsizeHint() const
{
int n=m_desktops.count();
int w=-1,h=-1;
- TQSize size=m_desktops[0]->sizeHint();
+ TQSize size=m_desktops[0]->tqsizeHint();
int wDsk=size.width();
int hDsk=size.height();
switch (m_layoutType)
diff --git a/kpager/kpager.h b/kpager/kpager.h
index 8911e1619..b82b43dff 100644
--- a/kpager/kpager.h
+++ b/kpager/kpager.h
@@ -57,7 +57,7 @@ protected:
bool m_reallyClose;
};
-class KPager : public QFrame
+class KPager : public TQFrame
{
Q_OBJECT
@@ -76,7 +76,7 @@ public:
KWin::WindowInfo* info( WId win );
- TQSize sizeHint() const;
+ TQSize tqsizeHint() const;
enum LayoutTypes { Classical=0, Horizontal, Vertical };
diff --git a/kpager/main.cpp b/kpager/main.cpp
index c2932478b..8b4d5926f 100644
--- a/kpager/main.cpp
+++ b/kpager/main.cpp
@@ -45,7 +45,7 @@ class KPagerApplication : public KUniqueApplication
public:
KPagerApplication() : KUniqueApplication() {}
- void commitData(QSessionManager& sm) {
+ void commitData(TQSessionManager& sm) {
if (mainWidget()->isHidden()) {
sm.setRestartHint( QSessionManager::RestartNever );
return;
diff --git a/kpager/windowdrag.h b/kpager/windowdrag.h
index e42927459..a123ea1b5 100644
--- a/kpager/windowdrag.h
+++ b/kpager/windowdrag.h
@@ -27,7 +27,7 @@
#include <tqdragobject.h>
#include <X11/Xlib.h>
-class PagerWindowDrag : public QStoredDrag
+class PagerWindowDrag : public TQStoredDrag
{
public:
PagerWindowDrag(WId w,int deltax,int deltay,int origdesk,TQWidget *parent);