@ -312,6 +312,7 @@ void UBBoardController::setupToolbar()
UBToolbarButtonGroup *colorChoice =
new UBToolbarButtonGroup(mMainWindow->boardToolBar, colorActions);
colorChoice->setLabel(tr("Color"));
mMainWindow->boardToolBar->insertWidget(mMainWindow->actionBackgrounds, colorChoice);
@ -102,6 +102,11 @@ UBToolbarButtonGroup::~UBToolbarButtonGroup()
// NOOP
}
void UBToolbarButtonGroup::setLabel(const QString& label)
{
mLabel = label;
void UBToolbarButtonGroup::setIcon(const QIcon &icon, int index)
Q_ASSERT(index < mActions.size());
@ -48,6 +48,7 @@ class UBToolbarButtonGroup : public QWidget
void setIcon(const QIcon &icon, int index);
void setColor(const QColor &color, int index);
int currentIndex() const;
void setLabel(const QString& label);
protected:
void paintEvent(QPaintEvent *);