1.1.5
by Matvey Kozhev
Import upstream version 0.6.0~rc4 |
1 |
/* smplayer, GUI front-end for mplayer.
|
1.2.2
by Maia Kozheva
Import upstream version 0.6.7 |
2 |
Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org>
|
1.1.5
by Matvey Kozhev
Import upstream version 0.6.0~rc4 |
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 "errordialog.h" |
|
20 |
#include "images.h" |
|
21 |
||
22 |
ErrorDialog::ErrorDialog( QWidget* parent, Qt::WindowFlags f ) |
|
23 |
: QDialog(parent, f) |
|
24 |
{
|
|
25 |
setupUi(this); |
|
26 |
||
27 |
icon->setText(""); |
|
28 |
icon->setPixmap( Images::icon("warning") ); |
|
29 |
||
30 |
text->setText(""); |
|
31 |
toggleLog(false); |
|
32 |
||
33 |
connect( viewlog_button, SIGNAL(toggled(bool)), |
|
34 |
this, SLOT(toggleLog(bool)) ); |
|
35 |
||
36 |
layout()->setSizeConstraint(QLayout::SetFixedSize); |
|
37 |
}
|
|
38 |
||
39 |
ErrorDialog::~ErrorDialog() { |
|
40 |
}
|
|
41 |
||
42 |
void ErrorDialog::setText(QString error) { |
|
43 |
text->setText(error); |
|
44 |
}
|
|
45 |
||
46 |
void ErrorDialog::setLog(QString log_text) { |
|
47 |
log->setPlainText(""); |
|
48 |
log->append(log_text); // To move cursor to the end |
|
49 |
}
|
|
50 |
||
51 |
void ErrorDialog::toggleLog(bool checked) { |
|
52 |
log->setVisible(checked); |
|
53 |
||
54 |
if (checked) |
|
55 |
viewlog_button->setText(tr("Hide log")); |
|
56 |
else
|
|
57 |
viewlog_button->setText(tr("Show log")); |
|
58 |
}
|
|
59 |
||
60 |
#include "moc_errordialog.cpp" |