aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2018-03-10 15:09:31 +0000
committerWeblate <noreply@weblate.org>2018-03-10 15:09:31 +0000
commite823783499a7b2f8c3cbfb24ae428b39311bee5e (patch)
tree74138f1e34b8f090f62bd5412f38b8e185209302 /src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp
parentTranslated using Weblate (Italian) (diff)
parentAdd the beginnings of the new window frame (widgets-based) (diff)
downloadlumina-e823783499a7b2f8c3cbfb24ae428b39311bee5e.tar.gz
lumina-e823783499a7b2f8c3cbfb24ae428b39311bee5e.tar.bz2
lumina-e823783499a7b2f8c3cbfb24ae428b39311bee5e.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.cpp48
1 files changed, 48 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 ===
bgstack15