File indexing completed on 2024-05-26 05:37:03

0001 /*
0002     SPDX-FileCopyrightText: 2019 Harald Sitter <sitter@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 #pragma once
0008 
0009 #include "xkbobject.h"
0010 
0011 class Outline : public XkbObject
0012 {
0013     Q_OBJECT
0014 #define P(type, name)                                                                                                                                          \
0015 private:                                                                                                                                                       \
0016     Q_PROPERTY(type name READ auto_prop_##name CONSTANT)                                                                                                       \
0017 public:                                                                                                                                                        \
0018     type auto_prop_##name() const                                                                                                                              \
0019     {                                                                                                                                                          \
0020         return outline->name;                                                                                                                                  \
0021     }
0022 
0023     P(unsigned short, corner_radius)
0024 
0025     Q_PROPERTY(QVariantList points MEMBER points CONSTANT)
0026 
0027 public:
0028     Outline(XkbOutlinePtr outline_, XkbDescPtr xkb_, QObject *parent = nullptr);
0029 
0030     XkbOutlinePtr outline = nullptr;
0031     QVariantList points;
0032 };