1 /***************************************************************************
2 * Copyright (C) 2007 by Kita Developers *
3 * ikemo@users.sourceforge.jp *
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 VIEWMEDIATOR_H
11 #define VIEWMEDIATOR_H
13 #include "threadtabwidget.h"
14 #include "writetabwidget.h"
15 #include "boardtabwidget.h"
16 #include "bbstabwidget.h"
17 #include "mainwindow.h"
20 * @author Hideki Ikemoto <ikemo@wakaba.jp>
23 static ViewMediator* instance;
24 KitaThreadTabWidget* m_threadTabWidget;
25 KitaBoardTabWidget* m_boardTabWidget;
26 KitaBoardDock* m_boardDock;
27 KitaWriteDock* m_writeDock;
28 KitaThreadDock* m_threadDock;
29 KitaBBSDock* m_bbsDock;
30 KitaMainWindow* m_mainWindow;
36 static ViewMediator* getInstance();
38 void setThreadTabWidget( KitaThreadTabWidget* threadTabWidget ) { m_threadTabWidget = threadTabWidget; }
39 void setBoardTabWidget( KitaBoardTabWidget* boardTabWidget ) { m_boardTabWidget = boardTabWidget; }
40 void setBoardDockWidget( KitaBoardDock* boardDock ) { m_boardDock = boardDock; }
41 void setWriteDock( KitaWriteDock* writeDock ) { m_writeDock = writeDock; }
42 void setThreadDock( KitaThreadDock* threadDock ) { m_threadDock = threadDock; }
43 void setBBSDock( KitaBBSDock* bbsDock ) { m_bbsDock = bbsDock; }
44 void setMainWindow( KitaMainWindow* mainWindow ) { m_mainWindow = mainWindow; }
46 void closeThreadTab( const KURL& url );
47 void showWriteView( const KURL& url, const QString& resStr );
48 void openBoard( const KURL& url );
49 void openThread( const KURL& url );
50 void setMainStatusBar( const QString& statusStr );
51 void setMainURLLine( const KURL& url );
52 void setMainCaption( const QString& str );
53 void bookmark( const QString& datURL, bool on );