qtwidgets: Add views for the Classical and Segmented indicators

Copied from indicators/
This commit is contained in:
Sergio Martins
2022-05-18 04:10:01 +01:00
parent 10b61f0e30
commit 7b486bb28c
21 changed files with 255 additions and 59 deletions

View File

@@ -0,0 +1,40 @@
/*
This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
Contact KDAB at <info@kdab.com> for commercial licensing options.
*/
#pragma once
#include "View_qtwidgets.h"
namespace KDDockWidgets {
class SegmentedIndicators;
namespace Views {
class DOCKS_EXPORT SegmentedIndicatorsOverlay_qtwidgets : public View_qtwidgets<QWidget>
{
Q_OBJECT
public:
explicit SegmentedIndicatorsOverlay_qtwidgets(SegmentedIndicators *controller, QWidget *parent = nullptr);
~SegmentedIndicatorsOverlay_qtwidgets() override;
protected:
void paintEvent(QPaintEvent *) override;
private:
void drawSegments(QPainter *p);
void drawSegment(QPainter *p, const QPolygon &segment);
SegmentedIndicators *const m_controller;
};
}
}