pqFileDialogRecentDirsModel.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef pqFileDialogRecentDirsModel_h
5 #define pqFileDialogRecentDirsModel_h
6 
7 #include "pqCoreModule.h"
8 #include <QAbstractListModel>
9 #include <QPointer>
10 #include <QStringList>
11 
12 class pqServer;
13 class pqFileDialogModel;
14 
20 class PQCORE_EXPORT pqFileDialogRecentDirsModel : public QAbstractListModel
21 {
22  Q_OBJECT
23  typedef QAbstractListModel Superclass;
24 
25 public:
31  pqFileDialogRecentDirsModel(pqFileDialogModel* model, pqServer* server, QObject* parent);
32  ~pqFileDialogRecentDirsModel() override;
33 
38  void setChosenDir(const QString& dir);
39 
43  QString filePath(const QModelIndex&) const;
44 
48  QVariant data(const QModelIndex& idx, int role) const override;
49 
53  int rowCount(const QModelIndex& idx) const override;
54 
58  QVariant headerData(int section, Qt::Orientation, int role) const override;
59 
60 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
61  void setChosenFiles(const QList<QStringList>& files);
62 
63 protected:
64  QStringList Directories;
65  QString SettingsKey;
66  QPointer<pqFileDialogModel> FileDialogModel;
67 
68 private:
69  Q_DISABLE_COPY(pqFileDialogRecentDirsModel)
70 };
71 
72 #endif
data
QPointer< pqFileDialogModel > FileDialogModel
pqFileDialogModel allows remote browsing of a connected ParaView server&#39;s filesystem, as well as browsing of the local file system.
dir
pqFileDialogRecentDirsModel is a model which used by file dialog (pqFileDialog) to populate the list ...
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:35