OSDN Git Service

implement subject search.
[kita/kita.git] / src / kitaview.h
1 /*
2  * Copyright (C) 2001 Hideki Ikemoto <ikemo@wakaba.jp>
3  */
4
5 #ifndef _KITAVIEW_H_
6 #define _KITAVIEW_H_
7
8 #include <qwidget.h>
9 #include <kparts/part.h>
10 #include <kitaiface.h>
11
12 class QPainter;
13 class KURL;
14
15 /**
16  * This is the main view class for Kita.  Most of the non-menu,
17  * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go
18  * here.
19  *
20  * This kita uses an HTML component as an example.
21  *
22  * @short Main view
23  * @author Hideki Ikemoto <ikemo@wakaba.jp>
24  * @version 0.1
25  */
26 class KitaView : public QWidget, public KitaIface
27 {
28     Q_OBJECT
29 public:
30         /**
31          * Default constructor
32          */
33     KitaView(QWidget *parent);
34
35         /**
36          * Destructor
37          */
38     virtual ~KitaView();
39
40     /**
41      * Random 'get' function
42      */
43     QString currentURL();
44
45     /**
46      * Random 'set' function accessed by DCOP
47      */
48     virtual void openURL(QString url);
49
50     /**
51      * Random 'set' function
52      */
53     virtual void openURL(const KURL& url);
54
55     /**
56      * Print this view to any medium -- paper or not
57      */
58     void print(QPainter *, int height, int width);
59
60 signals:
61     /**
62      * Use this signal to change the content of the statusbar
63      */
64     void signalChangeStatusbar(const QString& text);
65
66     /**
67      * Use this signal to change the content of the caption
68      */
69     void signalChangeCaption(const QString& text);
70
71 private slots:
72     void slotOnURL(const QString& url);
73     void slotSetTitle(const QString& title);
74
75 private:
76     KParts::ReadOnlyPart *m_html;
77 };
78
79 #endif // _KITAVIEW_H_