HEADERS += QtxDialog.h
HEADERS += QtxDockAction.h
HEADERS += QtxDockWidget.h
+HEADERS += QtxLogoMgr.h
HEADERS += QtxMainWindow.h
HEADERS += QtxMap.h
HEADERS += QtxMRUAction.h
#HEADERS += QtxListOfOperations.h
#HEADERS += QtxListResourceEdit.h
#HEADERS += QtxListView.h
-#HEADERS += QtxLogoMgr.h
#HEADERS += QtxMenuButton.h
#HEADERS += QtxOperations.h
#HEADERS += QtxParser.h
SOURCES += QtxDialog.cxx
SOURCES += QtxDockAction.cxx
SOURCES += QtxDockWidget.cxx
+SOURCES += QtxLogoMgr.cxx
SOURCES += QtxMainWindow.cxx
SOURCES += QtxMRUAction.cxx
SOURCES += QtxResourceMgr.cxx
#SOURCES += QtxListOfOperations.cxx
#SOURCES += QtxListResourceEdit.cxx
#SOURCES += QtxListView.cxx
-#SOURCES += QtxLogoMgr.cxx
#SOURCES += QtxMenuButton.cxx
#SOURCES += QtxOperations.cxx
#SOURCES += QtxParser.cxx
#include <QLabel>
#include <QImage>
#include <QBitmap>
-#include <QLayout>
+#include <QHBoxLayout>
#include <QMenuBar>
#include <QPointer>
#include <QApplication>
+#include <QMovie>
/*!
- class: LogoBox [internal]
+ \class LogoBox
+ \internal
+ \brief Logo images container.
*/
class QtxLogoMgr::LogoBox : public QWidget
typedef QPointer<QWidget> WidgetPtr;
private:
- QMenuBar* myMB;
- QList<QLabel*> myLabels;
- WidgetPtr myCornWid;
+ QMenuBar* myMB; //!< parent menu bar
+ QList<QLabel*> myLabels; //!< list of labels containing logo images
+ WidgetPtr myCornWid; //!< corner widget
};
+/*!
+ \brief Constructor.
+ \param mb menu bar
+*/
QtxLogoMgr::LogoBox::LogoBox( QMenuBar* mb )
: QWidget( mb ),
-myMB( mb ),
-myCornWid( 0 )
+ myMB( mb ),
+ myCornWid( 0 )
{
myMB->installEventFilter( this );
updateCorner();
}
+/*!
+ \brief Get menu bar.
+ \return menu bar
+*/
QMenuBar* QtxLogoMgr::LogoBox::menuBar() const
{
return myMB;
}
+/*!
+ \brief Custom event filter.
+ \param o event receiver object
+ \param e event sent to object
+ \return \c true if further event processing should be stopped
+*/
bool QtxLogoMgr::LogoBox::eventFilter( QObject* o, QEvent* e )
{
if ( o != menuBar() )
return false;
}
+/*!
+ \brief Set label widgets (logo containers).
+ \param labs list of labels
+*/
void QtxLogoMgr::LogoBox::setLabels( const QList<QLabel*>& labs )
{
for ( QList<QLabel*>::iterator it = myLabels.begin(); it != myLabels.end(); ++it )
updateContents();
}
-void QtxLogoMgr::LogoBox::customEvent( QEvent* )
+/*!
+ \brief Custom event processing (update logo widget).
+ \param e event (not used)
+*/
+void QtxLogoMgr::LogoBox::customEvent( QEvent* /*e*/ )
{
updateCorner();
}
+/*!
+ \brief Update menu bar's corner widget.
+*/
void QtxLogoMgr::LogoBox::updateCorner()
{
if ( menuBar()->cornerWidget() == this )
updateContents();
}
+/*!
+ \brief Update logo manager contents.
+*/
void QtxLogoMgr::LogoBox::updateContents()
{
if ( layout() )
}
/*!
- class: QtxLogoMgr [public]
+ \class QtxLogoMgr
+ \brief Provides a way to install logo pictures to the application main window.
+
+ 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
*/
/*!
- Constructor
+ \brief Constructor.
+ \param mb parent menu bar
*/
QtxLogoMgr::QtxLogoMgr( QMenuBar* mb )
: QObject( mb )
}
/*!
- Destructor
+ \brief Destructor.
*/
QtxLogoMgr::~QtxLogoMgr()
{
}
/*!
- Returns the menubar.
+ \brief Get menu bar.
+ \return parent menu bar
*/
QMenuBar* QtxLogoMgr::menuBar() const
{
}
/*!
- Returns the count of the existed logos.
+ \brief Get number of logo images.
+ \return current number of logo images
*/
int QtxLogoMgr::count() const
{
}
/*!
- Insert new logo pixmap to the menu bar area
+ \brief Insert new logo pixmap to the menu bar area.
+ \param id unique string identifier of the logo
+ \param pix logo pixmap
+ \param index logo position (if < 0, logo is added to the end)
*/
void QtxLogoMgr::insert( const QString& id, const QPixmap& pix, const int index )
{
}
/*!
- Insert new logo movie to the menu bar area
+ \brief Insert new animated logo to the menu bar area.
+ \param id unique string identifier of the logo
+ \param pix logo movie
+ \param index logo position (if < 0, logo is added to the end)
*/
void QtxLogoMgr::insert( const QString& id, QMovie* movie, const int index )
{
}
/*!
- Insert new logo information structure into the logos list
+ \brief Insert new logo information structure into the logos list.
+ \param id unique string identifier of the logo
+ \param index logo position (if < 0, logo is added to the end)
+ \return logo information object
*/
QtxLogoMgr::LogoInfo& QtxLogoMgr::insert( const QString& id, const int index )
{
}
/*!
- Removes a logo
+ \brief Remove a logo.
+ \param id logo identifier
*/
void QtxLogoMgr::remove( const QString& id )
{
}
/*!
- Removes all logos
+ \brief Removes all logos.
*/
void QtxLogoMgr::clear()
{
}
/*!
- Start the animation for specified movie or for all movies if id is empty.
+ \brief Start the animation of movie logo.
+
+ If \a id is empty, all movie logos animation are started.
+
+ \param id logo identifier
*/
void QtxLogoMgr::startAnimation( const QString& id )
{
}
/*!
- Stop the animation for specified movie or for all movies if id is empty.
+ \brief Stop the animation of movie logo.
+
+ If \a id is empty, all movie logos animation are stopped.
+
+ \param id logo identifier
*/
void QtxLogoMgr::stopAnimation( const QString& id )
{
}
/*!
- Pause/Continue the animation for specified movie or for all movies if id is empty.
+ \brief Pause/resume the animation of movie logo.
+
+ If \a pause is \c true, the animation is paused; otherwise
+ it is resumed.
+
+ If \a id is empty, the operation is performed for all movis logos.
+
+ \param pause if \c true, pause animation, otherwise resume it
+ \param id logo identifier
*/
void QtxLogoMgr::pauseAnimation( const bool pause, const QString& id )
{
}
/*!
- Inserts logo to menu bar
+ \brief Regenerate logo manager widget contents.
+
+ Insert logo to menu bar if it not yet done, layout the widget.
*/
void QtxLogoMgr::generate()
{
}
/*!
- \return index of found logo
- \param id - logo id
+ \brief Search the logo by the specified \a id.
+ \param id logo identifier
+ \return index of logo or -1 if not found
*/
int QtxLogoMgr::find( const QString& id ) const
{
}
/*!
- \return list of movies according to specified id
- \param id - logo id
+ \brief Get movie logos by specified \a id.
+
+ If \a id is empty, all movie logos are returned.
+
+ \param id logo identifier
+ \param lst list of movies, which satisfy the \a id
*/
void QtxLogoMgr::movies( const QString& id, QList<QMovie*>& lst ) const
{