Classes | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
pqFileDialogFavoriteModel Class Reference

pqFileDialogFavoriteModel allows remote browsing of a connected ParaView server's filesystem, as well as browsing of the local file system. More...

#include <pqFileDialogFavoriteModel.h>

Inherits QAbstractListModel.

Collaboration diagram for pqFileDialogFavoriteModel:
Collaboration graph
[legend]

Classes

struct  pqFileDialogFavoriteModelFileInfo
 

Public Member Functions

 pqFileDialogFavoriteModel (pqFileDialogModel *model, pqServer *server, QObject *Parent)
 server is the server for which we need the listing. More...
 
 ~pqFileDialogFavoriteModel () override
 
QString filePath (const QModelIndex &) const
 return the path to the favorites item More...
 
bool isDirectory (const QModelIndex &) const
 return whether this item is a directory More...
 
QVariant data (const QModelIndex &idx, int role) const override
 returns the data for an item More...
 
int rowCount (const QModelIndex &idx) const override
 return the number of rows in the model More...
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 used by the view to edit the label of the favorite More...
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 return the flags for a specific item More...
 
QVariant headerData (int section, Qt::Orientation, int role) const override
 return header data More...
 
virtual void addToFavorites (QString const &dirPath)
 Adds a directory to the favorites. More...
 
virtual void removeFromFavorites (QString const &dirPath)
 Removes a directory from the favorites. More...
 
virtual void resetFavoritesToDefault ()
 Resets the favorites to the system default. More...
 

Static Public Attributes

static bool AddExamplesInFavorites
 Flag to indicate if the ParaView Examples directory must be added when creating the settings for the first time, or when reseting it to the default value. More...
 

Protected Attributes

QPointer< pqFileDialogModelFileDialogModel
 
pqServerServer = nullptr
 
QList< pqFileDialogFavoriteModelFileInfoFavoriteList
 
QString SettingsKey
 

Detailed Description

pqFileDialogFavoriteModel allows remote browsing of a connected ParaView server's filesystem, as well as browsing of the local file system.

See also
pqFileDialog, pqFileDialogModel

Definition at line 27 of file pqFileDialogFavoriteModel.h.

Constructor & Destructor Documentation

◆ pqFileDialogFavoriteModel()

pqFileDialogFavoriteModel::pqFileDialogFavoriteModel ( pqFileDialogModel model,
pqServer server,
QObject *  Parent 
)

server is the server for which we need the listing.

if the server is nullptr, we get file listings from the builtin server

◆ ~pqFileDialogFavoriteModel()

pqFileDialogFavoriteModel::~pqFileDialogFavoriteModel ( )
override

Member Function Documentation

◆ filePath()

QString pqFileDialogFavoriteModel::filePath ( const QModelIndex &  ) const

return the path to the favorites item

◆ isDirectory()

bool pqFileDialogFavoriteModel::isDirectory ( const QModelIndex &  ) const

return whether this item is a directory

◆ data()

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

returns the data for an item

◆ rowCount()

int pqFileDialogFavoriteModel::rowCount ( const QModelIndex &  idx) const
override

return the number of rows in the model

◆ setData()

bool pqFileDialogFavoriteModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override

used by the view to edit the label of the favorite

◆ flags()

Qt::ItemFlags pqFileDialogFavoriteModel::flags ( const QModelIndex &  index) const
override

return the flags for a specific item

◆ headerData()

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

return header data

◆ addToFavorites()

virtual void pqFileDialogFavoriteModel::addToFavorites ( QString const dirPath)
virtual

Adds a directory to the favorites.

◆ removeFromFavorites()

virtual void pqFileDialogFavoriteModel::removeFromFavorites ( QString const dirPath)
virtual

Removes a directory from the favorites.

◆ resetFavoritesToDefault()

virtual void pqFileDialogFavoriteModel::resetFavoritesToDefault ( )
virtual

Resets the favorites to the system default.

Member Data Documentation

◆ AddExamplesInFavorites

bool pqFileDialogFavoriteModel::AddExamplesInFavorites
static

Flag to indicate if the ParaView Examples directory must be added when creating the settings for the first time, or when reseting it to the default value.

Deprecated.

Definition at line 95 of file pqFileDialogFavoriteModel.h.

◆ FileDialogModel

QPointer<pqFileDialogModel> pqFileDialogFavoriteModel::FileDialogModel
protected

Definition at line 105 of file pqFileDialogFavoriteModel.h.

◆ Server

pqServer* pqFileDialogFavoriteModel::Server = nullptr
protected

Definition at line 106 of file pqFileDialogFavoriteModel.h.

◆ FavoriteList

QList<pqFileDialogFavoriteModelFileInfo> pqFileDialogFavoriteModel::FavoriteList
protected

Definition at line 107 of file pqFileDialogFavoriteModel.h.

◆ SettingsKey

QString pqFileDialogFavoriteModel::SettingsKey
protected

Definition at line 108 of file pqFileDialogFavoriteModel.h.


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