-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRSWApplication.cpp
47 lines (36 loc) · 1.75 KB
/
RSWApplication.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <retroshare/rsplugin.h>
#include <Wt/WContainerWidget>
#include <Wt/WMenuItem>
#include <Wt/WTabWidget>
#include <Wt/WTextArea>
#include "RSWApplication.h"
#include "RSWappFriendsPage.h"
#include "RSWappTransfersPage.h"
#include "RSWappChatLobbiesPage.h"
#include "RSWappConfigPage.h"
#include "RSWappSearchFilesPage.h"
#include "RSWappSharedFilesPage.h"
RSWApplication::RSWApplication(const WEnvironment& env,const RsPlugInInterfaces& interf)
: WApplication(env)
{
setTitle(Wt::WString("Retroshare Web UI. Version {1}").arg(SVN_REVISION_NUMBER)); // application title
Wt::WContainerWidget *container = new Wt::WContainerWidget();
Wt::WTabWidget *tabW = new Wt::WTabWidget(container);
RSWappSearchFilesPage *search ;
tabW->addTab(new RSWappFriendsPage(container,interf.mPeers,interf.mMsgs), "Friends", Wt::WTabWidget::PreLoading);
tabW->addTab(new RSWappTransfersPage(container,interf.mFiles),"Transfers", Wt::WTabWidget::PreLoading);
tabW->addTab(new RSWappSharedFilesPage(container,interf.mFiles,interf.mPeers),"Shared files", Wt::WTabWidget::PreLoading);
tabW->addTab(search = new RSWappSearchFilesPage(container,interf.mFiles),"Search", Wt::WTabWidget::PreLoading);
// tabW->addTab(new RSWappChatLobbiesPage(container),"Chat lobbies", Wt::WTabWidget::PreLoading);
// tabW->addTab(new RSWappConfigPage(container),"Config", Wt::WTabWidget::PreLoading);
interf.mNotify->registerNotifyClient(search) ;
//Wt::WMenuItem *tab = tabW->addTab(new Wt::WTextArea("You can close this tab by clicking on the close icon."), "Close");
//tab->setCloseable(true);
tabW->setStyleClass("tabwidget");
setCssTheme("polished");
root()->addWidget(container) ;
}
void RSWApplication::greet()
{
greeting_->setText("Hello there, " + nameEdit_->text());
}