WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. | Zuble QML Types | Zuble C++ Classes | Zuble Overview |
Zuble
0.1
Zuble Framework C++/QML extension API
|
Access and manipulate file directories. This class is a Javascript wrapper for QDir objects. More...
#include <ZDir.h>
Public Types | |
enum | Filter { Dirs = QDir::Dirs, Files = QDir::Files, Drives = QDir::Drives, NoSymLinks = QDir::NoSymLinks, AllEntries = QDir::AllEntries, TypeMask = QDir::TypeMask, Readable = QDir::Readable, Writable = QDir::Writable, Executable = QDir::Executable, PermissionMask = QDir::PermissionMask, Modified = QDir::Modified, Hidden = QDir::Hidden, System = QDir::System, AccessMask = QDir::AccessMask, AllDirs = QDir::AllDirs, CaseSensitive = QDir::CaseSensitive, NoDot = QDir::NoDot, NoDotDot = QDir::NoDotDot, NoDotAndDotDot = QDir::NoDotAndDotDot, NoFilter = QDir::NoFilter } |
enum | Sort { Name = QDir::Name, Time = QDir::Time, Size = QDir::Size, Unsorted = QDir::Unsorted, SortByMask = QDir::SortByMask, DirsFirst = QDir::DirsFirst, Reversed = QDir::Reversed, IgnoreCase = QDir::IgnoreCase, DirsLast = QDir::DirsLast, LocaleAware = QDir::LocaleAware, Type = QDir::Type, NoSort = QDir::NoSort } |
Signals | |
void | filterChanged () |
void | pathChanged () |
void | tagsChanged () |
Public Member Functions | |
ZDir (QObject *parent=nullptr) | |
Constructs a ZDir object. More... | |
ZDir (const QDir &dir, QObject *parent=nullptr) | |
Constructs a ZDir object to wrap a QDir object. More... | |
virtual | ~ZDir () |
Q_INVOKABLE void | setPath (const QString &path) |
Q_INVOKABLE void | setToCurrentPath () |
Q_INVOKABLE void | setToHomePath () |
Q_INVOKABLE bool | rename (const QString &oldName, const QString &newName) |
Q_INVOKABLE void | swap (QObject *zDir) |
Q_INVOKABLE bool | setCurrent (const QString &path) |
Q_INVOKABLE QString | currentPath () |
Q_INVOKABLE QString | homePath () |
Q_INVOKABLE QString | rootPath () |
Q_INVOKABLE QString | tempPath () |
Q_INVOKABLE QString | filePath (const QString &fileName) const |
Q_INVOKABLE QString | absoluteFilePath (const QString &fileName) const |
Q_INVOKABLE QString | relativeFilePath (const QString &fileName) const |
Q_INVOKABLE bool | cd (const QString &dirName) |
Q_INVOKABLE bool | cdUp () |
Q_INVOKABLE QString | getChildName (int pos) |
Q_INVOKABLE bool | mkdir (const QString &dirName) const |
Q_INVOKABLE bool | rmdir (const QString &dirName) const |
Q_INVOKABLE bool | mkpath (const QString &dirPath) const |
Q_INVOKABLE bool | rmpath (const QString &dirPath) const |
Q_INVOKABLE bool | removeRecursively () |
Q_INVOKABLE bool | remove (const QString &fileName) |
Q_INVOKABLE bool | fileExists (const QString &name) const |
Q_INVOKABLE void | refresh () const |
Q_INVOKABLE bool | isRelativePath (const QString &path) |
Q_INVOKABLE bool | isAbsolutePath (const QString &path) |
Q_INVOKABLE bool | isRelative () const |
Q_INVOKABLE bool | isAbsolute () const |
Q_INVOKABLE bool | makeAbsolute () |
Q_INVOKABLE QString | cleanPath (const QString &path) |
Q_INVOKABLE QObject * | entryInfoList (int filters, int sort) const |
Returns a ZFileInfo object describing the contents of the directory. More... | |
Q_INVOKABLE QStringList | entryList (int filters, int sort) const |
Returns a QStringList describing the contents of the directory. More... | |
QVariant | getTags () |
uint | getFilter () const |
void | setFilter (uint filters) |
QString | getPath () const |
QString | getAbsolutePath () const |
QString | getCanonicalPath () const |
QString | getDirName () const |
uint | getCount () const |
bool | isReadable () const |
bool | exists () const |
bool | isRoot () const |
Static Public Member Functions | |
static void | registerType () |
Registers ZDir as a QML type. More... | |
Protected Member Functions | |
void | initDir () |
void | validateDir () const |
void | createTags () |
Constructs a QVariantMap representing constant values for ZDir objects and stores that in a QVariant for later use. More... | |
Protected Attributes | |
QDir * | m_dir |
Static Protected Attributes | |
static QVariant | m_tags |
Properties | |
QVariant | tags |
uint | filter |
QString | path |
QString | absolutePath |
QString | canonicalPath |
QString | dirName |
uint | count |
bool | isReadable |
bool | exists |
bool | isRoot |
Access and manipulate file directories. This class is a Javascript wrapper for QDir objects.
enum Zbl::ZDir::Filter |
enum Zbl::ZDir::Sort |
|
explicit |
|
explicit |
QString Zbl::ZDir::absoluteFilePath | ( | const QString & | fileName | ) | const |
|
protected |
QObject * Zbl::ZDir::entryInfoList | ( | int | filters, |
int | sort | ||
) | const |
QStringList Zbl::ZDir::entryList | ( | int | filters, |
int | sort | ||
) | const |
bool Zbl::ZDir::exists | ( | ) | const |
Referenced by fileExists(), and removeRecursively().
QString Zbl::ZDir::filePath | ( | const QString & | fileName | ) | const |
|
signal |
|
inlineprotected |
Definition at line 337 of file ZDir.h.
Referenced by rename(), setFilter(), setPath(), setToCurrentPath(), setToHomePath(), and swap().
bool Zbl::ZDir::isReadable | ( | ) | const |
Referenced by removeRecursively().
bool Zbl::ZDir::isRoot | ( | ) | const |
Referenced by removeRecursively().
|
signal |
|
static |
Registers ZDir as a QML type.
Registers this object as a QML type.
Definition at line 65 of file ZDir.cpp.
Referenced by Zbl::Zblcore::registerTypes().
QString Zbl::ZDir::relativeFilePath | ( | const QString & | fileName | ) | const |
bool Zbl::ZDir::rename | ( | const QString & | oldName, |
const QString & | newName | ||
) |
void Zbl::ZDir::setToCurrentPath | ( | ) |
Definition at line 158 of file ZDir.cpp.
Referenced by setToHomePath().
|
signal |
QString Zbl::ZDir::tempPath | ( | ) |
Definition at line 448 of file ZDir.cpp.
Referenced by cleanPath().
|
inlineprotected |
Definition at line 343 of file ZDir.h.
Referenced by absoluteFilePath(), cd(), cdUp(), entryInfoList(), entryList(), fileExists(), filePath(), getAbsolutePath(), getCanonicalPath(), getChildName(), getCount(), getDirName(), getFilter(), getPath(), isAbsolute(), isRelative(), makeAbsolute(), mkdir(), mkpath(), refresh(), relativeFilePath(), remove(), removeRecursively(), rmdir(), and rmpath().
|
protected |
Definition at line 328 of file ZDir.h.
Referenced by absoluteFilePath(), cd(), cdUp(), entryInfoList(), entryList(), fileExists(), filePath(), getAbsolutePath(), getCanonicalPath(), getChildName(), getCount(), getDirName(), getFilter(), getPath(), isAbsolute(), isRelative(), makeAbsolute(), mkdir(), mkpath(), refresh(), relativeFilePath(), remove(), removeRecursively(), rename(), rmdir(), rmpath(), setFilter(), setPath(), setToCurrentPath(), setToHomePath(), swap(), and ~ZDir().
|
staticprotected |
Definition at line 330 of file ZDir.h.
Referenced by createTags(), and getTags().
|
read |
Definition at line 132 of file ZDir.h.
Referenced by setToCurrentPath(), and setToHomePath().
Zuble documentation copyright © 2019 Bob Dinitto. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Zuble is a derivative work of Qt version 5. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.