BibleTime
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
Functions
a
b
c
d
e
f
g
h
i
l
m
n
p
q
r
s
t
v
Variables
a
b
c
d
g
h
i
k
l
m
p
r
s
u
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
w
Properties
Related Symbols
Files
File List
File Members
All
a
b
c
e
f
h
i
j
k
l
m
o
p
r
s
t
u
w
Functions
b
c
f
i
j
l
m
o
p
r
t
Variables
Typedefs
Enumerations
Enumerator
Macros
a
b
c
i
l
m
r
s
t
u
w
src
frontend
searchdialog
chistorycombobox.cpp
Go to the documentation of this file.
1
/*********
2
*
3
* In the name of the Father, and of the Son, and of the Holy Spirit.
4
*
5
* This file is part of BibleTime's source code, https://bibletime.info/
6
*
7
* Copyright 1999-2025 by the BibleTime developers.
8
* The BibleTime source code is licensed under the GNU General Public License
9
* version 2.0.
10
*
11
**********/
12
13
#include "
chistorycombobox.h
"
14
15
#include <QCompleter>
16
#include <QString>
17
18
19
namespace
Search
{
20
21
CHistoryComboBox::CHistoryComboBox
(
QWidget
* parent)
22
:
QComboBox
(parent) {
23
setEditable(
true
);
24
completer()->setCompletionMode(QCompleter::PopupCompletion);
25
}
21
CHistoryComboBox::CHistoryComboBox
(
QWidget
* parent) {
…
}
26
27
CHistoryComboBox::~CHistoryComboBox
() {
28
}
27
CHistoryComboBox::~CHistoryComboBox
() {
…
}
29
30
void
CHistoryComboBox::addToHistory
(
const
QString& text) {
31
int
index = findText(text);
32
if
( index >= 0)
33
removeItem(index);
34
insertItem(1, text);
35
setCurrentIndex(1);
36
}
30
void
CHistoryComboBox::addToHistory
(
const
QString& text) {
…
}
37
38
QStringList
CHistoryComboBox::historyItems
()
const
{
39
QStringList items;
40
for
(
int
i = 0; i < count(); i++) {
41
QString text = itemText(i);
42
if
(text.size() > 0)
43
items << text;
44
}
45
return
items;
46
}
38
QStringList
CHistoryComboBox::historyItems
()
const
{
…
}
47
}
//end of namespace Search
48
chistorycombobox.h
QComboBox
QWidget
Search::CHistoryComboBox::CHistoryComboBox
CHistoryComboBox(QWidget *parent=nullptr)
Definition
chistorycombobox.cpp:21
Search::CHistoryComboBox::~CHistoryComboBox
~CHistoryComboBox() override
Definition
chistorycombobox.cpp:27
Search::CHistoryComboBox::historyItems
QStringList historyItems() const
Definition
chistorycombobox.cpp:38
Search::CHistoryComboBox::addToHistory
void addToHistory(const QString &item)
Definition
chistorycombobox.cpp:30
Search
Definition
bibletime.h:26
Generated by
1.9.8