DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
src
object
SearchComboBox.cpp
Go to the documentation of this file.
1
2
#include <QKeyEvent>
4
#include "
dbe/SearchComboBox.hpp
"
5
6
dbe::SearchComboBox::SearchComboBox
( QWidget * parent )
7
: QComboBox ( parent ),
8
UserText ( QString (
""
) )
9
{
10
connect (
this
, SIGNAL ( currentIndexChanged (
const
QString & ) ),
this
,
11
SLOT (
ChangeToolTip
(
const
QString & ) ) );
12
}
13
14
void
dbe::SearchComboBox::focusInEvent
( QFocusEvent * Event )
15
{
16
UserText = currentText();
17
QComboBox::focusInEvent ( Event );
18
}
19
20
void
dbe::SearchComboBox::keyPressEvent
( QKeyEvent * Event )
21
{
22
switch
( Event->key() )
23
{
24
case
Qt::Key_Return:
25
emit ReturnPressed();
26
return
;
27
28
default
:
29
break
;
30
}
31
32
QComboBox::keyPressEvent ( Event );
33
34
if
( currentText().compare ( UserText ) != 0 )
35
{
36
UserText = currentText();
37
emit TextModified ( currentText() );
38
}
39
}
40
41
void
dbe::SearchComboBox::ChangeToolTip
(
const
QString & Text )
42
{
43
setToolTip ( QString (
"Search mode: %1"
).arg ( Text ) );
44
}
SearchComboBox.hpp
dbe::SearchComboBox::ChangeToolTip
void ChangeToolTip(const QString &Text)
Definition
SearchComboBox.cpp:41
dbe::SearchComboBox::SearchComboBox
SearchComboBox(QWidget *parent=0)
Including QT Headers.
Definition
SearchComboBox.cpp:6
dbe::SearchComboBox::keyPressEvent
void keyPressEvent(QKeyEvent *Event)
Definition
SearchComboBox.cpp:20
dbe::SearchComboBox::focusInEvent
void focusInEvent(QFocusEvent *Event)
Definition
SearchComboBox.cpp:14
Generated on Sat Jun 28 2025 for DUNE-DAQ by
1.12.0