32 #ifndef CXHELPWIDGET_H 33 #define CXHELPWIDGET_H 36 #include "boost/shared_ptr.hpp" 37 #include "org_custusx_help_Export.h" 45 class HelpSearchWidget;
46 class HelpIndexWidget;
61 explicit HelpWidget(HelpEnginePtr engine, QWidget* parent = NULL);
64 HelpEnginePtr
engine() {
return mEngine; }
65 virtual QSize sizeHint()
const;
68 void requestShowLink(
const QUrl&);
71 void toggleShowNavigationControls();
74 void onGotoDocumentation();
81 QAction* createAction2(QObject* parent, QIcon iconName, QString text, QString tip, T slot, QLayout* layout=NULL, QToolButton* button =
new QToolButton())
85 QAction* action =
new QAction(iconName, text, parent);
86 action->setStatusTip(tip);
87 action->setWhatsThis(tip);
88 action->setToolTip(tip);
89 connect(action, &QAction::triggered,
this, slot);
92 button->setDefaultAction(action);
93 layout->addWidget(button);
98 virtual void showEvent(QShowEvent* event);
99 virtual void hideEvent(QHideEvent* event);
100 virtual void prePaintEvent();
102 void addSearchWidget(QTabWidget* tabWidget, QBoxLayout* buttonLayout);
103 void addIndexWidget(QTabWidget* tabWidget, QBoxLayout* buttonLayout);
104 void addContentWidget(QTabWidget* tabWidget, QBoxLayout* buttonLayout);
105 void addToggleTabWidgetButton(QBoxLayout* buttonLayout);
106 void addWebNavigationButtons(QBoxLayout* buttonLayout);
107 void addWebButton(QBoxLayout* buttonLayout);
109 QVBoxLayout* mVerticalLayout;
110 QTabWidget* mTabWidget;
111 HelpEnginePtr mEngine;
117 QAction* mShowNavigationControlsAction;
118 QSplitter* mSplitter;
124 #endif // CXHELPWIDGET_H
boost::shared_ptr< HelpEngine > HelpEnginePtr
Namespace for all CustusX production code.