mirror of
https://github.com/epasveer/seer.git
synced 2026-08-30 17:10:44 +08:00
Add a global version number.
So the main() and About dialog can use it.
This commit is contained in:
+11
-2
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user