Files
qt-creator/src/libs/advanceddockingsystem/pushbutton.h
Henning Gruendl 16ef838f23 ADS: Integrate newest base repository commits
* Update to newest version of ADS
* Remove native window and title bar support on linux

Base repository was merged until commit
8d4507e9d83434be976ff8c7bc9f59733937a08d

Task-number: QDS-10242
Change-Id: If74b6b50421be3b759c61b0f76f4a330991f71fa
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-07-20 11:00:24 +00:00

48 lines
921 B
C++

// Copyright (C) 2020 Uwe Kindler
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later
#pragma once
#include "ads_globals.h"
#include <QPushButton>
namespace ADS {
/**
* ADS specific push button class with orientation support
*/
class ADS_EXPORT PushButton : public QPushButton
{
Q_OBJECT
public:
enum Orientation {
Horizontal,
VerticalTopToBottom,
VerticalBottomToTop
};
using QPushButton::QPushButton;
virtual QSize sizeHint() const override;
/**
* Returns the current orientation
*/
Orientation buttonOrientation() const;
/**
* Set the orientation of this button
*/
void setButtonOrientation(Orientation orientation);
protected:
virtual void paintEvent(QPaintEvent *event) override;
private:
Orientation m_orientation = Horizontal;
}; // class PushButton
} // namespace ADS