1 | /* smplayer, GUI front-end for mplayer.
|
---|
2 | Copyright (C) 2006-2011 Ricardo Villalba <rvm@escomposlinux.org>
|
---|
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 | prefassociations.h
|
---|
20 | Handles file associations in Windows
|
---|
21 | Author: Florin Braghis (florin@libertv.ro)
|
---|
22 | */
|
---|
23 |
|
---|
24 | #ifndef _PREFASSOCIATIONS_H_
|
---|
25 | #define _PREFASSOCIATIONS_H_
|
---|
26 |
|
---|
27 | #include "ui_prefassociations.h"
|
---|
28 | #include "prefwidget.h"
|
---|
29 |
|
---|
30 | class Preferences;
|
---|
31 |
|
---|
32 | class PrefAssociations : public PrefWidget, public Ui::PrefAssociations
|
---|
33 | {
|
---|
34 | Q_OBJECT
|
---|
35 |
|
---|
36 | public:
|
---|
37 | PrefAssociations( QWidget * parent = 0, Qt::WindowFlags f = 0 );
|
---|
38 | ~PrefAssociations();
|
---|
39 |
|
---|
40 | virtual QString sectionName();
|
---|
41 | virtual QPixmap sectionIcon();
|
---|
42 |
|
---|
43 | // Pass data to the dialog
|
---|
44 | void setData(Preferences * pref);
|
---|
45 |
|
---|
46 | // Apply changes
|
---|
47 | void getData(Preferences * pref);
|
---|
48 |
|
---|
49 | void addItem(QString label);
|
---|
50 |
|
---|
51 | int ProcessAssociations(QStringList& current, QStringList& old);
|
---|
52 | void refreshList();
|
---|
53 |
|
---|
54 | protected:
|
---|
55 | QStringList m_regExtensions;
|
---|
56 | protected:
|
---|
57 | virtual void createHelp();
|
---|
58 |
|
---|
59 | protected:
|
---|
60 | virtual void retranslateStrings();
|
---|
61 |
|
---|
62 | public slots:
|
---|
63 | void selectAllClicked(bool);
|
---|
64 | void selectNoneClicked(bool);
|
---|
65 | void listItemClicked(QListWidgetItem* item);
|
---|
66 | void listItemPressed(QListWidgetItem* item);
|
---|
67 | };
|
---|
68 |
|
---|
69 | #endif
|
---|