Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Slots | Public Member Functions | Private Attributes | List of all members
TYLineEdit Class Reference

#include <TYLineEdit.h>

Inheritance diagram for TYLineEdit:
Inheritance graph
[legend]
Collaboration diagram for TYLineEdit:
Collaboration graph
[legend]

Public Slots

void adjustTextColor ()
 

Public Member Functions

 TYLineEdit (const QString &contents, bool isZeroOK=true, bool canBeNegative=true, QWidget *parent=nullptr)
 
 TYLineEdit (const QString &contents, QWidget *parent=nullptr)
 
 TYLineEdit (QWidget *parent=nullptr)
 
void init ()
 
void keyPressEvent (QKeyEvent *evt)
 
void connect ()
 

Private Attributes

bool _isZeroOK = true
 
bool _canBeNegative = true
 

Detailed Description

Definition at line 32 of file TYLineEdit.h.

Constructor & Destructor Documentation

◆ TYLineEdit() [1/3]

TYLineEdit::TYLineEdit ( const QString &  contents,
bool  isZeroOK = true,
bool  canBeNegative = true,
QWidget *  parent = nullptr 
)

Constructor

Definition at line 38 of file TYLineEdit.cpp.

Here is the call graph for this function:

◆ TYLineEdit() [2/3]

TYLineEdit::TYLineEdit ( const QString &  contents,
QWidget *  parent = nullptr 
)

Constructor

Definition at line 28 of file TYLineEdit.cpp.

Here is the call graph for this function:

◆ TYLineEdit() [3/3]

TYLineEdit::TYLineEdit ( QWidget *  parent = nullptr)

Constructor

Definition at line 33 of file TYLineEdit.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ adjustTextColor

void TYLineEdit::adjustTextColor ( )
slot

If the text is not a double with at most 2 decimal numbers, it is colored red

Definition at line 85 of file TYLineEdit.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connect()

void TYLineEdit::connect ( )

Connect the signal'textChanged' with the slot 'adjustTextColor'

Definition at line 69 of file TYLineEdit.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

void TYLineEdit::init ( )

Initialize the widget

Definition at line 45 of file TYLineEdit.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ keyPressEvent()

void TYLineEdit::keyPressEvent ( QKeyEvent *  evt)

overload the QLineEdit method If the key pressed is a coma, replace it with a point

Definition at line 74 of file TYLineEdit.cpp.

Member Data Documentation

◆ _canBeNegative

bool TYLineEdit::_canBeNegative = true
private

Definition at line 75 of file TYLineEdit.h.

◆ _isZeroOK

bool TYLineEdit::_isZeroOK = true
private

Definition at line 74 of file TYLineEdit.h.


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