KProperty

KPropertyMultiLineStringEditor.h
1/* This file is part of the KDE project
2 Copyright (C) 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_MULTILINESTRINGEDITOR_H
21#define KPROPERTY_MULTILINESTRINGEDITOR_H
22
23#include "KPropertyWidgetsFactory.h"
24
25//! Editor for string type supporting multiple lines of plain text
26//! @since 3.1
27class KPROPERTYWIDGETS_EXPORT KPropertyMultiLineStringEditor : public QWidget
28{
29 Q_OBJECT
30 Q_PROPERTY(QString value READ value WRITE setValue USER true)
31public:
32 explicit KPropertyMultiLineStringEditor(QWidget *parent = nullptr);
33
35
36 QString value() const;
37
39 void commitData(QWidget *editor);
40
41public Q_SLOTS:
42 void setValue(const QString &value);
43
44private Q_SLOTS:
45 void slotTextChanged();
46
47protected:
48 bool eventFilter(QObject *o, QEvent *ev) override;
49 void paintEvent(QPaintEvent * event) override;
50
51private:
53 class Private;
54 Private * const d;
55};
56
57#endif
Editor for string type supporting multiple lines of plain text.
Q_DISABLE_COPY(Class)
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
virtual bool eventFilter(QObject *watched, QEvent *event)
virtual void paintEvent(QPaintEvent *event)
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.