Back to index

salome-gui  6.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
QtxPreferenceItem::Updater Class Reference

Preference item updater. More...

Inheritance diagram for QtxPreferenceItem::Updater:
Inheritance graph
[legend]
Collaboration diagram for QtxPreferenceItem::Updater:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ~Updater ()
 Destructor.
void updateItem (QtxPreferenceItem *)
 Update the preference item.
void removeItem (QtxPreferenceItem *)
 Called when preference item is removed.

Static Public Member Functions

static Updaterinstance ()
 Get the only updater instance.

Protected Member Functions

virtual void customEvent (QEvent *)
 Custom events provessing.

Private Member Functions

 Updater ()
 Constructor.

Private Attributes

QList< QtxPreferenceItem * > myItems

Static Private Attributes

static Updater_Updater = 0

Detailed Description

Preference item updater.

Definition at line 36 of file QtxPreferenceMgr.cxx.


Constructor & Destructor Documentation

Constructor.

Definition at line 61 of file QtxPreferenceMgr.cxx.

{
}

Destructor.

Definition at line 69 of file QtxPreferenceMgr.cxx.

{
}

Member Function Documentation

void QtxPreferenceItem::Updater::customEvent ( QEvent *  ) [protected, virtual]

Custom events provessing.

Updates all the items.

Parameters:
ecustom event (not used)

Definition at line 114 of file QtxPreferenceMgr.cxx.

{
  QList<QtxPreferenceItem*> lst = myItems;
  for ( QList<QtxPreferenceItem*>::const_iterator it = lst.begin(); it != lst.end(); ++it )
    (*it)->updateContents();
}

Get the only updater instance.

Returns:
the only updater instance

Definition at line 78 of file QtxPreferenceMgr.cxx.

{
  if ( !_Updater )
    _Updater = new Updater();
  return _Updater;
}

Called when preference item is removed.

Parameters:
itempreference item being removed

Definition at line 104 of file QtxPreferenceMgr.cxx.

{
  myItems.removeAll( item );
}

Update the preference item.

Parameters:
itempreference item to be updated

Definition at line 90 of file QtxPreferenceMgr.cxx.

{
  if ( !item || myItems.contains( item ) )
    return;

  myItems.append( item );
  QApplication::postEvent( this, new QEvent( QEvent::User ) );
}

Member Data Documentation

Definition at line 52 of file QtxPreferenceMgr.cxx.

Definition at line 51 of file QtxPreferenceMgr.cxx.


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