OSDN Git Service

Move the directories
[kita/kita.git] / 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 #ifndef KITABBSVIEW_H
11 #define KITABBSVIEW_H
12
13 #include <QtCore/QList>
14 #include <QtGui/QWidget>
15
16 class QHBoxLayout;
17 class QSpacerItem;
18 class QTreeWidget;
19 class QTreeWidgetItem;
20 class QVBoxLayout;
21
22 class KAction;
23 class KComboBox;
24 class KUrl;
25
26 namespace Kita
27 {
28     class Board;
29     class Category;
30     class ListViewItem;
31
32     /**
33      *
34      * @author Hideki Ikemoto <ikemo@users.sourceforge.jp>
35      **/
36     class BBSView : public QWidget
37     {
38         Q_OBJECT
39         ListViewItem* m_favorites;
40
41         QList<Category> getCategoryList(const QString& html) const;
42
43         void saveOpened();
44         KComboBox* searchCombo;
45         QTreeWidget* m_boardList;
46         void contextMenuEvent(QContextMenuEvent* e);
47
48     protected:
49         QVBoxLayout* bbsViewBaseLayout;
50         QHBoxLayout* layout10;
51         QSpacerItem* spacer2;
52
53     private slots:
54         void loadBoard(QTreeWidgetItem* item);
55         void refreshFavoriteBoards();
56         void filter(const QString& str);
57         void slotMenuOpenWithBrowser();
58
59     public:
60         explicit BBSView(QWidget *parent);
61         ~BBSView();
62
63         void loadOpened();
64
65     public slots:
66         void updateBoardList();
67         void showBoardList();
68         void setFont(const QFont& font);
69         virtual void setFocus();
70
71     private:
72         void loadExtBoard();
73         bool downloadBoardList();
74         void mousePressEvent(QMouseEvent *e);
75         BBSView(const BBSView&);
76         BBSView& operator=(const BBSView&);
77
78         KAction* m_openWithBrowserAct;
79         KAction* m_copyUrlAct;
80         KAction* m_copyTitleAndUrlAct;
81         KAction* m_removeFromFavoritesAct;
82         KAction* m_addToFavoritesAct;
83     };
84 }
85
86 #endif