aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/LDesktopBackground.h
diff options
context:
space:
mode:
authorHenry Hu <henry.hu.sh@gmail.com>2016-05-12 19:11:10 -0400
committerHenry Hu <henry.hu.sh@gmail.com>2016-05-12 19:11:10 -0400
commit40c939afe1f7ff30531096fba621c6c5860cefe4 (patch)
tree615d804841d7ed895f8c8acadd18a6d5be5ac519 /src-qt5/core/lumina-desktop/LDesktopBackground.h
parentadd 2 options for background image: fit and full (diff)
downloadlumina-40c939afe1f7ff30531096fba621c6c5860cefe4.tar.gz
lumina-40c939afe1f7ff30531096fba621c6c5860cefe4.tar.bz2
lumina-40c939afe1f7ff30531096fba621c6c5860cefe4.zip
Move background processing into LDesktopBackground class
Generate a QPixmap and use it during paintEvent
Diffstat (limited to 'src-qt5/core/lumina-desktop/LDesktopBackground.h')
-rw-r--r--src-qt5/core/lumina-desktop/LDesktopBackground.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-desktop/LDesktopBackground.h b/src-qt5/core/lumina-desktop/LDesktopBackground.h
new file mode 100644
index 00000000..a9ce64fa
--- /dev/null
+++ b/src-qt5/core/lumina-desktop/LDesktopBackground.h
@@ -0,0 +1,27 @@
+//===========================================
+// Lumina-DE source code
+// Copyright (c) 2016, Henry Hu
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+#ifndef _LUMINA_DESKTOP_LDESKTOPBACKGROUND_H_
+#define _LUMINA_DESKTOP_LDESKTOPBACKGROUND_H_
+
+#include <QString>
+#include <QWidget>
+#include <QPixmap>
+
+class LDesktopBackground: public QWidget {
+ Q_OBJECT
+public:
+ LDesktopBackground();
+ virtual ~LDesktopBackground();
+
+ virtual void paintEvent(QPaintEvent*);
+ void setBackground(const QString&, const QString&);
+
+private:
+ QPixmap *bgPixmap;
+};
+
+#endif // _LUMINA_DESKTOP_LDESKTOPBACKGROUND_H_
bgstack15