KDELibs4Support

krestrictedline.h
1 /*
2  * Definition of KRestrictedLine
3  *
4  * Copyright (C) 1997 Michael Wiedmann, <[email protected]>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the Free
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  */
21 
22 #ifndef KRESTRICTEDLINE_H
23 #define KRESTRICTEDLINE_H
24 
25 #include <klineedit.h>
26 #include <kdelibs4support_export.h>
27 
28 class KRestrictedLinePrivate;
50 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KRestrictedLine : public KLineEdit
51 {
52  Q_OBJECT
53  Q_PROPERTY(QString validChars READ validChars WRITE setValidChars)
54 
55 public:
56 
61  KDELIBS4SUPPORT_DEPRECATED explicit KRestrictedLine(QWidget *parent = nullptr);
62 
66  ~KRestrictedLine();
67 
72  void setValidChars(const QString &valid);
76  QString validChars() const;
77 
78 Q_SIGNALS:
79 
83  void invalidChar(int);
84 
85 protected:
86  void keyPressEvent(QKeyEvent *e) override;
87  void inputMethodEvent(QInputMethodEvent *e) override;
88 
89 private:
90  KRestrictedLinePrivate *const d;
91 };
92 
93 #endif // KRESTRICTEDLINE_H
void keyPressEvent(QKeyEvent *) override
A line editor for restricted character sets.
Q_PROPERTY(...)
virtual void inputMethodEvent(QInputMethodEvent *e) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jul 13 2020 22:58:31 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.