Version: 6.3.1
Data Structures | Public Member Functions | Private Types | Private Member Functions | Private Attributes

QtxLogoMgr Class Reference

Provides a way to install logo pictures to the application main window. More...

#include <QtxLogoMgr.h>

Inheritance diagram for QtxLogoMgr:
Inheritance graph

Data Structures

class  LogoBox
 Logo images container. More...
struct  LogoInfo

Public Member Functions

 QtxLogoMgr (QMenuBar *)
 Constructor.
virtual ~QtxLogoMgr ()
 Destructor.
int count () const
 Get number of logo images.
void insert (const QString &, QMovie *, const int=-1)
 Insert new animated logo to the menu bar area.
void insert (const QString &, const QPixmap &, const int=-1)
 Insert new logo pixmap to the menu bar area.
void remove (const QString &)
 Remove a logo.
void clear ()
 Removes all logos.
void startAnimation (const QString &=QString())
 Start the animation of movie logo.
void stopAnimation (const QString &=QString())
 Stop the animation of movie logo.
void pauseAnimation (const bool, const QString &=QString())
 Pause/resume the animation of movie logo.
QMenuBar * menuBar () const
 Get menu bar.

Private Types

typedef QList< LogoInfoLogoList

Private Member Functions

void generate ()
 Regenerate logo manager widget contents.
int find (const QString &) const
 Search the logo by the specified id.
LogoInfoinsert (const QString &, const int)
 Insert new logo information structure into the logos list.
void movies (const QString &, QList< QMovie * > &) const
 Get movie logos by specified id.

Private Attributes

LogoBoxmyBox
 widget containing logox
LogoList myLogos
 list of logo data

Detailed Description

The class includes the following functionality:


Member Typedef Documentation

typedef QList<LogoInfo> QtxLogoMgr.LogoList [private]

Constructor & Destructor Documentation

QtxLogoMgr::QtxLogoMgr ( QMenuBar *  mb)
Parameters:
mbparent menu bar

References myBox.

QtxLogoMgr::~QtxLogoMgr ( ) [virtual]

Member Function Documentation

int QtxLogoMgr::count ( ) const
Returns:
current number of logo images

References myLogos.

void QtxLogoMgr::insert ( const QString &  id,
QMovie *  movie,
const int  index = -1 
)
Parameters:
idunique string identifier of the logo
pixlogo movie
indexlogo position (if < 0, logo is added to the end)

References generate(), and QtxLogoMgr.LogoInfo.mov.

void QtxLogoMgr::insert ( const QString &  id,
const QPixmap &  pix,
const int  index = -1 
)
Parameters:
idunique string identifier of the logo
pixlogo pixmap
indexlogo position (if < 0, logo is added to the end)

References generate(), insert(), and QtxLogoMgr.LogoInfo.pix.

void QtxLogoMgr::remove ( const QString &  id)
Parameters:
idlogo identifier

References find(), generate(), and myLogos.

void QtxLogoMgr::clear ( )

References generate(), and myLogos.

void QtxLogoMgr::startAnimation ( const QString &  id = QString())

If id is empty, all movie logos animation are started.

Parameters:
idlogo identifier

References movies().

void QtxLogoMgr::stopAnimation ( const QString &  id = QString())

If id is empty, all movie logos animation are stopped.

Parameters:
idlogo identifier

References movies().

void QtxLogoMgr::pauseAnimation ( const bool  pause,
const QString &  id = QString() 
)

If pause is true, the animation is paused; otherwise it is resumed.

If id is empty, the operation is performed for all movis logos.

Parameters:
pauseif true, pause animation, otherwise resume it
idlogo identifier

References movies().

QMenuBar * QtxLogoMgr::menuBar ( ) const
Returns:
parent menu bar

References QtxLogoMgr.LogoBox.menuBar(), and myBox.

void QtxLogoMgr::generate ( ) [private]

Insert logo to menu bar if it not yet done, layout the widget.

References menuBar(), myBox, myLogos, and QtxLogoMgr.LogoBox.setLabels().

int QtxLogoMgr::find ( const QString &  id) const [private]
Parameters:
idlogo identifier
Returns:
index of logo or -1 if not found

References myLogos.

QtxLogoMgr::LogoInfo & QtxLogoMgr::insert ( const QString &  id,
const int  index 
) [private]
Parameters:
idunique string identifier of the logo
indexlogo position (if < 0, logo is added to the end)
Returns:
logo information object

References find(), QtxLogoMgr.LogoInfo.id, QtxLogoMgr.LogoInfo.mov, and myLogos.

void QtxLogoMgr::movies ( const QString &  id,
QList< QMovie * > &  lst 
) const [private]

If id is empty, all movie logos are returned.

Parameters:
idlogo identifier
lstlist of movies, which satisfy the id

References myLogos.


Field Documentation

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS