sola.lu
2025-06-06 9dcea027f16c4ce5852da3dfc8aca284c582bd7d
examples/shared/widgetframe/windowbar.h
@@ -1,3 +1,7 @@
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef WINDOWBAR_H
#define WINDOWBAR_H
@@ -21,6 +25,7 @@
        QMenuBar *menuBar() const;
        QLabel *titleLabel() const;
        QAbstractButton *iconButton() const;
        QAbstractButton *pinButton() const;
        QAbstractButton *minButton() const;
        QAbstractButton *maxButton() const;
        QAbstractButton *closeButton() const;
@@ -28,6 +33,7 @@
        void setMenuBar(QMenuBar *menuBar);
        void setTitleLabel(QLabel *label);
        void setIconButton(QAbstractButton *btn);
        void setPinButton(QAbstractButton *btn);
        void setMinButton(QAbstractButton *btn);
        void setMaxButton(QAbstractButton *btn);
        void setCloseButton(QAbstractButton *btn);
@@ -35,6 +41,7 @@
        QMenuBar *takeMenuBar();
        QLabel *takeTitleLabel();
        QAbstractButton *takeIconButton();
        QAbstractButton *takePinButton();
        QAbstractButton *takeMinButton();
        QAbstractButton *takeMaxButton();
        QAbstractButton *takeCloseButton();
@@ -49,6 +56,7 @@
        void setIconFollowWindow(bool value);
    Q_SIGNALS:
        void pinRequested(bool pin = false);
        void minimizeRequested();
        void maximizeRequested(bool max = false);
        void closeRequested();
@@ -62,7 +70,7 @@
    protected:
        WindowBar(WindowBarPrivate &d, QWidget *parent = nullptr);
        const std::unique_ptr<WindowBarPrivate> d_ptr;
        QScopedPointer<WindowBarPrivate> d_ptr;
    };
}