ICF 3.0.5.47
Technical documentation of ICF Libraries
IOptionsList.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iprm_IOptionsList_included
7#define iprm_IOptionsList_included
8
9
10// Qt includes
11#include <QtCore/QString>
12
13
14// ICF includes
15#include <istd/IChangeable.h>
16
17#include <iprm/iprm.h>
18
19
20namespace iprm
21{
22
23
27class IOptionsList: virtual public istd::IChangeable
28{
29public:
45
63
67 virtual int GetOptionsFlags() const = 0;
68
72 virtual int GetOptionsCount() const = 0;
73
77 virtual QString GetOptionName(int index) const = 0;
78
82 virtual QString GetOptionDescription(int index) const = 0;
83
88 virtual QByteArray GetOptionId(int index) const = 0;
89
93 virtual bool IsOptionEnabled(int index) const = 0;
94
99 static int FindIndexById(const QByteArray& id, const iprm::IOptionsList& list);
100};
101
102
103} // namespace iprm
104
105
106#endif // !iprm_IOptionsList_included
107
108
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 control constraints behavior.
@ SFC_DISABLE_ALLOWED
If set, some options can be disabled.
@ SCF_SUPPORT_UNIQUE_ID
If set, every option must have an 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.
@ CF_OPTION_RENAMED
One or more options were renamed.
static int FindIndexById(const QByteArray &id, const iprm::IOptionsList &list)
Helper function to find the option index by ID.
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 a option with the index index.
Common interface for data model objects, which can be changed.
Definition IChangeable.h:32
Contains interfaces and implementations of flexible parameter concept.

© Witold Gantzke and Kirill Lepskiy