diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-03-26 23:52:42 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-03-26 23:52:42 +0100 |
commit | 3ae9f9432e0df88db99fc7aaadaea3b35bda1f9a (patch) | |
tree | 40ede24acb0e1154926e0c1a8bab0c1d4bb01a66 /src/widget | |
parent | 6be98faf5bf1704e91e9e805cea06d32df258898 (diff) | |
download | tde-style-ia-ora-3ae9f9432e0df88db99fc7aaadaea3b35bda1f9a.tar.gz tde-style-ia-ora-3ae9f9432e0df88db99fc7aaadaea3b35bda1f9a.zip |
Initial TDE conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src/widget')
-rw-r--r-- | src/widget/Makefile.am | 2 | ||||
-rw-r--r-- | src/widget/ia_ora.cpp | 62 | ||||
-rw-r--r-- | src/widget/ia_ora.h | 6 |
3 files changed, 35 insertions, 35 deletions
diff --git a/src/widget/Makefile.am b/src/widget/Makefile.am index 5609a26..ca6c057 100644 --- a/src/widget/Makefile.am +++ b/src/widget/Makefile.am @@ -6,7 +6,7 @@ INCLUDES = $(all_includes) noinst_HEADERS = ia_ora.h bitmaps.h kde_style_LTLIBRARIES = ia_ora.la ia_ora_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module -ia_ora_la_LIBADD = -lkdefx $(LIB_KDECORE) $(LIB_QT) +ia_ora_la_LIBADD = -ltdefx $(LIB_TDECORE) $(LIB_QT) ia_ora_la_SOURCES = ia_ora.cpp ia_ora_la_METASOURCES = AUTO diff --git a/src/widget/ia_ora.cpp b/src/widget/ia_ora.cpp index 0e3e5d2..3cc1b09 100644 --- a/src/widget/ia_ora.cpp +++ b/src/widget/ia_ora.cpp @@ -96,7 +96,7 @@ static const int itemHMargin = 3; static const int itemVMargin = 0; static const int arrowHMargin = 6; static const int rightBorder = 12; -static const char* kdeToolbarWidget = "kde toolbar widget"; +static const char* kdeToolbarWidget = "tde toolbar widget"; const int smallButMaxW = 27; const int smallButMaxH = 20; @@ -108,7 +108,7 @@ MandrivaStyle::MandrivaColorData::~MandrivaColorData() // --------------------------------------------------------------------------- MandrivaStyle::MandrivaStyle( ) - : KStyle( AllowMenuTransparency | FilledFrameWorkaround, WindowsStyleScrollBar ) + : TDEStyle( AllowMenuTransparency | FilledFrameWorkaround, WindowsStyleScrollBar ) , m_dataCache (), formMode( false ),kickerMode(false) { hoverWidget = 0L; @@ -381,7 +381,7 @@ void MandrivaStyle::polish(TQWidget* widget) widget->installEventFilter(this); widget->setBackgroundMode( TQWidget::PaletteBackground ); } - else if ( widget->inherits( "KToolBarSeparator" ) || widget->inherits( "TQToolBarSeparator" ) ) + else if ( widget->inherits( "TDEToolBarSeparator" ) || widget->inherits( "TQToolBarSeparator" ) ) { widget->setBackgroundMode( TQWidget::PaletteBackground ); } @@ -391,7 +391,7 @@ void MandrivaStyle::polish(TQWidget* widget) } else if ( widget->parentWidget() && ( ( widget->inherits( "TQListBox" ) && widget->parentWidget()->inherits( "TQComboBox" ) ) - || widget->inherits( "KCompletionBox" ) ) ) + || widget->inherits( "TDECompletionBox" ) ) ) { TQListBox* listbox = (TQListBox*) widget; listbox->setLineWidth( 1 ); @@ -403,7 +403,7 @@ void MandrivaStyle::polish(TQWidget* widget) widget->setBackgroundMode( NoBackground ); // We paint the whole background. widget->installEventFilter(this); } - KStyle::polish( widget ); + TDEStyle::polish( widget ); } @@ -436,7 +436,7 @@ void MandrivaStyle::unPolish(TQWidget* widget) } else if ( widget->parentWidget() && ( ( widget->inherits( "TQListBox" ) && widget->parentWidget()->inherits( "TQComboBox" ) ) - || widget->inherits( "KCompletionBox" ) ) ) + || widget->inherits( "TDECompletionBox" ) ) ) { TQListBox* listbox = (TQListBox*) widget; listbox->setLineWidth( 1 ); @@ -445,7 +445,7 @@ void MandrivaStyle::unPolish(TQWidget* widget) widget->clearMask(); } //For toolbar internal separators, return to button, too (can't use tqt_cast here since don't have access to the class) - else if ( widget->inherits( "KToolBarSeparator" ) || widget->inherits( "TQToolBarSeparator" ) ) + else if ( widget->inherits( "TDEToolBarSeparator" ) || widget->inherits( "TQToolBarSeparator" ) ) { widget->setBackgroundMode( TQWidget::PaletteBackground ); } @@ -455,7 +455,7 @@ void MandrivaStyle::unPolish(TQWidget* widget) widget->removeEventFilter(this); } - KStyle::unPolish( widget ); + TDEStyle::unPolish( widget ); } /* reimp. */ @@ -798,7 +798,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe, p->setPen(oldPen); } else - KStyle::drawPrimitive(pe, p, r, cg, flags, opt); + TDEStyle::drawPrimitive(pe, p, r, cg, flags, opt); break; } case PE_GroupBoxFrame: @@ -1371,7 +1371,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe, drawMandrivaArrow( a, p, r, cg, flags, opt ); } else - KStyle::drawPrimitive( pe, p, r, cg, flags, opt ); + TDEStyle::drawPrimitive( pe, p, r, cg, flags, opt ); } } //switch } @@ -1389,7 +1389,7 @@ void MandrivaStyle::drawMandrivaArrow( TQPointArray a, TQPainter *p, p->setPen( oldPen ); // restore pen } -void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe, +void MandrivaStyle::drawTDEStylePrimitive( TDEStylePrimitive pe, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -1514,7 +1514,7 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe, } break; } - // copied and slightly modified from KStyle. + // copied and slightly modified from TDEStyle. case KPE_ListViewBranch: { // Typical Windows style listview branch element (dotted line). @@ -1589,7 +1589,7 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe, break; } default: - KStyle::drawKStylePrimitive( pe, p, widget, r, cg, flags, opt); + TDEStyle::drawTDEStylePrimitive( pe, p, widget, r, cg, flags, opt); } } @@ -1795,7 +1795,7 @@ void MandrivaStyle::drawControl( ControlElement element, } case CE_ToolButtonLabel: { - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + TDEStyle::drawControl(element, p, widget, r, cg, flags, opt); break; } @@ -2307,7 +2307,7 @@ void MandrivaStyle::drawControl( ControlElement element, } break; default: - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + TDEStyle::drawControl(element, p, widget, r, cg, flags, opt); } } @@ -2326,7 +2326,7 @@ void MandrivaStyle::drawControlMask( ControlElement element, break; } default: - KStyle::drawControlMask(element, p, widget, r, opt); + TDEStyle::drawControlMask(element, p, widget, r, opt); } } @@ -2683,7 +2683,7 @@ void MandrivaStyle::drawComplexControl( ComplexControl control, break; } default: - KStyle::drawComplexControl(control, p, widget, + TDEStyle::drawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); } } @@ -2702,7 +2702,7 @@ TQRect MandrivaStyle::querySubControlMetrics( ComplexControl control, case SC_SpinWidgetButtonField: return TQRect( widget->width() -14 , 0, 14, widget->height() ); default: - return KStyle::querySubControlMetrics( control, widget, subcontrol, opt ); + return TDEStyle::querySubControlMetrics( control, widget, subcontrol, opt ); } } //TODO verify it. @@ -2729,7 +2729,7 @@ TQRect MandrivaStyle::querySubControlMetrics( ComplexControl control, return TQRect( 5, 1, widget->width() - arrow-12, widget->height() - 2); } default: - return KStyle::querySubControlMetrics( control, widget, subcontrol, opt ); + return TDEStyle::querySubControlMetrics( control, widget, subcontrol, opt ); } break; } @@ -2768,7 +2768,7 @@ TQRect MandrivaStyle::querySubControlMetrics( ComplexControl control, default: break; } - return KStyle::querySubControlMetrics( control, widget, subcontrol, opt ); + return TDEStyle::querySubControlMetrics( control, widget, subcontrol, opt ); } void MandrivaStyle::drawComplexControlMask( ComplexControl control, @@ -2796,10 +2796,10 @@ void MandrivaStyle::drawComplexControlMask( ComplexControl control, } default: - KStyle::drawComplexControlMask(control, p, widget, r, opt); + TDEStyle::drawComplexControlMask(control, p, widget, r, opt); } //#endif - //KStyle::drawComplexControlMask(control, p, widget, r, opt); + //TDEStyle::drawComplexControlMask(control, p, widget, r, opt); } @@ -2841,7 +2841,7 @@ int MandrivaStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const case PM_TabBarTabShiftVertical: return 0; default: - return KStyle::pixelMetric(m, widget); + return TDEStyle::pixelMetric(m, widget); } } @@ -2876,7 +2876,7 @@ TQSize MandrivaStyle::sizeFromContents( ContentsType contents, } else { - return KStyle::sizeFromContents( contents, widget, contentSize, opt ); + return TDEStyle::sizeFromContents( contents, widget, contentSize, opt ); } } case CT_ComboBox: @@ -2981,7 +2981,7 @@ TQSize MandrivaStyle::sizeFromContents( ContentsType contents, } default: - return KStyle::sizeFromContents( contents, widget, contentSize, opt ); + return TDEStyle::sizeFromContents( contents, widget, contentSize, opt ); } } @@ -2991,12 +2991,12 @@ TQPixmap MandrivaStyle::stylePixmap(StylePixmap stylepixmap, const TQWidget* widget, const TQStyleOption& opt) const { - return KStyle::stylePixmap(stylepixmap, widget, opt); + return TDEStyle::stylePixmap(stylepixmap, widget, opt); } bool MandrivaStyle::eventFilter( TQObject *object, TQEvent *event ) { - if (KStyle::eventFilter( object, event )) + if (TDEStyle::eventFilter( object, event )) return true; TQToolBar* toolbar; //Hover highlight on buttons and combos @@ -3043,7 +3043,7 @@ bool MandrivaStyle::eventFilter( TQObject *object, TQEvent *event ) else if ( object->parent() && !qstrcmp( object->name(), kdeToolbarWidget ) ) { // Draw a gradient background for custom widgets in the toolbar - // that have specified a "kde toolbar widget" name. + // that have specified a "tde toolbar widget" name. if (event->type() == TQEvent::Paint ) { @@ -3356,7 +3356,7 @@ TQRect MandrivaStyle::subRect(SubRect r, const TQWidget *widget) const return querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ); } default: - return KStyle::subRect( r, widget ); + return TDEStyle::subRect( r, widget ); } } @@ -3403,7 +3403,7 @@ bool MandrivaStyle::excludeColor(const TQColor &col, bool active) const bool MandrivaStyle::isFormWidget(const TQWidget* widget) const { - //Form widgets are in the KHTMLView, but that has 2 further inner levels + //Form widgets are in the TDEHTMLView, but that has 2 further inner levels //of widgets - TQClipperWidget, and outside of that, TQViewportWidget TQWidget* potentialClipPort = widget->parentWidget(); if ( !potentialClipPort || potentialClipPort->isTopLevel() ) @@ -3416,7 +3416,7 @@ bool MandrivaStyle::isFormWidget(const TQWidget* widget) const TQWidget* potentialKHTML = potentialViewPort->parentWidget(); if (!potentialKHTML || potentialKHTML->isTopLevel() || - qstrcmp(potentialKHTML->className(), "KHTMLView") ) + qstrcmp(potentialKHTML->className(), "TDEHTMLView") ) return false; diff --git a/src/widget/ia_ora.h b/src/widget/ia_ora.h index 2c9c174..aaac040 100644 --- a/src/widget/ia_ora.h +++ b/src/widget/ia_ora.h @@ -37,13 +37,13 @@ #include <tqintdict.h> #include <kdrawutil.h> #include <kpixmap.h> -#include <kstyle.h> +#include <tdestyle.h> #include <tqintcache.h> class TQPopupMenu; -class MandrivaStyle : public KStyle +class MandrivaStyle : public TDEStyle { Q_OBJECT @@ -57,7 +57,7 @@ public: void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg, const TQPopupMenu* popup ) const; - void drawKStylePrimitive( KStylePrimitive kpe, + void drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, |