summaryrefslogtreecommitdiff
path: root/libopie2/opieui/okeyconfigwidget.cpp
authorzecke <zecke>2004-03-28 20:39:22 (UTC)
committer zecke <zecke>2004-03-28 20:39:22 (UTC)
commitb4c5da4a6cf51753e8d2da505197326e05323d73 (patch) (unidiff)
tree6b9814683e717f8445496dc0d4c8d23eda223dc3 /libopie2/opieui/okeyconfigwidget.cpp
parent4cbd5ad37e51b7bc9c749f8eda2e46a806d904b0 (diff)
downloadopie-b4c5da4a6cf51753e8d2da505197326e05323d73.zip
opie-b4c5da4a6cf51753e8d2da505197326e05323d73.tar.gz
opie-b4c5da4a6cf51753e8d2da505197326e05323d73.tar.bz2
From yesterday. Some sort of GUI loading
Diffstat (limited to 'libopie2/opieui/okeyconfigwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/okeyconfigwidget.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/libopie2/opieui/okeyconfigwidget.cpp b/libopie2/opieui/okeyconfigwidget.cpp
index 2ea0bd5..273f15b 100644
--- a/libopie2/opieui/okeyconfigwidget.cpp
+++ b/libopie2/opieui/okeyconfigwidget.cpp
@@ -539,5 +539,4 @@ OKeyConfigItem OKeyConfigManager::handleKeyEvent( QKeyEvent* e ) {
539 * else change the button mod only 539 * else change the button mod only
540 */ 540 */
541 qWarning( "handleKeyEvent...." );
542 if ( key == 0 ) { 541 if ( key == 0 ) {
543 key = e->ascii(); 542 key = e->ascii();
@@ -608,4 +607,10 @@ void OKeyConfigManager::clearKeyConfig() {
608} 607}
609 608
609/**
610 *
611 */
612Opie::Ui::OKeyConfigItem::List OKeyConfigManager::keyConfigList()const{
613 return m_keys;
614}
610 615
611/** 616/**
@@ -754,9 +759,9 @@ namespace Private {
754 } 759 }
755 void OKeyListViewItem::setItem( const OKeyConfigItem& item ) { 760 void OKeyListViewItem::setItem( const OKeyConfigItem& item ) {
761 m_item = item;
756 setPixmap( 0, m_item.pixmap() ); 762 setPixmap( 0, m_item.pixmap() );
757 setText ( 1, m_item.text() ); 763 setText ( 1, m_item.text() );
758 setText ( 2, keyToString( m_item.keyPair() ) ); 764 setText ( 2, keyToString( m_item.keyPair() ) );
759 setText ( 3, keyToString( m_item.defaultKeyPair() ) ); 765 setText ( 3, keyToString( m_item.defaultKeyPair() ) );
760 m_item = item;
761 } 766 }
762 767
@@ -854,5 +859,4 @@ void OKeyConfigWidget::initUi() {
854 859
855 QGroupBox *box = new QGroupBox( this ); 860 QGroupBox *box = new QGroupBox( this );
856 box ->setEnabled( false );
857 box ->setTitle( tr("Shortcut for Selected Action") ); 861 box ->setTitle( tr("Shortcut for Selected Action") );
858 box ->setFrameStyle( QFrame::Box | QFrame::Sunken ); 862 box ->setFrameStyle( QFrame::Box | QFrame::Sunken );
@@ -930,6 +934,13 @@ void OKeyConfigWidget::insert( const QString& str, OKeyConfigManager* man ) {
930 */ 934 */
931void OKeyConfigWidget::load() { 935void OKeyConfigWidget::load() {
936 Opie::Ui::Private::OKeyConfigWidgetPrivateList::Iterator it;
937 for ( it = m_list.begin(); it != m_list.end(); ++it ) {
938 OListViewItem *item = new OListViewItem( m_view, (*it).name );
939 OKeyConfigItem::List list = (*it).manager->keyConfigList();
940 for (OKeyConfigItem::List::Iterator keyIt = list.begin(); keyIt != list.end();++keyIt )
941 (void )new Opie::Ui::Private::OKeyListViewItem(*keyIt, (*it).manager, item );
932 942
933} 943}
944}
934 945
935/** 946/**
@@ -972,4 +983,5 @@ void OKeyConfigWidget::slotListViewItem( QListViewItem* _item) {
972 983
973void OKeyConfigWidget::slotNoKey() { 984void OKeyConfigWidget::slotNoKey() {
985 qWarning( "No Key" );
974 m_none->setChecked( true ); 986 m_none->setChecked( true );
975 m_cus ->setChecked( false ); 987 m_cus ->setChecked( false );
@@ -996,4 +1008,5 @@ void OKeyConfigWidget::slotNoKey() {
996 1008
997void OKeyConfigWidget::slotDefaultKey() { 1009void OKeyConfigWidget::slotDefaultKey() {
1010 qWarning( "Slot Default Key" );
998 m_none->setChecked( true ); 1011 m_none->setChecked( true );
999 m_cus ->setChecked( false ); 1012 m_cus ->setChecked( false );
@@ -1019,4 +1032,5 @@ void OKeyConfigWidget::slotDefaultKey() {
1019 1032
1020void OKeyConfigWidget::slotCustomKey() { 1033void OKeyConfigWidget::slotCustomKey() {
1034 qWarning( "SlotCustom Key" );
1021 m_cus ->setChecked( true ); 1035 m_cus ->setChecked( true );
1022 m_btn ->setEnabled( true ); 1036 m_btn ->setEnabled( true );