PreferenceWidget.h 1.88 KB
Newer Older
1 2 3 4
/*****************************************************************************
 * PreferenceWidget.h: Abstract class that will be used to save load / preferences
 * values.
 *****************************************************************************
Ludovic Fauvet's avatar
Ludovic Fauvet committed
5
 * Copyright (C) 2008-2010 VideoLAN
6 7
 *
 * Authors: Clement CHAVANCE <kinder@vlmc.org>
8
 *          Hugo Beauzée-Luyssen <hugo@vlmc.org>
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
 *
 * 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 PREFERENCEWIDGET_H
#define PREFERENCEWIDGET_H

#include <QWidget>
Ludovic Fauvet's avatar
Ludovic Fauvet committed
29
#include <QString>
30 31 32 33
#include "SettingsManager.h"

class   ISettingsCategorieWidget;
class   SettingValue;
34

35
class   PreferenceWidget : public QWidget
36
{
37
    Q_OBJECT
38
    public:
39 40 41
        typedef QList<ISettingsCategorieWidget*>    SettingsList;
        PreferenceWidget( const QString& categorie, SettingsManager::Type type,
                          QWidget* parent = 0 );
42 43
        virtual ~PreferenceWidget() {}

44 45 46 47
        virtual void    load();
        virtual void    save();
    private:
        ISettingsCategorieWidget        *widgetFactory( SettingValue* s );
48

49 50 51
    private:
        QString         m_categorie;
        SettingsList    m_settings;
52 53 54
};

#endif