//
#include "SUIT_Desktop.h"
-#include "SUIT_Tools.h"
#include "SUIT_ViewWindow.h"
-//#include <QtxLogoMgr.h>
+#include <QtxLogoMgr.h>
#include <QtxActionMenuMgr.h>
#include <QtxActionToolMgr.h>
-#include <QtGui/qevent.h>
-#include <QtGui/qapplication.h>
+#include <QApplication>
+#include <QCloseEvent>
/*!\class SUIT_Desktop
* Provide desktop management:\n
{
myMenuMgr = new QtxActionMenuMgr( this );
myToolMgr = new QtxActionToolMgr( this );
- myLogoMgr = 0;//new QtxLogoMgr( menuBar() );
+ myLogoMgr = new QtxLogoMgr( menuBar() );
}
/*!
case QEvent::WindowDeactivate:
emit deactivated();
break;
+ default:
+ break;
}
return QMainWindow::event( e );
void SUIT_Desktop::customEvent( QEvent* e )
{
- if ( e->type() != Reparent )
+ if ( (int)e->type() != Reparent )
return;
QChildEvent* re = (QChildEvent*)e;
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 );
}
/*!
*/
void SUIT_Desktop::logoInsert( const QString& logoID, const QPixmap& logo, const int idx )
{
-/*
if ( myLogoMgr )
myLogoMgr->insert( logoID, logo, idx );
-*/
}
/*!
*/
void SUIT_Desktop::logoRemove( const QString& logoID )
{
-/*
if ( myLogoMgr )
myLogoMgr->remove( logoID );
-*/
}
/*!
*/
void SUIT_Desktop::logoClear()
{
-/*
if ( myLogoMgr )
myLogoMgr->clear();
-*/
}
/*!
{
emit activated();
}
+
+/*!
+ Emits message signal
+*/
+void SUIT_Desktop::emitMessage( const QString& theMessage )
+{
+ emit message( theMessage );
+}
#include "SUIT.h"
-#include <QtCore/qmap.h>
-#include <QtCore/qlist.h>
-
-#include <QtGui/qevent.h>
-#include <QtGui/qpixmap.h>
+#include <QList>
+#include <QEvent>
#include <QtxMainWindow.h>
-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
QtxActionMenuMgr* menuMgr() const;
QtxActionToolMgr* toolMgr() const;
+ QtxLogoMgr* logoMgr() const;
virtual SUIT_ViewWindow* activeWindow() const = 0;
virtual QList<SUIT_ViewWindow*> windows() const = 0;
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* );