Back to index

salome-gui  6.5.0
Public Member Functions | Private Attributes
QtxMainWindow::Filter Class Reference

Internal object used to filter child removal events for specified widget from parent widget. More...

Inheritance diagram for QtxMainWindow::Filter:
Inheritance graph
Collaboration diagram for QtxMainWindow::Filter:
Collaboration graph

List of all members.

Public Member Functions

 Filter (QWidget *, QtxMainWindow *, QObject *=0)
virtual ~Filter ()
virtual bool eventFilter (QObject *, QEvent *)
 Event filter.

Private Attributes

QMainWindow * myMain
 parent main window
QWidget * myWidget
 widget being watched

Detailed Description

Internal object used to filter child removal events for specified widget from parent widget.

Definition at line 47 of file QtxMainWindow.cxx.

Constructor & Destructor Documentation

QtxMainWindow::Filter::Filter ( QWidget *  wid,
QtxMainWindow mw,
QObject parent = 0 


widwidget to be watched
mwparent main window
parentparent object (in terms of QObject)

Definition at line 66 of file QtxMainWindow.cxx.

: QObject( parent ),
  myMain( mw ),
  myWidget( wid )
  QApplication::instance()->installEventFilter( this );


Definition at line 77 of file QtxMainWindow.cxx.


Member Function Documentation

bool QtxMainWindow::Filter::eventFilter ( QObject o,
QEvent *  e 
) [virtual]

Event filter.

Watches for the specified widget and prevents its removal from the parent main window.

orecevier object

Definition at line 90 of file QtxMainWindow.cxx.

  if ( myMain == o && e->type() == QEvent::ChildRemoved &&
       myWidget == ((QChildEvent*)e)->child() )
    return true;

  return QObject::eventFilter( o, e );

Member Data Documentation

QMainWindow* QtxMainWindow::Filter::myMain [private]

parent main window

Definition at line 56 of file QtxMainWindow.cxx.

QWidget* QtxMainWindow::Filter::myWidget [private]

widget being watched

Definition at line 57 of file QtxMainWindow.cxx.

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