MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / initialize

Method initialize

launcher/ui/widgets/VersionSelectWidget.cpp:75–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void VersionSelectWidget::initialize(BaseVersionList *vlist)
76{
77 m_vlist = vlist;
78 m_proxyModel->setSourceModel(vlist);
79 listView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
80 listView->header()->setSectionResizeMode(resizeOnColumn, QHeaderView::Stretch);
81
82 if (!m_vlist->isLoaded())
83 {
84 loadList();
85 }
86 else
87 {
88 if (m_proxyModel->rowCount() == 0)
89 {
90 listView->setEmptyMode(VersionListView::String);
91 }
92 preselect();
93 }
94}
95
96void VersionSelectWidget::closeEvent(QCloseEvent * event)
97{

Callers

nothing calls this directly

Calls 4

setSourceModelMethod · 0.80
isLoadedMethod · 0.45
rowCountMethod · 0.45
setEmptyModeMethod · 0.45

Tested by

no test coverage detected