Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SalomeApp_EntityEdit Class Reference

#include <SalomeApp_ListView.h>

Inheritance diagram for SalomeApp_EntityEdit:
Inheritance graph

Public Types

enum  { etLineEdit, etComboBox, etComboEdit }
 
enum  { vtString, vtInteger, vtDouble }
 
enum  { atBottom, atTop, atBeforeCurrent, atAfterCurrent }
 
enum  { btApply = 0x0001, btCancel = 0x0002 }
 

Signals

void returnPressed ()
 
void escapePressed ()
 

Public Member Functions

 SalomeApp_EntityEdit (QWidget *parent, int controlType=etLineEdit, int valueType=vtString, bool butApply=false, bool butCancel=false)
 
 ~SalomeApp_EntityEdit ()
 
void finishEditing ()
 
void clear ()
 
QString getText ()
 
void setText (const QString &theText)
 
void insertItem (const QString &theValue, bool theSetCurrent=false, int theOrder=atBottom)
 
void insertList (const QStringList &theList, const int theCurrent=-1)
 
void insertItem (const int theValue, bool theSetCurrent=false)
 
void insertList (const TColStd_ListOfInteger &theList, const int theCurrent=-1)
 
void insertItem (const double theValue, bool theSetCurrent=false)
 
void insertList (const TColStd_ListOfReal &theList, const int theCurrent=-1)
 
QWidgetgetControl ()
 
void setFocus ()
 
void setValidator (const QValidator *)
 
void showButtons (bool show)
 
void setDuplicatesEnabled (bool enabled)
 

Protected Member Functions

void keyPressEvent (QKeyEvent *e)
 

Private Slots

void onComboActivated (const QString &)
 
void onTextChanged (const QString &)
 
void onApply ()
 
void onCancel ()
 

Private Attributes

SalomeApp_EditBoxmyEdit
 
SalomeApp_ComboBoxmyCombo
 
QToolButtonmyApplyBtn
 
QToolButtonmyCancelBtn
 
QString myString
 

Member Enumeration Documentation

anonymous enum
Enumerator
etLineEdit 
etComboBox 
etComboEdit 
anonymous enum
Enumerator
vtString 
vtInteger 
vtDouble 
anonymous enum
Enumerator
atBottom 
atTop 
atBeforeCurrent 
atAfterCurrent 
anonymous enum
Enumerator
btApply 
btCancel 

Constructor & Destructor Documentation

SalomeApp_EntityEdit::~SalomeApp_EntityEdit ( )

Destructor

Member Function Documentation

void SalomeApp_EntityEdit::clear ( )

Clears edit/combo box

References myCombo, and myEdit.

void SalomeApp_EntityEdit::escapePressed ( )
signal
void SalomeApp_EntityEdit::finishEditing ( )
QWidget * SalomeApp_EntityEdit::getControl ( )
Returns
actual widget

References myCombo, and myEdit.

QString SalomeApp_EntityEdit::getText ( )
Returns
current text in edit box or combo box

References myCombo, and myEdit.

void SalomeApp_EntityEdit::insertItem ( const QString &  theValue,
bool  theSetCurrent = false,
int  theOrder = atBottom 
)

Adds item in combo box, sets it current if theSetCurrent is true

References atAfterCurrent, atBeforeCurrent, atTop, SalomeApp_ComboBox::insertItem(), myCombo, and setText().

void SalomeApp_EntityEdit::insertItem ( const int  theValue,
bool  theSetCurrent = false 
)

Adds item in combo box, sets it current if theSetCurrent is true

References SalomeApp_ComboBox::insertItem(), myCombo, and setText().

void SalomeApp_EntityEdit::insertItem ( const double  theValue,
bool  theSetCurrent = false 
)

Adds item in combo box, sets it current if theSetCurrent is true

References SalomeApp_ComboBox::insertItem(), myCombo, and setText().

void SalomeApp_EntityEdit::insertList ( const QStringList &  theList,
const int  theCurrent = -1 
)

Adds items in combo box, sets item theCurrent as current

References SalomeApp_ComboBox::insertList(), myCombo, and setText().

void SalomeApp_EntityEdit::insertList ( const TColStd_ListOfInteger &  theList,
const int  theCurrent = -1 
)

Adds items in combo box, sets item theCurrent as current

References SalomeApp_ComboBox::insertList(), myCombo, and setText().

void SalomeApp_EntityEdit::insertList ( const TColStd_ListOfReal &  theList,
const int  theCurrent = -1 
)

Adds items in combo box, sets item theCurrent as current

References SalomeApp_ComboBox::insertList(), myCombo, and setText().

void SalomeApp_EntityEdit::keyPressEvent ( QKeyEvent *  e)
protected

Event filter for KeyPress event

References onApply(), and onCancel().

void SalomeApp_EntityEdit::onApply ( )
privateslot

Slot, called when user presses Apply button

References getText(), myApplyBtn, myCancelBtn, myString, and returnPressed().

void SalomeApp_EntityEdit::onCancel ( )
privateslot

Slot, called when user presses Cancel button

References escapePressed(), myApplyBtn, myCancelBtn, myString, and setText().

void SalomeApp_EntityEdit::onComboActivated ( const QString &  theText)
privateslot

Called when item activated in combo box

References onTextChanged().

void SalomeApp_EntityEdit::onTextChanged ( const QString &  theText)
privateslot

Slot, called when text changed in line edit

References myApplyBtn, myCancelBtn, and myString.

void SalomeApp_EntityEdit::returnPressed ( )
signal
void SalomeApp_EntityEdit::setDuplicatesEnabled ( bool  enabled)

Enables/disables data duplication (for combo box)

References myCombo.

void SalomeApp_EntityEdit::setFocus ( )

redirect focus to corresponding widget

References myCombo, and myEdit.

void SalomeApp_EntityEdit::setText ( const QString &  theText)
void SalomeApp_EntityEdit::setValidator ( const QValidator theValidator)

Sets validator for the control

References myCombo, and myEdit.

void SalomeApp_EntityEdit::showButtons ( bool  show)

Shows/hides buttons

References myApplyBtn, and myCancelBtn.

Member Data Documentation

QToolButton* SalomeApp_EntityEdit::myApplyBtn
private
QToolButton* SalomeApp_EntityEdit::myCancelBtn
private
SalomeApp_ComboBox* SalomeApp_EntityEdit::myCombo
private
SalomeApp_EditBox* SalomeApp_EntityEdit::myEdit
private
QString SalomeApp_EntityEdit::myString
private

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