63e5d6c359710b4605bf6cde92e21d4742480b46
[movie-schedule] / src / ui / aboutdialog.cpp
1 // Copyright 2010 Jochen Becher
2 //
3 // This file is part of MovieSchedule.
4 //
5 // MovieSchedule is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // MovieSchedule is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with MovieSchedule.  If not, see <http://www.gnu.org/licenses/>.
17
18 #include "aboutdialog.h"
19 #include "ui_aboutdialog.h"
20
21 AboutDialog::AboutDialog(QWidget *parent) :
22     QDialog(parent),
23     ui(new Ui::AboutDialog)
24 {
25     ui->setupUi(this);
26     ui->_button_box->addButton(ui->_done_button, QDialogButtonBox::AcceptRole);
27     ui->_button_box->addButton(ui->_contact_button, QDialogButtonBox::ActionRole);
28     //QPalette palette = ui->_about_text->palette();
29     //palette.setColor(QPalette::Base, palette.color(QPalette::Window));
30     //palette.setColor(QPalette::Text, palette.color(QPalette::WindowText));
31     //ui->_about_text->setPalette(palette);
32     connect(ui->_button_box, SIGNAL(accepted()), this, SLOT(deleteLater()));
33     connect(ui->_button_box, SIGNAL(rejected()), this, SLOT(deleteLater()));
34     connect(ui->_contact_button, SIGNAL(clicked()), this, SLOT(deleteLater()));
35     connect(ui->_contact_button, SIGNAL(clicked()), this, SIGNAL(ContactAuthor()));
36 }
37
38 AboutDialog::~AboutDialog()
39 {
40     delete ui;
41 }