Browse Source

Initial TDE conversion

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 6 years ago
parent
commit
8f61d29f9c
  1. 2
      ChangeLog
  2. 12
      client/Makefile.am
  3. 8
      client/config/Makefile.am
  4. 28
      client/config/config.cpp
  5. 10
      client/config/config.h
  6. 2
      client/domino.desktop
  7. 6
      client/dominoclient.cpp
  8. 6
      domino/Makefile.am
  9. 206
      domino/domino.cpp
  10. 24
      domino/domino.h
  11. 2
      domino/domino.themerc
  12. 74
      domino/eventfilter.cpp
  13. 10
      dominoConfig/Makefile.am
  14. 20
      dominoConfig/dominoconf.cpp

2
ChangeLog

@ -8,7 +8,7 @@
* 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).
* 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)
* adapts KMenu's section header style
* fixes Kickoff's tab icon alignment

12
client/Makefile.am

@ -1,16 +1,16 @@
INCLUDES = $(all_includes) -I$(kde_includes)/kwin
INCLUDES = $(all_includes) -I$(kde_includes)/twin
SUBDIRS = . config
kde_module_LTLIBRARIES = kwin3_domino.la
kde_module_LTLIBRARIES = twin3_domino.la
kwin3_domino_la_SOURCES = dominoclient.cpp
kwin3_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_SOURCES = dominoclient.cpp
twin3_domino_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module -L/usr/X11R6/lib
twin3_domino_la_LIBADD = $(LIB_TDECORE) $(kde_libraries)/libtdecorations.la -lXext -lX11 $(LIB_QT)
METASOURCES = AUTO
noinst_HEADERS = dominoclient.h
lnkdir = $(kde_datadir)/kwin
lnkdir = $(kde_datadir)/twin
lnk_DATA = domino.desktop

8
client/config/Makefile.am

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

28
client/config/config.cpp

@ -21,8 +21,8 @@
*/
#include "config.h"
#include <kglobal.h>
#include <klocale.h>
#include <tdeglobal.h>
#include <tdelocale.h>
#include <tqvbox.h>
#include <tqlayout.h>
#include <tqlabel.h>
@ -31,24 +31,24 @@
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));
}
}
// 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.
// '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 )
{
conf = new KConfig("kwindominorc");
conf = new TDEConfig("twindominorc");
KGlobal::locale()->insertCatalogue("kwin_clients");
TDEGlobal::locale()->insertCatalogue("twin_clients");
vBox = new TQVBox( parent );
@ -162,7 +162,7 @@ DominoConfig::DominoConfig( KConfig* config, TQWidget* parent )
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();
}
@ -180,9 +180,9 @@ void DominoConfig::slotSelectionChanged()
}
// Loads the configurable options from the kwinrc config file
// It is passed the open config from kwindecoration to improve efficiency
void DominoConfig::load(KConfig*)
// Loads the configurable options from the twinrc config file
// It is passed the open config from twindecoration to improve efficiency
void DominoConfig::load(TDEConfig*)
{
conf->setGroup("General");
@ -213,8 +213,8 @@ void DominoConfig::load(KConfig*)
}
// Saves the configurable options to the kwinrc config file
void DominoConfig::save(KConfig*)
// Saves the configurable options to the twinrc config file
void DominoConfig::save(TDEConfig*)
{
conf->setGroup("General");

10
client/config/config.h

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

2
client/domino.desktop

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

6
client/dominoclient.cpp

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

6
domino/Makefile.am

@ -4,9 +4,9 @@ KDE_CXXFLAGS = -DQT_PLUGIN $(FT2_CFLAGS)
INCLUDES = $(all_includes)
stylercdir = $(kde_datadir)/kstyle/themes
stylercdir = $(kde_datadir)/tdestyle/themes
stylerc_DATA = domino.themerc
schemedir = $(kde_datadir)/kdisplay/color-schemes
schemedir = $(kde_datadir)/tdedisplay/color-schemes
scheme_DATA = Domino.kcsrc
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
domino_la_SOURCES = domino.cpp misc.cpp
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
noinst_LTLIBRARIES = libdomino_style.la

206
domino/domino.cpp

@ -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 KStyle,
Progressbar code based on TDEStyle,
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 <kglobalsettings.h>
#include <tdeglobalsettings.h>
#include <tqpainter.h>
#include <tqtabbar.h>
#include <tqprogressbar.h>
@ -49,7 +49,7 @@
#include <tqstyleplugin.h>
#include <tqpushbutton.h>
#include <tqtoolbutton.h>
#include <kpopupmenu.h>
#include <tdepopupmenu.h>
#include <tqradiobutton.h>
#include <tqslider.h>
#include <tqsettings.h>
@ -59,26 +59,26 @@
#include <tqdockarea.h>
#include <tqobjectlist.h>
#include <tqheader.h>
#include <klistview.h>
#include <tdelistview.h>
#include <tqstatusbar.h>
#include <tqcombobox.h>
#include <tqtabwidget.h>
#include <ktoolbar.h>
#include <tdetoolbar.h>
#include <tqlabel.h>
#include <tqsimplerichtext.h>
#include <tqiconview.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <tqapplication.h>
#include <tqtoolbox.h>
#include <tqstylesheet.h>
// #include <tqsplitter.h>
#include <tqwidgetstack.h>
#include <tqtimer.h>
#include <kmultitabbar.h>
#include <tdemultitabbar.h>
#include <tqspinbox.h>
#include <tqcursor.h>
#include <tqtextedit.h>
#include <kdeversion.h>
#include <tdeversion.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( KStyle::Default /*AllowMenuTransparency*/, ThreeButtonScrollBar )
DominoStyle::DominoStyle() : TDEStyle( TDEStyle::Default /*AllowMenuTransparency*/, ThreeButtonScrollBar )
{
konsoleMode = false;
kickerMode = false;
@ -276,7 +276,7 @@ KDE_Q_EXPORT_PLUGIN( DominoStylePlugin )
oldRubberRect = TQRect();
rubber = 0;
ignoreNextFocusRect = false;
#if KDE_VERSION < 0x30506
#if TDE_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")) {
KGlobal::config()->setGroup("General");
minTabLength = KGlobal::config()->readNumEntry("MinimumTabLength", 3);
TDEGlobal::config()->setGroup("General");
minTabLength = TDEGlobal::config()->readNumEntry("MinimumTabLength", 3);
}
else
minTabLength = 0;
if(!strcmp(tqApp->className(), "KApplication")) {
TQString oldgroup = KGlobal::config()->group();
KGlobal::config()->setGroup("KDE");
macStyleBar = KGlobal::config()->readBoolEntry("macStyle", false);
KGlobal::config()->setGroup(oldgroup); // reset the group, do not interfere with the application
KApplicationMode = true;
if(!strcmp(tqApp->className(), "TDEApplication")) {
TQString oldgroup = TDEGlobal::config()->group();
TDEGlobal::config()->setGroup("KDE");
macStyleBar = TDEGlobal::config()->readBoolEntry("macStyle", false);
TDEGlobal::config()->setGroup(oldgroup); // reset the group, do not interfere with the application
TDEApplicationMode = true;
}
else {
macStyleBar = false;
KApplicationMode = false;
TDEApplicationMode = false;
}
@ -695,15 +695,15 @@ void DominoStyle::polish(TQPalette &p) {
void DominoStyle::polish(TQWidget* widget)
{
if(!strcmp(widget->name(), "__khtml")) { // is it a khtml widget...?
khtmlWidgets[widget] = true;
connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(khtmlWidgetDestroyed(TQObject*)));
if(!strcmp(widget->name(), "__tdehtml")) { // is it a tdehtml widget...?
tdehtmlWidgets[widget] = true;
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->parentWidget()->setBackgroundMode(TQt::NoBackground);
khtmlWidgets[widget] = true;
connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(khtmlWidgetDestroyed(TQObject*)));
tdehtmlWidgets[widget] = true;
connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(tdehtmlWidgetDestroyed(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() && !khtmlWidgets.contains(widget)) {
if(widget->parentWidget() && widget->parentWidget()->paletteBackgroundPixmap() && !tdehtmlWidgets.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<KToolBarButton*>(widget)) {
KToolBarButton* tb = static_cast<KToolBarButton*>(widget);
else if(dynamic_cast<TDEToolBarButton*>(widget)) {
TDEToolBarButton* tb = static_cast<TDEToolBarButton*>(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() && !khtmlWidgets.contains(widget)) {
if(widget->parentWidget() && widget->parentWidget()->paletteBackgroundPixmap() && !tdehtmlWidgets.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("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->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<KToolBarSeparator*>(widget) || dynamic_cast<TQToolBar*>(widget)) {
else if(dynamic_cast<TDEToolBarSeparator*>(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<KPopupTitle*>(widget)) {
else if(dynamic_cast<TDEPopupTitle*>(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 khtml_plugins
for(int i=0; i<3; i++) { // the third parentcheck is for the tabWidget on kcm tdehtml_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(), "__khtml") || (!strcmp(widget->name(), "kfile button") && !strcmp(widget->parentWidget()->name(), "__khtml"))) { // is it a khtml widget...?
khtmlWidgets.remove(widget);
if( !strcmp(widget->name(), "__tdehtml") || (!strcmp(widget->name(), "tdefile button") && !strcmp(widget->parentWidget()->name(), "__tdehtml"))) { // is it a tdehtml widget...?
tdehtmlWidgets.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<KToolBarButton*>(widget)) {
else if(dynamic_cast<TDEToolBarButton*>(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<KToolBarSeparator*>(widget) || dynamic_cast<TQToolBar*>(widget) ) {
else if(dynamic_cast<TDEToolBarSeparator*>(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("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);
f->setFrameStyle(TQFrame::NoFrame|TQFrame::Plain);
f->setLineWidth(0);
}
}
else if(dynamic_cast<KPopupTitle*>(widget)) {
else if(dynamic_cast<TDEPopupTitle*>(widget)) {
widget->removeEventFilter(this);
}
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)
@ -1941,14 +1941,14 @@ void DominoStyle::renderButton(TQPainter *p,
bool /*mouseOver*/,
bool horizontal,
bool enabled,
bool khtmlMode) const
bool tdehtmlMode) const
{
uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom;
if(!enabled) contourFlags|=Is_Disabled;
if(khtmlMode || buttonContour->alphaMode() /* || kickerMode*/) {
if(tdehtmlMode || buttonContour->alphaMode() /* || kickerMode*/) {
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) {
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,
const TQWidget* widget,
const TQRect &r,
@ -2693,7 +2693,7 @@ void DominoStyle::drawKStylePrimitive(KStylePrimitive kpe,
SFlags flags,
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
// ------
@ -2948,7 +2948,7 @@ void DominoStyle::drawKStylePrimitive(KStylePrimitive kpe,
break;
}
// copied and slightly modified from KStyle.
// copied and slightly modified from TDEStyle.
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::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) {
@ -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, khtmlWidgets.contains(opt.widget()) );
renderButton(p, r, cg, (on||down), mouseOver, true, enabled, tdehtmlWidgets.contains(opt.widget()) );
buttonContour->reset();
break;
}
@ -4353,7 +4353,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe,
case PE_RubberBand: {
#if KDE_VERSION >= 0x30506
#if TDE_VERSION >= 0x30506
if(rubberBandType != ArgbRubber || !compositeManagerRunning) {
#else
if(rubberBandType != ArgbRubber) {
@ -4365,7 +4365,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe,
p->restore();
}
else {
KStyle::drawPrimitive(pe, p, r, cg, flags, opt);
TDEStyle::drawPrimitive(pe, p, r, cg, flags, opt);
}
break;
}
@ -4642,7 +4642,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe,
}
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);
//return KStyle::drawControl(element, p, widget, r, cg, flags, opt);
//return TDEStyle::drawControl(element, p, widget, r, cg, flags, opt);
switch (element) {
case CE_ToolButtonLabel: {
if(widget->isA("KToolBarButton")) {
if(widget->isA("TDEToolBarButton")) {
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(KGlobalSettings::toolBarFont());
TQFont tmp_font(TDEGlobalSettings::toolBarFont());
TQFontMetrics fm(tmp_font);
TQRect textRect;
int textFlags = 0;
TQPixmap pixmap;
if (tb->iconTextMode() != KToolBar::TextOnly) {
if (tb->iconTextMode() != TDEToolBar::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() == KToolBar::IconOnly) // icon only
if (tb->iconTextMode() == TDEToolBar::IconOnly) // icon only
{
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())
{
@ -4751,7 +4751,7 @@ void DominoStyle::drawControl(ControlElement element,
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())
{
@ -4762,7 +4762,7 @@ void DominoStyle::drawControl(ControlElement element,
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())
{
@ -4787,13 +4787,13 @@ void DominoStyle::drawControl(ControlElement element,
}
if (!tb->textLabel().isNull() && !textRect.isNull())
{
p->setFont(KGlobalSettings::toolBarFont());
p->setFont(TDEGlobalSettings::toolBarFont());
TQColor pencolor;
if (!tb->isEnabled())
pencolor = tb->palette().disabled().dark();
// replaced through icon highlights
// else if(tb->isRaised())
// pencolor = KGlobalSettings::toolBarHighlightColor();
// pencolor = TDEGlobalSettings::toolBarHighlightColor();
else
pencolor = tb->colorGroup().buttonText();
@ -5087,7 +5087,7 @@ void DominoStyle::drawControl(ControlElement element,
case CE_CheckBox: {
TQColorGroup g = cg;
if(!khtmlWidgets.contains(widget))
if(!tdehtmlWidgets.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(!khtmlWidgets.contains(widget))
if(!tdehtmlWidgets.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:
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
@ -5256,7 +5256,7 @@ void DominoStyle::drawControl(ControlElement element,
case CE_PushButton: {
TQPushButton *button = (TQPushButton *)widget;
bool khtmlMode = khtmlWidgets.contains(button);
bool tdehtmlMode = tdehtmlWidgets.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(!khtmlMode && !button->paletteBackgroundPixmap()) {
if(!tdehtmlMode && !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(khtmlMode) contourFlags|=Draw_AlphaBlend;
if(tdehtmlMode) 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(!KApplicationMode) {
if(!TDEApplicationMode) {
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(KApplicationMode) {
if(TDEApplicationMode) {
if (active)
mode = enabled ? TQIconSet::Active : TQIconSet::Disabled;
else
@ -5873,7 +5873,7 @@ void DominoStyle::drawControl(ControlElement element,
break;
}
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: {
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);
//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) {
@ -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 = khtmlWidgets.contains(cb);
bool isKhtmlWidget = tdehtmlWidgets.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<KToolBarButton*>(tb)) {
if(_toolBtnAsBtn && ::tqt_cast<TDEToolBarButton*>(tb)) {
const bool reverse = TQApplication::reverseLayout();
KToolBar *bar = dynamic_cast<KToolBar*>(tb->parentWidget());
TDEToolBar *bar = dynamic_cast<TDEToolBar*>(tb->parentWidget());
if(!bar) break;
KToolBarButton* btn = ::tqt_cast<KToolBarButton*>(tb);
KToolBarButton* prevBtn = 0;
KToolBarButton* nextBtn = 0;
TDEToolBarButton* btn = ::tqt_cast<TDEToolBarButton*>(tb);
TDEToolBarButton* prevBtn = 0;
TDEToolBarButton* 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 KToolBarButton
else if(_toolBtnAsBtn) { // not a TDEToolBarButton
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, 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();
@ -6439,7 +6439,7 @@ void DominoStyle::drawComplexControl(ComplexControl control,
}
else {
bool isKbtn = ::tqt_cast<KToolBarButton*>(tb);
bool isKbtn = ::tqt_cast<TDEToolBarButton*>(tb);
TQPixmap buffer(tb->size());
TQPainter painter(&buffer);
@ -6773,7 +6773,7 @@ void DominoStyle::drawComplexControl(ComplexControl control,
break;
}
default:
KStyle::drawComplexControl(control, p, widget,
TDEStyle::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 = KStyle::subRect(r, widget);
TQRect fr = TDEStyle::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 = KStyle::subRect(r, widget);
TQRect fr = TDEStyle::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 KStyle::subRect(r, widget);
return TDEStyle::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 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);
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 KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
return TDEStyle::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 KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
return TDEStyle::querySubControlMetrics(control, widget, subcontrol, opt);
}
}
break;
@ -6973,14 +6973,14 @@ TQRect DominoStyle::querySubControlMetrics(ComplexControl control,
}
}
default: {
return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
return TDEStyle::querySubControlMetrics(control, widget, subcontrol, opt);
}
}
}
int DominoStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
//return KStyle::pixelMetric(m, widget);
//return TDEStyle::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 KStyle::pixelMetric(m, widget);
return TDEStyle::pixelMetric(m, widget);
}
}
@ -7133,7 +7133,7 @@ TQSize DominoStyle::sizeFromContents(ContentsType t,
const TQSize &s,
const TQStyleOption &opt) const
{
//return KStyle::sizeFromContents (t, widget, s, opt);
//return TDEStyle::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 = KStyle::sizeFromContents( t, widget, s, opt );
TQSize sz = TDEStyle::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 KStyle::sizeFromContents (t, widget, s, opt); // KMultiTabBar buttons
return TDEStyle::sizeFromContents (t, widget, s, opt); // KMultiTabBar buttons
}
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();
return ( TQSize( sz.width(), h < 24 ? 24 : h) );
}
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);
}
@ -7292,10 +7292,10 @@ TQSize DominoStyle::sizeFromContents(ContentsType t,
return TQSize(w, h);
}
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,
@ -7335,7 +7335,7 @@ int DominoStyle::styleHint( StyleHint stylehint,
return '*';
}
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:
return TQPixmap(qembed_findImage("ToDesktopButton").copy(0,0,12,12));
default:
return KStyle::stylePixmap(stylepixmap, widget, opt);
return TDEStyle::stylePixmap(stylepixmap, widget, opt);
}
}

24
domino/domino.h

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

2
domino/domino.themerc

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

74
domino/eventfilter.cpp

@ -27,12 +27,12 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
case TQEvent::Paint: {
TQComboBox* cb = dynamic_cast<TQComboBox*>(obj);
bool khtmlWidget = khtmlWidgets.contains(cb);
bool tdehtmlWidget = tdehtmlWidgets.contains(cb);
const TQColorGroup & g = cb->colorGroup();
TQPixmap buffer;
TQPainter p;
if(khtmlWidget)
if(tdehtmlWidget)
p.begin(cb);
else {
buffer.resize(cb->width(), cb->height());
@ -42,7 +42,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
p.setFont(cb->font());
if(!khtmlWidget && cb->parentWidget() && cb->parentWidget()->backgroundPixmap()){
if(!tdehtmlWidget && cb->parentWidget() && cb->parentWidget()->backgroundPixmap()){
TQPoint point = cb->backgroundOffset();
p.drawTiledPixmap( 0, 0, cb->width(), cb->height(),
@ -154,7 +154,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
}
}
p.end();
if(!khtmlWidget) {
if(!tdehtmlWidget) {
p.begin(cb);
p.drawPixmap(0, 0, buffer);
}
@ -187,7 +187,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
return false;
}
case TQEvent::ApplicationPaletteChange: {
if(!khtmlWidgets.contains(static_cast<TQWidget*>(obj)))
if(!tdehtmlWidgets.contains(static_cast<TQWidget*>(obj)))
setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Application);
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")) {
TQWidget* lineEdit = dynamic_cast<TQWidget*>(obj);
bool khtmlMode = khtmlWidgets.contains(lineEdit);
bool tdehtmlMode = tdehtmlWidgets.contains(lineEdit);
bool isLineEdit = dynamic_cast<TQLineEdit*>(obj);
bool isReadOnly = isLineEdit && dynamic_cast<TQLineEdit*>(obj)->isReadOnly();
TQFrame* frame = dynamic_cast<TQFrame*>(obj);
if((isReadOnly || khtmlMode) && frame->frameWidth() <= 0) {
if((isReadOnly || tdehtmlMode) && frame->frameWidth() <= 0) {
return false;
}
@ -256,7 +256,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
switch(ev->type()) {
case TQEvent::Show:
if(khtmlMode)
if(tdehtmlMode)
return true;
case TQEvent::Resize: {
if(noFrame) return false;
@ -335,8 +335,8 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
// normal lineEdit
const TQPixmap* parentBgPix = lineEdit->parentWidget() ? lineEdit->parentWidget()->paletteBackgroundPixmap() : 0;
TQPixmap* lineEditEdges = 0;
if(khtmlMode || parentBgPix || !(lineEditEdges = TQPixmapCache::find(TQString::number(bg.pixel(), 16)+TQString::number(cg.background().pixel(), 16)+"lEditEdges"))) {
if(khtmlMode) {
if(tdehtmlMode || parentBgPix || !(lineEditEdges = TQPixmapCache::find(TQString::number(bg.pixel(), 16)+TQString::number(cg.background().pixel(), 16)+"lEditEdges"))) {
if(tdehtmlMode) {
TQPixmap insidePix = tintImage(qembed_findImage("lineedit4inside"), bg);
bitBlt(lineEdit, x, y, &insidePix, 0, 0, 4, 4);
@ -379,7 +379,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
TQPixmap* lineEditPix = 0;
if(khtmlMode)
if(tdehtmlMode)
p.begin(lineEdit);
else {
lineEditPix = new TQPixmap(w, h);
@ -422,7 +422,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
p.end();
if(!khtmlMode) {
if(!tdehtmlMode) {
if(isLineEdit) {
// 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 6/*TQEvent::KeyPress*/: {
// 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);
return false;
}
case TQEvent::ApplicationPaletteChange:
if(!khtmlMode) {
if(!tdehtmlMode) {
lineEdit->setBackgroundMode(TQWidget::PaletteBase);
lineEdit->setPalette(tqApp->palette());
}
return true;
case TQEvent::ParentPaletteChange:
if(!khtmlMode) {
if(!tdehtmlMode) {
lineEdit->setBackgroundMode(TQWidget::PaletteBase);
lineEdit->setPalette(lineEdit->parentWidget()->palette());
}
return true;
case TQEvent::PaletteChange:
if(!khtmlMode) {
if(!tdehtmlMode) {
lineEdit->setBackgroundMode(TQWidget::PaletteBase);
lineEdit->setPalette(lineEdit->palette());
}
@ -507,7 +507,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
rubber->destroy();
}
#if KDE_VERSION >= 0x30506
#if TDE_VERSION >= 0x30506
case TQEvent::Show: {
char selectionName[64];
snprintf(selectionName, 64, "_NET_WM_CM_S%d", DefaultScreen(tqt_xdisplay()));
@ -1017,18 +1017,18 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
}
return false;
}
if(::tqt_cast<KToolBarButton*>(obj)) {
if(::tqt_cast<TDEToolBarButton*>(obj)) {