Files
seer/src/SeerAboutDialog.cpp
T
Ernie Pasveer 79f243c198 Added buttons for Memory and future Array visualizers.
Added icons for more buttons.
Changed About dialog to load text from a resource.
Incremented version number preparing for the next release.
2021-11-29 16:40:52 -06:00

40 lines
1.0 KiB
C++

#include "SeerAboutDialog.h"
#include "SeerUtl.h"
#include <QtGui/QColor>
#include <QtGui/QPalette>
#include <QtCore/QFile>
#include <QtCore/QTextStream>
SeerAboutDialog::SeerAboutDialog (QWidget* parent) : QDialog(parent) {
// Set up the UI.
setupUi(this);
// Setup the widgets
// Add the Version number to the beggining of the About text.
textEdit->moveCursor (QTextCursor::Start);
textEdit->setText ("\n");
textEdit->append ("Version: " + Seer::version());
// Add the About text from the resource.
QFile file(":/seer/resources/about.txt");
file.open(QFile::ReadOnly | QFile::Text);
QTextStream stream(&file);
textEdit->append(stream.readAll());
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);
}
SeerAboutDialog::~SeerAboutDialog () {
}