MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / setSourceModel

Method setSourceModel

launcher/ui/widgets/CheckComboBox.cpp:81–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void CheckComboBox::setSourceModel(QAbstractItemModel* new_model)
82{
83 auto proxy = new CheckComboModel(this);
84 proxy->setSourceModel(new_model);
85 model()->disconnect(this);
86 QComboBox::setModel(proxy);
87 connect(this, QOverload<int>::of(&QComboBox::activated), this, &CheckComboBox::toggleCheckState);
88 connect(proxy, &CheckComboModel::checkStateChanged, this, &CheckComboBox::emitCheckedItemsChanged);
89 connect(model(), &CheckComboModel::rowsInserted, this, &CheckComboBox::emitCheckedItemsChanged);
90 connect(model(), &CheckComboModel::rowsRemoved, this, &CheckComboBox::emitCheckedItemsChanged);
91}
92
93void CheckComboBox::hidePopup()
94{

Callers 15

MainWindowMethod · 0.45
AtlPageMethod · 0.45
PageMethod · 0.45
ImportFTBPageMethod · 0.45
ScreenshotsPageMethod · 0.45
VersionPageMethod · 0.45
ExternalResourcesPageMethod · 0.45
WorldListPageMethod · 0.45
PageContainerMethod · 0.45
initializeMethod · 0.45
ModFilterWidgetMethod · 0.45

Calls 1

disconnectMethod · 0.80

Tested by

no test coverage detected