ACF $AcfVersion:0$
IOptionsManager.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// ACF includes
6#include <iprm/IOptionsList.h>
8
9
10namespace iprm
11{
12
13
94class IOptionsManager: virtual public IOptionsList, virtual public ISelectionParam
95{
96public:
109
162
163
196 virtual int GetOptionOperationFlags(int index = -1) const = 0; // TODO: Merge this with iprm::IOptionsList::GetOptionsFlags()
197
224 virtual bool SetOptionEnabled(int index, bool isEnabled = true) = 0;
225
252 virtual bool RemoveOption(int index) = 0;
253
294 virtual bool InsertOption(
295 const QString& optionName,
296 const QByteArray& optionId,
297 const QString& optionDescription = QString(),
298 int index = -1) = 0;
299
327 virtual bool SwapOptions(int index1, int index2) = 0;
328
355 virtual bool SetOptionName(int optionIndex, const QString& optionName) = 0;
356
376 virtual bool SetOptionDescription(int optionIndex, const QString& optionDescription) = 0;
377};
378
379
380} // namespace iprm
381
382
383
384
Constraints of selection from set of possibilities.
Common interface for the management of dynamic selection constraints.
virtual bool InsertOption(const QString &optionName, const QByteArray &optionId, const QString &optionDescription=QString(), int index=-1)=0
Insert an option at some position.
virtual bool SetOptionDescription(int optionIndex, const QString &optionDescription)=0
Set a new description for the option at the given index.
virtual bool RemoveOption(int index)=0
Remove an option at the given index.
virtual bool SetOptionName(int optionIndex, const QString &optionName)=0
Set a new name for the option at the given index.
virtual bool SetOptionEnabled(int index, bool isEnabled=true)=0
Enables or disables a given option.
virtual bool SwapOptions(int index1, int index2)=0
Swap two options.
OptionOperationFlags
Bitwise coded flags used to find out supported features.
@ OOF_SUPPORT_ENABLING
Active if enabling and disabling of options is possible.
@ OOF_SUPPORT_DELETE
Active if delete of options is possible.
@ OOF_SUPPORT_RENAME
Active if rename of options is supported.
@ OOF_DISABLE_ALLOWED
Active if it is possible to have disabled options.
@ OOF_COUNT_FIXED
Active if number of options is fixed.
@ OOF_SUPPORT_INSERT
Active if insert of options is possible.
@ OOF_SUPPORT_SWAP
Active if swap of options is possible.
ChangeFlags
Data model change notification flags.
@ CF_OPTION_ADDED
An option was added to the list.
@ CF_OPTION_REMOVED
An option was removed from the list.
virtual int GetOptionOperationFlags(int index=-1) const =0
Get operation control flags of some option or whole manager.
Interface allowing to select single option from list of options.
Contains interfaces and implementations of flexible parameter concept.