aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/RootDesktop.h
blob: 16ce0e47162749c8d02d1ccfdbcc82d503f1a0c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//===========================================
//  Lumina-desktop source code
//  Copyright (c) 2018, Ken Moore
//  Available under the 3-clause BSD license
//  See the LICENSE file for full details
//===========================================
#ifndef _LUMINA_DESKTOP_WIDGETS_ROOT_DESKTOP_H
#define _LUMINA_DESKTOP_WIDGETS_ROOT_DESKTOP_H

#include <global-includes.h>
#include "ContextMenu.h"

class RootDesktop : public QWidget{
	Q_OBJECT
public:
	RootDesktop(QWindow *root);
	~RootDesktop();

	void start();

private:
	QImage bgimage;
	QStringList lastscreens;
	QTimer *bgTimer;
	DesktopContextMenu *cmenu;

private slots:
	//RootDesktopObject connections
	void on_screensChanged();
	void on_panelsChanged();
	void on_windowsChanged();
	void on_trayWindowsChanged();
	void on_screen_bg_changed();

	//Internal use
	void bgTimerUpdate();
	void updateBG(RootDesktop* obj); //designed to be run in a background thread

protected:
	virtual void paintEvent(QPaintEvent *ev);

};

#endif
bgstack15