tooltip="Type of boolean operation"
string_list="Cut Fuse Common Smash"
use_in_title="true"
- icons_list="icons/Features/bool_cut.png :icons/bool_fuse.png :icons/bool_common.png :icons/bool_smash.png"
+ icons_list="icons/Features/bool_cut.png icons/Features/bool_fuse.png icons/Features/bool_common.png icons/Features/bool_smash.png"
default="0"
/>
<multi_selector id="main_objects"
#include <ModuleBase_WidgetAction.h>
#include <ModuleBase_Tools.h>
+#include <ModuleBase_IconFactory.h>
#include <Config_WidgetAPI.h>
QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
if (!aLabelIcon.isEmpty())
- myButton->setIcon(QPixmap(aLabelIcon));
+ myButton->setIcon(ModuleBase_IconFactory::loadPixmap(aLabelIcon));
else
myButton->setText(aText);
myButton->setToolTip(aToolTip);
} else {
myLabel = new QLabel(aLabelText, this);
if (!aLabelIcon.isEmpty())
- myLabel->setPixmap(QPixmap(aLabelIcon));
+ myLabel->setPixmap(ModuleBase_IconFactory::loadPixmap(aLabelIcon));
aLayout->addWidget(myLabel);
std::string aToolstr = theData->widgetTooltip();
#include <ModuleBase_ParamSpinBox.h>
#include <ModuleBase_Tools.h>
#include <ModuleBase_WidgetDoubleValue.h>
+#include <ModuleBase_IconFactory.h>
#include <QFormLayout>
#include <QLabel>
QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
myLabel = new QLabel(aLabelText, this);
if (!aLabelIcon.isEmpty())
- myLabel->setPixmap(QPixmap(aLabelIcon));
+ myLabel->setPixmap(ModuleBase_IconFactory::loadPixmap(aLabelIcon));
bool aAcceptVariables = theData->getBooleanAttribute(DOUBLE_WDG_ACCEPT_EXPRESSIONS, true);
#include <ModuleBase_ParamSpinBox.h>
#include <ModuleBase_Tools.h>
#include <ModuleBase_ParamIntSpinBox.h>
+#include <ModuleBase_IconFactory.h>
#include <ModelAPI_AttributeInteger.h>
#include <ModelAPI_Data.h>
QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
myLabel = new QLabel(aLabelText, this);
if (!aLabelIcon.isEmpty())
- myLabel->setPixmap(QPixmap(aLabelIcon));
+ myLabel->setPixmap(ModuleBase_IconFactory::loadPixmap(aLabelIcon));
mySpinBox = new ModuleBase_ParamIntSpinBox(this);
QString anObjName = QString::fromStdString(attributeID());
#include <ModuleBase_WidgetLineEdit.h>
#include <ModuleBase_Tools.h>
+#include <ModuleBase_IconFactory.h>
#include <ModelAPI_AttributeString.h>
#include <ModelAPI_Data.h>
QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
QLabel* aLabel = new QLabel(aLabelText, this);
if (!aLabelIcon.isEmpty())
- aLabel->setPixmap(QPixmap(aLabelIcon));
+ aLabel->setPixmap(ModuleBase_IconFactory::loadPixmap(aLabelIcon));
myLineEdit = new CustomLineEdit( this, QString::fromStdString( thePlaceHolder ) );
// Here we do not use the Qt's standard method setPlaceHolderText() since it
#include <ModuleBase_Definitions.h>
#include <ModuleBase_IModule.h>
#include <ModuleBase_ViewerPrs.h>
+#include <ModuleBase_IconFactory.h>
#include <ModelAPI_Data.h>
#include <ModelAPI_Object.h>
QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
if (!aLabelIcon.isEmpty()) {
QLabel* aSelectedLabel = new QLabel("", this);
- aSelectedLabel->setPixmap(QPixmap(aLabelIcon));
+ aSelectedLabel->setPixmap(ModuleBase_IconFactory::loadPixmap(aLabelIcon));
aMainLay->addWidget(aSelectedLabel, 1, 1);
}
aMainLay->setColumnStretch(2, 1);
#include <ModuleBase_Filter.h>
#include <ModuleBase_IModule.h>
#include <ModuleBase_ViewerPrs.h>
+#include <ModuleBase_IconFactory.h>
#include <Config_WidgetAPI.h>
#include <Events_Loop.h>
QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
myLabel = new QLabel(aLabelText, this);
if (!aLabelIcon.isEmpty())
- myLabel->setPixmap(QPixmap(aLabelIcon));
+ myLabel->setPixmap(ModuleBase_IconFactory::loadPixmap(aLabelIcon));
QString aToolTip = QString::fromStdString(theData->widgetTooltip());
if (!aOperation)
return;
ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel();
- aPanel->setWindowTitle(aChoiceTitle);
+ if (aPanel)
+ aPanel->setWindowTitle(aChoiceTitle);
}
}
ModelAPI_Session::get()->validators()->registerNotObligatory(
getKind(), SketchPlugin_SketchEntity::EXTERNAL_ID());
data()->addAttribute(SketchPlugin_Sketch::SOLVER_ERROR(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(SketchPlugin_Sketch::SOLVER_DOF(), ModelAPI_AttributeString::typeId());
ModelAPI_Session::get()->validators()->registerNotObligatory(
getKind(), SketchPlugin_Sketch::SOLVER_ERROR());
+ data()->addAttribute(SketchPlugin_Sketch::SOLVER_DOF(), ModelAPI_AttributeString::typeId());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(
+ getKind(), SketchPlugin_Sketch::SOLVER_DOF());
}
void SketchPlugin_Sketch::execute()