DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
src
object
SearchComboBox.cpp
Go to the documentation of this file.
1
// DUNE DAQ modification notice:
2
// This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
3
// Fork baseline commit: dbe-02-12-17 (2022-05-12).
4
// Renamed since fork: no.
5
7
#include <QKeyEvent>
9
#include "
dbe/SearchComboBox.hpp
"
10
11
dbe::SearchComboBox::SearchComboBox
( QWidget * parent )
12
: QComboBox ( parent ),
13
UserText
( QString (
""
) )
14
{
15
connect (
this
, SIGNAL ( currentIndexChanged (
const
QString & ) ),
this
,
16
SLOT (
ChangeToolTip
(
const
QString & ) ) );
17
}
18
19
void
dbe::SearchComboBox::focusInEvent
( QFocusEvent * Event )
20
{
21
UserText
= currentText();
22
QComboBox::focusInEvent ( Event );
23
}
24
25
void
dbe::SearchComboBox::keyPressEvent
( QKeyEvent * Event )
26
{
27
switch
( Event->key() )
28
{
29
case
Qt::Key_Return:
30
emit
ReturnPressed
();
31
return
;
32
33
default
:
34
break
;
35
}
36
37
QComboBox::keyPressEvent ( Event );
38
39
if
( currentText().compare (
UserText
) != 0 )
40
{
41
UserText
= currentText();
42
emit
TextModified
( currentText() );
43
}
44
}
45
46
void
dbe::SearchComboBox::ChangeToolTip
(
const
QString & Text )
47
{
48
setToolTip ( QString (
"Search mode: %1"
).arg ( Text ) );
49
}
SearchComboBox.hpp
dbe::SearchComboBox::ChangeToolTip
void ChangeToolTip(const QString &Text)
Definition
SearchComboBox.cpp:46
dbe::SearchComboBox::SearchComboBox
SearchComboBox(QWidget *parent=0)
Including QT Headers.
Definition
SearchComboBox.cpp:11
dbe::SearchComboBox::UserText
QString UserText
Definition
SearchComboBox.hpp:24
dbe::SearchComboBox::TextModified
void TextModified(const QString &)
dbe::SearchComboBox::ReturnPressed
void ReturnPressed()
dbe::SearchComboBox::keyPressEvent
void keyPressEvent(QKeyEvent *Event)
Definition
SearchComboBox.cpp:25
dbe::SearchComboBox::focusInEvent
void focusInEvent(QFocusEvent *Event)
Definition
SearchComboBox.cpp:19
Generated on
for DUNE-DAQ by
1.17.0