int ModuleBase_PagedContainer::addPage(ModuleBase_PageBase* thePage,
const QString& theName, const QString& theCaseId,
- const QPixmap& theIcon )
+ const QPixmap& theIcon,
+ const QString& theTooltip)
{
if (!myPages.count()) {
setDefaultValue(theCaseId.toStdString());
virtual int addPage( ModuleBase_PageBase* theWidget,
const QString& theName,
const QString& theCaseId,
- const QPixmap& theIcon );
+ const QPixmap& theIcon,
+ const QString& theTooltip);
/// Redefinition of virtual function
virtual QList<QWidget*> getControls() const;
if (myWidgetApi->toChildWidget()) {
do {
QString aPageName = qs(myWidgetApi->getProperty(CONTAINER_PAGE_NAME));
+ QString aTooltip = qs(myWidgetApi->getProperty(FEATURE_TOOLTIP));
QString aCaseId = qs(myWidgetApi->getProperty(_ID));
ModuleBase_PageBase* aPage = new ModuleBase_PageWidget(aWidget);
createWidget(aPage);
QString anIconPath = qs( myWidgetApi->getProperty( CONTAINER_PAGE_ICON ) );
QPixmap anIcon = ModuleBase_IconFactory::loadPixmap( anIconPath );
- aContainer->addPage( aPage, aPageName, aCaseId, anIcon );
+ aContainer->addPage( aPage, aPageName, aCaseId, anIcon, aTooltip);
}
} while (myWidgetApi->toNextWidget());
}
int ModuleBase_WidgetRadiobox::addPage(ModuleBase_PageBase* thePage,
const QString& theName,
const QString& theCaseId,
- const QPixmap& theIcon)
+ const QPixmap& theIcon,
+ const QString& theTooltip)
{
- ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon);
+ ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon, theTooltip);
QWidget* aWgt = new QWidget(this);
QVBoxLayout* aLay = new QVBoxLayout(aWgt);
aLay->setContentsMargins(0, 0, 0, 0);
QRadioButton* aButton;
- if (theIcon.isNull())
+ if (theIcon.isNull()) {
aButton = new QRadioButton(theName, aWgt);
- else
+ aButton->setToolTip(theTooltip);
+ }
+ else {
aButton = new QRadioButton(aWgt);
- aButton->setToolTip(theName);
+ aButton->setToolTip(theName);
+ }
aLay->addStretch();
aLay->addWidget(aButton);
aLay->addStretch();
virtual int addPage(ModuleBase_PageBase* theWidget,
const QString& theName,
const QString& theCaseId,
- const QPixmap& theIcon);
+ const QPixmap& theIcon,
+ const QString& theTooltip);
protected:
/// Implements ModuleBase_PagedContainer
int ModuleBase_WidgetSwitch::addPage(ModuleBase_PageBase* thePage, const QString& theName,
const QString& theCaseId,
- const QPixmap& theIcon )
+ const QPixmap& theIcon,
+ const QString& theTooltip)
{
- int aSuperCount = ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon);
+ int aSuperCount =
+ ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon, theTooltip);
myCombo->addItem(theName);
int aResultCount = myCombo->count();
if (aResultCount == 2)
virtual int addPage( ModuleBase_PageBase* theWidget,
const QString& theName,
const QString& theCaseId,
- const QPixmap& theIcon );
+ const QPixmap& theIcon,
+ const QString& theTooltip);
protected:
/// Returns index of the current page
int ModuleBase_WidgetToolbox::addPage(ModuleBase_PageBase* thePage,
const QString& theName,
const QString& theCaseId,
- const QPixmap& theIcon )
+ const QPixmap& theIcon,
+ const QString& theTooltip)
{
- ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon);
+ ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon, theTooltip);
QFrame* aFrame = dynamic_cast<QFrame*>(thePage);
myToolBox->addItem(aFrame, theName, theIcon );
return myToolBox->count();
virtual int addPage( ModuleBase_PageBase* theWidget,
const QString& theName,
const QString& theCaseId,
- const QPixmap& theIcon );
+ const QPixmap& theIcon,
+ const QString& theTooltip);
protected:
/// Implements ModuleBase_PagedContainer