11 #ifndef CXHELPWIDGET_H 12 #define CXHELPWIDGET_H 15 #include "boost/shared_ptr.hpp" 16 #include "org_custusx_help_Export.h" 24 class HelpSearchWidget;
25 class HelpIndexWidget;
40 explicit HelpWidget(HelpEnginePtr engine, QWidget* parent = NULL);
43 HelpEnginePtr
engine() {
return mEngine; }
44 virtual QSize sizeHint()
const;
47 void requestShowLink(
const QUrl&);
50 void toggleShowNavigationControls();
53 void onGotoDocumentation();
60 QAction* createAction2(QObject* parent, QIcon iconName, QString text, QString tip, T slot, QLayout* layout=NULL, QToolButton* button =
new QToolButton())
64 QAction* action =
new QAction(iconName, text, parent);
65 action->setStatusTip(tip);
66 action->setWhatsThis(tip);
67 action->setToolTip(tip);
68 connect(action, &QAction::triggered,
this, slot);
71 button->setDefaultAction(action);
72 layout->addWidget(button);
77 virtual void showEvent(QShowEvent* event);
78 virtual void hideEvent(QHideEvent* event);
79 virtual void prePaintEvent();
81 void addSearchWidget(QTabWidget* tabWidget, QBoxLayout* buttonLayout);
82 void addIndexWidget(QTabWidget* tabWidget, QBoxLayout* buttonLayout);
83 void addContentWidget(QTabWidget* tabWidget, QBoxLayout* buttonLayout);
84 void addToggleTabWidgetButton(QBoxLayout* buttonLayout);
85 void addWebNavigationButtons(QBoxLayout* buttonLayout);
86 void addWebButton(QBoxLayout* buttonLayout);
88 QVBoxLayout* mVerticalLayout;
89 QTabWidget* mTabWidget;
90 HelpEnginePtr mEngine;
96 QAction* mShowNavigationControlsAction;
103 #endif // CXHELPWIDGET_H
boost::shared_ptr< HelpEngine > HelpEnginePtr
Namespace for all CustusX production code.