Initial TDE conversion

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 8 years ago
parent 96603e8acb
commit 8f61d29f9c

@ -8,7 +8,7 @@
* respects Gwenview's / Kicker's taskbar applet / Konversation's own mousewheel handling for scrollviews * respects Gwenview's / Kicker's taskbar applet / Konversation's own mousewheel handling for scrollviews
* clipped popup menu edges, for a better look with KWin's shadows (Beryl seems not to support it). * clipped popup menu edges, for a better look with KWin's shadows (Beryl seems not to support it).
* fixes pixmaps on PowerPC architecture * fixes pixmaps on PowerPC architecture
* fixes functionality of some popup QToolButtons and adapts their look and behavior to KToolBarButtons * fixes functionality of some popup QToolButtons and adapts their look and behavior to TDEToolBarButtons
* the content of popup menus with a side pixmap is visible again (Amarok, Digikam) * the content of popup menus with a side pixmap is visible again (Amarok, Digikam)
* adapts KMenu's section header style * adapts KMenu's section header style
* fixes Kickoff's tab icon alignment * fixes Kickoff's tab icon alignment

@ -1,16 +1,16 @@
INCLUDES = $(all_includes) -I$(kde_includes)/kwin INCLUDES = $(all_includes) -I$(kde_includes)/twin
SUBDIRS = . config SUBDIRS = . config
kde_module_LTLIBRARIES = kwin3_domino.la kde_module_LTLIBRARIES = twin3_domino.la
kwin3_domino_la_SOURCES = dominoclient.cpp twin3_domino_la_SOURCES = dominoclient.cpp
kwin3_domino_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module -L/usr/X11R6/lib twin3_domino_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module -L/usr/X11R6/lib
kwin3_domino_la_LIBADD = $(LIB_KDECORE) $(kde_libraries)/libkdecorations.la -lXext -lX11 $(LIB_QT) twin3_domino_la_LIBADD = $(LIB_TDECORE) $(kde_libraries)/libtdecorations.la -lXext -lX11 $(LIB_QT)
METASOURCES = AUTO METASOURCES = AUTO
noinst_HEADERS = dominoclient.h noinst_HEADERS = dominoclient.h
lnkdir = $(kde_datadir)/kwin lnkdir = $(kde_datadir)/twin
lnk_DATA = domino.desktop lnk_DATA = domino.desktop

@ -1,10 +1,10 @@
INCLUDES = $(all_includes) INCLUDES = $(all_includes)
kde_module_LTLIBRARIES = kwin_domino_config.la kde_module_LTLIBRARIES = twin_domino_config.la
kwin_domino_config_la_SOURCES = config.cpp twin_domino_config_la_SOURCES = config.cpp
kwin_domino_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module twin_domino_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
kwin_domino_config_la_LIBADD = $(LIB_KDEUI) $(LIB_QT) $(LIB_KDECORE) twin_domino_config_la_LIBADD = $(LIB_TDEUI) $(LIB_QT) $(LIB_TDECORE)
METASOURCES = AUTO METASOURCES = AUTO
noinst_HEADERS = config.h noinst_HEADERS = config.h

@ -21,8 +21,8 @@
*/ */
#include "config.h" #include "config.h"
#include <kglobal.h> #include <tdeglobal.h>
#include <klocale.h> #include <tdelocale.h>
#include <tqvbox.h> #include <tqvbox.h>
#include <tqlayout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
@ -31,24 +31,24 @@
extern "C" extern "C"
{ {
KDE_EXPORT TQObject* allocate_config( KConfig* config, TQWidget* parent ) KDE_EXPORT TQObject* allocate_config( TDEConfig* config, TQWidget* parent )
{ {
return(new DominoConfig(config, parent)); return(new DominoConfig(config, parent));
} }
} }
// NOTE: // NOTE:
// 'config' is a pointer to the kwindecoration modules open kwin config, // 'config' is a pointer to the twindecoration modules open twin config,
// and is by default set to the "Style" group. // and is by default set to the "Style" group.
// 'parent' is the parent of the TQObject, which is a VBox inside the // 'parent' is the parent of the TQObject, which is a VBox inside the
// Configure tab in kwindecoration // Configure tab in twindecoration
DominoConfig::DominoConfig( KConfig* config, TQWidget* parent ) DominoConfig::DominoConfig( TDEConfig* config, TQWidget* parent )
: TQObject( parent ) : TQObject( parent )
{ {
conf = new KConfig("kwindominorc"); conf = new TDEConfig("twindominorc");
KGlobal::locale()->insertCatalogue("kwin_clients"); TDEGlobal::locale()->insertCatalogue("twin_clients");
vBox = new TQVBox( parent ); vBox = new TQVBox( parent );
@ -162,7 +162,7 @@ DominoConfig::DominoConfig( KConfig* config, TQWidget* parent )
connect(buttonPressedContourColor, SIGNAL(changed(const TQColor&)), this, SLOT(slotSelectionChanged())); connect(buttonPressedContourColor, SIGNAL(changed(const TQColor&)), this, SLOT(slotSelectionChanged()));
// Make the widgets visible in kwindecoration valueChanged // Make the widgets visible in twindecoration valueChanged
vBox->show(); vBox->show();
} }
@ -180,9 +180,9 @@ void DominoConfig::slotSelectionChanged()
} }
// Loads the configurable options from the kwinrc config file // Loads the configurable options from the twinrc config file
// It is passed the open config from kwindecoration to improve efficiency // It is passed the open config from twindecoration to improve efficiency
void DominoConfig::load(KConfig*) void DominoConfig::load(TDEConfig*)
{ {
conf->setGroup("General"); conf->setGroup("General");
@ -213,8 +213,8 @@ void DominoConfig::load(KConfig*)
} }
// Saves the configurable options to the kwinrc config file // Saves the configurable options to the twinrc config file
void DominoConfig::save(KConfig*) void DominoConfig::save(TDEConfig*)
{ {
conf->setGroup("General"); conf->setGroup("General");

@ -24,7 +24,7 @@
#define DOMINOCONFIG_H #define DOMINOCONFIG_H
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <kconfig.h> #include <tdeconfig.h>
#include <tqvbox.h> #include <tqvbox.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
@ -33,7 +33,7 @@ class DominoConfig: public TQObject
Q_OBJECT Q_OBJECT
public: public:
DominoConfig( KConfig* config, TQWidget* parent ); DominoConfig( TDEConfig* config, TQWidget* parent );
~DominoConfig(); ~DominoConfig();
// These public signals/slots work similar to KCM modules // These public signals/slots work similar to KCM modules
@ -41,15 +41,15 @@ class DominoConfig: public TQObject
void changed(); void changed();
public slots: public slots:
void load(KConfig* config); void load(TDEConfig* config);
void save(KConfig* config); void save(TDEConfig* config);
void defaults(); void defaults();
protected slots: protected slots:
void slotSelectionChanged(); // Internal use void slotSelectionChanged(); // Internal use
void loadButtonContourColors(); void loadButtonContourColors();
private: private:
KConfig* conf; TDEConfig* conf;
TQVBox* vBox; TQVBox* vBox;
TQCheckBox* customBorderColor; TQCheckBox* customBorderColor;
KColorButton* borderColor; KColorButton* borderColor;

@ -2,4 +2,4 @@
Encoding=UTF-8 Encoding=UTF-8
Icon= Icon=
Name=Domino Name=Domino
X-KDE-Library=kwin3_domino X-TDE-Library=twin3_domino

@ -23,8 +23,8 @@
#include "dominoclient.h" #include "dominoclient.h"
#include "clientData.h" #include "clientData.h"
#include <kconfig.h> #include <tdeconfig.h>
#include <kglobal.h> #include <tdeglobal.h>
#include <tqlayout.h> #include <tqlayout.h>
#include <tqbitmap.h> #include <tqbitmap.h>
#include <tqimage.h> #include <tqimage.h>
@ -156,7 +156,7 @@ bool DominoHandler::reset( unsigned long changed )
unsigned long DominoHandler::readConfig( bool update ) unsigned long DominoHandler::readConfig( bool update )
{ {
unsigned long changed = 0; unsigned long changed = 0;
KConfig conf("kwindominorc"); TDEConfig conf("twindominorc");
conf.setGroup("General"); conf.setGroup("General");
titleHeight = TQMAX(TQFontMetrics(options()->font(true)).height(), 16); titleHeight = TQMAX(TQFontMetrics(options()->font(true)).height(), 16);

@ -4,9 +4,9 @@ KDE_CXXFLAGS = -DQT_PLUGIN $(FT2_CFLAGS)
INCLUDES = $(all_includes) INCLUDES = $(all_includes)
stylercdir = $(kde_datadir)/kstyle/themes stylercdir = $(kde_datadir)/tdestyle/themes
stylerc_DATA = domino.themerc stylerc_DATA = domino.themerc
schemedir = $(kde_datadir)/kdisplay/color-schemes schemedir = $(kde_datadir)/tdedisplay/color-schemes
scheme_DATA = Domino.kcsrc scheme_DATA = Domino.kcsrc
noinst_HEADERS = domino.h misc.h data.h noinst_HEADERS = domino.h misc.h data.h
@ -14,7 +14,7 @@ noinst_HEADERS = domino.h misc.h data.h
kde_style_LTLIBRARIES = domino.la kde_style_LTLIBRARIES = domino.la
domino_la_SOURCES = domino.cpp misc.cpp domino_la_SOURCES = domino.cpp misc.cpp
domino_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module $(KDE_RPATH) domino_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module $(KDE_RPATH)
domino_la_LIBADD = $(LIB_KDEUI) $(LIB_KUTILS) $(LIB_QT) -lkdefx -lXrender -lXft $(LIB_KDECORE) domino_la_LIBADD = $(LIB_TDEUI) $(LIB_TDEUTILS) $(LIB_QT) -ltdefx -lXrender -lXft $(LIB_TDECORE)
domino_la_METASOURCES = AUTO domino_la_METASOURCES = AUTO
noinst_LTLIBRARIES = libdomino_style.la noinst_LTLIBRARIES = libdomino_style.la

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

@ -21,7 +21,7 @@
Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org> Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
(C) 2000 Dirk Mueller <mueller@kde.org> (C) 2000 Dirk Mueller <mueller@kde.org>
(C) 2001 Martijn Klingens <klingens@kde.org> (C) 2001 Martijn Klingens <klingens@kde.org>
Progressbar code based on KStyle, Progressbar code based on TDEStyle,
Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org> Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@ -41,9 +41,9 @@
#ifndef __DOMINO_H #ifndef __DOMINO_H
#define __DOMINO_H #define __DOMINO_H
#include <kstyle.h> #include <tdestyle.h>
#include <tqintcache.h> #include <tqintcache.h>
#include <ktoolbarbutton.h> #include <tdetoolbarbutton.h>
#include "misc.h" #include "misc.h"
#include "data.h" #include "data.h"
#include <tqpixmapcache.h> #include <tqpixmapcache.h>
@ -92,7 +92,7 @@ class Rubber;
}; };
class DominoStyle : public KStyle class DominoStyle : public TDEStyle
{ {
Q_OBJECT Q_OBJECT
@ -113,7 +113,7 @@ public:
void polish( TQPalette &p ); void polish( TQPalette &p );
void unPolish(TQWidget* widget ); void unPolish(TQWidget* widget );
void drawKStylePrimitive(KStylePrimitive kpe, void drawTDEStylePrimitive(TDEStylePrimitive kpe,
TQPainter* p, TQPainter* p,
const TQWidget* widget, const TQWidget* widget,
const TQRect &r, const TQRect &r,
@ -334,7 +334,7 @@ protected:
bool mouseOver = false, bool mouseOver = false,
bool horizontal = true, bool horizontal = true,
bool enabled = true, bool enabled = true,
bool khtmlMode = false) const; bool tdehtmlMode = false) const;
void renderHeader(TQPainter *p, void renderHeader(TQPainter *p,
const TQRect &r, const TQRect &r,
@ -397,7 +397,7 @@ protected:
TQPixmap* popupFrame; TQPixmap* popupFrame;
TQPixmap* border1; TQPixmap* border1;
mutable bool alphaButtonMode; mutable bool alphaButtonMode;
bool KApplicationMode; bool TDEApplicationMode;
TQColor _checkMarkColor; TQColor _checkMarkColor;
TQMap<const TQGroupBox*, const TQPixmap*> groupBoxPixmaps; TQMap<const TQGroupBox*, const TQPixmap*> groupBoxPixmaps;
@ -407,7 +407,7 @@ protected:
TQPoint popupMousePressPos; TQPoint popupMousePressPos;
protected slots: protected slots:
void khtmlWidgetDestroyed(TQObject* w); void tdehtmlWidgetDestroyed(TQObject* w);
void groupBoxDestroyed(TQObject* w); void groupBoxDestroyed(TQObject* w);
//Animation slots. //Animation slots.
@ -470,8 +470,8 @@ private:
bool hoveredToolBoxTab; bool hoveredToolBoxTab;
// track khtml widgets. // track tdehtml widgets.
TQMap<const TQWidget*,bool> khtmlWidgets; TQMap<const TQWidget*,bool> tdehtmlWidgets;
//Animation support. //Animation support.
TQMap<TQWidget*, int> progAnimWidgets; TQMap<TQWidget*, int> progAnimWidgets;
@ -817,11 +817,11 @@ class DominoTQWhatsThat : public TQWidget
TQString text; TQString text;
}; };
class DominoKToolBarButton : public KToolBarButton class DominoKToolBarButton : public TDEToolBarButton
{ {
friend class DominoStyle; friend class DominoStyle;
public: public:
DominoKToolBarButton(): KToolBarButton() {} DominoKToolBarButton(): TDEToolBarButton() {}
}; };
class DominoTQListBoxItem : public TQListBoxItem class DominoTQListBoxItem : public TQListBoxItem

@ -2,6 +2,6 @@
Name=Domino Name=Domino
Comment=A style with customizable color gradients Comment=A style with customizable color gradients
Comment[de]=Ein Stil mit anpassbaren Farbverläufen Comment[de]=Ein Stil mit anpassbaren Farbverläufen
ConfigPage=kstyle_domino_config ConfigPage=tdestyle_domino_config
[KDE] [KDE]
WidgetStyle=Domino WidgetStyle=Domino

@ -27,12 +27,12 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
case TQEvent::Paint: { case TQEvent::Paint: {
TQComboBox* cb = dynamic_cast<TQComboBox*>(obj); TQComboBox* cb = dynamic_cast<TQComboBox*>(obj);
bool khtmlWidget = khtmlWidgets.contains(cb); bool tdehtmlWidget = tdehtmlWidgets.contains(cb);
const TQColorGroup & g = cb->colorGroup(); const TQColorGroup & g = cb->colorGroup();
TQPixmap buffer; TQPixmap buffer;
TQPainter p; TQPainter p;
if(khtmlWidget) if(tdehtmlWidget)
p.begin(cb); p.begin(cb);
else { else {
buffer.resize(cb->width(), cb->height()); buffer.resize(cb->width(), cb->height());
@ -42,7 +42,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
p.setFont(cb->font()); p.setFont(cb->font());
if(!khtmlWidget && cb->parentWidget() && cb->parentWidget()->backgroundPixmap()){ if(!tdehtmlWidget && cb->parentWidget() && cb->parentWidget()->backgroundPixmap()){
TQPoint point = cb->backgroundOffset(); TQPoint point = cb->backgroundOffset();
p.drawTiledPixmap( 0, 0, cb->width(), cb->height(), p.drawTiledPixmap( 0, 0, cb->width(), cb->height(),
@ -154,7 +154,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
} }
} }
p.end(); p.end();
if(!khtmlWidget) { if(!tdehtmlWidget) {
p.begin(cb); p.begin(cb);
p.drawPixmap(0, 0, buffer); p.drawPixmap(0, 0, buffer);
} }
@ -187,7 +187,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
return false; return false;
} }
case TQEvent::ApplicationPaletteChange: { case TQEvent::ApplicationPaletteChange: {
if(!khtmlWidgets.contains(static_cast<TQWidget*>(obj))) if(!tdehtmlWidgets.contains(static_cast<TQWidget*>(obj)))
setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Application); setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Application);
return true; return true;
} }
@ -219,11 +219,11 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
if (dynamic_cast<TQLineEdit*>(obj) || (dynamic_cast<TQFrame*>(obj) && dynamic_cast<TQFrame*>(obj)->frameShape() == TQFrame::LineEditPanel) || obj->isA("TQDateTimeEditor")) { if (dynamic_cast<TQLineEdit*>(obj) || (dynamic_cast<TQFrame*>(obj) && dynamic_cast<TQFrame*>(obj)->frameShape() == TQFrame::LineEditPanel) || obj->isA("TQDateTimeEditor")) {
TQWidget* lineEdit = dynamic_cast<TQWidget*>(obj); TQWidget* lineEdit = dynamic_cast<TQWidget*>(obj);
bool khtmlMode = khtmlWidgets.contains(lineEdit); bool tdehtmlMode = tdehtmlWidgets.contains(lineEdit);
bool isLineEdit = dynamic_cast<TQLineEdit*>(obj); bool isLineEdit = dynamic_cast<TQLineEdit*>(obj);
bool isReadOnly = isLineEdit && dynamic_cast<TQLineEdit*>(obj)->isReadOnly(); bool isReadOnly = isLineEdit && dynamic_cast<TQLineEdit*>(obj)->isReadOnly();
TQFrame* frame = dynamic_cast<TQFrame*>(obj); TQFrame* frame = dynamic_cast<TQFrame*>(obj);
if((isReadOnly || khtmlMode) && frame->frameWidth() <= 0) { if((isReadOnly || tdehtmlMode) && frame->frameWidth() <= 0) {
return false; return false;
} }
@ -256,7 +256,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
switch(ev->type()) { switch(ev->type()) {
case TQEvent::Show: case TQEvent::Show:
if(khtmlMode) if(tdehtmlMode)
return true; return true;
case TQEvent::Resize: { case TQEvent::Resize: {
if(noFrame) return false; if(noFrame) return false;
@ -335,8 +335,8 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
// normal lineEdit // normal lineEdit
const TQPixmap* parentBgPix = lineEdit->parentWidget() ? lineEdit->parentWidget()->paletteBackgroundPixmap() : 0; const TQPixmap* parentBgPix = lineEdit->parentWidget() ? lineEdit->parentWidget()->paletteBackgroundPixmap() : 0;
TQPixmap* lineEditEdges = 0; TQPixmap* lineEditEdges = 0;
if(khtmlMode || parentBgPix || !(lineEditEdges = TQPixmapCache::find(TQString::number(bg.pixel(), 16)+TQString::number(cg.background().pixel(), 16)+"lEditEdges"))) { if(tdehtmlMode || parentBgPix || !(lineEditEdges = TQPixmapCache::find(TQString::number(bg.pixel(), 16)+TQString::number(cg.background().pixel(), 16)+"lEditEdges"))) {
if(khtmlMode) { if(tdehtmlMode) {
TQPixmap insidePix = tintImage(qembed_findImage("lineedit4inside"), bg); TQPixmap insidePix = tintImage(qembed_findImage("lineedit4inside"), bg);
bitBlt(lineEdit, x, y, &insidePix, 0, 0, 4, 4); bitBlt(lineEdit, x, y, &insidePix, 0, 0, 4, 4);
@ -379,7 +379,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
TQPixmap* lineEditPix = 0; TQPixmap* lineEditPix = 0;
if(khtmlMode) if(tdehtmlMode)
p.begin(lineEdit); p.begin(lineEdit);
else { else {
lineEditPix = new TQPixmap(w, h); lineEditPix = new TQPixmap(w, h);
@ -422,7 +422,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
p.end(); p.end();
if(!khtmlMode) { if(!tdehtmlMode) {
if(isLineEdit) { if(isLineEdit) {
// simply drawing the pixmap would be faster, but the problem with the base color as erase color for disabled lineEdits would remain. // simply drawing the pixmap would be faster, but the problem with the base color as erase color for disabled lineEdits would remain.
@ -443,24 +443,24 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
case 6/*TQEvent::KeyPress*/: { case 6/*TQEvent::KeyPress*/: {
// it will be reseted in TQLineEdit::mouseMoveEvent() // it will be reseted in TQLineEdit::mouseMoveEvent()
if(isLineEdit && !khtmlMode && isEnabled && !isReadOnly && !isDateTimeEditor) if(isLineEdit && !tdehtmlMode && isEnabled && !isReadOnly && !isDateTimeEditor)
static_cast<TQWidget*>(obj)->setCursor(TQt::blankCursor); static_cast<TQWidget*>(obj)->setCursor(TQt::blankCursor);
return false; return false;
} }
case TQEvent::ApplicationPaletteChange: case TQEvent::ApplicationPaletteChange:
if(!khtmlMode) { if(!tdehtmlMode) {
lineEdit->setBackgroundMode(TQWidget::PaletteBase); lineEdit->setBackgroundMode(TQWidget::PaletteBase);
lineEdit->setPalette(tqApp->palette()); lineEdit->setPalette(tqApp->palette());
} }
return true; return true;
case TQEvent::ParentPaletteChange: case TQEvent::ParentPaletteChange:
if(!khtmlMode) { if(!tdehtmlMode) {
lineEdit->setBackgroundMode(TQWidget::PaletteBase); lineEdit->setBackgroundMode(TQWidget::PaletteBase);
lineEdit->setPalette(lineEdit->parentWidget()->palette()); lineEdit->setPalette(lineEdit->parentWidget()->palette());
} }
return true; return true;
case TQEvent::PaletteChange: case TQEvent::PaletteChange:
if(!khtmlMode) { if(!tdehtmlMode) {
lineEdit->setBackgroundMode(TQWidget::PaletteBase); lineEdit->setBackgroundMode(TQWidget::PaletteBase);
lineEdit->setPalette(lineEdit->palette()); lineEdit->setPalette(lineEdit->palette());
} }
@ -507,7 +507,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
rubber->destroy(); rubber->destroy();
} }
#if KDE_VERSION >= 0x30506 #if TDE_VERSION >= 0x30506
case TQEvent::Show: { case TQEvent::Show: {
char selectionName[64]; char selectionName[64];
snprintf(selectionName, 64, "_NET_WM_CM_S%d", DefaultScreen(tqt_xdisplay())); snprintf(selectionName, 64, "_NET_WM_CM_S%d", DefaultScreen(tqt_xdisplay()));
@ -1017,18 +1017,18 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
} }
return false; return false;
} }
if(::tqt_cast<KToolBarButton*>(obj)) { if(::tqt_cast<TDEToolBarButton*>(obj)) {
switch(ev->type()) { switch(ev->type()) {
case TQEvent::Paint: { case TQEvent::Paint: {
KToolBar *bar = dynamic_cast<KToolBar*>(obj->parent()); TDEToolBar *bar = dynamic_cast<TDEToolBar*>(obj->parent());
if(!bar) return false; // KMyMoney2 if(!bar) return false; // KMyMoney2
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
int index = bar->itemIndex(btn->id()); int index = bar->itemIndex(btn->id());
if(_toolBtnAsBtn && sideRepaint == false) { if(_toolBtnAsBtn && sideRepaint == false) {
sideRepaint = true; sideRepaint = true;
KToolBarButton* sideBtn; TDEToolBarButton* sideBtn;
if((sideBtn = bar->getButton(bar->idAt(index-1)))) { if((sideBtn = bar->getButton(bar->idAt(index-1)))) {
sideBtn->repaint(false); sideBtn->repaint(false);
} }
@ -1065,7 +1065,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
case TQEvent::MouseButtonPress: { case TQEvent::MouseButtonPress: {
if(((TQMouseEvent*)ev)->button() == TQt::RightButton) if(((TQMouseEvent*)ev)->button() == TQt::RightButton)
return false; return false;
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
btn->setUpdatesEnabled(false); btn->setUpdatesEnabled(false);
if(!btn->isOn()) btn->setOn(true); if(!btn->isOn()) btn->setOn(true);
btn->setUpdatesEnabled(true); btn->setUpdatesEnabled(true);
@ -1075,7 +1075,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
case TQEvent::MouseButtonRelease: { case TQEvent::MouseButtonRelease: {
if(((TQMouseEvent*)ev)->button() == TQt::RightButton) if(((TQMouseEvent*)ev)->button() == TQt::RightButton)
return false; return false;
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
btn->setUpdatesEnabled(false); btn->setUpdatesEnabled(false);
if(btn->isOn()) btn->setOn(false); if(btn->isOn()) btn->setOn(false);
btn->setUpdatesEnabled(true); btn->setUpdatesEnabled(true);
@ -1086,13 +1086,13 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
case TQEvent::MouseButtonDblClick: { case TQEvent::MouseButtonDblClick: {
if(((TQMouseEvent*)ev)->button() == TQt::RightButton) if(((TQMouseEvent*)ev)->button() == TQt::RightButton)
return false; return false;
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
if(!btn->isOn()) btn->setOn(true); if(!btn->isOn()) btn->setOn(true);
hoverWidget = 0; hoverWidget = 0;
return false; return false;
} }
case TQEvent::Enter: { case TQEvent::Enter: {
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
if(btn->isEnabled()) { if(btn->isEnabled()) {
hoverWidget = btn; hoverWidget = btn;
btn->repaint(false); btn->repaint(false);
@ -1100,7 +1100,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
return false; return false;
} }
case TQEvent::Leave: { case TQEvent::Leave: {
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
if(btn == hoverWidget) { if(btn == hoverWidget) {
hoverWidget = 0; hoverWidget = 0;
btn->repaint(false); btn->repaint(false);
@ -1109,7 +1109,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
} }
case TQEvent::Move: { case TQEvent::Move: {
if(_toolBtnAsBtn) { if(_toolBtnAsBtn) {
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
btn->repaint(false); btn->repaint(false);
} }
return false; return false;
@ -1149,7 +1149,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
drawControl(CE_RadioButton, &p, rb, TQRect(0,0,17,17), rb->palette().active(), flags); drawControl(CE_RadioButton, &p, rb, TQRect(0,0,17,17), rb->palette().active(), flags);
return true; return true;
} }
if (ev->type() == TQEvent::Show && !strcmp(obj->name(), "__khtml")) { if (ev->type() == TQEvent::Show && !strcmp(obj->name(), "__tdehtml")) {
TQRadioButton* rb = static_cast<TQRadioButton*>(obj); TQRadioButton* rb = static_cast<TQRadioButton*>(obj);
TQBitmap bm(rb->size()); TQBitmap bm(rb->size());
bm.fill(color0); bm.fill(color0);
@ -1192,9 +1192,9 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
if (ev->type() == TQEvent::Paint) { if (ev->type() == TQEvent::Paint) {
TQCheckBox* cb = static_cast<TQCheckBox*>(obj); TQCheckBox* cb = static_cast<TQCheckBox*>(obj);
bool khtmlWidget = !strcmp(obj->name(), "__khtml"); bool tdehtmlWidget = !strcmp(obj->name(), "__tdehtml");
if(khtmlWidget || cb->paletteBackgroundPixmap()) { if(tdehtmlWidget || cb->paletteBackgroundPixmap()) {
if(khtmlWidget) { if(tdehtmlWidget) {
// this prevents the checkbox been erased before the rest of the html page // this prevents the checkbox been erased before the rest of the html page
TQBitmap bm(cb->size()); TQBitmap bm(cb->size());
bm.fill(color0); bm.fill(color0);
@ -1287,14 +1287,14 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
} }
case TQEvent::MouseMove: { case TQEvent::MouseMove: {
TQMouseEvent* e = (TQMouseEvent*)ev; TQMouseEvent* e = (TQMouseEvent*)ev;
if(dynamic_cast<TQToolButton*>(obj) && popupTimer->isActive() && ((e->pos()-popupMousePressPos).manhattanLength() > 4 /*KGlobalSettings::dndEventDelay()*/)) if(dynamic_cast<TQToolButton*>(obj) && popupTimer->isActive() && ((e->pos()-popupMousePressPos).manhattanLength() > 4 /*TDEGlobalSettings::dndEventDelay()*/))
popupToolMenu(); popupToolMenu();
return false; return false;
} }
case TQEvent::ParentPaletteChange: { case TQEvent::ParentPaletteChange: {
if(obj->isA("TQToolButton")) { if(obj->isA("TQToolButton")) {
if(w->parentWidget() && !khtmlWidgets.contains(w)) { if(w->parentWidget() && !tdehtmlWidgets.contains(w)) {
w->setUpdatesEnabled(false); w->setUpdatesEnabled(false);
if(w->parentWidget()->paletteBackgroundPixmap()) { if(w->parentWidget()->paletteBackgroundPixmap()) {
w->setBackgroundOrigin(setPixmapOrigin(w->parentWidget()->backgroundOrigin())); w->setBackgroundOrigin(setPixmapOrigin(w->parentWidget()->backgroundOrigin()));
@ -1364,12 +1364,12 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
return false; return false;
} }
if(dynamic_cast<KPopupTitle*>(obj)) { if(dynamic_cast<TDEPopupTitle*>(obj)) {
switch(ev->type()) { switch(ev->type()) {
case TQEvent::Paint: { case TQEvent::Paint: {
KPopupTitle* pt = static_cast<KPopupTitle*>(obj); TDEPopupTitle* pt = static_cast<TDEPopupTitle*>(obj);
TQRect r = pt->rect(); TQRect r = pt->rect();
TQPainter p(pt); TQPainter p(pt);
@ -1770,7 +1770,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
p.fillRect(r.width()-16, r.height()-16, 15, 15, tqApp->palette().active().background()); // 15x15 scrollview cornerwidget gap p.fillRect(r.width()-16, r.height()-16, 15, 15, tqApp->palette().active().background()); // 15x15 scrollview cornerwidget gap
return true; return true;
} }
else if(konquerorMode && f->isA("KHTMLView")) { else if(konquerorMode && f->isA("TDEHTMLView")) {
TQPainter p(f); TQPainter p(f);
p.setPen(tqApp->palette().active().background().dark(120)); p.setPen(tqApp->palette().active().background().dark(120));
p.drawRect(f->rect()); p.drawRect(f->rect());
@ -1796,7 +1796,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
f->setMargin(0); f->setMargin(0);
TQWidget* w = f->parentWidget(); TQWidget* w = f->parentWidget();
for(int i=0; i<3; i++) { // the third parentcheck is for the tabWidget on kcm khtml_plugins for(int i=0; i<3; i++) { // the third parentcheck is for the tabWidget on kcm tdehtml_plugins
if(!w) break; if(!w) break;
if(dynamic_cast<TQGroupBox*>(w)) { if(dynamic_cast<TQGroupBox*>(w)) {
f->setPaletteBackgroundColor(tqApp->palette().active().background()); f->setPaletteBackgroundColor(tqApp->palette().active().background());

@ -1,8 +1,8 @@
INCLUDES = $(all_includes) $(FT2_CFLAGS) INCLUDES = $(all_includes) $(FT2_CFLAGS)
noinst_HEADERS = dominoconf.h noinst_HEADERS = dominoconf.h
kde_module_LTLIBRARIES = kstyle_domino_config.la kde_module_LTLIBRARIES = tdestyle_domino_config.la
kstyle_domino_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module tdestyle_domino_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
kstyle_domino_config_la_LIBADD = $(LIB_KDEUI) ../domino/libdomino_style.la $(LIB_QT) $(LIB_KDECORE) -lkdefx $(LIB_KIO) tdestyle_domino_config_la_LIBADD = $(LIB_TDEUI) ../domino/libdomino_style.la $(LIB_QT) $(LIB_TDECORE) -ltdefx $(LIB_TDEIO)
kstyle_domino_config_la_SOURCES = dominoconf.cpp tdestyle_domino_config_la_SOURCES = dominoconf.cpp
kstyle_domino_config_la_METASOURCES = AUTO tdestyle_domino_config_la_METASOURCES = AUTO

@ -31,8 +31,8 @@ DEALINGS IN THE SOFTWARE.
#include <tqlayout.h> #include <tqlayout.h>
#include <tqhbox.h> #include <tqhbox.h>
#include <tqsettings.h> #include <tqsettings.h>
#include <kglobal.h> #include <tdeglobal.h>
#include <klocale.h> #include <tdelocale.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqwidget.h> #include <tqwidget.h>
#include <tqgroupbox.h> #include <tqgroupbox.h>
@ -57,12 +57,12 @@ DEALINGS IN THE SOFTWARE.
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <tqdir.h> #include <tqdir.h>
#include <tqbuttongroup.h> #include <tqbuttongroup.h>
#include <kmessagebox.h> #include <tdemessagebox.h>
#include <tqtabbar.h> #include <tqtabbar.h>
#include <ktabwidget.h> #include <ktabwidget.h>
#include <tqslider.h> #include <tqslider.h>
#include <kfiledialog.h> #include <tdefiledialog.h>
#include <kio/netaccess.h> #include <tdeio/netaccess.h>
#include <tqvbuttongroup.h> #include <tqvbuttongroup.h>
#include <X11/Xft/Xft.h> #include <X11/Xft/Xft.h>
@ -77,9 +77,9 @@ DEALINGS IN THE SOFTWARE.
extern "C" extern "C"
{ {
KDE_EXPORT TQWidget* allocate_kstyle_config(TQWidget* parent) KDE_EXPORT TQWidget* allocate_tdestyle_config(TQWidget* parent)
{ {
KGlobal::locale()->insertCatalogue("kstyle_domino_config"); TDEGlobal::locale()->insertCatalogue("tdestyle_domino_config");
return new DominoStyleConfig(parent); return new DominoStyleConfig(parent);
} }
} }
@ -98,7 +98,7 @@ DominoStyleConfig::DominoStyleConfig(TQWidget* parent): TQWidget(parent)
//Should have no margins here, the dialog provides them //Should have no margins here, the dialog provides them
TQVBoxLayout* layout = new TQVBoxLayout(this, 0, 1); TQVBoxLayout* layout = new TQVBoxLayout(this, 0, 1);
KGlobal::locale()->insertCatalogue("kstyle_domino_config"); TDEGlobal::locale()->insertCatalogue("tdestyle_domino_config");
DominoKTabWidget *tabWidget = new DominoKTabWidget(this); DominoKTabWidget *tabWidget = new DominoKTabWidget(this);
layout->addWidget(tabWidget); layout->addWidget(tabWidget);
@ -3916,9 +3916,9 @@ void DominoStyleConfig::slotImport() {
} }
TQString saveDir = TQDir::homeDirPath() + "/.qt/"; TQString saveDir = TQDir::homeDirPath() + "/.qt/";
if (!KIO::NetAccess::file_copy(file, KURL( saveDir+fName ), -1, true ) ) if (!TDEIO::NetAccess::file_copy(file, KURL( saveDir+fName ), -1, true ) )
{ {
KMessageBox::error(this, KIO::NetAccess::lastErrorString(),i18n("Import failed.")); KMessageBox::error(this, TDEIO::NetAccess::lastErrorString(),i18n("Import failed."));
return; return;
} }
} }

Loading…
Cancel
Save