summaryrefslogtreecommitdiff
path: root/core/settings/button
Side-by-side diff
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 @@
-TEMPLATE = app
-CONFIG += qt warn_on release
-DESTDIR = $(OPIEDIR)/bin
+CONFIG += qt warn_on release quick-app
+
HEADERS = buttonsettings.h \
buttonutils.h \
remapdlg.h
SOURCES = main.cpp \
buttonsettings.cpp \
buttonutils.cpp \
remapdlg.cpp
INTERFACES = remapdlgbase.ui
INCLUDEPATH += $(OPIEDIR)/include
@@ -26,15 +25,13 @@ TRANSLATIONS = ../../../i18n/de/buttonsettings.ts \
../../../i18n/hu/buttonsettings.ts \
../../../i18n/ja/buttonsettings.ts \
../../../i18n/ko/buttonsettings.ts \
../../../i18n/no/buttonsettings.ts \
../../../i18n/pl/buttonsettings.ts \
../../../i18n/pt/buttonsettings.ts \
../../../i18n/pt_BR/buttonsettings.ts \
../../../i18n/sl/buttonsettings.ts \
../../../i18n/zh_CN/buttonsettings.ts \
../../../i18n/zh_TW/buttonsettings.ts \
../../../i18n/da/buttonsettings.ts
-
-
include ( $(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 {
QLabel *m_picon;
QLabel *m_plabel;
OQCopMessage m_hmsg;
QLabel *m_hicon;
QLabel *m_hlabel;
bool m_pdirty : 1;
bool m_hdirty : 1;
};
-ButtonSettings::ButtonSettings ( )
+ButtonSettings::ButtonSettings ( QWidget *parent , const char *name, bool modal, WFlags f )
: QDialog ( 0, "ButtonSettings", false, WStyle_ContextHelp )
{
const QValueList <ODeviceButton> &buttons = ODevice::inst ( )-> buttons ( );
(void) ButtonUtils::inst ( ); // initialise
setCaption ( tr( "Button Settings" ));
QVBoxLayout *toplay = new QVBoxLayout ( this, 3, 3 );
QLabel *l = new QLabel ( tr( "<center>Press or hold the button you want to remap.</center>" ), this );
toplay-> addWidget ( l );
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 @@
#include <opie/odevice.h>
class QTimer;
using namespace Opie;
class buttoninfo;
class ButtonSettings : public QDialog {
Q_OBJECT
public:
- ButtonSettings ( );
+ ButtonSettings ( QWidget *parent = 0, const char *name = 0, bool modal = FALSE,WFlags f = 0 );
~ButtonSettings ( );
+ static QString appName() { return QString::fromLatin1("buttonsettings"); }
virtual void accept ( );
virtual void done ( int r );
private slots:
void keyTimeout ( );
void updateLabels ( );
protected:
virtual void keyPressEvent ( QKeyEvent *e );
virtual void keyReleaseEvent ( QKeyEvent *e );
private:
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 @@
 :     =  ...= . :.=- You should have received a copy of the GNU
 -.   .:....=;==+<; General Public License along with this file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "buttonsettings.h"
#include <qpe/qpeapplication.h>
+#include <opie/oapplicationfactory.h>
-
-int main ( int argc, char** argv )
-{
- QPEApplication a ( argc,argv );
-
- ButtonSettings dlg;
- a. showMainWidget ( &dlg );
- dlg. showMaximized ( );
-
- return a. exec ( );
-}
-
+OPIE_EXPORT_APP( OApplicationFactory<ButtonSettings> )