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 15 of file SearchComboBox.hpp.

Constructor & Destructor Documentation

◆ SearchComboBox()

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

Including QT Headers.

Including DBE

Definition at line 11 of file SearchComboBox.cpp.

12 : QComboBox ( parent ),
13 UserText ( QString ( "" ) )
14{
15 connect ( this, SIGNAL ( currentIndexChanged ( const QString & ) ), this,
16 SLOT ( ChangeToolTip ( const QString & ) ) );
17}
void ChangeToolTip(const QString &Text)

Member Function Documentation

◆ ChangeToolTip

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

Definition at line 46 of file SearchComboBox.cpp.

47{
48 setToolTip ( QString ( "Search mode: %1" ).arg ( Text ) );
49}

◆ focusInEvent()

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

Definition at line 19 of file SearchComboBox.cpp.

20{
21 UserText = currentText();
22 QComboBox::focusInEvent ( Event );
23}

◆ keyPressEvent()

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

Definition at line 25 of file SearchComboBox.cpp.

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}
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 24 of file SearchComboBox.hpp.


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