qtwidgets: Add views for the Classical and Segmented indicators
Copied from indicators/
This commit is contained in:
40
src/qtwidgets/views/SegmentedIndicatorsOverlay_qtwidgets.h
Normal file
40
src/qtwidgets/views/SegmentedIndicatorsOverlay_qtwidgets.h
Normal 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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user