author | zecke <zecke> | 2004-04-13 14:53:58 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-13 14:53:58 (UTC) |
commit | b51d88d7b0b517b71ae3b59d8228335f38ca9fc7 (patch) (side-by-side diff) | |
tree | 302377973a897934c944c7a126e5e0a510694979 /libopie2/examples/opieui/okeyconfigwidget | |
parent | c4c842558e1457f64d43b237f24f6ea1a4f9d76b (diff) | |
download | opie-b51d88d7b0b517b71ae3b59d8228335f38ca9fc7.zip opie-b51d88d7b0b517b71ae3b59d8228335f38ca9fc7.tar.gz opie-b51d88d7b0b517b71ae3b59d8228335f38ca9fc7.tar.bz2 |
Split the KeyConfig Manager and Widget into Ui and Core parts
Adjust the only user...
Don't add a 2nd example to core but mention the one for the classes
in opieui/okeyconfigwidget
Diffstat (limited to 'libopie2/examples/opieui/okeyconfigwidget') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp | 30 | ||||
-rw-r--r-- | libopie2/examples/opieui/okeyconfigwidget/testwidget.h | 10 |
2 files changed, 20 insertions, 20 deletions
diff --git a/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp b/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp index 10b52f9..5c7bac2 100644 --- a/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp +++ b/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp @@ -30,5 +30,5 @@ private slots: void slotClicked(); private: - Opie::Ui::OKeyConfigManager *m_manager; + Opie::Core::OKeyConfigManager *m_manager; }; @@ -77,21 +77,21 @@ TestMainWindow::TestMainWindow( QWidget* parent, const char* slot, WFlags fl ) /* generate the black list */ - Opie::Ui::OKeyPair::List blackList; - blackList.append( Opie::Ui::OKeyPair::leftArrowKey() ); - blackList.append( Opie::Ui::OKeyPair::rightArrowKey() ); - blackList.append( Opie::Ui::OKeyPair::downArrowKey() ); - blackList.append( Opie::Ui::OKeyPair::upArrowKey() ); + Opie::Core::OKeyPair::List blackList; + blackList.append( Opie::Core::OKeyPair::leftArrowKey() ); + blackList.append( Opie::Core::OKeyPair::rightArrowKey() ); + blackList.append( Opie::Core::OKeyPair::downArrowKey() ); + blackList.append( Opie::Core::OKeyPair::upArrowKey() ); - m_manager = new Opie::Ui::OKeyConfigManager( m_config, "Key Group", + m_manager = new Opie::Core::OKeyConfigManager( m_config, "Key Group", blackList, false, this, "Key Manager" ); - m_manager->addKeyConfig( Opie::Ui::OKeyConfigItem( tr( "Delete Action" ), "delete_key", QPixmap(), - 10, Opie::Ui::OKeyPair( Qt::Key_D, Qt::ShiftButton ), this, + m_manager->addKeyConfig( Opie::Core::OKeyConfigItem( tr( "Delete Action" ), "delete_key", QPixmap(), + 10, Opie::Core::OKeyPair( Qt::Key_D, Qt::ShiftButton ), this, SLOT(slotDelete(QWidget*,QKeyEvent*)) ) ); - m_manager->addKeyConfig( Opie::Ui::OKeyConfigItem( tr( "Show Action" ), "show_key", QPixmap(), - 11, Opie::Ui::OKeyPair( Qt::Key_S, Qt::AltButton ) ) ); + m_manager->addKeyConfig( Opie::Core::OKeyConfigItem( tr( "Show Action" ), "show_key", QPixmap(), + 11, Opie::Core::OKeyPair( Qt::Key_S, Qt::AltButton ) ) ); - connect(m_manager, SIGNAL(actionActivated(QWidget*,QKeyEvent*,const Opie::Ui::OKeyConfigItem&)), - this, SLOT(slotAction(QWidget*, QKeyEvent*, const Opie::Ui::OKeyConfigItem&)) ); + connect(m_manager, SIGNAL(actionActivated(QWidget*,QKeyEvent*,const Opie::Core::OKeyConfigItem&)), + this, SLOT(slotAction(QWidget*, QKeyEvent*, const Opie::Core::OKeyConfigItem&)) ); // when commenting the line below out the keyPressEvent will work m_manager->handleWidget( this ); @@ -104,5 +104,5 @@ TestMainWindow::~TestMainWindow() { } -Opie::Ui::OKeyConfigManager* TestMainWindow::manager() { +Opie::Core::OKeyConfigManager* TestMainWindow::manager() { return m_manager; } @@ -122,5 +122,5 @@ void TestMainWindow::slotDelete( QWidget* wid, QKeyEvent* ev ) { } -void TestMainWindow::slotAction( QWidget* wid, QKeyEvent* ev, const Opie::Ui::OKeyConfigItem& item) { +void TestMainWindow::slotAction( QWidget* wid, QKeyEvent* ev, const Opie::Core::OKeyConfigItem& item) { qWarning( "Slot Action %d %d %d %s %d", wid, ev->key(), ev->state(), item.text().latin1(), item.id() ); } diff --git a/libopie2/examples/opieui/okeyconfigwidget/testwidget.h b/libopie2/examples/opieui/okeyconfigwidget/testwidget.h index b95c225..6ecb346 100644 --- a/libopie2/examples/opieui/okeyconfigwidget/testwidget.h +++ b/libopie2/examples/opieui/okeyconfigwidget/testwidget.h @@ -9,10 +9,10 @@ namespace Opie{ namespace Ui{ class OTabWidget; - class OKeyConfigManager; class OListView; - class OKeyConfigItem; } namespace Core { class OConfig; + class OKeyConfigManager; + class OKeyConfigItem; } } @@ -27,13 +27,13 @@ public: ~TestMainWindow(); - Opie::Ui::OKeyConfigManager *manager(); + Opie::Core::OKeyConfigManager *manager(); protected: void keyPressEvent( QKeyEvent* ); private slots: void slotDelete( QWidget*, QKeyEvent* ); - void slotAction( QWidget*, QKeyEvent*, const Opie::Ui::OKeyConfigItem& ); + void slotAction( QWidget*, QKeyEvent*, const Opie::Core::OKeyConfigItem& ); private: Opie::Core::OConfig *m_config; - Opie::Ui::OKeyConfigManager *m_manager; + Opie::Core::OKeyConfigManager *m_manager; }; |