InfixCompleter.cpp
Go to the documentation of this file.
1
#include "
InfixCompleter.h
"
2
#include "
InfixFilterModel.h
"
3
4
#include <QListView>
5
#include <QStringListModel>
6
7
namespace
armarx
8
{
9
10
InfixCompleter::InfixCompleter
(
const
QStringList& completionList, QObject* parent) : QCompleter(parent)
11
{
12
QListView* popup =
new
QListView();
13
completionModel
=
new
QStringListModel(completionList,
this
);
14
proxyModel
=
new
InfixFilterModel
();
15
proxyModel
->setFilterCaseSensitivity(Qt::CaseInsensitive);
16
proxyModel
->setSourceModel(
completionModel
);
17
setModel(
proxyModel
);
18
setPopup(popup);
19
setCaseSensitivity(Qt::CaseInsensitive);
20
}
21
22
void
InfixCompleter::setCompletionList
(
const
QStringList& completionList)
23
{
24
completionModel
->setStringList(completionList);
25
}
26
27
InfixFilterModel
*
InfixCompleter::getProxyModel
()
const
28
{
29
return
proxyModel
;
30
}
31
32
QStringList
InfixCompleter::splitPath
(
const
QString& path)
const
33
{
34
return
QStringList(
""
);
35
}
36
37
void
InfixCompleter::setCompletionInfix
(
const
QString& infix)
38
{
39
proxyModel
->setFilterFixedString(infix);
40
}
41
42
43
44
}
armarx::InfixCompleter::setCompletionList
void setCompletionList(const QStringList &completionList)
Definition:
InfixCompleter.cpp:22
InfixFilterModel.h
armarx::InfixCompleter::completionModel
QStringListModel * completionModel
Definition:
InfixCompleter.h:29
armarx::InfixCompleter::splitPath
QStringList splitPath(const QString &path) const override
Definition:
InfixCompleter.cpp:32
InfixCompleter.h
armarx::InfixCompleter::getProxyModel
InfixFilterModel * getProxyModel() const
Definition:
InfixCompleter.cpp:27
armarx::InfixCompleter::InfixCompleter
InfixCompleter(const QStringList &completionList, QObject *parent=0)
Definition:
InfixCompleter.cpp:10
armarx::InfixFilterModel
This proxy model reimplements the filterAcceptsRow function with a new behavior: All elements that fi...
Definition:
InfixFilterModel.h:41
armarx::InfixCompleter::setCompletionInfix
void setCompletionInfix(const QString &infix)
Definition:
InfixCompleter.cpp:37
armarx::InfixCompleter::proxyModel
InfixFilterModel * proxyModel
Definition:
InfixCompleter.h:28
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:28
ArmarXGui
libraries
ArmarXGuiBase
widgets
InfixCompleter.cpp
Generated on Sat Oct 12 2024 09:14:03 for armarx_documentation by
1.8.17