Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxHelpEngine.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXHELPENGINE_H
13 #define CXHELPENGINE_H
14 
15 #include <map>
16 #include "boost/shared_ptr.hpp"
17 #include "org_custusx_help_Export.h"
18 
19 #include <QString>
20 #include <QObject>
21 
22 class QWidget;
23 class QHelpEngineCore;
24 class QHelpEngine;
25 class QHelpSearchEngine;
26 
27 namespace cx
28 {
29 
38 class org_custusx_help_EXPORT HelpEngine : public QObject
39 {
40  Q_OBJECT
41 public:
42  HelpEngine();
43  ~HelpEngine();
44  QHelpEngine* engine() { return helpEngine; }
45 signals:
46  void keywordActivated(QString);
47 private slots:
48  void focusObjectChanged(QObject* newFocus);
49  void focusChanged(QWidget * old, QWidget * now);
50  void setInitialPage();
51 private:
52  QString findBestMatchingKeyword(QObject* object);
53  QHelpEngine* helpEngine;
54  void setupDataWithWarning();
55 
56  bool isBreakChar(QChar c) const;
57  bool isBreakChar(QString text, int index) const;
58 
59  void setupDocFile();
60 };
61 typedef boost::shared_ptr<HelpEngine> HelpEnginePtr;
62 
63 }
64 
65 #endif // CXHELPENGINE_H
QHelpEngine * engine()
Definition: cxHelpEngine.h:44
boost::shared_ptr< HelpEngine > HelpEnginePtr
Definition: cxHelpEngine.h:61
Namespace for all CustusX production code.