From 197d6ad51c19242c3a0dbc21429505c16c9a828f Mon Sep 17 00:00:00 2001 From: stv Date: Fri, 18 May 2007 05:58:57 +0000 Subject: [PATCH] *** empty log message *** --- src/SUIT/SUIT_Desktop.cxx | 45 ++++++++++++++++++++++++++++----------- src/SUIT/SUIT_Desktop.h | 19 ++++++++++------- 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/src/SUIT/SUIT_Desktop.cxx b/src/SUIT/SUIT_Desktop.cxx index 192dc602b..e16680033 100755 --- a/src/SUIT/SUIT_Desktop.cxx +++ b/src/SUIT/SUIT_Desktop.cxx @@ -18,15 +18,14 @@ // #include "SUIT_Desktop.h" -#include "SUIT_Tools.h" #include "SUIT_ViewWindow.h" -//#include +#include #include #include -#include -#include +#include +#include /*!\class SUIT_Desktop * Provide desktop management:\n @@ -54,7 +53,7 @@ SUIT_Desktop::SUIT_Desktop() { myMenuMgr = new QtxActionMenuMgr( this ); myToolMgr = new QtxActionToolMgr( this ); - myLogoMgr = 0;//new QtxLogoMgr( menuBar() ); + myLogoMgr = new QtxLogoMgr( menuBar() ); } /*! @@ -80,6 +79,8 @@ bool SUIT_Desktop::event( QEvent* e ) case QEvent::WindowDeactivate: emit deactivated(); break; + default: + break; } return QMainWindow::event( e ); @@ -107,7 +108,7 @@ void SUIT_Desktop::childEvent( QChildEvent* e ) void SUIT_Desktop::customEvent( QEvent* e ) { - if ( e->type() != Reparent ) + if ( (int)e->type() != Reparent ) return; QChildEvent* re = (QChildEvent*)e; @@ -138,18 +139,34 @@ QtxActionToolMgr* SUIT_Desktop::toolMgr() const return myToolMgr; } +/*! + Gets logo manager. +*/ +QtxLogoMgr* SUIT_Desktop::logoMgr() const +{ + return myLogoMgr; +} + /*! Returns the count of the existed logos. */ int SUIT_Desktop::logoCount() const { return 0; -/* + if ( !myLogoMgr ) return 0; else return myLogoMgr->count(); +} + +/*! + Adds new logo to the menu bar area */ +void SUIT_Desktop::logoInsert( const QString& logoID, QMovie* logo, const int idx ) +{ + if ( myLogoMgr ) + myLogoMgr->insert( logoID, logo, idx ); } /*! @@ -157,10 +174,8 @@ int SUIT_Desktop::logoCount() const */ void SUIT_Desktop::logoInsert( const QString& logoID, const QPixmap& logo, const int idx ) { -/* if ( myLogoMgr ) myLogoMgr->insert( logoID, logo, idx ); -*/ } /*! @@ -168,10 +183,8 @@ void SUIT_Desktop::logoInsert( const QString& logoID, const QPixmap& logo, const */ void SUIT_Desktop::logoRemove( const QString& logoID ) { -/* if ( myLogoMgr ) myLogoMgr->remove( logoID ); -*/ } /*! @@ -179,10 +192,8 @@ void SUIT_Desktop::logoRemove( const QString& logoID ) */ void SUIT_Desktop::logoClear() { -/* if ( myLogoMgr ) myLogoMgr->clear(); -*/ } /*! @@ -192,3 +203,11 @@ void SUIT_Desktop::emitActivated() { emit activated(); } + +/*! + Emits message signal +*/ +void SUIT_Desktop::emitMessage( const QString& theMessage ) +{ + emit message( theMessage ); +} diff --git a/src/SUIT/SUIT_Desktop.h b/src/SUIT/SUIT_Desktop.h index 83ef0f2e7..c38c38128 100755 --- a/src/SUIT/SUIT_Desktop.h +++ b/src/SUIT/SUIT_Desktop.h @@ -21,20 +21,19 @@ #include "SUIT.h" -#include -#include - -#include -#include +#include +#include #include -class QPopupMenu; +class QMovie; + class QtxLogoMgr; -class SUIT_ViewWindow; class QtxActionMenuMgr; class QtxActionToolMgr; +class SUIT_ViewWindow; + /*! \class SUIT_Desktop Provides standard desktop: main window with @@ -54,6 +53,7 @@ public: QtxActionMenuMgr* menuMgr() const; QtxActionToolMgr* toolMgr() const; + QtxLogoMgr* logoMgr() const; virtual SUIT_ViewWindow* activeWindow() const = 0; virtual QList windows() const = 0; @@ -62,15 +62,18 @@ public: void logoClear(); void logoRemove( const QString& ); + void logoInsert( const QString&, QMovie*, const int = -1 ); void logoInsert( const QString&, const QPixmap&, const int = -1 ); void emitActivated(); + void emitMessage( const QString& ); -Q_SIGNALS: +signals: void activated(); void deactivated(); void windowActivated( SUIT_ViewWindow* ); void closing( SUIT_Desktop*, QCloseEvent* ); + void message( const QString& ); protected: virtual bool event( QEvent* ); -- 2.39.2