diff options
Diffstat (limited to 'kicker/taskbar')
-rw-r--r-- | kicker/taskbar/taskbar.cpp | 68 | ||||
-rw-r--r-- | kicker/taskbar/taskbar.h | 8 | ||||
-rw-r--r-- | kicker/taskbar/taskbarcontainer.cpp | 30 | ||||
-rw-r--r-- | kicker/taskbar/taskbarcontainer.h | 4 | ||||
-rw-r--r-- | kicker/taskbar/taskcontainer.cpp | 36 | ||||
-rw-r--r-- | kicker/taskbar/taskcontainer.h | 8 |
6 files changed, 77 insertions, 77 deletions
diff --git a/kicker/taskbar/taskbar.cpp b/kicker/taskbar/taskbar.cpp index 808408fc9..b8bcdcb20 100644 --- a/kicker/taskbar/taskbar.cpp +++ b/kicker/taskbar/taskbar.cpp @@ -60,13 +60,13 @@ TaskBar::TaskBar( TQWidget *parent, const char *name ) m_showOnlyIconified(false), m_textShadowEngine(0), m_ignoreUpdates(false), - m_relayoutTimer(0, "TaskBar::m_relayoutTimer") + m_retqlayoutTimer(0, "TaskBar::m_retqlayoutTimer") { arrowType = LeftArrow; - blocklayout = true; + blocktqlayout = true; // init - setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); // setup animation frames for (int i = 1; i < 11; i++) @@ -77,7 +77,7 @@ TaskBar::TaskBar( TQWidget *parent, const char *name ) // configure configure(); - connect(&m_relayoutTimer, TQT_SIGNAL(timeout()), + connect(&m_retqlayoutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(reLayout())); connect(this, TQT_SIGNAL(contentsMoving(int, int)), TQT_SLOT(setBackground())); @@ -114,7 +114,7 @@ TaskBar::TaskBar( TQWidget *parent, const char *name ) add((*sIt)); } - blocklayout = false; + blocktqlayout = false; connect(kapp, TQT_SIGNAL(settingsChanged(int)), TQT_SLOT(slotSettingsChanged(int))); keys = new KGlobalAccel( this ); @@ -160,7 +160,7 @@ KTextShadowEngine *TaskBar::textShadowEngine() } -TQSize TaskBar::sizeHint() const +TQSize TaskBar::tqsizeHint() const { // get our minimum height based on the minimum button height or the // height of the font in use, which is largest @@ -171,7 +171,7 @@ TQSize TaskBar::sizeHint() const return TQSize(BUTTON_MIN_WIDTH, minButtonHeight); } -TQSize TaskBar::sizeHint( KPanelExtension::Position p, TQSize maxSize) const +TQSize TaskBar::tqsizeHint( KPanelExtension::Position p, TQSize maxSize) const { // get our minimum height based on the minimum button height or the // height of the font in use, which is largest @@ -246,7 +246,7 @@ void TaskBar::configure() TQApplication::desktop()->isVirtualDesktop() && TQApplication::desktop()->numScreens() > 1) || (TQApplication::desktop()->numScreens() < 2); - // we need to watch geometry issues if we aren't showing windows when we + // we need to watch tqgeometry issues if we aren't showing windows when we // are paying attention to the current Xinerama screen if (m_showOnlyCurrentScreen) { @@ -294,7 +294,7 @@ void TaskBar::resizeEvent( TQResizeEvent* e ) { if (m_showOnlyCurrentScreen) { - TQPoint topLeft = mapToGlobal(this->geometry().topLeft()); + TQPoint topLeft = mapToGlobal(this->tqgeometry().topLeft()); if (m_currentScreen != TQApplication::desktop()->screenNumber(topLeft)) { // we have been moved to another screen! @@ -358,7 +358,7 @@ void TaskBar::add(Startup::Ptr startup) it != containers.end(); ++it) { - if ((*it)->contains(startup)) + if ((*it)->tqcontains(startup)) { return; } @@ -432,7 +432,7 @@ void TaskBar::remove(Task::Ptr task, TaskContainer* container) it != m_hiddenContainers.end(); ++it) { - if ((*it)->contains(task)) + if ((*it)->tqcontains(task)) { (*it)->finish(); m_deletableContainers.append(*it); @@ -447,7 +447,7 @@ void TaskBar::remove(Task::Ptr task, TaskContainer* container) it != containers.end(); ++it) { - if ((*it)->contains(task)) + if ((*it)->tqcontains(task)) { container = *it; break; @@ -490,7 +490,7 @@ void TaskBar::remove(Startup::Ptr startup, TaskContainer* container) it != m_hiddenContainers.end(); ++it) { - if ((*it)->contains(startup)) + if ((*it)->tqcontains(startup)) { (*it)->remove(startup); @@ -511,7 +511,7 @@ void TaskBar::remove(Startup::Ptr startup, TaskContainer* container) it != containers.end(); ++it) { - if ((*it)->contains(startup)) + if ((*it)->tqcontains(startup)) { container = *it; break; @@ -551,7 +551,7 @@ void TaskBar::desktopChanged(int desktop) return; } - m_relayoutTimer.stop(); + m_retqlayoutTimer.stop(); m_ignoreUpdates = true; for (TaskContainer::Iterator it = containers.begin(); it != containers.end(); @@ -580,7 +580,7 @@ void TaskBar::windowChanged(Task::Ptr task) { TaskContainer* c = *it; - if (c->contains(task)) + if (c->tqcontains(task)) { container = c; break; @@ -620,7 +620,7 @@ void TaskBar::windowChangedGeometry(Task::Ptr task) ++it) { TaskContainer* c = *it; - if (c->contains(task)) + if (c->tqcontains(task)) { container = c; break; @@ -645,11 +645,11 @@ void TaskBar::windowChangedGeometry(Task::Ptr task) void TaskBar::reLayoutEventually() { - m_relayoutTimer.stop(); + m_retqlayoutTimer.stop(); - if (!blocklayout && !m_ignoreUpdates) + if (!blocktqlayout && !m_ignoreUpdates) { - m_relayoutTimer.start(25, true); + m_retqlayoutTimer.start(25, true); } } @@ -660,7 +660,7 @@ void TaskBar::reLayout() // popup menu is visible. // // To get around this, we collect the containers and delete them manually - // when doing a relayout. (kling) + // when doing a retqlayout. (kling) if (!m_deletableContainers.isEmpty()) { TaskContainer::List::iterator it = m_deletableContainers.begin(); for (; it != m_deletableContainers.end(); ++it) @@ -700,7 +700,7 @@ void TaskBar::reLayout() int minButtonHeight = fm.height() > TaskBarSettings::minimumButtonHeight() ? fm.height() : TaskBarSettings::minimumButtonHeight(); - // horizontal layout + // horizontal tqlayout if (orientation() == Horizontal) { int bwidth = BUTTON_MIN_WIDTH; @@ -743,10 +743,10 @@ void TaskBar::reLayout() } } - // layout containers + // tqlayout containers // for taskbars at the bottom, we need to ensure that the bottom - // buttons touch the bottom of the screen. since we layout from + // buttons touch the bottom of the screen. since we tqlayout from // top to bottom this means seeing if we have any padding and // popping it on the top. this preserves Fitt's Law behaviour // for taskbars on the bottom @@ -784,7 +784,7 @@ void TaskBar::reLayout() c->setBackground(); } } - else // vertical layout + else // vertical tqlayout { // adjust content size if (contentsRect().height() < (int)list.count() * minButtonHeight) @@ -792,7 +792,7 @@ void TaskBar::reLayout() resizeContents(contentsRect().width(), list.count() * minButtonHeight); } - // layout containers + // tqlayout containers int i = 0; for (TaskContainer::Iterator it = list.begin(); it != list.end(); @@ -818,12 +818,12 @@ void TaskBar::reLayout() void TaskBar::setViewportBackground() { - const TQPixmap *bg = parentWidget()->backgroundPixmap(); + const TQPixmap *bg = tqparentWidget()->backgroundPixmap(); if (bg) { - TQPixmap pm(parentWidget()->size()); - pm.fill(parentWidget(), pos() + viewport()->pos()); + TQPixmap pm(tqparentWidget()->size()); + pm.fill(tqparentWidget(), pos() + viewport()->pos()); viewport()->setPaletteBackgroundPixmap(pm); viewport()->setBackgroundOrigin(WidgetOrigin); } @@ -898,9 +898,9 @@ void TaskBar::propagateMouseEvent( TQMouseEvent* e ) { if ( !isTopLevel() ) { - TQMouseEvent me( e->type(), mapTo( topLevelWidget(), e->pos() ), + TQMouseEvent me( e->type(), mapTo( tqtopLevelWidget(), e->pos() ), e->globalPos(), e->button(), e->state() ); - TQApplication::sendEvent( topLevelWidget(), &me ); + TQApplication::sendEvent( tqtopLevelWidget(), &me ); } } @@ -988,7 +988,7 @@ bool TaskBar::shouldGroup() const void TaskBar::reGroup() { isGrouping = shouldGroup(); - blocklayout = true; + blocktqlayout = true; TaskContainer::Iterator lastContainer = m_hiddenContainers.end(); for (TaskContainer::Iterator it = m_hiddenContainers.begin(); @@ -1027,7 +1027,7 @@ void TaskBar::reGroup() add(*sIt); } - blocklayout = false; + blocktqlayout = false; reLayoutEventually(); } @@ -1163,7 +1163,7 @@ int TaskBar::showScreen() const if (m_showOnlyCurrentScreen && m_currentScreen == -1) { const_cast<TaskBar*>(this)->m_currentScreen = - TQApplication::desktop()->screenNumber(mapToGlobal(this->geometry().topLeft())); + TQApplication::desktop()->screenNumber(mapToGlobal(this->tqgeometry().topLeft())); } return m_currentScreen; diff --git a/kicker/taskbar/taskbar.h b/kicker/taskbar/taskbar.h index ff160bc92..0c45657cf 100644 --- a/kicker/taskbar/taskbar.h +++ b/kicker/taskbar/taskbar.h @@ -47,8 +47,8 @@ public: TaskBar( TQWidget *parent = 0, const char *name = 0 ); ~TaskBar(); - TQSize sizeHint() const; - TQSize sizeHint( KPanelExtension::Position, TQSize maxSize ) const; + TQSize tqsizeHint() const; + TQSize tqsizeHint( KPanelExtension::Position, TQSize maxSize ) const; void setOrientation( Orientation ); void setArrowType( Qt::ArrowType at ); @@ -108,7 +108,7 @@ private: void sortContainersByDesktop(TaskContainer::List& list); void setViewportBackground(); - bool blocklayout; + bool blocktqlayout; bool m_showAllWindows; // The screen to show, -1 for all screens int m_currentScreen; @@ -127,7 +127,7 @@ private: void reGroup(); KGlobalAccel* keys; KTextShadowEngine* m_textShadowEngine; - TQTimer m_relayoutTimer; + TQTimer m_retqlayoutTimer; bool m_ignoreUpdates; TQImage m_blendGradient; }; diff --git a/kicker/taskbar/taskbarcontainer.cpp b/kicker/taskbar/taskbarcontainer.cpp index 661706bdb..0101ae59d 100644 --- a/kicker/taskbar/taskbarcontainer.cpp +++ b/kicker/taskbar/taskbarcontainer.cpp @@ -63,20 +63,20 @@ TaskBarContainer::TaskBarContainer( bool enableFrame, TQWidget *parent, const ch margin = 0; } - layout = new TQBoxLayout( this, TQApplication::reverseLayout() ? + tqlayout = new TQBoxLayout( this, TQApplication::reverseLayout() ? TQBoxLayout::RightToLeft : TQBoxLayout::LeftToRight ); - layout->setMargin( margin ); + tqlayout->setMargin( margin ); // scrollable taskbar taskBar = new TaskBar(this); - layout->addWidget( taskBar ); + tqlayout->addWidget( taskBar ); connect( taskBar, TQT_SIGNAL( containerCountChanged() ), TQT_SIGNAL( containerCountChanged() ) ); setBackground(); - // read settings and setup layout + // read settings and setup tqlayout configure(); connectDCOPSignal("", "", "kdeTaskBarConfigChanged()", @@ -110,7 +110,7 @@ void TaskBarContainer::configure() connect(windowListMenu, TQT_SIGNAL(aboutToHide()), TQT_SLOT(windowListMenuAboutToHide())); - // geometry + // tqgeometry TQString icon; switch (direction) { @@ -135,8 +135,8 @@ void TaskBarContainer::configure() windowListButton->setPixmap(kapp->iconLoader()->loadIcon(icon, KIcon::Panel, 16)); - windowListButton->setMinimumSize(windowListButton->sizeHint()); - layout->insertWidget(0, windowListButton); + windowListButton->setMinimumSize(windowListButton->tqsizeHint()); + tqlayout->insertWidget(0, windowListButton); windowListButton->show(); } } @@ -175,7 +175,7 @@ void TaskBarContainer::orientationChange(Orientation o) windowListButton->setFixedWidth(WINDOWLISTBUTTON_SIZE); windowListButton->setMaximumHeight(BUTTON_MAX_WIDTH); } - layout->setDirection(TQApplication::reverseLayout() ? + tqlayout->setDirection(TQApplication::reverseLayout() ? TQBoxLayout::RightToLeft : TQBoxLayout::LeftToRight); } @@ -186,7 +186,7 @@ void TaskBarContainer::orientationChange(Orientation o) windowListButton->setMaximumWidth(BUTTON_MAX_WIDTH); windowListButton->setFixedHeight(WINDOWLISTBUTTON_SIZE); } - layout->setDirection(TQBoxLayout::TopToBottom); + tqlayout->setDirection(TQBoxLayout::TopToBottom); } taskBar->setOrientation(o); @@ -194,7 +194,7 @@ void TaskBarContainer::orientationChange(Orientation o) { windowListButton->setOrientation(o); } - layout->activate(); + tqlayout->activate(); } void TaskBarContainer::popupDirectionChange(KPanelApplet::Direction d) @@ -230,7 +230,7 @@ void TaskBarContainer::popupDirectionChange(KPanelApplet::Direction d) windowListButton->setPixmap(kapp->iconLoader()->loadIcon(icon, KIcon::Panel, 16)); - windowListButton->setMinimumSize(windowListButton->sizeHint()); + windowListButton->setMinimumSize(windowListButton->tqsizeHint()); } } @@ -249,13 +249,13 @@ void TaskBarContainer::showWindowListMenu() pos.setX( pos.x() + width() ); break; case KPanelApplet::Left: - pos.setX( pos.x() - windowListMenu->sizeHint().width() ); + pos.setX( pos.x() - windowListMenu->tqsizeHint().width() ); break; case KPanelApplet::Down: pos.setY( pos.y() + height() ); break; case KPanelApplet::Up: - pos.setY( pos.y() - windowListMenu->sizeHint().height() ); + pos.setY( pos.y() - windowListMenu->tqsizeHint().height() ); default: break; } @@ -277,9 +277,9 @@ void TaskBarContainer::reconnectWindowListButton() connect( windowListButton, TQT_SIGNAL( pressed() ), TQT_SLOT( showWindowListMenu() ) ); } -TQSize TaskBarContainer::sizeHint( KPanelExtension::Position p, TQSize maxSize) const +TQSize TaskBarContainer::tqsizeHint( KPanelExtension::Position p, TQSize maxSize) const { - TQSize size = taskBar->sizeHint( p, maxSize ); + TQSize size = taskBar->tqsizeHint( p, maxSize ); if ( (p == KPanelExtension::Left || p == KPanelExtension::Right) && showWindowListButton ) { return TQSize( size.width(), size.height() + WINDOWLISTBUTTON_SIZE ); } diff --git a/kicker/taskbar/taskbarcontainer.h b/kicker/taskbar/taskbarcontainer.h index 87a55c2b9..61147494a 100644 --- a/kicker/taskbar/taskbarcontainer.h +++ b/kicker/taskbar/taskbarcontainer.h @@ -48,7 +48,7 @@ public: void popupDirectionChange( KPanelApplet::Direction ); void preferences(); //FIXME: don't use Position, use Orientation - TQSize sizeHint( KPanelExtension::Position, TQSize maxSize ) const; + TQSize tqsizeHint( KPanelExtension::Position, TQSize maxSize ) const; void setBackground(); k_dcop: @@ -66,7 +66,7 @@ protected slots: private: KPanelApplet::Direction direction; bool showWindowListButton; - TQBoxLayout * layout; + TQBoxLayout * tqlayout; TaskBar * taskBar; SimpleButton * windowListButton; KWindowListMenu * windowListMenu; diff --git a/kicker/taskbar/taskcontainer.cpp b/kicker/taskbar/taskcontainer.cpp index 1e4829a38..556e46d17 100644 --- a/kicker/taskbar/taskcontainer.cpp +++ b/kicker/taskbar/taskcontainer.cpp @@ -157,9 +157,9 @@ void TaskContainer::stopTimers() attentionTimer.stop(); } -void TaskContainer::taskChanged(bool geometryOnlyChange) +void TaskContainer::taskChanged(bool tqgeometryOnlyChange) { - if (geometryOnlyChange) + if (tqgeometryOnlyChange) { // we really don't care about those changes, which we may be getting // thanks to the pager, for instance, turning it on in taskmanager. @@ -315,7 +315,7 @@ void TaskContainer::resizeEvent( TQResizeEvent * ) { // calculate the icon rect TQRect br( style().subRect( TQStyle::SR_PushButtonContents, this ) ); - iconRect = TQStyle::visualRect( TQRect(br.x() + 2, (height() - 16) / 2, 16, 16), this ); + iconRect = TQStyle::tqvisualRect( TQRect(br.x() + 2, (height() - 16) / 2, 16, 16), this ); } void TaskContainer::add(Task::Ptr task) @@ -390,7 +390,7 @@ void TaskContainer::remove(Startup::Ptr startup) } } -bool TaskContainer::contains(Task::Ptr task) +bool TaskContainer::tqcontains(Task::Ptr task) { if (!task) { @@ -408,12 +408,12 @@ bool TaskContainer::contains(Task::Ptr task) return false; } -bool TaskContainer::contains(Startup::Ptr startup) +bool TaskContainer::tqcontains(Startup::Ptr startup) { return startup && (m_startup == startup); } -bool TaskContainer::contains(WId win) +bool TaskContainer::tqcontains(WId win) { Task::List::iterator itEnd = tasks.end(); for (Task::List::iterator it = tasks.begin(); it != itEnd; ++it) @@ -580,8 +580,8 @@ void TaskContainer::drawButton(TQPainter *p) bool sunken = isDown() || (alwaysDrawButtons && (active || aboutToActivate)); bool reverse = TQApplication::reverseLayout(); TQRect br(style().subRect(TQStyle::SR_PushButtonContents, this)); - TQPoint shift = TQPoint(style().pixelMetric(TQStyle::PM_ButtonShiftHorizontal), - style().pixelMetric(TQStyle::PM_ButtonShiftVertical)); + TQPoint shift = TQPoint(style().tqpixelMetric(TQStyle::PM_ButtonShiftHorizontal), + style().tqpixelMetric(TQStyle::PM_ButtonShiftVertical)); // draw button background if (drawButton) @@ -643,7 +643,7 @@ void TaskContainer::drawButton(TQPainter *p) // draw modified overlay if (!modPixmap.isNull()) { - TQRect r = TQStyle::visualRect(TQRect(br.x() + textPos, + TQRect r = TQStyle::tqvisualRect(TQRect(br.x() + textPos, (height() - 16) / 2, 16, 16), this); @@ -660,7 +660,7 @@ void TaskContainer::drawButton(TQPainter *p) // draw text if (!text.isEmpty()) { - TQRect tr = TQStyle::visualRect(TQRect(br.x() + textPos + 1, 0, + TQRect tr = TQStyle::tqvisualRect(TQRect(br.x() + textPos + 1, 0, width() - textPos, height()), this); int textFlags = AlignVCenter | SingleLine; @@ -772,7 +772,7 @@ void TaskContainer::drawButton(TQPainter *p) } int flags = TQStyle::Style_Enabled; - TQRect ar = TQStyle::visualRect(TQRect(br.x() + br.width() - 8 - 2, + TQRect ar = TQStyle::tqvisualRect(TQRect(br.x() + br.width() - 8 - 2, br.y(), 8, br.height()), this); if (sunken) { @@ -784,7 +784,7 @@ void TaskContainer::drawButton(TQPainter *p) // draw mouse over frame in transparent mode if (m_mouseOver && halo) - KickerLib::drawBlendedRect(p, TQRect(0, 0, width(), height()), colorGroup().foreground()); + KickerLib::drawBlendedRect(p, TQRect(0, 0, width(), height()), tqcolorGroup().foreground()); if (aboutToActivate) { @@ -932,7 +932,7 @@ void TaskContainer::mouseReleaseEvent(TQMouseEvent *e) // This is to avoid the flicker caused by redrawing the // button as unpressed just before it's activated. - if (!rect().contains(e->pos())) + if (!rect().tqcontains(e->pos())) { TQToolButton::mouseReleaseEvent(e); return; @@ -1146,17 +1146,17 @@ void TaskContainer::popupMenu(int action) pos.setX(pos.x() + width()); break; case LeftArrow: - pos.setX(pos.x() - m_menu->sizeHint().width()); + pos.setX(pos.x() - m_menu->tqsizeHint().width()); break; case DownArrow: if ( TQApplication::reverseLayout() ) - pos.setX( pos.x() + width() - m_menu->sizeHint().width() ); + pos.setX( pos.x() + width() - m_menu->tqsizeHint().width() ); pos.setY( pos.y() + height() ); break; case UpArrow: if ( TQApplication::reverseLayout() ) - pos.setX( pos.x() + width() - m_menu->sizeHint().width() ); - pos.setY(pos.y() - m_menu->sizeHint().height()); + pos.setX( pos.x() + width() - m_menu->tqsizeHint().width() ); + pos.setY(pos.y() - m_menu->tqsizeHint().height()); break; default: break; @@ -1287,7 +1287,7 @@ void TaskContainer::setArrowType( Qt::ArrowType at ) void TaskContainer::publishIconGeometry( TQPoint global ) { - TQPoint p = global + geometry().topLeft(); + TQPoint p = global + tqgeometry().topLeft(); Task::List::const_iterator itEnd = tasks.constEnd(); for (Task::List::const_iterator it = tasks.constBegin(); it != itEnd; ++it) diff --git a/kicker/taskbar/taskcontainer.h b/kicker/taskbar/taskcontainer.h index 567a74a79..8f6dee032 100644 --- a/kicker/taskbar/taskcontainer.h +++ b/kicker/taskbar/taskcontainer.h @@ -57,9 +57,9 @@ public: void remove(Task::Ptr); void remove(Startup::Ptr); - bool contains(Task::Ptr); - bool contains(Startup::Ptr); - bool contains(WId); + bool tqcontains(Task::Ptr); + bool tqcontains(Startup::Ptr); + bool tqcontains(WId); bool isEmpty(); bool onCurrentDesktop(); @@ -120,7 +120,7 @@ protected slots: void dragSwitch(); void iconChanged(); void setLastActivated(); - void taskChanged(bool geometryChangeOnly); + void taskChanged(bool tqgeometryChangeOnly); void showMe(); private: |