OSDN Git Service

Rename boardmanager.cpp and boardmanager.h
[kita/kita.git] / src / mainwindow.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 KITAMAINWINDOW_H
11 #define KITAMAINWINDOW_H
12
13 #include <kxmlguiwindow.h>
14
15 class KLineEdit;
16 class KToggleAction;
17 class KUrl;
18
19 namespace Kita {
20     class BBSTabWidget;
21     class BoardTabWidget;
22     class ThreadTabWidget;
23     class WriteTabWidget;
24     class Preferences;
25
26 /**
27  * This class serves as the main window for Kita.  It handles the
28  * menus, toolbars, and status bars.
29  *
30  * @short Main window class
31  * @author $AUTHOR <$EMAIL>
32  * @version $APP_VERSION
33  */
34
35     class MainWindow : public KXmlGuiWindow
36     {
37         Q_OBJECT
38     public:
39         MainWindow();
40         virtual ~MainWindow();
41
42         void load(const KUrl& url);
43         void setMainStatus(const QString& statusStr);
44         void setUrl(const KUrl& url);
45         void bookmark(const QString& datUrl, bool on);
46
47     private slots:
48         void login();
49         void newToolbarConfig();
50         void optionsShowToolbar();
51         void optionsShowStatusbar();
52         void optionsConfigureKeys();
53         void optionsConfigureToolbars();
54         void optionsPreferences();
55         void settingsMenuAboutToShow();
56         void setFont(const QFont& font);
57
58         void slotEditCopy();
59         void slotUrlLine();
60
61     private:
62         KLineEdit* m_urlLine;
63
64         KToggleAction *m_toolbarAction;
65         KToggleAction *m_statusbarAction;
66
67         ThreadTabWidget* m_threadTab;
68         BBSTabWidget* m_bbsTab;
69         BoardTabWidget* m_boardTab;
70         WriteTabWidget* m_writeTab;
71
72         Preferences *m_prefDialog;
73         void setupActions();
74         void setupView();
75         void loadCache();
76         void saveCache();
77         void loadFavorites();
78         void saveFavorites();
79         void loadFavoriteBoards();
80         void saveFavoriteBoards();
81         void loadCompletion();
82         void loadAsciiArt();
83         void loadAboneIDList();
84         void loadAboneNameList();
85         void loadAboneWordList();
86
87         MainWindow(const MainWindow&);
88         MainWindow& operator=(const MainWindow&);
89     };
90 }
91
92 #endif // MAINWINDOW_H