Salome HOME
PAL10125 - by double click on reference original object becomes selected
[modules/gui.git] / src / SUIT / SUIT_ViewWindow.cxx
index 7886b415bfbb19adff3cec5d40e9d812be3d9d6f..e05fad7a52f290028ba125cbb5fde3028b159e15 100755 (executable)
 #include "qpopupmenu.h"
 #include "qapplication.h"
 
-// Dump view custom event
-const int DUMP_EVENT = QEvent::User + 123;
+/*!\class SUIT_ViewWindow
+ * Class provide view window.
+ */
 
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
+/*! Dump view custom event*/
+const int DUMP_EVENT = QEvent::User + 123;
 
+/*! Constructor.*/
 SUIT_ViewWindow::SUIT_ViewWindow(SUIT_Desktop* theDesktop)
 : QMainWindow( theDesktop, "SUIT_ViewWindow", Qt::WDestructiveClose )
 {
   myDesktop = theDesktop;
 }
 
+/*! Destructor.*/
 SUIT_ViewWindow::~SUIT_ViewWindow()
 {
 }
 
-//***************************************************************
+/*! Close event \a theEvent.
+*/
 void SUIT_ViewWindow::closeEvent(QCloseEvent* theEvent)
 {
   QMainWindow::closeEvent( theEvent );
   emit closing( this );
 }
 
-//****************************************************************
+/*! Context menu requested for event \a e.
+*/
 void SUIT_ViewWindow::contextMenuEvent ( QContextMenuEvent * e )
 {
   if ( e->reason() != QContextMenuEvent::Mouse )
     emit contextMenuRequested( e );
 }
 
-//****************************************************************
+/*! Post events on dump view.
+*/
 void SUIT_ViewWindow::onDumpView()
 {
   qApp->postEvent( this, new QPaintEvent( QRect( 0, 0, width(), height() ), TRUE ) );
   qApp->postEvent( this, new QCustomEvent( DUMP_EVENT ) );
 }
 
-//****************************************************************
+/*! Reaction view window on event \a e.
+*/
 bool SUIT_ViewWindow::event( QEvent* e )
 {
   if ( e->type() == DUMP_EVENT ) {
@@ -83,4 +89,15 @@ bool SUIT_ViewWindow::event( QEvent* e )
   return QMainWindow::event( e );
 }
 
-//****************************************************************
+/*! Called by SUIT_Accel::onActivated() when a key accelerator was activated and this window was active
+*/
+void SUIT_ViewWindow::onAccelAction( int _action )
+{
+  action( _action );
+}
+
+/*! action  handle standard action (zoom, pan) or custom action.  to be redefined in successors.
+*/
+void SUIT_ViewWindow::action( const int  )
+{
+}