Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
WsModZip Class Reference

#include <WsModZip.h>

Inheritance diagram for WsModZip:
Inheritance graph
Collaboration diagram for WsModZip:
Collaboration graph

Public Slots

void handleZipClick ()
 
void handleAccept ()
 
void handleReject ()
 

Public Member Functions

 WsModZip ()
 
 ~WsModZip ()
 
Wt::WWidget * createContentsMenuBar (Wt::WContainerWidget *parent=0) const
 Create the functionalities. More...
 
virtual void destroyContentsMenuBar ()
 
Wt::WWidget * createContents (Wt::WContainerWidget *parent=0) const
 Create the contents. More...
 
WsEditorWidgetcreateEditor (Wt::WContainerWidget *parent=0) const
 Create the contents for an editor (create a view of options). More...
 
Wt::WWidget * createAdmin (Wt::WContainerWidget *parent=0) const
 Create the contents for an administrator. More...
 
std::string description () const
 Return the description of the module. More...
 
virtual std::string checkPath (const std::string &currentPath)
 Return the currentPath, or another path when some action is required for the currentPath example /NewsLetter/Subscribe/<token>, check the token, if error return a path to the error page else return the path to the subscription form by default return the currentPath. More...
 
void setModuleName (const std::string &name)
 Set/Get the module name. More...
 
const std::string & moduleName () const
 
void setSoName (const std::string &soName)
 Set/Get the module so name or path ex. libgd.so or /usr/lib/libgd.so. More...
 
const std::string & soName () const
 
void setFileName (const std::string &fileName)
 Set/Get the file name that trigger the module : exemple "Staff List". More...
 
const std::string & fileName () const
 
void setExtensions (const std::string &extensions)
 Set/Get the file extension managed by the module : exemple .ods|.odp. More...
 
const std::string & extension (const std::string &extension="") const
 
void setPrefix (const std::string &prefix)
 Set/Get prefix for a virtual path, like "/SiteMap". More...
 
const std::string & prefix () const
 
std::string pathWithoutPrefix (const std::string &path)
 return the relative path without the prefix : example pathWithoutPrefix("/SiteMap/Test") return "/Test" More...
 
std::string pathWithPrefix (const std::string &path)
 return the relative path with the prefix : example pathWithPrefix("/Test") return "/SiteMap/Test" More...
 
virtual bool processPrefix (const std::string &path)
 proccess the prefix, return true if processed More...
 
void setHideImages (const bool bHide)
 Set/Get the flag to specified if the images is hided. More...
 
bool hideImages ()
 
void setSysPath (const std::string &sysPath)
 Set/Get the system path (example the selected file /var/www/mysite/about/me.fhtml). More...
 
const std::string & sysPath () const
 
void setDiffPath (const std::string &diffPath)
 Set/Get the difference between the web server (example Apache /var/www) root path and the wittishare root path (example /var/www/demo_site). the returned value = /demo_site. More...
 
const std::string & diffPath () const
 
WsContentButtonsBarcontentButtonsBar ()
 WittyShare provide a container to add some buttons like export page in pdf, ..., This function allow a module to add this own button to this container. More...
 
void setLoaded ()
 Some modules can be loaded on startup, no more actions is required by the content widget. More...
 
bool isLoaded ()
 
void setOption (const std::string &attribute, boost::any value)
 Set an options if previously set, update the value. More...
 
void setOptions (const std::vector< WsOption > &vOptions)
 Set all options. More...
 
const boost::any & option (const std::string &attribute) const
 Get an options value. More...
 
const std::vector< WsOption > & options () const
 Get all options. More...
 
void outOptions (const std::string message)
 Output all options. More...
 

Private Member Functions

Wt::WWidget * buildEditor (Wt::WContainerWidget *parent)
 
Wt::WWidget * buildMenuBar ()
 
void appendToZip (const string &path)
 Append the file to the zip. More...
 
void appendSubDir (const string &path)
 A. More...
 
int writeAndCloseZip (int format)
 
int handleAll (int t)
 
int handleFiles (int t)
 

Private Attributes

vector< string > m_paths
 
Wt::WDialog * m_dialog
 
Wt::WRadioButton * m_all
 
Wt::WRadioButton * m_fonly
 
Wt::WRadioButton * m_tar
 
Wt::WRadioButton * m_zip
 
Wt::WGroupBox * m_container
 
Wt::WGroupBox * m_container2
 
Wt::WButtonGroup * m_archiveType
 
Wt::WButtonGroup * m_fileType
 
Wt::WPushButton * m_ok
 
Wt::WPushButton * m_cancel
 
Wt::WLabel * m_loading
 
Wt::WLabel * m_label
 
string m_errmsg
 

Detailed Description

Definition at line 85 of file WsModZip.h.

Constructor & Destructor Documentation

WsModZip::WsModZip ( )

Definition at line 66 of file WsModZip.cpp.

WsModZip::~WsModZip ( )

Definition at line 72 of file WsModZip.cpp.

Member Function Documentation

void WsModZip::appendSubDir ( const string &  path)
private

A.

Parameters
path

Definition at line 252 of file WsModZip.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void WsModZip::appendToZip ( const string &  path)
private

Append the file to the zip.

Parameters
paththe path to the node

Definition at line 139 of file WsModZip.cpp.

Here is the caller graph for this function:

Wt::WWidget* WsModZip::buildEditor ( Wt::WContainerWidget *  parent)
private
WWidget * WsModZip::buildMenuBar ( )
private

Definition at line 104 of file WsModZip.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string WsModule::checkPath ( const std::string &  currentPath)
virtualinherited

Return the currentPath, or another path when some action is required for the currentPath example /NewsLetter/Subscribe/<token>, check the token, if error return a path to the error page else return the path to the subscription form by default return the currentPath.

Reimplemented in WsModNewsLetter.

Definition at line 90 of file WsOption.cpp.

Here is the caller graph for this function:

WsContentButtonsBar * WsModule::contentButtonsBar ( )
inherited

WittyShare provide a container to add some buttons like export page in pdf, ..., This function allow a module to add this own button to this container.

Definition at line 42 of file WsModule.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

WWidget * WsModZip::createAdmin ( Wt::WContainerWidget *  parent = 0) const
virtual

Create the contents for an administrator.

Implements WsModule.

Definition at line 99 of file WsModZip.cpp.

WWidget * WsModZip::createContents ( Wt::WContainerWidget *  parent = 0) const
virtual

Create the contents.

Implements WsModule.

Definition at line 88 of file WsModZip.cpp.

WWidget * WsModZip::createContentsMenuBar ( Wt::WContainerWidget *  parent = 0) const
virtual

Create the functionalities.

Implements WsModule.

Definition at line 76 of file WsModZip.cpp.

Here is the call graph for this function:

WsEditorWidget * WsModZip::createEditor ( Wt::WContainerWidget *  parent = 0) const
virtual

Create the contents for an editor (create a view of options).

Implements WsModule.

Definition at line 93 of file WsModZip.cpp.

std::string WsModZip::description ( ) const
virtual

Return the description of the module.

Implements WsModule.

Definition at line 281 of file WsModZip.cpp.

void WsModZip::destroyContentsMenuBar ( )
virtual

Reimplemented from WsModule.

Definition at line 83 of file WsModZip.cpp.

Here is the call graph for this function:

const std::string & WsModule::diffPath ( ) const
inherited

Definition at line 189 of file WsOption.cpp.

Here is the caller graph for this function:

const std::string & WsModule::extension ( const std::string &  extension = "") const
inherited

Definition at line 131 of file WsOption.cpp.

Here is the caller graph for this function:

const std::string & WsModule::fileName ( ) const
inherited

Definition at line 120 of file WsOption.cpp.

Here is the caller graph for this function:

void WsModZip::handleAccept ( )
slot

Definition at line 144 of file WsModZip.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int WsModZip::handleAll ( int  t)
private

Definition at line 213 of file WsModZip.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int WsModZip::handleFiles ( int  t)
private

Definition at line 179 of file WsModZip.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void WsModZip::handleReject ( )
slot

Definition at line 173 of file WsModZip.cpp.

Here is the caller graph for this function:

void WsModZip::handleZipClick ( )
slot

Definition at line 112 of file WsModZip.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool WsModule::hideImages ( )
inherited

Definition at line 169 of file WsOption.cpp.

Here is the caller graph for this function:

bool WsModule::isLoaded ( )
inherited

Definition at line 55 of file WsModule.cpp.

Here is the caller graph for this function:

const std::string & WsModule::moduleName ( ) const
inherited

Definition at line 100 of file WsOption.cpp.

Here is the caller graph for this function:

const boost::any & WsOptions::option ( const std::string &  attribute) const
inherited

Get an options value.

Definition at line 62 of file WsOption.cpp.

Here is the caller graph for this function:

const std::vector< WsOption > & WsOptions::options ( ) const
inherited

Get all options.

Definition at line 70 of file WsOption.cpp.

Here is the caller graph for this function:

void WsOptions::outOptions ( const std::string  message)
inherited

Output all options.

Definition at line 75 of file WsOption.cpp.

Here is the caller graph for this function:

std::string WsModule::pathWithoutPrefix ( const std::string &  path)
inherited

return the relative path without the prefix : example pathWithoutPrefix("/SiteMap/Test") return "/Test"

Definition at line 150 of file WsOption.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string WsModule::pathWithPrefix ( const std::string &  path)
inherited

return the relative path with the prefix : example pathWithPrefix("/Test") return "/SiteMap/Test"

Definition at line 157 of file WsOption.cpp.

Here is the call graph for this function:

const std::string & WsModule::prefix ( ) const
inherited

Definition at line 145 of file WsOption.cpp.

Here is the caller graph for this function:

bool WsModule::processPrefix ( const std::string &  path)
virtualinherited

proccess the prefix, return true if processed

Definition at line 85 of file WsOption.cpp.

void WsModule::setDiffPath ( const std::string &  diffPath)
inherited

Set/Get the difference between the web server (example Apache /var/www) root path and the wittishare root path (example /var/www/demo_site). the returned value = /demo_site.

Definition at line 184 of file WsOption.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void WsModule::setExtensions ( const std::string &  extensions)
inherited

Set/Get the file extension managed by the module : exemple .ods|.odp.

Definition at line 125 of file WsOption.cpp.

Here is the caller graph for this function:

void WsModule::setFileName ( const std::string &  fileName)
inherited

Set/Get the file name that trigger the module : exemple "Staff List".

Definition at line 115 of file WsOption.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void WsModule::setHideImages ( const bool  bHide)
inherited

Set/Get the flag to specified if the images is hided.

Definition at line 164 of file WsOption.cpp.

Here is the caller graph for this function:

void WsModule::setLoaded ( )
inherited

Some modules can be loaded on startup, no more actions is required by the content widget.

Definition at line 50 of file WsModule.cpp.

Here is the caller graph for this function:

void WsModule::setModuleName ( const std::string &  name)
inherited

Set/Get the module name.

Definition at line 95 of file WsOption.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void WsOptions::setOption ( const std::string &  attribute,
boost::any  value 
)
inherited

Set an options if previously set, update the value.

Definition at line 47 of file WsOption.cpp.

Here is the caller graph for this function:

void WsOptions::setOptions ( const std::vector< WsOption > &  vOptions)
inherited

Set all options.

Definition at line 57 of file WsOption.cpp.

Here is the caller graph for this function:

void WsModule::setPrefix ( const std::string &  prefix)
inherited

Set/Get prefix for a virtual path, like "/SiteMap".

Definition at line 140 of file WsOption.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void WsModule::setSoName ( const std::string &  soName)
inherited

Set/Get the module so name or path ex. libgd.so or /usr/lib/libgd.so.

Definition at line 105 of file WsOption.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void WsModule::setSysPath ( const std::string &  sysPath)
inherited

Set/Get the system path (example the selected file /var/www/mysite/about/me.fhtml).

Definition at line 174 of file WsOption.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const std::string & WsModule::soName ( ) const
inherited

Definition at line 110 of file WsOption.cpp.

Here is the caller graph for this function:

const std::string & WsModule::sysPath ( ) const
inherited

Definition at line 179 of file WsOption.cpp.

Here is the caller graph for this function:

int WsModZip::writeAndCloseZip ( int  format)
private

Definition at line 287 of file WsModZip.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Wt::WRadioButton* WsModZip::m_all
private

Definition at line 122 of file WsModZip.h.

Wt::WButtonGroup* WsModZip::m_archiveType
private

Definition at line 128 of file WsModZip.h.

Wt::WPushButton* WsModZip::m_cancel
private

Definition at line 131 of file WsModZip.h.

Wt::WGroupBox* WsModZip::m_container
private

Definition at line 126 of file WsModZip.h.

Wt::WGroupBox* WsModZip::m_container2
private

Definition at line 127 of file WsModZip.h.

Wt::WDialog* WsModZip::m_dialog
private

Definition at line 121 of file WsModZip.h.

string WsModZip::m_errmsg
private

Definition at line 135 of file WsModZip.h.

Wt::WButtonGroup* WsModZip::m_fileType
private

Definition at line 129 of file WsModZip.h.

Wt::WRadioButton* WsModZip::m_fonly
private

Definition at line 123 of file WsModZip.h.

Wt::WLabel* WsModZip::m_label
private

Definition at line 133 of file WsModZip.h.

Wt::WLabel* WsModZip::m_loading
private

Definition at line 132 of file WsModZip.h.

Wt::WPushButton* WsModZip::m_ok
private

Definition at line 130 of file WsModZip.h.

vector<string> WsModZip::m_paths
private

Definition at line 119 of file WsModZip.h.

Wt::WRadioButton* WsModZip::m_tar
private

Definition at line 124 of file WsModZip.h.

Wt::WRadioButton* WsModZip::m_zip
private

Definition at line 125 of file WsModZip.h.


The documentation for this class was generated from the following files: