16 #include <QFontMetrics>
18 #include <QHBoxLayout>
23 #include <QToolButton>
24 #include "../../backend/drivers/cswordmoduleinfo.h"
25 #include "../../util/btassert.h"
26 #include "../../util/btconnect.h"
27 #include "../../util/cresmgr.h"
36 QHBoxLayout* layout =
new QHBoxLayout(
this);
37 layout->setContentsMargins(0, 0, 0, 0);
38 layout->addStretch(1);
44 m_label =
new QLabel(QString(),
this);
45 m_label->setStyleSheet(QStringLiteral(
"QLabel{font-weight:bold}"));
49 m_button->setPopupMode( QToolButton::InstantPopup );
53 "QToolButton{margin:0px;}"
54 "QToolButton::menu-indicator{"
55 "subcontrol-position:center center"
57 m_button->setToolTip(tr(
"Add/remove/replace"));
62 CResMgr::displaywindows::general::icon_removeModule());
75 CResMgr::displaywindows::general::icon_replaceModule());
89 m_addMenu->setIcon(CResMgr::displaywindows::general::icon_addModule());
99 layout->addStretch(1);
101 auto *
const separator =
new QFrame(
this);
102 separator->setFrameShape(QFrame::VLine);
103 layout->addWidget(separator);
116 bool disableRemove =
false;
117 if (newModulesToUse.count() == 1 ||
118 (newIndex == 0 && leftLikeModules == 1))
119 disableRemove =
true;
QList< CSwordModuleInfo * > BtModuleList
QString const & name() const