Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

Classes

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

Public Member Functions

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

Private Types

typedef QList< LogoInfoLogoList
 

Private Member Functions

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

Private Attributes

LogoBoxmyBox
 widget containing logox More...
 
LogoList myLogos
 list of logo data More...
 

Detailed Description

The class includes the following functionality:

  • add the logo image
  • remove logo image
  • support static images and animated images (QMovie)
  • start/stop and pause/resume the animated logos

Member Typedef Documentation

Constructor & Destructor Documentation

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

References myBox.

QtxLogoMgr::~QtxLogoMgr ( )
virtual

Member Function Documentation

void QtxLogoMgr::clear ( )

References generate(), and myLogos.

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

References myLogos.

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

References myLogos.

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().

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.

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.

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

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

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.

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().

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

References find(), 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().

Member Data Documentation

LogoBox* QtxLogoMgr::myBox
private
LogoList QtxLogoMgr::myLogos
private

The documentation for this class was generated from the following files: