{
connect(anApp, SIGNAL(preferenceResetToDefaults()), this, SLOT(onDefaultPreferences()));
}
+
+ int aMenu = createMenu(tr("Inspection"), -1, -1, 30);
+ int aSubMenu = createMenu(tr("Information"), aMenu);
+
+ int aId = myActionsList.size();
+ myActionsList.append("INSPECTION_CMD");
+ SUIT_Desktop* aDesk = application()->desktop();
+ QString aTip = tr("Show inspection window");
+ myWhatIsAction = createAction(aId, aTip, QIcon(":pictures/whatis.png"), tr("What Is"),
+ aTip, QKeySequence(), aDesk, true, this, SLOT(onWhatIs(bool)));
+ myWhatIsAction->setStatusTip(aTip);
+ myWhatIsAction->setData("INSPECTION_CMD");
+ createMenu(aId, aSubMenu, 0);
+
+ int aTool = createTool("INSPWCTION_TOOL", "INSPWCTION_TOOL");
+ int aToolId = createTool(myWhatIsAction, aTool);
}
//******************************************************
if (aInspection) {
QAction* aViewAct = aInspection->toggleViewAction();
aViewAct->setEnabled(true);
+ connect(aViewAct, SIGNAL(toggled(bool)), this, SLOT(onWhatIs(bool)));
}
if (!mySelector) {
{
myWorkshop->menuMgr()->createFeatureActions();
}
+
+void SHAPERGUI::onWhatIs(bool isToggled)
+{
+ QDockWidget* aInspection = myWorkshop->inspectionPanel();
+ if (sender() == myWhatIsAction) {
+ QAction* aViewAct = aInspection->toggleViewAction();
+ aViewAct->blockSignals(true);
+ aViewAct->setChecked(isToggled);
+ aViewAct->blockSignals(false);
+ aInspection->setVisible(isToggled);
+ }
+ else {
+ myWhatIsAction->blockSignals(true);
+ myWhatIsAction->setChecked(isToggled);
+ myWhatIsAction->blockSignals(false);
+ }
+}
\ No newline at end of file
aSplitter->addWidget(aTypeWgt);
myTypeParams = new QTextBrowser(aSplitter);
- myTypeParams->setFixedWidth(170);
myTypeParams->setReadOnly(true);
myTypeParams->setFocusPolicy(Qt::NoFocus);
- myTypeParams->setFrameStyle(QFrame::NoFrame);
myTypeParams->viewport()->setBackgroundRole(QPalette::Window);
aSplitter->addWidget(myTypeParams);