MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / selectPreview

Method selectPreview

source/mod_uploader/StarModUploader.cpp:198–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void ModUploader::selectPreview() {
199 QString image = QFileDialog::getOpenFileName(this, "Select a mod preview image", "", "Images (*.png *.jpg)");
200
201 m_modPreview = {};
202 m_previewImageLabel->setPixmap({});
203
204 if (!image.isEmpty()) {
205 if (m_modPreview.load(image))
206 m_previewImageLabel->setPixmap(QPixmap::fromImage(m_modPreview));
207 else
208 QMessageBox::critical(this, "Error", "Could not load preview image");
209 }
210
211 writePreview();
212}
213
214void ModUploader::writeMetadata() {
215 if (!m_assetSource)

Callers

nothing calls this directly

Calls 2

isEmptyMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected