Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsModLatestNews2.cpp
Go to the documentation of this file.
1 /*
2  *
3  * Filename: WsModLatestNews2.cpp
4  *
5  * Description: Zip Wittyshare plugin
6  *
7  * Created: 03/07/12 11:07:15
8  *
9  * Author: Benoit Daccache, ben.daccache@gmail.com
10  *
11  */
12 
13 #include <boost/filesystem.hpp>
14 
15 #include <iostream>
16 #include <dlfcn.h>
17 #include <stdlib.h>
18 #include <stdio.h>
19 #include <fcntl.h>
20 #include <unistd.h>
21 
22 #include <Wt/WDateTime>
23 #include <Wt/WStandardItemModel>
24 
25 #include <gdcore/gdCore.h>
26 
27 #include <gdwtcore/gdWTextDelegate.h>
28 
30 #include <User/WsUser.h>
32 
33 #include <WsModule/WsModule.h>
34 
35 #include "WsLatestNews.h"
36 #include "WsLatestNews2.h"
37 #include "WsModLatestNews2.h"
38 
39 using namespace Wt;
40 
41 extern "C" {
43  {
44  void* hndl = dlopen("libwt.so", RTLD_NOW | RTLD_GLOBAL);
45  if ( hndl == NULL ) {
46  fprintf(stderr, "cannot load wt.so shared library! %s\n", dlerror());
47  return;
48  }
49  }
50 }
51 
53  : WsModule()
54 {
55  wApp->messageResourceBundle().use(wApp->docRoot() + wApp->resourcesUrl() + "WsModLatestNews2/Transl/WsModLatestNews2");
56 }
57 
59 {
60 }
61 
62 WWidget* WsModLatestNews2::createContentsMenuBar(WContainerWidget* parent) const
63 {
64  return 0;
65 }
66 
67 WWidget* WsModLatestNews2::createContents(WContainerWidget* parent) const
68 {
69  WsLatestNews2* ln2 = new WsLatestNews2();
70  ln2->addStyleClass("WsModLatestNews2");
71  ln2->setOptions(options());
72  return ln2;
73 }
74 
75 WsEditorWidget* WsModLatestNews2::createEditor(WContainerWidget* parent) const
76 {
77  return 0;
78 }
79 
80 WWidget* WsModLatestNews2::createAdmin(WContainerWidget* parent) const
81 {
82  return 0;
83 }
84 
86 {
87  return true;
88 }
89 
90 std::string WsModLatestNews2::description() const
91 {
92  return "WsModLatestNews2 wittyShare module";
93 }
94 
Global properties.
WsEditorWidget * createEditor(Wt::WContainerWidget *parent=0) const
Create the contents for an editor (create a view of options).
const std::vector< WsOption > & options() const
Get all options.
Definition: WsOption.cpp:70
Wt::WWidget * createContents(Wt::WContainerWidget *parent=0) const
Create the contents.
std::string description() const
Return the description of the module.
bool saveEditor() const
Wt::WWidget * createContentsMenuBar(Wt::WContainerWidget *parent=0) const
Create the functionalities.
Wt::WWidget * createAdmin(Wt::WContainerWidget *parent=0) const
Create the contents for an administrator.
void setOptions(const std::vector< WsOption > &vOptions)
Set all options.
Definition: WsOption.cpp:57
Abstract Node class.
void WsModLatestNews2Init(void)
User class.