1 /* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2021 Ricardo Villalba <ricardo@smplayer.info>
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 "prefwidget.h"
20 #include <QEvent>
21
PrefWidget(QWidget * parent,Qt::WindowFlags f)22 PrefWidget::PrefWidget(QWidget * parent, Qt::WindowFlags f )
23 : QWidget(parent, f)
24 {
25 requires_restart = false;
26 help_message = "";
27 }
28
~PrefWidget()29 PrefWidget::~PrefWidget() {
30 }
31
sectionName()32 QString PrefWidget::sectionName() {
33 return QString();
34 }
35
sectionIcon()36 QPixmap PrefWidget::sectionIcon() {
37 return QPixmap();
38 }
39
addSectionTitle(const QString & title)40 void PrefWidget::addSectionTitle(const QString & title) {
41 help_message += "<h2>"+title+"</h2>";
42 }
43
setWhatsThis(QWidget * w,const QString & title,const QString & text)44 void PrefWidget::setWhatsThis( QWidget *w, const QString & title,
45 const QString & text)
46 {
47 w->setWhatsThis(text);
48 help_message += "<b>"+title+"</b><br>"+text+"<br><br>";
49
50 w->setToolTip( "<qt>"+ text +"</qt>" );
51 }
52
clearHelp()53 void PrefWidget::clearHelp() {
54 help_message = "<h1>" + sectionName() + "</h1>";
55 }
56
createHelp()57 void PrefWidget::createHelp() {
58 }
59
60 // Language change stuff
changeEvent(QEvent * e)61 void PrefWidget::changeEvent(QEvent *e) {
62 if (e->type() == QEvent::LanguageChange) {
63 retranslateStrings();
64 } else {
65 QWidget::changeEvent(e);
66 }
67 }
68
retranslateStrings()69 void PrefWidget::retranslateStrings() {
70 }
71