/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #pragma once #if !defined(Q_MOC_RUN) #include #include #include #include #include #endif namespace O3DE::ProjectManager { // Using a QTableWidget for its header // Using a seperate model allows the setup of a header exactly as needed class AdjustableHeaderWidget : public QTableWidget { Q_OBJECT public: explicit AdjustableHeaderWidget(const QStringList& headerLabels, const QVector& defaultHeaderWidths, int minHeaderWidth, const QVector& resizeModes, QWidget* parent = nullptr); ~AdjustableHeaderWidget() = default; QPair CalcColumnXBounds(int headerIndex) const; inline constexpr static int s_headerTextIndent = 7; inline constexpr static int s_headerWidgetHeight = 24; QHeaderView* m_header; signals: void sectionsResized(); protected slots: void OnSectionResized(int logicalIndex, int oldSize, int newSize); private: inline constexpr static int s_headerIndentSection = 11; }; } // namespace O3DE::ProjectManager