X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUIT%2FSUIT_Desktop.h;h=7df13bc2389e65d42abcc947d6f425aab5f4f95b;hb=af07426a4bcf27234daf56881653080f64c4936e;hp=9cc13b94a01dd3f043ac6e14e06c8ea494499e2f;hpb=2e750f9ded92337bc3c44e9d7388180974cc4a43;p=modules%2Fgui.git diff --git a/src/SUIT/SUIT_Desktop.h b/src/SUIT/SUIT_Desktop.h index 9cc13b94a..7df13bc23 100755 --- a/src/SUIT/SUIT_Desktop.h +++ b/src/SUIT/SUIT_Desktop.h @@ -1,45 +1,96 @@ +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef SUIT_DESKTOP_H #define SUIT_DESKTOP_H #include "SUIT.h" +#include +#include + #include -class QPopupMenu; -class SUIT_ViewWindow; +class QMovie; + +class QtxLogoMgr; class QtxActionMenuMgr; class QtxActionToolMgr; +class SUIT_ViewWindow; + +/*! + \class SUIT_Desktop + Provides standard desktop: main window with + main menu manager, toolbars manager and logo. +*/ class SUIT_EXPORT SUIT_Desktop : public QtxMainWindow { Q_OBJECT + class ReparentEvent; + + enum { Reparent = QEvent::User }; + public: SUIT_Desktop(); virtual ~SUIT_Desktop(); QtxActionMenuMgr* menuMgr() const; QtxActionToolMgr* toolMgr() const; + QtxLogoMgr* logoMgr() const; virtual SUIT_ViewWindow* activeWindow() const = 0; - virtual QPtrList windows() const = 0; + virtual QList windows() const = 0; + + int logoCount() const; + + 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& ); signals: void activated(); void deactivated(); void windowActivated( SUIT_ViewWindow* ); void closing( SUIT_Desktop*, QCloseEvent* ); + void message( const QString& ); protected: virtual bool event( QEvent* ); + virtual void customEvent( QEvent* ); virtual void closeEvent( QCloseEvent* ); virtual void childEvent( QChildEvent* ); - virtual QWidget* parentArea() const = 0; + virtual void addWindow( QWidget* ) = 0; private: QtxActionMenuMgr* myMenuMgr; QtxActionToolMgr* myToolMgr; + QtxLogoMgr* myLogoMgr; }; #endif