pqRecentlyUsedResourcesList.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 pqRecentlyUsedResourcesList_h
5 #define pqRecentlyUsedResourcesList_h
6 
7 #include "pqServerResource.h"
8 #include <QList>
9 #include <QObject>
10 
46 class pqSettings;
47 
49 {
50  Q_OBJECT
51  typedef QObject Superclass;
52 
53 public:
54  pqRecentlyUsedResourcesList(QObject* parent = nullptr);
55  ~pqRecentlyUsedResourcesList() override;
56 
60  typedef QList<pqServerResource> ListT;
61 
66  void add(const pqServerResource& resource);
67 
72  const QList<pqServerResource>& list() const { return this->ResourceList; }
73 
77  void load(pqSettings&);
78 
82  void save(pqSettings&) const;
83 
84 Q_SIGNALS:
89  void changed();
90 
91 private:
92  QList<pqServerResource> ResourceList;
93 
94  Q_DISABLE_COPY(pqRecentlyUsedResourcesList)
95 };
96 
97 #endif
manages recently used resources
load
const QList< pqServerResource > & list() const
Returns the contents of the collection ordered from most-recently-used to least-recently-used.
pqSettings extends QSettings to add support for following:
Definition: pqSettings.h:19
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
QList< pqServerResource > ListT
convenience typedef.
pqServerResource encapsulates a resource in ParaView.