Add a global version number.

So the main() and About dialog can use it.
This commit is contained in:
Ernie Pasveer
2021-10-03 10:34:50 -05:00
parent 3e8790807b
commit 2ee3c2bf3a
5 changed files with 35 additions and 4 deletions
+11 -2
View File
@@ -1,4 +1,5 @@
#include "SeerAboutDialog.h"
#include "SeerUtl.h"
#include <QtGui/QColor>
#include <QtGui/QPalette>
@@ -8,14 +9,22 @@ SeerAboutDialog::SeerAboutDialog (QWidget* parent) : QDialog(parent) {
setupUi(this);
// Setup the widgets
// Add the Version number to the end of the About text.
// Scroll back to the top.
textEdit->moveCursor (QTextCursor::End);
textEdit->insertPlainText ("\n");
textEdit->insertPlainText ("\n");
textEdit->insertPlainText ("Version: " + Seer::version());
textEdit->insertPlainText ("\n");
textEdit->moveCursor (QTextCursor::Start);
// Set the TextEdit's background to the same as the window's.
QColor windowColor = palette().color(QWidget::backgroundRole());
QPalette p = textEdit->palette();
p.setColor(QPalette::Base, windowColor);
textEdit->setPalette(p);
// Connect things.
}
SeerAboutDialog::~SeerAboutDialog () {