OSDN Git Service

Rename boardmanager.cpp and boardmanager.h
[kita/kita.git] / kita / src / boardtabwidget.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 KITABOARDTABWIDGET_H
11 #define KITABOARDTABWIDGET_H
12
13 #include "ktabbar.h"
14 #include "kitaui/tabwidgetbase.h"
15
16 class KAction;
17
18 namespace Kita {
19
20     class BoardView;
21
22     /**
23      * @author Hideki Ikemoto
24      */
25     class BoardTabWidget : public TabWidgetBase
26     {
27         Q_OBJECT
28
29         public:
30             explicit BoardTabWidget(QWidget* parent = 0);
31             ~BoardTabWidget();
32
33             void updateBoardView(const KUrl& datUrl);
34
35         public slots:
36             void loadBoard(const KUrl&);
37
38         private:
39             BoardView* createView(QString label);
40             BoardView* findView(const KUrl& boardUrl);
41             BoardView* isSubjectView(QWidget* w);
42
43         protected:
44             virtual void deleteWidget(QWidget* w);
45
46
47         /* tab actions */
48
49         private:
50             void setupActions();
51
52         public slots:
53             void slotReloadButton();
54             void slotFocusSearchCombo();
55             void slotShowOldLogs(int idx = -1);
56     };
57
58 /*--------------------------------------------------*/
59
60     class SubjectTabBar : public KTabBar
61     {
62         Q_OBJECT
63
64         public:
65             explicit SubjectTabBar(QWidget* parent = 0);
66             ~SubjectTabBar();
67
68         public slots:
69             virtual void showPopupMenu(int idx, const QPoint& global);
70
71         private:
72             KAction* m_closeAct;
73             KAction* m_closeOtherAct;
74             KAction* m_closeRightAct;
75             KAction* m_closeLeftAct;
76             KAction* m_showOldLogsAct;
77             KAction* m_openBrowserAct;
78             KAction* m_copyTitleAct;
79     };
80 }
81
82 #endif