forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Henning Gründl
parent
21983a8377
commit
16ef838f23
47
src/libs/advanceddockingsystem/pushbutton.h
Normal file
47
src/libs/advanceddockingsystem/pushbutton.h
Normal file
@@ -0,0 +1,47 @@
|
||||
// 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
|
||||
Reference in New Issue
Block a user