File indexing completed on 2024-04-28 04:37:32
0001 /* 0002 SPDX-FileCopyrightText: 2007 Roberto Raggi <roberto@kdevelop.org> 0003 SPDX-FileCopyrightText: 2007 Hamish Rodda <rodda@kde.org> 0004 0005 SPDX-License-Identifier: LicenseRef-MIT-KDevelop-Ideal 0006 */ 0007 0008 #ifndef KDEVPLATFORM_SUBLIME_IDEALLAYOUT_H 0009 #define KDEVPLATFORM_SUBLIME_IDEALLAYOUT_H 0010 0011 #include <QBoxLayout> 0012 0013 #include "sublimedefs.h" 0014 0015 namespace Sublime { 0016 0017 class IdealButtonBarLayout: public QBoxLayout 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 IdealButtonBarLayout(Qt::Orientation orientation, QWidget* styleParent); 0023 0024 ~IdealButtonBarLayout() override; 0025 0026 inline Qt::Orientation orientation() const; 0027 0028 Qt::Orientations expandingDirections() const override; 0029 0030 protected: 0031 0032 bool eventFilter(QObject* watched, QEvent* event) override; 0033 0034 int buttonSpacing() const; 0035 0036 private: 0037 QWidget* const m_styleParentWidget; 0038 const Qt::Orientation m_orientation; 0039 }; 0040 0041 } 0042 0043 #endif