- myContainer = new QWidget(theParent);
- QHBoxLayout* aLayout = new QHBoxLayout(myContainer);
-
- aLayout->setContentsMargins(0, 0, 0, 0);
- QString aLabelText = QString::fromStdString(theData->widgetLabel());
- QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
- myLabel = new QLabel(aLabelText, myContainer);
- if (!aLabelIcon.isEmpty())
- myLabel->setPixmap(QPixmap(aLabelIcon));
-
- aLayout->addWidget(myLabel);
-
- QString aToolTip = QString::fromStdString(theData->widgetTooltip());
- myTextLine = new QLineEdit(myContainer);
- myTextLine->setReadOnly(true);
- myTextLine->setToolTip(aToolTip);
- myTextLine->installEventFilter(this);
-
- myBasePalet = myTextLine->palette();
- myInactivePalet = myBasePalet;
- myInactivePalet.setBrush(QPalette::Base, QBrush(Qt::gray, Qt::Dense6Pattern));
- myTextLine->setPalette(myInactivePalet);
-
- aLayout->addWidget(myTextLine, 1);
-
- myActivateBtn = new QToolButton(myContainer);
- myActivateBtn->setIcon(QIcon(":icons/hand_point.png"));
- myActivateBtn->setCheckable(true);
- myActivateBtn->setToolTip(tr("Activate/Deactivate selection"));
- connect(myActivateBtn, SIGNAL(toggled(bool)), this, SLOT(activateSelection(bool)));
-
- aLayout->addWidget(myActivateBtn);
-
- std::string aTypes = theData->getProperty("shape_types");
- myShapeTypes = QString(aTypes.c_str()).split(' ');