KProperty

KPropertyUtils.h
1/* This file is part of the KDE project
2 Copyright (C) 2006-2016 Jarosław Staniek <staniek@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KPROPERTY_UTILS_H
21#define KPROPERTY_UTILS_H
22
23#include "kpropertywidgets_export.h"
24
25#include <QWidget>
26
27class KProperty;
28
29//! @short A container widget that can be used to split information into hideable sections
30//! for a property editor-like panes.
31class KPROPERTYWIDGETS_EXPORT KPropertyGroupWidget : public QWidget
32{
33 Q_OBJECT
34public:
35 explicit KPropertyGroupWidget(const QString& title, QWidget* parent = nullptr);
36 ~KPropertyGroupWidget() override;
37
38public Q_SLOTS:
39 void setContents(QWidget* contents);
40
41protected:
42 bool event(QEvent * e) override;
43
45 class Private;
46 Private * const d;
47};
48
49namespace KPropertyUtils {
50
51//! @return property object for model index @a index or @c nullptr if there is no property
52//! referenced by the index.
53KPROPERTYWIDGETS_EXPORT KProperty* propertyForIndex(const QModelIndex &index);
54
55} // KPropertyUtils
56
57#endif
A container widget that can be used to split information into hideable sections for a property editor...
The base class representing a single property.
Definition KProperty.h:96
Q_DISABLE_COPY(Class)
Q_SLOTSQ_SLOTS
virtual bool event(QEvent *event) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:41:55 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.