aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/RootSubWindow.h
blob: d4119cccd7f542e266f0d89003e4e44057414809 (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
45
46
47
48
49
50
//===========================================
//  Lumina Desktop source code
//  Copyright (c) 2017, Ken Moore
//  Available under the 3-clause BSD license
//  See the LICENSE file for full details
//===========================================
//  This class embeds a native window
//  within the RootWindow area
//===========================================
#ifndef _LUMINA_ROOT_WINDOW_SUB_WINDOW_H
#define _LUMINA_ROOT_WINDOW_SUB_WINDOW_H

#include <QMdiArea>
#include <QMdiSubWindow>
#include <QWindow>
#include <QWidget>
#include <QCloseEvent>

class RootSubWindow : public QMdiSubWindow{
	Q_OBJECT
public:
	RootSubWindow(QMdiArea *root, WId window, Qt::WindowFlags flags = Qt::WindowFlags());
	~RootSubWindow();

	WId id();

private:
	WId CID; //client window ID
	QWindow *WIN; //Embedded window container
	QWidget *WinWidget;
	bool closing;
public slots:
	void clientClosed();
	void clientHidden();
	void clientShown();
	
private slots:
	void aboutToActivate();
	void adjustHeight(int);
	void adjustWidth(int);

protected:
	void closeEvent(QCloseEvent*);

signals:
	void Activated(WId);

};

#endif
bgstack15