2 This file is part of Kiten, a KDE Japanese Reference Tool...
3 Copyright (C) 2001 Jason Katz-Brown <jason@katzbrown.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 #ifndef KITEN_WIDGETS_H
22 #define KITEN_WIDGETS_H
24 #include <qguardedptr.h>
27 #include <klineedit.h>
28 #include <kmainwindow.h>
29 #include <ktextbrowser.h>
37 class KDE_EXPORT ResultView
: public KTextBrowser
42 ResultView(bool showLinks
, QWidget
*parent
= 0, const char *name
= 0);
44 void addResult(Dict::Entry result
, bool common
= false);
45 void addKanjiResult(Dict::Entry
, bool common
= false, Radical
= Radical());
47 void addHeader(const QString
&, unsigned int degree
= 3);
50 void print(QString
= QString::null
);
51 void append(const QString
&);
54 void setBasicMode(bool yes
) { basicMode
= yes
; }
59 QString
putchars(const QString
&);
66 class KDE_EXPORT eEdit
: public KMainWindow
71 eEdit(const QString
&, QWidget
*parent
= 0, const char *name
= 0);
79 void openFile(const QString
&);
84 KStatusBar
*StatusBar
;
91 class KDE_EXPORT EditAction
: public KAction
95 EditAction( const QString
& text
, int accel
, const QObject
*receiver
, const char *member
, QObject
* parent
, const char* name
);
96 virtual ~EditAction();
98 virtual int plug( QWidget
*w
, int index
= -1 );
100 virtual void unplug( QWidget
*w
);
102 QString
text() { return m_combo
->text(); }
103 void setText(const QString
&text
);
105 QGuardedPtr
<KLineEdit
> editor();
108 void insert(const QString
&);
110 // also sets focus to the lineedit widget
117 QGuardedPtr
<KLineEdit
> m_combo
;
118 const QObject
*m_receiver
;
119 const char *m_member
;