Public Slots | Public Member Functions | Protected Attributes | List of all members
pqFileDialogRecentDirsModel Class Reference

pqFileDialogRecentDirsModel is a model which used by file dialog (pqFileDialog) to populate the list showing the recent directory locations. More...

#include <pqFileDialogRecentDirsModel.h>

Inherits QAbstractListModel.

Public Slots

void setChosenFiles (const QList< QStringList > &files)
 

Public Member Functions

 pqFileDialogRecentDirsModel (pqFileDialogModel *model, pqServer *server, QObject *parent)
 server is the server for which we need the listing. More...
 
 ~pqFileDialogRecentDirsModel () override
 
void setChosenDir (const QString &dir)
 Set the directory chosen by the user so that it gets added to the recent list. More...
 
QString filePath (const QModelIndex &) const
 returns the path. 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...
 
QVariant headerData (int section, Qt::Orientation, int role) const override
 return header data More...
 

Protected Attributes

QStringList Directories
 
QString SettingsKey
 
QPointer< pqFileDialogModelFileDialogModel
 

Detailed Description

pqFileDialogRecentDirsModel is a model which used by file dialog (pqFileDialog) to populate the list showing the recent directory locations.

This is per server based, since the locations are connection dependent.

Definition at line 48 of file pqFileDialogRecentDirsModel.h.

Constructor & Destructor Documentation

◆ pqFileDialogRecentDirsModel()

pqFileDialogRecentDirsModel::pqFileDialogRecentDirsModel ( pqFileDialogModel model,
pqServer server,
QObject *  parent 
)

server is the server for which we need the listing.

if the server is NULL, we get file listings locally (i.e. builtin server). pqFileDialogModel is used to test the validity of directories.

◆ ~pqFileDialogRecentDirsModel()

pqFileDialogRecentDirsModel::~pqFileDialogRecentDirsModel ( )
override

Member Function Documentation

◆ setChosenDir()

void pqFileDialogRecentDirsModel::setChosenDir ( const QString &  dir)

Set the directory chosen by the user so that it gets added to the recent list.

◆ filePath()

QString pqFileDialogRecentDirsModel::filePath ( const QModelIndex &  ) const

returns the path.

◆ data()

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

returns the data for an item

◆ rowCount()

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

return the number of rows in the model

◆ headerData()

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

return header data

◆ setChosenFiles

void pqFileDialogRecentDirsModel::setChosenFiles ( const QList< QStringList > &  files)
slot

Member Data Documentation

◆ Directories

QStringList pqFileDialogRecentDirsModel::Directories
protected

Definition at line 92 of file pqFileDialogRecentDirsModel.h.

◆ SettingsKey

QString pqFileDialogRecentDirsModel::SettingsKey
protected

Definition at line 93 of file pqFileDialogRecentDirsModel.h.

◆ FileDialogModel

QPointer<pqFileDialogModel> pqFileDialogRecentDirsModel::FileDialogModel
protected

Definition at line 94 of file pqFileDialogRecentDirsModel.h.


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