-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 4e73114..254cff7 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -45,100 +45,100 @@ | |||
45 | #include <qlistbox.h> | 45 | #include <qlistbox.h> |
46 | #include <qhbox.h> | 46 | #include <qhbox.h> |
47 | #include <qaction.h> | 47 | #include <qaction.h> |
48 | #include <qiconset.h> | 48 | #include <qiconset.h> |
49 | 49 | ||
50 | static inline bool containsAlphaNum( const QString &str ); | 50 | static inline bool containsAlphaNum( const QString &str ); |
51 | static inline bool constainsWhiteSpace( const QString &str ); | 51 | static inline bool constainsWhiteSpace( const QString &str ); |
52 | 52 | ||
53 | // helper functions, convert our comma delimited list to proper | 53 | // helper functions, convert our comma delimited list to proper |
54 | // file format... | 54 | // file format... |
55 | void parseEmailFrom( const QString &txt, QString &strDefaultEmail, | 55 | void parseEmailFrom( const QString &txt, QString &strDefaultEmail, |
56 | QString &strAll ); | 56 | QString &strAll ); |
57 | 57 | ||
58 | // helper convert from file format to comma delimited... | 58 | // helper convert from file format to comma delimited... |
59 | void parseEmailTo( const QString &strDefaultEmail, | 59 | void parseEmailTo( const QString &strDefaultEmail, |
60 | const QString &strOtherEmail, QString &strBack ); | 60 | const QString &strOtherEmail, QString &strBack ); |
61 | 61 | ||
62 | ContactEditor::ContactEditor(const OContact &entry, | 62 | ContactEditor::ContactEditor(const OContact &entry, |
63 | QWidget *parent, | 63 | QWidget *parent, |
64 | const char *name, | 64 | const char *name, |
65 | WFlags fl ) | 65 | WFlags fl ) |
66 | : QDialog( parent, name, TRUE, fl ), | 66 | : QDialog( parent, name, TRUE, fl ), |
67 | m_personalView ( false ) | 67 | m_personalView ( false ) |
68 | 68 | ||
69 | { | 69 | { |
70 | 70 | ||
71 | init(); | 71 | init(); |
72 | setEntry( entry ); | 72 | setEntry( entry ); |
73 | cmbDefaultEmail = 0; | 73 | cmbDefaultEmail = 0; |
74 | defaultEmailChooserPosition = -1; | 74 | defaultEmailChooserPosition = -1; |
75 | } | 75 | } |
76 | 76 | ||
77 | ContactEditor::~ContactEditor() { | 77 | ContactEditor::~ContactEditor() { |
78 | } | 78 | } |
79 | 79 | ||
80 | void ContactEditor::init() { | 80 | void ContactEditor::init() { |
81 | 81 | ||
82 | useFullName = true; | 82 | useFullName = true; |
83 | 83 | ||
84 | uint i = 0; | 84 | uint i = 0; |
85 | 85 | ||
86 | QStringList trlChooserNames; | 86 | QStringList trlChooserNames; |
87 | 87 | ||
88 | for (i = 0; i <= 6; i++) { | 88 | for (i = 0; i <= 6; i++) { |
89 | slHomeAddress.append( "" ); | 89 | slHomeAddress.append( "" ); |
90 | slBusinessAddress.append( "" ); | 90 | slBusinessAddress.append( "" ); |
91 | } | 91 | } |
92 | 92 | ||
93 | trlChooserNames = OContactFields::trphonefields(); | 93 | trlChooserNames = OContactFields::trphonefields( false ); |
94 | slChooserNames = OContactFields::untrphonefields(); | 94 | slChooserNames = OContactFields::untrphonefields( false ); |
95 | slDynamicEntries = OContactFields::untrdetailsfields(); | 95 | slDynamicEntries = OContactFields::untrdetailsfields( false ); |
96 | trlDynamicEntries = OContactFields::trdetailsfields(); | 96 | trlDynamicEntries = OContactFields::trdetailsfields( false ); |
97 | for (i = 0; i < slChooserNames.count(); i++) | 97 | for (i = 0; i < slChooserNames.count(); i++) |
98 | slChooserValues.append(""); | 98 | slChooserValues.append(""); |
99 | 99 | ||
100 | 100 | ||
101 | QVBoxLayout *vb = new QVBoxLayout( this ); | 101 | QVBoxLayout *vb = new QVBoxLayout( this ); |
102 | 102 | ||
103 | tabMain = new QTabWidget( this ); | 103 | tabMain = new QTabWidget( this ); |
104 | vb->addWidget( tabMain ); | 104 | vb->addWidget( tabMain ); |
105 | 105 | ||
106 | QWidget *tabViewport = new QWidget ( tabMain ); | 106 | QWidget *tabViewport = new QWidget ( tabMain ); |
107 | 107 | ||
108 | vb = new QVBoxLayout( tabViewport ); | 108 | vb = new QVBoxLayout( tabViewport ); |
109 | 109 | ||
110 | svGeneral = new QScrollView( tabViewport ); | 110 | svGeneral = new QScrollView( tabViewport ); |
111 | vb->addWidget( svGeneral, 0, 0 ); | 111 | vb->addWidget( svGeneral, 0, 0 ); |
112 | svGeneral->setResizePolicy( QScrollView::AutoOneFit ); | 112 | svGeneral->setResizePolicy( QScrollView::AutoOneFit ); |
113 | svGeneral->setFrameStyle( QFrame::NoFrame ); | 113 | svGeneral->setFrameStyle( QFrame::NoFrame ); |
114 | 114 | ||
115 | QWidget *container = new QWidget( svGeneral->viewport() ); | 115 | QWidget *container = new QWidget( svGeneral->viewport() ); |
116 | svGeneral->addChild( container ); | 116 | svGeneral->addChild( container ); |
117 | 117 | ||
118 | QGridLayout *gl = new QGridLayout( container, 1, 1, 2, 4 ); | 118 | QGridLayout *gl = new QGridLayout( container, 1, 1, 2, 4 ); |
119 | gl->setResizeMode( QLayout::FreeResize ); | 119 | gl->setResizeMode( QLayout::FreeResize ); |
120 | 120 | ||
121 | btnFullName = new QPushButton( tr( "Full Name..." ), container ); | 121 | btnFullName = new QPushButton( tr( "Full Name..." ), container ); |
122 | gl->addWidget( btnFullName, 0, 0 ); | 122 | gl->addWidget( btnFullName, 0, 0 ); |
123 | txtFullName = new QLineEdit( container ); | 123 | txtFullName = new QLineEdit( container ); |
124 | gl->addWidget( txtFullName, 0, 1 ); | 124 | gl->addWidget( txtFullName, 0, 1 ); |
125 | 125 | ||
126 | QLabel *l = new QLabel( tr( "Job Title" ), container ); | 126 | QLabel *l = new QLabel( tr( "Job Title" ), container ); |
127 | gl->addWidget( l, 1, 0 ); | 127 | gl->addWidget( l, 1, 0 ); |
128 | txtJobTitle = new QLineEdit( container ); | 128 | txtJobTitle = new QLineEdit( container ); |
129 | gl->addWidget( txtJobTitle, 1, 1 ); | 129 | gl->addWidget( txtJobTitle, 1, 1 ); |
130 | 130 | ||
131 | l = new QLabel( tr( "Organization" ), container ); | 131 | l = new QLabel( tr( "Organization" ), container ); |
132 | gl->addWidget( l, 2, 0 ); | 132 | gl->addWidget( l, 2, 0 ); |
133 | txtOrganization = new QLineEdit( container ); | 133 | txtOrganization = new QLineEdit( container ); |
134 | gl->addWidget( txtOrganization, 2, 1 ); | 134 | gl->addWidget( txtOrganization, 2, 1 ); |
135 | 135 | ||
136 | cmbChooserField1 = new QComboBox( FALSE, container ); | 136 | cmbChooserField1 = new QComboBox( FALSE, container ); |
137 | cmbChooserField1->setMaximumWidth( 90 ); | 137 | cmbChooserField1->setMaximumWidth( 90 ); |
138 | gl->addWidget( cmbChooserField1, 3, 0 ); | 138 | gl->addWidget( cmbChooserField1, 3, 0 ); |
139 | txtChooserField1 = new QLineEdit( container ); | 139 | txtChooserField1 = new QLineEdit( container ); |
140 | gl->addWidget( txtChooserField1, 3, 1 ); | 140 | gl->addWidget( txtChooserField1, 3, 1 ); |
141 | 141 | ||
142 | cmbChooserField2 = new QComboBox( FALSE, container ); | 142 | cmbChooserField2 = new QComboBox( FALSE, container ); |
143 | cmbChooserField2->setMaximumWidth( 90 ); | 143 | cmbChooserField2->setMaximumWidth( 90 ); |
144 | gl->addWidget( cmbChooserField2, 4, 0 ); | 144 | gl->addWidget( cmbChooserField2, 4, 0 ); |