source: smplayer/trunk/src/reminderdialog.cpp@ 176

Last change on this file since 176 was 176, checked in by Silvan Scherrer, 9 years ago

smplayer: update trunk to version 16.4

File size: 2.3 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2016 Ricardo Villalba <rvm@users.sourceforge.net>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17*/
18
19#include "reminderdialog.h"
20#include "images.h"
21#include <QPushButton>
22
23ReminderDialog::ReminderDialog( QWidget* parent, Qt::WindowFlags f )
24 : QDialog(parent, f)
25{
26 setupUi(this);
27
28 setMinimumSize(QSize(500, 100));
29
30 icon_label->setPixmap(Images::icon("donate_big"));
31
32 text_label->setText(
33 tr("If you like SMPlayer and want to support its development, you can send a donation. "
34 "Even the smallest one is highly appreciated.") + "<br><br>"+
35 tr("Or you maybe you want to share SMPlayer with your friends in Facebook.") + "<br><br>" +
36 tr("What would you like to do?") );
37
38 donate_button = buttonBox->addButton(tr("&Donate"), QDialogButtonBox::ActionRole);
39 facebook_button = buttonBox->addButton(tr("&Share with my friends"), QDialogButtonBox::ActionRole);
40 close_button = buttonBox->button(QDialogButtonBox::Close);
41
42 donate_button->setDefault(true);
43 donate_button->setFocus();
44
45 adjustSize();
46 //layout()->setSizeConstraint(QLayout::SetFixedSize);
47
48 connect(buttonBox, SIGNAL(clicked(QAbstractButton *)), this, SLOT(button_clicked(QAbstractButton *)));
49}
50
51ReminderDialog::~ReminderDialog() {
52}
53
54void ReminderDialog::button_clicked(QAbstractButton * button) {
55 int res = Close;
56
57 if (button == donate_button) res = Donate;
58 else
59 if (button == facebook_button) res = Share;
60
61 qDebug("ReminderDialog::button_clicked: res: %d", res);
62
63 done(res);
64}
65
66bool ReminderDialog::isRemindChecked() {
67 return remind_check->isChecked();
68}
69
70#include "moc_reminderdialog.cpp"
Note: See TracBrowser for help on using the repository browser.