aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-03-13 09:39:35 -0400
committerKen Moore <ken@ixsystems.com>2018-03-13 09:39:35 -0400
commit83ca2eae7924ba668baecd66631628507b77c60f (patch)
tree7bf2eb52224d530844a1e0af23762d3cef70700c /src-qt5/core
parentOops - comment out a debugging break in the print routine. (diff)
parentAdded multithreading support for the MuPDF backend and fixed rendering errors (diff)
downloadlumina-83ca2eae7924ba668baecd66631628507b77c60f.tar.gz
lumina-83ca2eae7924ba668baecd66631628507b77c60f.tar.bz2
lumina-83ca2eae7924ba668baecd66631628507b77c60f.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp48
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h34
2 files changed, 82 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
new file mode 100644
index 00000000..24ad3fda
--- /dev/null
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp
@@ -0,0 +1,48 @@
+//===========================================
+// Lumina-desktop source code
+// Copyright (c) 2018, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+#include "NativeWindow.h"
+
+// === PUBLIC ===
+NativeWindow::NativeWindow( NativeWindowObject *obj ) : QFrame(0, Qt::Window | Qt::FramelessWindowHint){
+ WIN = obj;
+ createFrame();
+}
+
+NativeWindow::~NativeWindow(){
+
+}
+
+// === PRIVATE ===
+void NativeWindow::createFrame(){
+ //Initialize the widgets
+ closeB = new QToolButton(this);
+ closeB->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ minB = new QToolButton(this);
+ minB->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ maxB = new QToolButton(this);
+ maxB->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ otherB = new QToolButton(this);
+ otherB->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ toolbarL = new QHBoxLayout(this);
+ vlayout = new QVBoxLayout(this);
+ vlayout.align
+ titleLabel = new QLabel(this);
+ titleLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ //Now put the widgets in the right places
+ toolbarL->addWidget(otherB);
+ toolbarL->addWidget(titleLabel);
+ toolbarL->addWidget(minB);
+ toolbarL->addWidget(maxB);
+ toolbarL->addWidget(closeB);
+ vlayout->addLayout(toolbarL);
+ vlayout->addStretch();
+ this->setLayout(vlayout);
+
+ //
+}
+
+// === PRIVATE SLOTS ===
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
new file mode 100644
index 00000000..ffdb364a
--- /dev/null
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h
@@ -0,0 +1,34 @@
+//===========================================
+// 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_NATIVE_WINDOW_WIDGET_H
+#define _LUMINA_DESKTOP_NATIVE_WINDOW_WIDGET_H
+
+#include <global-includes.h>
+
+class NativeWindow : public QFrame{
+ Q_OBJECT
+public:
+ NativeWindow(NativeWindowObject *obj);
+ ~NativeWindow();
+
+private:
+ //Core object
+ NativeWindowObject *WIN;
+ // Interface items
+ void createFrame();
+ QToolButton *closeB, *minB, *maxB, *otherB;
+ QHBoxLayout *toolbarL;
+ QVBoxLayout *vlayout;
+ QLabel *titleLabel;
+ // Info cache variables
+ QRect oldgeom;
+
+private slots:
+
+};
+
+#endif
bgstack15