[112] | 1 | /* smplayer, GUI front-end for mplayer.
|
---|
[188] | 2 | Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
|
---|
[112] | 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 |
|
---|
| 22 | PrefWidget::PrefWidget(QWidget * parent, Qt::WindowFlags f )
|
---|
| 23 | : QWidget(parent, f)
|
---|
| 24 | {
|
---|
| 25 | requires_restart = false;
|
---|
| 26 | help_message = "";
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | PrefWidget::~PrefWidget() {
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | QString PrefWidget::sectionName() {
|
---|
| 33 | return QString();
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | QPixmap PrefWidget::sectionIcon() {
|
---|
| 37 | return QPixmap();
|
---|
| 38 | }
|
---|
| 39 |
|
---|
| 40 | void PrefWidget::addSectionTitle(const QString & title) {
|
---|
| 41 | help_message += "<h2>"+title+"</h2>";
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 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 |
|
---|
| 53 | void PrefWidget::clearHelp() {
|
---|
| 54 | help_message = "<h1>" + sectionName() + "</h1>";
|
---|
| 55 | }
|
---|
| 56 |
|
---|
| 57 | void PrefWidget::createHelp() {
|
---|
| 58 | }
|
---|
| 59 |
|
---|
| 60 | // Language change stuff
|
---|
| 61 | void PrefWidget::changeEvent(QEvent *e) {
|
---|
| 62 | if (e->type() == QEvent::LanguageChange) {
|
---|
| 63 | retranslateStrings();
|
---|
| 64 | } else {
|
---|
| 65 | QWidget::changeEvent(e);
|
---|
| 66 | }
|
---|
| 67 | }
|
---|
| 68 |
|
---|
| 69 | void PrefWidget::retranslateStrings() {
|
---|
| 70 | }
|
---|