no one disagreed on the list so rename default and add a deskop file

svn path=/trunk/KDE/kdebase/workspace/; revision=694801
This commit is contained in:
Gerd Fleischer 2007-07-31 19:37:29 +00:00
parent 768fa6432f
commit e6d07e906d
7 changed files with 120 additions and 108 deletions

View file

@ -3,12 +3,14 @@ add_subdirectory( config )
########### next target ############### ########### next target ###############
set(kwin3_default_PART_SRCS kdedefault.cpp) set(kwin3_kde2_PART_SRCS kdedefault.cpp)
kde4_add_plugin(kwin3_default ${kwin3_default_PART_SRCS}) kde4_add_plugin(kwin3_kde2 ${kwin3_kde2_PART_SRCS})
target_link_libraries(kwin3_default ${KDE4_KDEFX_LIBS} kdecorations ${QT_QTGUI_LIBRARY}) target_link_libraries(kwin3_kde2 ${KDE4_KDEFX_LIBS} kdecorations ${QT_QTGUI_LIBRARY})
install(TARGETS kwin3_default DESTINATION ${PLUGIN_INSTALL_DIR}) install(TARGETS kwin3_kde2 DESTINATION ${PLUGIN_INSTALL_DIR})
install( FILES kde2.desktop DESTINATION ${DATA_INSTALL_DIR}/kwin/ )

View file

@ -3,14 +3,14 @@
########### next target ############### ########### next target ###############
set(kwin_default_config_PART_SRCS config.cpp ) set(kwin_kde2_config_PART_SRCS config.cpp )
kde4_add_plugin(kwin_default_config ${kwin_default_config_PART_SRCS}) kde4_add_plugin(kwin_kde2_config ${kwin_kde2_config_PART_SRCS})
target_link_libraries(kwin_default_config ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY}) target_link_libraries(kwin_kde2_config ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY})
install(TARGETS kwin_default_config DESTINATION ${PLUGIN_INSTALL_DIR} ) install(TARGETS kwin_kde2_config DESTINATION ${PLUGIN_INSTALL_DIR} )

View file

@ -8,18 +8,20 @@
*/ */
#include "config.h" #include "config.h"
#include <kglobal.h>
#include <QWhatsThis> #include <QWhatsThis>
#include <QPixmap>
#include <kglobal.h>
#include <kdialog.h> #include <kdialog.h>
#include <klocale.h> #include <klocale.h>
#include <QPixmap>
#include <kvbox.h> #include <kvbox.h>
extern "C" extern "C"
{ {
KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent ) KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent )
{ {
return(new KDEDefaultConfig(conf, parent)); return(new KDE2Config(conf, parent));
} }
} }
@ -29,13 +31,13 @@ extern "C"
// 'parent' is the parent of the QObject, which is a VBox inside the // 'parent' is the parent of the QObject, which is a VBox inside the
// Configure tab in kwindecoration // Configure tab in kwindecoration
KDEDefaultConfig::KDEDefaultConfig( KConfig* conf, QWidget* parent ) KDE2Config::KDE2Config( KConfig* conf, QWidget* parent )
: QObject( parent ),c(conf) : QObject( parent ), c(conf)
{ {
KGlobal::locale()->insertCatalog("kwin_clients"); KGlobal::locale()->insertCatalog("kwin_clients");
highcolor = QPixmap::defaultDepth() > 8; highcolor = QPixmap::defaultDepth() > 8;
gb = new KVBox( parent ); gb = new KVBox( parent );
gb->setSpacing( KDialog::spacingHint() ); gb->setSpacing( KDialog::spacingHint() );
cbShowStipple = new QCheckBox( i18n("Draw titlebar &stipple effect"), gb ); cbShowStipple = new QCheckBox( i18n("Draw titlebar &stipple effect"), gb );
cbShowStipple->setWhatsThis( cbShowStipple->setWhatsThis(
@ -58,7 +60,8 @@ KDEDefaultConfig::KDEDefaultConfig( KConfig* conf, QWidget* parent )
} }
// Load configuration options // Load configuration options
KConfigGroup cg(c, "KDEDefault"); c = new KConfig("kwinKDE2rc");
KConfigGroup cg(c, "General");
load( cg ); load( cg );
// Ensure we track user changes properly // Ensure we track user changes properly
@ -75,13 +78,13 @@ KDEDefaultConfig::KDEDefaultConfig( KConfig* conf, QWidget* parent )
} }
KDEDefaultConfig::~KDEDefaultConfig() KDE2Config::~KDE2Config()
{ {
delete gb; delete gb;
} }
void KDEDefaultConfig::slotSelectionChanged() void KDE2Config::slotSelectionChanged()
{ {
emit changed(); emit changed();
} }
@ -89,9 +92,9 @@ void KDEDefaultConfig::slotSelectionChanged()
// Loads the configurable options from the kwinrc config file // Loads the configurable options from the kwinrc config file
// It is passed the open config from kwindecoration to improve efficiency // It is passed the open config from kwindecoration to improve efficiency
void KDEDefaultConfig::load( const KConfigGroup& ) void KDE2Config::load( const KConfigGroup& )
{ {
KConfigGroup cg(c, "KDEDefault"); KConfigGroup cg(c, "KDE2");
bool override = cg.readEntry( "ShowTitleBarStipple", true); bool override = cg.readEntry( "ShowTitleBarStipple", true);
cbShowStipple->setChecked( override ); cbShowStipple->setChecked( override );
@ -106,9 +109,9 @@ void KDEDefaultConfig::load( const KConfigGroup& )
// Saves the configurable options to the kwinrc config file // Saves the configurable options to the kwinrc config file
void KDEDefaultConfig::save( KConfigGroup& ) void KDE2Config::save( KConfigGroup& )
{ {
KConfigGroup cg(c, "KDEDefault"); KConfigGroup cg(c, "KDE2");
cg.writeEntry( "ShowTitleBarStipple", cbShowStipple->isChecked() ); cg.writeEntry( "ShowTitleBarStipple", cbShowStipple->isChecked() );
cg.writeEntry( "ShowGrabBar", cbShowGrabBar->isChecked() ); cg.writeEntry( "ShowGrabBar", cbShowGrabBar->isChecked() );
@ -119,7 +122,7 @@ void KDEDefaultConfig::save( KConfigGroup& )
// Sets UI widget defaults which must correspond to style defaults // Sets UI widget defaults which must correspond to style defaults
void KDEDefaultConfig::defaults() void KDE2Config::defaults()
{ {
cbShowStipple->setChecked( true ); cbShowStipple->setChecked( true );
cbShowGrabBar->setChecked( true ); cbShowGrabBar->setChecked( true );
@ -130,3 +133,4 @@ void KDEDefaultConfig::defaults()
#include "config.moc" #include "config.moc"
// vim: ts=4 // vim: ts=4
// kate: space-indent off; tab-width 4;

View file

@ -7,22 +7,23 @@
* http://gallium.n3.net/ * http://gallium.n3.net/
*/ */
#ifndef _KDE_DEFAULT_CONFIG_H #ifndef KDE2_CONFIG_H
#define _KDE_DEFAULT_CONFIG_H #define KDE2_CONFIG_H
#include <QCheckBox> #include <QCheckBox>
#include <QGroupBox> #include <QGroupBox>
#include <kconfig.h>
#include <QLabel> #include <QLabel>
#include <kvbox.h>
class KDEDefaultConfig: public QObject #include <kvbox.h>
#include <kconfig.h>
class KDE2Config: public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
KDEDefaultConfig( KConfig* conf, QWidget* parent ); KDE2Config( KConfig* conf, QWidget* parent );
~KDEDefaultConfig(); ~KDE2Config();
// These public signals/slots work similar to KCM modules // These public signals/slots work similar to KCM modules
signals: signals:
@ -41,9 +42,10 @@ class KDEDefaultConfig: public QObject
QCheckBox* cbShowGrabBar; QCheckBox* cbShowGrabBar;
QCheckBox* cbUseGradients; QCheckBox* cbUseGradients;
KVBox* gb; KVBox* gb;
KConfig *c; KConfig *c;
bool highcolor; bool highcolor;
}; };
#endif #endif
// vim: ts=4 // vim: ts=4
// kate: space-indent off; tab-width 4;

View file

@ -0,0 +1,5 @@
[Desktop Entry]
Encoding=UTF-8
Name=KDE 2
Name[x-test]=xxKDE 2xx
X-KDE-Library=kwin3_kde2

View file

@ -18,19 +18,18 @@
#include <kimageeffect.h> #include <kimageeffect.h>
#include <kdrawutil.h> #include <kdrawutil.h>
#include <klocale.h> #include <klocale.h>
#include <kdebug.h>
#include <QLayout> #include <QLayout>
#include <qdrawutil.h>
#include <QBitmap> #include <QBitmap>
#include <QImage> #include <QImage>
#include <QApplication> #include <QApplication>
#include <QLabel> #include <QLabel>
#include <kdebug.h>
#include <QPixmap> #include <QPixmap>
#include <QPolygon> #include <QPolygon>
#include <QStyle> #include <QStyle>
namespace Default namespace KDE2
{ {
static const unsigned char iconify_bits[] = { static const unsigned char iconify_bits[] = {
@ -139,12 +138,12 @@ static QPixmap* leftBtnDownPix[2];
static QPixmap* ileftBtnUpPix[2]; static QPixmap* ileftBtnUpPix[2];
static QPixmap* ileftBtnDownPix[2]; static QPixmap* ileftBtnDownPix[2];
static KDEDefaultHandler* clientHandler; static KDE2Handler* clientHandler;
static int toolTitleHeight; static int toolTitleHeight;
static int normalTitleHeight; static int normalTitleHeight;
static int borderWidth; static int borderWidth;
static int grabBorderWidth; static int grabBorderWidth;
static bool KDEDefault_initialized = false; static bool KDE2_initialized = false;
static bool useGradients; static bool useGradients;
static bool showGrabBar; static bool showGrabBar;
static bool showTitleBarStipple; static bool showTitleBarStipple;
@ -152,37 +151,37 @@ static bool showTitleBarStipple;
// =========================================================================== // ===========================================================================
KDEDefaultHandler::KDEDefaultHandler() KDE2Handler::KDE2Handler()
{ {
clientHandler = this; clientHandler = this;
readConfig( false ); readConfig( false );
createPixmaps(); createPixmaps();
KDEDefault_initialized = true; KDE2_initialized = true;
} }
KDEDefaultHandler::~KDEDefaultHandler() KDE2Handler::~KDE2Handler()
{ {
KDEDefault_initialized = false; KDE2_initialized = false;
freePixmaps(); freePixmaps();
clientHandler = NULL; clientHandler = NULL;
} }
KDecoration* KDEDefaultHandler::createDecoration( KDecorationBridge* b ) KDecoration* KDE2Handler::createDecoration( KDecorationBridge* b )
{ {
return new KDEDefaultClient( b, this ); return new KDE2Client( b, this );
} }
bool KDEDefaultHandler::reset( unsigned long changed ) bool KDE2Handler::reset( unsigned long changed )
{ {
KDEDefault_initialized = false; KDE2_initialized = false;
changed |= readConfig( true ); changed |= readConfig( true );
if( changed & SettingColors ) if( changed & SettingColors )
{ // pixmaps need to be recreated { // pixmaps need to be recreated
freePixmaps(); freePixmaps();
createPixmaps(); createPixmaps();
} }
KDEDefault_initialized = true; KDE2_initialized = true;
// SettingButtons is handled by KCommonDecoration // SettingButtons is handled by KCommonDecoration
bool need_recreate = ( changed & ( SettingDecoration | SettingFont | SettingBorder )) != 0; bool need_recreate = ( changed & ( SettingDecoration | SettingFont | SettingBorder )) != 0;
if( need_recreate ) // something else than colors changed if( need_recreate ) // something else than colors changed
@ -192,12 +191,13 @@ bool KDEDefaultHandler::reset( unsigned long changed )
} }
unsigned long KDEDefaultHandler::readConfig( bool update ) unsigned long KDE2Handler::readConfig( bool update )
{ {
unsigned long changed = 0; unsigned long changed = 0;
KConfigGroup conf(KGlobal::config(), "KDEDefault"); KConfig c("kwinKDE2rc");
KConfigGroup conf(&c, "General");
bool new_showGrabBar = conf.readEntry("ShowGrabBar", true); bool new_showGrabBar = conf.readEntry("ShowGrabBar", true);
bool new_showTitleBarStipple = conf.readEntry("ShowTitleBarStipple", true); bool new_showTitleBarStipple = conf.readEntry("ShowTitleBarStipple", true);
bool new_useGradients = conf.readEntry("UseGradients", true); bool new_useGradients = conf.readEntry("UseGradients", true);
int new_titleHeight = QFontMetrics(options()->font(true)).height(); int new_titleHeight = QFontMetrics(options()->font(true)).height();
@ -257,7 +257,7 @@ unsigned long KDEDefaultHandler::readConfig( bool update )
// This paints the button pixmaps upon loading the style. // This paints the button pixmaps upon loading the style.
void KDEDefaultHandler::createPixmaps() void KDE2Handler::createPixmaps()
{ {
bool highcolor = useGradients && (QPixmap::defaultDepth() > 8); bool highcolor = useGradients && (QPixmap::defaultDepth() > 8);
@ -410,7 +410,7 @@ void KDEDefaultHandler::createPixmaps()
} }
void KDEDefaultHandler::freePixmaps() void KDE2Handler::freePixmaps()
{ {
// Free button pixmaps // Free button pixmaps
if (rightBtnUpPix[true]) if (rightBtnUpPix[true])
@ -471,7 +471,7 @@ void KDEDefaultHandler::freePixmaps()
} }
void KDEDefaultHandler::drawButtonBackground(QPixmap *pix, void KDE2Handler::drawButtonBackground(QPixmap *pix,
const QPalette &g, bool sunken) const QPalette &g, bool sunken)
{ {
QPainter p; QPainter p;
@ -508,13 +508,13 @@ void KDEDefaultHandler::drawButtonBackground(QPixmap *pix,
p.drawLine(2, x2-2, y2-2, x2-2); p.drawLine(2, x2-2, y2-2, x2-2);
} }
QList< KDEDefaultHandler::BorderSize > KDEDefaultHandler::borderSizes() const QList< KDE2Handler::BorderSize > KDE2Handler::borderSizes() const
{ // the list must be sorted { // the list must be sorted
return QList< BorderSize >() << BorderNormal << BorderLarge << return QList< BorderSize >() << BorderNormal << BorderLarge <<
BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized; BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized;
} }
bool KDEDefaultHandler::supports( Ability ability ) bool KDE2Handler::supports( Ability ability )
{ {
switch( ability ) switch( ability )
{ {
@ -537,7 +537,7 @@ bool KDEDefaultHandler::supports( Ability ability )
// =========================================================================== // ===========================================================================
KDEDefaultButton::KDEDefaultButton(ButtonType type, KDEDefaultClient *parent, const char *name) KDE2Button::KDE2Button(ButtonType type, KDE2Client *parent, const char *name)
: KCommonDecorationButton(type, parent) : KCommonDecorationButton(type, parent)
{ {
setObjectName( name ); setObjectName( name );
@ -549,14 +549,14 @@ KDEDefaultButton::KDEDefaultButton(ButtonType type, KDEDefaultClient *parent, co
} }
KDEDefaultButton::~KDEDefaultButton() KDE2Button::~KDE2Button()
{ {
if (deco) if (deco)
delete deco; delete deco;
} }
void KDEDefaultButton::reset(unsigned long changed) void KDE2Button::reset(unsigned long changed)
{ {
if (changed&DecorationReset || changed&ManualReset || changed&SizeChange || changed&StateChange) { if (changed&DecorationReset || changed&ManualReset || changed&SizeChange || changed&StateChange) {
switch (type() ) { switch (type() ) {
@ -594,7 +594,7 @@ void KDEDefaultButton::reset(unsigned long changed)
} }
void KDEDefaultButton::setBitmap(const unsigned char *bitmap) void KDE2Button::setBitmap(const unsigned char *bitmap)
{ {
delete deco; delete deco;
deco = 0; deco = 0;
@ -605,15 +605,15 @@ void KDEDefaultButton::setBitmap(const unsigned char *bitmap)
} }
} }
void KDEDefaultButton::paintEvent(QPaintEvent *) void KDE2Button::paintEvent(QPaintEvent *)
{ {
QPainter p(this); QPainter p(this);
drawButton(&p); drawButton(&p);
} }
void KDEDefaultButton::drawButton(QPainter *p) void KDE2Button::drawButton(QPainter *p)
{ {
if (!KDEDefault_initialized) if (!KDE2_initialized)
return; return;
const bool active = decoration()->isActive(); const bool active = decoration()->isActive();
@ -662,7 +662,7 @@ void KDEDefaultButton::drawButton(QPainter *p)
// otherwise we paint a menu button (with mini icon), or a sticky button. // otherwise we paint a menu button (with mini icon), or a sticky button.
if( deco ) { if( deco ) {
// Select the appropriate button decoration color // Select the appropriate button decoration color
bool darkDeco = qGray( KDecoration::options()->color( bool darkDeco = qGray( KDecoration::options()->color(
isLeft() ? KDecoration::ColorTitleBar : KDecoration::ColorButtonBg, isLeft() ? KDecoration::ColorTitleBar : KDecoration::ColorButtonBg,
active).rgb() ) > 127; active).rgb() ) > 127;
@ -703,7 +703,7 @@ void KDEDefaultButton::drawButton(QPainter *p)
} }
void KDEDefaultButton::enterEvent(QEvent *e) void KDE2Button::enterEvent(QEvent *e)
{ {
isMouseOver=true; isMouseOver=true;
repaint(); repaint();
@ -711,7 +711,7 @@ void KDEDefaultButton::enterEvent(QEvent *e)
} }
void KDEDefaultButton::leaveEvent(QEvent *e) void KDE2Button::leaveEvent(QEvent *e)
{ {
isMouseOver=false; isMouseOver=false;
repaint(); repaint();
@ -721,28 +721,28 @@ void KDEDefaultButton::leaveEvent(QEvent *e)
// =========================================================================== // ===========================================================================
KDEDefaultClient::KDEDefaultClient( KDecorationBridge* b, KDecorationFactory* f ) KDE2Client::KDE2Client( KDecorationBridge* b, KDecorationFactory* f )
: KCommonDecoration( b, f )/*, : KCommonDecoration( b, f )/*,
m_closing(false)*/ m_closing(false)*/
{ {
} }
QString KDEDefaultClient::visibleName() const QString KDE2Client::visibleName() const
{ {
return i18n("KDE2"); return i18n("KDE 2");
} }
QString KDEDefaultClient::defaultButtonsLeft() const QString KDE2Client::defaultButtonsLeft() const
{ {
return "MS"; return "MS";
} }
QString KDEDefaultClient::defaultButtonsRight() const QString KDE2Client::defaultButtonsRight() const
{ {
return "HIAX"; return "HIAX";
} }
bool KDEDefaultClient::decorationBehaviour(DecorationBehaviour behaviour) const bool KDE2Client::decorationBehaviour(DecorationBehaviour behaviour) const
{ {
switch (behaviour) { switch (behaviour) {
case DB_MenuClose: case DB_MenuClose:
@ -757,7 +757,7 @@ bool KDEDefaultClient::decorationBehaviour(DecorationBehaviour behaviour) const
} }
} }
int KDEDefaultClient::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCommonDecorationButton *btn) const int KDE2Client::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCommonDecorationButton *btn) const
{ {
switch (lm) { switch (lm) {
case LM_BorderLeft: case LM_BorderLeft:
@ -794,40 +794,40 @@ int KDEDefaultClient::layoutMetric(LayoutMetric lm, bool respectWindowState, con
case LM_ExplicitButtonSpacer: case LM_ExplicitButtonSpacer:
if ( !isToolWindow() ) if ( !isToolWindow() )
return borderWidth/2; return borderWidth/2;
// fall though // fall through
default: default:
return KCommonDecoration::layoutMetric(lm, respectWindowState, btn); return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
} }
} }
KCommonDecorationButton *KDEDefaultClient::createButton(ButtonType type) KCommonDecorationButton *KDE2Client::createButton(ButtonType type)
{ {
switch (type) { switch (type) {
case MenuButton: case MenuButton:
return new KDEDefaultButton(MenuButton, this, "menu"); return new KDE2Button(MenuButton, this, "menu");
case OnAllDesktopsButton: case OnAllDesktopsButton:
return new KDEDefaultButton(OnAllDesktopsButton, this, "on_all_desktops"); return new KDE2Button(OnAllDesktopsButton, this, "on_all_desktops");
case HelpButton: case HelpButton:
return new KDEDefaultButton(HelpButton, this, "help"); return new KDE2Button(HelpButton, this, "help");
case MinButton: case MinButton:
return new KDEDefaultButton(MinButton, this, "minimize"); return new KDE2Button(MinButton, this, "minimize");
case MaxButton: case MaxButton:
return new KDEDefaultButton(MaxButton, this, "maximize"); return new KDE2Button(MaxButton, this, "maximize");
case CloseButton: case CloseButton:
return new KDEDefaultButton(CloseButton, this, "close"); return new KDE2Button(CloseButton, this, "close");
case AboveButton: case AboveButton:
return new KDEDefaultButton(AboveButton, this, "above"); return new KDE2Button(AboveButton, this, "above");
case BelowButton: case BelowButton:
return new KDEDefaultButton(BelowButton, this, "below"); return new KDE2Button(BelowButton, this, "below");
case ShadeButton: case ShadeButton:
return new KDEDefaultButton(ShadeButton, this, "shade"); return new KDE2Button(ShadeButton, this, "shade");
default: default:
return 0; return 0;
} }
} }
void KDEDefaultClient::init() void KDE2Client::init()
{ {
// Finally, toolWindows look small // Finally, toolWindows look small
if ( isToolWindow() ) { if ( isToolWindow() ) {
@ -840,14 +840,14 @@ void KDEDefaultClient::init()
KCommonDecoration::init(); KCommonDecoration::init();
} }
void KDEDefaultClient::reset( unsigned long changed) void KDE2Client::reset( unsigned long changed)
{ {
widget()->repaint(); widget()->repaint();
KCommonDecoration::reset(changed); KCommonDecoration::reset(changed);
} }
bool KDEDefaultClient::mustDrawHandle() const bool KDE2Client::mustDrawHandle() const
{ {
bool drawSmallBorders = !options()->moveResizeMaximizedWindows(); bool drawSmallBorders = !options()->moveResizeMaximizedWindows();
if (drawSmallBorders && (maximizeMode() & MaximizeVertical)) { if (drawSmallBorders && (maximizeMode() & MaximizeVertical)) {
@ -857,9 +857,9 @@ bool KDEDefaultClient::mustDrawHandle() const
} }
} }
void KDEDefaultClient::paintEvent( QPaintEvent* ) void KDE2Client::paintEvent( QPaintEvent* )
{ {
if (!KDEDefault_initialized) if (!KDE2_initialized)
return; return;
QPalette g; QPalette g;
@ -1024,7 +1024,7 @@ void KDEDefaultClient::paintEvent( QPaintEvent* )
#endif #endif
} }
QRegion KDEDefaultClient::cornerShape(WindowCorner corner) QRegion KDE2Client::cornerShape(WindowCorner corner)
{ {
switch (corner) { switch (corner) {
case WC_TopLeft: case WC_TopLeft:
@ -1049,7 +1049,7 @@ QRegion KDEDefaultClient::cornerShape(WindowCorner corner)
// Extended KWin plugin interface // Extended KWin plugin interface
extern "C" KDE_EXPORT KDecorationFactory* create_factory() extern "C" KDE_EXPORT KDecorationFactory* create_factory()
{ {
return new Default::KDEDefaultHandler(); return new KDE2::KDE2Handler();
} }
// vim: ts=4 // vim: ts=4

View file

@ -10,8 +10,8 @@
* Many features are now customizable. * Many features are now customizable.
*/ */
#ifndef _KDE_DEFAULT_H #ifndef KDE2_H
#define _KDE_DEFAULT_H #define KDE2_H
#include <QBitmap> #include <QBitmap>
#include <QDateTime> #include <QDateTime>
@ -20,15 +20,15 @@
class QPixmap; class QPixmap;
namespace Default { namespace KDE2 {
class KDEDefaultClient; class KDE2Client;
class KDEDefaultHandler: public KDecorationFactory class KDE2Handler: public KDecorationFactory
{ {
public: public:
KDEDefaultHandler(); KDE2Handler();
~KDEDefaultHandler(); ~KDE2Handler();
KDecoration* createDecoration( KDecorationBridge* b ); KDecoration* createDecoration( KDecorationBridge* b );
bool reset( unsigned long changed ); bool reset( unsigned long changed );
virtual QList< BorderSize > borderSizes() const; virtual QList< BorderSize > borderSizes() const;
@ -43,12 +43,11 @@ class KDEDefaultHandler: public KDecorationFactory
}; };
// class KDEDefaultButton : public QButton, public KDecorationDefines class KDE2Button : public KCommonDecorationButton
class KDEDefaultButton : public KCommonDecorationButton
{ {
public: public:
KDEDefaultButton(ButtonType type, KDEDefaultClient *parent, const char *name); KDE2Button(ButtonType type, KDE2Client *parent, const char *name);
~KDEDefaultButton(); ~KDE2Button();
void reset(unsigned long changed); void reset(unsigned long changed);
@ -67,11 +66,11 @@ class KDEDefaultButton : public KCommonDecorationButton
}; };
class KDEDefaultClient : public KCommonDecoration class KDE2Client : public KCommonDecoration
{ {
public: public:
KDEDefaultClient( KDecorationBridge* b, KDecorationFactory* f ); KDE2Client( KDecorationBridge* b, KDecorationFactory* f );
~KDEDefaultClient() {;} ~KDE2Client() {;}
virtual QString visibleName() const; virtual QString visibleName() const;
virtual QString defaultButtonsLeft() const; virtual QString defaultButtonsLeft() const;