AvogadroLibs  1.93.0
Public Types | Signals | Public Member Functions | Static Public Member Functions | List of all members
FileDialogModel Class Reference

Remote file dialog model. More...

#include <filedialogmodel.h>

Inheritance diagram for FileDialogModel:

Public Types

enum  FileType {
  INVALID = 0,
  SINGLE_FILE,
  SINGLE_FILE_LINK,
  DIRECTORY,
  DIRECTORY_LINK,
  FILE_GROUP,
  DRIVE,
  NETWORK_ROOT,
  NETWORK_DOMAIN,
  NETWORK_SERVER,
  NETWORK_SHARE
}
 

Signals

void fileExistsComplete (const QString &path, bool exists)
 
void dirExistsComplete (const QString &path, bool exits)
 
void absoluteFilePathComplete (const QString &path)
 

Public Member Functions

 FileDialogModel (ProtoCall::Runtime::vtkCommunicatorChannel *server, QObject *Parent=nullptr)
 
void setCurrentPath (const QString &)
 Sets the path that the file dialog will display.
 
QString getCurrentPath ()
 Returns the path to the file dialog will display.
 
bool isHidden (const QModelIndex &)
 Return true if the file at the index is hidden.
 
bool isDir (const QModelIndex &)
 Return true if the given row is a directory.
 
bool mkdir (const QString &dirname)
 
bool rmdir (const QString &dirname)
 
bool rename (const QString &oldname, const QString &newname)
 
void fileExists (const QString &file, const QObject *requestor, const char *resultSlot)
 
void dirExists (const QString &dir, const QObject *requestor, const char *resultSlot)
 
QChar separator () const
 
void absoluteFilePath (const QString &path, const QObject *requester, const char *resultSlot)
 return the absolute path for this file
 
QStringList getFilePaths (const QModelIndex &)
 
ProtoCall::Runtime::vtkCommunicatorChannel * server () const
 Returns the server that this model is browsing.
 
int columnCount (const QModelIndex &) const
 return the number of columns in the model
 
QVariant data (const QModelIndex &idx, int role) const
 return the data for an item
 
QModelIndex index (int row, int column, const QModelIndex &) const
 return an index from another index
 
QModelIndex parent (const QModelIndex &) const
 return the parent index of an index
 
int rowCount (const QModelIndex &) const
 return the number of rows under a given index
 
bool hasChildren (const QModelIndex &p) const
 return whether a given index has children
 
QVariant headerData (int section, Qt::Orientation, int role) const
 returns header data
 
Qt::ItemFlags flags (const QModelIndex &idx) const
 returns flags for item
 

Static Public Member Functions

static bool isDirectory (FileDialogModel::FileType type)
 
static bool isFile (FileDialogModel::FileType type)
 

Detailed Description

<avogadro/qtplugins/clientserver/filedialogmodel.h>

Member Function Documentation

◆ fileExists()

void fileExists ( const QString &  file,
const QObject *  requestor,
const char *  resultSlot 
)

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

◆ dirExists()

void dirExists ( const QString &  dir,
const QObject *  requestor,
const char *  resultSlot 
)

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

◆ separator()

QChar separator ( ) const

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

◆ getFilePaths()

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


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