Wt examples 4.8.0
|
Main application class. More...
Public Member Functions | |
TreeViewDragDrop (const WEnvironment &env) | |
Constructor. More... | |
virtual | ~TreeViewDragDrop () |
Private Member Functions | |
void | createUI () |
Setup the user interface. More... | |
std::unique_ptr< WText > | createTitle (const WString &title) |
Creates a title widget. More... | |
std::unique_ptr< WTreeView > | folderView () |
Creates the folder WTreeView. More... | |
std::unique_ptr< WTableView > | fileView () |
Creates the file table view (a WTableView) More... | |
void | editFile (const WModelIndex &item) |
Edit a particular row. More... | |
std::unique_ptr< WWidget > | pieChart () |
Creates the chart. More... | |
std::unique_ptr< WWidget > | aboutDisplay () |
Creates the hints text. More... | |
void | folderChanged () |
Change the filter on the file view when the selected folder changes. More... | |
void | showPopup (const WModelIndex &item, const WMouseEvent &event) |
Show a popup for a folder item. More... | |
void | popupAction () |
Process the result of the popup menu. More... | |
void | dialogDone () |
Process the result of the message box. More... | |
void | populateFiles () |
Populate the files model. More... | |
void | convertToDate (WStandardItem *item) |
Convert a string to a date. More... | |
void | convertToNumber (WStandardItem *item) |
Convert a string to a number. More... | |
void | populateFolders () |
Populate the folders model. More... | |
std::unique_ptr< WStandardItem > | createFolderItem (const WString &location, const std::string &folderId=std::string()) |
Create a folder item. More... | |
Private Attributes | |
std::shared_ptr< WStandardItemModel > | folderModel_ |
The folder model (used by folderView_) More... | |
std::shared_ptr< WStandardItemModel > | fileModel_ |
The file model (used by fileView_) More... | |
std::shared_ptr< WSortFilterProxyModel > | fileFilterModel_ |
The sort filter proxy model that adapts fileModel_. More... | |
std::map< std::string, WString > | folderNameMap_ |
Maps folder id's to folder descriptions. More... | |
WTreeView * | folderView_ |
The folder view. More... | |
WTableView * | fileView_ |
The file view. More... | |
std::unique_ptr< FileEditDialog > | dialog_ |
std::unique_ptr< WPopupMenu > | popup_ |
Popup menu on the folder view. More... | |
std::unique_ptr< WMessageBox > | popupActionBox_ |
Message box to confirm the poup menu action. More... | |
Main application class.
Definition at line 253 of file TreeViewDragDrop.C.
|
inline |
Constructor.
Definition at line 258 of file TreeViewDragDrop.C.
|
inlinevirtual |
Definition at line 299 of file TreeViewDragDrop.C.
|
inlineprivate |
Creates the hints text.
Definition at line 484 of file TreeViewDragDrop.C.
|
inlineprivate |
Convert a string to a date.
Definition at line 617 of file TreeViewDragDrop.C.
|
inlineprivate |
Convert a string to a number.
Definition at line 624 of file TreeViewDragDrop.C.
|
inlineprivate |
Create a folder item.
Configures flags for drag and drop support.
Definition at line 664 of file TreeViewDragDrop.C.
|
inlineprivate |
Creates a title widget.
Definition at line 371 of file TreeViewDragDrop.C.
|
inlineprivate |
Setup the user interface.
Definition at line 333 of file TreeViewDragDrop.C.
|
inlineprivate |
Process the result of the message box.
Definition at line 578 of file TreeViewDragDrop.C.
|
inlineprivate |
|
inlineprivate |
Creates the file table view (a WTableView)
Definition at line 410 of file TreeViewDragDrop.C.
|
inlineprivate |
Change the filter on the file view when the selected folder changes.
Definition at line 494 of file TreeViewDragDrop.C.
|
inlineprivate |
Creates the folder WTreeView.
Definition at line 381 of file TreeViewDragDrop.C.
|
inlineprivate |
Creates the chart.
Definition at line 454 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 589 of file TreeViewDragDrop.C.
|
inlineprivate |
Populate the folders model.
Definition at line 631 of file TreeViewDragDrop.C.
|
inlineprivate |
Process the result of the popup menu.
Definition at line 555 of file TreeViewDragDrop.C.
|
inlineprivate |
Show a popup for a folder item.
Definition at line 513 of file TreeViewDragDrop.C.
|
private |
Definition at line 323 of file TreeViewDragDrop.C.
|
private |
The sort filter proxy model that adapts fileModel_.
Definition at line 312 of file TreeViewDragDrop.C.
|
private |
The file model (used by fileView_)
Definition at line 309 of file TreeViewDragDrop.C.
|
private |
The file view.
Definition at line 321 of file TreeViewDragDrop.C.
|
private |
The folder model (used by folderView_)
Definition at line 306 of file TreeViewDragDrop.C.
|
private |
Maps folder id's to folder descriptions.
Definition at line 315 of file TreeViewDragDrop.C.
|
private |
The folder view.
Definition at line 318 of file TreeViewDragDrop.C.
|
private |
Popup menu on the folder view.
Definition at line 326 of file TreeViewDragDrop.C.
|
private |
Message box to confirm the poup menu action.
Definition at line 329 of file TreeViewDragDrop.C.