KProperty

KPropertyMultiLineStringEditor.h
1 /* This file is part of the KDE project
2  Copyright (C) 2016 Jarosław Staniek <[email protected]>
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 
27 class KPROPERTYWIDGETS_EXPORT KPropertyMultiLineStringEditor : public QWidget
28 {
29  Q_OBJECT
30  Q_PROPERTY(QString value READ value WRITE setValue USER true)
31 public:
32  explicit KPropertyMultiLineStringEditor(QWidget *parent = nullptr);
33 
35 
36  QString value() const;
37 
38 Q_SIGNALS:
39  void commitData(QWidget *editor);
40 
41 public Q_SLOTS:
42  void setValue(const QString &value);
43 
44 private Q_SLOTS:
45  void slotTextChanged();
46 
47 protected:
48  bool eventFilter(QObject *o, QEvent *ev) override;
49  void paintEvent(QPaintEvent * event) override;
50 
51 private:
53  class Private;
54  Private * const d;
55 };
56 
57 #endif
virtual void paintEvent(QPaintEvent *event)
Editor for string type supporting multiple lines of plain text.
virtual bool eventFilter(QObject *watched, QEvent *event)
Q_PROPERTY(...)
Q_DISABLE_COPY(Class)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jul 10 2020 23:01:16 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.