OSDN Git Service

move files.
[kita/kita.git] / kita / src / bbsview.h
1 /***************************************************************************
2 *   Copyright (C) 2004 by Kita Developers                                 *
3 *   ikemo@users.sourceforge.jp                                            *
4 *                                                                         *
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.                                   *
9 ***************************************************************************/
10
11 #ifndef _KITABBSVIEW_H_
12 #define _KITABBSVIEW_H_
13
14 #include <kparts/browserextension.h>
15
16 #include <qwidget.h>
17
18 class KURL;
19 class KListView;
20 class QCp932Codec;
21 class QSpacerItem;
22 class QListViewItem;
23 class QComboBox;
24 class QVBoxLayout;
25 class QHBoxLayout;
26
27 namespace Kita
28 {
29     class Board;
30     class Category;
31     class ListViewItem;
32 }
33
34 /**
35  *
36  * @author Hideki Ikemoto <ikemo@users.sourceforge.jp>
37  **/
38 class KitaBBSView : public QWidget
39 {
40     Q_OBJECT
41     Kita::ListViewItem* m_favorites;
42     static QCp932Codec* m_cp932Codec;
43
44     /* list color */
45     QColor m_textColor;
46     QColor m_baseColor;
47     QColor m_backColor;
48     QColor m_altColor;
49
50     QValueList<Kita::Category> getCategoryList( const QString& html ) const;
51
52     void saveOpened();
53     QComboBox* SearchCombo;
54     KListView* m_boardList;
55
56 protected:
57     QVBoxLayout* KitaBBSViewBaseLayout;
58     QHBoxLayout* layout10;
59     QSpacerItem* spacer2;
60
61 private slots:
62     void loadBoard( QListViewItem* item );
63     void slotContextMenuRequested( QListViewItem*, const QPoint&, int );
64     void slotMouseButtonClicked( int, QListViewItem* );
65     void refreshFavoriteBoards();
66     void filter( const QString& str );
67
68 public:
69     KitaBBSView( QWidget *parent, const char *name = 0 );
70     ~KitaBBSView();
71
72     void loadOpened();
73
74 public slots:
75     void updateBoardList();
76     void showBoardList();
77     void setFont( const QFont& font );
78     virtual void setFocus();
79
80 private:
81     void loadExtBoard();
82     bool downloadBoardList();
83
84 signals:
85     void openBoard( const KURL& url );
86     void openURLRequestExt( const KURL& url, const QString mimetype = QString::null );
87     void sigShowSubject();
88 };
89
90 #endif