From fd3a982e26813f5bcc82c7e89ce6fa2ad44432bf Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 7 Jan 2011 04:10:07 +0000 Subject: Revert automated changes Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1212480 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kpager/config.cpp | 14 ++++----- kpager/config.h | 4 +-- kpager/desktop.cpp | 28 ++++++++--------- kpager/desktop.h | 2 +- kpager/kpager.cpp | 88 +++++++++++++++++++++++++++--------------------------- kpager/kpager.h | 6 ++-- 6 files changed, 71 insertions(+), 71 deletions(-) (limited to 'kpager') diff --git a/kpager/config.cpp b/kpager/config.cpp index 12e638688..5ff0d3def 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 tqlayout) +void KPagerConfigDialog::setLayout(int layout) { - m_tmpLayoutType=tqlayout; + m_tmpLayoutType=layout; } 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_tqlayoutType); + m_grpLayoutType->setButton(m_layoutType); 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_tqlayoutType; + m_tmpLayoutType=m_layoutType; 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_tqlayoutType=cfg->readNumEntry("tqlayoutType", KPager::c_defLayout); + m_layoutType=cfg->readNumEntry("layoutType", 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_tqlayoutType=m_tmpLayoutType; + m_layoutType=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_tqlayoutType=KPager::c_defLayout; +int KPagerConfigDialog::m_layoutType=KPager::c_defLayout; diff --git a/kpager/config.h b/kpager/config.h index 8cf503507..2b8b095d3 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 tqlayout); + void setLayout(int layout); void enableWindowDragging(bool); @@ -55,7 +55,7 @@ public: static bool m_showBackground; static bool m_showWindows; static int m_windowDrawMode; - static int m_tqlayoutType; + static int m_layoutType; static bool m_windowDragging; protected: diff --git a/kpager/desktop.cpp b/kpager/desktop.cpp index 5b2aa73c9..3319418a1 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() >= tqApp->startDragDistance() ) + if ( p.manhattanLength() >= qApp->startDragDistance() ) startDrag( pressPos ); } @@ -120,7 +120,7 @@ void Desktop::mouseReleaseEvent( TQMouseEvent *ev ) KWin::forceActiveWindow(info->win()); // if ( static_cast( KPagerConfigDialog::m_windowDrawMode ) == Pixmap ) - // m_windowPixmapsDirty.tqreplace(info->win,true); + // m_windowPixmapsDirty.replace(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->tqgeometry(); + r=info->geometry(); convertRectS2P(r); - if (r.tqcontains(p)) + if (r.contains(p)) { if (internalpos) { @@ -295,7 +295,7 @@ TQPixmap *Desktop::paintNewWindow(const KWin::WindowInfo *info) p.begin(pixmap); p.setFont(font()); - p.fillRect( r, tqcolorGroup().brush(TQColorGroup::Dark)); + p.fillRect( r, colorGroup().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(), tqcolorGroup().brush(TQColorGroup::Dark)); +// p.fillRect(rect(), colorGroup().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(), tqcolorGroup().brush(TQColorGroup::Mid)); + p.fillRect(rect(), colorGroup().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=tqcolorGroup().brush( TQColorGroup::Highlight ); - else brush=tqcolorGroup().brush( TQColorGroup::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 )) ) @@ -532,12 +532,12 @@ void Desktop::paintWindowPlain(TQPainter &p, const KWin::WindowInfo *info, bool if ( isActive ) { - qDrawShadeRect( &p, r, tqcolorGroup(), false, 1, 0, &brush ); + qDrawShadeRect( &p, r, colorGroup(), false, 1, 0, &brush ); } else { p.fillRect( r, brush ); - qDrawShadeRect( &p, r, tqcolorGroup(), true, 1, 0 ); + qDrawShadeRect( &p, r, colorGroup(), 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.tqreplace(info->win(),pixmap); - m_windowPixmapsDirty.tqreplace(info->win(),false); + m_windowPixmaps.replace(info->win(),pixmap); + m_windowPixmapsDirty.replace(info->win(),false); } } @@ -669,7 +669,7 @@ void Desktop::backgroundLoaded(bool b) } else kdDebug() << "Error getting the background\n"; } -TQSize Desktop::tqsizeHint() const +TQSize Desktop::sizeHint() const { return TQSize(67,50); } diff --git a/kpager/desktop.h b/kpager/desktop.h index 60f90698e..74997dba3 100644 --- a/kpager/desktop.h +++ b/kpager/desktop.h @@ -74,7 +74,7 @@ public: static void removeCachedPixmap(int nWin) { m_windowPixmaps.remove(nWin); }; - TQSize tqsizeHint() const; + TQSize sizeHint() const; /** * active is a bool that specifies if the frame is the active diff --git a/kpager/kpager.cpp b/kpager/kpager.cpp index 4d2dbe046..e521f1e28 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 tqgeometry + // Update the last used geometry 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->tqsizeHint()); + resize(m_pPager->sizeHint()); // 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->tqsizeHint().width()-5,kapp->desktop()->height()-m_pPager->tqsizeHint().height()-25); + move(kapp->desktop()->width()-m_pPager->sizeHint().width()-5,kapp->desktop()->height()-m_pPager->sizeHint().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("tqlayoutType", static_cast(m_pPager->m_tqlayoutType)); + cfg->writeEntry("layoutType", static_cast(m_pPager->m_layoutType)); 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_tqlayout(0) + , m_layout(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_tqlayoutType=static_cast( KPagerConfigDialog::m_tqlayoutType ); + m_layoutType=static_cast( KPagerConfigDialog::m_layoutType ); connect( m_winmodule, TQT_SIGNAL( activeWindowChanged(WId)), TQT_SLOT(slotActiveWindowChanged(WId))); @@ -244,20 +244,20 @@ KPager::~KPager() const TQString KPager::lWidth() { - switch (m_tqlayoutType) { - case (Classical) : return "tqlayoutClassicalWidth";break; - case (Horizontal) : return "tqlayoutHorizontalWidth";break; - case (Vertical) : return "tqlayoutVerticalWidth";break; + switch (m_layoutType) { + case (Classical) : return "layoutClassicalWidth";break; + case (Horizontal) : return "layoutHorizontalWidth";break; + case (Vertical) : return "layoutVerticalWidth";break; }; return "Width"; } const TQString KPager::lHeight() { - switch (m_tqlayoutType) { - case (Classical) : return "tqlayoutClassicalHeight";break; - case (Horizontal) : return "tqlayoutHorizontalHeight";break; - case (Vertical) : return "tqlayoutVerticalHeight";break; + switch (m_layoutType) { + case (Classical) : return "layoutClassicalHeight";break; + case (Horizontal) : return "layoutHorizontalHeight";break; + case (Vertical) : return "layoutVerticalHeight";break; }; return "Height"; } @@ -267,13 +267,13 @@ void KPager::updateLayout() int w=m_desktops[0]->width(); int h=m_desktops[0]->height(); - delete m_tqlayout; + delete m_layout; - switch (m_tqlayoutType) + switch (m_layoutType) { - 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; + 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; }; TQValueList ::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_tqlayout->addWidget(*it,i,j); + m_layout->addWidget(*it,i,j); ndesks++; - switch (m_tqlayoutType) + switch (m_layoutType) { case (Classical) : i= ndesks / halfdesks; j = ndesks % halfdesks; break; case (Horizontal) : j++; break; @@ -293,10 +293,10 @@ void KPager::updateLayout() }; } - m_tqlayout->activate(); + m_layout->activate(); updateGeometry(); - switch (m_tqlayoutType) + switch (m_layoutType) { 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_tqlayoutType=static_cast(KPagerConfigDialog::m_tqlayoutType); + m_layoutType=static_cast(KPagerConfigDialog::m_layoutType); 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("tqlayoutType",KPagerConfigDialog::m_tqlayoutType); + cfg->writeEntry("layoutType",KPagerConfigDialog::m_layoutType); 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 ::Iterator it = m_desktops.begin(); it != m_desktops.end(); ++it ) - (*it)->tqrepaint(); + (*it)->repaint(); } } @@ -409,7 +409,7 @@ void KPager::slotActiveWindowChanged( WId win ) { if ( (inf1 && inf1->isOnDesktop(i)) || (inf2 && inf2->isOnDesktop(i) ) ) - m_desktops[i-1]->tqrepaint(false); + m_desktops[i-1]->repaint(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]->tqrepaint(false); + m_desktops[i-1]->repaint(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]->tqrepaint(false); + m_desktops[i-1]->repaint(false); } } } void KPager::slotWindowChanged( WId win , unsigned int prop) { - bool tqrepaint=false; + bool repaint=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. - tqrepaint=true; + repaint=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 ) - tqrepaint = true; + repaint = true; - if (tqrepaint) + if (repaint) for ( int i=1; i <= (int) m_desktops.count(); ++i) { if ((inf && (inf->isOnDesktop(i))) || onAllDesktops || desktop == i ) { - m_desktops[i-1]->tqrepaint(false); + m_desktops[i-1]->repaint(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]->tqrepaint(false); + m_desktops[i-1]->repaint(false); } -// tqrepaint(true); +// repaint(true); } void KPager::slotDesktopNamesChanged() @@ -521,7 +521,7 @@ void KPager::slotNumberOfDesktopsChanged(int ndesktops) { int i,j; i=j=m_desktops.count(); - switch (m_tqlayoutType) + switch (m_layoutType) { 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]->tqrepaint(); -// m_desktops[desk-1]->tqrepaint(); +// m_desktops[m_currentDesktop-1]->repaint(); +// m_desktops[desk-1]->repaint(); m_currentDesktop=desk; @@ -643,24 +643,24 @@ void KPager::redrawDesktops() { TQValueList ::Iterator it; for( it = m_desktops.begin(); it != m_desktops.end(); ++it ) - (*it)->tqrepaint(); + (*it)->repaint(); } void KPager::slotGrabWindows() { m_desktops[m_currentDesktop-1]->m_grabWindows=true; - m_desktops[m_currentDesktop-1]->tqrepaint(); + m_desktops[m_currentDesktop-1]->repaint(); } -TQSize KPager::tqsizeHint() const +TQSize KPager::sizeHint() const { int n=m_desktops.count(); int w=-1,h=-1; - TQSize size=m_desktops[0]->tqsizeHint(); + TQSize size=m_desktops[0]->sizeHint(); int wDsk=size.width(); int hDsk=size.height(); - switch (m_tqlayoutType) + switch (m_layoutType) { 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 22b3c2fea..8911e1619 100644 --- a/kpager/kpager.h +++ b/kpager/kpager.h @@ -76,7 +76,7 @@ public: KWin::WindowInfo* info( WId win ); - TQSize tqsizeHint() const; + TQSize sizeHint() const; enum LayoutTypes { Classical=0, Horizontal, Vertical }; @@ -119,9 +119,9 @@ protected: const TQString lWidth(); const TQString lHeight(); - LayoutTypes m_tqlayoutType; + LayoutTypes m_layoutType; - class TQGridLayout *m_tqlayout; + class TQGridLayout *m_layout; KPopupMenu *m_mnu; TQPopupMenu *m_smnu, *m_dmnu; KAction *m_quit_action; -- cgit v1.2.1