OSDN Git Service

Move the directories
[kita/kita.git] / src / boardview.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 KITABOARDVIEW_H
11 #define KITABOARDVIEW_H
12
13 #include <kurl.h>
14
15 #include "threadlistview.h"
16
17 class QTreeWidgetItem;
18 class QWidget;
19
20 class KListViewItem;
21
22 namespace Kita {
23     class BoardTabWidget;
24
25     /**
26      *
27      * @author Hideki Ikemoto <ikemo@users.sourceforge.jp>
28      */
29     class BoardView : public ThreadListView
30     {
31         Q_OBJECT
32
33         BoardTabWidget* m_parent;
34
35     public:
36         explicit BoardView(BoardTabWidget* parent);
37         void init();
38         const KUrl boardUrl();
39         void toggleShowOldLogs();
40
41     public slots:
42         virtual void setFocus();
43         void slotFocusSearchCombo();
44         void reloadSubject();
45         void loadBoard(const KUrl& url, bool online = true);
46         void setFont(const QFont& font);
47         void slotUpdateSubject(const KUrl& url);
48
49     private:
50         KUrl m_boardUrl;
51         int m_unreadNum, m_readNum, m_newNum;
52         bool m_showOldLogs;
53         bool m_enableSizeChange;
54
55         void updateKindLabel();
56         void deleteLog(const KUrl& url);
57         void loadLayout();
58         void updateRow(int row, const KUrl& datUrl,
59             const QDateTime& current, int id, int order);
60         void saveHeaderOnOff();
61         void loadHeaderOnOff();
62         bool autoResize();
63         void setAutoResize(bool flag);
64         BoardView(const BoardView&);
65         BoardView& operator=(const BoardView&);
66
67     private slots:
68         void slotCloseButton();
69         void slotSizeChange(int section, int oldSize, int newSize);
70
71     signals:
72         void loadBoardCompleted(const KUrl&);
73     };
74 }
75
76 #endif