qVTKObjectEventsObserver.h

Go to the documentation of this file.
00001 #ifndef __qVTKObjectEventsObserver_h
00002 #define __qVTKObjectEventsObserver_h
00003 
00005 #include <qCTKPimpl.h>
00006 
00008 #include <QObject>
00009 #include <QList>
00010 #include <QString>
00011 
00013 #include <vtkCommand.h>
00014 
00015 #include "qVTKWidgetsExport.h"
00016 
00017 class qVTKConnection;
00018 class vtkObject;
00019 class qVTKObjectEventsObserverPrivate;
00020 
00021 class QVTK_WIDGETS_EXPORT qVTKObjectEventsObserver : public QObject
00022 {
00023 Q_OBJECT
00024 
00025 public:
00026   typedef QObject Superclass;
00027   explicit qVTKObjectEventsObserver(QObject* parent = 0);
00028   virtual ~qVTKObjectEventsObserver(){}
00029 
00030   virtual void printAdditionalInfo();
00031 
00034   void setAllEnabled( bool enable );
00035   bool allEnabled()const;
00036 
00039   QString addConnection(vtkObject* vtk_obj, unsigned long vtk_event,
00040     const QObject* qt_obj, const char* qt_slot, float priority = 0.0);
00041 
00045   QString addConnection(vtkObject* old_vtk_obj, vtkObject* vtk_obj, unsigned long vtk_event,
00046     const QObject* qt_obj, const char* qt_slot, float priority = 0.0);
00047 
00051   QString reconnection(vtkObject* vtk_obj, unsigned long vtk_event,
00052                        const QObject* qt_obj, const char* qt_slot, 
00053                        float priority = 0.0);
00054 
00057   int removeConnection(vtkObject* vtk_obj, unsigned long vtk_event = vtkCommand::NoEvent,
00058                        const QObject* qt_obj = 0, const char* qt_slot = 0);
00059 
00062   inline int removeAllConnections();
00063 
00066   void blockAllConnections(bool block);
00067   
00070   int blockConnection(bool block, vtkObject* vtk_obj,
00071                       unsigned long vtk_event, const QObject* qt_obj);
00072   void blockConnection(const QString& id, bool blocked);
00073 
00074 private:
00075   QCTK_DECLARE_PRIVATE(qVTKObjectEventsObserver);
00076 
00077 };
00078 
00079 int qVTKObjectEventsObserver::removeAllConnections()
00080 {
00081   return this->removeConnection(0);
00082 }
00083 
00084 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1