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

Method ModPage

launcher/ui/pages/modplatform/ModPage.cpp:51–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51ModPage::ModPage(ModDownloadDialog* dialog, BaseInstance* instance, ModAPI* api)
52 : QWidget(dialog)
53 , m_instance(instance)
54 , ui(new Ui::ModPage)
55 , dialog(dialog)
56 , m_fetch_progress(this, false)
57 , api(api)
58{
59 ui->setupUi(this);
60
61 connect(ui->searchButton, &QPushButton::clicked, this, &ModPage::triggerSearch);
62 connect(ui->modFilterButton, &QPushButton::clicked, this, &ModPage::filterMods);
63 connect(ui->packView, &QListView::doubleClicked, this, &ModPage::onModSelected);
64
65 m_search_timer.setTimerType(Qt::TimerType::CoarseTimer);
66 m_search_timer.setSingleShot(true);
67
68 connect(&m_search_timer, &QTimer::timeout, this, &ModPage::triggerSearch);
69
70 ui->searchEdit->installEventFilter(this);
71
72 ui->versionSelectionBox->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
73 ui->versionSelectionBox->view()->parentWidget()->setMaximumHeight(300);
74
75 m_fetch_progress.hideIfInactive(true);
76 m_fetch_progress.setFixedHeight(24);
77 m_fetch_progress.progressFormat("");
78
79 ui->gridLayout_3->addWidget(&m_fetch_progress, 0, 0, 1, ui->gridLayout_3->columnCount());
80
81 ui->packView->setItemDelegate(new ProjectItemDelegate(this));
82 ui->packView->installEventFilter(this);
83}
84
85ModPage::~ModPage()
86{

Callers

nothing calls this directly

Calls 5

viewMethod · 0.80
hideIfInactiveMethod · 0.80
progressFormatMethod · 0.80
setupUiMethod · 0.45
columnCountMethod · 0.45

Tested by

no test coverage detected