summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro4
-rw-r--r--libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp4
2 files changed, 5 insertions, 3 deletions
diff --git a/libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro b/libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro
index 07188d9..7c60384 100644
--- a/libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro
+++ b/libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro
@@ -1,12 +1,12 @@
1CONFIG += qt 1CONFIG += qt
2 2
3TEMPLATE = app 3TEMPLATE = app
4SOURCES = ../../../../noncore/graphics/opie-eye/lib/okeyconfigwidget.cpp testwidget.cpp 4SOURCES = testwidget.cpp
5HEADERS = ../../../../noncore/graphics/opie-eye/lib/okeyconfigwidget.h testwidget.h 5HEADERS = testwidget.h
6 6
7INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/noncore/graphics/opie-eye/lib/ 7INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/noncore/graphics/opie-eye/lib/
8DESTPATH += $(OPIEDIR)/include 8DESTPATH += $(OPIEDIR)/include
9 9
10LIBS += -lopieui2 -lopiecore2 10LIBS += -lopieui2 -lopiecore2
11 11
12include ( $(OPIEDIR)/include.pro ) 12include ( $(OPIEDIR)/include.pro )
diff --git a/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp b/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp
index 5553166..10b52f9 100644
--- a/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp
+++ b/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp
@@ -1,15 +1,15 @@
1#include "testwidget.h" 1#include "testwidget.h"
2 2
3#include "okeyconfigwidget.h" 3#include <opie2/okeyconfigwidget.h>
4 4
5#include <opie2/oapplicationfactory.h> 5#include <opie2/oapplicationfactory.h>
6#include <opie2/otabwidget.h> 6#include <opie2/otabwidget.h>
7 7
8#include <qpe/qpeapplication.h> 8#include <qpe/qpeapplication.h>
9 9
10#include <qevent.h> 10#include <qevent.h>
11#include <qlayout.h> 11#include <qlayout.h>
12#include <qpushbutton.h> 12#include <qpushbutton.h>
13#include <qmainwindow.h> 13#include <qmainwindow.h>
14#include <qdialog.h> 14#include <qdialog.h>
15 15
@@ -43,24 +43,26 @@ MainWindow::MainWindow( QWidget* parent, const char* name, WFlags fl )
43 QPushButton *btn = new QPushButton( tr("Configure" ), this ); 43 QPushButton *btn = new QPushButton( tr("Configure" ), this );
44 TestMainWindow *wid = new TestMainWindow( this, "name", 0 ); 44 TestMainWindow *wid = new TestMainWindow( this, "name", 0 );
45 45
46 lay->addWidget( btn ); 46 lay->addWidget( btn );
47 lay->addWidget( wid ); 47 lay->addWidget( wid );
48 m_manager = wid->manager(); 48 m_manager = wid->manager();
49 49
50 connect( btn, SIGNAL(clicked()), this, SLOT(slotClicked()) ); 50 connect( btn, SIGNAL(clicked()), this, SLOT(slotClicked()) );
51} 51}
52 52
53void MainWindow::slotClicked() { 53void MainWindow::slotClicked() {
54 QDialog diag( this, "name", true ); 54 QDialog diag( this, "name", true );
55 diag.setCaption( tr( "Manage Keys" ) );
56
55 QHBoxLayout *lay = new QHBoxLayout( &diag ); 57 QHBoxLayout *lay = new QHBoxLayout( &diag );
56 Opie::Ui::OKeyConfigWidget *wid = new Opie::Ui::OKeyConfigWidget( &diag, "key config" ); 58 Opie::Ui::OKeyConfigWidget *wid = new Opie::Ui::OKeyConfigWidget( &diag, "key config" );
57 wid->setChangeMode( Opie::Ui::OKeyConfigWidget::Queue ); 59 wid->setChangeMode( Opie::Ui::OKeyConfigWidget::Queue );
58 wid->insert( tr("MainWindow Options" ), m_manager ); 60 wid->insert( tr("MainWindow Options" ), m_manager );
59 wid->load(); 61 wid->load();
60 62
61 lay->addWidget( wid ); 63 lay->addWidget( wid );
62 64
63 if ( QPEApplication::execDialog( &diag ) == QDialog::Accepted ) { 65 if ( QPEApplication::execDialog( &diag ) == QDialog::Accepted ) {
64 wid->save(); 66 wid->save();
65 } 67 }
66} 68}