MCPcopy Create free account
hub / github.com/codestation/qcma / showAboutDialog

Method showAboutDialog

gui/mainwidget.cpp:154–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154void MainWidget::showAboutDialog()
155{
156 QMessageBox about;
157
158 about.setText(QString("Qcma ") + QCMA_VER);
159 about.setWindowTitle(tr("About Qcma"));
160#ifndef QCMA_BUILD_HASH
161 about.setInformativeText(tr("Copyright (C) 2016 Codestation") + "\n");
162#else
163 about.setInformativeText(tr("Copyright (C) 2016 Codestation\n\nbuild hash: %1\nbuild branch: %2").arg(QCMA_BUILD_HASH).arg(QCMA_BUILD_BRANCH));
164#endif
165 about.setStandardButtons(QMessageBox::Ok);
166 about.setIconPixmap(QPixmap(":/main/resources/images/qcma.png"));
167 about.setDefaultButton(QMessageBox::Ok);
168
169 // hack to expand the messagebox minimum size
170 QSpacerItem* horizontalSpacer = new QSpacerItem(300, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
171 QGridLayout* widget_layout = (QGridLayout*)about.layout();
172 widget_layout->addItem(horizontalSpacer, widget_layout->rowCount(), 0, 1, widget_layout->columnCount());
173
174 about.show();
175 about.exec();
176}
177
178void MainWidget::showAboutQt()
179{

Callers

nothing calls this directly

Calls 1

showMethod · 0.80

Tested by

no test coverage detected