KWin
Loading...
Searching...
No Matches
Signals | Public Member Functions | Static Public Member Functions | Properties | List of all members
KWin::ScriptedQuickSceneEffect Class Reference

#include <scriptedquicksceneeffect.h>

Inheritance diagram for KWin::ScriptedQuickSceneEffect:
KWin::QuickSceneEffect KWin::Effect

Signals

void visibleChanged ()
 
void configurationChanged ()
 
- Signals inherited from KWin::QuickSceneEffect
void itemDraggedOutOfScreen (QQuickItem *item, QList< Output * > screens)
 
void itemDroppedOutOfScreen (const QPointF &globalPos, QQuickItem *item, Output *screen)
 
void activeViewChanged (KWin::QuickSceneView *view)
 
void delegateChanged ()
 

Public Member Functions

 ScriptedQuickSceneEffect ()
 
 ~ScriptedQuickSceneEffect () override
 
void setMetaData (const KPluginMetaData &metaData)
 
void reconfigure (ReconfigureFlags flags) override
 
int requestedEffectChainPosition () const override
 
bool isVisible () const
 
void setVisible (bool visible)
 
QQmlListProperty< QObject > data ()
 
KConfigPropertyMap * configuration () const
 
- Public Member Functions inherited from KWin::QuickSceneEffect
 QuickSceneEffect (QObject *parent=nullptr)
 
 ~QuickSceneEffect () override
 
bool isRunning () const
 
void setRunning (bool running)
 
QuickSceneViewactiveView () const
 
Q_INVOKABLE QuickSceneViewviewForScreen (Output *screen) const
 
Q_INVOKABLE QuickSceneViewviewAt (const QPoint &pos) const
 
Q_INVOKABLE KWin::QuickSceneViewgetView (Qt::Edge edge)
 
Q_INVOKABLE void activateView (QuickSceneView *view)
 
QQmlComponent * delegate () const
 
void setDelegate (QQmlComponent *delegate)
 
QUrl source () const
 
void setSource (const QUrl &url)
 
bool eventFilter (QObject *watched, QEvent *event) override
 
void prePaintScreen (ScreenPrePaintData &data, std::chrono::milliseconds presentTime) override
 
void paintScreen (const RenderTarget &renderTarget, const RenderViewport &viewport, int mask, const QRegion &region, Output *screen) override
 
bool isActive () const override
 
void windowInputMouseEvent (QEvent *event) override
 
void grabbedKeyboardEvent (QKeyEvent *keyEvent) override
 
bool touchDown (qint32 id, const QPointF &pos, std::chrono::microseconds time) override
 
bool touchMotion (qint32 id, const QPointF &pos, std::chrono::microseconds time) override
 
bool touchUp (qint32 id, std::chrono::microseconds time) override
 
Q_INVOKABLE void checkItemDraggedOutOfScreen (QQuickItem *item)
 
Q_INVOKABLE void checkItemDroppedOutOfScreen (const QPointF &globalPos, QQuickItem *item)
 
- Public Member Functions inherited from KWin::Effect
 Effect (QObject *parent=nullptr)
 
 ~Effect () override
 
virtual void postPaintScreen ()
 
virtual void prePaintWindow (EffectWindow *w, WindowPrePaintData &data, std::chrono::milliseconds presentTime)
 
virtual void paintWindow (const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
 
virtual void postPaintWindow (EffectWindow *w)
 
virtual bool provides (Feature)
 
virtual bool perform (Feature feature, const QVariantList &arguments)
 
virtual void drawWindow (const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, const QRegion &region, WindowPaintData &data)
 
virtual QString debug (const QString &parameter) const
 
virtual bool tabletToolEvent (QTabletEvent *event)
 
virtual bool tabletToolButtonEvent (uint button, bool pressed, quint64 tabletToolId)
 
virtual bool tabletPadButtonEvent (uint button, bool pressed, void *tabletPadId)
 
virtual bool tabletPadStripEvent (int number, int position, bool isFinger, void *tabletPadId)
 
virtual bool tabletPadRingEvent (int number, int position, bool isFinger, void *tabletPadId)
 
template<typename T >
int animationTime (int defaultDuration)
 
virtual bool blocksDirectScanout () const
 

Static Public Member Functions

static void data_append (QQmlListProperty< QObject > *objects, QObject *object)
 
static qsizetype data_count (QQmlListProperty< QObject > *objects)
 
static QObject * data_at (QQmlListProperty< QObject > *objects, qsizetype index)
 
static void data_clear (QQmlListProperty< QObject > *objects)
 
- Static Public Member Functions inherited from KWin::QuickSceneEffect
static bool supported ()
 
- Static Public Member Functions inherited from KWin::Effect
static QPointF cursorPos ()
 
static double animationTime (const KConfigGroup &cfg, const QString &key, int defaultTime)
 
static double animationTime (int defaultTime)
 
static double interpolate (double x, double y, double a)
 
static void setPositionTransformations (WindowPaintData &data, QRect &region, EffectWindow *w, const QRect &r, Qt::AspectRatioMode aspect)
 

Properties

QQmlListProperty< QObject > data
 
KConfigPropertyMap * configuration
 
bool visible
 
- Properties inherited from KWin::QuickSceneEffect
QuickSceneViewactiveView
 
QQmlComponent * delegate
 

Additional Inherited Members

- Public Types inherited from KWin::Effect
enum  {
  PAINT_WINDOW_OPAQUE = 1 << 0 , PAINT_WINDOW_TRANSLUCENT = 1 << 1 , PAINT_WINDOW_TRANSFORMED = 1 << 2 , PAINT_SCREEN_REGION = 1 << 3 ,
  PAINT_SCREEN_TRANSFORMED = 1 << 4 , PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS = 1 << 5 , PAINT_SCREEN_BACKGROUND_FIRST = 1 << 6
}
 
enum  Feature {
  Nothing = 0 , ScreenInversion , Blur , Contrast ,
  HighlightWindows
}
 
enum  ReconfigureFlag { ReconfigureAll = 1 << 0 }
 
- Public Slots inherited from KWin::Effect
virtual bool borderActivated (ElectricBorder border)
 
- Protected Member Functions inherited from KWin::QuickSceneEffect
virtual QVariantMap initialProperties (Output *screen)
 

Detailed Description

The SceneEffect type provides a way to implement effects that replace the default scene with a custom one.

Example usage:

SceneEffect {
id: root
delegate: Rectangle {
color: "blue"
}
name: "Toggle Effect"
text: i18n("Toggle Effect")
sequence: "Meta+E"
onActivated: root.visible = !root.visible;
}
}
QQmlComponent * delegate
Definition quickeffect.h:79

Definition at line 43 of file scriptedquicksceneeffect.h.

Constructor & Destructor Documentation

◆ ScriptedQuickSceneEffect()

KWin::ScriptedQuickSceneEffect::ScriptedQuickSceneEffect ( )
explicit

Definition at line 18 of file scriptedquicksceneeffect.cpp.

◆ ~ScriptedQuickSceneEffect()

KWin::ScriptedQuickSceneEffect::~ScriptedQuickSceneEffect ( )
override

Definition at line 26 of file scriptedquicksceneeffect.cpp.

Member Function Documentation

◆ configuration()

KConfigPropertyMap * KWin::ScriptedQuickSceneEffect::configuration ( ) const

Definition at line 82 of file scriptedquicksceneeffect.cpp.

◆ configurationChanged

void KWin::ScriptedQuickSceneEffect::configurationChanged ( )
signal

◆ data()

QQmlListProperty< QObject > KWin::ScriptedQuickSceneEffect::data ( )

◆ data_append()

void KWin::ScriptedQuickSceneEffect::data_append ( QQmlListProperty< QObject > * objects,
QObject * object )
static

Definition at line 96 of file scriptedquicksceneeffect.cpp.

◆ data_at()

QObject * KWin::ScriptedQuickSceneEffect::data_at ( QQmlListProperty< QObject > * objects,
qsizetype index )
static

Definition at line 115 of file scriptedquicksceneeffect.cpp.

◆ data_clear()

void KWin::ScriptedQuickSceneEffect::data_clear ( QQmlListProperty< QObject > * objects)
static

Definition at line 121 of file scriptedquicksceneeffect.cpp.

◆ data_count()

qsizetype KWin::ScriptedQuickSceneEffect::data_count ( QQmlListProperty< QObject > * objects)
static

Definition at line 109 of file scriptedquicksceneeffect.cpp.

◆ isVisible()

bool KWin::ScriptedQuickSceneEffect::isVisible ( ) const

Definition at line 59 of file scriptedquicksceneeffect.cpp.

◆ reconfigure()

void KWin::ScriptedQuickSceneEffect::reconfigure ( ReconfigureFlags flags)
overridevirtual

Called when configuration changes (either the effect's or KWin's global).

In OpenGL based compositing, the frameworks ensures that the context is current when the Effect is reconfigured. If this method is called from within the Effect it is required to ensure that the context is current if the implementation does OpenGL calls.

Reimplemented from KWin::Effect.

Definition at line 30 of file scriptedquicksceneeffect.cpp.

◆ requestedEffectChainPosition()

int KWin::ScriptedQuickSceneEffect::requestedEffectChainPosition ( ) const
overridevirtual

Reimplement this method to indicate where in the Effect chain the Effect should be placed.

A low number indicates early chain position, thus before other Effects got called, a high number indicates a late position. The returned number should be in the interval [0, 100]. The default value is 0.

In KWin4 this information was provided in the Effect's desktop file as property X-KDE-Ordering. In the case of Scripted Effects this property is still used.

Since
5.0

Reimplemented from KWin::Effect.

Definition at line 36 of file scriptedquicksceneeffect.cpp.

◆ setMetaData()

void KWin::ScriptedQuickSceneEffect::setMetaData ( const KPluginMetaData & metaData)

Definition at line 41 of file scriptedquicksceneeffect.cpp.

◆ setVisible()

void KWin::ScriptedQuickSceneEffect::setVisible ( bool visible)

Definition at line 64 of file scriptedquicksceneeffect.cpp.

◆ visibleChanged

void KWin::ScriptedQuickSceneEffect::visibleChanged ( )
signal

Property Documentation

◆ configuration

KConfigPropertyMap * KWin::ScriptedQuickSceneEffect::configuration
read

The key-value store with the effect settings.

Definition at line 52 of file scriptedquicksceneeffect.h.

◆ data

QQmlListProperty< QObject > KWin::ScriptedQuickSceneEffect::data
read

Definition at line 46 of file scriptedquicksceneeffect.h.

◆ visible

bool KWin::ScriptedQuickSceneEffect::visible
readwrite

Whether the effect is shown. Setting this property to true activates the effect; setting this property to false will deactivate the effect and the screen views will be unloaded at the next available time.

Definition at line 59 of file scriptedquicksceneeffect.h.


The documentation for this class was generated from the following files: