Diffstat (limited to 'core/pim/addressbook/configdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/configdlg.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/pim/addressbook/configdlg.cpp b/core/pim/addressbook/configdlg.cpp index a491fc7..648ad52 100644 --- a/core/pim/addressbook/configdlg.cpp +++ b/core/pim/addressbook/configdlg.cpp | |||
@@ -3,53 +3,52 @@ | |||
3 | #include <opie2/odebug.h> | 3 | #include <opie2/odebug.h> |
4 | #include <opie2/opimcontact.h> | 4 | #include <opie2/opimcontact.h> |
5 | #include <opie2/opimcontactfields.h> | 5 | #include <opie2/opimcontactfields.h> |
6 | #include <opie2/oresource.h> | 6 | #include <opie2/oresource.h> |
7 | 7 | ||
8 | #include <qcheckbox.h> | 8 | #include <qcheckbox.h> |
9 | #include <qradiobutton.h> | 9 | #include <qradiobutton.h> |
10 | #include <qlistbox.h> | 10 | #include <qlistbox.h> |
11 | #include <qpushbutton.h> | 11 | #include <qpushbutton.h> |
12 | 12 | ||
13 | ConfigDlg::ConfigDlg( QWidget *parent, const char *name): | 13 | ConfigDlg::ConfigDlg( QWidget *parent, const char *name): |
14 | ConfigDlg_Base(parent, name, true ) | 14 | ConfigDlg_Base(parent, name, true ) |
15 | { | 15 | { |
16 | contFields = Opie::OPimContactFields::trfields(); | 16 | contFields = Opie::OPimContactFields::trfields(); |
17 | 17 | ||
18 | // We add all Fields into the Listbox | 18 | // We add all Fields into the Listbox |
19 | for (uint i=0; i < contFields.count(); i++) { | 19 | for (uint i=0; i < contFields.count(); i++) { |
20 | allFieldListBox->insertItem( contFields[i] ); | 20 | allFieldListBox->insertItem( contFields[i] ); |
21 | } | 21 | } |
22 | 22 | ||
23 | // Reset Widget Flags: This was not changeable by designer :( | 23 | // Reset Widget Flags: This was not changeable by designer :( |
24 | setWFlags ( WStyle_ContextHelp ); | 24 | setWFlags ( WStyle_ContextHelp ); |
25 | 25 | ||
26 | // Set Pics to Buttons and Tabs | 26 | // Set Pics to Buttons and Tabs |
27 | m_upButton->setIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "addressbook/up" ) ) ); | 27 | m_upButton->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) ); |
28 | m_downButton->setIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "addressbook/down" ) ) ); | 28 | m_downButton->setPixmap( Opie::Core::OResource::loadPixmap( "down", Opie::Core::OResource::SmallIcon ) ); |
29 | m_addButton->setIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "addressbook/add" ) ) ); | 29 | m_addButton->setPixmap( Opie::Core::OResource::loadPixmap( "addressbook/add", Opie::Core::OResource::SmallIcon ) ); |
30 | m_removeButton->setIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "addressbook/sub" ) ) ); | 30 | m_removeButton->setPixmap( Opie::Core::OResource::loadPixmap( "addressbook/sub", Opie::Core::OResource::SmallIcon ) ); |
31 | |||
32 | 31 | ||
33 | // Get the translation maps between Field ID and translated strings | 32 | // Get the translation maps between Field ID and translated strings |
34 | m_mapStrToID = Opie::OPimContactFields::trFieldsToId(); | 33 | m_mapStrToID = Opie::OPimContactFields::trFieldsToId(); |
35 | m_mapIDToStr = Opie::OPimContactFields::idToTrFields(); | 34 | m_mapIDToStr = Opie::OPimContactFields::idToTrFields(); |
36 | 35 | ||
37 | connect ( m_addButton, SIGNAL( clicked() ), this, SLOT( slotItemAdd() ) ); | 36 | connect ( m_addButton, SIGNAL( clicked() ), this, SLOT( slotItemAdd() ) ); |
38 | connect ( m_removeButton, SIGNAL( clicked() ), this, SLOT( slotItemRemove() ) ); | 37 | connect ( m_removeButton, SIGNAL( clicked() ), this, SLOT( slotItemRemove() ) ); |
39 | connect ( m_upButton, SIGNAL( clicked() ), this, SLOT( slotItemUp() ) ); | 38 | connect ( m_upButton, SIGNAL( clicked() ), this, SLOT( slotItemUp() ) ); |
40 | connect ( m_downButton, SIGNAL( clicked() ), this, SLOT( slotItemDown() ) ); | 39 | connect ( m_downButton, SIGNAL( clicked() ), this, SLOT( slotItemDown() ) ); |
41 | } | 40 | } |
42 | 41 | ||
43 | void ConfigDlg::slotItemUp() | 42 | void ConfigDlg::slotItemUp() |
44 | { | 43 | { |
45 | odebug << "void ConfigDlg::slotItemUp()" << oendl; | 44 | odebug << "void ConfigDlg::slotItemUp()" << oendl; |
46 | 45 | ||
47 | int i = fieldListBox->currentItem(); | 46 | int i = fieldListBox->currentItem(); |
48 | if ( i > 0 ) { | 47 | if ( i > 0 ) { |
49 | QString item = fieldListBox->currentText(); | 48 | QString item = fieldListBox->currentText(); |
50 | fieldListBox->removeItem( i ); | 49 | fieldListBox->removeItem( i ); |
51 | fieldListBox->insertItem( item, i-1 ); | 50 | fieldListBox->insertItem( item, i-1 ); |
52 | fieldListBox->setCurrentItem( i-1 ); | 51 | fieldListBox->setCurrentItem( i-1 ); |
53 | } | 52 | } |
54 | 53 | ||
55 | } | 54 | } |