COPASI API  4.16.103
Functions
CQPlayerControlWidget.cpp File Reference
#include "CQPlayerControlWidget.h"
#include <QtGui/QAction>
#include <QtGui/QGridLayout>
#include <QtGui/QIcon>
#include <QtGui/QLayout>
#include <QtGui/QPixmap>
#include <QtGui/QPushButton>
#include <resourcesUI/CQIconResource.h>
Include dependency graph for CQPlayerControlWidget.cpp:

Go to the source code of this file.

Functions

QPushButton * createControl (const CQIconResource::IconID &iconId, int size=32)
 

Function Documentation

QPushButton* createControl ( const CQIconResource::IconID iconId,
int  size = 32 
)

Definition at line 22 of file CQPlayerControlWidget.cpp.

References CQIconResource::icon().

Referenced by CQPlayerControlWidget::CQPlayerControlWidget().

23 {
24  QPushButton* button = new QPushButton;
25  button->setFlat(true);
26  button->setMinimumSize(size, size);
27  button->setMaximumSize(size, size);
28  button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
29  QIcon icon(CQIconResource::icon(iconId));
30  button->setIcon(icon);
31  button->setIconSize(QSize(size, size));
32  return button;
33 }
static const QIcon & icon(const IconID &id)