Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

buttonsettings.h

Go to the documentation of this file.
00001 /*
00002                =.            This file is part of the OPIE Project
00003              .=l.            Copyright (c)  2002 Robert Griebl <sandman@handhelds.org>
00004            .>+-=
00005  _;:,     .>    :=|.         This file is free software; you can
00006 .> <`_,   >  .   <=          redistribute it and/or modify it under
00007 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00008 .="- .-=="i,     .._         License as published by the Free Software
00009  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00010      ._= =}       :          or (at your option) any later version.
00011     .%`+i>       _;_.
00012     .i_,=:_.      -<s.       This file is distributed in the hope that
00013      +  .  -:.       =       it will be useful, but WITHOUT ANY WARRANTY;
00014     : ..    .:,     . . .    without even the implied warranty of
00015     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00016   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU General
00017 ..}^=.=       =       ;      Public License for more details.
00018 ++=   -.     .`     .:       
00019  :     =  ...= . :.=-        You should have received a copy of the GNU
00020  -.   .:....=;==+<;          General Public License along with this file;
00021   -_. . .   )=.  =           see the file COPYING. If not, write to the
00022     --        :-=`           Free Software Foundation, Inc.,
00023                              59 Temple Place - Suite 330,
00024                              Boston, MA 02111-1307, USA.
00025 
00026 */
00027 
00028 #ifndef __BUTTON_SETTINGS_H__
00029 #define __BUTTON_SETTINGS_H__
00030 
00031 #include <qdialog.h>
00032 #include <qlist.h>
00033 #include <opie2/odevice.h>
00034 
00035 class QTimer;
00036 
00037 
00038 class buttoninfo;
00039 
00040 class ButtonSettings : public QDialog {
00041         Q_OBJECT
00042 
00043 public:
00044         ButtonSettings ( QWidget *parent = 0, const char *name = 0,  bool modal = FALSE,WFlags f = 0 );
00045         ~ButtonSettings ( );
00046 
00047         static QString appName() { return QString::fromLatin1("buttonsettings"); }
00048         virtual void accept ( );
00049         virtual void done ( int r );
00050 
00051 private slots:
00052         void keyTimeout ( );
00053         void updateLabels ( );
00054 
00055 protected:
00056         virtual void keyPressEvent ( QKeyEvent *e );
00057         virtual void keyReleaseEvent ( QKeyEvent *e );
00058 
00059 private:
00060         buttoninfo *buttonInfoForKeycode ( ushort key );
00061         
00062         void edit ( buttoninfo *bi, bool hold );
00063         QString qcopToString ( const Opie::Core::OQCopMessage &c );
00064 
00065 private:        
00066         QTimer *m_timer;
00067         buttoninfo *m_last_button;
00068 
00069         QList <buttoninfo> m_infos;
00070         bool m_lock;
00071 };
00072 
00073 #endif
00074 
00075 

Generated on Sat Nov 5 16:15:56 2005 for OPIE by  doxygen 1.4.2