1/*
2 Copyright (c) 2012-2013 Montel Laurent <montel@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 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 the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef KPIMTEXTEDIT_SELECTSPECIAL_CHAR_H
21#define KPIMTEXTEDIT_SELECTSPECIAL_CHAR_H
22
23#include "kpimtextedit_export.h"
24
25#include <KDE/KDialog>
26
27
28namespace KPIMTextEdit {
29
30class SelectSpecialCharPrivate;
31
32class KPIMTEXTEDIT_EXPORT SelectSpecialChar : public KDialog
33{
34 Q_OBJECT
35 public:
36 explicit SelectSpecialChar( QWidget *parent );
37 ~SelectSpecialChar();
38
39 void setCurrentChar( const QChar &c );
40 QChar currentChar() const;
41
42 void setOkButtonText( const QString &text );
43
44 void showSelectButton( bool show );
45
46 /*
47 * When we double click we call accept
48 */
49 void autoInsertChar();
50
51 Q_SIGNALS:
52 void charSelected( const QChar & );
53
54 private:
55 SelectSpecialCharPrivate * const d;
56 friend class SelectSpecialCharPrivate;
57 Q_PRIVATE_SLOT( d, void _k_slotInsertChar() )
58};
59
60}
61
62#endif // KPIMTEXTEDIT_SELECTSPECIAL_CHAR_H
63