File indexing completed on 2024-06-16 05:08:52
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 <QRect> 0010 0011 #include "xkbobject.h" 0012 0013 class Row : public XkbObject 0014 { 0015 Q_OBJECT 0016 0017 #define R_P(type, name) \ 0018 private: \ 0019 Q_PROPERTY(type name READ auto_prop_##name CONSTANT) \ 0020 public: \ 0021 type auto_prop_##name() const \ 0022 { \ 0023 return row->name; \ 0024 } 0025 0026 R_P(short, top) 0027 R_P(short, left) 0028 0029 Q_PROPERTY(Qt::Orientation orientation MEMBER orientation CONSTANT) 0030 Q_PROPERTY(QList<QObject *> keys MEMBER keys CONSTANT) 0031 Q_PROPERTY(QRect bounds MEMBER bounds CONSTANT) 0032 public: 0033 Row(XkbRowPtr row_, XkbDescPtr xkb_, QObject *parent = nullptr); 0034 0035 XkbRowPtr row = nullptr; 0036 Qt::Orientation orientation = Qt::Horizontal; 0037 QList<QObject *> keys; 0038 QRect bounds; 0039 };