@ -21,7 +21,7 @@
Copyright ( C ) 2000 Daniel M . Duley < mosfet @ kde . org >
( C ) 2000 Dirk Mueller < mueller @ kde . org >
( C ) 2001 Martijn Klingens < klingens @ kde . org >
Progressbar code based on K Style,
Progressbar code based on TDE Style,
Copyright ( C ) 2001 - 2002 Karol Szwed < gallium @ kde . org >
This library is free software ; you can redistribute it and / or
@ -39,7 +39,7 @@
*/
# include < k globalsettings.h>
# include < tde globalsettings.h>
# include <tqpainter.h>
# include <tqtabbar.h>
# include <tqprogressbar.h>
@ -49,7 +49,7 @@
# include <tqstyleplugin.h>
# include <tqpushbutton.h>
# include <tqtoolbutton.h>
# include < k popupmenu.h>
# include < tde popupmenu.h>
# include <tqradiobutton.h>
# include <tqslider.h>
# include <tqsettings.h>
@ -59,26 +59,26 @@
# include <tqdockarea.h>
# include <tqobjectlist.h>
# include <tqheader.h>
# include < k listview.h>
# include < tde listview.h>
# include <tqstatusbar.h>
# include <tqcombobox.h>
# include <tqtabwidget.h>
# include < k toolbar.h>
# include < tde toolbar.h>
# include <tqlabel.h>
# include <tqsimplerichtext.h>
# include <tqiconview.h>
# include < k config.h>
# include < tde config.h>
# include <tqapplication.h>
# include <tqtoolbox.h>
# include <tqstylesheet.h>
// #include <tqsplitter.h>
# include <tqwidgetstack.h>
# include <tqtimer.h>
# include < k multitabbar.h>
# include < tde multitabbar.h>
# include <tqspinbox.h>
# include <tqcursor.h>
# include <tqtextedit.h>
# include < k deversion.h>
# include < t deversion.h>
# include <kimageeffect.h>
# include <X11/Xlib.h>
@ -266,7 +266,7 @@ class DominoStylePlugin : public TQStylePlugin
KDE_Q_EXPORT_PLUGIN ( DominoStylePlugin )
// -- end --
DominoStyle : : DominoStyle ( ) : KStyle( K Style: : Default /*AllowMenuTransparency*/ , ThreeButtonScrollBar )
DominoStyle : : DominoStyle ( ) : TDEStyle( TDE Style: : Default /*AllowMenuTransparency*/ , ThreeButtonScrollBar )
{
konsoleMode = false ;
kickerMode = false ;
@ -276,7 +276,7 @@ KDE_Q_EXPORT_PLUGIN( DominoStylePlugin )
oldRubberRect = TQRect ( ) ;
rubber = 0 ;
ignoreNextFocusRect = false ;
# if K DE_VERSION < 0x30506
# if T DE_VERSION < 0x30506
compositeManagerRunning = true ;
# endif
configMode = " 0 " ; // temporaly to avoid cache problems between the configs previewStyle and this style
@ -530,22 +530,22 @@ KDE_Q_EXPORT_PLUGIN( DominoStylePlugin )
settings . endGroup ( ) ;
if ( ! strcmp ( tqApp - > argv ( ) [ 0 ] , " konqueror " ) ) {
K Global: : config ( ) - > setGroup ( " General " ) ;
minTabLength = K Global: : config ( ) - > readNumEntry ( " MinimumTabLength " , 3 ) ;
TDE Global: : config ( ) - > setGroup ( " General " ) ;
minTabLength = TDE Global: : config ( ) - > readNumEntry ( " MinimumTabLength " , 3 ) ;
}
else
minTabLength = 0 ;
if ( ! strcmp ( tqApp - > className ( ) , " K Application" ) ) {
TQString oldgroup = K Global: : config ( ) - > group ( ) ;
K Global: : config ( ) - > setGroup ( " KDE " ) ;
macStyleBar = K Global: : config ( ) - > readBoolEntry ( " macStyle " , false ) ;
K Global: : config ( ) - > setGroup ( oldgroup ) ; // reset the group, do not interfere with the application
K ApplicationMode = true ;
if ( ! strcmp ( tqApp - > className ( ) , " TDE Application" ) ) {
TQString oldgroup = TDE Global: : config ( ) - > group ( ) ;
TDE Global: : config ( ) - > setGroup ( " KDE " ) ;
macStyleBar = TDE Global: : config ( ) - > readBoolEntry ( " macStyle " , false ) ;
TDE Global: : config ( ) - > setGroup ( oldgroup ) ; // reset the group, do not interfere with the application
TDE ApplicationMode = true ;
}
else {
macStyleBar = false ;
K ApplicationMode = false ;
TDE ApplicationMode = false ;
}
@ -695,15 +695,15 @@ void DominoStyle::polish(TQPalette &p) {
void DominoStyle : : polish ( TQWidget * widget )
{
if ( ! strcmp ( widget - > name ( ) , " __ khtml" ) ) { // is it a k html widget...?
k htmlWidgets[ widget ] = true ;
connect ( widget , SIGNAL ( destroyed ( TQObject * ) ) , this , SLOT ( k htmlWidgetDestroyed( TQObject * ) ) ) ;
if ( ! strcmp ( widget - > name ( ) , " __ tdehtml" ) ) { // is it a tde html widget...?
tde htmlWidgets[ widget ] = true ;
connect ( widget , SIGNAL ( destroyed ( TQObject * ) ) , this , SLOT ( tde htmlWidgetDestroyed( TQObject * ) ) ) ;
}
else if ( ( ! strcmp ( widget - > name ( ) , " k file button" ) | | ( widget - > isA ( " KLineEdit " ) & & widget - > parentWidget ( ) ) ) & & ! strcmp ( widget - > parentWidget ( ) - > name ( ) , " __ k html" ) ) {
else if ( ( ! strcmp ( widget - > name ( ) , " tde file button" ) | | ( widget - > isA ( " KLineEdit " ) & & widget - > parentWidget ( ) ) ) & & ! strcmp ( widget - > parentWidget ( ) - > name ( ) , " __ tde html" ) ) {
widget - > setBackgroundMode ( TQt : : NoBackground ) ;
widget - > parentWidget ( ) - > setBackgroundMode ( TQt : : NoBackground ) ;
k htmlWidgets[ widget ] = true ;
connect ( widget , SIGNAL ( destroyed ( TQObject * ) ) , this , SLOT ( k htmlWidgetDestroyed( TQObject * ) ) ) ;
tde htmlWidgets[ widget ] = true ;
connect ( widget , SIGNAL ( destroyed ( TQObject * ) ) , this , SLOT ( tde htmlWidgetDestroyed( TQObject * ) ) ) ;
}
if ( dynamic_cast < TQPushButton * > ( widget ) ) {
@ -714,7 +714,7 @@ void DominoStyle::polish(TQWidget* widget)
widget - > setFixedSize ( 13 , 13 ) ; // 12x12 pixmap + 1px top and right spacing
else {
( ( DominoTQWidget * ) widget ) - > setWFlags ( TQt : : WNoAutoErase ) ;
if ( widget - > parentWidget ( ) & & widget - > parentWidget ( ) - > paletteBackgroundPixmap ( ) & & ! k htmlWidgets. contains ( widget ) ) {
if ( widget - > parentWidget ( ) & & widget - > parentWidget ( ) - > paletteBackgroundPixmap ( ) & & ! tde htmlWidgets. contains ( widget ) ) {
widget - > setBackgroundMode ( TQt : : PaletteButton ) ;
widget - > setBackgroundPixmap ( * widget - > parentWidget ( ) - > paletteBackgroundPixmap ( ) ) ;
widget - > setBackgroundOrigin ( setPixmapOrigin ( widget - > parentWidget ( ) - > backgroundOrigin ( ) ) ) ;
@ -727,8 +727,8 @@ void DominoStyle::polish(TQWidget* widget)
( ( DominoTQWidget * ) widget ) - > setWFlags ( TQt : : WNoAutoErase ) ;
widget - > installEventFilter ( this ) ;
}
else if ( dynamic_cast < K ToolBarButton* > ( widget ) ) {
KToolBarButton* tb = static_cast < K ToolBarButton* > ( widget ) ;
else if ( dynamic_cast < TDE ToolBarButton* > ( widget ) ) {
TDEToolBarButton* tb = static_cast < TDE ToolBarButton* > ( widget ) ;
//setDominoButtonPalette(widget); // ### changing the palette breaks them!
if ( tb - > popupDelay ( ) < 1 )
@ -769,7 +769,7 @@ void DominoStyle::polish(TQWidget* widget)
TQComboBox * cb = static_cast < TQComboBox * > ( widget ) ;
( ( DominoTQWidget * ) widget ) - > setWFlags ( TQt : : WNoAutoErase ) ;
if ( widget - > parentWidget ( ) & & widget - > parentWidget ( ) - > paletteBackgroundPixmap ( ) & & ! k htmlWidgets. contains ( widget ) ) {
if ( widget - > parentWidget ( ) & & widget - > parentWidget ( ) - > paletteBackgroundPixmap ( ) & & ! tde htmlWidgets. contains ( widget ) ) {
widget - > setBackgroundMode ( TQt : : PaletteButton ) ;
widget - > setBackgroundOrigin ( setPixmapOrigin ( widget - > parentWidget ( ) - > backgroundOrigin ( ) ) ) ;
}
@ -894,7 +894,7 @@ void DominoStyle::polish(TQWidget* widget)
}
else if ( dynamic_cast < TQScrollView * > ( widget ) ) {
TQFrame * f = dynamic_cast < TQFrame * > ( widget ) ;
if ( ( konquerorMode & & widget - > isA ( " K HTMLView" ) ) | | f - > parentWidget ( ) & & ! strcmp ( f - > parentWidget ( ) - > name ( ) , " KonqFrame " ) ) { // konqi frames
if ( ( konquerorMode & & widget - > isA ( " TDE HTMLView" ) ) | | f - > parentWidget ( ) & & ! strcmp ( f - > parentWidget ( ) - > name ( ) , " KonqFrame " ) ) { // konqi frames
f - > setFrameStyle ( TQFrame : : Box | TQFrame : : Plain ) ;
f - > setLineWidth ( 1 ) ;
widget - > installEventFilter ( this ) ;
@ -908,7 +908,7 @@ void DominoStyle::polish(TQWidget* widget)
else if ( dynamic_cast < TQListBox * > ( widget ) ) {
widget - > installEventFilter ( this ) ;
}
else if ( dynamic_cast < K ToolBarSeparator* > ( widget ) | | dynamic_cast < TQToolBar * > ( widget ) ) {
else if ( dynamic_cast < TDE ToolBarSeparator* > ( widget ) | | dynamic_cast < TQToolBar * > ( widget ) ) {
widget - > setBackgroundMode ( TQt : : PaletteBackground ) ;
}
@ -938,7 +938,7 @@ void DominoStyle::polish(TQWidget* widget)
// animationTimer->start( 50, false );
widget - > installEventFilter ( this ) ;
}
else if ( dynamic_cast < K PopupTitle* > ( widget ) ) {
else if ( dynamic_cast < TDE PopupTitle* > ( widget ) ) {
widget - > installEventFilter ( this ) ;
}
else if ( dynamic_cast < TQFrame * > ( widget ) ) {
@ -972,7 +972,7 @@ void DominoStyle::polish(TQWidget* widget)
f - > setMargin ( 0 ) ;
TQWidget * w = widget - > parentWidget ( ) ;
for ( int i = 0 ; i < 3 ; i + + ) { // the third parentcheck is for the tabWidget on kcm k html_plugins
for ( int i = 0 ; i < 3 ; i + + ) { // the third parentcheck is for the tabWidget on kcm tde html_plugins
if ( ! w ) break ;
if ( dynamic_cast < TQGroupBox * > ( w ) ) {
widget - > setPaletteBackgroundColor ( tqApp - > palette ( ) . active ( ) . background ( ) ) ;
@ -1029,8 +1029,8 @@ void DominoStyle::polish(TQWidget* widget)
void DominoStyle : : unPolish ( TQWidget * widget )
{
if ( ! strcmp ( widget - > name ( ) , " __ k html" ) | | ( ! strcmp ( widget - > name ( ) , " k file button" ) & & ! strcmp ( widget - > parentWidget ( ) - > name ( ) , " __ khtml" ) ) ) { // is it a k html widget...?
k htmlWidgets. remove ( widget ) ;
if ( ! strcmp ( widget - > name ( ) , " __ tde html" ) | | ( ! strcmp ( widget - > name ( ) , " tde file button" ) & & ! strcmp ( widget - > parentWidget ( ) - > name ( ) , " __ tdehtml" ) ) ) { // is it a tde html widget...?
tde htmlWidgets. remove ( widget ) ;
}
if ( dynamic_cast < TQPushButton * > ( widget ) | |
@ -1070,7 +1070,7 @@ void DominoStyle::unPolish(TQWidget* widget)
static_cast < TQFrame * > ( widget ) - > setLineWidth ( 2 ) ;
widget - > clearMask ( ) ;
}
else if ( dynamic_cast < K ToolBarButton* > ( widget ) ) {
else if ( dynamic_cast < TDE ToolBarButton* > ( widget ) ) {
widget - > removeEventFilter ( this ) ;
widget - > setBackgroundMode ( TQt : : PaletteBackground ) ;
}
@ -1093,7 +1093,7 @@ void DominoStyle::unPolish(TQWidget* widget)
else if ( dynamic_cast < TQProgressBar * > ( widget ) ) {
progAnimWidgets . remove ( widget ) ;
}
else if ( dynamic_cast < K ToolBarSeparator* > ( widget ) | | dynamic_cast < TQToolBar * > ( widget ) ) {
else if ( dynamic_cast < TDE ToolBarSeparator* > ( widget ) | | dynamic_cast < TQToolBar * > ( widget ) ) {
widget - > removeEventFilter ( this ) ;
widget - > setBackgroundMode ( TQt : : PaletteButton ) ;
}
@ -1119,13 +1119,13 @@ void DominoStyle::unPolish(TQWidget* widget)
}
else if ( dynamic_cast < TQScrollView * > ( widget ) ) {
TQFrame * f = dynamic_cast < TQFrame * > ( widget ) ;
if ( ( konquerorMode & & widget - > isA ( " K HTMLView" ) ) | | f - > parentWidget ( ) & & ! strcmp ( f - > parentWidget ( ) - > name ( ) , " KonqFrame " ) ) { // konqi frames
if ( ( konquerorMode & & widget - > isA ( " TDE HTMLView" ) ) | | f - > parentWidget ( ) & & ! strcmp ( f - > parentWidget ( ) - > name ( ) , " KonqFrame " ) ) { // konqi frames
widget - > removeEventFilter ( this ) ;
f - > setFrameStyle ( TQFrame : : NoFrame | TQFrame : : Plain ) ;
f - > setLineWidth ( 0 ) ;
}
}
else if ( dynamic_cast < K PopupTitle* > ( widget ) ) {
else if ( dynamic_cast < TDE PopupTitle* > ( widget ) ) {
widget - > removeEventFilter ( this ) ;
}
else if ( dynamic_cast < TQFrame * > ( widget ) ) {
@ -1156,12 +1156,12 @@ void DominoStyle::unPolish(TQWidget* widget)
}
K Style: : unPolish ( widget ) ;
TDE Style: : unPolish ( widget ) ;
}
void DominoStyle : : k htmlWidgetDestroyed( TQObject * obj )
void DominoStyle : : tde htmlWidgetDestroyed( TQObject * obj )
{
k htmlWidgets. remove ( static_cast < TQWidget * > ( obj ) ) ;
tde htmlWidgets. remove ( static_cast < TQWidget * > ( obj ) ) ;
}
void DominoStyle : : groupBoxDestroyed ( TQObject * obj )
@ -1941,14 +1941,14 @@ void DominoStyle::renderButton(TQPainter *p,
bool /*mouseOver*/ ,
bool horizontal ,
bool enabled ,
bool k htmlMode) const
bool tde htmlMode) const
{
uint contourFlags = Draw_Left | Draw_Right | Draw_Top | Draw_Bottom ;
if ( ! enabled ) contourFlags | = Is_Disabled ;
if ( k htmlMode | | buttonContour - > alphaMode ( ) /* || kickerMode*/ ) {
if ( tde htmlMode | | buttonContour - > alphaMode ( ) /* || kickerMode*/ ) {
contourFlags | = Draw_AlphaBlend ;
}
@ -1966,7 +1966,7 @@ void DominoStyle::renderButton(TQPainter *p,
}
}
// TQColor buttonColor = k htmlMode ? g.button() : tqApp->palette().active().background();
// TQColor buttonColor = tde htmlMode ? g.button() : tqApp->palette().active().background();
if ( ! flatMode ) {
contourFlags | = Round_UpperLeft | Round_UpperRight | Round_BottomLeft | Round_BottomRight | Is_Button ;
@ -2685,7 +2685,7 @@ void DominoStyle::renderTab(TQPainter *p,
}
}
void DominoStyle : : draw KStylePrimitive( K StylePrimitive kpe ,
void DominoStyle : : draw TDEStylePrimitive( TDE StylePrimitive kpe ,
TQPainter * p ,
const TQWidget * widget ,
const TQRect & r ,
@ -2693,7 +2693,7 @@ void DominoStyle::drawKStylePrimitive(KStylePrimitive kpe,
SFlags flags ,
const TQStyleOption & opt ) const
{
//return KStyle::drawK StylePrimitive(kpe, p, widget, r, cg, flags, opt);
//return TDEStyle::drawTDE StylePrimitive(kpe, p, widget, r, cg, flags, opt);
// SLIDER
// ------
@ -2948,7 +2948,7 @@ void DominoStyle::drawKStylePrimitive(KStylePrimitive kpe,
break ;
}
// copied and slightly modified from K Style.
// copied and slightly modified from TDE Style.
case KPE_ListViewBranch : {
if ( _drawTriangularExpander ) break ;
// Typical Windows style listview branch element (dotted line).
@ -3021,7 +3021,7 @@ void DominoStyle::drawKStylePrimitive(KStylePrimitive kpe,
}
default :
KStyle: : drawK StylePrimitive( kpe , p , widget , r , cg , flags , opt ) ;
TDEStyle: : drawTDE StylePrimitive( kpe , p , widget , r , cg , flags , opt ) ;
}
}
@ -3049,7 +3049,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe,
//return K Style::drawPrimitive(pe, p, r, cg, flags, opt);
//return TDE Style::drawPrimitive(pe, p, r, cg, flags, opt);
switch ( pe ) {
@ -3159,7 +3159,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe,
if ( dynamic_cast < TQPixmap * > ( p - > device ( ) ) ) // more likely a backgroundPixmap than a doublebuffer
buttonContour - > setAlphaMode ( ) ;
renderButton ( p , r , cg , ( on | | down ) , mouseOver , true , enabled , k htmlWidgets. contains ( opt . widget ( ) ) ) ;
renderButton ( p , r , cg , ( on | | down ) , mouseOver , true , enabled , tde htmlWidgets. contains ( opt . widget ( ) ) ) ;
buttonContour - > reset ( ) ;
break ;
}
@ -4353,7 +4353,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe,
case PE_RubberBand : {
# if K DE_VERSION >= 0x30506
# if T DE_VERSION >= 0x30506
if ( rubberBandType ! = ArgbRubber | | ! compositeManagerRunning ) {
# else
if ( rubberBandType ! = ArgbRubber ) {
@ -4365,7 +4365,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe,
p - > restore ( ) ;
}
else {
K Style: : drawPrimitive ( pe , p , r , cg , flags , opt ) ;
TDE Style: : drawPrimitive ( pe , p , r , cg , flags , opt ) ;
}
break ;
}
@ -4642,7 +4642,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe,
}
default : {
return K Style: : drawPrimitive ( pe , p , r , cg , flags , opt ) ;
return TDE Style: : drawPrimitive ( pe , p , r , cg , flags , opt ) ;
}
}
}
@ -4658,13 +4658,13 @@ void DominoStyle::drawControl(ControlElement element,
const bool enabled = ( flags & Style_Enabled ) ;
//return K Style::drawControl(element, p, widget, r, cg, flags, opt);
//return TDE Style::drawControl(element, p, widget, r, cg, flags, opt);
switch ( element ) {
case CE_ToolButtonLabel : {
if ( widget - > isA ( " K ToolBarButton" ) ) {
if ( widget - > isA ( " TDE ToolBarButton" ) ) {
DominoKToolBarButton * tb = ( DominoKToolBarButton * ) widget ;
TQStyle : : SFlags flags = TQStyle : : Style_Default ;
@ -4680,14 +4680,14 @@ void DominoStyle::drawControl(ControlElement element,
if ( tb - > hasFocus ( ) ) flags | = TQStyle : : Style_HasFocus ;
int dx , dy ;
TQFont tmp_font ( K GlobalSettings: : toolBarFont ( ) ) ;
TQFont tmp_font ( TDE GlobalSettings: : toolBarFont ( ) ) ;
TQFontMetrics fm ( tmp_font ) ;
TQRect textRect ;
int textFlags = 0 ;
TQPixmap pixmap ;
if ( tb - > iconTextMode ( ) ! = K ToolBar: : TextOnly ) {
if ( tb - > iconTextMode ( ) ! = TDE ToolBar: : TextOnly ) {
pixmap = tb - > iconSet ( ) . pixmap ( TQIconSet : : Automatic ,
tb - > isEnabled ( ) ? ( tb - > isActive ( ) ? TQIconSet : : Active : TQIconSet : : Normal ) :
TQIconSet : : Disabled ,
@ -4710,7 +4710,7 @@ void DominoStyle::drawControl(ControlElement element,
drawOutlinePixmap = true ;
}
if ( tb - > iconTextMode ( ) = = K ToolBar: : IconOnly ) // icon only
if ( tb - > iconTextMode ( ) = = TDE ToolBar: : IconOnly ) // icon only
{
if ( ! pixmap . isNull ( ) )
{
@ -4726,7 +4726,7 @@ void DominoStyle::drawControl(ControlElement element,
}
}
else if ( tb - > iconTextMode ( ) = = K ToolBar: : IconTextRight ) // icon and text (if any)
else if ( tb - > iconTextMode ( ) = = TDE ToolBar: : IconTextRight ) // icon and text (if any)
{
if ( ! pixmap . isNull ( ) )
{
@ -4751,7 +4751,7 @@ void DominoStyle::drawControl(ControlElement element,
textRect = TQRect ( dx , dy , tb - > width ( ) - dx , tb - > height ( ) - 1 ) ;
}
}
else if ( tb - > iconTextMode ( ) = = K ToolBar: : TextOnly )
else if ( tb - > iconTextMode ( ) = = TDE ToolBar: : TextOnly )
{
if ( ! tb - > textLabel ( ) . isNull ( ) )
{
@ -4762,7 +4762,7 @@ void DominoStyle::drawControl(ControlElement element,
textRect = TQRect ( dx , dy , fm . width ( tb - > textLabel ( ) ) , fm . lineSpacing ( ) ) ;
}
}
else if ( tb - > iconTextMode ( ) = = K ToolBar: : IconTextBottom )
else if ( tb - > iconTextMode ( ) = = TDE ToolBar: : IconTextBottom )
{
if ( ! pixmap . isNull ( ) )
{
@ -4787,13 +4787,13 @@ void DominoStyle::drawControl(ControlElement element,
}
if ( ! tb - > textLabel ( ) . isNull ( ) & & ! textRect . isNull ( ) )
{
p - > setFont ( K GlobalSettings: : toolBarFont ( ) ) ;
p - > setFont ( TDE GlobalSettings: : toolBarFont ( ) ) ;
TQColor pencolor ;
if ( ! tb - > isEnabled ( ) )
pencolor = tb - > palette ( ) . disabled ( ) . dark ( ) ;
// replaced through icon highlights
// else if(tb->isRaised())
// pencolor = K GlobalSettings::toolBarHighlightColor();
// pencolor = TDE GlobalSettings::toolBarHighlightColor();
else
pencolor = tb - > colorGroup ( ) . buttonText ( ) ;
@ -5087,7 +5087,7 @@ void DominoStyle::drawControl(ControlElement element,
case CE_CheckBox : {
TQColorGroup g = cg ;
if ( ! k htmlWidgets. contains ( widget ) )
if ( ! tde htmlWidgets. contains ( widget ) )
g . setColor ( TQColorGroup : : Button , tqApp - > palette ( ) . active ( ) . background ( ) ) ;
TQPixmap insidePix = qembed_findImage ( " checkbox2inside " ) ;
@ -5139,7 +5139,7 @@ void DominoStyle::drawControl(ControlElement element,
// ------------
case CE_RadioButton : {
TQColorGroup g = cg ;
if ( ! k htmlWidgets. contains ( widget ) )
if ( ! tde htmlWidgets. contains ( widget ) )
g . setColor ( TQColorGroup : : Button , tqApp - > palette ( ) . active ( ) . background ( ) ) ;
TQString down = flags & Style_Down ? " 1 " : " 0 " ;
@ -5243,7 +5243,7 @@ void DominoStyle::drawControl(ControlElement element,
renderTab ( p , r , cg , ( flags & Style_MouseOver ) , selected , true , pos , false , false , konqTab ) ;
break ;
default :
K Style: : drawControl ( element , p , widget , r , cg , flags , opt ) ;
TDE Style: : drawControl ( element , p , widget , r , cg , flags , opt ) ;
}
// TQt3 uses this painter to draw the iconSet between CE_TabBarTab and CE_TabBarLabel. If we clip the painter here
@ -5256,7 +5256,7 @@ void DominoStyle::drawControl(ControlElement element,
case CE_PushButton : {
TQPushButton * button = ( TQPushButton * ) widget ;
bool khtmlMode = k htmlWidgets. contains ( button ) ;
bool tdehtmlMode = tde htmlWidgets. contains ( button ) ;
bool isDefault = enabled & & button - > isDefault ( ) ;
bool isHoverWidget = enabled & & button = = hoverWidget ;
bool isSunken = flags & Style_On | | flags & Style_Down ;
@ -5266,7 +5266,7 @@ void DominoStyle::drawControl(ControlElement element,
flatMode = button - > isFlat ( ) ;
TQColor bg ;
if ( ! k htmlMode & & ! button - > paletteBackgroundPixmap ( ) ) {
if ( ! tde htmlMode & & ! button - > paletteBackgroundPixmap ( ) ) {
if ( dynamic_cast < TQGroupBox * > ( button - > parentWidget ( ) ) ) {
bg = button - > parentWidget ( ) - > paletteBackgroundColor ( ) ;
@ -5284,7 +5284,7 @@ void DominoStyle::drawControl(ControlElement element,
buttonContour - > setAlphaMode ( ) ;
contourFlags | = Draw_AlphaBlend ;
}
if ( k htmlMode) contourFlags | = Draw_AlphaBlend ;
if ( tde htmlMode) contourFlags | = Draw_AlphaBlend ;
if ( ! enabled ) {
contourFlags | = Is_Disabled ;
surfaceFlags | = Is_Disabled ;
@ -5516,7 +5516,7 @@ void DominoStyle::drawControl(ControlElement element,
bool enabled = t - > isEnabled ( ) & & tb - > isEnabled ( ) ;
TQPixmap pixmap ;
if ( ! K ApplicationMode) {
if ( ! TDE ApplicationMode) {
TQIconSet : : Mode mode = ( t - > identifier ( ) & & tb - > keyboardFocusTab ( ) ) ? TQIconSet : : Active : TQIconSet : : Normal ;
pixmap = t - > iconSet ( ) - > pixmap ( TQIconSet : : Small , mode ) ;
if ( ! enabled )
@ -5690,7 +5690,7 @@ void DominoStyle::drawControl(ControlElement element,
// Select the correct icon from the iconset
TQPixmap pixmap ;
if ( K ApplicationMode) {
if ( TDE ApplicationMode) {
if ( active )
mode = enabled ? TQIconSet : : Active : TQIconSet : : Disabled ;
else
@ -5873,7 +5873,7 @@ void DominoStyle::drawControl(ControlElement element,
break ;
}
default :
K Style: : drawControl ( element , p , widget , r , cg , flags , opt ) ;
TDE Style: : drawControl ( element , p , widget , r , cg , flags , opt ) ;
}
}
@ -5898,7 +5898,7 @@ void DominoStyle::drawControlMask(ControlElement element,
}
default : {
break ;
// K Style::drawControlMask (element, p, w, r, opt);
// TDE Style::drawControlMask (element, p, w, r, opt);
}
}
}
@ -5917,7 +5917,7 @@ void DominoStyle::drawComplexControl(ComplexControl control,
const bool enabled = ( flags & Style_Enabled ) ;
//return K Style::drawComplexControl(control, p, widget, r, cg, flags, controls, active, opt);
//return TDE Style::drawComplexControl(control, p, widget, r, cg, flags, controls, active, opt);
switch ( control ) {
@ -5934,7 +5934,7 @@ void DominoStyle::drawComplexControl(ComplexControl control,
const TQColor bg = ( cb & & cb - > parentWidget ( ) ) ? cb - > parentWidget ( ) - > paletteBackgroundColor ( ) : cg . background ( ) ;
bool hasPixmap = cb & & cb - > count ( ) > 0 & & cb - > pixmap ( cb - > currentItem ( ) ) ;
uint contourFlags = 0 ;
bool isKhtmlWidget = k htmlWidgets. contains ( cb ) ;
bool isKhtmlWidget = tde htmlWidgets. contains ( cb ) ;
if ( isKhtmlWidget | | ( cb & & cb - > parentWidget ( ) & & cb - > parentWidget ( ) - > paletteBackgroundPixmap ( ) ) ) {
contourFlags | = Draw_AlphaBlend ;
@ -6059,14 +6059,14 @@ void DominoStyle::drawComplexControl(ComplexControl control,
TQToolButton * tb = ( TQToolButton * ) widget ;
if ( _toolBtnAsBtn & & : : tqt_cast < K ToolBarButton* > ( tb ) ) {
if ( _toolBtnAsBtn & & : : tqt_cast < TDE ToolBarButton* > ( tb ) ) {
const bool reverse = TQApplication : : reverseLayout ( ) ;
KToolBar * bar = dynamic_cast < K ToolBar* > ( tb - > parentWidget ( ) ) ;
TDEToolBar * bar = dynamic_cast < TDE ToolBar* > ( tb - > parentWidget ( ) ) ;
if ( ! bar ) break ;
KToolBarButton* btn = : : tqt_cast < K ToolBarButton* > ( tb ) ;
K ToolBarButton* prevBtn = 0 ;
K ToolBarButton* nextBtn = 0 ;
TDEToolBarButton* btn = : : tqt_cast < TDE ToolBarButton* > ( tb ) ;
TDE ToolBarButton* prevBtn = 0 ;
TDE ToolBarButton* nextBtn = 0 ;
bool prevBtnIsOn = false ;
bool nextBtnIsOn = false ;
bool isOn = flags & Style_On | | flags & Style_Down ;
@ -6382,7 +6382,7 @@ void DominoStyle::drawComplexControl(ComplexControl control,
btn - > erase ( ) ;
}
else if ( _toolBtnAsBtn ) { // not a K ToolBarButton
else if ( _toolBtnAsBtn ) { // not a TDE ToolBarButton
if ( kickerMode & & ! ( flags & ( Style_Raised ) ) )
break ;
@ -6417,7 +6417,7 @@ void DominoStyle::drawComplexControl(ComplexControl control,
else if ( flags & Style_Default )
buttonContour - > setState ( Contour_DefaultButton ) ;
renderButton ( p , br , g , ( flags & Style_On | | flags & Style_Down ) , flags & Style_MouseOver , true , enabled , k htmlWidgets. contains ( opt . widget ( ) ) ) ;
renderButton ( p , br , g , ( flags & Style_On | | flags & Style_Down ) , flags & Style_MouseOver , true , enabled , tde htmlWidgets. contains ( opt . widget ( ) ) ) ;
buttonContour - > reset ( ) ;
@ -6439,7 +6439,7 @@ void DominoStyle::drawComplexControl(ComplexControl control,
}
else {
bool isKbtn = : : tqt_cast < K ToolBarButton* > ( tb ) ;
bool isKbtn = : : tqt_cast < TDE ToolBarButton* > ( tb ) ;
TQPixmap buffer ( tb - > size ( ) ) ;
TQPainter painter ( & buffer ) ;
@ -6773,7 +6773,7 @@ void DominoStyle::drawComplexControl(ComplexControl control,
break ;
}
default :
K Style: : drawComplexControl ( control , p , widget ,
TDE Style: : drawComplexControl ( control , p , widget ,
r , cg , flags , controls ,
active , opt ) ;
break ;
@ -6816,7 +6816,7 @@ TQRect DominoStyle::subRect(SubRect r, const TQWidget *widget) const
case SR_CheckBoxFocusRect :
{
TQRect cr = subRect ( SR_CheckBoxContents , widget ) ;
TQRect fr = K Style: : subRect ( r , widget ) ;
TQRect fr = TDE Style: : subRect ( r , widget ) ;
if ( cr . width ( ) < = 0 ) // no text
fr . setHeight ( fr . height ( ) + 2 ) ;
else
@ -6826,7 +6826,7 @@ TQRect DominoStyle::subRect(SubRect r, const TQWidget *widget) const
case SR_RadioButtonFocusRect :
{
TQRect cr = subRect ( SR_CheckBoxContents , widget ) ;
TQRect fr = K Style: : subRect ( r , widget ) ;
TQRect fr = TDE Style: : subRect ( r , widget ) ;
if ( cr . width ( ) < = 0 ) // no text
fr . setHeight ( fr . height ( ) + 2 ) ;
else
@ -6846,7 +6846,7 @@ TQRect DominoStyle::subRect(SubRect r, const TQWidget *widget) const
return TQRect ( rw . left ( ) + 18 , rw . top ( ) , rw . width ( ) - 18 , rw . height ( ) ) ;
}
default : {
return K Style: : subRect ( r , widget ) ;
return TDE Style: : subRect ( r , widget ) ;
}
}
}
@ -6868,7 +6868,7 @@ TQRect DominoStyle::querySubControlMetrics(ComplexControl control,
switch ( subcontrol ) {
case SC_ComboBoxEditField : {
const TQComboBox * cb = dynamic_cast < const TQComboBox * > ( widget ) ;
if ( ! cb ) // maybe k develop's KComboView
if ( ! cb ) // maybe t develop's KComboView
return TQRect ( r . left ( ) + 4 , r . top ( ) + 3 , r . width ( ) - 4 - 15 - 3 , r . height ( ) - 7 ) ;
if ( ! cb - > editable ( ) )
return TQRect ( r . left ( ) + 3 , r . top ( ) + 3 , r . width ( ) - 4 - 15 - 2 , r . height ( ) - 6 ) ;
@ -6876,7 +6876,7 @@ TQRect DominoStyle::querySubControlMetrics(ComplexControl control,
return TQRect ( r . left ( ) + 3 , r . top ( ) + 3 , r . width ( ) - 4 - 15 - 2 , r . height ( ) - 7 ) ;
}
default : {
return K Style: : querySubControlMetrics ( control , widget , subcontrol , opt ) ;
return TDE Style: : querySubControlMetrics ( control , widget , subcontrol , opt ) ;
}
}
break ;
@ -6908,7 +6908,7 @@ TQRect DominoStyle::querySubControlMetrics(ComplexControl control,
return TQRect ( buttonsLeft , r . top ( ) + 2 , buttonsWidth , r . height ( ) - 5 ) ;
}
default : {
return K Style: : querySubControlMetrics ( control , widget , subcontrol , opt ) ;
return TDE Style: : querySubControlMetrics ( control , widget , subcontrol , opt ) ;
}
}
break ;
@ -6973,14 +6973,14 @@ TQRect DominoStyle::querySubControlMetrics(ComplexControl control,
}
}
default : {
return K Style: : querySubControlMetrics ( control , widget , subcontrol , opt ) ;
return TDE Style: : querySubControlMetrics ( control , widget , subcontrol , opt ) ;
}
}
}
int DominoStyle : : pixelMetric ( PixelMetric m , const TQWidget * widget ) const
{
//return K Style::pixelMetric(m, widget);
//return TDE Style::pixelMetric(m, widget);
switch ( m ) {
// FRAMES
@ -7123,7 +7123,7 @@ int DominoStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
// case PM_PopupMenuFrameHorizontalExtra:
// return 1;
default :
return K Style: : pixelMetric ( m , widget ) ;
return TDE Style: : pixelMetric ( m , widget ) ;
}
}
@ -7133,7 +7133,7 @@ TQSize DominoStyle::sizeFromContents(ContentsType t,
const TQSize & s ,
const TQStyleOption & opt ) const
{
//return K Style::sizeFromContents (t, widget, s, opt);
//return TDE Style::sizeFromContents (t, widget, s, opt);
switch ( t ) {
@ -7189,7 +7189,7 @@ TQSize DominoStyle::sizeFromContents(ContentsType t,
if ( ( dots * minTabLength + 44 ) * count > = tb - > width ( ) ) // 44 = frame+iconwidth
return TQSize ( s . width ( ) , s . height ( ) ) ;
TQSize sz = K Style: : sizeFromContents ( t , widget , s , opt ) ;
TQSize sz = TDE Style: : sizeFromContents ( t , widget , s , opt ) ;
TQString str ;
str . fill ( ' ' , minTabLength ) ;
@ -7217,16 +7217,16 @@ TQSize DominoStyle::sizeFromContents(ContentsType t,
return TQSize ( s . width ( ) + 9 , s . height ( ) + 7 ) ;
return TQSize ( s . width ( ) + 11 , s . height ( ) + 7 ) ;
}
return K Style: : sizeFromContents ( t , widget , s , opt ) ; // KMultiTabBar buttons
return TDE Style: : sizeFromContents ( t , widget , s , opt ) ; // KMultiTabBar buttons
}
case CT_SpinBox : {
TQSize sz = K Style: : sizeFromContents ( t , widget , s , opt ) ;
TQSize sz = TDE Style: : sizeFromContents ( t , widget , s , opt ) ;
int h = sz . height ( ) % 2 ! = 0 ? sz . height ( ) + 1 : sz . height ( ) ;
return ( TQSize ( sz . width ( ) , h < 24 ? 24 : h ) ) ;
}
case CT_Header : {
TQSize sz = K Style: : sizeFromContents ( t , widget , s , opt ) ;
TQSize sz = TDE Style: : sizeFromContents ( t , widget , s , opt ) ;
return TQSize ( sz . width ( ) , sz . height ( ) - 2 ) ;
}
@ -7292,10 +7292,10 @@ TQSize DominoStyle::sizeFromContents(ContentsType t,
return TQSize ( w , h ) ;
}
default :
return K Style: : sizeFromContents ( t , widget , s , opt ) ;
return TDE Style: : sizeFromContents ( t , widget , s , opt ) ;
}
return K Style: : sizeFromContents ( t , widget , s , opt ) ;
return TDE Style: : sizeFromContents ( t , widget , s , opt ) ;
}
int DominoStyle : : styleHint ( StyleHint stylehint ,
@ -7335,7 +7335,7 @@ int DominoStyle::styleHint( StyleHint stylehint,
return ' * ' ;
}
default :
return K Style: : styleHint ( stylehint , widget , option , returnData ) ;
return TDE Style: : styleHint ( stylehint , widget , option , returnData ) ;
}
}
@ -7352,7 +7352,7 @@ TQPixmap DominoStyle::stylePixmap(StylePixmap stylepixmap, const TQWidget* widge
case SP_TitleBarNormalButton :
return TQPixmap ( qembed_findImage ( " ToDesktopButton " ) . copy ( 0 , 0 , 12 , 12 ) ) ;
default :
return K Style: : stylePixmap ( stylepixmap , widget , opt ) ;
return TDE Style: : stylePixmap ( stylepixmap , widget , opt ) ;
}
}