diff options
Diffstat (limited to 'kexi/plugins/forms/widgets/kexiframeutils_p.cpp')
-rw-r--r-- | kexi/plugins/forms/widgets/kexiframeutils_p.cpp | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp index 11b8650a..331909ee 100644 --- a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp +++ b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp @@ -20,13 +20,13 @@ /* This file is included by KexiDBLabel and KexiFrame */ //! @todo add more frame types -void ClassName::drawFrame( QPainter *p ) +void ClassName::drawFrame( TQPainter *p ) { - if (frameShape() == QFrame::Box) { + if (frameShape() == TQFrame::Box) { if ( frameShadow() == Plain ) qDrawPlainRect( p, frameRect(), d->frameColor, lineWidth() ); else - qDrawShadeRect( p, frameRect(), colorGroup(), frameShadow() == QFrame::Sunken, + qDrawShadeRect( p, frameRect(), tqcolorGroup(), frameShadow() == TQFrame::Sunken, lineWidth(), midLineWidth() ); } else { @@ -34,28 +34,28 @@ void ClassName::drawFrame( QPainter *p ) } } -void ClassName::setPalette( const QPalette &pal ) +void ClassName::setPalette( const TQPalette &pal ) { - QPalette pal2(pal); - QColorGroup cg( pal2.active() ); - cg.setColor(QColorGroup::Light, KexiUtils::bleachedColor( d->frameColor, 150 )); - cg.setColor(QColorGroup::Mid, d->frameColor); - cg.setColor(QColorGroup::Dark, d->frameColor.dark(150)); + TQPalette pal2(pal); + TQColorGroup cg( pal2.active() ); + cg.setColor(TQColorGroup::Light, KexiUtils::bleachedColor( d->frameColor, 150 )); + cg.setColor(TQColorGroup::Mid, d->frameColor); + cg.setColor(TQColorGroup::Dark, d->frameColor.dark(150)); pal2.setActive(cg); - QColorGroup cg2( pal2.inactive() ); - cg2.setColor(QColorGroup::Light, cg.light() ); - cg2.setColor(QColorGroup::Mid, cg.mid()); - cg2.setColor(QColorGroup::Dark, cg.dark()); + TQColorGroup cg2( pal2.inactive() ); + cg2.setColor(TQColorGroup::Light, cg.light() ); + cg2.setColor(TQColorGroup::Mid, cg.mid()); + cg2.setColor(TQColorGroup::Dark, cg.dark()); pal2.setInactive(cg2); SuperClassName::setPalette(pal2); } -const QColor& ClassName::frameColor() const +const TQColor& ClassName::frameColor() const { return d->frameColor; } -void ClassName::setFrameColor(const QColor& color) +void ClassName::setFrameColor(const TQColor& color) { d->frameColor = color; //update light and dark colors @@ -69,9 +69,9 @@ ClassName::Shape ClassName::frameShape() const return d->frameShape; } -void ClassName::setFrameShape( ClassName::Shape shape ) +void ClassName::setFrameShape( ClassName::Shape tqshape ) { - d->frameShape = shape; + d->frameShape = tqshape; update(); } @@ -88,33 +88,33 @@ void ClassName::setFrameShadow( ClassName::Shadow shadow ) #endif #if 0 -void QFrame::drawFrame( QPainter *p ) +void TQFrame::drawFrame( TQPainter *p ) { - QPoint p1, p2; - QRect r = frameRect(); + TQPoint p1, p2; + TQRect r = frameRect(); int type = fstyle & MShape; int cstyle = fstyle & MShadow; -#ifdef QT_NO_DRAWUTIL +#ifdef TQT_NO_DRAWUTIL p->setPen( black ); // #### p->drawRect( r ); //### a bit too simple #else - const QColorGroup & g = colorGroup(); + const TQColorGroup & g = tqcolorGroup(); -#ifndef QT_NO_STYLE - QStyleOption opt(lineWidth(),midLineWidth()); +#ifndef TQT_NO_STYLE + TQStyleOption opt(lineWidth(),midLineWidth()); - QStyle::SFlags flags = QStyle::Style_Default; + TQStyle::SFlags flags = TQStyle::Style_Default; if (isEnabled()) - flags |= QStyle::Style_Enabled; + flags |= TQStyle::Style_Enabled; if (cstyle == Sunken) - flags |= QStyle::Style_Sunken; + flags |= TQStyle::Style_Sunken; else if (cstyle == Raised) - flags |= QStyle::Style_Raised; + flags |= TQStyle::Style_Raised; if (hasFocus()) - flags |= QStyle::Style_HasFocus; + flags |= TQStyle::Style_HasFocus; if (hasMouse()) - flags |= QStyle::Style_MouseOver; -#endif // QT_NO_STYLE + flags |= TQStyle::Style_MouseOver; +#endif // TQT_NO_STYLE switch ( type ) { @@ -127,60 +127,60 @@ void QFrame::drawFrame( QPainter *p ) break; case LineEditPanel: - style().drawPrimitive( QStyle::PE_PanelLineEdit, p, r, g, flags, opt ); + style().drawPrimitive( TQStyle::PE_PanelLineEdit, p, r, g, flags, opt ); break; case GroupBoxPanel: - style().drawPrimitive( QStyle::PE_PanelGroupBox, p, r, g, flags, opt ); + style().drawPrimitive( TQStyle::PE_PanelGroupBox, p, r, g, flags, opt ); break; case TabWidgetPanel: - style().drawPrimitive( QStyle::PE_PanelTabWidget, p, r, g, flags, opt ); + style().drawPrimitive( TQStyle::PE_PanelTabWidget, p, r, g, flags, opt ); break; case MenuBarPanel: -#ifndef QT_NO_STYLE - style().drawPrimitive(QStyle::PE_PanelMenuBar, p, r, g, flags, opt); +#ifndef TQT_NO_STYLE + style().drawPrimitive(TQStyle::PE_PanelMenuBar, p, r, g, flags, opt); break; -#endif // fall through to Panel if QT_NO_STYLE +#endif // fall through to Panel if TQT_NO_STYLE case ToolBarPanel: -#ifndef QT_NO_STYLE - style().drawPrimitive( QStyle::PE_PanelDockWindow, p, rect(), g, flags, opt); +#ifndef TQT_NO_STYLE + style().drawPrimitive( TQStyle::PE_PanelDockWindow, p, rect(), g, flags, opt); break; -#endif // fall through to Panel if QT_NO_STYLE +#endif // fall through to Panel if TQT_NO_STYLE case StyledPanel: -#ifndef QT_NO_STYLE +#ifndef TQT_NO_STYLE if ( cstyle == Plain ) qDrawPlainRect( p, r, g.foreground(), lwidth ); else - style().drawPrimitive(QStyle::PE_Panel, p, r, g, flags, opt); + style().drawPrimitive(TQStyle::PE_Panel, p, r, g, flags, opt); break; -#endif // fall through to Panel if QT_NO_STYLE +#endif // fall through to Panel if TQT_NO_STYLE case PopupPanel: -#ifndef QT_NO_STYLE +#ifndef TQT_NO_STYLE { - int vextra = style().pixelMetric(QStyle::PM_PopupMenuFrameVerticalExtra, this), - hextra = style().pixelMetric(QStyle::PM_PopupMenuFrameHorizontalExtra, this); + int vextra = style().tqpixelMetric(TQStyle::PM_PopupMenuFrameVerticalExtra, this), + hextra = style().tqpixelMetric(TQStyle::PM_PopupMenuFrameHorizontalExtra, this); if(vextra > 0 || hextra > 0) { - QRect fr = frameRect(); + TQRect fr = frameRect(); int fw = frameWidth(); if(vextra > 0) { - style().drawControl(QStyle::CE_PopupMenuVerticalExtra, p, this, - QRect(fr.x() + fw, fr.y() + fw, fr.width() - (fw*2), vextra), + style().tqdrawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this, + TQRect(fr.x() + fw, fr.y() + fw, fr.width() - (fw*2), vextra), g, flags, opt); - style().drawControl(QStyle::CE_PopupMenuVerticalExtra, p, this, - QRect(fr.x() + fw, fr.bottom() - fw - vextra, fr.width() - (fw*2), vextra), + style().tqdrawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this, + TQRect(fr.x() + fw, fr.bottom() - fw - vextra, fr.width() - (fw*2), vextra), g, flags, opt); } if(hextra > 0) { - style().drawControl(QStyle::CE_PopupMenuHorizontalExtra, p, this, - QRect(fr.x() + fw, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra), + style().tqdrawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this, + TQRect(fr.x() + fw, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra), g, flags, opt); - style().drawControl(QStyle::CE_PopupMenuHorizontalExtra, p, this, - QRect(fr.right() - fw - hextra, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra), + style().tqdrawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this, + TQRect(fr.right() - fw - hextra, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra), g, flags, opt); } } @@ -188,10 +188,10 @@ void QFrame::drawFrame( QPainter *p ) if ( cstyle == Plain ) qDrawPlainRect( p, r, g.foreground(), lwidth ); else - style().drawPrimitive(QStyle::PE_PanelPopup, p, r, g, flags, opt); + style().drawPrimitive(TQStyle::PE_PanelPopup, p, r, g, flags, opt); break; } -#endif // fall through to Panel if QT_NO_STYLE +#endif // fall through to Panel if TQT_NO_STYLE case Panel: if ( cstyle == Plain ) @@ -209,16 +209,16 @@ void QFrame::drawFrame( QPainter *p ) case HLine: case VLine: if ( type == HLine ) { - p1 = QPoint( r.x(), r.height()/2 ); - p2 = QPoint( r.x()+r.width(), p1.y() ); + p1 = TQPoint( r.x(), r.height()/2 ); + p2 = TQPoint( r.x()+r.width(), p1.y() ); } else { - p1 = QPoint( r.x()+r.width()/2, 0 ); - p2 = QPoint( p1.x(), r.height() ); + p1 = TQPoint( r.x()+r.width()/2, 0 ); + p2 = TQPoint( p1.x(), r.height() ); } if ( cstyle == Plain ) { - QPen oldPen = p->pen(); - p->setPen( QPen(g.foreground(),lwidth) ); + TQPen oldPen = p->pen(); + p->setPen( TQPen(g.foreground(),lwidth) ); p->drawLine( p1, p2 ); p->setPen( oldPen ); } @@ -227,6 +227,6 @@ void QFrame::drawFrame( QPainter *p ) lwidth, midLineWidth() ); break; } -#endif // QT_NO_DRAWUTIL +#endif // TQT_NO_DRAWUTIL #endif |