CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxHelpIndexWidget.cpp
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 #include "cxHelpIndexWidget.h"
13 
14 #include <QVBoxLayout>
15 #include <QHelpEngine>
16 #include <QHelpIndexWidget>
17 #include <QLineEdit>
18 #include <QLabel>
19 
20 #include "cxTypeConversions.h"
21 #include "cxHelpEngine.h"
22 
23 namespace cx
24 {
25 
27  QWidget(parent),
28  mEngine(engine)
29 {
30  QVBoxLayout* layout = new QVBoxLayout(this);
31  layout->setMargin(0);
32  this->setLayout(layout);
33 
34  mFilterEdit = new QLineEdit;
35  connect(mFilterEdit, &QLineEdit::textChanged, this, &HelpIndexWidget::filterChanged);
36 
37  layout->addWidget(new QLabel("Look for:"));
38  layout->addWidget(mFilterEdit);
39  layout->addWidget(mEngine->engine()->indexWidget());
40 
41  connect(mEngine->engine()->indexWidget(), &QHelpIndexWidget::linkActivated,
43 }
44 
45 void HelpIndexWidget::filterChanged()
46 {
47  mEngine->engine()->indexWidget()->filterIndices(mFilterEdit->text());
48 }
49 
50 }//end namespace cx
HelpIndexWidget(HelpEnginePtr engine, QWidget *parent=NULL)
void requestShowLink(const QUrl &)
boost::shared_ptr< HelpEngine > HelpEnginePtr
Definition: cxHelpEngine.h:61
Namespace for all CustusX production code.