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

« back to all changes in this revision

Viewing changes to src/keychooser.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
*/
 
18
 
 
19
/* 
 
20
    Note: most of the code in this class has been taken from the source 
 
21
    code of Qt-3 Designer (propertyeditor.h and propertyeditor.cpp).
 
22
        Copyright (C) 2000 Trolltech AS.
 
23
*/
 
24
 
 
25
 
 
26
#ifndef _KEYCHOOSER_H_
 
27
#define _KEYCHOOSER_H_
 
28
 
 
29
#include <qlineedit.h>
 
30
 
 
31
class KeyChooser : public QLineEdit
 
32
{
 
33
        Q_OBJECT
 
34
 
 
35
public:
 
36
        KeyChooser( QWidget * parent, const char * name = 0 );
 
37
        ~KeyChooser();
 
38
 
 
39
public slots:
 
40
        virtual void clear();
 
41
 
 
42
protected:
 
43
        virtual void keyPressEvent ( QKeyEvent * e );
 
44
        virtual bool event ( QEvent * e );
 
45
 
 
46
private:
 
47
        int translateModifiers( int state );
 
48
 
 
49
    int k1, k2, k3, k4;
 
50
    int num;
 
51
        bool mouseEnter;
 
52
};
 
53
 
 
54
#endif