mirror of
https://github.com/redstrate/CatPaw.git
synced 2025-04-20 11:47:45 +00:00
Move out of KWin namespace
This commit is contained in:
parent
a1c6e9aeda
commit
db21849b9e
5 changed files with 6 additions and 22 deletions
|
@ -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"
|
||||
|
|
12
src/catpaw.h
12
src/catpaw.h
|
@ -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 ®ion, Output *screen) override;
|
||||
void
|
||||
paintScreen(const KWin::RenderTarget &renderTarget, const KWin::RenderViewport &viewport, int mask, const QRegion ®ion, 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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
File=catpaw.kcfg
|
||||
ClassName=CatPawConfig
|
||||
NameSpace=KWin
|
||||
Singleton=true
|
||||
Mutators=true
|
||||
|
|
|
@ -6,11 +6,6 @@
|
|||
|
||||
#include "catpaw.h"
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
KWIN_EFFECT_FACTORY(CatPawEffect, "metadata.json")
|
||||
|
||||
} // namespace KWin
|
||||
|
||||
#include "main.moc"
|
||||
|
|
Loading…
Add table
Reference in a new issue