myUseInput = false;
myNestedFeatures = "";
myModal = false;
+ myIsTitleInToolbar = true;
myIsApplyContinue = false;
}
return myIsAutoPreview;
}
+bool Config_FeatureMessage::isTitleInToolbar() const
+{
+ return myIsTitleInToolbar;
+}
+
bool Config_FeatureMessage::isModal() const
{
return myModal;
void Config_FeatureMessage::setHelpFileName(const std::string& aName)
{
myHelpFile = aName;
-}
\ No newline at end of file
+}
+
+void Config_FeatureMessage::setTitleInToolbar(bool theValue)
+{
+ myIsTitleInToolbar = theValue;
+}
bool myInternal; ///<Internal feature without GUI representation
bool myModal; ///<True if the feature has to be represented by modal dialog box
bool myIsAutoPreview; ///< Preview computation is performed automatically
+ bool myIsTitleInToolbar; ///< False if title should not be displayed in the toolbar
/// True if the feature can have Apply/Continue button in its property panel
bool myIsApplyContinue;
CONFIG_EXPORT bool isModal() const;
/// If true - the feature can have Apply/Continue button in its property panel
CONFIG_EXPORT bool isApplyContinue() const;
-
-
-
/// If true - preview of the feature is done by any modification of the feature attributes
CONFIG_EXPORT bool isAutoPreview() const;
+ /// If true - title should normally be displayed in the toolbar
+ CONFIG_EXPORT bool isTitleInToolbar() const;
///Set feature's Id
CONFIG_EXPORT void setId(const std::string& id);
CONFIG_EXPORT void setAutoPreview(bool isAutoPreview);
///Set modality state; If true - the feature will be represented by modal dialog box GUI
CONFIG_EXPORT void setModal(bool isModal);
+ ///Set flag to display title in toolbar
+ CONFIG_EXPORT void setTitleInToolbar(bool theValue);
///Set Apply/Continue state;
///If true - the feature can have Apply/Continue button in its property panel
CONFIG_EXPORT void setApplyContinue(bool isModal);
std::string aText = Config_Translator::translate(anId, getProperty(theFeatureNode, FEATURE_TEXT));
outFeatureMessage->setText(aText);
- std::string aToolTip = Config_Translator::translate(anId,
- getProperty(theFeatureNode, FEATURE_TOOLTIP));
+ bool isTitleInToolbar = getBooleanAttribute(theFeatureNode, FEATURE_TITLE_IN_TOOLBAR, true);
+ outFeatureMessage->setTitleInToolbar(isTitleInToolbar);
+ //std::string aToolTip = Config_Translator::translate(
+ // anId, getProperty(theFeatureNode, FEATURE_TOOLTIP));
+ //outFeatureMessage->setTooltip(aToolTip);
outFeatureMessage->setIcon(getProperty(theFeatureNode, FEATURE_ICON));
outFeatureMessage->setKeysequence(getProperty(theFeatureNode, FEATURE_KEYSEQUENCE));
std::string aHelpFile = getProperty(theFeatureNode, HELP_FILE);
const static char* FEATURE_MODAL = "modal";
const static char* FEATURE_APPLY_CONTINUE = "apply_continue";
const static char* FEATURE_AUTO_PREVIEW = "auto_preview";
+const static char* FEATURE_TITLE_IN_TOOLBAR = "titleInToolbar";
// NODE_VALIDATOR properties
const static char* _PARAMETERS = "parameters";
int n = aWords.count();
QString aLine;
for (int i = 0; i < n; i++) {
- QString aLineExt = aLine + " " + aWords[i];
+ QString aLineExt = i == 0 ? aWords[i] : aLine + " " + aWords[i];
qreal anWidthNonExt = tfm.boundingRect(aLine).width();
qreal anWidthExt = tfm.boundingRect(aLineExt).width();
qreal aDeltaNonExt = fabs(anWidthNonExt-aGoldWidth);