ParaView
|
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=NULL) | |
server is the server for which we need the listing. More... | |
~pqFileDialogModel () | |
void | setCurrentPath (const QString &) |
Sets 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 &) |
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... | |
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... | |
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) |
sets data (used by the view when editing names of folders) More... | |
int | columnCount (const QModelIndex &) const |
return the number of columns in the model More... | |
QVariant | data (const QModelIndex &idx, int role) const |
return the data for an item More... | |
QModelIndex | index (int row, int column, const QModelIndex &) const |
return an index from another index More... | |
QModelIndex | parent (const QModelIndex &) const |
return the parent index of an index More... | |
int | rowCount (const QModelIndex &) const |
return the number of rows under a given index More... | |
bool | hasChildren (const QModelIndex &p) const |
return whether a given index has children More... | |
QVariant | headerData (int section, Qt::Orientation, int role) const |
returns header data More... | |
Qt::ItemFlags | flags (const QModelIndex &idx) const |
returns flags for item 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 55 of file pqFileDialogModel.h.
pqFileDialogModel::pqFileDialogModel | ( | pqServer * | server, |
QObject * | Parent = NULL |
||
) |
server is the server for which we need the listing.
if the server is NULL, we get file listings locally
pqFileDialogModel::~pqFileDialogModel | ( | ) |
void pqFileDialogModel::setCurrentPath | ( | const QString & | ) |
Sets 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 & | ) |
Return true if the given row is a directory.
bool pqFileDialogModel::mkdir | ( | const QString & | dirname | ) |
bool pqFileDialogModel::rmdir | ( | const QString & | dirname | ) |
bool pqFileDialogModel::rename | ( | const QString & | oldname, |
const QString & | newname | ||
) |
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.
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.
bool pqFileDialogModel::setData | ( | const QModelIndex & | idx, |
const QVariant & | value, | ||
int | role | ||
) |
sets data (used by the view when editing names of folders)
int pqFileDialogModel::columnCount | ( | const QModelIndex & | ) | const |
return the number of columns in the model
QVariant pqFileDialogModel::data | ( | const QModelIndex & | idx, |
int | role | ||
) | const |
return the data for an item
QModelIndex pqFileDialogModel::index | ( | int | row, |
int | column, | ||
const QModelIndex & | |||
) | const |
return an index from another index
QModelIndex pqFileDialogModel::parent | ( | const QModelIndex & | ) | const |
return the parent index of an index
int pqFileDialogModel::rowCount | ( | const QModelIndex & | ) | const |
return the number of rows under a given index
bool pqFileDialogModel::hasChildren | ( | const QModelIndex & | p | ) | const |
return whether a given index has children
QVariant pqFileDialogModel::headerData | ( | int | section, |
Qt::Orientation | , | ||
int | role | ||
) | const |
returns header data
Qt::ItemFlags pqFileDialogModel::flags | ( | const QModelIndex & | idx | ) | const |
returns flags for item