summaryrefslogtreecommitdiff
path: root/libopie2/examples/opieui
authorzecke <zecke>2004-04-13 14:53:58 (UTC)
committer zecke <zecke>2004-04-13 14:53:58 (UTC)
commitb51d88d7b0b517b71ae3b59d8228335f38ca9fc7 (patch) (unidiff)
tree302377973a897934c944c7a126e5e0a510694979 /libopie2/examples/opieui
parentc4c842558e1457f64d43b237f24f6ea1a4f9d76b (diff)
downloadopie-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') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp30
-rw-r--r--libopie2/examples/opieui/okeyconfigwidget/testwidget.h10
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
@@ -31,3 +31,3 @@ private slots:
31private: 31private:
32 Opie::Ui::OKeyConfigManager *m_manager; 32 Opie::Core::OKeyConfigManager *m_manager;
33}; 33};
@@ -78,19 +78,19 @@ TestMainWindow::TestMainWindow( QWidget* parent, const char* slot, WFlags fl )
78 /* generate the black list */ 78 /* generate the black list */
79 Opie::Ui::OKeyPair::List blackList; 79 Opie::Core::OKeyPair::List blackList;
80 blackList.append( Opie::Ui::OKeyPair::leftArrowKey() ); 80 blackList.append( Opie::Core::OKeyPair::leftArrowKey() );
81 blackList.append( Opie::Ui::OKeyPair::rightArrowKey() ); 81 blackList.append( Opie::Core::OKeyPair::rightArrowKey() );
82 blackList.append( Opie::Ui::OKeyPair::downArrowKey() ); 82 blackList.append( Opie::Core::OKeyPair::downArrowKey() );
83 blackList.append( Opie::Ui::OKeyPair::upArrowKey() ); 83 blackList.append( Opie::Core::OKeyPair::upArrowKey() );
84 84
85 m_manager = new Opie::Ui::OKeyConfigManager( m_config, "Key Group", 85 m_manager = new Opie::Core::OKeyConfigManager( m_config, "Key Group",
86 blackList, false, this, "Key Manager" ); 86 blackList, false, this, "Key Manager" );
87 87
88 m_manager->addKeyConfig( Opie::Ui::OKeyConfigItem( tr( "Delete Action" ), "delete_key", QPixmap(), 88 m_manager->addKeyConfig( Opie::Core::OKeyConfigItem( tr( "Delete Action" ), "delete_key", QPixmap(),
89 10, Opie::Ui::OKeyPair( Qt::Key_D, Qt::ShiftButton ), this, 89 10, Opie::Core::OKeyPair( Qt::Key_D, Qt::ShiftButton ), this,
90 SLOT(slotDelete(QWidget*,QKeyEvent*)) ) ); 90 SLOT(slotDelete(QWidget*,QKeyEvent*)) ) );
91 m_manager->addKeyConfig( Opie::Ui::OKeyConfigItem( tr( "Show Action" ), "show_key", QPixmap(), 91 m_manager->addKeyConfig( Opie::Core::OKeyConfigItem( tr( "Show Action" ), "show_key", QPixmap(),
92 11, Opie::Ui::OKeyPair( Qt::Key_S, Qt::AltButton ) ) ); 92 11, Opie::Core::OKeyPair( Qt::Key_S, Qt::AltButton ) ) );
93 93
94 connect(m_manager, SIGNAL(actionActivated(QWidget*,QKeyEvent*,const Opie::Ui::OKeyConfigItem&)), 94 connect(m_manager, SIGNAL(actionActivated(QWidget*,QKeyEvent*,const Opie::Core::OKeyConfigItem&)),
95 this, SLOT(slotAction(QWidget*, QKeyEvent*, const Opie::Ui::OKeyConfigItem&)) ); 95 this, SLOT(slotAction(QWidget*, QKeyEvent*, const Opie::Core::OKeyConfigItem&)) );
96// when commenting the line below out the keyPressEvent will work 96// when commenting the line below out the keyPressEvent will work
@@ -105,3 +105,3 @@ TestMainWindow::~TestMainWindow() {
105 105
106Opie::Ui::OKeyConfigManager* TestMainWindow::manager() { 106Opie::Core::OKeyConfigManager* TestMainWindow::manager() {
107 return m_manager; 107 return m_manager;
@@ -123,3 +123,3 @@ void TestMainWindow::slotDelete( QWidget* wid, QKeyEvent* ev ) {
123 123
124void TestMainWindow::slotAction( QWidget* wid, QKeyEvent* ev, const Opie::Ui::OKeyConfigItem& item) { 124void TestMainWindow::slotAction( QWidget* wid, QKeyEvent* ev, const Opie::Core::OKeyConfigItem& item) {
125 qWarning( "Slot Action %d %d %d %s %d", wid, ev->key(), ev->state(), item.text().latin1(), item.id() ); 125 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
@@ -10,5 +10,3 @@ namespace Ui{
10 class OTabWidget; 10 class OTabWidget;
11 class OKeyConfigManager;
12 class OListView; 11 class OListView;
13 class OKeyConfigItem;
14} 12}
@@ -16,2 +14,4 @@ namespace Core {
16 class OConfig; 14 class OConfig;
15 class OKeyConfigManager;
16 class OKeyConfigItem;
17} 17}
@@ -28,3 +28,3 @@ public:
28 28
29 Opie::Ui::OKeyConfigManager *manager(); 29 Opie::Core::OKeyConfigManager *manager();
30protected: 30protected:
@@ -33,6 +33,6 @@ private slots:
33 void slotDelete( QWidget*, QKeyEvent* ); 33 void slotDelete( QWidget*, QKeyEvent* );
34 void slotAction( QWidget*, QKeyEvent*, const Opie::Ui::OKeyConfigItem& ); 34 void slotAction( QWidget*, QKeyEvent*, const Opie::Core::OKeyConfigItem& );
35private: 35private:
36 Opie::Core::OConfig *m_config; 36 Opie::Core::OConfig *m_config;
37 Opie::Ui::OKeyConfigManager *m_manager; 37 Opie::Core::OKeyConfigManager *m_manager;
38}; 38};