-rw-r--r-- | libopie/odevicebutton.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie/odevicebutton.h b/libopie/odevicebutton.h index fcc2af1..1621526 100644 --- a/libopie/odevicebutton.h +++ b/libopie/odevicebutton.h | |||
@@ -1,94 +1,96 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef DEVICE_BUTTON_H | 20 | #ifndef DEVICE_BUTTON_H |
21 | #define DEVICE_BUTTON_H | 21 | #define DEVICE_BUTTON_H |
22 | 22 | ||
23 | #include <qpixmap.h> | 23 | #include <qpixmap.h> |
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | 25 | ||
26 | class OQCopMessageData; | 26 | class OQCopMessageData; |
27 | 27 | ||
28 | namespace Opie | 28 | namespace Opie |
29 | { | 29 | { |
30 | 30 | ||
31 | class OQCopMessage { | 31 | class OQCopMessage { |
32 | public: | 32 | public: |
33 | OQCopMessage ( ); | 33 | OQCopMessage ( ); |
34 | OQCopMessage ( const OQCopMessage © ); | 34 | OQCopMessage ( const OQCopMessage © ); |
35 | OQCopMessage ( const QCString &m_channel, const QCString &message, const QByteArray &args = QByteArray ( )); | 35 | OQCopMessage ( const QCString &m_channel, const QCString &message, const QByteArray &args = QByteArray ( )); |
36 | 36 | ||
37 | OQCopMessage &operator = ( const OQCopMessage &assign ); | 37 | OQCopMessage &operator = ( const OQCopMessage &assign ); |
38 | 38 | ||
39 | void setChannel ( const QCString &channel ); | 39 | void setChannel ( const QCString &channel ); |
40 | void setMessage ( const QCString &message ); | 40 | void setMessage ( const QCString &message ); |
41 | void setData ( const QByteArray &ba ); | 41 | void setData ( const QByteArray &ba ); |
42 | 42 | ||
43 | QCString channel ( ) const; | 43 | QCString channel ( ) const; |
44 | QCString message ( ) const; | 44 | QCString message ( ) const; |
45 | QByteArray data ( ) const; | 45 | QByteArray data ( ) const; |
46 | 46 | ||
47 | bool isNull()const; | ||
48 | |||
47 | bool send ( ); | 49 | bool send ( ); |
48 | 50 | ||
49 | private: | 51 | private: |
50 | void init ( const QCString &m_channel, const QCString &message, const QByteArray &args ); | 52 | void init ( const QCString &m_channel, const QCString &message, const QByteArray &args ); |
51 | 53 | ||
52 | OQCopMessageData *d; | 54 | OQCopMessageData *d; |
53 | class Private; | 55 | class Private; |
54 | Private* m_data; | 56 | Private* m_data; |
55 | }; | 57 | }; |
56 | 58 | ||
57 | 59 | ||
58 | /** | 60 | /** |
59 | * This class represents a physical button on a Qtopia device. A device may | 61 | * This class represents a physical button on a Qtopia device. A device may |
60 | * have n "user programmable" buttons, which are number 1..n. The location | 62 | * have n "user programmable" buttons, which are number 1..n. The location |
61 | * and number of buttons will vary from device to device. userText() and pixmap() | 63 | * and number of buttons will vary from device to device. userText() and pixmap() |
62 | * may be used to describe this button to the user in help documentation. | 64 | * may be used to describe this button to the user in help documentation. |
63 | * | 65 | * |
64 | * @version 1.0 | 66 | * @version 1.0 |
65 | * @author Trolltech | 67 | * @author Trolltech |
66 | * @short A representation of buttons | 68 | * @short A representation of buttons |
67 | */ | 69 | */ |
68 | 70 | ||
69 | class ODeviceButton | 71 | class ODeviceButton |
70 | { | 72 | { |
71 | public: | 73 | public: |
72 | ODeviceButton(); | 74 | ODeviceButton(); |
73 | virtual ~ODeviceButton(); | 75 | virtual ~ODeviceButton(); |
74 | 76 | ||
75 | ushort keycode ( ) const; | 77 | ushort keycode ( ) const; |
76 | QString userText ( ) const; | 78 | QString userText ( ) const; |
77 | QPixmap pixmap ( ) const; | 79 | QPixmap pixmap ( ) const; |
78 | OQCopMessage factoryPresetPressedAction ( ) const; | 80 | OQCopMessage factoryPresetPressedAction ( ) const; |
79 | OQCopMessage pressedAction ( ) const; | 81 | OQCopMessage pressedAction ( ) const; |
80 | OQCopMessage factoryPresetHeldAction ( ) const; | 82 | OQCopMessage factoryPresetHeldAction ( ) const; |
81 | OQCopMessage heldAction ( ) const; | 83 | OQCopMessage heldAction ( ) const; |
82 | 84 | ||
83 | void setKeycode ( ushort keycode ); | 85 | void setKeycode ( ushort keycode ); |
84 | void setUserText ( const QString& text ); | 86 | void setUserText ( const QString& text ); |
85 | void setPixmap ( const QPixmap& picture ); | 87 | void setPixmap ( const QPixmap& picture ); |
86 | void setFactoryPresetPressedAction ( const OQCopMessage& qcopMessage ); | 88 | void setFactoryPresetPressedAction ( const OQCopMessage& qcopMessage ); |
87 | void setPressedAction ( const OQCopMessage& qcopMessage ); | 89 | void setPressedAction ( const OQCopMessage& qcopMessage ); |
88 | void setFactoryPresetHeldAction ( const OQCopMessage& qcopMessage ); | 90 | void setFactoryPresetHeldAction ( const OQCopMessage& qcopMessage ); |
89 | void setHeldAction ( const OQCopMessage& qcopMessage ); | 91 | void setHeldAction ( const OQCopMessage& qcopMessage ); |
90 | 92 | ||
91 | private: | 93 | private: |
92 | ushort m_Keycode; | 94 | ushort m_Keycode; |
93 | QString m_UserText; | 95 | QString m_UserText; |
94 | QPixmap m_Pixmap; | 96 | QPixmap m_Pixmap; |