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 "core/renderviewport.h"
|
||||||
#include "effect/effecthandler.h"
|
#include "effect/effecthandler.h"
|
||||||
|
|
||||||
#include <QPainter>
|
|
||||||
#include <QTabletEvent>
|
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <opengl/openglcontext.h>
|
#include <opengl/openglcontext.h>
|
||||||
|
|
||||||
namespace KWin
|
using namespace KWin;
|
||||||
{
|
|
||||||
|
|
||||||
CatPawEffect::CatPawEffect()
|
CatPawEffect::CatPawEffect()
|
||||||
{
|
{
|
||||||
|
@ -186,6 +182,4 @@ QColor CatPawEffect::kittyColor() const
|
||||||
return m_kittyColor;
|
return m_kittyColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
#include "moc_catpaw.cpp"
|
#include "moc_catpaw.cpp"
|
||||||
|
|
12
src/catpaw.h
12
src/catpaw.h
|
@ -11,17 +11,15 @@
|
||||||
|
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
|
||||||
namespace KWin
|
class CatPawEffect : public KWin::Effect
|
||||||
{
|
|
||||||
|
|
||||||
class CatPawEffect : public Effect
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
CatPawEffect();
|
CatPawEffect();
|
||||||
~CatPawEffect() override;
|
~CatPawEffect() override;
|
||||||
void reconfigure(ReconfigureFlags) 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;
|
void postPaintScreen() override;
|
||||||
|
|
||||||
// for properties
|
// for properties
|
||||||
|
@ -37,11 +35,9 @@ private Q_SLOTS:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void repaint();
|
void repaint();
|
||||||
void drawKitty(const RenderTarget &renderTarget, const RenderViewport &viewport);
|
void drawKitty(const KWin::RenderTarget &renderTarget, const KWin::RenderViewport &viewport);
|
||||||
|
|
||||||
QColor m_kittyColor;
|
QColor m_kittyColor;
|
||||||
QPointF m_cursorPos;
|
QPointF m_cursorPos;
|
||||||
bool m_pressed = false;
|
bool m_pressed = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ CatPawEffectConfig::CatPawEffectConfig(QObject *parent, const KPluginMetaData &d
|
||||||
{
|
{
|
||||||
m_ui.setupUi(widget());
|
m_ui.setupUi(widget());
|
||||||
|
|
||||||
addConfig(KWin::CatPawConfig::self(), widget());
|
addConfig(CatPawConfig::self(), widget());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CatPawEffectConfig::save()
|
void CatPawEffectConfig::save()
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
File=catpaw.kcfg
|
File=catpaw.kcfg
|
||||||
ClassName=CatPawConfig
|
ClassName=CatPawConfig
|
||||||
NameSpace=KWin
|
|
||||||
Singleton=true
|
Singleton=true
|
||||||
Mutators=true
|
Mutators=true
|
||||||
|
|
|
@ -6,11 +6,6 @@
|
||||||
|
|
||||||
#include "catpaw.h"
|
#include "catpaw.h"
|
||||||
|
|
||||||
namespace KWin
|
|
||||||
{
|
|
||||||
|
|
||||||
KWIN_EFFECT_FACTORY(CatPawEffect, "metadata.json")
|
KWIN_EFFECT_FACTORY(CatPawEffect, "metadata.json")
|
||||||
|
|
||||||
} // namespace KWin
|
|
||||||
|
|
||||||
#include "main.moc"
|
#include "main.moc"
|
||||||
|
|
Loading…
Add table
Reference in a new issue