| | |
| | | #include "WindowBar.h" |
| | | #include "WindowBar_p.h" |
| | | // Copyright (C) 2023-2024 Stdware Collections |
| | | // SPDX-License-Identifier: Apache-2.0 |
| | | |
| | | #include "windowbar.h" |
| | | #include "windowbar_p.h" |
| | | |
| | | #include <QtCore/QDebug> |
| | | #include <QtCore/QLocale> |
| | | #include <QtGui/QtEvents> |
| | | |
| | | namespace QWK { |
| | |
| | | autoIcon = false; |
| | | } |
| | | |
| | | WindowBarPrivate::~WindowBarPrivate() { |
| | | } |
| | | WindowBarPrivate::~WindowBarPrivate() = default; |
| | | |
| | | void WindowBarPrivate::init() { |
| | | Q_Q(WindowBar); |
| | | layout = new QHBoxLayout(); |
| | | if (QLocale::system().textDirection() == Qt::RightToLeft) { |
| | | layout->setDirection(QBoxLayout::RightToLeft); |
| | | } |
| | | |
| | | layout->setContentsMargins(QMargins()); |
| | | layout->setSpacing(0); |
| | | for (int i = IconButton; i <= CloseButton; ++i) { |
| | |
| | | WindowBar::WindowBar(QWidget *parent) : WindowBar(*new WindowBarPrivate(), parent) { |
| | | } |
| | | |
| | | WindowBar::~WindowBar() { |
| | | } |
| | | WindowBar::~WindowBar() = default; |
| | | |
| | | QMenuBar *WindowBar::menuBar() const { |
| | | Q_D(const WindowBar); |