summaryrefslogtreecommitdiff
path: root/core/settings/button
Unidiff
Diffstat (limited to 'core/settings/button') (more/less context) (show whitespace changes)
-rw-r--r--core/settings/button/button.pro7
-rw-r--r--core/settings/button/buttonsettings.cpp2
-rw-r--r--core/settings/button/buttonsettings.h3
-rw-r--r--core/settings/button/main.cpp14
4 files changed, 7 insertions, 19 deletions
diff --git a/core/settings/button/button.pro b/core/settings/button/button.pro
index b10b619..e1c6724 100644
--- a/core/settings/button/button.pro
+++ b/core/settings/button/button.pro
@@ -1,15 +1,14 @@
1TEMPLATE = app 1CONFIG += qt warn_on release quick-app
2CONFIG += qt warn_on release 2
3DESTDIR = $(OPIEDIR)/bin
4HEADERS = buttonsettings.h \ 3HEADERS = buttonsettings.h \
5 buttonutils.h \ 4 buttonutils.h \
6 remapdlg.h 5 remapdlg.h
7 6
8SOURCES = main.cpp \ 7SOURCES = main.cpp \
9 buttonsettings.cpp \ 8 buttonsettings.cpp \
10 buttonutils.cpp \ 9 buttonutils.cpp \
11 remapdlg.cpp 10 remapdlg.cpp
12 11
13INTERFACES = remapdlgbase.ui 12INTERFACES = remapdlgbase.ui
14 13
15INCLUDEPATH += $(OPIEDIR)/include 14INCLUDEPATH += $(OPIEDIR)/include
@@ -26,15 +25,13 @@ TRANSLATIONS = ../../../i18n/de/buttonsettings.ts \
26 ../../../i18n/hu/buttonsettings.ts \ 25 ../../../i18n/hu/buttonsettings.ts \
27 ../../../i18n/ja/buttonsettings.ts \ 26 ../../../i18n/ja/buttonsettings.ts \
28 ../../../i18n/ko/buttonsettings.ts \ 27 ../../../i18n/ko/buttonsettings.ts \
29 ../../../i18n/no/buttonsettings.ts \ 28 ../../../i18n/no/buttonsettings.ts \
30 ../../../i18n/pl/buttonsettings.ts \ 29 ../../../i18n/pl/buttonsettings.ts \
31 ../../../i18n/pt/buttonsettings.ts \ 30 ../../../i18n/pt/buttonsettings.ts \
32 ../../../i18n/pt_BR/buttonsettings.ts \ 31 ../../../i18n/pt_BR/buttonsettings.ts \
33 ../../../i18n/sl/buttonsettings.ts \ 32 ../../../i18n/sl/buttonsettings.ts \
34 ../../../i18n/zh_CN/buttonsettings.ts \ 33 ../../../i18n/zh_CN/buttonsettings.ts \
35 ../../../i18n/zh_TW/buttonsettings.ts \ 34 ../../../i18n/zh_TW/buttonsettings.ts \
36 ../../../i18n/da/buttonsettings.ts 35 ../../../i18n/da/buttonsettings.ts
37 36
38
39
40include ( $(OPIEDIR)/include.pro ) 37include ( $(OPIEDIR)/include.pro )
diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp
index 942d5e4..b6a07a8 100644
--- a/core/settings/button/buttonsettings.cpp
+++ b/core/settings/button/buttonsettings.cpp
@@ -47,25 +47,25 @@ struct buttoninfo {
47 QLabel *m_picon; 47 QLabel *m_picon;
48 QLabel *m_plabel; 48 QLabel *m_plabel;
49 49
50 OQCopMessage m_hmsg; 50 OQCopMessage m_hmsg;
51 QLabel *m_hicon; 51 QLabel *m_hicon;
52 QLabel *m_hlabel; 52 QLabel *m_hlabel;
53 53
54 bool m_pdirty : 1; 54 bool m_pdirty : 1;
55 bool m_hdirty : 1; 55 bool m_hdirty : 1;
56}; 56};
57 57
58 58
59ButtonSettings::ButtonSettings ( ) 59ButtonSettings::ButtonSettings ( QWidget *parent , const char *name, bool modal, WFlags f )
60 : QDialog ( 0, "ButtonSettings", false, WStyle_ContextHelp ) 60 : QDialog ( 0, "ButtonSettings", false, WStyle_ContextHelp )
61{ 61{
62 const QValueList <ODeviceButton> &buttons = ODevice::inst ( )-> buttons ( ); 62 const QValueList <ODeviceButton> &buttons = ODevice::inst ( )-> buttons ( );
63 (void) ButtonUtils::inst ( ); // initialise 63 (void) ButtonUtils::inst ( ); // initialise
64 64
65 setCaption ( tr( "Button Settings" )); 65 setCaption ( tr( "Button Settings" ));
66 66
67 QVBoxLayout *toplay = new QVBoxLayout ( this, 3, 3 ); 67 QVBoxLayout *toplay = new QVBoxLayout ( this, 3, 3 );
68 68
69 QLabel *l = new QLabel ( tr( "<center>Press or hold the button you want to remap.</center>" ), this ); 69 QLabel *l = new QLabel ( tr( "<center>Press or hold the button you want to remap.</center>" ), this );
70 toplay-> addWidget ( l ); 70 toplay-> addWidget ( l );
71 71
diff --git a/core/settings/button/buttonsettings.h b/core/settings/button/buttonsettings.h
index d41a209..67694d3 100644
--- a/core/settings/button/buttonsettings.h
+++ b/core/settings/button/buttonsettings.h
@@ -33,27 +33,28 @@
33#include <opie/odevice.h> 33#include <opie/odevice.h>
34 34
35class QTimer; 35class QTimer;
36 36
37using namespace Opie; 37using namespace Opie;
38 38
39class buttoninfo; 39class buttoninfo;
40 40
41class ButtonSettings : public QDialog { 41class ButtonSettings : public QDialog {
42 Q_OBJECT 42 Q_OBJECT
43 43
44public: 44public:
45 ButtonSettings ( ); 45 ButtonSettings ( QWidget *parent = 0, const char *name = 0, bool modal = FALSE,WFlags f = 0 );
46 ~ButtonSettings ( ); 46 ~ButtonSettings ( );
47 47
48 static QString appName() { return QString::fromLatin1("buttonsettings"); }
48 virtual void accept ( ); 49 virtual void accept ( );
49 virtual void done ( int r ); 50 virtual void done ( int r );
50 51
51private slots: 52private slots:
52 void keyTimeout ( ); 53 void keyTimeout ( );
53 void updateLabels ( ); 54 void updateLabels ( );
54 55
55protected: 56protected:
56 virtual void keyPressEvent ( QKeyEvent *e ); 57 virtual void keyPressEvent ( QKeyEvent *e );
57 virtual void keyReleaseEvent ( QKeyEvent *e ); 58 virtual void keyReleaseEvent ( QKeyEvent *e );
58 59
59private: 60private:
diff --git a/core/settings/button/main.cpp b/core/settings/button/main.cpp
index db274f8..c063c3c 100644
--- a/core/settings/button/main.cpp
+++ b/core/settings/button/main.cpp
@@ -19,25 +19,15 @@
19 :     =  ...= . :.=- You should have received a copy of the GNU 19 :     =  ...= . :.=- You should have received a copy of the GNU
20 -.   .:....=;==+<; General Public License along with this file; 20 -.   .:....=;==+<; General Public License along with this file;
21  -_. . .   )=.  = see the file COPYING. If not, write to the 21  -_. . .   )=.  = see the file COPYING. If not, write to the
22    --        :-=` Free Software Foundation, Inc., 22    --        :-=` Free Software Foundation, Inc.,
23 59 Temple Place - Suite 330, 23 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA. 24 Boston, MA 02111-1307, USA.
25 25
26*/ 26*/
27 27
28#include "buttonsettings.h" 28#include "buttonsettings.h"
29 29
30#include <qpe/qpeapplication.h> 30#include <qpe/qpeapplication.h>
31#include <opie/oapplicationfactory.h>
31 32
32 33OPIE_EXPORT_APP( OApplicationFactory<ButtonSettings> )
33int main ( int argc, char** argv )
34{
35 QPEApplication a ( argc,argv );
36
37 ButtonSettings dlg;
38 a. showMainWidget ( &dlg );
39 dlg. showMaximized ( );
40
41 return a. exec ( );
42}
43