summaryrefslogtreecommitdiffstats
path: root/kpager
diff options
context:
space:
mode:
Diffstat (limited to 'kpager')
-rw-r--r--kpager/config.cpp14
-rw-r--r--kpager/config.h4
-rw-r--r--kpager/desktop.cpp28
-rw-r--r--kpager/desktop.h2
-rw-r--r--kpager/kpager.cpp88
-rw-r--r--kpager/kpager.h6
6 files changed, 71 insertions, 71 deletions
diff --git a/kpager/config.cpp b/kpager/config.cpp
index 5ff0d3de..12e63868 100644
--- a/kpager/config.cpp
+++ b/kpager/config.cpp
@@ -121,9 +121,9 @@ void KPagerConfigDialog::setWindowDrawMode(int type)
m_tmpWindowDrawMode=type;
}
-void KPagerConfigDialog::setLayout(int layout)
+void KPagerConfigDialog::setLayout(int tqlayout)
{
- m_tmpLayoutType=layout;
+ m_tmpLayoutType=tqlayout;
}
void KPagerConfigDialog::loadConfiguration()
@@ -133,14 +133,14 @@ void KPagerConfigDialog::loadConfiguration()
m_chkShowBackground->setChecked(m_showBackground);
m_chkShowWindows->setChecked(m_showWindows);
m_grpWindowDrawMode->setButton(m_windowDrawMode);
- m_grpLayoutType->setButton(m_layoutType);
+ m_grpLayoutType->setButton(m_tqlayoutType);
m_chkWindowDragging->setChecked( m_windowDragging );
m_tmpShowName=m_showName;
m_tmpShowNumber=m_showNumber;
m_tmpShowBackground=m_showBackground;
m_tmpShowWindows=m_showWindows;
m_tmpWindowDrawMode=m_windowDrawMode;
- m_tmpLayoutType=m_layoutType;
+ m_tmpLayoutType=m_tqlayoutType;
m_tmpWindowDragging=m_windowDragging;
}
@@ -154,7 +154,7 @@ void KPagerConfigDialog::initConfiguration(void)
m_showNumber=cfg->readBoolEntry("showNumber", Desktop::c_defShowNumber);
m_showBackground=cfg->readBoolEntry("showBackground", Desktop::c_defShowBackground);
m_showWindows=cfg->readBoolEntry("showWindows", Desktop::c_defShowWindows);
- m_layoutType=cfg->readNumEntry("layoutType", KPager::c_defLayout);
+ m_tqlayoutType=cfg->readNumEntry("tqlayoutType", KPager::c_defLayout);
m_windowDragging=cfg->readBoolEntry("windowDragging", true );
}
@@ -165,7 +165,7 @@ void KPagerConfigDialog::slotOk()
m_showBackground=m_tmpShowBackground;
m_showWindows=m_tmpShowWindows;
m_windowDrawMode=m_tmpWindowDrawMode;
- m_layoutType=m_tmpLayoutType;
+ m_tqlayoutType=m_tmpLayoutType;
m_windowDragging=m_tmpWindowDragging;
accept();
}
@@ -176,5 +176,5 @@ bool KPagerConfigDialog::m_showBackground=Desktop::c_defShowBackground;
bool KPagerConfigDialog::m_showWindows=Desktop::c_defShowWindows;
bool KPagerConfigDialog::m_windowDragging=Desktop::c_defWindowDragging;
int KPagerConfigDialog::m_windowDrawMode=Desktop::c_defWindowDrawMode;
-int KPagerConfigDialog::m_layoutType=KPager::c_defLayout;
+int KPagerConfigDialog::m_tqlayoutType=KPager::c_defLayout;
diff --git a/kpager/config.h b/kpager/config.h
index 2b8b095d..8cf50350 100644
--- a/kpager/config.h
+++ b/kpager/config.h
@@ -42,7 +42,7 @@ public slots:
void setShowWindows(bool show);
void setWindowDrawMode(int mode);
- void setLayout(int layout);
+ void setLayout(int tqlayout);
void enableWindowDragging(bool);
@@ -55,7 +55,7 @@ public:
static bool m_showBackground;
static bool m_showWindows;
static int m_windowDrawMode;
- static int m_layoutType;
+ static int m_tqlayoutType;
static bool m_windowDragging;
protected:
diff --git a/kpager/desktop.cpp b/kpager/desktop.cpp
index 3319418a..5b2aa73c 100644
--- a/kpager/desktop.cpp
+++ b/kpager/desktop.cpp
@@ -81,7 +81,7 @@ void Desktop::mouseMoveEvent( TQMouseEvent *ev )
if ( (ev->state() & LeftButton) == 0 )
return;
TQPoint p( ev->pos() - pressPos );
- if ( p.manhattanLength() >= qApp->startDragDistance() )
+ if ( p.manhattanLength() >= tqApp->startDragDistance() )
startDrag( pressPos );
}
@@ -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);
}
}
}
@@ -138,9 +138,9 @@ KWin::WindowInfo *Desktop::windowAtPosition(const TQPoint &p, TQPoint *internalp
KWin::WindowInfo* info = pager()->info( *it );
if (shouldPaintWindow(info))
{
- r=info->geometry();
+ r=info->tqgeometry();
convertRectS2P(r);
- if (r.contains(p))
+ if (r.tqcontains(p))
{
if (internalpos)
{
@@ -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,8 +523,8 @@ 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 )) )
@@ -532,12 +532,12 @@ void Desktop::paintWindowPlain(TQPainter &p, const KWin::WindowInfo *info, bool
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 74997dba..60f90698 100644
--- a/kpager/desktop.h
+++ b/kpager/desktop.h
@@ -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 e521f1e2..4d2dbe04 100644
--- a/kpager/kpager.cpp
+++ b/kpager/kpager.cpp
@@ -70,13 +70,13 @@ KPagerMainWindow::KPagerMainWindow(TQWidget *parent, const char *name)
KConfig *cfg = kapp->config();
cfg->setGroup("KPager");
- // Update the last used geometry
+ // Update the last used tqgeometry
int w = cfg->readNumEntry(m_pPager->lWidth(),-1);
int h = cfg->readNumEntry(m_pPager->lHeight(),-1);
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
@@ -125,7 +125,7 @@ bool KPagerMainWindow::queryClose()
KConfig *cfg=KGlobal::config();
cfg->setGroup("KPager");
- cfg->writeEntry("layoutType", static_cast<int>(m_pPager->m_layoutType));
+ cfg->writeEntry("tqlayoutType", static_cast<int>(m_pPager->m_tqlayoutType));
cfg->writeEntry(m_pPager->lWidth(),width());
cfg->writeEntry(m_pPager->lHeight(),height());
cfg->writeEntry("xPos",x());
@@ -179,7 +179,7 @@ void KPagerMainWindow::toggleShow(int x, int y)
KPager::KPager(KPagerMainWindow *parent, const char *name)
: TQFrame (parent, name, WStyle_Customize | WStyle_NoBorder | WStyle_Tool)
- , m_layout(0)
+ , m_tqlayout(0)
, m_mnu(0)
, m_smnu(0)
, m_dmnu(0)
@@ -206,7 +206,7 @@ KPager::KPager(KPagerMainWindow *parent, const char *name)
m_desktops.append(dsk);
}
- m_layoutType=static_cast<enum KPager::LayoutTypes>( KPagerConfigDialog::m_layoutType );
+ m_tqlayoutType=static_cast<enum KPager::LayoutTypes>( KPagerConfigDialog::m_tqlayoutType );
connect( m_winmodule, TQT_SIGNAL( activeWindowChanged(WId)),
TQT_SLOT(slotActiveWindowChanged(WId)));
@@ -244,20 +244,20 @@ KPager::~KPager()
const TQString KPager::lWidth()
{
- switch (m_layoutType) {
- case (Classical) : return "layoutClassicalWidth";break;
- case (Horizontal) : return "layoutHorizontalWidth";break;
- case (Vertical) : return "layoutVerticalWidth";break;
+ switch (m_tqlayoutType) {
+ case (Classical) : return "tqlayoutClassicalWidth";break;
+ case (Horizontal) : return "tqlayoutHorizontalWidth";break;
+ case (Vertical) : return "tqlayoutVerticalWidth";break;
};
return "Width";
}
const TQString KPager::lHeight()
{
- switch (m_layoutType) {
- case (Classical) : return "layoutClassicalHeight";break;
- case (Horizontal) : return "layoutHorizontalHeight";break;
- case (Vertical) : return "layoutVerticalHeight";break;
+ switch (m_tqlayoutType) {
+ case (Classical) : return "tqlayoutClassicalHeight";break;
+ case (Horizontal) : return "tqlayoutHorizontalHeight";break;
+ case (Vertical) : return "tqlayoutVerticalHeight";break;
};
return "Height";
}
@@ -267,13 +267,13 @@ void KPager::updateLayout()
int w=m_desktops[0]->width();
int h=m_desktops[0]->height();
- delete m_layout;
+ delete m_tqlayout;
- switch (m_layoutType)
+ switch (m_tqlayoutType)
{
- 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;
+ case (Classical) : m_tqlayout=new TQGridLayout(this, 2, 0); break;
+ case (Horizontal) : m_tqlayout=new TQGridLayout(this, 0, 1); break;
+ case (Vertical) : m_tqlayout=new TQGridLayout(this, 1, 0); break;
};
TQValueList <Desktop *>::Iterator it;
@@ -283,9 +283,9 @@ void KPager::updateLayout()
int halfdesks = (m_desktops.count() + 1) / 2;
for( it = m_desktops.begin(); it != m_desktops.end(); ++it )
{
- m_layout->addWidget(*it,i,j);
+ m_tqlayout->addWidget(*it,i,j);
ndesks++;
- switch (m_layoutType)
+ switch (m_tqlayoutType)
{
case (Classical) : i= ndesks / halfdesks; j = ndesks % halfdesks; break;
case (Horizontal) : j++; break;
@@ -293,10 +293,10 @@ void KPager::updateLayout()
};
}
- m_layout->activate();
+ m_tqlayout->activate();
updateGeometry();
- switch (m_layoutType)
+ switch (m_tqlayoutType)
{
case (Classical) : resize(w*(ndesks/2+(ndesks%2)),h*2);break;
case (Horizontal) : resize(w*ndesks,h);break;
@@ -355,7 +355,7 @@ void KPager::configureDialog()
KPagerConfigDialog *dialog= new KPagerConfigDialog(this);
if (dialog->exec())
{
- m_layoutType=static_cast<enum KPager::LayoutTypes>(KPagerConfigDialog::m_layoutType);
+ m_tqlayoutType=static_cast<enum KPager::LayoutTypes>(KPagerConfigDialog::m_tqlayoutType);
KConfig *cfg=KGlobal::config();
int nWd = (parent() ? ((TQWidget *)parent())->width() : width());
int nHg = (parent() ? ((TQWidget *)parent())->width() : width());
@@ -365,7 +365,7 @@ void KPager::configureDialog()
cfg->writeEntry(lWidth(),nWd);
cfg->writeEntry(lHeight(),nHg);
cfg->writeEntry("windowDrawMode",KPagerConfigDialog::m_windowDrawMode);
- cfg->writeEntry("layoutType",KPagerConfigDialog::m_layoutType);
+ cfg->writeEntry("tqlayoutType",KPagerConfigDialog::m_tqlayoutType);
cfg->writeEntry("showNumber",KPagerConfigDialog::m_showNumber);
cfg->writeEntry("showName",KPagerConfigDialog::m_showName);
cfg->writeEntry("showWindows",KPagerConfigDialog::m_showWindows);
@@ -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()
@@ -521,7 +521,7 @@ void KPager::slotNumberOfDesktopsChanged(int ndesktops)
{
int i,j;
i=j=m_desktops.count();
- switch (m_layoutType)
+ switch (m_tqlayoutType)
{
case (Classical) : i%=2;j/=2; break;
case (Horizontal) : i=0; break;
@@ -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,24 +643,24 @@ 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)
+ switch (m_tqlayoutType)
{
case (Classical) : w=wDsk*(n/2+(n%2)); h=hDsk*2;break;
case (Horizontal) : w=wDsk*n; h=hDsk;break;
diff --git a/kpager/kpager.h b/kpager/kpager.h
index 8911e161..22b3c2fe 100644
--- a/kpager/kpager.h
+++ b/kpager/kpager.h
@@ -76,7 +76,7 @@ public:
KWin::WindowInfo* info( WId win );
- TQSize sizeHint() const;
+ TQSize tqsizeHint() const;
enum LayoutTypes { Classical=0, Horizontal, Vertical };
@@ -119,9 +119,9 @@ protected:
const TQString lWidth();
const TQString lHeight();
- LayoutTypes m_layoutType;
+ LayoutTypes m_tqlayoutType;
- class TQGridLayout *m_layout;
+ class TQGridLayout *m_tqlayout;
KPopupMenu *m_mnu;
TQPopupMenu *m_smnu, *m_dmnu;
KAction *m_quit_action;