Diffstat (limited to 'libopie2/opiecore/device/odevice_yopy.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_yopy.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_yopy.cpp b/libopie2/opiecore/device/odevice_yopy.cpp index 4e9f227..493ed25 100644 --- a/libopie2/opiecore/device/odevice_yopy.cpp +++ b/libopie2/opiecore/device/odevice_yopy.cpp | |||
@@ -26,97 +26,97 @@ _;:, .> :=|. This program is free software; you can | |||
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "odevice_yopy.h" | 30 | #include "odevice_yopy.h" |
31 | 31 | ||
32 | /* QT */ | 32 | /* QT */ |
33 | #include <qapplication.h> | 33 | #include <qapplication.h> |
34 | #include <qfile.h> | 34 | #include <qfile.h> |
35 | #include <qtextstream.h> | 35 | #include <qtextstream.h> |
36 | #include <qwindowsystem_qws.h> | 36 | #include <qwindowsystem_qws.h> |
37 | 37 | ||
38 | /* OPIE */ | 38 | /* OPIE */ |
39 | #include <qpe/config.h> | 39 | #include <qpe/config.h> |
40 | #include <qpe/resource.h> | 40 | #include <qpe/resource.h> |
41 | #include <qpe/sound.h> | 41 | #include <qpe/sound.h> |
42 | #include <qpe/qcopenvelope_qws.h> | 42 | #include <qpe/qcopenvelope_qws.h> |
43 | 43 | ||
44 | /* STD */ | 44 | /* STD */ |
45 | #include <fcntl.h> | 45 | #include <fcntl.h> |
46 | #include <math.h> | 46 | #include <math.h> |
47 | #include <stdlib.h> | 47 | #include <stdlib.h> |
48 | #include <signal.h> | 48 | #include <signal.h> |
49 | #include <sys/ioctl.h> | 49 | #include <sys/ioctl.h> |
50 | #include <sys/time.h> | 50 | #include <sys/time.h> |
51 | #include <unistd.h> | 51 | #include <unistd.h> |
52 | #ifndef QT_NO_SOUND | 52 | #ifndef QT_NO_SOUND |
53 | #include <linux/soundcard.h> | 53 | #include <linux/soundcard.h> |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | using namespace Opie::Core; | 56 | using namespace Opie::Core; |
57 | using namespace Opie::Core::Internal; | 57 | using namespace Opie::Core::Internal; |
58 | 58 | ||
59 | struct yopy_button yopy_buttons [] = { | 59 | struct yopy_button yopy_buttons [] = { |
60 | { Qt::Key_F10, QT_TRANSLATE_NOOP( "Button", "Action Button" ), | 60 | { Qt::Key_F10, QT_TRANSLATE_NOOP( "Button", "Action Button" ), |
61 | "devicebuttons/yopy_action", | 61 | "devicebuttons/yopy_action", |
62 | "datebook", "nextView()", | 62 | "datebook", "nextView()", |
63 | "today", "raise()" }, | 63 | "today", "raise()" }, |
64 | { Qt::Key_F11, QT_TRANSLATE_NOOP( "Button", "OK Button" ), | 64 | { Qt::Key_F11, QT_TRANSLATE_NOOP( "Button", "OK Button" ), |
65 | "devicebuttons/yopy_ok", | 65 | "devicebuttons/yopy_ok", |
66 | "addressbook", "raise()", | 66 | "addressbook", "raise()", |
67 | "addressbook", "beamBusinessCard()" }, | 67 | "addressbook", "beamBusinessCard()" }, |
68 | { Qt::Key_F12, QT_TRANSLATE_NOOP( "Button", "End Button" ), | 68 | { Qt::Key_F12, QT_TRANSLATE_NOOP( "Button", "End Button" ), |
69 | "devicebuttons/yopy_end", | 69 | "devicebuttons/yopy_end", |
70 | "QPE/Launcher", "home()", | 70 | "QPE/Launcher", "home()", |
71 | "buttonsettings", "raise()" }, | 71 | "buttonsettings", "raise()" }, |
72 | }; | 72 | }; |
73 | 73 | ||
74 | void Yopy::init() | 74 | void Yopy::init(const QString&) |
75 | { | 75 | { |
76 | d->m_vendorstr = "G.Mate"; | 76 | d->m_vendorstr = "G.Mate"; |
77 | d->m_vendor = Vendor_GMate; | 77 | d->m_vendor = Vendor_GMate; |
78 | d->m_modelstr = "Yopy3700"; | 78 | d->m_modelstr = "Yopy3700"; |
79 | d->m_model = Model_Yopy_3700; | 79 | d->m_model = Model_Yopy_3700; |
80 | d->m_rotation = Rot0; | 80 | d->m_rotation = Rot0; |
81 | 81 | ||
82 | d->m_systemstr = "Linupy"; | 82 | d->m_systemstr = "Linupy"; |
83 | d->m_system = System_Linupy; | 83 | d->m_system = System_Linupy; |
84 | 84 | ||
85 | QFile f ( "/etc/issue" ); | 85 | QFile f ( "/etc/issue" ); |
86 | if ( f. open ( IO_ReadOnly ) ) | 86 | if ( f. open ( IO_ReadOnly ) ) |
87 | { | 87 | { |
88 | QTextStream ts ( &f ); | 88 | QTextStream ts ( &f ); |
89 | ts.readLine(); | 89 | ts.readLine(); |
90 | d->m_sysverstr = ts. readLine(); | 90 | d->m_sysverstr = ts. readLine(); |
91 | f. close(); | 91 | f. close(); |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
95 | 95 | ||
96 | void Yopy::initButtons() | 96 | void Yopy::initButtons() |
97 | { | 97 | { |
98 | if ( d->m_buttons ) | 98 | if ( d->m_buttons ) |
99 | return ; | 99 | return ; |
100 | 100 | ||
101 | d->m_buttons = new QValueList <ODeviceButton>; | 101 | d->m_buttons = new QValueList <ODeviceButton>; |
102 | 102 | ||
103 | for ( uint i = 0; i < ( sizeof( yopy_buttons ) / sizeof( yopy_button ) ); i++ ) | 103 | for ( uint i = 0; i < ( sizeof( yopy_buttons ) / sizeof( yopy_button ) ); i++ ) |
104 | { | 104 | { |
105 | 105 | ||
106 | yopy_button *ib = yopy_buttons + i; | 106 | yopy_button *ib = yopy_buttons + i; |
107 | 107 | ||
108 | ODeviceButton b; | 108 | ODeviceButton b; |
109 | 109 | ||
110 | b. setKeycode ( ib->code ); | 110 | b. setKeycode ( ib->code ); |
111 | b. setUserText ( QObject::tr ( "Button", ib->utext ) ); | 111 | b. setUserText ( QObject::tr ( "Button", ib->utext ) ); |
112 | b. setPixmap ( Resource::loadPixmap ( ib->pix ) ); | 112 | b. setPixmap ( Resource::loadPixmap ( ib->pix ) ); |
113 | b. setFactoryPresetPressedAction | 113 | b. setFactoryPresetPressedAction |
114 | ( OQCopMessage( makeChannel( ib->fpressedservice ), ib->fpressedaction ) ); | 114 | ( OQCopMessage( makeChannel( ib->fpressedservice ), ib->fpressedaction ) ); |
115 | b. setFactoryPresetHeldAction | 115 | b. setFactoryPresetHeldAction |
116 | ( OQCopMessage( makeChannel( ib->fheldservice ), ib->fheldaction ) ); | 116 | ( OQCopMessage( makeChannel( ib->fheldservice ), ib->fheldaction ) ); |
117 | 117 | ||
118 | d->m_buttons->append ( b ); | 118 | d->m_buttons->append ( b ); |
119 | } | 119 | } |
120 | reloadButtonMapping(); | 120 | reloadButtonMapping(); |
121 | 121 | ||
122 | QCopChannel *sysch = new QCopChannel( "QPE/System", this ); | 122 | QCopChannel *sysch = new QCopChannel( "QPE/System", this ); |