summaryrefslogtreecommitdiffstats
path: root/kicker/applets/minipager
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-07 20:26:07 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-07 20:26:07 -0600
commit43d99cc2477266cb9072e179137f0e8485370b3d (patch)
tree0d4d47e5497a1a1465edf8263f57b72725577239 /kicker/applets/minipager
parent6354e6b3babad3ed0f5e314735bbbc01d1988eb2 (diff)
downloadtdebase-43d99cc2477266cb9072e179137f0e8485370b3d.tar.gz
tdebase-43d99cc2477266cb9072e179137f0e8485370b3d.zip
Rename kwin to twin (part 1 of 2)
Diffstat (limited to 'kicker/applets/minipager')
-rw-r--r--kicker/applets/minipager/pagerapplet.cpp86
-rw-r--r--kicker/applets/minipager/pagerapplet.h6
-rw-r--r--kicker/applets/minipager/pagerbutton.cpp18
3 files changed, 55 insertions, 55 deletions
diff --git a/kicker/applets/minipager/pagerapplet.cpp b/kicker/applets/minipager/pagerapplet.cpp
index 6975af0c0..a684aa6f8 100644
--- a/kicker/applets/minipager/pagerapplet.cpp
+++ b/kicker/applets/minipager/pagerapplet.cpp
@@ -30,8 +30,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <dcopref.h>
#include <kglobalsettings.h>
-#include <kwin.h>
-#include <kwinmodule.h>
+#include <twin.h>
+#include <twinmodule.h>
#include <kapplication.h>
#include <kglobal.h>
#include <klocale.h>
@@ -114,11 +114,11 @@ KMiniPager::KMiniPager(const TQString& configFile, Type type, int actions,
setFont( KGlobalSettings::taskbarFont() );
- m_kwin = new KWinModule(TQT_TQOBJECT(this));
- m_activeWindow = m_kwin->activeWindow();
- m_curDesk = m_kwin->currentDesktop();
+ m_twin = new KWinModule(TQT_TQOBJECT(this));
+ m_activeWindow = m_twin->activeWindow();
+ m_curDesk = m_twin->currentDesktop();
- if (m_curDesk == 0) // kwin not yet launched
+ if (m_curDesk == 0) // twin not yet launched
{
m_curDesk = 1;
}
@@ -127,20 +127,20 @@ KMiniPager::KMiniPager(const TQString& configFile, Type type, int actions,
desktopLayoutX = -1;
desktopLayoutY = -1;
- TQSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
+ TQSize s(m_twin->numberOfViewports(m_twin->currentDesktop()));
m_useViewports = s.width() * s.height() > 1;
drawButtons();
- connect( m_kwin, TQT_SIGNAL( currentDesktopChanged(int)), TQT_SLOT( slotSetDesktop(int) ) );
- connect( m_kwin, TQT_SIGNAL( currentDesktopViewportChanged(int, const TQPoint&)), TQT_SLOT(slotSetDesktopViewport(int, const TQPoint&)));
- connect( m_kwin, TQT_SIGNAL( numberOfDesktopsChanged(int)), TQT_SLOT( slotSetDesktopCount(int) ) );
- connect( m_kwin, TQT_SIGNAL( desktopGeometryChanged(int)), TQT_SLOT( slotRefreshViewportCount(int) ) );
- connect( m_kwin, TQT_SIGNAL( activeWindowChanged(WId)), TQT_SLOT( slotActiveWindowChanged(WId) ) );
- connect( m_kwin, TQT_SIGNAL( windowAdded(WId) ), this, TQT_SLOT( slotWindowAdded(WId) ) );
- connect( m_kwin, TQT_SIGNAL( windowRemoved(WId) ), this, TQT_SLOT( slotWindowRemoved(WId) ) );
- connect( m_kwin, TQT_SIGNAL( windowChanged(WId,unsigned int) ), this, TQT_SLOT( slotWindowChanged(WId,unsigned int) ) );
- connect( m_kwin, TQT_SIGNAL( desktopNamesChanged() ), this, TQT_SLOT( slotDesktopNamesChanged() ) );
+ connect( m_twin, TQT_SIGNAL( currentDesktopChanged(int)), TQT_SLOT( slotSetDesktop(int) ) );
+ connect( m_twin, TQT_SIGNAL( currentDesktopViewportChanged(int, const TQPoint&)), TQT_SLOT(slotSetDesktopViewport(int, const TQPoint&)));
+ connect( m_twin, TQT_SIGNAL( numberOfDesktopsChanged(int)), TQT_SLOT( slotSetDesktopCount(int) ) );
+ connect( m_twin, TQT_SIGNAL( desktopGeometryChanged(int)), TQT_SLOT( slotRefreshViewportCount(int) ) );
+ connect( m_twin, TQT_SIGNAL( activeWindowChanged(WId)), TQT_SLOT( slotActiveWindowChanged(WId) ) );
+ connect( m_twin, TQT_SIGNAL( windowAdded(WId) ), this, TQT_SLOT( slotWindowAdded(WId) ) );
+ connect( m_twin, TQT_SIGNAL( windowRemoved(WId) ), this, TQT_SLOT( slotWindowRemoved(WId) ) );
+ connect( m_twin, TQT_SIGNAL( windowChanged(WId,unsigned int) ), this, TQT_SLOT( slotWindowChanged(WId,unsigned int) ) );
+ connect( m_twin, TQT_SIGNAL( desktopNamesChanged() ), this, TQT_SLOT( slotDesktopNamesChanged() ) );
connect( kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int)) );
if (kapp->authorizeKAction("kicker_rmb") && kapp->authorizeControlModule("kde-kcmtaskbar.desktop"))
@@ -152,8 +152,8 @@ KMiniPager::KMiniPager(const TQString& configFile, Type type, int actions,
}
TQValueList<WId>::ConstIterator it;
- TQValueList<WId>::ConstIterator itEnd = m_kwin->windows().end();
- for ( it = m_kwin->windows().begin(); it != itEnd; ++it)
+ TQValueList<WId>::ConstIterator itEnd = m_twin->windows().end();
+ for ( it = m_twin->windows().begin(); it != itEnd; ++it)
{
slotWindowAdded( (*it) );
}
@@ -172,7 +172,7 @@ KMiniPager::~KMiniPager()
void KMiniPager::slotBackgroundChanged(int desk)
{
- unsigned numDesktops = m_kwin->numberOfDesktops();
+ unsigned numDesktops = m_twin->numberOfDesktops();
if (numDesktops != m_desktops.count())
{
slotSetDesktopCount(numDesktops);
@@ -189,9 +189,9 @@ void KMiniPager::slotBackgroundChanged(int desk)
void KMiniPager::slotSetDesktop(int desktop)
{
- if (m_kwin->numberOfDesktops() > static_cast<int>(m_desktops.count()))
+ if (m_twin->numberOfDesktops() > static_cast<int>(m_desktops.count()))
{
- slotSetDesktopCount( m_kwin->numberOfDesktops() );
+ slotSetDesktopCount( m_twin->numberOfDesktops() );
}
if (!m_useViewports && (desktop != KWin::currentDesktop()))
@@ -200,8 +200,8 @@ void KMiniPager::slotSetDesktop(int desktop)
// holds down the key combo to switch desktops, lets the
// mouse go but keeps the key combo held. the desktop will switch
// back to the desktop associated with the key combo and then it
- // becomes a race condition between kwin's signal and the button's
- // signal. usually kwin wins.
+ // becomes a race condition between twin's signal and the button's
+ // signal. usually twin wins.
return;
}
@@ -222,21 +222,21 @@ void KMiniPager::slotSetDesktopViewport(int desktop, const TQPoint& viewport)
{
// ###
Q_UNUSED(desktop);
- TQSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
+ TQSize s(m_twin->numberOfViewports(m_twin->currentDesktop()));
slotSetDesktop((viewport.y()-1) * s.width() + viewport.x() );
}
void KMiniPager::slotButtonSelected( int desk )
{
- if (m_kwin->numberOfViewports(m_kwin->currentDesktop()).width() *
- m_kwin->numberOfViewports(m_kwin->currentDesktop()).height() > 1)
+ if (m_twin->numberOfViewports(m_twin->currentDesktop()).width() *
+ m_twin->numberOfViewports(m_twin->currentDesktop()).height() > 1)
{
TQPoint p;
p.setX( (desk-1) * TQApplication::desktop()->width());
p.setY( 0 );
- KWin::setCurrentDesktopViewport(m_kwin->currentDesktop(), p);
+ KWin::setCurrentDesktopViewport(m_twin->currentDesktop(), p);
}
else
KWin::setCurrentDesktop( desk );
@@ -251,8 +251,8 @@ int KMiniPager::widthForHeight(int h) const
return width();
}
- int deskNum = m_kwin->numberOfDesktops() * m_kwin->numberOfViewports(0).width()
- * m_kwin->numberOfViewports(0).height();
+ int deskNum = m_twin->numberOfDesktops() * m_twin->numberOfViewports(0).width()
+ * m_twin->numberOfViewports(0).height();
int rowNum = m_settings->numberOfRows();
if (rowNum == 0)
@@ -286,7 +286,7 @@ int KMiniPager::widthForHeight(int h) const
TQFontMetrics fm = fontMetrics();
for (int i = 1; i <= deskNum; i++)
{
- int sw = fm.width( m_kwin->desktopName( i ) ) + 8;
+ int sw = fm.width( m_twin->desktopName( i ) ) + 8;
if (sw > bw)
{
bw = sw;
@@ -307,8 +307,8 @@ int KMiniPager::heightForWidth(int w) const
return height();
}
- int deskNum = m_kwin->numberOfDesktops() * m_kwin->numberOfViewports(0).width()
- * m_kwin->numberOfViewports(0).height();
+ int deskNum = m_twin->numberOfDesktops() * m_twin->numberOfViewports(0).width()
+ * m_twin->numberOfViewports(0).height();
int rowNum = m_settings->numberOfRows(); // actually these are columns now... oh well.
if (rowNum == 0)
{
@@ -442,8 +442,8 @@ void KMiniPager::wheelEvent( TQWheelEvent* e )
{
int newDesk;
int desktops = KWin::numberOfDesktops();
- if (m_kwin->numberOfViewports(0).width() * m_kwin->numberOfViewports(0).height() > 1 )
- desktops = m_kwin->numberOfViewports(0).width() * m_kwin->numberOfViewports(0).height();
+ if (m_twin->numberOfViewports(0).width() * m_twin->numberOfViewports(0).height() > 1 )
+ desktops = m_twin->numberOfViewports(0).width() * m_twin->numberOfViewports(0).height();
if (e->delta() < 0)
{
newDesk = m_curDesk % desktops + 1;
@@ -458,17 +458,17 @@ void KMiniPager::wheelEvent( TQWheelEvent* e )
void KMiniPager::drawButtons()
{
- int deskNum = m_kwin->numberOfDesktops();
+ int deskNum = m_twin->numberOfDesktops();
KMiniPagerButton *desk;
int count = 1;
int i = 1;
do
{
- TQSize viewportNum = m_kwin->numberOfViewports(i);
+ TQSize viewportNum = m_twin->numberOfViewports(i);
for (int j = 1; j <= viewportNum.width() * viewportNum.height(); ++j)
{
- TQSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
+ TQSize s(m_twin->numberOfViewports(m_twin->currentDesktop()));
TQPoint viewport( (j-1) % s.width(), (j-1) / s.width());
desk = new KMiniPagerButton( count, m_useViewports, viewport, this );
if ( m_settings->labelType() != PagerSettings::EnumLabelType::LabelName )
@@ -493,7 +493,7 @@ void KMiniPager::drawButtons()
void KMiniPager::slotSetDesktopCount( int )
{
- TQSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
+ TQSize s(m_twin->numberOfViewports(m_twin->currentDesktop()));
m_useViewports = s.width() * s.height() > 1;
TQValueList<KMiniPagerButton*>::ConstIterator it;
@@ -506,7 +506,7 @@ void KMiniPager::slotSetDesktopCount( int )
drawButtons();
- m_curDesk = m_kwin->currentDesktop();
+ m_curDesk = m_twin->currentDesktop();
if ( m_curDesk == 0 )
{
m_curDesk = 1;
@@ -518,7 +518,7 @@ void KMiniPager::slotSetDesktopCount( int )
void KMiniPager::slotRefreshViewportCount( int )
{
- TQSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
+ TQSize s(m_twin->numberOfViewports(m_twin->currentDesktop()));
m_useViewports = s.width() * s.height() > 1;
TQValueList<KMiniPagerButton*>::ConstIterator it;
@@ -531,7 +531,7 @@ void KMiniPager::slotRefreshViewportCount( int )
drawButtons();
- m_curDesk = m_kwin->currentDesktop();
+ m_curDesk = m_twin->currentDesktop();
if ( m_curDesk == 0 )
{
m_curDesk = 1;
@@ -709,7 +709,7 @@ void KMiniPager::aboutToShowContextMenu()
m_contextMenu->insertSeparator();
m_contextMenu->insertItem(i18n("&Rename Desktop \"%1\"")
- .arg(kwin()->desktopName(m_rmbDesk)), RenameDesktop);
+ .arg(twin()->desktopName(m_rmbDesk)), RenameDesktop);
m_contextMenu->insertSeparator();
KPopupMenu* showMenu = new KPopupMenu(m_contextMenu);
@@ -863,7 +863,7 @@ void KMiniPager::slotDesktopNamesChanged()
for (int i = 1; it != itEnd; ++it, ++i)
{
- TQString name = m_kwin->desktopName(i);
+ TQString name = m_twin->desktopName(i);
(*it)->setDesktopName(name);
(*it)->tqrepaint();
TQToolTip::remove((*it));
diff --git a/kicker/applets/minipager/pagerapplet.h b/kicker/applets/minipager/pagerapplet.h
index e72f44588..02f72198e 100644
--- a/kicker/applets/minipager/pagerapplet.h
+++ b/kicker/applets/minipager/pagerapplet.h
@@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <tqintdict.h>
#include <kpanelapplet.h>
-#include <kwin.h>
+#include <twin.h>
#include "pagerbutton.h"
#include "pagersettings.h"
@@ -58,7 +58,7 @@ public:
int heightForWidth(int width) const;
KWin::WindowInfo* info( WId win );
- KWinModule* kwin() { return m_kwin; }
+ KWinModule* twin() { return m_twin; }
KTextShadowEngine* shadowEngine();
void setActive( WId active ) { m_activeWindow = active; }
@@ -128,7 +128,7 @@ private:
int desktopLayoutY;
KSelectionOwner* m_desktopLayoutOwner;
- KWinModule *m_kwin;
+ KWinModule *m_twin;
KTextShadowEngine* m_shadowEngine;
TQPopupMenu *m_contextMenu;
diff --git a/kicker/applets/minipager/pagerbutton.cpp b/kicker/applets/minipager/pagerbutton.cpp
index d6047d407..e494d538d 100644
--- a/kicker/applets/minipager/pagerbutton.cpp
+++ b/kicker/applets/minipager/pagerbutton.cpp
@@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <netwm.h>
#include <dcopclient.h>
-#include <kwinmodule.h>
+#include <twinmodule.h>
#include <ksharedpixmap.h>
#include <kpixmapio.h>
#include <kpixmapeffect.h>
@@ -81,7 +81,7 @@ KMiniPagerButton::KMiniPagerButton(int desk, bool useViewPorts, const TQPoint& v
setBackgroundOrigin(AncestorOrigin);
installEventFilter(KickerTip::the());
- m_desktopName = m_pager->kwin()->desktopName(m_desktop);
+ m_desktopName = m_pager->twin()->desktopName(m_desktop);
connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotClicked()));
connect(this, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggled(bool)));
@@ -108,7 +108,7 @@ TQRect KMiniPagerButton::mapGeometryToViewport(const KWin::WindowInfo& info) con
// ### fix vertically layouted viewports
TQRect _r(info.frameGeometry());
- TQPoint vx(m_pager->kwin()->currentViewport(m_pager->kwin()->currentDesktop()));
+ TQPoint vx(m_pager->twin()->currentViewport(m_pager->twin()->currentDesktop()));
_r.moveBy( - (m_desktop - vx.x()) * TQApplication::desktop()->width(),
0);
@@ -127,7 +127,7 @@ TQPoint KMiniPagerButton::mapPointToViewport(const TQPoint& _p) const
{
if (!m_useViewports) return _p;
- TQPoint vx(m_pager->kwin()->currentViewport(m_pager->kwin()->currentDesktop()));
+ TQPoint vx(m_pager->twin()->currentViewport(m_pager->twin()->currentDesktop()));
// ### fix vertically layouted viewports
TQPoint p(_p);
@@ -443,12 +443,12 @@ void KMiniPagerButton::drawButton(TQPainter *bp)
// window preview...
if (m_pager->desktopPreview())
{
- KWinModule* kwin = m_pager->kwin();
+ KWinModule* twin = m_pager->twin();
KWin::WindowInfo *info = 0;
int dw = TQApplication::desktop()->width();
int dh = TQApplication::desktop()->height();
- TQValueList<WId> windows = kwin->stackingOrder();
+ TQValueList<WId> windows = twin->stackingOrder();
TQValueList<WId>::const_iterator itEnd = windows.constEnd();
for (TQValueList<WId>::ConstIterator it = windows.constBegin(); it != itEnd; ++it)
{
@@ -460,7 +460,7 @@ void KMiniPagerButton::drawButton(TQPainter *bp)
r = TQRect(r.x() * width() / dw, 2 + r.y() * height() / dh,
r.width() * width() / dw, r.height() * height() / dh);
- if (kwin->activeWindow() == info->win())
+ if (twin->activeWindow() == info->win())
{
TQBrush brush = tqcolorGroup().brush(TQColorGroup::Highlight);
qDrawShadeRect(bp, r, tqcolorGroup(), false, 1, 0, &brush);
@@ -704,7 +704,7 @@ void KMiniPagerButton::dragLeaveEvent( TQDragLeaveEvent* e )
{
m_dragSwitchTimer.stop();
- if (m_pager->kwin()->currentDesktop() != m_desktop)
+ if (m_pager->twin()->currentDesktop() != m_desktop)
{
setDown(false);
}
@@ -750,7 +750,7 @@ bool KMiniPagerButton::eventFilter( TQObject *o, TQEvent * e)
if (o && TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_lineEdit) &&
(e->type() == TQEvent::FocusOut || e->type() == TQEvent::Hide))
{
- m_pager->kwin()->setDesktopName( m_desktop, m_lineEdit->text() );
+ m_pager->twin()->setDesktopName( m_desktop, m_lineEdit->text() );
m_desktopName = m_lineEdit->text();
TQTimer::singleShot( 0, m_lineEdit, TQT_SLOT( deleteLater() ) );
m_lineEdit = 0;