ParaView
Public Member Functions | List of all members
pqFileDialogModel Class Reference

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...
 
pqServerserver () 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...
 

Detailed Description

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.

See also
pqFileDialog

Definition at line 54 of file pqFileDialogModel.h.

Constructor & Destructor Documentation

§ pqFileDialogModel()

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::~pqFileDialogModel ( )

Member Function Documentation

§ setCurrentPath()

void pqFileDialogModel::setCurrentPath ( const QString &  )

Sets the path that the file dialog will display.

§ getCurrentPath()

QString pqFileDialogModel::getCurrentPath ( )

Returns the path the the file dialog will display.

§ isHidden()

bool pqFileDialogModel::isHidden ( const QModelIndex &  )

Return true if the file at the index is hidden.

§ isDir()

bool pqFileDialogModel::isDir ( const QModelIndex &  )

Return true if the given row is a directory.

§ mkdir()

bool pqFileDialogModel::mkdir ( const QString &  dirname)

§ rmdir()

bool pqFileDialogModel::rmdir ( const QString &  dirname)

§ rename()

bool pqFileDialogModel::rename ( const QString &  oldname,
const QString &  newname 
)

§ fileExists()

bool pqFileDialogModel::fileExists ( const QString &  file,
QString &  fullpath 
)

Returns whether the file exists also returns the full path, which could be a resolved shortcut.

§ dirExists()

bool pqFileDialogModel::dirExists ( const QString &  dir,
QString &  fullpath 
)

Returns whether a directory exists also returns the full path, which could be a resolved shortcut.

§ separator()

QChar pqFileDialogModel::separator ( ) const

returns the path delimiter, could be \ or / depending on the platform this model is browsing

§ absoluteFilePath()

QString pqFileDialogModel::absoluteFilePath ( const QString &  )

return the absolute path for this file

§ getFilePaths()

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.

§ server()

pqServer* pqFileDialogModel::server ( ) const

Returns the server that this model is browsing.

§ setData()

bool pqFileDialogModel::setData ( const QModelIndex &  idx,
const QVariant &  value,
int  role 
)

sets data (used by the view when editing names of folders)

§ columnCount()

int pqFileDialogModel::columnCount ( const QModelIndex &  ) const

return the number of columns in the model

§ data()

QVariant pqFileDialogModel::data ( const QModelIndex &  idx,
int  role 
) const

return the data for an item

§ index()

QModelIndex pqFileDialogModel::index ( int  row,
int  column,
const QModelIndex &   
) const

return an index from another index

§ parent()

QModelIndex pqFileDialogModel::parent ( const QModelIndex &  ) const

return the parent index of an index

§ rowCount()

int pqFileDialogModel::rowCount ( const QModelIndex &  ) const

return the number of rows under a given index

§ hasChildren()

bool pqFileDialogModel::hasChildren ( const QModelIndex &  p) const

return whether a given index has children

§ headerData()

QVariant pqFileDialogModel::headerData ( int  section,
Qt::Orientation  ,
int  role 
) const

returns header data

§ flags()

Qt::ItemFlags pqFileDialogModel::flags ( const QModelIndex &  idx) const

returns flags for item


The documentation for this class was generated from the following file: