summary refs log tree commit diff
path: root/include/ui/RippleOverlay.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-17 16:37:25 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-17 16:37:25 +0300
commit0e814da91c8e041897a4c3f7e6e9234bbc7c6f7a (patch)
tree21f655d30630fe77ba48d07e4b357e2b6c6a5730 /include/ui/RippleOverlay.h
parentMerge pull request #372 from bebehei/notification (diff)
downloadnheko-0e814da91c8e041897a4c3f7e6e9234bbc7c6f7a.tar.xz
Move all files under src/
Diffstat (limited to 'include/ui/RippleOverlay.h')
-rw-r--r--include/ui/RippleOverlay.h57
1 files changed, 0 insertions, 57 deletions
diff --git a/include/ui/RippleOverlay.h b/include/ui/RippleOverlay.h
deleted file mode 100644

index 9ef91fbf..00000000 --- a/include/ui/RippleOverlay.h +++ /dev/null
@@ -1,57 +0,0 @@ -#pragma once - -#include <QPainterPath> - -#include "OverlayWidget.h" - -class Ripple; - -class RippleOverlay : public OverlayWidget -{ - Q_OBJECT - -public: - explicit RippleOverlay(QWidget *parent = 0); - - void addRipple(Ripple *ripple); - void addRipple(const QPoint &position, qreal radius = 300); - - void removeRipple(Ripple *ripple); - - inline void setClipping(bool enable); - inline bool hasClipping() const; - - inline void setClipPath(const QPainterPath &path); - -protected: - void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; - -private: - Q_DISABLE_COPY(RippleOverlay) - - void paintRipple(QPainter *painter, Ripple *ripple); - - QList<Ripple *> ripples_; - QPainterPath clip_path_; - bool use_clip_; -}; - -inline void -RippleOverlay::setClipping(bool enable) -{ - use_clip_ = enable; - update(); -} - -inline bool -RippleOverlay::hasClipping() const -{ - return use_clip_; -} - -inline void -RippleOverlay::setClipPath(const QPainterPath &path) -{ - clip_path_ = path; - update(); -}