Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PythonAPI] Use _fillAttribute() in some sketch functions
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_WidgetToolbox.cpp
diff --git
a/src/ModuleBase/ModuleBase_WidgetToolbox.cpp
b/src/ModuleBase/ModuleBase_WidgetToolbox.cpp
index 6a16aa3d2647d6d4057e6352971f686ad02e1a06..83afaa5d62555adee1cf8dbb8798333a0bcb3737 100644
(file)
--- a/
src/ModuleBase/ModuleBase_WidgetToolbox.cpp
+++ b/
src/ModuleBase/ModuleBase_WidgetToolbox.cpp
@@
-9,12
+9,14
@@
#include <ModuleBase_PageBase.h>
#include <ModuleBase_ModelWidget.h>
#include <ModuleBase_Tools.h>
#include <ModuleBase_PageBase.h>
#include <ModuleBase_ModelWidget.h>
#include <ModuleBase_Tools.h>
+#include <ModuleBase_ToolBox.h>
#include <ModelAPI_AttributeString.h>
#include <QWidget>
#include <QList>
#include <QVBoxLayout>
#include <ModelAPI_AttributeString.h>
#include <QWidget>
#include <QList>
#include <QVBoxLayout>
+#include <QIcon>
ModuleBase_WidgetToolbox::ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData,
const std::string& theParentId)
ModuleBase_WidgetToolbox::ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData,
const std::string& theParentId)
@@
-22,8
+24,9
@@
ModuleBase_WidgetToolbox::ModuleBase_WidgetToolbox(QWidget* theParent, const Con
{
QVBoxLayout* aMainLayout = new QVBoxLayout(this);
ModuleBase_Tools::zeroMargins(aMainLayout);
{
QVBoxLayout* aMainLayout = new QVBoxLayout(this);
ModuleBase_Tools::zeroMargins(aMainLayout);
- myToolBox = new
Q
ToolBox(this);
+ myToolBox = new
ModuleBase_
ToolBox(this);
// Dark-grey rounded tabs with button-like border #and bold font
// Dark-grey rounded tabs with button-like border #and bold font
+ // TODO: apply style to custom widget
QString css = "QToolBox::tab{background-color:#c8c8c8;"
"border-radius:5px;"
"border:1px inset;"
QString css = "QToolBox::tab{background-color:#c8c8c8;"
"border-radius:5px;"
"border:1px inset;"
@@
-41,13
+44,15
@@
ModuleBase_WidgetToolbox::~ModuleBase_WidgetToolbox()
}
int ModuleBase_WidgetToolbox::addPage(ModuleBase_PageBase* thePage,
}
int ModuleBase_WidgetToolbox::addPage(ModuleBase_PageBase* thePage,
- const QString& theName, const QString& theCaseId)
+ const QString& theName,
+ const QString& theCaseId,
+ const QPixmap& theIcon )
{
{
- ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId);
+ ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId
, theIcon
);
QFrame* aFrame = dynamic_cast<QFrame*>(thePage);
aFrame->setFrameShape(QFrame::Box);
aFrame->setFrameStyle(QFrame::Sunken);
QFrame* aFrame = dynamic_cast<QFrame*>(thePage);
aFrame->setFrameShape(QFrame::Box);
aFrame->setFrameStyle(QFrame::Sunken);
- myToolBox->addItem(aFrame, theName);
+ myToolBox->addItem(aFrame, theName
, theIcon
);
return myToolBox->count();
}
return myToolBox->count();
}