Version: 9.12.0
SalomeApp_ListViewItem Class Reference

#include <SalomeApp_ListView.h>

Inheritance diagram for SalomeApp_ListViewItem:
Inheritance graph

Public Member Functions

 SalomeApp_ListViewItem (SalomeApp_ListView *)
 
 SalomeApp_ListViewItem (SalomeApp_ListView *, SalomeApp_ListViewItem *)
 
 SalomeApp_ListViewItem (SalomeApp_ListView *, const QStringList &, const bool=false)
 
 SalomeApp_ListViewItem (SalomeApp_ListViewItem *, const QStringList &, const bool=false)
 
 SalomeApp_ListViewItem (SalomeApp_ListView *, SalomeApp_ListViewItem *, const QString &, const bool=false)
 
 SalomeApp_ListViewItem (SalomeApp_ListViewItem *, SalomeApp_ListViewItem *, const QString &, const bool=false)
 
 SalomeApp_ListViewItem (SalomeApp_ListView *, SalomeApp_ListViewItem *, const QString &theName, const QString &theValue, const bool=false)
 
 SalomeApp_ListViewItem (SalomeApp_ListViewItem *, SalomeApp_ListViewItem *, const QString &, const QString &, const bool=false)
 
 ~SalomeApp_ListViewItem ()
 
QString fullName ()
 
void openAllLevels ()
 
virtual void updateAllLevels ()
 
bool isEditable () const
 
void setEditable (bool theEditable)
 
bool isAccepted () const
 
void setAccepted (bool theAccepted)
 
virtual QString getName () const
 
virtual UpdateType setName (const QString &theName)
 
virtual QString getValue () const
 
virtual UpdateType setValue (const QString &theValue)
 
SalomeApp_EntityEditstartEditing ()
 
virtual void fillWidgetWithValues (SalomeApp_EntityEdit *theWidget)
 
virtual UpdateType finishEditing (SalomeApp_EntityEdit *theWidget)
 
virtual int getEditingType ()
 
virtual void setEditingType (const int)
 
virtual int getEditedColumn ()
 
virtual int getValueType ()
 
virtual void setValueType (const int)
 
virtual int getUserType ()
 
virtual void setUserType (const int)
 
virtual int getButtons ()
 
virtual void setButtons (const int)
 
QString tipText ()
 
QRect tipRect ()
 
QRect textRect (const int column) const
 
QRect itemRect (const int column) const
 

Protected Member Functions

void init ()
 
int depth () const
 

Private Attributes

bool myEditable
 
bool myAccepted
 
int myEditingType
 
int myValueType
 
int myButtons
 
int myUserType
 

Constructor & Destructor Documentation

◆ SalomeApp_ListViewItem() [1/8]

SalomeApp_ListViewItem::SalomeApp_ListViewItem ( SalomeApp_ListView parent)

Constructor

References init().

◆ SalomeApp_ListViewItem() [2/8]

SalomeApp_ListViewItem::SalomeApp_ListViewItem ( SalomeApp_ListView parent,
SalomeApp_ListViewItem after 
)

Constructor

References init().

◆ SalomeApp_ListViewItem() [3/8]

SalomeApp_ListViewItem::SalomeApp_ListViewItem ( SalomeApp_ListView parent,
const QStringList &  theStrings,
const bool  theEditable = false 
)

Constructor

References init(), and setEditable().

◆ SalomeApp_ListViewItem() [4/8]

SalomeApp_ListViewItem::SalomeApp_ListViewItem ( SalomeApp_ListViewItem parent,
const QStringList &  theString,
const bool  theEditable = false 
)

Constructor

References init(), and setEditable().

◆ SalomeApp_ListViewItem() [5/8]

SalomeApp_ListViewItem::SalomeApp_ListViewItem ( SalomeApp_ListView parent,
SalomeApp_ListViewItem after,
const QString &  theName,
const bool  theEditable = false 
)

Constructor

References init(), and setEditable().

◆ SalomeApp_ListViewItem() [6/8]

SalomeApp_ListViewItem::SalomeApp_ListViewItem ( SalomeApp_ListViewItem parent,
SalomeApp_ListViewItem after,
const QString &  theName,
const bool  theEditable = false 
)

Constructor

References init(), and setEditable().

◆ SalomeApp_ListViewItem() [7/8]

SalomeApp_ListViewItem::SalomeApp_ListViewItem ( SalomeApp_ListView parent,
SalomeApp_ListViewItem after,
const QString &  theName,
const QString &  theValue,
const bool  theEditable = false 
)

Constructor

References init(), and setEditable().

◆ SalomeApp_ListViewItem() [8/8]

SalomeApp_ListViewItem::SalomeApp_ListViewItem ( SalomeApp_ListViewItem parent,
SalomeApp_ListViewItem after,
const QString &  theName,
const QString &  theValue,
const bool  theEditable = false 
)

Constructor

References init(), and setEditable().

◆ ~SalomeApp_ListViewItem()

SalomeApp_ListViewItem::~SalomeApp_ListViewItem ( )

Destructor

Member Function Documentation

◆ depth()

int SalomeApp_ListViewItem::depth ( ) const
protected

Returns the depth of this item

◆ fillWidgetWithValues()

void SalomeApp_ListViewItem::fillWidgetWithValues ( SalomeApp_EntityEdit theWidget)
virtual

Fills widget with initial values (list or single value)

References getEditedColumn(), and SalomeApp_EntityEdit::insertItem().

◆ finishEditing()

UpdateType SalomeApp_ListViewItem::finishEditing ( SalomeApp_EntityEdit theWidget)
virtual

Finishes editing of entity

References getEditedColumn(), SalomeApp_EntityEdit::getText(), setName(), setValue(), and utCancel.

◆ fullName()

QString SalomeApp_ListViewItem::fullName ( )
Returns
full path to the entity from the root

References getName().

◆ getButtons()

int SalomeApp_ListViewItem::getButtons ( )
virtual
Returns
buttons for editing widget (Apply (V), Cancel (X)) default is both buttons

References myButtons.

◆ getEditedColumn()

int SalomeApp_ListViewItem::getEditedColumn ( )
virtual
Return values
editedcolumn, default is last column negative value means there are no editable columns

◆ getEditingType()

int SalomeApp_ListViewItem::getEditingType ( )
virtual
Return values
typeof edit control (default is edit box)
  • 0 - edit box
  • 1 - combo box
  • 2 - editable combo box

References myEditingType.

◆ getName()

QString SalomeApp_ListViewItem::getName ( ) const
virtual
Returns
text in the first column

◆ getUserType()

int SalomeApp_ListViewItem::getUserType ( )
virtual

Sets type of edited value

References myUserType.

◆ getValue()

QString SalomeApp_ListViewItem::getValue ( ) const
virtual
Returns
text in the second column

◆ getValueType()

int SalomeApp_ListViewItem::getValueType ( )
virtual
Return values
typeof edited value (string, int, double) default is string

References myValueType.

◆ init()

void SalomeApp_ListViewItem::init ( )
protected

◆ isAccepted()

bool SalomeApp_ListViewItem::isAccepted ( ) const
Returns
true if entitiy is accepted after editing

References myAccepted.

◆ isEditable()

bool SalomeApp_ListViewItem::isEditable ( ) const
Returns
true if entity is editable

References myEditable.

◆ itemRect()

QRect SalomeApp_ListViewItem::itemRect ( const int  column) const

Calculates rect of item data in viewport coordinates

References depth().

◆ openAllLevels()

void SalomeApp_ListViewItem::openAllLevels ( )

expands all entities beginning from this level

References openAllLevels().

◆ setAccepted()

void SalomeApp_ListViewItem::setAccepted ( bool  theAccepted)

Sets entitiy accepted or not after editing

References myAccepted.

◆ setButtons()

void SalomeApp_ListViewItem::setButtons ( const int  buttons)
virtual

Sets buttons for editing widget (Apply (V), Cancel (X))

References myButtons.

◆ setEditable()

void SalomeApp_ListViewItem::setEditable ( bool  theEditable)

Sets editable flag fo the entity

References myEditable.

◆ setEditingType()

void SalomeApp_ListViewItem::setEditingType ( const int  type)
virtual
Return values
typeof edit control (negative value means none)
  • 0 - edit box
  • 1 - combo box
  • 2 - editable combo box

References myEditingType.

◆ setName()

UpdateType SalomeApp_ListViewItem::setName ( const QString &  theName)
virtual

Sets text in the first column

References utCancel, and utNone.

◆ setUserType()

void SalomeApp_ListViewItem::setUserType ( const int  userType)
virtual

Sets type of edited value

References myUserType.

◆ setValue()

UpdateType SalomeApp_ListViewItem::setValue ( const QString &  theValue)
virtual

Sets text in the second column

References utCancel, and utNone.

◆ setValueType()

void SalomeApp_ListViewItem::setValueType ( const int  valueType)
virtual

Sets type of edited value

References myValueType.

◆ startEditing()

SalomeApp_EntityEdit * SalomeApp_ListViewItem::startEditing ( )

◆ textRect()

QRect SalomeApp_ListViewItem::textRect ( const int  column) const

Calculates rect of item text in viewport coordinates

References depth().

◆ tipRect()

QRect SalomeApp_ListViewItem::tipRect ( )

Calculates rectangle which should contain item's tip

References textRect(), and tipText().

◆ tipText()

QString SalomeApp_ListViewItem::tipText ( )
Returns
text for tooltip

References getName(), and getValue().

◆ updateAllLevels()

void SalomeApp_ListViewItem::updateAllLevels ( )
virtual

update all entites beginning from this level

References updateAllLevels().

Member Data Documentation

◆ myAccepted

bool SalomeApp_ListViewItem::myAccepted
private

◆ myButtons

int SalomeApp_ListViewItem::myButtons
private

◆ myEditable

bool SalomeApp_ListViewItem::myEditable
private

◆ myEditingType

int SalomeApp_ListViewItem::myEditingType
private

◆ myUserType

int SalomeApp_ListViewItem::myUserType
private

◆ myValueType

int SalomeApp_ListViewItem::myValueType
private

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