-// Copyright (C) 2006-2012 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
return _resource->booleanValue(RESOURCE_YACS, name, def);
}
-QFont Yacsgui_Resource::fontValue(const QString& name, const QFont def) const {
+QFont Yacsgui_Resource::fontValue(const QString& name, const QFont& def) const {
return _resource->fontValue(RESOURCE_YACS, name, def);
}
-QColor Yacsgui_Resource::colorValue(const QString& name, const QColor def) const {
+QColor Yacsgui_Resource::colorValue(const QString& name, const QColor& def) const {
return _resource->colorValue(RESOURCE_YACS, name, def);
}
return colorValue(name, col);
}
-QString Yacsgui_Resource::stringValue(const QString& name, const QString def) const {
+QString Yacsgui_Resource::stringValue(const QString& name, const QString& def) const {
return _resource->stringValue(RESOURCE_YACS, name, def);
}
_resource->setValue(RESOURCE_YACS, name, val);
}
-void Yacsgui_Resource::setValue( const QString& name, const QFont val ) {
+void Yacsgui_Resource::setValue( const QString& name, const QFont& val ) {
_resource->setValue(RESOURCE_YACS, name, val);
}
-void Yacsgui_Resource::setValue( const QString& name, const QColor val ) {
+void Yacsgui_Resource::setValue( const QString& name, const QColor& val ) {
_resource->setValue(RESOURCE_YACS, name, val);
}
-void Yacsgui_Resource::setValue( const QString& name, const QString val ) {
+void Yacsgui_Resource::setValue( const QString& name, const QString& val ) {
_resource->setValue(RESOURCE_YACS, name, val);
}
swm->addPreference( "Ensure Node Visible When Moved", presentationGroup, LightApp_Preferences::Bool, RESOURCE_YACS, "ensureVisibleWhenMoved" );
swm->addPreference( "Tabified Panels Up", presentationGroup, LightApp_Preferences::Bool, RESOURCE_YACS, "tabPanelsUp" );
int priority = swm->addPreference( "DockWidget priority", presentationGroup, LightApp_Preferences::Selector, RESOURCE_YACS, "dockWidgetPriority" );
+ swm->addPreference( "Progress bar color", presentationGroup, LightApp_Preferences::Color, RESOURCE_YACS, "progressBarColor" );
+ int progressLabel = swm->addPreference( "Progress bar label", presentationGroup, LightApp_Preferences::Selector, RESOURCE_YACS, "progressBarLabel" );
- QStringList priorityList;
- priorityList.append( "Horizontal" );
- priorityList.append( "Vertical" );
-
+ QStringList stringsList;
+ stringsList.append( "Horizontal" );
+ stringsList.append( "Vertical" );
QList<QVariant> indexesList;
indexesList.append(0);
indexesList.append(1);
-
- swm->setPreferenceProperty( priority, "strings", priorityList );
+ swm->setPreferenceProperty( priority, "strings", stringsList );
swm->setPreferenceProperty( priority, "indexes", indexesList );
+ stringsList.clear();
+ indexesList.clear();
+
+ stringsList << "Percentage: \"50%\"" << "Nb.steps: \"5/10\"" << "Both: \"50% (5/10)\"";
+ indexesList << 0 << 1 << 2;
+ swm->setPreferenceProperty( progressLabel, "strings", stringsList );
+ swm->setPreferenceProperty( progressLabel, "indexes", indexesList );
+
int pythonGroup = swm->addPreference( "Python", genTab );
swm->addPreference( "Python Script Font", pythonGroup, LightApp_Preferences::Font, RESOURCE_YACS, "font" );
Resource::ensureVisibleWhenMoved = booleanValue("ensureVisibleWhenMoved", ENSUREVISIBLEWHENMOVED);
Resource::tabPanelsUp = booleanValue("tabPanelsUp", TABPANELSUP);
Resource::dockWidgetPriority = integerValue( "dockWidgetPriority" , DOCKWIDGETPRIORITY);
+ Resource::progressBarColor = colorValue("progressBarColor", PROGRESSBARCOLOR);
+ Resource::progressBarLabel = integerValue( "progressBarLabel" , PROGRESSBARLABEL);
// Color of state of nodes
Resource::editedNodeBrushColor = colorValue(_editedNodeBrushColor, EDITEDNODEBRUSHCOLOR);