pqFileDialogModel allows remote browsing of a connected ParaView server's filesystem, as well as browsing of the local file system. More...
#include <pqFileDialogModel.h>
Inherits QAbstractItemModel.
Public Member Functions | |
pqFileDialogModel (pqServer *server, QObject *Parent=nullptr) | |
server is the server for which we need the listing. More... | |
~pqFileDialogModel () override | |
void | setFileItemFlags (const Qt::ItemFlags &flags) |
set the flags for items of type file More... | |
void | setDirectoryItemFlags (const Qt::ItemFlags &flags) |
set the flags for items of type directory More... | |
void | setCurrentPath (const QString &path) |
Set the path that the file dialog will display. More... | |
QString | getCurrentPath () |
Returns the path the the file dialog will display. More... | |
bool | isHidden (const QModelIndex &) |
Return true if the file at the index is hidden. More... | |
bool | isDir (const QModelIndex &) const |
Return true if the given row is a directory. More... | |
bool | mkdir (const QString &dirname) |
bool | rmdir (const QString &dirname) |
bool | rename (const QString &oldname, const QString &newname) |
bool | fileExists (const QString &file, QString &fullpath) |
Returns whether the file exists also returns the full path, which could be a resolved shortcut. More... | |
bool | dirExists (const QString &dir, QString &fullpath) |
Returns whether a directory exists also returns the full path, which could be a resolved shortcut. More... | |
bool | dirIsEmpty (const QString &dir, QString &fullpath) |
Returns true if a directory exists and is empty also returns the full path, which could be a resolved shortcut. More... | |
QChar | separator () const |
returns the path delimiter, could be \ or / depending on the platform this model is browsing More... | |
QString | absoluteFilePath (const QString &) |
return the absolute path for this file More... | |
int | fileType (const QString &) |
return the file type of a file More... | |
QStringList | getFilePaths (const QModelIndex &) |
Returns the set of file paths associated with the given row (a row may represent one-to-many paths if grouping is implemented) this also resolved symlinks if necessary. More... | |
pqServer * | server () const |
Returns the server that this model is browsing. More... | |
bool | setData (const QModelIndex &idx, const QVariant &value, int role) override |
sets data (used by the view when editing names of folders) More... | |
int | columnCount (const QModelIndex &) const override |
return the number of columns in the model More... | |
QVariant | data (const QModelIndex &idx, int role) const override |
return the data for an item More... | |
QModelIndex | index (int row, int column, const QModelIndex &) const override |
return an index from another index More... | |
QModelIndex | parent (const QModelIndex &) const override |
return the parent index of an index More... | |
int | rowCount (const QModelIndex &) const override |
return the number of rows under a given index More... | |
bool | hasChildren (const QModelIndex &p) const override |
return whether a given index has children More... | |
QVariant | headerData (int section, Qt::Orientation, int role) const override |
returns header data More... | |
Qt::ItemFlags | flags (const QModelIndex &idx) const override |
returns flags for item More... | |
void | setShowDetailedInfo (bool show) |
Get/Sets whether the dialog shows additional information about the files like modification time and file size. More... | |
bool | isShowingDetailedInfo () |
Get/Sets whether the dialog shows additional information about the files like modification time and file size. More... | |
void | setGroupFiles (bool group) |
Get/Sets whether the dialog should group numbered files together into a single file when the sequencs numbers are replaced by .. . More... | |
bool | isGroupingFiles () |
Get/Sets whether the dialog should group numbered files together into a single file when the sequencs numbers are replaced by .. . More... | |
pqFileDialogModel allows remote browsing of a connected ParaView server's filesystem, as well as browsing of the local file system.
To use, pass a new instance of pqServerFileDialogModel to pqFileDialog object.
Definition at line 28 of file pqFileDialogModel.h.
pqFileDialogModel::pqFileDialogModel | ( | pqServer * | server, |
QObject * | Parent = nullptr |
||
) |
server is the server for which we need the listing.
if the server is nullptr, we get file listings locally
|
override |
void pqFileDialogModel::setFileItemFlags | ( | const Qt::ItemFlags & | flags | ) |
set the flags for items of type file
void pqFileDialogModel::setDirectoryItemFlags | ( | const Qt::ItemFlags & | flags | ) |
set the flags for items of type directory
void pqFileDialogModel::setShowDetailedInfo | ( | bool | show | ) |
Get/Sets whether the dialog shows additional information about the files like modification time and file size.
This information can be time consuming to display if the server has many files in one directory so it is not displayed by default.
bool pqFileDialogModel::isShowingDetailedInfo | ( | ) |
Get/Sets whether the dialog shows additional information about the files like modification time and file size.
This information can be time consuming to display if the server has many files in one directory so it is not displayed by default.
void pqFileDialogModel::setGroupFiles | ( | bool | group | ) |
Get/Sets whether the dialog should group numbered files together into a single file when the sequencs numbers are replaced by ..
.
bool pqFileDialogModel::isGroupingFiles | ( | ) |
Get/Sets whether the dialog should group numbered files together into a single file when the sequencs numbers are replaced by ..
.
void pqFileDialogModel::setCurrentPath | ( | const QString & | path | ) |
Set the path that the file dialog will display.
QString pqFileDialogModel::getCurrentPath | ( | ) |
Returns the path the the file dialog will display.
bool pqFileDialogModel::isHidden | ( | const QModelIndex & | ) |
Return true if the file at the index is hidden.
bool pqFileDialogModel::isDir | ( | const QModelIndex & | ) | const |
Return true if the given row is a directory.
bool pqFileDialogModel::mkdir | ( | const QString & | dirname | ) |
bool pqFileDialogModel::rmdir | ( | const QString & | dirname | ) |
bool pqFileDialogModel::fileExists | ( | const QString & | file, |
QString & | fullpath | ||
) |
Returns whether the file exists also returns the full path, which could be a resolved shortcut.
bool pqFileDialogModel::dirExists | ( | const QString & | dir, |
QString & | fullpath | ||
) |
Returns whether a directory exists also returns the full path, which could be a resolved shortcut.
bool pqFileDialogModel::dirIsEmpty | ( | const QString & | dir, |
QString & | fullpath | ||
) |
Returns true if a directory exists and is empty also returns the full path, which could be a resolved shortcut.
QChar pqFileDialogModel::separator | ( | ) | const |
returns the path delimiter, could be \ or / depending on the platform this model is browsing
QString pqFileDialogModel::absoluteFilePath | ( | const QString & | ) |
return the absolute path for this file
QStringList pqFileDialogModel::getFilePaths | ( | const QModelIndex & | ) |
Returns the set of file paths associated with the given row (a row may represent one-to-many paths if grouping is implemented) this also resolved symlinks if necessary.
pqServer* pqFileDialogModel::server | ( | ) | const |
Returns the server that this model is browsing.
|
override |
sets data (used by the view when editing names of folders)
return the number of columns in the model
return the data for an item
return an index from another index
|
override |
return the parent index of an index
return the number of rows under a given index
|
override |
return whether a given index has children
returns header data
|
override |
returns flags for item