pqFileDialogLocationModel.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 
5 #ifndef pqFileDialogLocationModel_h
6 #define pqFileDialogLocationModel_h
7 
8 #include "pqCoreModule.h"
9 #include <QAbstractListModel>
10 #include <QList>
11 #include <QObject>
12 #include <QPointer>
13 
14 class vtkProcessModule;
15 class pqFileDialogModel;
16 class pqServer;
17 class QModelIndex;
18 
25 class PQCORE_EXPORT pqFileDialogLocationModel : public QAbstractListModel
26 {
27  typedef QAbstractListModel Superclass;
28 
29  Q_OBJECT
30 
31 public:
36  pqFileDialogLocationModel(pqFileDialogModel* model, pqServer* server, QObject* Parent);
37  ~pqFileDialogLocationModel() override = default;
38 
42  QString filePath(const QModelIndex&) const;
46  bool isDirectory(const QModelIndex&) const;
47 
51  QVariant data(const QModelIndex& idx, int role) const override;
52 
56  int rowCount(const QModelIndex& idx) const override;
57 
61  QVariant headerData(int section, Qt::Orientation, int role) const override;
62 
66  virtual void resetToDefault();
67 
72 
73 protected:
75  {
76  QString Label;
77  QString FilePath;
78  int Type;
79  };
80 
81  void LoadSpecialsFromSystem();
82 
83  QPointer<pqFileDialogModel> FileDialogModel;
84  pqServer* Server = nullptr;
85  QList<pqFileDialogLocationModelFileInfo> LocationList;
86 };
87 
88 #endif // !pqFileDialogLocationModel_h
data
pqFileDialogModel allows remote browsing of a connected ParaView server&#39;s filesystem, as well as browsing of the local file system.
static bool AddExamplesInLocations
Flag to indicate if the ParaView Examples directory should be added to the list.
QList< pqFileDialogLocationModelFileInfo > LocationList
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
process initialization and management core for ParaView processes.
QPointer< pqFileDialogModel > FileDialogModel
pqFileDialogLocationModel lists "special" locations, either remote from a connected ParaView server&#39;s...
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:35