author | zecke <zecke> | 2004-04-02 06:42:17 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-02 06:42:17 (UTC) |
commit | fbe21a008888cef12eb863151b4aaee1e75f0f22 (patch) (side-by-side diff) | |
tree | f25c9b08de30c1b6360d16aa3236eb8c10b44051 | |
parent | d6c90e60dbc0a5bfd0bb2176a652ca7664a2a4b0 (diff) | |
download | opie-fbe21a008888cef12eb863151b4aaee1e75f0f22.zip opie-fbe21a008888cef12eb863151b4aaee1e75f0f22.tar.gz opie-fbe21a008888cef12eb863151b4aaee1e75f0f22.tar.bz2 |
update the example as well
-rw-r--r-- | libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro | 4 | ||||
-rw-r--r-- | libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp | 4 |
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 @@ CONFIG += qt TEMPLATE = app -SOURCES = ../../../../noncore/graphics/opie-eye/lib/okeyconfigwidget.cpp testwidget.cpp -HEADERS = ../../../../noncore/graphics/opie-eye/lib/okeyconfigwidget.h testwidget.h +SOURCES = testwidget.cpp +HEADERS = testwidget.h INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/noncore/graphics/opie-eye/lib/ DESTPATH += $(OPIEDIR)/include LIBS += -lopieui2 -lopiecore2 include ( $(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,19 +1,19 @@ #include "testwidget.h" -#include "okeyconfigwidget.h" +#include <opie2/okeyconfigwidget.h> #include <opie2/oapplicationfactory.h> #include <opie2/otabwidget.h> #include <qpe/qpeapplication.h> #include <qevent.h> #include <qlayout.h> #include <qpushbutton.h> #include <qmainwindow.h> #include <qdialog.h> /** * QObject with signals and slots inside a .cpp * requires the .moc at the bottom! and a run of qmake @@ -39,32 +39,34 @@ OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<MainWindow> ) MainWindow::MainWindow( QWidget* parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ) { QVBoxLayout *lay = new QVBoxLayout( this ); QPushButton *btn = new QPushButton( tr("Configure" ), this ); TestMainWindow *wid = new TestMainWindow( this, "name", 0 ); lay->addWidget( btn ); lay->addWidget( wid ); m_manager = wid->manager(); connect( btn, SIGNAL(clicked()), this, SLOT(slotClicked()) ); } void MainWindow::slotClicked() { QDialog diag( this, "name", true ); + diag.setCaption( tr( "Manage Keys" ) ); + QHBoxLayout *lay = new QHBoxLayout( &diag ); Opie::Ui::OKeyConfigWidget *wid = new Opie::Ui::OKeyConfigWidget( &diag, "key config" ); wid->setChangeMode( Opie::Ui::OKeyConfigWidget::Queue ); wid->insert( tr("MainWindow Options" ), m_manager ); wid->load(); lay->addWidget( wid ); if ( QPEApplication::execDialog( &diag ) == QDialog::Accepted ) { wid->save(); } } TestMainWindow::TestMainWindow( QWidget* parent, const char* slot, WFlags fl ) : Opie::Ui::OListView( parent, slot, fl) { |