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