Class sh::filesystem::FilesystemNodeListEditor¶
-
class
sh::filesystem
::
FilesystemNodeListEditor
¶ A list editor for easily modifying a FilesystemNodeList.
Mainly used for listing child nodes in sh::filesystem::FilesystemHandler.itemlist. In most cases, you should just use setItems.
Public Functions
Constructed only by the infrastructure and made available otherwise.
-
~FilesystemNodeListEditor
()¶
-
void
setItems
(QList<QString> items)¶ Sets a new list content. This function is all you need in most situations. For iteratively adding nodes, which makes the intermediate results visible in the user interface, see addItem.
-
void
beginIterativeAdding
()¶ Must be called before you begin to iteratively fill the children list (e.g. with addItem). You must also call endIterativeAdding afterwards.
-
void
addItem
(QString item)¶ Adds a new children to the list, directly showing that in the user interface, while you can proceed filling the list. Please read beginIterativeAdding as well! In most cases, you don’t need this function.
Adds a new children to the list, directly showing that in the user interface, while you can proceed filling the list. Please read beginIterativeAdding as well! In most cases, you don’t need this function.
Note: If you specify a
handler
, it must be the one matching toeurl
’s scheme.
Adds a new children to the list, directly showing that in the user interface, while you can proceed filling the list. Please read beginIterativeAdding as well! In most cases, you don’t need this function.
-
void
endIterativeAdding
()¶ Must be called after you iteratively filled the children list with addItem. This automatically removes all the old nodes, which you haven’t added in this session.
-
void
setItemsAreHosts
()¶ After this call, the addItem method will consider the given names as hostnames instead of new path segments. The resulting sh::filesystem::Eurl will differ accordingly. This only makes sense as children for root eurls.
-
FilesystemNodeList *
rawlist
()¶ Returns the FilesystemNodeList backend. You should rarely need it.
Private Functions
Private Members
-
FilesystemNodeList *
_list
¶
-
std::shared_ptr<const sh::filesystem::Eurl>
_parenteurl
¶
-
sh::filesystem::FilesystemNodeType
_nodestype
¶
-
std::shared_ptr<sh::filesystem::FilesystemNode>
_parentnode
¶
-
sh::filesystem::FilesystemModel *
_model
¶
-
sh::filesystem::FilesystemHandler *
_handler
¶
-
bool
_itemsAreHosts
= false¶
-
bool
_beganAddingIteratively
= false¶
-
QSet<std::shared_ptr<sh::filesystem::FilesystemNode>>
_iterativeAddingsBeforeState
¶
Private Static Attributes
-
QSet<FilesystemNodeList*>
_pendingIterativeAddings
¶
-
QMutex
_pendingMutex
¶
-
QWaitCondition
_iterativeAddingPossibleCondition
¶