1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
/*****************************************************************************
* simple_preferences.hpp : Simple prefs
****************************************************************************
* Copyright (C) 2006 the VideoLAN team
* $Id: 8e2bf6e24895cae64d8423223dabafa54d6b3342 $
*
* Authors: Clément Stenac <zorglub@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef _SIMPLEPREFS_H_
#define _SIMPLEPREFS_H_
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_interface.h>
#include "ui/sprefs_input.h"
#include "ui/sprefs_audio.h"
#include "ui/sprefs_video.h"
#include "ui/sprefs_subtitles.h"
#include "ui/sprefs_interface.h"
#ifdef _WIN32
# include "util/registry.hpp"
#endif
#include <QWidget>
enum {
SPrefsInterface = 0,
SPrefsAudio,
SPrefsVideo,
SPrefsSubtitles,
SPrefsInputAndCodecs,
SPrefsHotkeys,
SPrefsMax
};
#define SPrefsDefaultCat SPrefsInterface
enum {
CachingCustom = 0,
CachingLowest = 100,
CachingLow = 200,
CachingNormal = 300,
CachingHigh = 500,
CachingHigher = 1000
};
class ConfigControl;
class QComboBox;
class QLineEdit;
class QRadioButton;
class QCheckBox;
class QString;
#ifdef _WIN32
class QTreeWidgetItem;
#endif
class SPrefsCatList : public QWidget
{
Q_OBJECT
public:
SPrefsCatList( intf_thread_t *, QWidget * );
virtual ~SPrefsCatList() {};
private:
intf_thread_t *p_intf;
signals:
void currentItemChanged( int );
public slots:
void switchPanel( int );
};
class SPrefsPanel : public QWidget
{
Q_OBJECT
public:
SPrefsPanel( intf_thread_t *, QWidget *, int );
virtual ~SPrefsPanel();
void apply();
void clean();
#ifdef _WIN32
void cleanLang();
#endif
private:
intf_thread_t *p_intf;
QList<ConfigControl *> controls;
int number;
QHash<QString, QWidget*> optionWidgets;
QStringList qs_filter;
QButtonGroup *radioGroup;
char *lang;
#ifdef _WIN32
QList<QTreeWidgetItem *> listAsso;
bool addType( const char * psz_ext, QTreeWidgetItem*, QTreeWidgetItem*, QVLCRegistry* );
void saveLang();
#endif
/* Display only the options for the selected audio output */
private slots:
void lastfm_Changed( int );
void updateAudioOptions( int );
void updateAudioVolume( int );
void langChanged( int );
#ifdef _WIN32
void assoDialog();
void updateCheckBoxes( QTreeWidgetItem*, int );
void saveAsso();
#endif
void configML();
void changeStyle( QString );
};
#endif
|