From: vsv Date: Wed, 7 Nov 2018 12:22:40 +0000 (+0300) Subject: Add help button to toolbars management dialog boxes X-Git-Tag: Jan2019~38^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ee8329a41a96c31130bfd7acf9a75aac2eb0acc6;p=modules%2Fshaper.git Add help button to toolbars management dialog boxes --- diff --git a/src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.cpp b/src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.cpp index 697455377..e390a4c36 100644 --- a/src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.cpp +++ b/src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.cpp @@ -146,10 +146,12 @@ SHAPERGUI_ToolbarsDlg::SHAPERGUI_ToolbarsDlg(SHAPERGUI* theModule) // Buttons part of the dialog QDialogButtonBox* aButtons = - new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this); + new QDialogButtonBox(QDialogButtonBox::Help | QDialogButtonBox::Ok | QDialogButtonBox::Cancel, + Qt::Horizontal, this); aMailLayout->addWidget(aButtons); connect(aButtons, SIGNAL(accepted()), SLOT(accept())); connect(aButtons, SIGNAL(rejected()), SLOT(reject())); + connect(aButtons, SIGNAL(helpRequested()), SLOT(onHelp())); updateToolbarsList(); updateNumber(); @@ -244,6 +246,11 @@ void SHAPERGUI_ToolbarsDlg::onReset() myIsReset = true; } +void SHAPERGUI_ToolbarsDlg::onHelp() +{ + +} + //************************************************************************************ //************************************************************************************ @@ -351,10 +358,12 @@ SHAPERGUI_ToolbarItemsDlg::SHAPERGUI_ToolbarItemsDlg(QWidget* theParent, // Buttons part of the dialog QDialogButtonBox* aButtons = - new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this); + new QDialogButtonBox(QDialogButtonBox::Help | QDialogButtonBox::Ok | QDialogButtonBox::Cancel, + Qt::Horizontal, this); aMailLayout->addWidget(aButtons); connect(aButtons, SIGNAL(accepted()), SLOT(accept())); connect(aButtons, SIGNAL(rejected()), SLOT(reject())); + connect(aButtons, SIGNAL(helpRequested()), SLOT(onHelp())); } void SHAPERGUI_ToolbarItemsDlg::onAddItem() @@ -457,3 +466,8 @@ QIntList SHAPERGUI_ToolbarItemsDlg::getItems(QListWidget* theWidget, int theStar } return aList; } + +void SHAPERGUI_ToolbarItemsDlg::onHelp() +{ + +} diff --git a/src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.h b/src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.h index d9fcbde45..f86f9bd32 100644 --- a/src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.h +++ b/src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.h @@ -79,6 +79,9 @@ private slots: /// A slot to move a current item down in list of toolbar command void onDown(); + /// A slot on help call + void onHelp(); + private: QIntList getItems(QListWidget* theWidget, int theStart) const; @@ -119,9 +122,12 @@ private slots: /// A slot to delete a current toolbar void onDelete(); - /// A slot to delete a current toolbar + /// A slot to reset toolbars void onReset(); + /// A slot on help call + void onHelp(); + /// A slot called on double click on item in list void onDoubleClick(const QModelIndex& theIdx);