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
updated copyright message
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_WidgetRadiobox.cpp
diff --git
a/src/ModuleBase/ModuleBase_WidgetRadiobox.cpp
b/src/ModuleBase/ModuleBase_WidgetRadiobox.cpp
index f872e4ec04da7a96c00d648c2c3cade136e098b5..c091a8433a5dc4222c2bb37b1244aa50bd7ce674 100644
(file)
--- a/
src/ModuleBase/ModuleBase_WidgetRadiobox.cpp
+++ b/
src/ModuleBase/ModuleBase_WidgetRadiobox.cpp
@@
-1,4
+1,4
@@
-// Copyright (C) 2014-20
19 CEA/DEN, EDF R&D
+// Copyright (C) 2014-20
23 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-20,12
+20,13
@@
#include <ModuleBase_WidgetRadiobox.h>
#include <ModuleBase_PageBase.h>
#include <ModuleBase_WidgetRadiobox.h>
#include <ModuleBase_PageBase.h>
+#include <Config_WidgetAPI.h>
+
#include <QFormLayout>
#include <QRadioButton>
#include <QFrame>
#include <QButtonGroup>
#include <QFormLayout>
#include <QRadioButton>
#include <QFrame>
#include <QButtonGroup>
-
ModuleBase_WidgetRadiobox::ModuleBase_WidgetRadiobox(QWidget* theParent,
const Config_WidgetAPI* theData)
: ModuleBase_PagedContainer(theParent, theData)
ModuleBase_WidgetRadiobox::ModuleBase_WidgetRadiobox(QWidget* theParent,
const Config_WidgetAPI* theData)
: ModuleBase_PagedContainer(theParent, theData)
@@
-35,6
+36,8
@@
ModuleBase_WidgetRadiobox::ModuleBase_WidgetRadiobox(QWidget* theParent,
myGroup = new QButtonGroup(this);
myGroup->setExclusive(true);
myGroup = new QButtonGroup(this);
myGroup->setExclusive(true);
+ myVerticalAlignment = theData->getProperty("align_subs").find("vert") == 0;
+
connect(myGroup, SIGNAL(buttonToggled(int, bool)), SLOT(onPageChanged()));
}
connect(myGroup, SIGNAL(buttonToggled(int, bool)), SLOT(onPageChanged()));
}
@@
-56,11
+59,11
@@
int ModuleBase_WidgetRadiobox::addPage(ModuleBase_PageBase* thePage,
QRadioButton* aButton;
if (theIcon.isNull()) {
aButton = new QRadioButton(theName, aWgt);
QRadioButton* aButton;
if (theIcon.isNull()) {
aButton = new QRadioButton(theName, aWgt);
- aButton->setToolTip(t
heTooltip
);
+ aButton->setToolTip(t
ranslate(theTooltip.toStdString())
);
}
else {
aButton = new QRadioButton(aWgt);
}
else {
aButton = new QRadioButton(aWgt);
- aButton->setToolTip(t
heName
);
+ aButton->setToolTip(t
ranslate(theName.toStdString())
);
}
aLay->addStretch();
aLay->addWidget(aButton);
}
aLay->addStretch();
aLay->addWidget(aButton);
@@
-68,7
+71,11
@@
int ModuleBase_WidgetRadiobox::addPage(ModuleBase_PageBase* thePage,
//QFrame* aFrame = dynamic_cast<QFrame*>(thePage);
QWidget* aPage = thePage->pageWidget();
//QFrame* aFrame = dynamic_cast<QFrame*>(thePage);
QWidget* aPage = thePage->pageWidget();
- myLayout->addRow(aWgt, aPage);
+ if (myVerticalAlignment) {
+ myLayout->addRow(aWgt);
+ myLayout->addRow(aPage);
+ } else
+ myLayout->addRow(aWgt, aPage);
myGroup->addButton(aButton, myGroup->buttons().count());
bool isDefault = theCaseId.toStdString() == getDefaultValue();
myGroup->addButton(aButton, myGroup->buttons().count());
bool isDefault = theCaseId.toStdString() == getDefaultValue();