ACF $AcfVersion:0$
IOptionsList.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QString>
7
8
9// ACF includes
10#include <istd/IChangeable.h>
11
12#include <iprm/iprm.h>
13
14
15namespace iprm
16{
17
18
85class IOptionsList: virtual public istd::IChangeable
86{
87public:
96 {
101
106 };
107
131
156 virtual int GetOptionsFlags() const = 0;
157
173 virtual int GetOptionsCount() const = 0;
174
190 virtual QString GetOptionName(int index) const = 0;
191
211 virtual QString GetOptionDescription(int index) const = 0;
212
235 virtual QByteArray GetOptionId(int index) const = 0;
236
260 virtual bool IsOptionEnabled(int index) const = 0;
261};
262
263
264// Helper methods
265
297int FindOptionIndexById(const QByteArray& id, const iprm::IOptionsList& list);
298
299
300} // namespace iprm
301
302
303
304
Constraints of selection from set of possibilities.
virtual bool IsOptionEnabled(int index) const =0
Return true if the option is enabled and can be selected.
OptionsFlags
Flags for controlling constraints behavior.
@ SCF_NONE
No special flags.
@ SFC_DISABLE_ALLOWED
If set, some options can be disabled.
@ SCF_SUPPORT_UNIQUE_ID
If set, every option must have a unique ID.
virtual int GetOptionsCount() const =0
Get number of managed options.
ChangeFlags
Flags for changes related to this interface.
@ CF_OPTIONS_CHANGED
Option list updated (options added, removed, or reordered).
@ CF_OPTION_RENAMED
One or more options were renamed.
virtual QByteArray GetOptionId(int index) const =0
Get option ID.
virtual QString GetOptionName(int index) const =0
Get name of specified option.
virtual int GetOptionsFlags() const =0
Get constraints flags.
virtual QString GetOptionDescription(int index) const =0
Get human-readable description for an option.
Common interface for data model objects, which can be changed.
Definition IChangeable.h:28
Contains interfaces and implementations of flexible parameter concept.
int FindOptionIndexById(const QByteArray &id, const iprm::IOptionsList &list)
Find the option index by the given ID.