summaryrefslogtreecommitdiffstats
path: root/kicker/applets/minipager
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 /kicker/applets/minipager
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 'kicker/applets/minipager')
-rw-r--r--kicker/applets/minipager/pagerapplet.cpp180
-rw-r--r--kicker/applets/minipager/pagerapplet.h32
-rw-r--r--kicker/applets/minipager/pagerbutton.cpp222
-rw-r--r--kicker/applets/minipager/pagerbutton.h48
4 files changed, 241 insertions, 241 deletions
diff --git a/kicker/applets/minipager/pagerapplet.cpp b/kicker/applets/minipager/pagerapplet.cpp
index defc21795..dc2431e15 100644
--- a/kicker/applets/minipager/pagerapplet.cpp
+++ b/kicker/applets/minipager/pagerapplet.cpp
@@ -21,12 +21,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qlineedit.h>
-#include <qpopupmenu.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqlineedit.h>
+#include <tqpopupmenu.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
#include <dcopref.h>
#include <kglobalsettings.h>
@@ -73,15 +73,15 @@ static const int bgOffset = 300;
extern "C"
{
- KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile)
+ KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile)
{
KGlobal::locale()->insertCatalogue("kminipagerapplet");
return new KMiniPager(configFile, KPanelApplet::Normal, 0, parent, "kminipagerapplet");
}
}
-KMiniPager::KMiniPager(const QString& configFile, Type type, int actions,
- QWidget *parent, const char *name)
+KMiniPager::KMiniPager(const TQString& configFile, Type type, int actions,
+ TQWidget *parent, const char *name)
: KPanelApplet( configFile, type, actions, parent, name ),
m_layout(0),
m_desktopLayoutOwner( NULL ),
@@ -90,8 +90,8 @@ KMiniPager::KMiniPager(const QString& configFile, Type type, int actions,
m_settings( new PagerSettings(sharedConfig()) )
{
setBackgroundOrigin( AncestorOrigin );
- int scnum = QApplication::desktop()->screenNumber(this);
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(this);
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
if (desk.width() <= 800)
{
KConfigSkeleton::ItemBool* item = dynamic_cast<KConfigSkeleton::ItemBool*>(m_settings->findItem("Preview"));
@@ -107,9 +107,9 @@ KMiniPager::KMiniPager(const QString& configFile, Type type, int actions,
TaskManager::the()->trackGeometry();
}
- m_group = new QButtonGroup(this);
+ m_group = new TQButtonGroup(this);
m_group->setBackgroundOrigin(AncestorOrigin);
- m_group->setFrameStyle(QFrame::NoFrame);
+ m_group->setFrameStyle(TQFrame::NoFrame);
m_group->setExclusive( true );
setFont( KGlobalSettings::taskbarFont() );
@@ -127,32 +127,32 @@ KMiniPager::KMiniPager(const QString& configFile, Type type, int actions,
desktopLayoutX = -1;
desktopLayoutY = -1;
- QSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
+ TQSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
m_useViewports = s.width() * s.height() > 1;
drawButtons();
- connect( m_kwin, SIGNAL( currentDesktopChanged(int)), SLOT( slotSetDesktop(int) ) );
- connect( m_kwin, SIGNAL( currentDesktopViewportChanged(int, const QPoint&)), SLOT(slotSetDesktopViewport(int, const QPoint&)));
- connect( m_kwin, SIGNAL( numberOfDesktopsChanged(int)), SLOT( slotSetDesktopCount(int) ) );
- connect( m_kwin, SIGNAL( desktopGeometryChanged(int)), SLOT( slotRefreshViewportCount(int) ) );
- connect( m_kwin, SIGNAL( activeWindowChanged(WId)), SLOT( slotActiveWindowChanged(WId) ) );
- connect( m_kwin, SIGNAL( windowAdded(WId) ), this, SLOT( slotWindowAdded(WId) ) );
- connect( m_kwin, SIGNAL( windowRemoved(WId) ), this, SLOT( slotWindowRemoved(WId) ) );
- connect( m_kwin, SIGNAL( windowChanged(WId,unsigned int) ), this, SLOT( slotWindowChanged(WId,unsigned int) ) );
- connect( m_kwin, SIGNAL( desktopNamesChanged() ), this, SLOT( slotDesktopNamesChanged() ) );
- connect( kapp, SIGNAL(backgroundChanged(int)), SLOT(slotBackgroundChanged(int)) );
+ 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( kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int)) );
if (kapp->authorizeKAction("kicker_rmb") && kapp->authorizeControlModule("kde-kcmtaskbar.desktop"))
{
- m_contextMenu = new QPopupMenu();
- connect(m_contextMenu, SIGNAL(aboutToShow()), SLOT(aboutToShowContextMenu()));
- connect(m_contextMenu, SIGNAL(activated(int)), SLOT(contextMenuActivated(int)));
+ m_contextMenu = new TQPopupMenu();
+ connect(m_contextMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(aboutToShowContextMenu()));
+ connect(m_contextMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int)));
setCustomMenu(m_contextMenu);
}
- QValueList<WId>::ConstIterator it;
- QValueList<WId>::ConstIterator itEnd = m_kwin->windows().end();
+ TQValueList<WId>::ConstIterator it;
+ TQValueList<WId>::ConstIterator itEnd = m_kwin->windows().end();
for ( it = m_kwin->windows().begin(); it != itEnd; ++it)
{
slotWindowAdded( (*it) );
@@ -218,11 +218,11 @@ void KMiniPager::slotSetDesktop(int desktop)
}
}
-void KMiniPager::slotSetDesktopViewport(int desktop, const QPoint& viewport)
+void KMiniPager::slotSetDesktopViewport(int desktop, const TQPoint& viewport)
{
// ###
Q_UNUSED(desktop);
- QSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
+ TQSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
slotSetDesktop((viewport.y()-1) * s.width() + viewport.x() );
}
@@ -231,9 +231,9 @@ void KMiniPager::slotButtonSelected( int desk )
if (m_kwin->numberOfViewports(m_kwin->currentDesktop()).width() *
m_kwin->numberOfViewports(m_kwin->currentDesktop()).height() > 1)
{
- QPoint p;
+ TQPoint p;
- p.setX( (desk-1) * QApplication::desktop()->width());
+ p.setX( (desk-1) * TQApplication::desktop()->width());
p.setY( 0 );
KWin::setCurrentDesktopViewport(m_kwin->currentDesktop(), p);
@@ -276,14 +276,14 @@ int KMiniPager::widthForHeight(int h) const
{
if (desktopPreview() || m_settings->backgroundType() == PagerSettings::EnumBackgroundType::BgLive)
{
- bw = (int) ( bw * (double) QApplication::desktop()->width() / QApplication::desktop()->height() );
+ bw = (int) ( bw * (double) TQApplication::desktop()->width() / TQApplication::desktop()->height() );
}
}
else
{
// scale to desktop width as a minimum
- bw = (int) (bw * (double) QApplication::desktop()->width() / QApplication::desktop()->height());
- QFontMetrics fm = fontMetrics();
+ bw = (int) (bw * (double) TQApplication::desktop()->width() / TQApplication::desktop()->height());
+ TQFontMetrics fm = fontMetrics();
for (int i = 1; i <= deskNum; i++)
{
int sw = fm.width( m_kwin->desktopName( i ) ) + 8;
@@ -331,7 +331,7 @@ int KMiniPager::heightForWidth(int w) const
int bh = (w/rowNum) + 1;
if ( desktopPreview() )
{
- bh = (int) ( bh * (double) QApplication::desktop()->height() / QApplication::desktop()->width() );
+ bh = (int) ( bh * (double) TQApplication::desktop()->height() / TQApplication::desktop()->width() );
}
else if ( m_settings->labelType() == PagerSettings::EnumLabelType::LabelName )
{
@@ -365,7 +365,7 @@ void KMiniPager::updateDesktopLayout(int o, int x, int y)
if( m_desktopLayoutOwner == NULL )
{ // must own manager selection before setting global desktop layout
int screen = DefaultScreen( qt_xdisplay());
- m_desktopLayoutOwner = new KSelectionOwner( QString( "_NET_DESKTOP_LAYOUT_S%1" ).arg( screen ).latin1(),
+ m_desktopLayoutOwner = new KSelectionOwner( TQString( "_NET_DESKTOP_LAYOUT_S%1" ).arg( screen ).latin1(),
screen, this );
if( !m_desktopLayoutOwner->claim( false ))
{
@@ -379,7 +379,7 @@ void KMiniPager::updateDesktopLayout(int o, int x, int y)
i.setDesktopLayout( orient, x, y, NET::DesktopLayoutCornerTopLeft );
}
-void KMiniPager::resizeEvent(QResizeEvent*)
+void KMiniPager::resizeEvent(TQResizeEvent*)
{
bool horiz = orientation() == Horizontal;
@@ -418,10 +418,10 @@ void KMiniPager::resizeEvent(QResizeEvent*)
}
// 1 pixel spacing.
- m_layout = new QGridLayout(this, nDX, nDY, 0, 1);
+ m_layout = new TQGridLayout(this, nDX, nDY, 0, 1);
- QValueList<KMiniPagerButton*>::Iterator it = m_desktops.begin();
- QValueList<KMiniPagerButton*>::Iterator itEnd = m_desktops.end();
+ TQValueList<KMiniPagerButton*>::Iterator it = m_desktops.begin();
+ TQValueList<KMiniPagerButton*>::Iterator itEnd = m_desktops.end();
int c = 0,
r = 0;
while( it != itEnd ) {
@@ -438,7 +438,7 @@ void KMiniPager::resizeEvent(QResizeEvent*)
updateGeometry();
}
-void KMiniPager::wheelEvent( QWheelEvent* e )
+void KMiniPager::wheelEvent( TQWheelEvent* e )
{
int newDesk;
int desktops = KWin::numberOfDesktops();
@@ -465,24 +465,24 @@ void KMiniPager::drawButtons()
int i = 1;
do
{
- QSize viewportNum = m_kwin->numberOfViewports(i);
+ TQSize viewportNum = m_kwin->numberOfViewports(i);
for (int j = 1; j <= viewportNum.width() * viewportNum.height(); ++j)
{
- QSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
- QPoint viewport( (j-1) % s.width(), (j-1) / s.width());
+ TQSize s(m_kwin->numberOfViewports(m_kwin->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 )
{
- QToolTip::add( desk, desk->desktopName() );
+ TQToolTip::add( desk, desk->desktopName() );
}
m_desktops.append( desk );
m_group->insert( desk, count );
- connect(desk, SIGNAL(buttonSelected(int)),
- SLOT(slotButtonSelected(int)) );
- connect(desk, SIGNAL(showMenu(const QPoint&, int )),
- SLOT(slotShowMenu(const QPoint&, int )) );
+ connect(desk, TQT_SIGNAL(buttonSelected(int)),
+ TQT_SLOT(slotButtonSelected(int)) );
+ connect(desk, TQT_SIGNAL(showMenu(const TQPoint&, int )),
+ TQT_SLOT(slotShowMenu(const TQPoint&, int )) );
desk->show();
++count;
@@ -493,11 +493,11 @@ void KMiniPager::drawButtons()
void KMiniPager::slotSetDesktopCount( int )
{
- QSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
+ TQSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
m_useViewports = s.width() * s.height() > 1;
- QValueList<KMiniPagerButton*>::ConstIterator it;
- QValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
+ TQValueList<KMiniPagerButton*>::ConstIterator it;
+ TQValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
for( it = m_desktops.begin(); it != itEnd; ++it )
{
delete (*it);
@@ -518,11 +518,11 @@ void KMiniPager::slotSetDesktopCount( int )
void KMiniPager::slotRefreshViewportCount( int )
{
- QSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
+ TQSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
m_useViewports = s.width() * s.height() > 1;
- QValueList<KMiniPagerButton*>::ConstIterator it;
- QValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
+ TQValueList<KMiniPagerButton*>::ConstIterator it;
+ TQValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
for( it = m_desktops.begin(); it != itEnd; ++it )
{
delete (*it);
@@ -549,8 +549,8 @@ void KMiniPager::slotActiveWindowChanged( WId win )
KWin::WindowInfo* inf2 = win ? info( win ) : NULL;
m_activeWindow = win;
- QValueList<KMiniPagerButton*>::ConstIterator it;
- QValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
+ TQValueList<KMiniPagerButton*>::ConstIterator it;
+ TQValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
for ( it = m_desktops.begin(); it != itEnd; ++it)
{
if ( ( inf1 && (*it)->shouldPaintWindow(inf1)) ||
@@ -573,8 +573,8 @@ void KMiniPager::slotWindowAdded( WId win)
return;
}
- QValueList<KMiniPagerButton*>::ConstIterator it;
- QValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
+ TQValueList<KMiniPagerButton*>::ConstIterator it;
+ TQValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
for ( it = m_desktops.begin(); it != itEnd; ++it)
{
if ( (*it)->shouldPaintWindow(inf) )
@@ -605,8 +605,8 @@ void KMiniPager::slotWindowRemoved(WId win)
return;
}
- QValueList<KMiniPagerButton*>::ConstIterator it;
- QValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
+ TQValueList<KMiniPagerButton*>::ConstIterator it;
+ TQValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
for (it = m_desktops.begin(); it != itEnd; ++it)
{
if (onAllDesktops || onAllViewports || desktop == (*it)->desktop())
@@ -637,9 +637,9 @@ void KMiniPager::slotWindowChanged( WId win , unsigned int properties )
{
KWin::WindowInfo* inf = m_windows[win];
bool skipPager = inf->hasState(NET::SkipPager);
- QMemArray<bool> old_shouldPaintWindow(m_desktops.size());
- QValueList<KMiniPagerButton*>::ConstIterator it;
- QValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
+ TQMemArray<bool> old_shouldPaintWindow(m_desktops.size());
+ TQValueList<KMiniPagerButton*>::ConstIterator it;
+ TQValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
int i = 0;
for ( it = m_desktops.begin(); it != itEnd; ++it)
{
@@ -693,8 +693,8 @@ KTextShadowEngine* KMiniPager::shadowEngine()
void KMiniPager::refresh()
{
- QValueList<KMiniPagerButton*>::ConstIterator it;
- QValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
+ TQValueList<KMiniPagerButton*>::ConstIterator it;
+ TQValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
for ( it = m_desktops.begin(); it != itEnd; ++it)
{
(*it)->update();
@@ -716,13 +716,13 @@ void KMiniPager::aboutToShowContextMenu()
showMenu->setCheckable(true);
showMenu->insertTitle(i18n("Pager Layout"));
- QPopupMenu* rowMenu = new QPopupMenu(showMenu);
+ TQPopupMenu* rowMenu = new TQPopupMenu(showMenu);
rowMenu->setCheckable(true);
rowMenu->insertItem(i18n("&Automatic"), 0 + rowOffset);
rowMenu->insertItem(i18n("one row or column", "&1"), 1 + rowOffset);
rowMenu->insertItem(i18n("two rows or columns", "&2"), 2 + rowOffset);
rowMenu->insertItem( i18n("three rows or columns", "&3"), 3 + rowOffset);
- connect(rowMenu, SIGNAL(activated(int)), SLOT(contextMenuActivated(int)));
+ connect(rowMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int)));
showMenu->insertItem((orientation()==Horizontal) ? i18n("&Rows"):
i18n("&Columns"),
rowMenu);
@@ -747,7 +747,7 @@ void KMiniPager::aboutToShowContextMenu()
showMenu->insertItem(i18n("&Desktop Wallpaper"),
PagerSettings::EnumBackgroundType::BgLive + bgOffset);
}
- connect(showMenu, SIGNAL(activated(int)), SLOT(contextMenuActivated(int)));
+ connect(showMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int)));
m_contextMenu->insertItem(i18n("&Pager Options"),showMenu);
m_contextMenu->insertItem(SmallIcon("configure"),
@@ -766,7 +766,7 @@ void KMiniPager::aboutToShowContextMenu()
PagerSettings::EnumLabelType::LabelName);
}
-void KMiniPager::slotShowMenu(const QPoint& pos, int desktop)
+void KMiniPager::slotShowMenu(const TQPoint& pos, int desktop)
{
if (!m_contextMenu)
{
@@ -827,8 +827,8 @@ void KMiniPager::contextMenuActivated(int result)
{
if (m_useViewports == false) {
m_settings->setBackgroundType(PagerSettings::EnumBackgroundType::BgLive);
- QValueList<KMiniPagerButton*>::ConstIterator it;
- QValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
+ TQValueList<KMiniPagerButton*>::ConstIterator it;
+ TQValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
for( it = m_desktops.begin(); it != itEnd; ++it )
{
(*it)->backgroundChanged();
@@ -858,16 +858,16 @@ void KMiniPager::contextMenuActivated(int result)
void KMiniPager::slotDesktopNamesChanged()
{
- QValueList<KMiniPagerButton*>::ConstIterator it = m_desktops.begin();
- QValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
+ TQValueList<KMiniPagerButton*>::ConstIterator it = m_desktops.begin();
+ TQValueList<KMiniPagerButton*>::ConstIterator itEnd = m_desktops.end();
for (int i = 1; it != itEnd; ++it, ++i)
{
- QString name = m_kwin->desktopName(i);
+ TQString name = m_kwin->desktopName(i);
(*it)->setDesktopName(name);
(*it)->repaint();
- QToolTip::remove((*it));
- QToolTip::add((*it), name);
+ TQToolTip::remove((*it));
+ TQToolTip::add((*it), name);
}
updateLayout();
@@ -884,9 +884,9 @@ void KMiniPager::showPager()
else
{
// Let's run kpager if it isn't running
- connect( dcop, SIGNAL( applicationRegistered(const QCString &) ), this, SLOT(applicationRegistered(const QCString &)) );
+ connect( dcop, TQT_SIGNAL( applicationRegistered(const TQCString &) ), this, TQT_SLOT(applicationRegistered(const TQCString &)) );
dcop->setNotifications(true);
- QString strAppPath(locate("exe", "kpager"));
+ TQString strAppPath(locate("exe", "kpager"));
if (!strAppPath.isEmpty())
{
KProcess process;
@@ -899,25 +899,25 @@ void KMiniPager::showPager()
void KMiniPager::showKPager(bool toggleShow)
{
- QPoint pt;
+ TQPoint pt;
switch ( position() )
{
case pTop:
- pt = mapToGlobal( QPoint(x(), y() + height()) );
+ pt = mapToGlobal( TQPoint(x(), y() + height()) );
break;
case pLeft:
- pt = mapToGlobal( QPoint(x() + width(), y()) );
+ pt = mapToGlobal( TQPoint(x() + width(), y()) );
break;
case pRight:
case pBottom:
default:
- pt=mapToGlobal( QPoint(x(), y()) );
+ pt=mapToGlobal( TQPoint(x(), y()) );
}
DCOPClient *dcop=kapp->dcopClient();
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << pt.x() << pt.y() ;
if (toggleShow)
{
@@ -929,12 +929,12 @@ void KMiniPager::showKPager(bool toggleShow)
}
}
-void KMiniPager::applicationRegistered( const QCString & appName )
+void KMiniPager::applicationRegistered( const TQCString & appName )
{
if (appName == "kpager")
{
- disconnect( kapp->dcopClient(), SIGNAL( applicationRegistered(const QCString &) ),
- this, SLOT(applicationRegistered(const QCString &)) );
+ disconnect( kapp->dcopClient(), TQT_SIGNAL( applicationRegistered(const TQCString &) ),
+ this, TQT_SLOT(applicationRegistered(const TQCString &)) );
showKPager(false);
}
}
diff --git a/kicker/applets/minipager/pagerapplet.h b/kicker/applets/minipager/pagerapplet.h
index d96ba83f7..88712d9ff 100644
--- a/kicker/applets/minipager/pagerapplet.h
+++ b/kicker/applets/minipager/pagerapplet.h
@@ -24,8 +24,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __MINIPAGER_H
#define __MINIPAGER_H
-#include <qvaluelist.h>
-#include <qintdict.h>
+#include <tqvaluelist.h>
+#include <tqintdict.h>
#include <kpanelapplet.h>
#include <kwin.h>
@@ -49,8 +49,8 @@ class KMiniPager : public KPanelApplet
Q_OBJECT
public:
- KMiniPager(const QString& configFile, Type t = Normal, int actions = 0,
- QWidget *parent = 0, const char *name = 0);
+ KMiniPager(const TQString& configFile, Type t = Normal, int actions = 0,
+ TQWidget *parent = 0, const char *name = 0);
virtual ~KMiniPager();
@@ -78,11 +78,11 @@ public:
void emitRequestFocus() { emit requestFocus(); }
- QPoint clickPos;
+ TQPoint clickPos;
public slots:
void slotSetDesktop(int desktop);
- void slotSetDesktopViewport(int desktop, const QPoint& viewport);
+ void slotSetDesktopViewport(int desktop, const TQPoint& viewport);
void slotSetDesktopCount(int count);
void slotRefreshViewportCount(int currentDesktop);
void slotButtonSelected(int desk );
@@ -90,7 +90,7 @@ public slots:
void slotWindowAdded( WId );
void slotWindowRemoved( WId );
void slotWindowChanged( WId, unsigned int );
- void slotShowMenu( const QPoint&, int );
+ void slotShowMenu( const TQPoint&, int );
void slotDesktopNamesChanged();
void slotBackgroundChanged( int );
@@ -98,30 +98,30 @@ public slots:
protected:
void drawButtons();
- void startDrag( const QPoint &point );
+ void startDrag( const TQPoint &point );
void updateDesktopLayout(int,int,int);
- void resizeEvent(QResizeEvent*);
- void wheelEvent( QWheelEvent* e );
+ void resizeEvent(TQResizeEvent*);
+ void wheelEvent( TQWheelEvent* e );
void showKPager(bool toggleShow);
protected slots:
void showPager();
- void applicationRegistered(const QCString &appName);
+ void applicationRegistered(const TQCString &appName);
void aboutToShowContextMenu();
void contextMenuActivated(int);
private:
- QValueList<KMiniPagerButton*> m_desktops;
+ TQValueList<KMiniPagerButton*> m_desktops;
int m_curDesk;
int m_rmbDesk;
- QIntDict<KWin::WindowInfo> m_windows;
+ TQIntDict<KWin::WindowInfo> m_windows;
WId m_activeWindow;
- QButtonGroup *m_group;
+ TQButtonGroup *m_group;
- QGridLayout *m_layout;
+ TQGridLayout *m_layout;
bool m_useViewports;
int desktopLayoutOrientation;
int desktopLayoutX;
@@ -131,7 +131,7 @@ private:
KWinModule *m_kwin;
KTextShadowEngine* m_shadowEngine;
- QPopupMenu *m_contextMenu;
+ TQPopupMenu *m_contextMenu;
PagerSettings *m_settings;
};
diff --git a/kicker/applets/minipager/pagerbutton.cpp b/kicker/applets/minipager/pagerbutton.cpp
index c17e0e1cb..c56afca38 100644
--- a/kicker/applets/minipager/pagerbutton.cpp
+++ b/kicker/applets/minipager/pagerbutton.cpp
@@ -23,12 +23,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdlib.h>
-#include <qcursor.h>
-#include <qdrawutil.h>
-#include <qlineedit.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qstylesheet.h>
+#include <tqcursor.h>
+#include <tqdrawutil.h>
+#include <tqlineedit.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqstylesheet.h>
#include <netwm.h>
#include <dcopclient.h>
@@ -58,9 +58,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
KSharedPixmap* KMiniPagerButton::s_commonSharedPixmap;
KPixmap* KMiniPagerButton::s_commonBgPixmap;
-KMiniPagerButton::KMiniPagerButton(int desk, bool useViewPorts, const QPoint& viewport,
+KMiniPagerButton::KMiniPagerButton(int desk, bool useViewPorts, const TQPoint& viewport,
KMiniPager *parent, const char *name)
- : QButton(parent, name),
+ : TQButton(parent, name),
m_pager(parent),
m_desktop(desk),
m_useViewports(useViewPorts),
@@ -81,10 +81,10 @@ KMiniPagerButton::KMiniPagerButton(int desk, bool useViewPorts, const QPoint& vi
m_desktopName = m_pager->kwin()->desktopName(m_desktop);
- connect(this, SIGNAL(clicked()), SLOT(slotClicked()));
- connect(this, SIGNAL(toggled(bool)), SLOT(slotToggled(bool)));
- connect(&m_dragSwitchTimer, SIGNAL(timeout()), this, SLOT(slotDragSwitch()));
- connect(&m_updateCompressor, SIGNAL(timeout()), this, SLOT(update()));
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotClicked()));
+ connect(this, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggled(bool)));
+ connect(&m_dragSwitchTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDragSwitch()));
+ connect(&m_updateCompressor, TQT_SIGNAL(timeout()), this, TQT_SLOT(update()));
if (m_pager->desktopPreview())
{
@@ -99,37 +99,37 @@ KMiniPagerButton::~KMiniPagerButton()
delete m_bgPixmap;
}
-QRect KMiniPagerButton::mapGeometryToViewport(const KWin::WindowInfo& info) const
+TQRect KMiniPagerButton::mapGeometryToViewport(const KWin::WindowInfo& info) const
{
if (!m_useViewports)
return info.frameGeometry();
// ### fix vertically layouted viewports
- QRect _r(info.frameGeometry());
- QPoint vx(m_pager->kwin()->currentViewport(m_pager->kwin()->currentDesktop()));
+ TQRect _r(info.frameGeometry());
+ TQPoint vx(m_pager->kwin()->currentViewport(m_pager->kwin()->currentDesktop()));
- _r.moveBy( - (m_desktop - vx.x()) * QApplication::desktop()->width(),
+ _r.moveBy( - (m_desktop - vx.x()) * TQApplication::desktop()->width(),
0);
if ((info.state() & NET::Sticky))
{
- _r.moveTopLeft(QPoint(_r.x() % QApplication::desktop()->width(),
- _r.y() % QApplication::desktop()->height()));
+ _r.moveTopLeft(TQPoint(_r.x() % TQApplication::desktop()->width(),
+ _r.y() % TQApplication::desktop()->height()));
}
return _r;
}
-QPoint KMiniPagerButton::mapPointToViewport(const QPoint& _p) const
+TQPoint KMiniPagerButton::mapPointToViewport(const TQPoint& _p) const
{
if (!m_useViewports) return _p;
- QPoint vx(m_pager->kwin()->currentViewport(m_pager->kwin()->currentDesktop()));
+ TQPoint vx(m_pager->kwin()->currentViewport(m_pager->kwin()->currentDesktop()));
// ### fix vertically layouted viewports
- QPoint p(_p);
- p.setX(p.x() + (m_desktop - vx.x()) * QApplication::desktop()->width());
+ TQPoint p(_p);
+ p.setX(p.x() + (m_desktop - vx.x()) * TQApplication::desktop()->width());
return p;
}
@@ -152,11 +152,11 @@ bool KMiniPagerButton::shouldPaintWindow( KWin::WindowInfo *info ) const
return false;
if (m_useViewports) {
- QRect r = mapGeometryToViewport(*info);
+ TQRect r = mapGeometryToViewport(*info);
if (!info->hasState(NET::Sticky) &&
- !QApplication::desktop()->geometry().contains(r.topLeft()) &&
- !QApplication::desktop()->geometry().contains(r.topRight()))
+ !TQApplication::desktop()->geometry().contains(r.topLeft()) &&
+ !TQApplication::desktop()->geometry().contains(r.topRight()))
return false;
}
@@ -172,7 +172,7 @@ bool KMiniPagerButton::shouldPaintWindow( KWin::WindowInfo *info ) const
return true;
}
-void KMiniPagerButton::resizeEvent(QResizeEvent *ev)
+void KMiniPagerButton::resizeEvent(TQResizeEvent *ev)
{
if (m_lineEdit)
{
@@ -182,7 +182,7 @@ void KMiniPagerButton::resizeEvent(QResizeEvent *ev)
delete m_bgPixmap;
m_bgPixmap = 0;
- QButton::resizeEvent(ev);
+ TQButton::resizeEvent(ev);
}
void KMiniPagerButton::windowsChanged()
@@ -217,21 +217,21 @@ void KMiniPagerButton::loadBgPixmap()
client->attach();
}
- QCString kdesktop_name;
+ TQCString kdesktop_name;
int screen_number = DefaultScreen(qt_xdisplay());
if (screen_number == 0)
kdesktop_name = "kdesktop";
else
kdesktop_name.sprintf("kdesktop-screen-%d", screen_number);
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
if (client->call(kdesktop_name, "KBackgroundIface", "isCommon()",
data, replyType, replyData))
{
if (replyType == "bool")
{
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
reply >> m_isCommon;
}
}
@@ -245,8 +245,8 @@ void KMiniPagerButton::loadBgPixmap()
}
else if (s_commonSharedPixmap)
{ // other button is already fetching the pixmap
- connect(s_commonSharedPixmap, SIGNAL(done(bool)),
- SLOT(backgroundLoaded(bool)));
+ connect(s_commonSharedPixmap, TQT_SIGNAL(done(bool)),
+ TQT_SLOT(backgroundLoaded(bool)));
return;
}
}
@@ -256,15 +256,15 @@ void KMiniPagerButton::loadBgPixmap()
if (!s_commonSharedPixmap)
{
s_commonSharedPixmap = new KSharedPixmap;
- connect(s_commonSharedPixmap, SIGNAL(done(bool)),
- SLOT(backgroundLoaded(bool)));
+ connect(s_commonSharedPixmap, TQT_SIGNAL(done(bool)),
+ TQT_SLOT(backgroundLoaded(bool)));
}
- retval = s_commonSharedPixmap->loadFromShared(QString("DESKTOP1"));
+ retval = s_commonSharedPixmap->loadFromShared(TQString("DESKTOP1"));
if (retval == false) {
- QDataStream args( data, IO_WriteOnly );
+ TQDataStream args( data, IO_WriteOnly );
args << 1; // Argument is 1 (true)
client->send(kdesktop_name, "KBackgroundIface", "setExport(int)", data);
- retval = s_commonSharedPixmap->loadFromShared(QString("DESKTOP1"));
+ retval = s_commonSharedPixmap->loadFromShared(TQString("DESKTOP1"));
}
}
else
@@ -272,30 +272,30 @@ void KMiniPagerButton::loadBgPixmap()
if (!m_sharedPixmap)
{
m_sharedPixmap = new KSharedPixmap;
- connect(m_sharedPixmap, SIGNAL(done(bool)),
- SLOT(backgroundLoaded(bool)));
+ connect(m_sharedPixmap, TQT_SIGNAL(done(bool)),
+ TQT_SLOT(backgroundLoaded(bool)));
}
- retval = m_sharedPixmap->loadFromShared(QString("DESKTOP%1").arg(m_desktop));
+ retval = m_sharedPixmap->loadFromShared(TQString("DESKTOP%1").arg(m_desktop));
if (retval == false) {
- QDataStream args( data, IO_WriteOnly );
+ TQDataStream args( data, IO_WriteOnly );
args << 1;
client->send(kdesktop_name, "KBackgroundIface", "setExport(int)", data);
- retval = m_sharedPixmap->loadFromShared(QString("DESKTOP%1").arg(m_desktop));
+ retval = m_sharedPixmap->loadFromShared(TQString("DESKTOP%1").arg(m_desktop));
}
}
}
-static QPixmap scalePixmap(const QPixmap &pixmap, int width, int height)
+static 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;
@@ -335,26 +335,26 @@ void KMiniPagerButton::backgroundLoaded( bool loaded )
}
}
-void KMiniPagerButton::enterEvent(QEvent *)
+void KMiniPagerButton::enterEvent(TQEvent *)
{
m_inside = true;
update();
}
-void KMiniPagerButton::leaveEvent(QEvent *)
+void KMiniPagerButton::leaveEvent(TQEvent *)
{
m_inside = false;
update();
}
-void KMiniPagerButton::drawButton(QPainter *bp)
+void KMiniPagerButton::drawButton(TQPainter *bp)
{
int w = width();
int h = height();
bool on = isOn();
bool down = isDown();
- QBrush background;
+ TQBrush background;
bool liveBkgnd = m_pager->bgType() == PagerSettings::EnumBackgroundType::BgLive;
bool transparent = m_pager->bgType() == PagerSettings::EnumBackgroundType::BgTransparent;
@@ -363,7 +363,7 @@ void KMiniPagerButton::drawButton(QPainter *bp)
if (backgroundPixmap())
{
- QPoint pt = backgroundOffset();
+ TQPoint pt = backgroundOffset();
bp->drawTiledPixmap(0, 0, width(), height(), *backgroundPixmap(), pt.x(), pt.y());
}
else
@@ -418,11 +418,11 @@ void KMiniPagerButton::drawButton(QPainter *bp)
}
else
{
- QBrush background;
+ TQBrush background;
if (on)
{
- background = colorGroup().brush(QColorGroup::Midlight);
+ background = colorGroup().brush(TQColorGroup::Midlight);
}
else if (down)
{
@@ -431,7 +431,7 @@ void KMiniPagerButton::drawButton(QPainter *bp)
}
else
{
- background = colorGroup().brush(QColorGroup::Mid);
+ background = colorGroup().brush(TQColorGroup::Mid);
}
bp->fillRect(0, 0, w, h, background);
@@ -443,29 +443,29 @@ void KMiniPagerButton::drawButton(QPainter *bp)
{
KWinModule* kwin = m_pager->kwin();
KWin::WindowInfo *info = 0;
- int dw = QApplication::desktop()->width();
- int dh = QApplication::desktop()->height();
+ int dw = TQApplication::desktop()->width();
+ int dh = TQApplication::desktop()->height();
- QValueList<WId> windows = kwin->stackingOrder();
- QValueList<WId>::const_iterator itEnd = windows.constEnd();
- for (QValueList<WId>::ConstIterator it = windows.constBegin(); it != itEnd; ++it)
+ TQValueList<WId> windows = kwin->stackingOrder();
+ TQValueList<WId>::const_iterator itEnd = windows.constEnd();
+ for (TQValueList<WId>::ConstIterator it = windows.constBegin(); it != itEnd; ++it)
{
info = m_pager->info(*it);
if (shouldPaintWindow(info))
{
- QRect r = mapGeometryToViewport(*info);
- r = QRect(r.x() * width() / dw, 2 + r.y() * height() / dh,
+ TQRect r = mapGeometryToViewport(*info);
+ r = TQRect(r.x() * width() / dw, 2 + r.y() * height() / dh,
r.width() * width() / dw, r.height() * height() / dh);
if (kwin->activeWindow() == info->win())
{
- QBrush brush = colorGroup().brush(QColorGroup::Highlight);
+ TQBrush brush = colorGroup().brush(TQColorGroup::Highlight);
qDrawShadeRect(bp, r, colorGroup(), false, 1, 0, &brush);
}
else
{
- QBrush brush = colorGroup().brush(QColorGroup::Button);
+ TQBrush brush = colorGroup().brush(TQColorGroup::Button);
if (on)
{
@@ -478,7 +478,7 @@ void KMiniPagerButton::drawButton(QPainter *bp)
if (m_pager->windowIcons() && r.width() > 15 && r.height() > 15)
{
- QPixmap icon = KWin::icon(*it, 16, 16, true);
+ TQPixmap icon = KWin::icon(*it, 16, 16, true);
if (!icon.isNull())
{
bp->drawPixmap(r.left() + ((r.width() - 16) / 2),
@@ -508,23 +508,23 @@ void KMiniPagerButton::drawButton(QPainter *bp)
if (m_pager->labelType() != PagerSettings::EnumLabelType::LabelNone)
{
- QString label = (m_pager->labelType() == PagerSettings::EnumLabelType::LabelNumber) ?
- QString::number(m_desktop) : m_desktopName;
+ TQString label = (m_pager->labelType() == PagerSettings::EnumLabelType::LabelNumber) ?
+ TQString::number(m_desktop) : m_desktopName;
if (transparent || liveBkgnd)
{
bp->setPen(on ? colorGroup().midlight() : colorGroup().buttonText());
- m_pager->shadowEngine()->drawText(*bp, QRect(0, 0, w, h), AlignCenter, label, size());
+ m_pager->shadowEngine()->drawText(*bp, TQRect(0, 0, w, h), AlignCenter, label, size());
}
else
bp->drawText(0, 0, w, h, AlignCenter, label);
}
if (m_inside)
- KickerLib::drawBlendedRect(bp, QRect(1, 1, width() - 2, height() - 2), colorGroup().foreground());
+ KickerLib::drawBlendedRect(bp, TQRect(1, 1, width() - 2, height() - 2), colorGroup().foreground());
}
-void KMiniPagerButton::mousePressEvent(QMouseEvent * e)
+void KMiniPagerButton::mousePressEvent(TQMouseEvent * e)
{
if (e->button() == RightButton)
{
@@ -541,29 +541,29 @@ void KMiniPagerButton::mousePressEvent(QMouseEvent * e)
m_pager->clickPos = e->pos();
}
- QButton::mousePressEvent(e);
+ TQButton::mousePressEvent(e);
}
-void KMiniPagerButton::mouseReleaseEvent(QMouseEvent* e)
+void KMiniPagerButton::mouseReleaseEvent(TQMouseEvent* e)
{
- m_pager->clickPos = QPoint();
- QButton::mouseReleaseEvent(e);
+ m_pager->clickPos = TQPoint();
+ TQButton::mouseReleaseEvent(e);
}
-void KMiniPagerButton::mouseMoveEvent(QMouseEvent* e)
+void KMiniPagerButton::mouseMoveEvent(TQMouseEvent* e)
{
if (!m_pager->desktopPreview())
{
return;
}
- int dw = QApplication::desktop()->width();
- int dh = QApplication::desktop()->height();
+ int dw = TQApplication::desktop()->width();
+ int dh = TQApplication::desktop()->height();
int w = width();
int h = height();
- QPoint pos(m_pager->clickPos.isNull() ? mapFromGlobal(QCursor::pos()) : m_pager->clickPos);
- QPoint p = mapPointToViewport(QPoint(pos.x() * dw / w, pos.y() * dh / h));
+ TQPoint pos(m_pager->clickPos.isNull() ? mapFromGlobal(TQCursor::pos()) : m_pager->clickPos);
+ TQPoint p = mapPointToViewport(TQPoint(pos.x() * dw / w, pos.y() * dh / h));
Task::Ptr wasWindow = m_currentWindow;
m_currentWindow = TaskManager::the()->findTask(m_useViewports ? 1 : m_desktop, p);
@@ -576,13 +576,13 @@ void KMiniPagerButton::mouseMoveEvent(QMouseEvent* e)
if (m_currentWindow && !m_pager->clickPos.isNull() &&
(m_pager->clickPos - e->pos()).manhattanLength() > KGlobalSettings::dndEventDelay())
{
- QRect r = m_currentWindow->geometry();
+ TQRect r = m_currentWindow->geometry();
// preview window height, window width
int ww = r.width() * w / dw;
int wh = r.height() * h / dh;
- QPixmap windowImage(ww, wh);
- QPainter bp(&windowImage, this);
+ TQPixmap windowImage(ww, wh);
+ TQPainter bp(&windowImage, this);
bp.setPen(colorGroup().foreground());
bp.drawRect(0, 0, ww, wh);
@@ -591,7 +591,7 @@ void KMiniPagerButton::mouseMoveEvent(QMouseEvent* e)
Task::List tasklist;
tasklist.append(m_currentWindow);
TaskDrag* drag = new TaskDrag(tasklist, this);
- QPoint offset(m_pager->clickPos.x() - (r.x() * w / dw),
+ TQPoint offset(m_pager->clickPos.x() - (r.x() * w / dw),
m_pager->clickPos.y() - (r.y() * h / dh));
drag->setPixmap(windowImage, offset);
drag->dragMove();
@@ -601,11 +601,11 @@ void KMiniPagerButton::mouseMoveEvent(QMouseEvent* e)
setDown(false);
}
- m_pager->clickPos = QPoint();
+ m_pager->clickPos = TQPoint();
}
}
-void KMiniPagerButton::dragEnterEvent(QDragEnterEvent* e)
+void KMiniPagerButton::dragEnterEvent(TQDragEnterEvent* e)
{
if (PanelDrag::canDecode(e))
{
@@ -623,11 +623,11 @@ void KMiniPagerButton::dragEnterEvent(QDragEnterEvent* e)
// if a dragitem is held for over a pager button for two seconds,
// activate corresponding desktop
m_dragSwitchTimer.start(1000, true);
- QButton::dragEnterEvent(e);
+ TQButton::dragEnterEvent(e);
}
}
-void KMiniPagerButton::dropEvent(QDropEvent* e)
+void KMiniPagerButton::dropEvent(TQDropEvent* e)
{
if (TaskDrag::canDecode(e))
{
@@ -637,12 +637,12 @@ void KMiniPagerButton::dropEvent(QDropEvent* e)
if ((m_useViewports || e->source() == this) && tasks.count() == 1)
{
Task::Ptr task = tasks[0];
- int dw = QApplication::desktop()->width();
- int dh = QApplication::desktop()->height();
+ int dw = TQApplication::desktop()->width();
+ int dh = TQApplication::desktop()->height();
int w = width();
int h = height();
- QRect location = mapGeometryToViewport(task->info());
- QPoint pos = mapPointToViewport(e->pos());
+ TQRect location = mapGeometryToViewport(task->info());
+ TQPoint pos = mapPointToViewport(e->pos());
int deltaX = pos.x() - m_pager->clickPos.x();
int deltaY = pos.y() - m_pager->clickPos.y();
@@ -685,7 +685,7 @@ void KMiniPagerButton::dropEvent(QDropEvent* e)
setDown(false);
}
- QButton::dropEvent( e );
+ TQButton::dropEvent( e );
}
void KMiniPagerButton::enabledChange( bool oldEnabled )
@@ -695,10 +695,10 @@ void KMiniPagerButton::enabledChange( bool oldEnabled )
m_pager->refresh();
}
- QButton::enabledChange(oldEnabled);
+ TQButton::enabledChange(oldEnabled);
}
-void KMiniPagerButton::dragLeaveEvent( QDragLeaveEvent* e )
+void KMiniPagerButton::dragLeaveEvent( TQDragLeaveEvent* e )
{
m_dragSwitchTimer.stop();
@@ -707,7 +707,7 @@ void KMiniPagerButton::dragLeaveEvent( QDragLeaveEvent* e )
setDown(false);
}
- QButton::dragLeaveEvent( e );
+ TQButton::dragLeaveEvent( e );
}
void KMiniPagerButton::slotDragSwitch()
@@ -723,8 +723,8 @@ void KMiniPagerButton::slotClicked()
void KMiniPagerButton::rename()
{
if ( !m_lineEdit ) {
- m_lineEdit = new QLineEdit( this );
- connect( m_lineEdit, SIGNAL( returnPressed() ), m_lineEdit, SLOT( hide() ) );
+ m_lineEdit = new TQLineEdit( this );
+ connect( m_lineEdit, TQT_SIGNAL( returnPressed() ), m_lineEdit, TQT_SLOT( hide() ) );
m_lineEdit->installEventFilter( this );
}
m_lineEdit->setGeometry( rect() );
@@ -743,19 +743,19 @@ void KMiniPagerButton::slotToggled( bool b )
}
}
-bool KMiniPagerButton::eventFilter( QObject *o, QEvent * e)
+bool KMiniPagerButton::eventFilter( TQObject *o, TQEvent * e)
{
if (o && o == m_lineEdit &&
- (e->type() == QEvent::FocusOut || e->type() == QEvent::Hide))
+ (e->type() == TQEvent::FocusOut || e->type() == TQEvent::Hide))
{
m_pager->kwin()->setDesktopName( m_desktop, m_lineEdit->text() );
m_desktopName = m_lineEdit->text();
- QTimer::singleShot( 0, m_lineEdit, SLOT( deleteLater() ) );
+ TQTimer::singleShot( 0, m_lineEdit, TQT_SLOT( deleteLater() ) );
m_lineEdit = 0;
return true;
}
- return QButton::eventFilter(o, e);
+ return TQButton::eventFilter(o, e);
}
void KMiniPagerButton::updateKickerTip(KickerTip::Data &data)
@@ -764,7 +764,7 @@ void KMiniPagerButton::updateKickerTip(KickerTip::Data &data)
Task::Dict::iterator taskEnd = tasks.end();
uint taskCounter = 0;
uint taskLimiter = 4;
- QString lastWindow;
+ TQString lastWindow;
for (Task::Dict::iterator it = tasks.begin(); it != taskEnd; ++it)
{
@@ -777,8 +777,8 @@ void KMiniPagerButton::updateKickerTip(KickerTip::Data &data)
continue;
}
- QPixmap winIcon = it.data()->pixmap();
- QString bullet;
+ TQPixmap winIcon = it.data()->pixmap();
+ TQString bullet;
if (winIcon.isNull())
{
@@ -786,20 +786,20 @@ void KMiniPagerButton::updateKickerTip(KickerTip::Data &data)
}
else
{
- data.mimeFactory->setPixmap(QString::number(taskCounter), winIcon);
- bullet = QString("<img src=\"%1\" width=\"%2\" height=\"%3\">").arg(taskCounter).arg(16).arg(16);
+ data.mimeFactory->setPixmap(TQString::number(taskCounter), winIcon);
+ bullet = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\">").arg(taskCounter).arg(16).arg(16);
}
- QString name = KStringHandler::cPixelSqueeze(it.data()->visibleName(), fontMetrics(), 400);
- name = QStyleSheet::escape(name);
+ TQString name = KStringHandler::cPixelSqueeze(it.data()->visibleName(), fontMetrics(), 400);
+ name = TQStyleSheet::escape(name);
if (it.data() == m_currentWindow)
{
- data.subtext.append(QString("<br>%1&nbsp; <u>").arg(bullet));
+ data.subtext.append(TQString("<br>%1&nbsp; <u>").arg(bullet));
data.subtext.append(name).append("</u>");
}
else
{
- data.subtext.append(QString("<br>%1&nbsp; ").arg(bullet));
+ data.subtext.append(TQString("<br>%1&nbsp; ").arg(bullet));
data.subtext.append(name);
}
}
@@ -828,7 +828,7 @@ void KMiniPagerButton::updateKickerTip(KickerTip::Data &data)
data.duration = 4000;
data.icon = DesktopIcon("window_list", KIcon::SizeMedium);
- data.message = QStyleSheet::escape(m_desktopName);
+ data.message = TQStyleSheet::escape(m_desktopName);
data.direction = m_pager->popupDirection();
}
diff --git a/kicker/applets/minipager/pagerbutton.h b/kicker/applets/minipager/pagerbutton.h
index 1547201e0..50baf68c9 100644
--- a/kicker/applets/minipager/pagerbutton.h
+++ b/kicker/applets/minipager/pagerbutton.h
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __MINIPAGERBUTTON_H
#define __MINIPAGERBUTTON_H
-#include <qbutton.h>
+#include <tqbutton.h>
#include "taskmanager.h"
#include "kickertip.h"
@@ -35,18 +35,18 @@ class KMiniPager;
class KSharedPixmap;
class QLineEdit;
-class KMiniPagerButton : public QButton, public KickerTip::Client
+class KMiniPagerButton : public TQButton, public KickerTip::Client
{
Q_OBJECT
public:
- KMiniPagerButton(int desk, bool useViewports, const QPoint& viewport,
+ KMiniPagerButton(int desk, bool useViewports, const TQPoint& viewport,
KMiniPager *parent=0, const char *name=0);
~KMiniPagerButton();
int desktop() { return m_desktop; }
- QString desktopName() { return m_desktopName; }
- void setDesktopName( QString name ) { m_desktopName = name; }
+ TQString desktopName() { return m_desktopName; }
+ void setDesktopName( TQString name ) { m_desktopName = name; }
void rename();
void backgroundChanged();
@@ -56,22 +56,22 @@ public:
signals:
void buttonSelected( int desk );
- void showMenu( const QPoint&, int );
+ void showMenu( const TQPoint&, int );
protected:
- void drawButton(QPainter *);
- void enterEvent(QEvent*);
- void leaveEvent(QEvent*);
- void resizeEvent(QResizeEvent *ev);
- void mousePressEvent(QMouseEvent *);
- void mouseReleaseEvent(QMouseEvent *);
- void mouseMoveEvent(QMouseEvent *);
- void dragEnterEvent(QDragEnterEvent* e);
- void dragLeaveEvent(QDragLeaveEvent* e);
+ void drawButton(TQPainter *);
+ void enterEvent(TQEvent*);
+ void leaveEvent(TQEvent*);
+ void resizeEvent(TQResizeEvent *ev);
+ void mousePressEvent(TQMouseEvent *);
+ void mouseReleaseEvent(TQMouseEvent *);
+ void mouseMoveEvent(TQMouseEvent *);
+ void dragEnterEvent(TQDragEnterEvent* e);
+ void dragLeaveEvent(TQDragLeaveEvent* e);
void enabledChange( bool oldEnabled );
- void dropEvent(QDropEvent* e);
+ void dropEvent(TQDropEvent* e);
- bool eventFilter(QObject*, QEvent*);
+ bool eventFilter(TQObject*, TQEvent*);
void updateKickerTip(KickerTip::Data &data);
private slots:
@@ -83,20 +83,20 @@ private slots:
private:
void loadBgPixmap();
- QRect mapGeometryToViewport(const KWin::WindowInfo&) const;
- QPoint mapPointToViewport(const QPoint&) const;
+ TQRect mapGeometryToViewport(const KWin::WindowInfo&) const;
+ TQPoint mapPointToViewport(const TQPoint&) const;
KMiniPager* m_pager;
int m_desktop;
bool m_useViewports;
- QString m_desktopName;
- QPoint m_viewport;
+ TQString m_desktopName;
+ TQPoint m_viewport;
- QTimer m_updateCompressor;
- QTimer m_dragSwitchTimer;
+ TQTimer m_updateCompressor;
+ TQTimer m_dragSwitchTimer;
Task::Ptr m_dragging;
- QLineEdit* m_lineEdit;
+ TQLineEdit* m_lineEdit;
KSharedPixmap *m_sharedPixmap;
KPixmap *m_bgPixmap;