|
Wt examples
3.2.1
|
Main application class. More...

Public Member Functions | |
| TreeViewDragDrop (const WEnvironment &env) | |
| Constructor. | |
| virtual | ~TreeViewDragDrop () |
Public Member Functions inherited from Wt::WApplication | |
| WApplication (const WEnvironment &environment) | |
| ~WApplication () | |
| const WEnvironment & | environment () const |
| WContainerWidget * | root () const |
| WWidget * | findWidget (const std::string &name) |
| void | setTitle (const WString &title) |
| const WString & | title () const |
| const WString & | closeMessage () const |
| WLocalizedStrings * | localizedStrings () |
| void | setLocalizedStrings (WLocalizedStrings *stringResolver) |
| WMessageResourceBundle & | messageResourceBundle () |
| void | setLocale (const std::string &locale) |
| std::string | locale () const |
| virtual void | refresh () |
| void | bindWidget (WWidget *widget, const std::string &domId) |
| std::string | docRoot () const |
| std::string | sessionId () const |
| void | changeSessionId () |
| void | processEvents () |
| void | setAjaxMethod (AjaxMethod method) |
| AjaxMethod | ajaxMethod () const |
| virtual void | initialize () |
| virtual void | finalize () |
| void | setTwoPhaseRenderingThreshold (int size) |
| void | setCookie (const std::string &name, const std::string &value, int maxAge, const std::string &domain="", const std::string &path="", bool secure=false) |
| void | addMetaLink (const std::string &href, const std::string &rel, const std::string &media, const std::string &hreflang, const std::string &type, const std::string &sizes, bool disabled) |
| void | removeMetaLink (const std::string &href) |
| void | addMetaHeader (const std::string &name, const WString &content, const std::string &lang="") |
| void | addMetaHeader (MetaHeaderType type, const std::string &name, const WString &content, const std::string &lang="") |
| void | removeMetaHeader (MetaHeaderType type, const std::string &name="") |
| WLogEntry | log (const std::string &type) const |
| void | setLoadingIndicator (WLoadingIndicator *indicator) |
| WLoadingIndicator * | loadingIndicator () const |
| void | quit () |
| bool | isQuited () const |
| ::int64_t | maximumRequestSize () const |
| Signal< ::int64_t > & | requestTooLarge () |
| void | setConfirmCloseMessage (const WString &message) |
| void | deferRendering () |
| void | resumeRendering () |
| boost::function< void()> | bind (const F &f) |
| WCssStyleSheet & | styleSheet () |
| void | useStyleSheet (const std::string &url) |
| void | useStyleSheet (const std::string &url, const std::string &condition, const std::string &media="all") |
| void | setCssTheme (const std::string &theme) |
| std::string | cssTheme () const |
| void | setLayoutDirection (LayoutDirection direction) |
| LayoutDirection | layoutDirection () const |
| void | setBodyClass (const std::string &styleClass) |
| std::string | bodyClass () const |
| void | setHtmlClass (const std::string &styleClass) |
| std::string | htmlClass () const |
| std::string | url (const std::string &internalPath=std::string()) const |
| virtual std::string | makeAbsoluteUrl (const std::string &url) const |
| std::string | resolveRelativeUrl (const std::string &url) const |
| std::string | bookmarkUrl () const |
| std::string | bookmarkUrl (const std::string &internalPath) const |
| void | setInternalPath (const std::string &path, bool emitChange=false) |
| std::string | internalPath () const |
| std::string | internalPathNextPart (const std::string &path) const |
| std::string | internalSubPath (const std::string &path) const |
| bool | internalPathMatches (const std::string &path) const |
| Signal< std::string > & | internalPathChanged () |
| void | redirect (const std::string &url) |
| void | enableUpdates (bool enabled=true) |
| bool | updatesEnabled () const |
| void | triggerUpdate () |
| UpdateLock | getUpdateLock () |
| void | attachThread (bool attach=true) |
| void | doJavaScript (const std::string &javascript, bool afterLoaded=true) |
| void | addAutoJavaScript (const std::string &javascript) |
| void | declareJavaScriptFunction (const std::string &name, const std::string &function) |
| bool | require (const std::string &url, const std::string &symbol=std::string()) |
| void | setJavaScriptClass (const std::string &className) |
| std::string | javaScriptClass () |
| EventSignal< WKeyEvent > & | globalKeyWentDown () |
| EventSignal< WKeyEvent > & | globalKeyPressed () |
| EventSignal< WKeyEvent > & | globalKeyWentUp () |
| EventSignal & | globalEnterPressed () |
| EventSignal & | globalEscapePressed () |
Public Member Functions inherited from Wt::WObject | |
| WObject (WObject *parent=0) | |
| virtual | ~WObject () |
| virtual const std::string | id () const |
| void | setObjectName (const std::string &name) |
| virtual std::string | objectName () const |
| void | resetLearnedSlots () |
| void | resetLearnedSlot (void(T::*method)()) |
| WStatelessSlot * | implementStateless (void(T::*method)()) |
| WStatelessSlot * | implementStateless (void(T::*method)(), void(T::*undoMethod)()) |
| WStatelessSlot * | implementJavaScript (void(T::*method)(), const std::string &jsCode) |
| void | addChild (WObject *child) |
| virtual void | removeChild (WObject *child) |
| const std::vector< WObject * > & | children () const |
| WObject * | parent () const |
Private Member Functions | |
| void | createUI () |
| Setup the user interface. | |
| WText * | createTitle (const WString &title) |
| Creates a title widget. | |
| WTreeView * | folderView () |
| Creates the folder WTreeView. | |
| WTableView * | fileView () |
| Creates the file table view (a WTableView) | |
| void | editFile (const WModelIndex &item) |
| Edit a particular row. | |
| WWidget * | pieChart () |
| Creates the chart. | |
| WWidget * | aboutDisplay () |
| Creates the hints text. | |
| void | folderChanged () |
| Change the filter on the file view when the selected folder changes. | |
| void | showPopup (const WModelIndex &item, const WMouseEvent &event) |
| Show a popup for a folder item. | |
| void | popupAction () |
| Process the result of the popup menu. | |
| void | dialogDone () |
| Process the result of the message box. | |
| void | populateFiles () |
| Populate the files model. | |
| void | convertToDate (WStandardItem *item) |
| Convert a string to a date. | |
| void | populateFolders () |
| Populate the folders model. | |
| WStandardItem * | createFolderItem (const WString &location, const std::string &folderId=std::string()) |
| Create a folder item. | |
Private Attributes | |
| WStandardItemModel * | folderModel_ |
| The folder model (used by folderView_) | |
| WStandardItemModel * | fileModel_ |
| The file model (used by fileView_) | |
| WSortFilterProxyModel * | fileFilterModel_ |
| The sort filter proxy model that adapts fileModel_. | |
| std::map< std::string, WString > | folderNameMap_ |
| Maps folder id's to folder descriptions. | |
| WTreeView * | folderView_ |
| The folder view. | |
| WTableView * | fileView_ |
| The file view. | |
| WPopupMenu * | popup_ |
| Popup menu on the folder view. | |
| WMessageBox * | popupActionBox_ |
| Message box to confirm the poup menu action. | |
Additional Inherited Members | |
Public Types inherited from Wt::WApplication | |
| enum | AjaxMethod |
| typedef Wt::ApplicationCreator | ApplicationCreator |
| typedef boost::function < WApplication *(const WEnvironment &)> | ApplicationCreator |
Static Public Member Functions inherited from Wt::WApplication | |
| static WApplication * | instance () |
| static std::string | resourcesUrl () |
| static std::string | appRoot () |
| static bool | readConfigurationProperty (const std::string &name, std::string &value) |
Public Attributes inherited from Wt::WApplication | |
| XMLHttpRequest | |
| DynamicScriptTag | |
Protected Member Functions inherited from Wt::WApplication | |
| virtual void | notify (const WEvent &e) |
| virtual bool | isExposed (WWidget *w) const |
| virtual void | enableAjax () |
| virtual void | unload () |
Static Protected Member Functions inherited from Wt::WObject | |
| static WObject * | sender () |
Main application class.
Definition at line 237 of file TreeViewDragDrop.C.
|
inline |
Constructor.
Definition at line 242 of file TreeViewDragDrop.C.
|
inlinevirtual |
Definition at line 279 of file TreeViewDragDrop.C.
|
inlineprivate |
Creates the hints text.
Definition at line 456 of file TreeViewDragDrop.C.
|
inlineprivate |
Convert a string to a date.
Definition at line 586 of file TreeViewDragDrop.C.
|
inlineprivate |
Create a folder item.
Configures flags for drag and drop support.
Definition at line 623 of file TreeViewDragDrop.C.
Creates a title widget.
Definition at line 347 of file TreeViewDragDrop.C.
|
inlineprivate |
Setup the user interface.
Definition at line 311 of file TreeViewDragDrop.C.
|
inlineprivate |
Process the result of the message box.
Definition at line 547 of file TreeViewDragDrop.C.
|
inlineprivate |
Edit a particular row.
Definition at line 422 of file TreeViewDragDrop.C.
|
inlineprivate |
Creates the file table view (a WTableView)
Definition at line 386 of file TreeViewDragDrop.C.
|
inlineprivate |
Change the filter on the file view when the selected folder changes.
Definition at line 465 of file TreeViewDragDrop.C.
|
inlineprivate |
Creates the folder WTreeView.
Definition at line 357 of file TreeViewDragDrop.C.
|
inlineprivate |
Creates the chart.
Definition at line 428 of file TreeViewDragDrop.C.
|
inlineprivate |
Populate the files model.
Data (and headers) is read from the CSV file data/files.csv. We add icons to the first column, resolve the folder id to the actual folder name, and configure item flags, and parse date values.
Definition at line 559 of file TreeViewDragDrop.C.
|
inlineprivate |
Populate the folders model.
Definition at line 593 of file TreeViewDragDrop.C.
|
inlineprivate |
Process the result of the popup menu.
Definition at line 526 of file TreeViewDragDrop.C.
|
inlineprivate |
Show a popup for a folder item.
Definition at line 484 of file TreeViewDragDrop.C.
|
private |
The sort filter proxy model that adapts fileModel_.
Definition at line 292 of file TreeViewDragDrop.C.
|
private |
The file model (used by fileView_)
Definition at line 289 of file TreeViewDragDrop.C.
|
private |
The file view.
Definition at line 301 of file TreeViewDragDrop.C.
|
private |
The folder model (used by folderView_)
Definition at line 286 of file TreeViewDragDrop.C.
|
private |
Maps folder id's to folder descriptions.
Definition at line 295 of file TreeViewDragDrop.C.
|
private |
The folder view.
Definition at line 298 of file TreeViewDragDrop.C.
|
private |
Popup menu on the folder view.
Definition at line 304 of file TreeViewDragDrop.C.
|
private |
Message box to confirm the poup menu action.
Definition at line 307 of file TreeViewDragDrop.C.
1.8.1.2