Salome HOME
Edit operation correction.
[modules/shaper.git] / src / ModuleBase / ModuleBase_Tools.cpp
index f68de8da5cba818502ee05c88496a59d239488e9..8df14bdc35b74bfb93fce4cdb053f9ac5c302114 100644 (file)
@@ -12,4 +12,35 @@ namespace ModuleBase_Tools {
 //******************************************************************
 
 //******************************************************************
+
+void adjustMargins(QWidget* theWidget)
+{
+  if(!theWidget)
+    return;
+  adjustMargins(theWidget->layout());
+}
+
+void adjustMargins(QLayout* theLayout)
+{
+  if(!theLayout)
+    return;
+  theLayout->setContentsMargins(2, 5, 5, 2);
+  theLayout->setSpacing(4);
+}
+
+void zeroMargins(QWidget* theWidget)
+{
+  if(!theWidget)
+    return;
+  zeroMargins(theWidget->layout());
+}
+
+void zeroMargins(QLayout* theLayout)
+{
+  if(!theLayout)
+    return;
+  theLayout->setContentsMargins(0, 0, 0, 0);
+  theLayout->setSpacing(5);
+}
+
 }