diff options
Diffstat (limited to 'kicker/libkicker')
-rw-r--r-- | kicker/libkicker/global.cpp | 24 | ||||
-rw-r--r-- | kicker/libkicker/global.h | 2 | ||||
-rw-r--r-- | kicker/libkicker/kickerSettings.kcfg | 2 | ||||
-rw-r--r-- | kicker/libkicker/kickerSettings.kcfgc | 2 | ||||
-rw-r--r-- | kicker/libkicker/kickertip.cpp | 22 | ||||
-rw-r--r-- | kicker/libkicker/kickertip.h | 2 | ||||
-rw-r--r-- | kicker/libkicker/kshadowengine.cpp | 22 | ||||
-rw-r--r-- | kicker/libkicker/kshadowengine.h | 4 | ||||
-rw-r--r-- | kicker/libkicker/menuinfo.cpp | 4 | ||||
-rw-r--r-- | kicker/libkicker/panelbutton.cpp | 52 | ||||
-rw-r--r-- | kicker/libkicker/panelbutton.h | 4 | ||||
-rw-r--r-- | kicker/libkicker/paneldrag.cpp | 10 | ||||
-rw-r--r-- | kicker/libkicker/paneldrag.h | 8 | ||||
-rw-r--r-- | kicker/libkicker/panner.cpp | 20 | ||||
-rw-r--r-- | kicker/libkicker/panner.h | 10 | ||||
-rw-r--r-- | kicker/libkicker/simplebutton.cpp | 18 | ||||
-rw-r--r-- | kicker/libkicker/simplebutton.h | 8 |
17 files changed, 107 insertions, 107 deletions
diff --git a/kicker/libkicker/global.cpp b/kicker/libkicker/global.cpp index 1e9025e5a..9d1305da3 100644 --- a/kicker/libkicker/global.cpp +++ b/kicker/libkicker/global.cpp @@ -110,7 +110,7 @@ KPanelApplet::Direction positionToDirection(KPanelExtension::Position p) } } -KPanelApplet::Direction arrowToDirection(Qt::ArrowType p) +KPanelApplet::Direction arrowToDirection(TQt::ArrowType p) { switch (p) { @@ -161,7 +161,7 @@ int maxButtonDim() int maxDim; //return (2 * KickerSettings::iconMargin()) + KIcon::SizeLarge; - KSimpleConfig *kickerconfig = new KSimpleConfig( TQString::fromLatin1( "kickerrc" )); + KSimpleConfig *kickerconfig = new KSimpleConfig( TQString::tqfromLatin1( "kickerrc" )); kickerconfig->setGroup("General"); maxDim = (2 * KickerSettings::iconMargin()) + kickerconfig->readNumEntry("panelIconWidth", KIcon::SizeLarge);; delete kickerconfig; @@ -207,7 +207,7 @@ TQPopupMenu* reduceMenu(TQPopupMenu *menu) return menu; } - TQMenuItem *item = menu->findItem(menu->idAt(0)); + TQMenuItem *item = menu->tqfindItem(menu->idAt(0)); if (item->popup()) { @@ -236,13 +236,13 @@ TQPoint popupPosition(KPanelApplet::Direction d, { case KPanelApplet::Left: case KPanelApplet::Right: - r.setLeft( source->topLevelWidget()->x() ); - r.setWidth( source->topLevelWidget()->width() ); + r.setLeft( source->tqtopLevelWidget()->x() ); + r.setWidth( source->tqtopLevelWidget()->width() ); break; case KPanelApplet::Up: case KPanelApplet::Down: - r.setTop( source->topLevelWidget()->y() ); - r.setHeight( source->topLevelWidget()->height() ); + r.setTop( source->tqtopLevelWidget()->y() ); + r.setHeight( source->tqtopLevelWidget()->height() ); break; } } @@ -328,7 +328,7 @@ void colorize(TQImage& image) { KConfig *config = KGlobal::config(); config->setGroup("WM"); - TQColor color = TQApplication::palette().active().highlight(); + TQColor color = TQApplication::tqpalette().active().highlight(); TQColor activeTitle = config->readColorEntry("activeBackground", &color); TQColor inactiveTitle = config->readColorEntry("inactiveBackground", &color); @@ -336,7 +336,7 @@ void colorize(TQImage& image) int h1, s1, v1, h2, s2, v2, h3, s3, v3; activeTitle.hsv(&h1, &s1, &v1); inactiveTitle.hsv(&h2, &s2, &v2); - TQApplication::palette().active().background().hsv(&h3, &s3, &v3); + TQApplication::tqpalette().active().background().hsv(&h3, &s3, &v3); if ( (kAbs(h1-h3)+kAbs(s1-s3)+kAbs(v1-v3) < kAbs(h2-h3)+kAbs(s2-s3)+kAbs(v2-v3)) && ((kAbs(h1-h3)+kAbs(s1-s3)+kAbs(v1-v3) < 32) || (s1 < 32)) && (s2 > s1)) @@ -347,7 +347,7 @@ void colorize(TQImage& image) // limit max/min brightness int r, g, b; color.rgb(&r, &g, &b); - int gray = qGray(r, g, b); + int gray = tqGray(r, g, b); if (gray > 180) { r = (r - (gray - 180) < 0 ? 0 : r - (gray - 180)); g = (g - (gray - 180) < 0 ? 0 : g - (gray - 180)); @@ -437,12 +437,12 @@ TQIconSet menuIconSet(const TQString& icon) // make sure they are not larger than 20x20 if (normal.width() > 20 || normal.height() > 20) { - normal.convertFromImage(normal.convertToImage().smoothScale(20,20)); + normal.convertFromImage(TQImage(normal.convertToImage()).smoothScale(20,20)); } if (active.width() > 20 || active.height() > 20) { - active.convertFromImage(active.convertToImage().smoothScale(20,20)); + active.convertFromImage(TQImage(active.convertToImage()).smoothScale(20,20)); } iconset.setPixmap(normal, TQIconSet::Small, TQIconSet::Normal); diff --git a/kicker/libkicker/global.h b/kicker/libkicker/global.h index 0a4677914..663987174 100644 --- a/kicker/libkicker/global.h +++ b/kicker/libkicker/global.h @@ -40,7 +40,7 @@ namespace KickerLib KDE_EXPORT KPanelExtension::Position directionToPosition(KPanelApplet::Direction d); KDE_EXPORT KPanelExtension::Position directionToPopupPosition(KPanelApplet::Direction d); KDE_EXPORT KPanelApplet::Direction positionToDirection(KPanelExtension::Position p); -KDE_EXPORT KPanelApplet::Direction arrowToDirection(Qt::ArrowType p); +KDE_EXPORT KPanelApplet::Direction arrowToDirection(TQt::ArrowType p); KDE_EXPORT int sizeValue(KPanelExtension::Size s); /** diff --git a/kicker/libkicker/kickerSettings.kcfg b/kicker/libkicker/kickerSettings.kcfg index 0f725c35f..75de298a3 100644 --- a/kicker/libkicker/kickerSettings.kcfg +++ b/kicker/libkicker/kickerSettings.kcfg @@ -64,7 +64,7 @@ <entry name="TintColor" type="Color" > <label>The tint color used to colorize transparent panels</label> - <default code="true">(QApplication::palette().active().mid())</default> + <default code="true">(TQApplication::tqpalette().active().mid())</default> <whatsthis>This option sets the color to use when tinting transparent panels</whatsthis> </entry> diff --git a/kicker/libkicker/kickerSettings.kcfgc b/kicker/libkicker/kickerSettings.kcfgc index 59c271928..8e0b42d93 100644 --- a/kicker/libkicker/kickerSettings.kcfgc +++ b/kicker/libkicker/kickerSettings.kcfgc @@ -3,6 +3,6 @@ Singleton=true ClassName=KickerSettings Mutators=true Visibility=KDE_EXPORT -IncludeFiles=qapplication.h +IncludeFiles=tqapplication.h GlobalEnums=true MemberVariables=dpointer diff --git a/kicker/libkicker/kickertip.cpp b/kicker/libkicker/kickertip.cpp index 586360904..69e0897f8 100644 --- a/kicker/libkicker/kickertip.cpp +++ b/kicker/libkicker/kickertip.cpp @@ -76,7 +76,7 @@ KickerTip::KickerTip(TQWidget * parent) m_timer(0, "KickerTip::m_timer"), m_frameTimer(0, "KickerTip::m_frameTimer") { - setFocusPolicy(NoFocus); + setFocusPolicy(TQ_NoFocus); setBackgroundMode(NoBackground); resize(0, 0); hide(); @@ -146,7 +146,7 @@ void KickerTip::display() delete m_richText; m_richText = new TQSimpleRichText("<qt><h3>" + data.message + "</h3><p>" + - data.subtext + "</p></qt>", font(), TQString::null, 0, + data.subtext + "</p></qt>", font(), TQString(), 0, m_mimeFactory); m_richText->setWidth(640); m_direction = data.direction; @@ -308,7 +308,7 @@ void KickerTip::dissolveMask() if (m_dissolveSize > 0) { - maskPainter.setRasterOp(Qt::EraseROP); + maskPainter.setRasterOp(TQt::EraseROP); int x, y, s; const int size = 16; @@ -392,8 +392,8 @@ void KickerTip::displayInternal() // draw background TQPainter bufferPainter(&m_pixmap); - bufferPainter.setPen(colorGroup().foreground()); - bufferPainter.setBrush(colorGroup().background()); + bufferPainter.setPen(tqcolorGroup().foreground()); + bufferPainter.setBrush(tqcolorGroup().background()); //bufferPainter.drawRoundRect(0, 0, width, height, 1600 / width, 1600 / height); drawRoundRect(bufferPainter, TQRect(0, 0, width, height)); @@ -409,13 +409,13 @@ void KickerTip::displayInternal() if (KickerSettings::mouseOversShowText()) { // draw text shadow - TQColorGroup cg = colorGroup(); + TQColorGroup cg = tqcolorGroup(); cg.setColor(TQColorGroup::Text, cg.background().dark(115)); int shadowOffset = TQApplication::reverseLayout() ? -1 : 1; m_richText->draw(&bufferPainter, textX + shadowOffset, textY + 1, TQRect(), cg); // draw text - cg = colorGroup(); + cg = tqcolorGroup(); m_richText->draw(&bufferPainter, textX, textY, rect(), cg); } } @@ -452,13 +452,13 @@ void KickerTip::tipperDestroyed(TQObject* o) { // we can't do a dynamic cast because we are in the process of dieing // so static it is. - untipFor(static_cast<TQWidget*>(o)); + untipFor(TQT_TQWIDGET(o)); } void KickerTip::internalUpdate() { m_dirty = true; - repaint(false); + tqrepaint(false); } void KickerTip::enableTipping(bool tip) @@ -508,7 +508,7 @@ bool KickerTip::eventFilter(TQObject *object, TQEvent *event) return false; } - TQWidget *widget = static_cast<TQWidget*>(object); + TQWidget *widget = TQT_TQWIDGET(object); switch (event->type()) { @@ -519,7 +519,7 @@ bool KickerTip::eventFilter(TQObject *object, TQEvent *event) } if (!mouseGrabber() && - !qApp->activePopupWidget() && + !tqApp->activePopupWidget() && !isTippingFor(widget)) { TQToolTip::setGloballyEnabled(false); diff --git a/kicker/libkicker/kickertip.h b/kicker/libkicker/kickertip.h index 14118029b..b7332967f 100644 --- a/kicker/libkicker/kickertip.h +++ b/kicker/libkicker/kickertip.h @@ -38,7 +38,7 @@ class TQPaintEvent; class TQSimpleRichText; class TQTimer; -class KDE_EXPORT KickerTip : public QWidget +class KDE_EXPORT KickerTip : public TQWidget { Q_OBJECT diff --git a/kicker/libkicker/kshadowengine.cpp b/kicker/libkicker/kshadowengine.cpp index 19ccc669d..a933026d5 100644 --- a/kicker/libkicker/kshadowengine.cpp +++ b/kicker/libkicker/kshadowengine.cpp @@ -78,7 +78,7 @@ TQImage KShadowEngine::makeShadow(const TQPixmap& textPixmap, const TQColor &bgC /* * This is the source pixmap */ - TQImage img = textPixmap.convertToImage().convertDepth(32); + TQImage img = TQImage(textPixmap.convertToImage()).convertDepth(32); /* * Resize the image if necessary @@ -114,7 +114,7 @@ TQImage KShadowEngine::makeShadow(const TQPixmap& textPixmap, const TQColor &bgC alphaShadow = (alphaShadow > m_shadowSettings->maxOpacity()) ? m_shadowSettings->maxOpacity() : alphaShadow; // update the shadow's i,j pixel. - result.setPixel(i,j, qRgba(bgRed, bgGreen , bgBlue, (int) alphaShadow)); + result.setPixel(i,j, tqRgba(bgRed, bgGreen , bgBlue, (int) alphaShadow)); } } return result; @@ -131,15 +131,15 @@ double KShadowEngine::defaultDecay(TQImage& source, int i, int j) return 0; double alphaShadow; - alphaShadow =(qGray(source.pixel(i-1,j-1)) * DIAGONAL_FACTOR + - qGray(source.pixel(i-1,j )) * AXIS_FACTOR + - qGray(source.pixel(i-1,j+1)) * DIAGONAL_FACTOR + - qGray(source.pixel(i ,j-1)) * AXIS_FACTOR + + alphaShadow =(tqGray(source.pixel(i-1,j-1)) * DIAGONAL_FACTOR + + tqGray(source.pixel(i-1,j )) * AXIS_FACTOR + + tqGray(source.pixel(i-1,j+1)) * DIAGONAL_FACTOR + + tqGray(source.pixel(i ,j-1)) * AXIS_FACTOR + 0 + - qGray(source.pixel(i ,j+1)) * AXIS_FACTOR + - qGray(source.pixel(i+1,j-1)) * DIAGONAL_FACTOR + - qGray(source.pixel(i+1,j )) * AXIS_FACTOR + - qGray(source.pixel(i+1,j+1)) * DIAGONAL_FACTOR) / m_shadowSettings->multiplicationFactor(); + tqGray(source.pixel(i ,j+1)) * AXIS_FACTOR + + tqGray(source.pixel(i+1,j-1)) * DIAGONAL_FACTOR + + tqGray(source.pixel(i+1,j )) * AXIS_FACTOR + + tqGray(source.pixel(i+1,j+1)) * DIAGONAL_FACTOR) / m_shadowSettings->multiplicationFactor(); return alphaShadow; } @@ -189,7 +189,7 @@ double KShadowEngine::noDecay(TQImage& source, int i, int j) else sy = j + m; - opacity += qGray(source.pixel(sx, sy)); + opacity += tqGray(source.pixel(sx, sy)); } } alphaShadow += opacity / m_shadowSettings->multiplicationFactor(); diff --git a/kicker/libkicker/kshadowengine.h b/kicker/libkicker/kshadowengine.h index 041e8faf6..0c44e1816 100644 --- a/kicker/libkicker/kshadowengine.h +++ b/kicker/libkicker/kshadowengine.h @@ -94,13 +94,13 @@ private: /* * a slower algorithm where the influence of a pixel - * is qGray(px)/(abs(dx) + abs(dy) +1). + * is tqGray(px)/(abs(dx) + abs(dy) +1). */ double doubleLinearDecay(TQImage& source, int x, int y); /* * a very slow algorithm where the influence of a pixel - * is qGray(px)/(sqrt(sqr(dx) + sqr(dy)) +1). + * is tqGray(px)/(sqrt(sqr(dx) + sqr(dy)) +1). */ double radialDecay(TQImage& source, int x, int y); diff --git a/kicker/libkicker/menuinfo.cpp b/kicker/libkicker/menuinfo.cpp index 0c36ffea0..8d2e6acdb 100644 --- a/kicker/libkicker/menuinfo.cpp +++ b/kicker/libkicker/menuinfo.cpp @@ -35,7 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. MenuInfo::MenuInfo(const TQString& desktopFile) { - KSimpleConfig df(locate("data", TQString::fromLatin1("kicker/menuext/%1").arg(desktopFile))); + KSimpleConfig df(locate("data", TQString::tqfromLatin1("kicker/menuext/%1").arg(desktopFile))); df.setGroup("Desktop Entry"); TQStringList list = df.readListEntry("X-KDE-AuthorizeAction"); @@ -64,5 +64,5 @@ KPanelMenu* MenuInfo::load(TQWidget *parent, const char *name) return KParts::ComponentFactory::createInstanceFromLibrary<KPanelMenu>( TQFile::encodeName( library_ ), - parent, name ); + TQT_TQOBJECT(parent), name ); } diff --git a/kicker/libkicker/panelbutton.cpp b/kicker/libkicker/panelbutton.cpp index a04e9aee0..0edae6987 100644 --- a/kicker/libkicker/panelbutton.cpp +++ b/kicker/libkicker/panelbutton.cpp @@ -69,7 +69,7 @@ PanelButton::PanelButton( TQWidget* parent, const char* name ) m_arrowDirection(KPanelExtension::Bottom), m_popupDirection(KPanelApplet::Up), m_iconAlignment(AlignCenter), - m_orientation(Horizontal), + m_orientation(Qt::Horizontal), m_size((KIcon::StdSizes)-1), m_fontPercent(0.40) { @@ -190,7 +190,7 @@ void PanelButton::setPopupDirection(KPanelApplet::Direction d) setArrowDirection(KickerLib::directionToPopupPosition(d)); } -void PanelButton::setIconAlignment(AlignmentFlags align) +void PanelButton::setIconAlignment(TQ_Alignment align) { m_iconAlignment = align; update(); @@ -296,7 +296,7 @@ int PanelButton::widthForHeight(int height) const // we only paint the text when horizontal, so make sure we're horizontal // before adding the text in here - if (orientation() == Horizontal && !m_buttonText.isEmpty()) + if (orientation() == Qt::Horizontal && !m_buttonText.isEmpty()) { TQFont f(font()); //f.setPixelSize(KMIN(height, KMAX(int(float(height) * m_fontPercent), 16))); @@ -427,7 +427,7 @@ void PanelButton::enterEvent(TQEvent* e) if (!m_highlight) { m_highlight = true; - repaint(false); + tqrepaint(false); } TQButton::enterEvent(e); @@ -438,7 +438,7 @@ void PanelButton::leaveEvent(TQEvent* e) if (m_highlight) { m_highlight = false; - repaint(false); + tqrepaint(false); } TQButton::leaveEvent(e); @@ -471,7 +471,7 @@ void PanelButton::dropEvent(TQDropEvent* e) void PanelButton::mouseMoveEvent(TQMouseEvent *e) { - if (!m_isLeftMouseButtonDown || (e->state() & LeftButton) == 0) + if (!m_isLeftMouseButtonDown || (e->state() & Qt::LeftButton) == 0) { return; } @@ -489,7 +489,7 @@ void PanelButton::mouseMoveEvent(TQMouseEvent *e) void PanelButton::mousePressEvent(TQMouseEvent *e) { - if (e->button() == LeftButton) + if (e->button() == Qt::LeftButton) { m_lastLeftMouseButtonPress = e->pos(); m_isLeftMouseButtonDown = true; @@ -499,7 +499,7 @@ void PanelButton::mousePressEvent(TQMouseEvent *e) void PanelButton::mouseReleaseEvent(TQMouseEvent *e) { - if (e->button() == LeftButton) + if (e->button() == Qt::LeftButton) { m_isLeftMouseButtonDown = false; @@ -528,7 +528,7 @@ void PanelButton::drawButton(TQPainter *p) if (m_tileColor.isValid()) { p->fillRect(rect(), m_tileColor); - style().drawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup()); + tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, p, rect(), tqcolorGroup()); } else if (paletteBackgroundPixmap()) { @@ -547,8 +547,8 @@ void PanelButton::drawButton(TQPainter *p) } else if (isDown() || isOn()) { - // Draw shapes to indicate the down state. - style().drawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup(), TQStyle::Style_Sunken); + // Draw tqshapes to indicate the down state. + tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, p, rect(), tqcolorGroup(), TQStyle::Style_Sunken); } drawButtonLabel(p); @@ -556,10 +556,10 @@ void PanelButton::drawButton(TQPainter *p) if (hasFocus() || m_hasAcceptedDrag) { int x1, y1, x2, y2; - rect().coords(&x1, &y1, &x2, &y2); + TQT_TQRECT_OBJECT(rect()).coords(&x1, &y1, &x2, &y2); TQRect r(x1+2, y1+2, x2-x1-3, y2-y1-3); - style().drawPrimitive(TQStyle::PE_FocusRect, p, r, colorGroup(), - TQStyle::Style_Default, colorGroup().button()); + tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, p, r, tqcolorGroup(), + TQStyle::Style_Default, tqcolorGroup().button()); } } @@ -570,7 +570,7 @@ void PanelButton::drawButtonLabel(TQPainter *p) if (active) { - icon = icon.convertToImage().smoothScale(icon.width() - 2, + icon = TQImage(icon.convertToImage()).smoothScale(icon.width() - 2, icon.height() - 2); } @@ -580,7 +580,7 @@ void PanelButton::drawButtonLabel(TQPainter *p) else if (m_iconAlignment & AlignBottom) y = (height() - icon.height()); - if (!m_buttonText.isEmpty() && orientation() == Horizontal) + if (!m_buttonText.isEmpty() && orientation() == Qt::Horizontal) { int h = height(); int w = width(); @@ -663,7 +663,7 @@ void PanelButton::drawButtonLabel(TQPainter *p) if (m_drawArrow && (m_highlight || active)) { TQStyle::PrimitiveElement e = TQStyle::PE_ArrowUp; - int arrowSize = style().pixelMetric(TQStyle::PM_MenuButtonIndicator); + int arrowSize = tqstyle().tqpixelMetric(TQStyle::PM_MenuButtonIndicator); TQRect r((width() - arrowSize)/2, 0, arrowSize, arrowSize); switch (m_arrowDirection) @@ -684,7 +684,7 @@ void PanelButton::drawButtonLabel(TQPainter *p) r = TQRect(0, (height() - arrowSize)/2, arrowSize, arrowSize); break; case KPanelExtension::Floating: - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { e = TQStyle::PE_ArrowDown; r.moveBy(0, height() - arrowSize); @@ -707,7 +707,7 @@ void PanelButton::drawButtonLabel(TQPainter *p) { flags |= TQStyle::Style_Down; } - style().drawPrimitive(e, p, r, colorGroup(), flags); + tqstyle().tqdrawPrimitive(e, p, r, tqcolorGroup(), flags); } } @@ -730,7 +730,7 @@ int PanelButton::preferredIconSize(int proposed_size) const if (proposed_size < 0) { - proposed_size = (orientation() == Horizontal) ? height() : width(); + proposed_size = (orientation() == Qt::Horizontal) ? height() : width(); } // determine the upper limit on the size. Normally, this is panelSize, @@ -922,8 +922,8 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e) { if (e->type() == TQEvent::MouseMove) { - TQMouseEvent *me = static_cast<TQMouseEvent *>(e); - if (rect().contains(mapFromGlobal(me->globalPos())) && + TQMouseEvent *me = TQT_TQMOUSEEVENT(e); + if (TQT_TQRECT_OBJECT(rect()).tqcontains(mapFromGlobal(me->globalPos())) && ((me->state() & ControlButton) != 0 || (me->state() & ShiftButton) != 0)) { @@ -934,8 +934,8 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e) else if (e->type() == TQEvent::MouseButtonPress || e->type() == TQEvent::MouseButtonDblClick) { - TQMouseEvent *me = static_cast<TQMouseEvent *>(e); - if (rect().contains(mapFromGlobal(me->globalPos()))) + TQMouseEvent *me = TQT_TQMOUSEEVENT(e); + if (TQT_TQRECT_OBJECT(rect()).tqcontains(mapFromGlobal(me->globalPos()))) { m_pressedDuringPopup = true; return true; @@ -943,8 +943,8 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e) } else if (e->type() == TQEvent::MouseButtonRelease) { - TQMouseEvent *me = static_cast<TQMouseEvent *>(e); - if (rect().contains(mapFromGlobal(me->globalPos()))) + TQMouseEvent *me = TQT_TQMOUSEEVENT(e); + if (TQT_TQRECT_OBJECT(rect()).tqcontains(mapFromGlobal(me->globalPos()))) { if (m_pressedDuringPopup && m_popup) { diff --git a/kicker/libkicker/panelbutton.h b/kicker/libkicker/panelbutton.h index 770d0e1be..ff0f5f2a8 100644 --- a/kicker/libkicker/panelbutton.h +++ b/kicker/libkicker/panelbutton.h @@ -258,7 +258,7 @@ public slots: protected: - void setIconAlignment(AlignmentFlags align); + void setIconAlignment(TQ_Alignment align); /** * Subclasses must implement this to define the name of the button which is * used to identify this button for saving and loading. It must be unique @@ -393,7 +393,7 @@ private: TQPixmap m_iconz; // mouse over KPanelExtension::Position m_arrowDirection; KPanelApplet::Direction m_popupDirection; - AlignmentFlags m_iconAlignment; + TQ_Alignment m_iconAlignment; Orientation m_orientation; int m_size; double m_fontPercent; diff --git a/kicker/libkicker/paneldrag.cpp b/kicker/libkicker/paneldrag.cpp index 1fb6b9ce6..28721d3f7 100644 --- a/kicker/libkicker/paneldrag.cpp +++ b/kicker/libkicker/paneldrag.cpp @@ -46,7 +46,7 @@ PanelDrag::~PanelDrag() bool PanelDrag::decode(const TQMimeSource* e, BaseContainer** container) { - TQByteArray a = e->encodedData("application/basecontainerptr"); + TQByteArray a = e->tqencodedData("application/basecontainerptr"); if (a.size() != PANELDRAG_BUFSIZE) { @@ -73,7 +73,7 @@ bool PanelDrag::canDecode(const TQMimeSource *e) return false; } - TQByteArray a = e->encodedData("application/basecontainerptr"); + TQByteArray a = e->tqencodedData("application/basecontainerptr"); if (a.size() != PANELDRAG_BUFSIZE) { return false; @@ -91,7 +91,7 @@ bool PanelDrag::canDecode(const TQMimeSource *e) return true; } -TQByteArray PanelDrag::encodedData(const char * mimeType) const +TQByteArray PanelDrag::tqencodedData(const char * mimeType) const { if (TQString("application/basecontainerptr") == mimeType && a.size() == PANELDRAG_BUFSIZE) @@ -136,7 +136,7 @@ const char * AppletInfoDrag::format(int i) const return 0; } -TQByteArray AppletInfoDrag::encodedData(const char* mimeType) const +TQByteArray AppletInfoDrag::tqencodedData(const char* mimeType) const { if (TQString("application/appletinfo") == mimeType) { @@ -158,7 +158,7 @@ bool AppletInfoDrag::canDecode(const TQMimeSource * e) bool AppletInfoDrag::decode(const TQMimeSource* e, AppletInfo& container) { - TQByteArray a = e->encodedData("application/appletinfo"); + TQByteArray a = e->tqencodedData("application/appletinfo"); if (a.isEmpty()) { diff --git a/kicker/libkicker/paneldrag.h b/kicker/libkicker/paneldrag.h index 3d7cbf858..7388f4dbc 100644 --- a/kicker/libkicker/paneldrag.h +++ b/kicker/libkicker/paneldrag.h @@ -32,14 +32,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class BaseContainer; -class KDE_EXPORT PanelDrag : public QDragObject +class KDE_EXPORT PanelDrag : public TQDragObject { public: PanelDrag(BaseContainer* container, TQWidget *dragSource); ~PanelDrag(); virtual const char * format(int i = 0) const; - virtual TQByteArray encodedData(const char *) const; + virtual TQByteArray tqencodedData(const char *) const; static bool canDecode(const TQMimeSource * e); static bool decode(const TQMimeSource* e, BaseContainer** container); @@ -48,14 +48,14 @@ class KDE_EXPORT PanelDrag : public QDragObject TQByteArray a; }; -class KDE_EXPORT AppletInfoDrag : public QDragObject +class KDE_EXPORT AppletInfoDrag : public TQDragObject { public: AppletInfoDrag(const AppletInfo& container, TQWidget *dragSource); ~AppletInfoDrag(); virtual const char * format(int i = 0) const; - virtual TQByteArray encodedData(const char *) const; + virtual TQByteArray tqencodedData(const char *) const; static bool canDecode(const TQMimeSource * e); static bool decode(const TQMimeSource* e, AppletInfo& container); diff --git a/kicker/libkicker/panner.cpp b/kicker/libkicker/panner.cpp index 7d11a429e..1dc592bbd 100644 --- a/kicker/libkicker/panner.cpp +++ b/kicker/libkicker/panner.cpp @@ -57,7 +57,7 @@ Panner::Panner( TQWidget* parent, const char* name ) // layout _layout = new TQBoxLayout(this, TQBoxLayout::LeftToRight); _layout->addWidget(_clipper, 1); - setOrientation(Horizontal); + setOrientation(Qt::Horizontal); } Panner::~Panner() @@ -97,14 +97,14 @@ void Panner::createScrollButtons() void Panner::setupButtons() { - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { if (_luSB) { _luSB->setArrowType(Qt::LeftArrow); _rdSB->setArrowType(Qt::RightArrow); - _luSB->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding)); - _rdSB->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding)); + _luSB->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding)); + _rdSB->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding)); TQToolTip::add(_luSB, i18n("Scroll left")); TQToolTip::add(_rdSB, i18n("Scroll right")); setMinimumSize(24, 0); @@ -117,8 +117,8 @@ void Panner::setupButtons() { _luSB->setArrowType(Qt::UpArrow); _rdSB->setArrowType(Qt::DownArrow); - _luSB->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum)); - _rdSB->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum)); + _luSB->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum)); + _rdSB->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum)); TQToolTip::add(_luSB, i18n("Scroll up")); TQToolTip::add(_rdSB, i18n("Scroll down")); setMinimumSize(0, 24); @@ -149,7 +149,7 @@ void Panner::resizeEvent( TQResizeEvent* ) void Panner::scrollRightDown() { - if(orientation() == Horizontal) // scroll right + if(orientation() == Qt::Horizontal) // scroll right scrollBy( _step, 0 ); else // scroll down scrollBy( 0, _step ); @@ -159,7 +159,7 @@ void Panner::scrollRightDown() void Panner::scrollLeftUp() { - if(orientation() == Horizontal) // scroll left + if(orientation() == Qt::Horizontal) // scroll left scrollBy( -_step, 0 ); else // scroll up scrollBy( 0, -_step ); @@ -197,7 +197,7 @@ void Panner::reallyUpdateScrollButtons() _updateScrollButtonsTimer->stop(); - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { delta = contentsWidth() - width(); } @@ -336,7 +336,7 @@ void Panner::ensureVisible( int x, int y, int xmargin, int ymargin ) bool Panner::eventFilter( TQObject *obj, TQEvent *e ) { - if ( obj == _viewport || obj == _clipper ) + if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(_viewport) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(_clipper) ) { switch ( e->type() ) { diff --git a/kicker/libkicker/panner.h b/kicker/libkicker/panner.h index 66ce6cd18..2f09d76f1 100644 --- a/kicker/libkicker/panner.h +++ b/kicker/libkicker/panner.h @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class TQBoxLayout; class TQTimer; -class KDE_EXPORT Panner : public QWidget +class KDE_EXPORT Panner : public TQWidget { Q_OBJECT @@ -39,10 +39,10 @@ public: Panner( TQWidget* parent, const char* name = 0 ); ~Panner(); - TQSize minimumSizeHint() const { return TQWidget::minimumSizeHint(); } + TQSize tqminimumSizeHint() const { return TQWidget::tqminimumSizeHint(); } Qt::Orientation orientation() const { return _orient; } - virtual void setOrientation(Orientation orientation); + virtual void setOrientation(Qt::Orientation orientation); TQWidget *viewport() const { return _viewport; } @@ -59,8 +59,8 @@ public: void contentsToViewport( int x, int y, int& vx, int& vy ) const; void viewportToContents( int vx, int vy, int& x, int& y ) const; - QPoint contentsToViewport( const TQPoint& ) const; - QPoint viewportToContents( const TQPoint& ) const; + TQPoint contentsToViewport( const TQPoint& ) const; + TQPoint viewportToContents( const TQPoint& ) const; void addChild(TQWidget *child) { child->show(); } void removeChild(TQWidget *child) { child->hide(); } diff --git a/kicker/libkicker/simplebutton.cpp b/kicker/libkicker/simplebutton.cpp index 4c28b2101..aafbc4316 100644 --- a/kicker/libkicker/simplebutton.cpp +++ b/kicker/libkicker/simplebutton.cpp @@ -65,22 +65,22 @@ void SimpleButton::setOrientation(Qt::Orientation orientation) update(); } -TQSize SimpleButton::sizeHint() const +TQSize SimpleButton::tqsizeHint() const { const TQPixmap* pm = pixmap(); if (!pm) - return TQButton::sizeHint(); + return TQButton::tqsizeHint(); else return TQSize(pm->width() + BUTTON_MARGIN, pm->height() + BUTTON_MARGIN); } -TQSize SimpleButton::minimumSizeHint() const +TQSize SimpleButton::tqminimumSizeHint() const { const TQPixmap* pm = pixmap(); if (!pm) - return TQButton::minimumSizeHint(); + return TQButton::tqminimumSizeHint(); else return TQSize(pm->width(), pm->height()); } @@ -101,7 +101,7 @@ void SimpleButton::drawButtonLabel( TQPainter *p ) if (isOn() || isDown()) { - pix = pix.convertToImage().smoothScale(pix.width() - 2, + pix = TQImage(pix.convertToImage()).smoothScale(pix.width() - 2, pix.height() - 2); } @@ -176,7 +176,7 @@ void SimpleButton::enterEvent( TQEvent *e ) { m_highlight = true; - repaint( false ); + tqrepaint( false ); TQButton::enterEvent( e ); } @@ -184,7 +184,7 @@ void SimpleButton::leaveEvent( TQEvent *e ) { m_highlight = false; - repaint( false ); + tqrepaint( false ); TQButton::enterEvent( e ); } @@ -202,7 +202,7 @@ SimpleArrowButton::SimpleArrowButton(TQWidget *parent, Qt::ArrowType arrow, cons _inside = false; } -TQSize SimpleArrowButton::sizeHint() const +TQSize SimpleArrowButton::tqsizeHint() const { return TQSize( 12, 12 ); } @@ -236,7 +236,7 @@ void SimpleArrowButton::drawButton( TQPainter *p ) int flags = TQStyle::Style_Default | TQStyle::Style_Enabled; if (isDown() || isOn()) flags |= TQStyle::Style_Down; - style().drawPrimitive(pe, p, r, colorGroup(), flags); + tqstyle().tqdrawPrimitive(pe, p, r, tqcolorGroup(), flags); } void SimpleArrowButton::enterEvent( TQEvent *e ) diff --git a/kicker/libkicker/simplebutton.h b/kicker/libkicker/simplebutton.h index 1ea5c7a44..e6416236f 100644 --- a/kicker/libkicker/simplebutton.h +++ b/kicker/libkicker/simplebutton.h @@ -26,7 +26,7 @@ #include <kdemacros.h> -class KDE_EXPORT SimpleButton : public QButton +class KDE_EXPORT SimpleButton : public TQButton { Q_OBJECT @@ -34,8 +34,8 @@ class KDE_EXPORT SimpleButton : public QButton SimpleButton(TQWidget *parent, const char *name = 0); void setPixmap(const TQPixmap &pix); void setOrientation(Qt::Orientation orientaton); - TQSize sizeHint() const; - TQSize minimumSizeHint() const; + TQSize tqsizeHint() const; + TQSize tqminimumSizeHint() const; protected: void drawButton( TQPainter *p ); @@ -67,7 +67,7 @@ class KDE_EXPORT SimpleArrowButton: public SimpleButton public: SimpleArrowButton(TQWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, const char *name = 0); virtual ~SimpleArrowButton() {}; - TQSize sizeHint() const; + TQSize tqsizeHint() const; protected: virtual void enterEvent( TQEvent *e ); |