| 388 | } |
| 389 | |
| 390 | void MainWindow::createColorButton(SARibbonPanel* panel, const QString& tokenName, |
| 391 | const QString& displayName, const QColor& defaultColor, |
| 392 | bool isLarge) |
| 393 | { |
| 394 | SARibbonColorToolButton* btn = new SARibbonColorToolButton(panel); |
| 395 | btn->setColor(defaultColor); |
| 396 | btn->setColorStyle(SARibbonColorToolButton::ColorFillToIcon); |
| 397 | btn->setToolTip(tokenName); |
| 398 | if (isLarge) { |
| 399 | btn->setButtonType(SARibbonToolButton::LargeButton); |
| 400 | btn->setText(displayName); |
| 401 | panel->addLargeWidget(btn); |
| 402 | } else { |
| 403 | btn->setText(displayName); |
| 404 | panel->addSmallWidget(btn); |
| 405 | } |
| 406 | btn->setupStandardColorMenu(); |
| 407 | m_colorButtons.insert(tokenName, btn); |
| 408 | } |
| 409 | |
| 410 | void MainWindow::populateGallery(SARibbonGallery* gallery) |
| 411 | { |
nothing calls this directly
no test coverage detected