NCL Composer  0.1.5
 All Classes Functions Variables Pages
AboutDialog.cpp
1 #include "AboutDialog.h"
2 #include "ui_AboutDialog.h"
3 
4 #include <QMessageBox>
5 #include <QFile>
6 
7 namespace composer {
8 namespace gui {
9 
10 AboutDialog::AboutDialog(QWidget *parent):
11  QDialog(parent, Qt::Dialog),
12  ui(new Ui::AboutDialog)
13 {
14  ui->setupUi(this);
15  ui->label_ProgramName->setText(QString("NCL Composer v.") +
16  QString(NCLCOMPOSER_GUI_VERSION));
17 
18  connect(ui->button_Close, SIGNAL(pressed()), this, SLOT(close()));
19 }
20 
22 {
23  delete ui;
24 }
25 
26 void AboutDialog::showLicense()
27 {
28  QMessageBox box(this);
29  QFile file(":/LICENSE.LGPL");
30  box.setInformativeText(file.readAll());
31  box.setTextFormat(Qt::RichText);
32  box.exec();
33 }
34 
35 } } // end namespace