aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-03-20 13:25:44 -0400
committerKen Moore <ken@ixsystems.com>2018-03-20 13:25:44 -0400
commitb7638d73de2d2f638efe2a83e302f2533eb2c5c0 (patch)
tree54e676c0374ac1dcb697c47a703d1faf1f8c8e88 /src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets
parentCleanup the printing stuff for Qt 5.9+. (diff)
downloadlumina-b7638d73de2d2f638efe2a83e302f2533eb2c5c0.tar.gz
lumina-b7638d73de2d2f638efe2a83e302f2533eb2c5c0.tar.bz2
lumina-b7638d73de2d2f638efe2a83e302f2533eb2c5c0.zip
Quick checkpoint on the new NativeWindow class (Widgets).
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp58
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h9
2 files changed, 67 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp
index 24ad3fda..3bde9ab8 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp
@@ -10,6 +10,25 @@
NativeWindow::NativeWindow( NativeWindowObject *obj ) : QFrame(0, Qt::Window | Qt::FramelessWindowHint){
WIN = obj;
createFrame();
+ WIN->addFrameWinID(this->winId());
+ //Setup all the property connections
+ connect(WIN, SIGNAL(winImageChanged()), this, SLOT(syncWinImage()):
+ connect(WIN, SIGNAL(nameChanged()), this, SLOT(syncName()):
+ connect(WIN, SIGNAL(titleChanged()), this, SLOT(syncTitle()):
+ connect(WIN, SIGNAL(iconChanged()), this, SLOT(syncIcon()):
+ connect(WIN, SIGNAL(stickyChanged()), this, SLOT(syncSticky()):
+ connect(WIN, SIGNAL(visibilityChanged()), this, SLOT(syncVisibility()):
+ connect(WIN, SIGNAL(winTypeChanged()), this, SLOT(syncWinType()):
+ connect(WIN, SIGNAL(geomChanged()), this, SLOT(syncGeom()):
+ //Now Perform the initial property loads
+ syncWinImage();
+ syncName();
+ syncTitle();
+ syncIcon();
+ syncSticky();
+ syncVisibility();
+ syncWinType();
+ syncGeom();
}
NativeWindow::~NativeWindow(){
@@ -46,3 +65,42 @@ void NativeWindow::createFrame(){
}
// === PRIVATE SLOTS ===
+
+//Property Change slots
+void NativeWindow::syncWinImage(){
+ //Do nothing at the moment (compositing disabled)
+}
+
+void NativeWindow::syncName(){
+ qDebug() << "Got Name Change:" << WIN->name();
+}
+
+void NativeWindow::syncTitle(){
+ titleLabel->setText(WIN->title());
+}
+
+void NativeWindow::syncIcon(){
+ //Do not use the "WIN->icon()" function, that is the URL format for QML
+ otherB->setIcon( QIcon(WIN->property(NativeWindowObject::Icon).value<QIcon>()) );
+}
+
+void NativeWindow::syncSticky(){
+ qDebug() << "Got Sticky Change:" << WIN->isSticky();
+}
+
+void NativeWindow::syncVisibility(){
+ this->setVisible(WIN->isVisible());
+}
+
+void NativeWindow::syncWinType(){
+ closeB->setVisible(WIN->showCloseButton());
+ maxB->setVisible(WIN->showMaxButton());
+ minB->setVisible(WIN->showMinButton());
+ titleLabel->setVisible(WIN->showTitlebar());
+ otherB->setVisible(WIN->showGenericButton());
+
+}
+
+void NativeWindow::syncGeom(){
+
+}
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h
index ffdb364a..794cfad2 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h
@@ -29,6 +29,15 @@ private:
private slots:
+ //Property Change slots
+ void syncWinImage();
+ void syncName();
+ void syncTitle();
+ void syncIcon();
+ void syncSticky();
+ void syncVisibility();
+ void syncWinType();
+ void syncGeom();
};
#endif
bgstack15