1
Fork 0
mirror of https://github.com/redstrate/CatPaw.git synced 2025-04-20 03:37:46 +00:00

Move out of KWin namespace

This commit is contained in:
Joshua Goins 2024-07-20 14:51:12 -04:00
parent a1c6e9aeda
commit db21849b9e
5 changed files with 6 additions and 22 deletions

View file

@ -11,14 +11,10 @@
#include "core/renderviewport.h"
#include "effect/effecthandler.h"
#include <QPainter>
#include <QTabletEvent>
#include <cmath>
#include <opengl/openglcontext.h>
namespace KWin
{
using namespace KWin;
CatPawEffect::CatPawEffect()
{
@ -186,6 +182,4 @@ QColor CatPawEffect::kittyColor() const
return m_kittyColor;
}
} // namespace
#include "moc_catpaw.cpp"

View file

@ -11,17 +11,15 @@
#include <KLocalizedString>
namespace KWin
{
class CatPawEffect : public Effect
class CatPawEffect : public KWin::Effect
{
Q_OBJECT
public:
CatPawEffect();
~CatPawEffect() override;
void reconfigure(ReconfigureFlags) override;
void paintScreen(const RenderTarget &renderTarget, const RenderViewport &viewport, int mask, const QRegion &region, Output *screen) override;
void
paintScreen(const KWin::RenderTarget &renderTarget, const KWin::RenderViewport &viewport, int mask, const QRegion &region, KWin::Output *screen) override;
void postPaintScreen() override;
// for properties
@ -37,11 +35,9 @@ private Q_SLOTS:
private:
void repaint();
void drawKitty(const RenderTarget &renderTarget, const RenderViewport &viewport);
void drawKitty(const KWin::RenderTarget &renderTarget, const KWin::RenderViewport &viewport);
QColor m_kittyColor;
QPointF m_cursorPos;
bool m_pressed = false;
};
} // namespace

View file

@ -18,7 +18,7 @@ CatPawEffectConfig::CatPawEffectConfig(QObject *parent, const KPluginMetaData &d
{
m_ui.setupUi(widget());
addConfig(KWin::CatPawConfig::self(), widget());
addConfig(CatPawConfig::self(), widget());
}
void CatPawEffectConfig::save()

View file

@ -1,5 +1,4 @@
File=catpaw.kcfg
ClassName=CatPawConfig
NameSpace=KWin
Singleton=true
Mutators=true

View file

@ -6,11 +6,6 @@
#include "catpaw.h"
namespace KWin
{
KWIN_EFFECT_FACTORY(CatPawEffect, "metadata.json")
} // namespace KWin
#include "main.moc"