MCPcopy Create free account
hub / github.com/KDE/krusader / createButton

Method createButton

app/Synchronizer/synchronizergui.cpp:1551–1574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1549}
1550
1551QPushButton *SynchronizerGUI::createButton(QWidget *parent,
1552 const QString &iconName,
1553 bool checked,
1554 const QKeySequence &shortCut,
1555 const QString &description,
1556 const QString &text,
1557 bool textAndIcon)
1558{
1559 auto *button = new QPushButton(parent);
1560 bool iconExists = Icon::exists(iconName);
1561 if (!text.isEmpty() && (textAndIcon || !iconExists)) {
1562 button->setText(text);
1563 }
1564 if (iconExists) {
1565 button->setIcon(Icon(iconName));
1566 }
1567 button->setCheckable(true);
1568 button->setChecked(checked);
1569 button->setShortcut(shortCut);
1570 const QString infoText = QString("%1 (%2)").arg(description, shortCut.toString(QKeySequence::NativeText));
1571 button->setWhatsThis(infoText);
1572 button->setToolTip(infoText);
1573 return button;
1574}
1575
1576void SynchronizerGUI::copyToClipboard(bool isLeft)
1577{

Callers

nothing calls this directly

Calls 5

IconClass · 0.85
isEmptyMethod · 0.80
setIconMethod · 0.80
QStringClass · 0.50
setTextMethod · 0.45

Tested by

no test coverage detected