DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dbe::SearchComboBox Class Reference

#include <SearchComboBox.hpp>

Inheritance diagram for dbe::SearchComboBox:
[legend]
Collaboration diagram for dbe::SearchComboBox:
[legend]

Signals

void ReturnPressed ()
 
void TextModified (const QString &)
 

Public Member Functions

 SearchComboBox (QWidget *parent=0)
 Including QT Headers.
 

Protected Member Functions

void focusInEvent (QFocusEvent *Event)
 
void keyPressEvent (QKeyEvent *Event)
 

Private Slots

void ChangeToolTip (const QString &Text)
 

Private Attributes

QString UserText
 

Detailed Description

Definition at line 10 of file SearchComboBox.hpp.

Constructor & Destructor Documentation

◆ SearchComboBox()

dbe::SearchComboBox::SearchComboBox ( QWidget * parent = 0)
explicit

Including QT Headers.

Including DBE

Definition at line 6 of file SearchComboBox.cpp.

7 : QComboBox ( parent ),
8 UserText ( QString ( "" ) )
9{
10 connect ( this, SIGNAL ( currentIndexChanged ( const QString & ) ), this,
11 SLOT ( ChangeToolTip ( const QString & ) ) );
12}
void ChangeToolTip(const QString &Text)

Member Function Documentation

◆ ChangeToolTip

void dbe::SearchComboBox::ChangeToolTip ( const QString & Text)
privateslot

Definition at line 41 of file SearchComboBox.cpp.

42{
43 setToolTip ( QString ( "Search mode: %1" ).arg ( Text ) );
44}

◆ focusInEvent()

void dbe::SearchComboBox::focusInEvent ( QFocusEvent * Event)
protected

Definition at line 14 of file SearchComboBox.cpp.

15{
16 UserText = currentText();
17 QComboBox::focusInEvent ( Event );
18}

◆ keyPressEvent()

void dbe::SearchComboBox::keyPressEvent ( QKeyEvent * Event)
protected

Definition at line 20 of file SearchComboBox.cpp.

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}
void TextModified(const QString &)

◆ ReturnPressed

void dbe::SearchComboBox::ReturnPressed ( )
signal

◆ TextModified

void dbe::SearchComboBox::TextModified ( const QString & )
signal

Member Data Documentation

◆ UserText

QString dbe::SearchComboBox::UserText
private

Definition at line 19 of file SearchComboBox.hpp.


The documentation for this class was generated from the following files: