7 #include <QRegularExpressionValidator> 14 m_paramItemsLayout(0),
16 m_platformStyle(platformStyle),
23 m_vSpacer =
new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::Fixed);
24 m_hSpacer =
new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::Fixed);
32 m_paramName->setToolTip(tr(
"%1 %2").arg(QString::fromStdString(param.
type)).arg(QString::fromStdString(param.
name)));
38 QString text(QString(
"%2 <b>%1").arg(QString::fromStdString(param.
name)).arg(QString::fromStdString(param.
type)));
39 QString clippedText = metrix.elidedText(text, Qt::ElideRight, width);
42 QVBoxLayout *vLayout =
new QVBoxLayout();
64 m_vSpacer->changeSize(20, 40, QSizePolicy::Fixed, QSizePolicy::Expanding);
82 QStringList valuesList;
114 m_hSpacer->changeSize(0, 0, QSizePolicy::Fixed, QSizePolicy::Fixed);
125 m_vSpacer->changeSize(20, 40, QSizePolicy::Fixed, QSizePolicy::Expanding);
130 connect(item, SIGNAL(on_addItemClicked(
int)),
this, SLOT(
addNewParamItem(
int)));
131 connect(item, SIGNAL(on_removeItemClicked(
int)),
this, SLOT(
removeParamItem(
int)));
140 m_hSpacer->changeSize(40, 20, QSizePolicy::Expanding, QSizePolicy::Fixed);
145 QWidget * widget = item->widget();
149 disconnect(widget, 0, 0, 0);
150 widget->setParent(NULL);
157 m_vSpacer->changeSize(0, 0, QSizePolicy::Fixed, QSizePolicy::Fixed);
size_t length() const
length Length of the list, applicable for list only
void updateParamItemsPosition()
void removeParamItem(int position)
bool isList() const
isList Is the data type list
bool isDynamic() const
isDynamic Check if the type is dynamic.
ABIParam(const PlatformStyle *platformStyle, int ID, const ParameterABI ¶m, QWidget *parent=0)
ABIParam Constructor.
const PlatformStyle * m_platformStyle
QStringList getValue()
getValue Get the value of the parameter
const ParameterType & decodeType() const
void addNewParamItem(int position)
void setFixed(bool isFixed)
QList< ABIParamItem * > m_listParamItems
QHBoxLayout * m_mainLayout
QVBoxLayout * m_paramItemsLayout