~ubuntu-branches/debian/squeeze/smplayer/squeeze

« back to all changes in this revision

Viewing changes to src/actionseditor.h

  • Committer: Bazaar Package Importer
  • Author(s): Breuil Cyril
  • Date: 2007-06-24 16:35:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070624163529-hhckbmd24uicada7
Tags: 0.5.20-0ubuntu1
* New upstream release
* Change Maintainer Email

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  smplayer, GUI front-end for mplayer.
 
2
    Copyright (C) 2007 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
*/
1
18
 
2
19
/* This is based on qq14-actioneditor-code.zip from Qt */
3
20
 
7
24
#include "qt3_4_compat.h"
8
25
#include <qwidget.h>
9
26
#include <qvaluelist.h>
 
27
#include <qstringlist.h>
10
28
 
11
 
class QTable;
 
29
class MyTable;
12
30
class QTableItem;
13
31
class QACTION;
14
32
class QSettings;
30
48
 
31
49
        void addActions(QWidget * widget);
32
50
 
33
 
        /*
34
 
        void saveToConfig(QSettings * set);
35
 
        void loadFromConfig(QSettings * set);
36
 
        */
37
 
        QACTION * findAction(const QString & name);
38
 
 
 
51
        // Static functions
 
52
        static QACTION * findAction(QObject *o, const QString & name);
 
53
        static QStringList actionsNames(QObject *o);
39
54
 
40
55
        static void saveToConfig(QObject *o, QSettings *set);
41
56
        static void loadFromConfig(QObject *o, QSettings *set);
42
57
 
43
58
public slots:
44
59
        void applyChanges();
45
 
        bool saveActionsTable();
 
60
        void saveActionsTable();
46
61
        bool saveActionsTable(const QString & filename);
47
 
        bool loadActionsTable();
 
62
        void loadActionsTable();
48
63
        bool loadActionsTable(const QString & filename);
49
64
 
50
65
        void updateView();
53
68
        // Find in table, not in actionslist
54
69
        int findActionName(const QString & name);
55
70
        int findActionAccel(const QString & accel, int ignoreRow = -1);
56
 
        void checkForConflicts();
57
 
 
 
71
        bool hasConflicts();
58
72
 
59
73
protected slots:
60
74
    void recordAction(int row, int column);
63
77
 
64
78
private:
65
79
    QString oldAccelText;
66
 
    QTable *actionsTable;
 
80
    MyTable *actionsTable;
67
81
    QValueList<QACTION*> actionsList;
68
82
        QPushButton *saveButton;
69
83
        QPushButton *loadButton;