diff --git a/clients/b2/b2client.cpp b/clients/b2/b2client.cpp index 3b69ebaca2..b39dcff383 100644 --- a/clients/b2/b2client.cpp +++ b/clients/b2/b2client.cpp @@ -17,10 +17,13 @@ #include #include "../../workspace.h" #include "../../options.h" -#include "bitmaps.h" using namespace KWinInternal; +namespace B2 { + +#include "bitmaps.h" + #define P_CLOSE 0 #define P_MAX 1 #define P_NORMALIZE 2 @@ -192,8 +195,8 @@ void B2Button::setPixmaps(KPixmap *pix, KPixmap *pixDown, KPixmap *iPix, void B2Button::setPixmaps(int button_id) { button_id *= 4; - setPixmaps(::pixmap[button_id], ::pixmap[button_id+1], - ::pixmap[button_id+2], ::pixmap[button_id+3]); + setPixmaps(B2::pixmap[button_id], B2::pixmap[button_id+1], + B2::pixmap[button_id+2], B2::pixmap[button_id+3]); } void B2Button::mousePressEvent( QMouseEvent* e ) @@ -926,27 +929,29 @@ void B2Client::positionButtons() titlebar->move(bar_x_ofs, 0); } +}; + extern "C" { Client *allocate(Workspace *ws, WId w, int) { - return(new B2Client(ws, w)); + return(new B2::B2Client(ws, w)); } void init() { - read_config(); - create_pixmaps(); + B2::read_config(); + B2::create_pixmaps(); } void reset() { - read_config(); - redraw_pixmaps(); + B2::read_config(); + B2::redraw_pixmaps(); // Ensure change in tooltip state gets applied - Workspace::self()->slotResetAllClientsDelayed(); + KWinInternal::Workspace::self()->slotResetAllClientsDelayed(); } void deinit() { - delete_pixmaps(); + B2::delete_pixmaps(); } } diff --git a/clients/b2/b2client.h b/clients/b2/b2client.h index bcaac81db8..208be8ea9b 100644 --- a/clients/b2/b2client.h +++ b/clients/b2/b2client.h @@ -20,9 +20,11 @@ class QSpacerItem; class QBoxLayout; class QGridLayout; -namespace KWinInternal { +namespace B2 { -class B2Button : public KWinInternal::KWinButton +using namespace KWinInternal; + +class B2Button : public KWinButton { Q_OBJECT public: @@ -83,7 +85,7 @@ protected: B2Client *client; }; -class B2Client : public KWinInternal::Client +class B2Client : public Client { Q_OBJECT friend class B2Titlebar; diff --git a/clients/default/kdedefault.cpp b/clients/default/kdedefault.cpp index f15cee0e50..2bfdc4080b 100644 --- a/clients/default/kdedefault.cpp +++ b/clients/default/kdedefault.cpp @@ -27,7 +27,7 @@ using namespace KWinInternal; -namespace +namespace Default { static unsigned char iconify_bits[] = { @@ -121,7 +121,6 @@ bool largeToolButtons; int toolTitleHeight; int normalTitleHeight; -} // =========================================================================== @@ -1080,28 +1079,29 @@ void KDEDefaultClient::menuButtonPressed() button[BtnMenu]->setDown(false); } +}; // Extended KWin plugin interface extern "C" { Client *allocate(Workspace *ws, WId w, int) { - return(new KDEDefaultClient(ws, w)); + return(new Default::KDEDefaultClient(ws, w)); } void init() { - clientHandler = new KDEDefaultHandler(); + Default::clientHandler = new Default::KDEDefaultHandler(); } void reset() { - clientHandler->reset(); + Default::clientHandler->reset(); } void deinit() { - delete clientHandler; + delete Default::clientHandler; } } diff --git a/clients/default/kdedefault.h b/clients/default/kdedefault.h index e95866405e..6ebf9cbb6f 100644 --- a/clients/default/kdedefault.h +++ b/clients/default/kdedefault.h @@ -24,7 +24,9 @@ class QSpacerItem; class QBoxLayout; -namespace KWinInternal { +namespace Default { + +using namespace KWinInternal; class KDEDefaultHandler: public QObject { @@ -42,7 +44,7 @@ class KDEDefaultHandler: public QObject }; -class KDEDefaultButton : public KWinInternal::KWinButton +class KDEDefaultButton : public KWinButton { public: KDEDefaultButton(Client *parent=0, const char *name=0, @@ -73,7 +75,7 @@ class KDEDefaultButton : public KWinInternal::KWinButton }; -class KDEDefaultClient : public KWinInternal::Client +class KDEDefaultClient : public Client { Q_OBJECT diff --git a/clients/icewm/icewm.cpp b/clients/icewm/icewm.cpp index eaade15485..526f2b0d5e 100644 --- a/clients/icewm/icewm.cpp +++ b/clients/icewm/icewm.cpp @@ -57,6 +57,7 @@ using namespace KWinInternal; +namespace IceWM { //////////////////////////////////////////////////////////////////////////////////////////// // Here's the global pixmap stuff - as memory efficient as it can be :) @@ -1362,17 +1363,18 @@ void IceWMClient::menuButtonPressed() button[BtnSysMenu]->setDown(false); } +}; extern "C" { Client* allocate(Workspace *ws, WId w, int) { - return(new IceWMClient(ws, w)); + return(new IceWM::IceWMClient(ws, w)); } void init() { - clientHandler = new ThemeHandler; + IceWM::clientHandler = new IceWM::ThemeHandler; } void reset() @@ -1382,7 +1384,7 @@ extern "C" void deinit() { - delete clientHandler; + delete IceWM::clientHandler; } } diff --git a/clients/icewm/icewm.h b/clients/icewm/icewm.h index 8181bc79b2..6a58c7b18b 100644 --- a/clients/icewm/icewm.h +++ b/clients/icewm/icewm.h @@ -52,7 +52,9 @@ class QSpacerItem; class QBoxLayout; class QGridLayout; -namespace KWinInternal { +namespace IceWM { + +using namespace KWinInternal; // Pixmap group enum { InActive=0, Active }; @@ -73,7 +75,7 @@ class ThemeHandler: public QObject void slotReset(); private: - bool initialized; + bool initialized; QString themeName; void readConfig(); @@ -92,7 +94,7 @@ class ThemeHandler: public QObject }; -class IceWMButton : public KWinInternal::KWinButton +class IceWMButton : public KWinButton { public: IceWMButton( Client *parent=0, const char *name=0, @@ -116,7 +118,7 @@ class IceWMButton : public KWinInternal::KWinButton }; -class IceWMClient : public KWinInternal::Client +class IceWMClient : public Client { Q_OBJECT public: diff --git a/clients/kde1/kde1client.cpp b/clients/kde1/kde1client.cpp index 0c20262e0a..e006ab3de5 100644 --- a/clients/kde1/kde1client.cpp +++ b/clients/kde1/kde1client.cpp @@ -22,7 +22,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich using namespace KWinInternal; -namespace +namespace KDE1 { QPixmap* close_pix = 0; @@ -215,7 +215,6 @@ void drawGradient } } -} // anyonmous namespace void StdClient::slotReset() { @@ -566,28 +565,30 @@ void StdToolClient::slotReset() setFont(options->font(isActive(), true )); } +}; + extern "C" { Client * allocate(Workspace * workSpace, WId winId, int tool ) { if ( tool ) - return new StdToolClient( workSpace, winId ); - return new StdClient(workSpace, winId); + return new KDE1::StdToolClient( workSpace, winId ); + return new KDE1::StdClient(workSpace, winId); } void init() { - create_pixmaps(); + KDE1::create_pixmaps(); } void reset() { - delete_pixmaps(); - create_pixmaps(); + KDE1::delete_pixmaps(); + KDE1::create_pixmaps(); // Ensure change in tooltip state gets applied Workspace::self()->slotResetAllClientsDelayed(); } void deinit() { - delete_pixmaps(); + KDE1::delete_pixmaps(); } } diff --git a/clients/kde1/kde1client.h b/clients/kde1/kde1client.h index 50773a849c..532306b8b9 100644 --- a/clients/kde1/kde1client.h +++ b/clients/kde1/kde1client.h @@ -11,9 +11,11 @@ Copyright (C) 1999, 2000 Matthias Ettrich class QLabel; class QSpacerItem; -namespace KWinInternal { +namespace KDE1 { -class StdClient : public KWinInternal::Client +using namespace KWinInternal; + +class StdClient : public Client { Q_OBJECT public: @@ -69,7 +71,7 @@ private: Like QToolButton, but provides a clicked(int) signals that has the last pressed mouse button as argument */ -class ThreeButtonButton: public KWinInternal:: KWinToolButton +class ThreeButtonButton: public KWinToolButton { Q_OBJECT public: diff --git a/clients/keramik/keramik.cpp b/clients/keramik/keramik.cpp index 247c0bc69a..d5e70a0643 100644 --- a/clients/keramik/keramik.cpp +++ b/clients/keramik/keramik.cpp @@ -48,7 +48,7 @@ #include "keramik.moc" -using namespace Keramik; +using namespace KWinInternal; @@ -128,8 +128,6 @@ namespace Keramik KeramikHandler *clientHandler = NULL; bool keramik_initialized = false; -} // namespace Keramik - // ------------------------------------------------------------------------------------------- @@ -1428,7 +1426,7 @@ Client::MousePosition KeramikClient::mousePosition( const QPoint &p ) const return Center; } - +}; // namespace Keramik // ------------------------------------------------------------------------------------------- @@ -1438,22 +1436,22 @@ extern "C" { Client *allocate( Workspace *ws, WId w ) { - return new KeramikClient( ws, w ); + return new Keramik::KeramikClient( ws, w ); } void init() { - clientHandler = new KeramikHandler(); + Keramik::clientHandler = new Keramik::KeramikHandler(); } void reset() { - clientHandler->reset(); + Keramik::clientHandler->reset(); } void deinit() { - delete clientHandler; + delete Keramik::clientHandler; } } diff --git a/clients/kstep/nextclient.cpp b/clients/kstep/nextclient.cpp index 7426d5a31c..5de3a52c2d 100644 --- a/clients/kstep/nextclient.cpp +++ b/clients/kstep/nextclient.cpp @@ -14,6 +14,7 @@ using namespace KWinInternal; +namespace KStep { static unsigned char close_bits[] = { 0x03, 0x03, 0x87, 0x03, 0xce, 0x01, 0xfc, 0x00, 0x78, 0x00, 0x78, 0x00, @@ -560,26 +561,28 @@ NextClient::mousePosition( const QPoint& p ) const return m; } +}; + extern "C" { Client *allocate(Workspace *ws, WId w, int ) { - return(new NextClient(ws, w)); + return(new KStep::NextClient(ws, w)); } void init() { - create_pixmaps(); + KStep::create_pixmaps(); } void reset() { - delete_pixmaps(); - create_pixmaps(); + KStep::delete_pixmaps(); + KStep::create_pixmaps(); // Ensure change in tooltip state gets applied Workspace::self()->slotResetAllClientsDelayed(); } void deinit() { - delete_pixmaps(); + KStep::delete_pixmaps(); } } diff --git a/clients/kstep/nextclient.h b/clients/kstep/nextclient.h index ac0eb147e0..829e2cb623 100644 --- a/clients/kstep/nextclient.h +++ b/clients/kstep/nextclient.h @@ -10,9 +10,11 @@ class QLabel; class QSpacerItem; -namespace KWinInternal { +namespace KStep { -class NextButton : public KWinInternal::KWinButton +using namespace KWinInternal; + +class NextButton : public KWinButton { public: NextButton(Client *parent=0, const char *name=0, @@ -34,7 +36,7 @@ protected: ButtonState last_button; }; -class NextClient : public KWinInternal::Client +class NextClient : public Client { Q_OBJECT public: diff --git a/clients/kwmtheme/kwmthemeclient.cpp b/clients/kwmtheme/kwmthemeclient.cpp index f22be97118..6f148ecd91 100644 --- a/clients/kwmtheme/kwmthemeclient.cpp +++ b/clients/kwmtheme/kwmthemeclient.cpp @@ -16,6 +16,8 @@ using namespace KWinInternal; +namespace KWMTheme { + /* static QPixmap stretchPixmap(QPixmap& src, bool stretchVert){ QPixmap dest; @@ -803,25 +805,27 @@ void KWMThemeClient::init() // } +}; + extern "C" { Client *allocate(Workspace *ws, WId w) { - return(new KWMThemeClient(ws, w)); + return(new KWMTheme::KWMThemeClient(ws, w)); } void init() { - create_pixmaps(); + KWMTheme::create_pixmaps(); } void reset() { - delete_pixmaps(); - create_pixmaps(); + KWMTheme::delete_pixmaps(); + KWMTheme::create_pixmaps(); Workspace::self()->slotResetAllClientsDelayed(); } void deinit() { - delete_pixmaps(); + KWMTheme::delete_pixmaps(); } } diff --git a/clients/kwmtheme/kwmthemeclient.h b/clients/kwmtheme/kwmthemeclient.h index bf759db87a..7a91cf3822 100644 --- a/clients/kwmtheme/kwmthemeclient.h +++ b/clients/kwmtheme/kwmthemeclient.h @@ -10,9 +10,11 @@ class QLabel; class QSpacerItem; class QGridLayout; -namespace KWinInternal{ +namespace KWMTheme { -class MyButton : public KWinInternal::KWinToolButton +using namespace KWinInternal; + +class MyButton : public KWinToolButton { public: MyButton(QWidget *parent=0, const char *name=0, const QString& tip=NULL) @@ -21,7 +23,7 @@ protected: void drawButtonLabel(QPainter *p); }; -class KWMThemeClient : public KWinInternal::Client +class KWMThemeClient : public Client { Q_OBJECT public: diff --git a/clients/laptop/laptopclient.cpp b/clients/laptop/laptopclient.cpp index d6e07195de..7fbb6e9c21 100644 --- a/clients/laptop/laptopclient.cpp +++ b/clients/laptop/laptopclient.cpp @@ -13,9 +13,10 @@ #include "../../workspace.h" #include "../../options.h" + using namespace KWinInternal; - +namespace Laptop { static unsigned char iconify_bits[] = { 0xff, 0xff, 0x00, 0xff, 0xff, 0x7e, 0x3c, 0x18}; @@ -681,26 +682,28 @@ LaptopClient::mousePosition( const QPoint& p ) const return m; } +}; + extern "C" { Client *allocate(Workspace *ws, WId w, int) { - return(new LaptopClient(ws, w)); + return(new Laptop::LaptopClient(ws, w)); } void init() { - create_pixmaps(); + Laptop::create_pixmaps(); } void reset() { - delete_pixmaps(); - create_pixmaps(); + Laptop::delete_pixmaps(); + Laptop::create_pixmaps(); // Ensure change in tooltip state gets applied Workspace::self()->slotResetAllClientsDelayed(); } void deinit() { - delete_pixmaps(); + Laptop::delete_pixmaps(); } } diff --git a/clients/laptop/laptopclient.h b/clients/laptop/laptopclient.h index f23b80b1d7..89922c1be2 100644 --- a/clients/laptop/laptopclient.h +++ b/clients/laptop/laptopclient.h @@ -9,9 +9,11 @@ class QLabel; class QSpacerItem; class QBoxLayout; -namespace KWinInternal { +namespace Laptop { -class LaptopClientButton : public KWinInternal::KWinButton +using namespace KWinInternal; + +class LaptopClientButton : public KWinButton { public: LaptopClientButton(int w, int h, Client *parent=0, const char *name=0, diff --git a/clients/modernsystem/modernsys.cpp b/clients/modernsystem/modernsys.cpp index 8c9adc3c97..51a798ccac 100644 --- a/clients/modernsystem/modernsys.cpp +++ b/clients/modernsystem/modernsys.cpp @@ -20,6 +20,7 @@ using namespace KWinInternal; +namespace ModernSystem { static unsigned char iconify_bits[] = { 0x00, 0x00, 0xff, 0xff, 0x7e, 0x3c, 0x18, 0x00}; @@ -614,30 +615,31 @@ Client::MousePosition ModernSys::mousePosition( const QPoint& p) const return m; } +}; // KWin extended plugin interface extern "C" { Client *allocate(Workspace *ws, WId w, int) { - return(new ModernSys(ws, w)); + return(new ModernSystem::ModernSys(ws, w)); } void init() { - button_pattern = new QString; - create_pixmaps(); - read_config(); + ModernSystem::button_pattern = new QString; + ModernSystem::create_pixmaps(); + ModernSystem::read_config(); } void reset() { - read_config(); - delete_pixmaps(); - create_pixmaps(); + ModernSystem::read_config(); + ModernSystem::delete_pixmaps(); + ModernSystem::create_pixmaps(); } void deinit() { - delete_pixmaps(); - delete button_pattern; + ModernSystem::delete_pixmaps(); + delete ModernSystem::button_pattern; } } diff --git a/clients/modernsystem/modernsys.h b/clients/modernsystem/modernsys.h index b3f8fc7aa5..7275a16127 100644 --- a/clients/modernsystem/modernsys.h +++ b/clients/modernsystem/modernsys.h @@ -10,9 +10,11 @@ class QLabel; class QSpacerItem; -namespace KWinInternal { +namespace ModernSystem { -class ModernButton : public KWinInternal::KWinButton +using namespace KWinInternal; + +class ModernButton : public KWinButton { Q_OBJECT public: @@ -34,7 +36,7 @@ public: int last_button; }; -class ModernSys : public KWinInternal::Client +class ModernSys : public Client { Q_OBJECT public: diff --git a/clients/quartz/quartz.cpp b/clients/quartz/quartz.cpp index 8744a9734c..0cc9b2d5a7 100644 --- a/clients/quartz/quartz.cpp +++ b/clients/quartz/quartz.cpp @@ -27,8 +27,10 @@ #include "quartz.h" #include + using namespace KWinInternal; +namespace Quartz { static unsigned char iconify_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, @@ -796,6 +798,7 @@ void QuartzClient::menuButtonPressed() button[BtnMenu]->setDown(false); } +}; // Extended KWin plugin interface ///////////////////////////////// @@ -803,12 +806,12 @@ extern "C" { Client *allocate(Workspace *ws, WId w, int) { - return(new QuartzClient(ws, w)); + return(new Quartz::QuartzClient(ws, w)); } void init() { - clientHandler = new QuartzHandler(); + Quartz::clientHandler = new Quartz::QuartzHandler(); } void reset() @@ -818,7 +821,7 @@ extern "C" void deinit() { - delete clientHandler; + delete Quartz::clientHandler; } } diff --git a/clients/quartz/quartz.h b/clients/quartz/quartz.h index 7caaa4bff2..799edc6307 100644 --- a/clients/quartz/quartz.h +++ b/clients/quartz/quartz.h @@ -26,8 +26,9 @@ class QSpacerItem; class QBoxLayout; -namespace KWinInternal { +namespace Quartz { +using namespace KWinInternal; class QuartzHandler: public QObject { @@ -47,7 +48,7 @@ class QuartzHandler: public QObject }; -class QuartzButton : public KWinInternal::KWinButton +class QuartzButton : public KWinButton { public: QuartzButton(Client *parent=0, const char *name=0, bool largeButton=true, @@ -73,7 +74,7 @@ class QuartzButton : public KWinInternal::KWinButton }; -class QuartzClient : public KWinInternal::Client +class QuartzClient : public Client { Q_OBJECT diff --git a/clients/redmond/redmond.cpp b/clients/redmond/redmond.cpp index a56a56be57..838985b29a 100644 --- a/clients/redmond/redmond.cpp +++ b/clients/redmond/redmond.cpp @@ -28,6 +28,7 @@ using namespace KWinInternal; +namespace Redmond { static const char *kdelogo[] = { /* columns rows colors chars-per-pixel */ @@ -760,28 +761,30 @@ void GalliumClient::menuButtonPressed() button[BtnMenu]->setDown(false); } +}; + extern "C" { Client *allocate(Workspace *ws, WId w, int) { - return(new GalliumClient(ws, w)); + return(new Redmond::GalliumClient(ws, w)); } void init() { - create_pixmaps(); + Redmond::create_pixmaps(); } void reset() { - delete_pixmaps(); - create_pixmaps(); + Redmond::delete_pixmaps(); + Redmond::create_pixmaps(); Workspace::self()->slotResetAllClientsDelayed(); } void deinit() { - delete_pixmaps(); + Redmond::delete_pixmaps(); } } diff --git a/clients/redmond/redmond.h b/clients/redmond/redmond.h index 687fc966ee..8cc1fa8fe7 100644 --- a/clients/redmond/redmond.h +++ b/clients/redmond/redmond.h @@ -26,9 +26,11 @@ class QLabel; class QSpacerItem; class QBoxLayout; -namespace KWinInternal { +namespace Redmond { -class GalliumButton : public KWinInternal::KWinButton +using namespace KWinInternal; + +class GalliumButton : public KWinButton { public: GalliumButton(Client *parent=0, const char *name=0, @@ -56,7 +58,7 @@ class GalliumButton : public KWinInternal::KWinButton }; -class GalliumClient : public KWinInternal::Client +class GalliumClient : public Client { Q_OBJECT diff --git a/clients/system/systemclient.cpp b/clients/system/systemclient.cpp index 5dcbfd6801..807ad21074 100644 --- a/clients/system/systemclient.cpp +++ b/clients/system/systemclient.cpp @@ -12,6 +12,7 @@ using namespace KWinInternal; +namespace System { static unsigned char iconify_bits[] = { 0x00, 0x00, 0xff, 0xff, 0x7e, 0x3c, 0x18, 0x00}; @@ -536,26 +537,28 @@ void SystemClient::activeChange(bool) button[4]->reset(); } +}; + extern "C" { Client *allocate(Workspace *ws, WId w, int) { - return(new SystemClient(ws, w)); + return(new System::SystemClient(ws, w)); } void init() { - create_pixmaps(); + System::create_pixmaps(); } void reset() { - delete_pixmaps(); - create_pixmaps(); + System::delete_pixmaps(); + System::create_pixmaps(); // Ensure changes in tooltip state get applied Workspace::self()->slotResetAllClientsDelayed(); } void deinit() { - delete_pixmaps(); + System::delete_pixmaps(); } } diff --git a/clients/system/systemclient.h b/clients/system/systemclient.h index cd7f0f8ebf..2fe0385225 100644 --- a/clients/system/systemclient.h +++ b/clients/system/systemclient.h @@ -11,9 +11,11 @@ class QLabel; class QSpacerItem; -namespace KWinInternal { +namespace System { -class SystemButton : public KWinInternal::KWinButton +using namespace KWinInternal; + +class SystemButton : public KWinButton { Q_OBJECT public: @@ -40,7 +42,7 @@ private: Client* client; }; -class SystemClient : public KWinInternal::Client +class SystemClient : public Client { Q_OBJECT public: diff --git a/clients/web/Web.cpp b/clients/web/Web.cpp index 8e16e2b7df..af7292d8b6 100644 --- a/clients/web/Web.cpp +++ b/clients/web/Web.cpp @@ -50,7 +50,7 @@ extern "C" { Client * allocate(Workspace * ws, WId w, int tool) { - return new Web(ws, w, tool != 0); + return new Web::WebClient(ws, w, tool != 0); } void init() @@ -70,7 +70,9 @@ extern "C" } } -Web::Web(Workspace * ws, WId w, bool tool, QWidget * parent, const char * name) +namespace Web { + +WebClient::WebClient(Workspace * ws, WId w, bool tool, QWidget * parent, const char * name) : Client (ws, w, parent, name, WResizeNoErase), tool_ (tool), mainLayout_ (0), @@ -86,13 +88,13 @@ Web::Web(Workspace * ws, WId w, bool tool, QWidget * parent, const char * name) connect(options, SIGNAL(resetClients()), this, SLOT(slotReset())); } -Web::~Web() +WebClient::~WebClient() { // Empty. } void -Web::resizeEvent(QResizeEvent * e) +WebClient::resizeEvent(QResizeEvent * e) { Client::resizeEvent(e); doShape(); @@ -100,13 +102,13 @@ Web::resizeEvent(QResizeEvent * e) } void -Web::captionChange(const QString &) +WebClient::captionChange(const QString &) { repaint(); } void -Web::paintEvent(QPaintEvent * pe) +WebClient::paintEvent(QPaintEvent * pe) { QRect titleRect(titleSpacer_->geometry()); titleRect.setTop(1); @@ -170,7 +172,7 @@ Web::paintEvent(QPaintEvent * pe) } void -Web::doShape() +WebClient::doShape() { if (!shape_) return; @@ -212,21 +214,21 @@ Web::doShape() } void -Web::showEvent(QShowEvent *) +WebClient::showEvent(QShowEvent *) { doShape(); repaint(); } void -Web::windowWrapperShowEvent(QShowEvent *) +WebClient::windowWrapperShowEvent(QShowEvent *) { doShape(); repaint(); } void -Web::mouseDoubleClickEvent(QMouseEvent * e) +WebClient::mouseDoubleClickEvent(QMouseEvent * e) { if (titleSpacer_->geometry().contains(e->pos())) { @@ -236,25 +238,25 @@ Web::mouseDoubleClickEvent(QMouseEvent * e) } void -Web::stickyChange(bool b) +WebClient::stickyChange(bool b) { emit(stkyChange(b)); } void -Web::maximizeChange(bool b) +WebClient::maximizeChange(bool b) { emit(maxChange(b)); } void -Web::activeChange(bool) +WebClient::activeChange(bool) { repaint(); } Client::MousePosition -Web::mousePosition(const QPoint & p) const +WebClient::mousePosition(const QPoint & p) const { int x = p.x(); int y = p.y(); @@ -296,14 +298,14 @@ Web::mousePosition(const QPoint & p) const } void -Web::slotReset() +WebClient::slotReset() { _resetLayout(); repaint(); } void -Web::slotMaximize(int button) +WebClient::slotMaximize(int button) { switch (button) { @@ -322,7 +324,7 @@ Web::slotMaximize(int button) } WebButton * -Web::_createButton(const QString & s, QWidget * parent) +WebClient::_createButton(const QString & s, QWidget * parent) { WebButton * b = 0; @@ -373,7 +375,7 @@ Web::_createButton(const QString & s, QWidget * parent) } void -Web::_createButtons() +WebClient::_createButtons() { leftButtonList_ .clear(); rightButtonList_ .clear(); @@ -421,7 +423,7 @@ Web::_createButtons() } void -Web::_resetLayout() +WebClient::_resetLayout() { KConfig c(locate("config", "kwinwebrc")); c.setGroup("General"); @@ -501,10 +503,12 @@ Web::_resetLayout() } void -Web::animateIconifyOrDeiconify(bool /* iconify */) +WebClient::animateIconifyOrDeiconify(bool /* iconify */) { // Nice and simple ;) } +}; + #include "Web.moc" // vim:ts=2:sw=2:tw=78:set et: diff --git a/clients/web/Web.h b/clients/web/Web.h index b8ddbe40ec..bc5141c43c 100644 --- a/clients/web/Web.h +++ b/clients/web/Web.h @@ -30,17 +30,19 @@ class QLabel; class QSpacerItem; class QBoxLayout; -namespace KWinInternal +namespace Web { + using namespace KWinInternal; + class WebButton; - class Web : public KWinInternal::Client + class WebClient : public Client { Q_OBJECT public: - Web + WebClient ( Workspace *, WId, @@ -49,7 +51,7 @@ namespace KWinInternal const char * name = 0 ); - ~Web(); + ~WebClient(); protected: diff --git a/clients/web/WebButton.cpp b/clients/web/WebButton.cpp index 3b6835c70a..ec8ce78ca6 100644 --- a/clients/web/WebButton.cpp +++ b/clients/web/WebButton.cpp @@ -23,6 +23,8 @@ #include "WebButton.h" +namespace Web { + using namespace KWinInternal; WebButton::WebButton(QWidget * parent, const QString& tip) @@ -250,5 +252,7 @@ WebButton::resizeEvent(QResizeEvent *) repaint(); } +}; + #include "WebButton.moc" // vim:ts=2:sw=2:tw=78:set et: diff --git a/clients/web/WebButton.h b/clients/web/WebButton.h index e8b95ade36..cf6f20af30 100644 --- a/clients/web/WebButton.h +++ b/clients/web/WebButton.h @@ -27,9 +27,11 @@ #include #include "../../kwinbutton.h" -namespace KWinInternal +namespace Web { - class WebButton : public KWinInternal::KWinWidgetButton + using namespace KWinInternal; + + class WebButton : public KWinWidgetButton { Q_OBJECT diff --git a/clients/web/WebButtonClose.cpp b/clients/web/WebButtonClose.cpp index 79690d219c..2ed765201c 100644 --- a/clients/web/WebButtonClose.cpp +++ b/clients/web/WebButtonClose.cpp @@ -21,6 +21,8 @@ #include "WebButtonClose.h" +namespace Web { + using namespace KWinInternal; static unsigned char close_bits[] = @@ -42,5 +44,7 @@ WebButtonClose::clickEvent(int /* button */) emit(closeWindow()); } +}; + #include "WebButtonClose.moc" // vim:ts=2:sw=2:tw=78:set et: diff --git a/clients/web/WebButtonClose.h b/clients/web/WebButtonClose.h index 6564f3418b..aa4959e2b9 100644 --- a/clients/web/WebButtonClose.h +++ b/clients/web/WebButtonClose.h @@ -24,8 +24,10 @@ #include "WebButton.h" -namespace KWinInternal +namespace Web { + using namespace KWinInternal; + class WebButtonClose : public WebButton { Q_OBJECT diff --git a/clients/web/WebButtonHelp.cpp b/clients/web/WebButtonHelp.cpp index f45e0cc2b3..061eb5ffc0 100644 --- a/clients/web/WebButtonHelp.cpp +++ b/clients/web/WebButtonHelp.cpp @@ -21,6 +21,9 @@ #include "WebButtonHelp.h" + +namespace Web { + using namespace KWinInternal; static unsigned char help_bits[] = @@ -42,5 +45,7 @@ WebButtonHelp::clickEvent(int /* button */) emit(help()); } +}; + #include "WebButtonHelp.moc" // vim:ts=2:sw=2:tw=78:set et: diff --git a/clients/web/WebButtonHelp.h b/clients/web/WebButtonHelp.h index 5dac494d60..cd7981ff50 100644 --- a/clients/web/WebButtonHelp.h +++ b/clients/web/WebButtonHelp.h @@ -24,8 +24,10 @@ #include "WebButton.h" -namespace KWinInternal +namespace Web { + using namespace KWinInternal; + class WebButtonHelp : public WebButton { Q_OBJECT diff --git a/clients/web/WebButtonIconify.cpp b/clients/web/WebButtonIconify.cpp index 6e9c29498f..8087407ced 100644 --- a/clients/web/WebButtonIconify.cpp +++ b/clients/web/WebButtonIconify.cpp @@ -21,6 +21,8 @@ #include "WebButtonIconify.h" +namespace Web { + using namespace KWinInternal; static unsigned char iconify_bits[] = @@ -42,5 +44,7 @@ WebButtonIconify::clickEvent(int /* button */) emit(iconify()); } +}; + #include "WebButtonIconify.moc" // vim:ts=2:sw=2:tw=78:set et: diff --git a/clients/web/WebButtonIconify.h b/clients/web/WebButtonIconify.h index 02ed188d30..c78deca21c 100644 --- a/clients/web/WebButtonIconify.h +++ b/clients/web/WebButtonIconify.h @@ -24,8 +24,10 @@ #include "WebButton.h" -namespace KWinInternal +namespace Web { + using namespace KWinInternal; + class WebButtonIconify : public WebButton { Q_OBJECT diff --git a/clients/web/WebButtonLower.cpp b/clients/web/WebButtonLower.cpp index c873a28675..69eee6bf55 100644 --- a/clients/web/WebButtonLower.cpp +++ b/clients/web/WebButtonLower.cpp @@ -21,6 +21,8 @@ #include "WebButtonLower.h" +namespace Web { + using namespace KWinInternal; static unsigned char lower_bits[] = @@ -42,5 +44,7 @@ WebButtonLower::clickEvent(int /* button */) emit(lowerWindow()); } +}; + #include "WebButtonLower.moc" // vim:ts=2:sw=2:tw=78:set et: diff --git a/clients/web/WebButtonLower.h b/clients/web/WebButtonLower.h index 57c6760424..4ffd27482e 100644 --- a/clients/web/WebButtonLower.h +++ b/clients/web/WebButtonLower.h @@ -24,8 +24,10 @@ #include "WebButton.h" -namespace KWinInternal +namespace Web { + using namespace KWinInternal; + class WebButtonLower : public WebButton { Q_OBJECT diff --git a/clients/web/WebButtonMaximize.cpp b/clients/web/WebButtonMaximize.cpp index 880ad25956..9eba98fa37 100644 --- a/clients/web/WebButtonMaximize.cpp +++ b/clients/web/WebButtonMaximize.cpp @@ -21,6 +21,8 @@ #include "WebButtonMaximize.h" +namespace Web { + using namespace KWinInternal; static unsigned char maximize_bits[] = @@ -56,5 +58,7 @@ WebButtonMaximize::clickEvent(int button) emit(maximize(button)); } +}; + #include "WebButtonMaximize.moc" // vim:ts=2:sw=2:tw=78:set et: diff --git a/clients/web/WebButtonMaximize.h b/clients/web/WebButtonMaximize.h index ca1469602c..0b00a5a790 100644 --- a/clients/web/WebButtonMaximize.h +++ b/clients/web/WebButtonMaximize.h @@ -24,8 +24,9 @@ #include "WebButton.h" -namespace KWinInternal +namespace Web { + using namespace KWinInternal; class WebButtonMaximize : public WebButton { diff --git a/clients/web/WebButtonSticky.cpp b/clients/web/WebButtonSticky.cpp index 01a7b54b7c..7df6dba49c 100644 --- a/clients/web/WebButtonSticky.cpp +++ b/clients/web/WebButtonSticky.cpp @@ -21,6 +21,8 @@ #include "WebButtonSticky.h" +namespace Web { + using namespace KWinInternal; static unsigned char sticky_bits[] = @@ -56,5 +58,7 @@ WebButtonSticky::clickEvent(int /* button */) emit(toggleSticky()); } +}; + #include "WebButtonSticky.moc" // vim:ts=2:sw=2:tw=78:set et: diff --git a/clients/web/WebButtonSticky.h b/clients/web/WebButtonSticky.h index 7670629f1f..2263b452ef 100644 --- a/clients/web/WebButtonSticky.h +++ b/clients/web/WebButtonSticky.h @@ -24,8 +24,10 @@ #include "WebButton.h" -namespace KWinInternal +namespace Web { + using namespace KWinInternal; + class WebButtonSticky : public WebButton { Q_OBJECT