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

odevicebutton.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2000-2002 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of the Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 #ifndef DEVICE_BUTTON_H
00021 #define DEVICE_BUTTON_H
00022 
00023 #include <qpixmap.h>
00024 #include <qstring.h>
00025 
00026 
00027 namespace Opie{
00028 namespace Core{
00029 namespace Internal {
00030 class OQCopMessageData;
00031 }
00032 
00033 class OQCopMessage
00034 {
00035 public:
00036     OQCopMessage ( );
00037     OQCopMessage ( const OQCopMessage &copy );
00038     OQCopMessage ( const QCString &m_channel, const QCString &message, const QByteArray &args = QByteArray ( ));
00039 
00040     OQCopMessage &operator = ( const OQCopMessage &assign );
00041 
00042     void setChannel ( const QCString &channel );
00043     void setMessage ( const QCString &message );
00044     void setData ( const QByteArray &ba );
00045 
00046     QCString channel ( ) const;
00047     QCString message ( ) const;
00048     QByteArray data ( ) const;
00049 
00050     bool isNull()const;
00051 
00052     bool send ( );
00053 
00054 private:
00055     void init ( const QCString &m_channel, const QCString &message, const QByteArray &args );
00056 
00057     Internal::OQCopMessageData *d;
00058     class Private;
00059     Private* m_data;
00060 };
00061 
00062 
00074 class ODeviceButton
00075 {
00076   public:
00077     ODeviceButton();
00078     virtual ~ODeviceButton();
00079 
00080     ushort keycode ( ) const;
00081     QString userText ( ) const;
00082     QPixmap pixmap ( ) const;
00083     OQCopMessage factoryPresetPressedAction ( ) const;
00084     OQCopMessage pressedAction ( ) const;
00085     OQCopMessage factoryPresetHeldAction ( ) const;
00086     OQCopMessage heldAction ( ) const;
00087 
00088     void setKeycode ( ushort keycode );
00089     void setUserText ( const QString& text );
00090     void setPixmap ( const QPixmap& picture );
00091     void setFactoryPresetPressedAction ( const OQCopMessage& qcopMessage );
00092     void setPressedAction ( const OQCopMessage& qcopMessage );
00093     void setFactoryPresetHeldAction ( const OQCopMessage& qcopMessage );
00094     void setHeldAction ( const OQCopMessage& qcopMessage );
00095 
00096   private:
00097     ushort m_Keycode;
00098     QString m_UserText;
00099     QPixmap m_Pixmap;
00100     OQCopMessage m_FactoryPresetPressedAction;
00101     OQCopMessage m_PressedAction;
00102     OQCopMessage m_FactoryPresetHeldAction;
00103     OQCopMessage m_HeldAction;
00104     class Private;
00105     Private *d;
00106 };
00107 
00108 }
00109 }
00110 
00111 #endif

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