summaryrefslogtreecommitdiff
path: root/libopie2/opieui/okeyconfigwidget.cpp
authorzecke <zecke>2004-04-04 21:27:42 (UTC)
committer zecke <zecke>2004-04-04 21:27:42 (UTC)
commitf664b509b5e622ab74560fb74093175e50b2790c (patch) (unidiff)
treed46acaa8dd49ab2de70aebcdcf57bce1276c6fd1 /libopie2/opieui/okeyconfigwidget.cpp
parenteb2831b5c94c4c27b8282842c9709234f5365e01 (diff)
downloadopie-f664b509b5e622ab74560fb74093175e50b2790c.zip
opie-f664b509b5e622ab74560fb74093175e50b2790c.tar.gz
opie-f664b509b5e622ab74560fb74093175e50b2790c.tar.bz2
Opie::XYZ::Private -> Opie::XYZ::Internal
Diffstat (limited to 'libopie2/opieui/okeyconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/okeyconfigwidget.cpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/libopie2/opieui/okeyconfigwidget.cpp b/libopie2/opieui/okeyconfigwidget.cpp
index ef6d713..eb7acbd 100644
--- a/libopie2/opieui/okeyconfigwidget.cpp
+++ b/libopie2/opieui/okeyconfigwidget.cpp
@@ -475,10 +475,10 @@ OKeyConfigManager::~OKeyConfigManager() {
475 * If a Key is restricted but was in the config we will 475 * If a Key is restricted but was in the config we will
476 * make it be the empty key paur 476 * make it be the empty key paur
477 * We will change the group of the OConfig Item! 477 * We will change the group but restore to the previous.
478 * 478 *
479 * @see OKeyPair::emptyKey 479 * @see OKeyPair::emptyKey
480 */ 480 */
481void OKeyConfigManager::load() { 481void OKeyConfigManager::load() {
482 m_conf->setGroup( m_group ); 482 Opie::Core::OConfigGroupSaver( m_conf, m_group );
483 483
484 /* 484 /*
@@ -501,8 +501,9 @@ void OKeyConfigManager::load() {
501/** 501/**
502 * We will save the current configuration 502 * We will save the current configuration
503 * to the OConfig. We will change the group. 503 * to the OConfig. We will change the group but restore
504 * to the previous
504 */ 505 */
505void OKeyConfigManager::save() { 506void OKeyConfigManager::save() {
506 m_conf->setGroup( m_group ); 507 Opie::Core::OConfigGroupSaver( m_conf, m_group );
507 508
508 /* 509 /*
@@ -545,5 +546,5 @@ OKeyConfigItem OKeyConfigManager::handleKeyEvent( QKeyEvent* e ) {
545 */ 546 */
546 int key, mod; 547 int key, mod;
547 Opie::Ui::Private::fixupKeys( key, mod, e ); 548 Opie::Ui::Internal::fixupKeys( key, mod, e );
548 549
549 OKeyConfigItem::List _keyList = keyList( key ); 550 OKeyConfigItem::List _keyList = keyList( key );
@@ -717,5 +718,5 @@ OKeyConfigItem::List OKeyConfigManager::keyList( int keycode) {
717namespace Opie { 718namespace Opie {
718namespace Ui { 719namespace Ui {
719namespace Private { 720namespace Internal {
720 721
721 OKeyListViewItem::OKeyListViewItem( const OKeyConfigItem& item, OKeyConfigManager* man, OListViewItem* parent) 722 OKeyListViewItem::OKeyListViewItem( const OKeyConfigItem& item, OKeyConfigManager* man, OListViewItem* parent)
@@ -939,5 +940,5 @@ OKeyConfigWidget::ChangeMode OKeyConfigWidget::changeMode()const {
939 */ 940 */
940void OKeyConfigWidget::insert( const QString& str, OKeyConfigManager* man ) { 941void OKeyConfigWidget::insert( const QString& str, OKeyConfigManager* man ) {
941 Opie::Ui::Private::OKeyConfigWidgetPrivate root( str, man ); 942 Opie::Ui::Internal::OKeyConfigWidgetPrivate root( str, man );
942 m_list.append(root); 943 m_list.append(root);
943} 944}
@@ -948,10 +949,10 @@ void OKeyConfigWidget::insert( const QString& str, OKeyConfigManager* man ) {
948 */ 949 */
949void OKeyConfigWidget::load() { 950void OKeyConfigWidget::load() {
950 Opie::Ui::Private::OKeyConfigWidgetPrivateList::Iterator it; 951 Opie::Ui::Internal::OKeyConfigWidgetPrivateList::Iterator it;
951 for ( it = m_list.begin(); it != m_list.end(); ++it ) { 952 for ( it = m_list.begin(); it != m_list.end(); ++it ) {
952 OListViewItem *item = new OListViewItem( m_view, (*it).name ); 953 OListViewItem *item = new OListViewItem( m_view, (*it).name );
953 OKeyConfigItem::List list = (*it).manager->keyConfigList(); 954 OKeyConfigItem::List list = (*it).manager->keyConfigList();
954 for (OKeyConfigItem::List::Iterator keyIt = list.begin(); keyIt != list.end();++keyIt ) 955 for (OKeyConfigItem::List::Iterator keyIt = list.begin(); keyIt != list.end();++keyIt )
955 (void )new Opie::Ui::Private::OKeyListViewItem(*keyIt, (*it).manager, item ); 956 (void )new Opie::Ui::Internal::OKeyListViewItem(*keyIt, (*it).manager, item );
956 957
957 } 958 }
@@ -970,5 +971,5 @@ void OKeyConfigWidget::save() {
970 while ( it.current() ) { 971 while ( it.current() ) {
971 if (it.current()->parent() ) { 972 if (it.current()->parent() ) {
972 Opie::Ui::Private::OKeyListViewItem *item = static_cast<Opie::Ui::Private::OKeyListViewItem*>( it.current() ); 973 Opie::Ui::Internal::OKeyListViewItem *item = static_cast<Opie::Ui::Internal::OKeyListViewItem*>( it.current() );
973 OKeyConfigManager *man = item->manager(); 974 OKeyConfigManager *man = item->manager();
974 man->removeKeyConfig( item->origItem() ); 975 man->removeKeyConfig( item->origItem() );
@@ -994,5 +995,5 @@ void OKeyConfigWidget::slotListViewItem( QListViewItem* _item) {
994 }else{ 995 }else{
995 m_box->setEnabled( true ); 996 m_box->setEnabled( true );
996 Opie::Ui::Private::OKeyListViewItem *item = static_cast<Opie::Ui::Private::OKeyListViewItem*>( _item ); 997 Opie::Ui::Internal::OKeyListViewItem *item = static_cast<Opie::Ui::Internal::OKeyListViewItem*>( _item );
997 OKeyConfigItem keyItem= item->item(); 998 OKeyConfigItem keyItem= item->item();
998 m_lbl->setText( tr("Default: " )+ item->text( 3 ) ); 999 m_lbl->setText( tr("Default: " )+ item->text( 3 ) );
@@ -1025,5 +1026,5 @@ void OKeyConfigWidget::slotNoKey() {
1025 * If immediate we need to remove and readd the key 1026 * If immediate we need to remove and readd the key
1026 */ 1027 */
1027 Opie::Ui::Private::OKeyListViewItem *item = static_cast<Opie::Ui::Private::OKeyListViewItem*>(m_view->currentItem()); 1028 Opie::Ui::Internal::OKeyListViewItem *item = static_cast<Opie::Ui::Internal::OKeyListViewItem*>(m_view->currentItem());
1028 updateItem( item, OKeyPair::emptyKey() ); 1029 updateItem( item, OKeyPair::emptyKey() );
1029} 1030}
@@ -1038,5 +1039,5 @@ void OKeyConfigWidget::slotDefaultKey() {
1038 return; 1039 return;
1039 1040
1040 Opie::Ui::Private::OKeyListViewItem *item = static_cast<Opie::Ui::Private::OKeyListViewItem*>(m_view->currentItem()); 1041 Opie::Ui::Internal::OKeyListViewItem *item = static_cast<Opie::Ui::Internal::OKeyListViewItem*>(m_view->currentItem());
1041 updateItem( item, item->item().defaultKeyPair() ); 1042 updateItem( item, item->item().defaultKeyPair() );
1042} 1043}
@@ -1064,5 +1065,5 @@ void OKeyConfigWidget::slotConfigure() {
1064 1065
1065 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) { 1066 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) {
1066 Opie::Ui::Private::OKeyListViewItem *item = static_cast<Opie::Ui::Private::OKeyListViewItem*>(m_view->currentItem()); 1067 Opie::Ui::Internal::OKeyListViewItem *item = static_cast<Opie::Ui::Internal::OKeyListViewItem*>(m_view->currentItem());
1067 updateItem( item, dlg.keyPair() ); 1068 updateItem( item, dlg.keyPair() );
1068 } 1069 }
@@ -1071,5 +1072,5 @@ void OKeyConfigWidget::slotConfigure() {
1071} 1072}
1072 1073
1073bool OKeyConfigWidget::sanityCheck( Opie::Ui::Private::OKeyListViewItem* item, 1074bool OKeyConfigWidget::sanityCheck( Opie::Ui::Internal::OKeyListViewItem* item,
1074 const OKeyPair& newItem ) { 1075 const OKeyPair& newItem ) {
1075 OKeyPair::List bList = item->manager()->blackList(); 1076 OKeyPair::List bList = item->manager()->blackList();
@@ -1090,5 +1091,5 @@ bool OKeyConfigWidget::sanityCheck( Opie::Ui::Private::OKeyListViewItem* item,
1090 if (it.current()->parent() && it.current() != item) { 1091 if (it.current()->parent() && it.current() != item) {
1091 /* damn already given away*/ 1092 /* damn already given away*/
1092 if ( newItem == static_cast<Opie::Ui::Private::OKeyListViewItem*>(it.current() )->item().keyPair() ) { 1093 if ( newItem == static_cast<Opie::Ui::Internal::OKeyListViewItem*>(it.current() )->item().keyPair() ) {
1093 QMessageBox::warning( 0, tr("Key is already assigned" ), 1094 QMessageBox::warning( 0, tr("Key is already assigned" ),
1094 tr("<qt>The Key you choose is already taken by " 1095 tr("<qt>The Key you choose is already taken by "
@@ -1104,5 +1105,5 @@ bool OKeyConfigWidget::sanityCheck( Opie::Ui::Private::OKeyListViewItem* item,
1104} 1105}
1105 1106
1106void OKeyConfigWidget::updateItem( Opie::Ui::Private::OKeyListViewItem *item, 1107void OKeyConfigWidget::updateItem( Opie::Ui::Internal::OKeyListViewItem *item,
1107 const OKeyPair& newItem) { 1108 const OKeyPair& newItem) {
1108 /* sanity check 1109 /* sanity check
@@ -1166,5 +1167,5 @@ void OKeyChooserConfigDialog::keyPressEvent( QKeyEvent* ev ) {
1166 1167
1167 int mod, key; 1168 int mod, key;
1168 Opie::Ui::Private::fixupKeys( key,mod, ev ); 1169 Opie::Ui::Internal::fixupKeys( key,mod, ev );
1169 1170
1170 /* either we used software keyboard 1171 /* either we used software keyboard
@@ -1201,5 +1202,5 @@ void OKeyChooserConfigDialog::keyPressEvent( QKeyEvent* ev ) {
1201 } 1202 }
1202 1203
1203 m_lbl->setText( Opie::Ui::Private::keyToString( m_keyPair ) ); 1204 m_lbl->setText( Opie::Ui::Internal::keyToString( m_keyPair ) );
1204 1205
1205} 1206}
@@ -1237,5 +1238,5 @@ void OKeyChooserConfigDialog::keyReleaseEvent( QKeyEvent* ev ) {
1237 m_key = key; 1238 m_key = key;
1238 m_keyPair = OKeyPair( m_key, m_mod ); 1239 m_keyPair = OKeyPair( m_key, m_mod );
1239 m_lbl->setText( Opie::Ui::Private::keyToString( m_keyPair ) ); 1240 m_lbl->setText( Opie::Ui::Internal::keyToString( m_keyPair ) );
1240 } 1241 }
1241} 1242}