|
RADLib
RADical C++ application framework
|
File browser/navigation model. More...
#include <RADAppKit.h>
Inheritance diagram for RADUi::FileBrowserModel:
Collaboration diagram for RADUi::FileBrowserModel:Public Member Functions | |
| bool | setDirectory (std::string directory) |
| Sets current directory and refreshes entries. More... | |
| const std::string & | directory () const |
| Returns current directory. More... | |
| bool | refresh () |
| Refreshes entries from current directory. More... | |
| bool | goUp () |
| Navigates to parent directory. More... | |
| void | setShowHidden (bool showHidden) |
| Sets hidden-file visibility. More... | |
| bool | showHidden () const |
| Returns hidden-file visibility. More... | |
| const std::vector< FileBrowserEntry > & | entries () const |
| Returns entries. More... | |
| bool | activate (size_t index) |
| Activates entry by index. More... | |
| void | setSelectedIndex (std::optional< size_t > index) |
| Sets selected entry index. More... | |
| std::optional< size_t > | selectedIndex () const |
| Returns selected entry index. More... | |
Public Member Functions inherited from RADCore::RADObject | |
| RADObject () | |
| Creates a RADObject bound to the current thread. More... | |
| virtual | ~RADObject () |
| Disconnects tracked event links and releases lifetime token. More... | |
| void | registerLink (const ConnectionRecord &record) |
| Registers a connection for cleanup when this object is destroyed. More... | |
| std::thread::id | threadId () const |
| Returns the thread id this object is currently associated with. More... | |
| EventLoop * | associatedEventLoop () const |
| Returns the associated event loop, if any. More... | |
| ThreadAffinity | threadAffinity () const |
| Returns both thread id and associated loop atomically. More... | |
| std::weak_ptr< void > | lifetimeToken () const |
| Returns a weak token used to drop queued callbacks after destruction. More... | |
| void | moveToThread (std::thread::id tId, EventLoop *loop=nullptr) |
| Moves the object's affinity to tId and optional loop. More... | |
Public Attributes | |
| RADCore::Event< void() > | changed |
| Raised when directory, entries, or selection changes. More... | |
| RADCore::Event< void(std::string) > | fileActivated |
| Raised when a file is activated. More... | |
File browser/navigation model.
| bool RADUi::FileBrowserModel::activate | ( | size_t | index | ) |
Activates entry by index.
| const std::string& RADUi::FileBrowserModel::directory | ( | ) | const |
Returns current directory.
| const std::vector<FileBrowserEntry>& RADUi::FileBrowserModel::entries | ( | ) | const |
Returns entries.
| bool RADUi::FileBrowserModel::goUp | ( | ) |
Navigates to parent directory.
| bool RADUi::FileBrowserModel::refresh | ( | ) |
Refreshes entries from current directory.
| std::optional<size_t> RADUi::FileBrowserModel::selectedIndex | ( | ) | const |
Returns selected entry index.
| bool RADUi::FileBrowserModel::setDirectory | ( | std::string | directory | ) |
Sets current directory and refreshes entries.
| void RADUi::FileBrowserModel::setSelectedIndex | ( | std::optional< size_t > | index | ) |
Sets selected entry index.
| void RADUi::FileBrowserModel::setShowHidden | ( | bool | showHidden | ) |
Sets hidden-file visibility.
| bool RADUi::FileBrowserModel::showHidden | ( | ) | const |
Returns hidden-file visibility.
| RADCore::Event<void () > RADUi::FileBrowserModel::changed |
Raised when directory, entries, or selection changes.
| RADCore::Event<void (std::string) > RADUi::FileBrowserModel::fileActivated |
Raised when a file is activated.