You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
2.0 KiB
50 lines
2.0 KiB
#ifndef USINFOBOX_H
|
|
#define USINFOBOX_H
|
|
|
|
#include "AutoProperty.h"
|
|
|
|
#define US_INFO_BOX(NAME, \
|
|
TITLE, \
|
|
VALUES, \
|
|
PREFIX, \
|
|
SUFFIX, \
|
|
ENABLE, \
|
|
VISIBLE, \
|
|
DEFAULT_VALUE) \
|
|
US_PROPERTY_VIEW_ONLY(QString, NAME ## Title, TITLE) \
|
|
US_PROPERTY_VIEW_ONLY(QStringList, NAME ## Values, VALUES) \
|
|
US_PROPERTY_VIEW_ONLY(QString, NAME ## Prefix, PREFIX) \
|
|
US_PROPERTY_VIEW_ONLY(QString, NAME ## Suffix, SUFFIX) \
|
|
US_PROPERTY_VIEW_ONLY(bool, NAME ## Enable, ENABLE) \
|
|
US_PROPERTY_VIEW_ONLY(bool, NAME ## Visible, VISIBLE) \
|
|
US_PROPERTY(int, NAME, DEFAULT_VALUE) \
|
|
US_PROPERTY_VIEW_ONLY(int, NAME ## Diff, 0)
|
|
|
|
#define US_INFO_BOX_CUSTOM_SETTER(NAME, \
|
|
TITLE, \
|
|
VALUES, \
|
|
PREFIX, \
|
|
SUFFIX, \
|
|
ENABLE, \
|
|
VISIBLE, \
|
|
DEFAULT_VALUE) \
|
|
US_PROPERTY_VIEW_ONLY(QString, NAME ## Title, TITLE) \
|
|
US_PROPERTY_VIEW_ONLY(QStringList, NAME ## Values, VALUES) \
|
|
US_PROPERTY_VIEW_ONLY(QString, NAME ## Prefix, PREFIX) \
|
|
US_PROPERTY_VIEW_ONLY(QString, NAME ## Suffix, SUFFIX) \
|
|
US_PROPERTY_VIEW_ONLY(bool, NAME ## Enable, ENABLE) \
|
|
US_PROPERTY_VIEW_ONLY(bool, NAME ## Visible, VISIBLE) \
|
|
US_PROPERTY_CUSTOM_SETTER(int, NAME, DEFAULT_VALUE) \
|
|
US_PROPERTY_VIEW_ONLY(int, NAME ## Diff, 0)
|
|
|
|
#define US_INFO_BOX_BOOL(NAME, \
|
|
TITLE, \
|
|
ENABLE, \
|
|
VISIBLE, \
|
|
DEFAULT_VALUE) \
|
|
US_PROPERTY_VIEW_ONLY(QString, NAME ## Title, TITLE) \
|
|
US_PROPERTY_VIEW_ONLY(bool, NAME ## Enable, ENABLE) \
|
|
US_PROPERTY_VIEW_ONLY(bool, NAME ## Visible, VISIBLE) \
|
|
US_PROPERTY(bool, NAME, DEFAULT_VALUE)
|
|
|
|
#endif //USINFOBOX_H
|
|
|