KoCharSelectDia.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@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 KOCHARSELECTDIA_H
21#define KOCHARSELECTDIA_H
22
23#include <kdialogbase.h>
24#include <koffice_export.h>
25
26class TQWidget;
27class TQGridLayout;
28class TQPushButton;
29class KCharSelect;
30class KButtonBox;
31
32/******************************************************************/
33/* class KoCharSelectDia */
34/******************************************************************/
35
36class KOFFICEUI_EXPORT KoCharSelectDia : public KDialogBase
37{
38 TQ_OBJECT
39
40
41public:
42
43 // constructor - destructor
44 KoCharSelectDia( TQWidget *parent, const char *name, const TQChar &_chr,
45 const TQString &_font, bool _enableFont, bool _modal=true );
46
47 //constructor when you want to insert multi char
48 KoCharSelectDia( TQWidget *parent, const char *name, const TQString &_font,
49 const TQChar &_chr, bool _modal=true );
50 ~KoCharSelectDia();
51 // select char dialog
52 KOFFICEUI_EXPORT static bool selectChar( TQString &_font, TQChar &_chr, bool _enableFont = true, TQWidget* parent = 0, const char* name = 0);
53
54 // internal
55 TQChar chr() const;
56 TQString font() const;
57 void closeDialog();
58
59private:
60 void initDialog(const TQChar &_chr, const TQString &_font, bool _enableFont);
61
62private slots:
63 void slotUser1();
64 void slotDoubleClicked();
65
66protected:
67 // dialog objects
68 TQGridLayout *grid;
69 KButtonBox *bbox;
70 TQPushButton *bOk, *bCancel;
71 KCharSelect *charSelect;
72
73 signals:
74 void insertChar(TQChar,const TQString &);
75};
76
77#endif
virtual void slotUser1()