Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsModTwitter.h
Go to the documentation of this file.
1 /*
2  *
3  * Filename: WsModTwitter.h
4  *
5  * Description: Twitter Wittyshare plugin
6  *
7  * Created: 03/05/2013 12:54:15
8  *
9  * Author: Guy Deleeuw, Guy.Deleeuw@gmail.com
10  *
11  */
12 #ifndef __WsModTwitter__
13 #define __WsModTwitter__
14 
15 #include <Wt/WContainerWidget>
16 #include <Wt/WPushButton>
17 #include <Wt/WCheckBox>
18 
19 #include <WsModule/WsModule.h>
20 #include <Main/WsApplication.h>
21 
23 public :
24  WsTwitterEditorWidget(Wt::WContainerWidget* parent = 0);
26  virtual void load();
27  virtual bool saveEditor();
28 
29 private :
30  Wt::WCheckBox* m_cb;
31  bool m_cbState;
32 };
33 
34 
35 
36 
37 
38 class WsModTwitter : public WsModule {
39 public :
40  WsModTwitter();
41  ~WsModTwitter();
42  Wt::WWidget* createContentsMenuBar(Wt::WContainerWidget* parent = 0) const;
43  virtual void destroyContentsMenuBar();
44  Wt::WWidget* createContents(Wt::WContainerWidget* parent = 0) const;
45  WsEditorWidget* createEditor(Wt::WContainerWidget* parent = 0) const;
46  Wt::WWidget* createAdmin(Wt::WContainerWidget* parent = 0) const;
47  std::string description() const;
48 
49 public slots:
50  void handleTwitterClick();
51 
52 private :
53  Wt::WWidget* buildMenuBar();
54  Wt::WPushButton* m_buttonReTweet;
55 };
56 
57 extern "C" {
58  void WsModTwitterInit(void) __attribute__((constructor));
59 
61  {
62  return new WsModTwitter();
63  }
64 }
65 
66 #endif // __WsModTwitter__
67 
std::string description() const
Return the description of the module.
void WsModTwitterInit(void) __attribute__((constructor))
Wt::WWidget * createAdmin(Wt::WContainerWidget *parent=0) const
Create the contents for an administrator.
virtual void destroyContentsMenuBar()
Wt::WPushButton * m_buttonReTweet
Definition: WsModTwitter.h:54
Wt::WCheckBox * m_cb
Definition: WsModTwitter.h:30
WsEditorWidget * createEditor(Wt::WContainerWidget *parent=0) const
Create the contents for an editor (create a view of options).
Wt::WWidget * createContentsMenuBar(Wt::WContainerWidget *parent=0) const
Create the functionalities.
Wt::WWidget * buildMenuBar()
void handleTwitterClick()
virtual bool saveEditor()
WsTwitterEditorWidget(Wt::WContainerWidget *parent=0)
virtual void load()
Wt::WWidget * createContents(Wt::WContainerWidget *parent=0) const
Create the contents.
WsModTwitter * buildModule()
Definition: WsModTwitter.h:60