-rw-r--r-- | core/pim/addressbook/abconfig.cpp | 14 | ||||
-rw-r--r-- | core/pim/addressbook/abconfig.h | 3 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 32 | ||||
-rw-r--r-- | core/pim/addressbook/configdlg.cpp | 5 | ||||
-rw-r--r-- | core/pim/addressbook/configdlg_base.ui | 61 | ||||
-rw-r--r-- | core/pim/addressbook/version.h | 2 |
6 files changed, 101 insertions, 16 deletions
diff --git a/core/pim/addressbook/abconfig.cpp b/core/pim/addressbook/abconfig.cpp index e58fa76..0b61614 100644 --- a/core/pim/addressbook/abconfig.cpp +++ b/core/pim/addressbook/abconfig.cpp | |||
@@ -1,184 +1,198 @@ | |||
1 | #include "abconfig.h" | 1 | #include "abconfig.h" |
2 | #include "version.h" | 2 | #include "version.h" |
3 | 3 | ||
4 | #include <qpe/config.h> | 4 | #include <qpe/config.h> |
5 | #include <qpe/recordfields.h> | 5 | #include <qpe/recordfields.h> |
6 | 6 | ||
7 | AbConfig::AbConfig( ): | 7 | AbConfig::AbConfig( ): |
8 | m_useQtMail( true ), | 8 | m_useQtMail( true ), |
9 | m_useOpieMail( false ), | 9 | m_useOpieMail( false ), |
10 | m_useRegExp( false ), | 10 | m_useRegExp( false ), |
11 | m_beCaseSensitive( false ), | 11 | m_beCaseSensitive( false ), |
12 | m_fontSize( 1 ), | 12 | m_fontSize( 1 ), |
13 | m_barPos( QMainWindow::Top ), | 13 | m_barPos( QMainWindow::Top ), |
14 | m_fixedBars( true ), | ||
14 | m_changed( false ) | 15 | m_changed( false ) |
15 | { | 16 | { |
16 | } | 17 | } |
17 | 18 | ||
18 | AbConfig::~AbConfig() | 19 | AbConfig::~AbConfig() |
19 | { | 20 | { |
20 | } | 21 | } |
21 | 22 | ||
22 | bool AbConfig::useRegExp() const | 23 | bool AbConfig::useRegExp() const |
23 | { | 24 | { |
24 | return m_useRegExp; | 25 | return m_useRegExp; |
25 | } | 26 | } |
26 | bool AbConfig::useWildCards() const | 27 | bool AbConfig::useWildCards() const |
27 | { | 28 | { |
28 | return !m_useRegExp; | 29 | return !m_useRegExp; |
29 | } | 30 | } |
30 | bool AbConfig::useQtMail() const | 31 | bool AbConfig::useQtMail() const |
31 | { | 32 | { |
32 | return m_useQtMail; | 33 | return m_useQtMail; |
33 | } | 34 | } |
34 | bool AbConfig::useOpieMail() const | 35 | bool AbConfig::useOpieMail() const |
35 | { | 36 | { |
36 | return m_useOpieMail; | 37 | return m_useOpieMail; |
37 | } | 38 | } |
38 | bool AbConfig::beCaseSensitive() const | 39 | bool AbConfig::beCaseSensitive() const |
39 | { | 40 | { |
40 | return m_beCaseSensitive; | 41 | return m_beCaseSensitive; |
41 | } | 42 | } |
42 | int AbConfig::fontSize() const | 43 | int AbConfig::fontSize() const |
43 | { | 44 | { |
44 | return m_fontSize; | 45 | return m_fontSize; |
45 | } | 46 | } |
46 | 47 | ||
47 | QValueList<int> AbConfig::orderList() const | 48 | QValueList<int> AbConfig::orderList() const |
48 | { | 49 | { |
49 | return m_ordered; | 50 | return m_ordered; |
50 | } | 51 | } |
51 | 52 | ||
52 | QMainWindow::ToolBarDock AbConfig::getToolBarPos() const | 53 | QMainWindow::ToolBarDock AbConfig::getToolBarPos() const |
53 | { | 54 | { |
54 | return (QMainWindow::ToolBarDock) m_barPos; | 55 | return (QMainWindow::ToolBarDock) m_barPos; |
55 | } | 56 | } |
56 | 57 | ||
58 | bool AbConfig::fixedBars() const | ||
59 | { | ||
60 | return m_fixedBars; | ||
61 | } | ||
57 | 62 | ||
58 | void AbConfig::setUseRegExp( bool v ) | 63 | void AbConfig::setUseRegExp( bool v ) |
59 | { | 64 | { |
60 | m_useRegExp = v ; | 65 | m_useRegExp = v ; |
61 | m_changed = true; | 66 | m_changed = true; |
62 | } | 67 | } |
63 | void AbConfig::setUseWildCards( bool v ) | 68 | void AbConfig::setUseWildCards( bool v ) |
64 | { | 69 | { |
65 | m_useRegExp = !v; | 70 | m_useRegExp = !v; |
66 | m_changed = true; | 71 | m_changed = true; |
67 | } | 72 | } |
68 | void AbConfig::setBeCaseSensitive( bool v ) | 73 | void AbConfig::setBeCaseSensitive( bool v ) |
69 | { | 74 | { |
70 | m_beCaseSensitive = v; | 75 | m_beCaseSensitive = v; |
71 | m_changed = true; | 76 | m_changed = true; |
72 | } | 77 | } |
73 | void AbConfig::setUseQtMail( bool v ) | 78 | void AbConfig::setUseQtMail( bool v ) |
74 | { | 79 | { |
75 | m_useQtMail = v; | 80 | m_useQtMail = v; |
76 | m_changed = true; | 81 | m_changed = true; |
77 | } | 82 | } |
78 | void AbConfig::setUseOpieMail( bool v ) | 83 | void AbConfig::setUseOpieMail( bool v ) |
79 | { | 84 | { |
80 | m_useOpieMail = v; | 85 | m_useOpieMail = v; |
81 | m_changed = true; | 86 | m_changed = true; |
82 | } | 87 | } |
83 | void AbConfig::setFontSize( int v ) | 88 | void AbConfig::setFontSize( int v ) |
84 | { | 89 | { |
85 | m_fontSize = v; | 90 | m_fontSize = v; |
86 | m_changed = true; | 91 | m_changed = true; |
87 | } | 92 | } |
88 | 93 | ||
89 | void AbConfig::setOrderList( const QValueList<int>& list ) | 94 | void AbConfig::setOrderList( const QValueList<int>& list ) |
90 | { | 95 | { |
91 | m_ordered = list; | 96 | m_ordered = list; |
92 | m_changed = true; | 97 | m_changed = true; |
93 | } | 98 | } |
94 | 99 | ||
95 | void AbConfig::setToolBarDock( const QMainWindow::ToolBarDock v ) | 100 | void AbConfig::setToolBarDock( const QMainWindow::ToolBarDock v ) |
96 | { | 101 | { |
97 | m_barPos = v; | 102 | m_barPos = v; |
98 | m_changed = true; | 103 | m_changed = true; |
99 | } | 104 | } |
100 | 105 | ||
106 | void AbConfig::setFixedBars( const bool fixed ) | ||
107 | { | ||
108 | m_fixedBars = fixed; | ||
109 | m_changed = true; | ||
110 | } | ||
111 | |||
101 | void AbConfig::load() | 112 | void AbConfig::load() |
102 | { | 113 | { |
103 | // Read Config settings | 114 | // Read Config settings |
104 | Config cfg("AddressBook"); | 115 | Config cfg("AddressBook"); |
105 | 116 | ||
106 | cfg.setGroup("Font"); | 117 | cfg.setGroup("Font"); |
107 | m_fontSize = cfg.readNumEntry( "fontSize", 1 ); | 118 | m_fontSize = cfg.readNumEntry( "fontSize", 1 ); |
108 | 119 | ||
109 | cfg.setGroup("Search"); | 120 | cfg.setGroup("Search"); |
110 | m_useRegExp = cfg.readBoolEntry( "useRegExp" ); | 121 | m_useRegExp = cfg.readBoolEntry( "useRegExp" ); |
111 | m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive" ); | 122 | m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive" ); |
112 | 123 | ||
113 | cfg.setGroup("Mail"); | 124 | cfg.setGroup("Mail"); |
114 | m_useQtMail = cfg.readBoolEntry( "useQtMail", true ); | 125 | m_useQtMail = cfg.readBoolEntry( "useQtMail", true ); |
115 | m_useOpieMail=cfg.readBoolEntry( "useOpieMail" ); | 126 | m_useOpieMail=cfg.readBoolEntry( "useOpieMail" ); |
116 | 127 | ||
117 | cfg.setGroup("ContactOrder"); | 128 | cfg.setGroup("ContactOrder"); |
118 | int ID = 0; | 129 | int ID = 0; |
119 | int i = 0; | 130 | int i = 0; |
120 | ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); | 131 | ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); |
121 | while ( ID != 0 ){ | 132 | while ( ID != 0 ){ |
122 | m_ordered.append( ID ); | 133 | m_ordered.append( ID ); |
123 | ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); | 134 | ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); |
124 | } | 135 | } |
125 | 136 | ||
126 | // If no contact order is defined, we set the default | 137 | // If no contact order is defined, we set the default |
127 | if ( m_ordered.count() == 0 ) { | 138 | if ( m_ordered.count() == 0 ) { |
128 | m_ordered.append( Qtopia::DefaultEmail ); | 139 | m_ordered.append( Qtopia::DefaultEmail ); |
129 | m_ordered.append( Qtopia::HomePhone); | 140 | m_ordered.append( Qtopia::HomePhone); |
130 | m_ordered.append( Qtopia::HomeMobile); | 141 | m_ordered.append( Qtopia::HomeMobile); |
131 | m_ordered.append( Qtopia::BusinessPhone); | 142 | m_ordered.append( Qtopia::BusinessPhone); |
132 | } | 143 | } |
133 | 144 | ||
134 | cfg.setGroup("ToolBar"); | 145 | cfg.setGroup("ToolBar"); |
135 | m_barPos = cfg.readNumEntry( "Position", QMainWindow::Top ); | 146 | m_barPos = cfg.readNumEntry( "Position", QMainWindow::Top ); |
147 | m_fixedBars= cfg.readBoolEntry( "fixedBars", true ); | ||
136 | 148 | ||
137 | m_changed = false; | 149 | m_changed = false; |
138 | } | 150 | } |
139 | 151 | ||
140 | void AbConfig::save() | 152 | void AbConfig::save() |
141 | { | 153 | { |
142 | if ( m_changed ){ | 154 | if ( m_changed ){ |
143 | Config cfg("AddressBook"); | 155 | Config cfg("AddressBook"); |
144 | cfg.setGroup("Font"); | 156 | cfg.setGroup("Font"); |
145 | cfg.writeEntry("fontSize", m_fontSize); | 157 | cfg.writeEntry("fontSize", m_fontSize); |
146 | 158 | ||
147 | cfg.setGroup("Search"); | 159 | cfg.setGroup("Search"); |
148 | cfg.writeEntry("useRegExp", m_useRegExp); | 160 | cfg.writeEntry("useRegExp", m_useRegExp); |
149 | cfg.writeEntry("caseSensitive", m_beCaseSensitive); | 161 | cfg.writeEntry("caseSensitive", m_beCaseSensitive); |
150 | 162 | ||
151 | cfg.setGroup("Mail"); | 163 | cfg.setGroup("Mail"); |
152 | cfg.writeEntry( "useQtMail", m_useQtMail ); | 164 | cfg.writeEntry( "useQtMail", m_useQtMail ); |
153 | cfg.writeEntry( "useOpieMail", m_useOpieMail); | 165 | cfg.writeEntry( "useOpieMail", m_useOpieMail); |
154 | 166 | ||
155 | cfg.setGroup("ContactOrder"); | 167 | cfg.setGroup("ContactOrder"); |
156 | cfg.clearGroup(); | 168 | cfg.clearGroup(); |
157 | for ( uint i = 0; i < m_ordered.count(); i++ ){ | 169 | for ( uint i = 0; i < m_ordered.count(); i++ ){ |
158 | cfg.writeEntry( "ContactID_"+QString::number(i), m_ordered[i] ); | 170 | cfg.writeEntry( "ContactID_"+QString::number(i), m_ordered[i] ); |
159 | } | 171 | } |
160 | 172 | ||
161 | cfg.setGroup("ToolBar"); | 173 | cfg.setGroup("ToolBar"); |
162 | cfg.writeEntry( "Position", m_barPos ); | 174 | cfg.writeEntry( "Position", m_barPos ); |
175 | cfg.writeEntry( "fixedBars", m_fixedBars ); | ||
163 | 176 | ||
164 | cfg.setGroup("Version"); | 177 | cfg.setGroup("Version"); |
165 | cfg.writeEntry( "AppName", APPNAME + QString(" V" ) + MAINVERSION + QString(".") + SUBVERSION + QString(".") + PATCHVERSION); | 178 | cfg.writeEntry( "AppName", APPNAME + QString(" V" ) + MAINVERSION + QString(".") + SUBVERSION + QString(".") + PATCHVERSION); |
166 | cfg.writeEntry( "Mainversion", MAINVERSION ); | 179 | cfg.writeEntry( "Mainversion", MAINVERSION ); |
167 | cfg.writeEntry( "SubVersion", SUBVERSION ); | 180 | cfg.writeEntry( "SubVersion", SUBVERSION ); |
168 | cfg.writeEntry( "PatchVersion", PATCHVERSION ); | 181 | cfg.writeEntry( "PatchVersion", PATCHVERSION ); |
169 | 182 | ||
170 | } | 183 | } |
171 | 184 | ||
172 | } | 185 | } |
173 | 186 | ||
174 | void AbConfig::operator= ( const AbConfig& cnf ) | 187 | void AbConfig::operator= ( const AbConfig& cnf ) |
175 | { | 188 | { |
176 | m_useQtMail = cnf.m_useQtMail; | 189 | m_useQtMail = cnf.m_useQtMail; |
177 | m_useOpieMail = cnf.m_useOpieMail; | 190 | m_useOpieMail = cnf.m_useOpieMail; |
178 | m_useRegExp = cnf.m_useRegExp; | 191 | m_useRegExp = cnf.m_useRegExp; |
179 | m_beCaseSensitive = cnf.m_beCaseSensitive; | 192 | m_beCaseSensitive = cnf.m_beCaseSensitive; |
180 | m_fontSize = cnf.m_fontSize; | 193 | m_fontSize = cnf.m_fontSize; |
181 | m_ordered = cnf.m_ordered; | 194 | m_ordered = cnf.m_ordered; |
182 | m_barPos = cnf.m_barPos; | 195 | m_barPos = cnf.m_barPos; |
196 | m_fixedBars = cnf.m_fixedBars; | ||
183 | } | 197 | } |
184 | 198 | ||
diff --git a/core/pim/addressbook/abconfig.h b/core/pim/addressbook/abconfig.h index b8460d7..ce51b4c 100644 --- a/core/pim/addressbook/abconfig.h +++ b/core/pim/addressbook/abconfig.h | |||
@@ -1,55 +1,58 @@ | |||
1 | #ifndef _ABCONFIG_H_ | 1 | #ifndef _ABCONFIG_H_ |
2 | #define _ABCONFIG_H_ | 2 | #define _ABCONFIG_H_ |
3 | 3 | ||
4 | #include <qstringlist.h> | 4 | #include <qstringlist.h> |
5 | #include <qmainwindow.h> | 5 | #include <qmainwindow.h> |
6 | 6 | ||
7 | class AbConfig | 7 | class AbConfig |
8 | { | 8 | { |
9 | public: | 9 | public: |
10 | AbConfig(); | 10 | AbConfig(); |
11 | ~AbConfig(); | 11 | ~AbConfig(); |
12 | 12 | ||
13 | // Search Settings | 13 | // Search Settings |
14 | bool useRegExp() const; | 14 | bool useRegExp() const; |
15 | bool useWildCards() const; | 15 | bool useWildCards() const; |
16 | bool beCaseSensitive() const; | 16 | bool beCaseSensitive() const; |
17 | bool useQtMail() const; | 17 | bool useQtMail() const; |
18 | bool useOpieMail() const; | 18 | bool useOpieMail() const; |
19 | int fontSize() const; | 19 | int fontSize() const; |
20 | QValueList<int> orderList() const; | 20 | QValueList<int> orderList() const; |
21 | QMainWindow::ToolBarDock getToolBarPos() const; | 21 | QMainWindow::ToolBarDock getToolBarPos() const; |
22 | bool fixedBars() const; | ||
22 | 23 | ||
23 | void setUseRegExp( bool v ); | 24 | void setUseRegExp( bool v ); |
24 | void setUseWildCards( bool v ); | 25 | void setUseWildCards( bool v ); |
25 | void setBeCaseSensitive( bool v ); | 26 | void setBeCaseSensitive( bool v ); |
26 | void setUseQtMail( bool v ); | 27 | void setUseQtMail( bool v ); |
27 | void setUseOpieMail( bool v ); | 28 | void setUseOpieMail( bool v ); |
28 | void setFontSize( int v ); | 29 | void setFontSize( int v ); |
29 | void setOrderList( const QValueList<int>& list ); | 30 | void setOrderList( const QValueList<int>& list ); |
30 | void setToolBarDock( const QMainWindow::ToolBarDock v ); | 31 | void setToolBarDock( const QMainWindow::ToolBarDock v ); |
32 | void setFixedBars( const bool fixed ); | ||
31 | 33 | ||
32 | void operator= ( const AbConfig& cnf ); | 34 | void operator= ( const AbConfig& cnf ); |
33 | 35 | ||
34 | void load(); | 36 | void load(); |
35 | void save(); | 37 | void save(); |
36 | 38 | ||
37 | protected: | 39 | protected: |
38 | /* virtual void itemUp(); */ | 40 | /* virtual void itemUp(); */ |
39 | /* virtual void itemDown(); */ | 41 | /* virtual void itemDown(); */ |
40 | 42 | ||
41 | QStringList contFields; | 43 | QStringList contFields; |
42 | 44 | ||
43 | bool m_useQtMail; | 45 | bool m_useQtMail; |
44 | bool m_useOpieMail; | 46 | bool m_useOpieMail; |
45 | bool m_useRegExp; | 47 | bool m_useRegExp; |
46 | bool m_beCaseSensitive; | 48 | bool m_beCaseSensitive; |
47 | int m_fontSize; | 49 | int m_fontSize; |
48 | QValueList<int> m_ordered; | 50 | QValueList<int> m_ordered; |
49 | int m_barPos; | 51 | int m_barPos; |
52 | bool m_fixedBars; | ||
50 | 53 | ||
51 | bool m_changed; | 54 | bool m_changed; |
52 | }; | 55 | }; |
53 | 56 | ||
54 | 57 | ||
55 | #endif | 58 | #endif |
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 14e5b3f..a5bf19b 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -66,63 +66,72 @@ | |||
66 | 66 | ||
67 | 67 | ||
68 | #include "picker.h" | 68 | #include "picker.h" |
69 | #include "configdlg.h" | 69 | #include "configdlg.h" |
70 | 70 | ||
71 | extern QString addressbookPersonalVCardName(); | 71 | extern QString addressbookPersonalVCardName(); |
72 | 72 | ||
73 | AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, | 73 | AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, |
74 | WFlags f ) | 74 | WFlags f ) |
75 | : QMainWindow( parent, name, f ), | 75 | : QMainWindow( parent, name, f ), |
76 | catMenu (0l), | 76 | catMenu (0l), |
77 | abEditor(0l), | 77 | abEditor(0l), |
78 | syncing(FALSE), | 78 | syncing(FALSE), |
79 | m_tableViewButton(0l), | 79 | m_tableViewButton(0l), |
80 | m_cardViewButton(0l) | 80 | m_cardViewButton(0l) |
81 | { | 81 | { |
82 | isLoading = true; | 82 | isLoading = true; |
83 | 83 | ||
84 | m_config.load(); | 84 | m_config.load(); |
85 | 85 | ||
86 | setCaption( tr("Contacts") ); | 86 | setCaption( tr("Contacts") ); |
87 | setIcon( Resource::loadPixmap( "AddressBook" ) ); | 87 | setIcon( Resource::loadPixmap( "AddressBook" ) ); |
88 | 88 | ||
89 | // Settings for Main Menu | 89 | // Settings for Main Menu |
90 | setToolBarsMovable( true ); | 90 | // setToolBarsMovable( false ); |
91 | setToolBarsMovable( !m_config.fixedBars() ); | ||
91 | setRightJustification( true ); | 92 | setRightJustification( true ); |
92 | 93 | ||
93 | // Create Toolbar | 94 | QPEToolBar *bar = new QPEToolBar( this ); |
94 | listTools = new QPEToolBar( this, "list operations" ); | 95 | bar->setHorizontalStretchable( TRUE ); |
95 | listTools->setHorizontalStretchable( true ); | ||
96 | addToolBar( listTools ); | ||
97 | moveToolBar( listTools, m_config.getToolBarPos() ); | ||
98 | 96 | ||
99 | QPEMenuBar *mbList = new QPEMenuBar( this ); | 97 | QPEMenuBar *mbList = new QPEMenuBar( bar ); |
100 | mbList->setMargin( 0 ); | 98 | mbList->setMargin( 0 ); |
101 | 99 | ||
102 | QPopupMenu *edit = new QPopupMenu( mbList ); | 100 | QPopupMenu *edit = new QPopupMenu( mbList ); |
103 | mbList->insertItem( tr( "Contact" ), edit ); | 101 | mbList->insertItem( tr( "Contact" ), edit ); |
104 | 102 | ||
103 | // Category Menu | ||
104 | catMenu = new QPopupMenu( this ); | ||
105 | catMenu->setCheckable( TRUE ); | ||
106 | connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); | ||
107 | mbList->insertItem( tr("View"), catMenu ); | ||
108 | |||
109 | // Create Toolbar | ||
110 | listTools = new QPEToolBar( this, "list operations" ); | ||
111 | listTools->setHorizontalStretchable( true ); | ||
112 | addToolBar( listTools ); | ||
113 | moveToolBar( listTools, m_config.getToolBarPos() ); | ||
105 | 114 | ||
106 | // View Icons | 115 | // View Icons |
107 | m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/weeklst" ), | 116 | m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/weeklst" ), |
108 | QString::null, 0, this, 0 ); | 117 | QString::null, 0, this, 0 ); |
109 | connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) ); | 118 | connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) ); |
110 | m_tableViewButton->setToggleAction( true ); | 119 | m_tableViewButton->setToggleAction( true ); |
111 | m_tableViewButton->addTo( listTools ); | 120 | m_tableViewButton->addTo( listTools ); |
112 | m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "day" ), QString::null, 0, this, 0 ); | 121 | m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "day" ), QString::null, 0, this, 0 ); |
113 | connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) ); | 122 | connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) ); |
114 | m_cardViewButton->setToggleAction( true ); | 123 | m_cardViewButton->setToggleAction( true ); |
115 | m_cardViewButton->addTo( listTools ); | 124 | m_cardViewButton->addTo( listTools ); |
116 | 125 | ||
117 | listTools->addSeparator(); | 126 | listTools->addSeparator(); |
118 | 127 | ||
119 | // Other Buttons | 128 | // Other Buttons |
120 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, | 129 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, |
121 | 0, this, 0 ); | 130 | 0, this, 0 ); |
122 | actionNew = a; | 131 | actionNew = a; |
123 | connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); | 132 | connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); |
124 | a->addTo( edit ); | 133 | a->addTo( edit ); |
125 | a->addTo( listTools ); | 134 | a->addTo( listTools ); |
126 | 135 | ||
127 | a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, | 136 | a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, |
128 | 0, this, 0 ); | 137 | 0, this, 0 ); |
@@ -222,56 +231,53 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, | |||
222 | a->addTo( edit ); | 231 | a->addTo( edit ); |
223 | 232 | ||
224 | // Create Views | 233 | // Create Views |
225 | listContainer = new QWidget( this ); | 234 | listContainer = new QWidget( this ); |
226 | QVBoxLayout *vb = new QVBoxLayout( listContainer ); | 235 | QVBoxLayout *vb = new QVBoxLayout( listContainer ); |
227 | 236 | ||
228 | m_abView = new AbView( listContainer, m_config.orderList() ); | 237 | m_abView = new AbView( listContainer, m_config.orderList() ); |
229 | vb->addWidget( m_abView ); | 238 | vb->addWidget( m_abView ); |
230 | // abList->setHScrollBarMode( QScrollView::AlwaysOff ); | 239 | // abList->setHScrollBarMode( QScrollView::AlwaysOff ); |
231 | connect( m_abView, SIGNAL( signalViewSwitched ( int ) ), | 240 | connect( m_abView, SIGNAL( signalViewSwitched ( int ) ), |
232 | this, SLOT( slotViewSwitched( int ) ) ); | 241 | this, SLOT( slotViewSwitched( int ) ) ); |
233 | 242 | ||
234 | 243 | ||
235 | QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); | 244 | QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); |
236 | 245 | ||
237 | m_abView->load(); | 246 | m_abView->load(); |
238 | 247 | ||
239 | // Letter Picker | 248 | // Letter Picker |
240 | pLabel = new LetterPicker( listContainer ); | 249 | pLabel = new LetterPicker( listContainer ); |
241 | connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char))); | 250 | connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char))); |
242 | connect(m_abView, SIGNAL( signalClearLetterPicker() ), pLabel, SLOT( clear() ) ); | 251 | connect(m_abView, SIGNAL( signalClearLetterPicker() ), pLabel, SLOT( clear() ) ); |
243 | 252 | ||
244 | vb->addWidget( pLabel ); | 253 | vb->addWidget( pLabel ); |
245 | 254 | ||
246 | // Category Menu | 255 | // All Categories into view-menu.. |
247 | catMenu = new QPopupMenu( this ); | ||
248 | catMenu->setCheckable( TRUE ); | ||
249 | connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); | ||
250 | populateCategories(); | 256 | populateCategories(); |
251 | mbList->insertItem( tr("View"), catMenu ); | ||
252 | 257 | ||
253 | defaultFont = new QFont( m_abView->font() ); | 258 | // Fontsize |
259 | defaultFont = new QFont( m_abView->font() ); | ||
254 | slotSetFont(m_config.fontSize()); | 260 | slotSetFont(m_config.fontSize()); |
255 | m_curFontSize = m_config.fontSize(); | 261 | m_curFontSize = m_config.fontSize(); |
256 | 262 | ||
257 | setCentralWidget(listContainer); | 263 | setCentralWidget(listContainer); |
258 | 264 | ||
259 | // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); | 265 | // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); |
260 | 266 | ||
261 | 267 | ||
262 | isLoading = false; | 268 | isLoading = false; |
263 | } | 269 | } |
264 | 270 | ||
265 | 271 | ||
266 | void AddressbookWindow::slotConfig() | 272 | void AddressbookWindow::slotConfig() |
267 | { | 273 | { |
268 | ConfigDlg* dlg = new ConfigDlg( this, "Config" ); | 274 | ConfigDlg* dlg = new ConfigDlg( this, "Config" ); |
269 | dlg -> setConfig( m_config ); | 275 | dlg -> setConfig( m_config ); |
270 | dlg -> showMaximized(); | 276 | dlg -> showMaximized(); |
271 | if ( dlg -> exec() ) { | 277 | if ( dlg -> exec() ) { |
272 | qWarning ("Config Dialog accepted!"); | 278 | qWarning ("Config Dialog accepted!"); |
273 | m_config = dlg -> getConfig(); | 279 | m_config = dlg -> getConfig(); |
274 | if ( m_curFontSize != m_config.fontSize() ){ | 280 | if ( m_curFontSize != m_config.fontSize() ){ |
275 | qWarning("Font was changed!"); | 281 | qWarning("Font was changed!"); |
276 | m_curFontSize = m_config.fontSize(); | 282 | m_curFontSize = m_config.fontSize(); |
277 | emit slotSetFont( m_curFontSize ); | 283 | emit slotSetFont( m_curFontSize ); |
diff --git a/core/pim/addressbook/configdlg.cpp b/core/pim/addressbook/configdlg.cpp index f2f4141..629feef 100644 --- a/core/pim/addressbook/configdlg.cpp +++ b/core/pim/addressbook/configdlg.cpp | |||
@@ -101,51 +101,54 @@ void ConfigDlg::setConfig( const AbConfig& cnf ) | |||
101 | m_useCaseSensitive->setChecked( m_config.beCaseSensitive() ); | 101 | m_useCaseSensitive->setChecked( m_config.beCaseSensitive() ); |
102 | 102 | ||
103 | switch( m_config.fontSize() ){ | 103 | switch( m_config.fontSize() ){ |
104 | case 0: | 104 | case 0: |
105 | m_smallFont->setChecked( true ); | 105 | m_smallFont->setChecked( true ); |
106 | m_normalFont->setChecked( false ); | 106 | m_normalFont->setChecked( false ); |
107 | m_largeFont->setChecked( false ); | 107 | m_largeFont->setChecked( false ); |
108 | break; | 108 | break; |
109 | case 1: | 109 | case 1: |
110 | m_smallFont->setChecked( false ); | 110 | m_smallFont->setChecked( false ); |
111 | m_normalFont->setChecked( true ); | 111 | m_normalFont->setChecked( true ); |
112 | m_largeFont->setChecked( false ); | 112 | m_largeFont->setChecked( false ); |
113 | break; | 113 | break; |
114 | case 2: | 114 | case 2: |
115 | m_smallFont->setChecked( false ); | 115 | m_smallFont->setChecked( false ); |
116 | m_normalFont->setChecked( false ); | 116 | m_normalFont->setChecked( false ); |
117 | m_largeFont->setChecked( true ); | 117 | m_largeFont->setChecked( true ); |
118 | break; | 118 | break; |
119 | } | 119 | } |
120 | 120 | ||
121 | for( uint i = 0; i < m_config.orderList().count(); i++ ) { | 121 | for( uint i = 0; i < m_config.orderList().count(); i++ ) { |
122 | fieldListBox -> insertItem ( m_mapIDToStr[ m_config.orderList()[i] ] ); | 122 | fieldListBox -> insertItem ( m_mapIDToStr[ m_config.orderList()[i] ] ); |
123 | } | 123 | } |
124 | 124 | ||
125 | 125 | m_fixedBars->setChecked( m_config.fixedBars() ); | |
126 | m_moveBars->setChecked( !m_config.fixedBars() ); | ||
126 | } | 127 | } |
127 | 128 | ||
128 | AbConfig ConfigDlg::getConfig() | 129 | AbConfig ConfigDlg::getConfig() |
129 | { | 130 | { |
130 | m_config.setUseRegExp( m_useRegExp->isOn() ); | 131 | m_config.setUseRegExp( m_useRegExp->isOn() ); |
131 | m_config.setUseWildCards( m_useWildCard->isOn() ); | 132 | m_config.setUseWildCards( m_useWildCard->isOn() ); |
132 | m_config.setUseQtMail( m_useQtMail->isOn() ); | 133 | m_config.setUseQtMail( m_useQtMail->isOn() ); |
133 | m_config.setUseOpieMail( m_useOpieMail->isOn() ); | 134 | m_config.setUseOpieMail( m_useOpieMail->isOn() ); |
134 | m_config.setBeCaseSensitive( m_useCaseSensitive->isChecked() ); | 135 | m_config.setBeCaseSensitive( m_useCaseSensitive->isChecked() ); |
135 | 136 | ||
136 | if ( m_smallFont->isChecked() ) | 137 | if ( m_smallFont->isChecked() ) |
137 | m_config.setFontSize( 0 ); | 138 | m_config.setFontSize( 0 ); |
138 | if ( m_normalFont->isChecked() ) | 139 | if ( m_normalFont->isChecked() ) |
139 | m_config.setFontSize( 1 ); | 140 | m_config.setFontSize( 1 ); |
140 | if ( m_largeFont->isChecked() ) | 141 | if ( m_largeFont->isChecked() ) |
141 | m_config.setFontSize( 2 ); | 142 | m_config.setFontSize( 2 ); |
142 | 143 | ||
143 | QValueList<int> orderlist; | 144 | QValueList<int> orderlist; |
144 | for( int i = 0; i < (int)fieldListBox->count(); i++ ) { | 145 | for( int i = 0; i < (int)fieldListBox->count(); i++ ) { |
145 | orderlist.append( m_mapStrToID[ fieldListBox->text(i) ] ); | 146 | orderlist.append( m_mapStrToID[ fieldListBox->text(i) ] ); |
146 | } | 147 | } |
147 | m_config.setOrderList( orderlist ); | 148 | m_config.setOrderList( orderlist ); |
148 | 149 | ||
150 | m_config.setFixedBars( m_fixedBars->isChecked() ); | ||
151 | |||
149 | return m_config; | 152 | return m_config; |
150 | } | 153 | } |
151 | 154 | ||
diff --git a/core/pim/addressbook/configdlg_base.ui b/core/pim/addressbook/configdlg_base.ui index 308e138..1b5ac17 100644 --- a/core/pim/addressbook/configdlg_base.ui +++ b/core/pim/addressbook/configdlg_base.ui | |||
@@ -59,49 +59,49 @@ | |||
59 | </property> | 59 | </property> |
60 | <property> | 60 | <property> |
61 | <name>layoutMargin</name> | 61 | <name>layoutMargin</name> |
62 | </property> | 62 | </property> |
63 | <property> | 63 | <property> |
64 | <name>layoutSpacing</name> | 64 | <name>layoutSpacing</name> |
65 | </property> | 65 | </property> |
66 | <property> | 66 | <property> |
67 | <name>whatsThis</name> | 67 | <name>whatsThis</name> |
68 | <string>Click on tab to select one</string> | 68 | <string>Click on tab to select one</string> |
69 | </property> | 69 | </property> |
70 | <widget> | 70 | <widget> |
71 | <class>QWidget</class> | 71 | <class>QWidget</class> |
72 | <property stdset="1"> | 72 | <property stdset="1"> |
73 | <name>name</name> | 73 | <name>name</name> |
74 | <cstring>Widget5</cstring> | 74 | <cstring>Widget5</cstring> |
75 | </property> | 75 | </property> |
76 | <attribute> | 76 | <attribute> |
77 | <name>title</name> | 77 | <name>title</name> |
78 | <string>Misc</string> | 78 | <string>Misc</string> |
79 | </attribute> | 79 | </attribute> |
80 | <vbox> | 80 | <vbox> |
81 | <property stdset="1"> | 81 | <property stdset="1"> |
82 | <name>margin</name> | 82 | <name>margin</name> |
83 | <number>5</number> | 83 | <number>2</number> |
84 | </property> | 84 | </property> |
85 | <property stdset="1"> | 85 | <property stdset="1"> |
86 | <name>spacing</name> | 86 | <name>spacing</name> |
87 | <number>6</number> | 87 | <number>6</number> |
88 | </property> | 88 | </property> |
89 | <widget> | 89 | <widget> |
90 | <class>QGroupBox</class> | 90 | <class>QGroupBox</class> |
91 | <property stdset="1"> | 91 | <property stdset="1"> |
92 | <name>name</name> | 92 | <name>name</name> |
93 | <cstring>GroupBox2</cstring> | 93 | <cstring>GroupBox2</cstring> |
94 | </property> | 94 | </property> |
95 | <property stdset="1"> | 95 | <property stdset="1"> |
96 | <name>title</name> | 96 | <name>title</name> |
97 | <string>Search Settings</string> | 97 | <string>Search Settings</string> |
98 | </property> | 98 | </property> |
99 | <vbox> | 99 | <vbox> |
100 | <property stdset="1"> | 100 | <property stdset="1"> |
101 | <name>margin</name> | 101 | <name>margin</name> |
102 | <number>11</number> | 102 | <number>11</number> |
103 | </property> | 103 | </property> |
104 | <property stdset="1"> | 104 | <property stdset="1"> |
105 | <name>spacing</name> | 105 | <name>spacing</name> |
106 | <number>6</number> | 106 | <number>6</number> |
107 | </property> | 107 | </property> |
@@ -234,48 +234,107 @@ | |||
234 | <bool>true</bool> | 234 | <bool>true</bool> |
235 | </property> | 235 | </property> |
236 | <property> | 236 | <property> |
237 | <name>whatsThis</name> | 237 | <name>whatsThis</name> |
238 | <string>Font size for list- and card view</string> | 238 | <string>Font size for list- and card view</string> |
239 | </property> | 239 | </property> |
240 | </widget> | 240 | </widget> |
241 | <widget> | 241 | <widget> |
242 | <class>QRadioButton</class> | 242 | <class>QRadioButton</class> |
243 | <property stdset="1"> | 243 | <property stdset="1"> |
244 | <name>name</name> | 244 | <name>name</name> |
245 | <cstring>m_largeFont</cstring> | 245 | <cstring>m_largeFont</cstring> |
246 | </property> | 246 | </property> |
247 | <property stdset="1"> | 247 | <property stdset="1"> |
248 | <name>text</name> | 248 | <name>text</name> |
249 | <string>Large</string> | 249 | <string>Large</string> |
250 | </property> | 250 | </property> |
251 | <property> | 251 | <property> |
252 | <name>whatsThis</name> | 252 | <name>whatsThis</name> |
253 | <string>Font size for list- and card view</string> | 253 | <string>Font size for list- and card view</string> |
254 | </property> | 254 | </property> |
255 | </widget> | 255 | </widget> |
256 | </hbox> | 256 | </hbox> |
257 | </widget> | 257 | </widget> |
258 | <widget> | ||
259 | <class>QButtonGroup</class> | ||
260 | <property stdset="1"> | ||
261 | <name>name</name> | ||
262 | <cstring>ButtonGroup4</cstring> | ||
263 | </property> | ||
264 | <property stdset="1"> | ||
265 | <name>title</name> | ||
266 | <string>Tool-/Menubar</string> | ||
267 | </property> | ||
268 | <hbox> | ||
269 | <property stdset="1"> | ||
270 | <name>margin</name> | ||
271 | <number>11</number> | ||
272 | </property> | ||
273 | <property stdset="1"> | ||
274 | <name>spacing</name> | ||
275 | <number>6</number> | ||
276 | </property> | ||
277 | <widget> | ||
278 | <class>QRadioButton</class> | ||
279 | <property stdset="1"> | ||
280 | <name>name</name> | ||
281 | <cstring>m_fixedBars</cstring> | ||
282 | </property> | ||
283 | <property stdset="1"> | ||
284 | <name>text</name> | ||
285 | <string>Fixed</string> | ||
286 | </property> | ||
287 | <property stdset="1"> | ||
288 | <name>checked</name> | ||
289 | <bool>true</bool> | ||
290 | </property> | ||
291 | <property> | ||
292 | <name>toolTip</name> | ||
293 | <string></string> | ||
294 | </property> | ||
295 | <property> | ||
296 | <name>whatsThis</name> | ||
297 | <string>Switch to fixed menu-/toolbars after restarting application !</string> | ||
298 | </property> | ||
299 | </widget> | ||
300 | <widget> | ||
301 | <class>QRadioButton</class> | ||
302 | <property stdset="1"> | ||
303 | <name>name</name> | ||
304 | <cstring>m_moveBars</cstring> | ||
305 | </property> | ||
306 | <property stdset="1"> | ||
307 | <name>text</name> | ||
308 | <string>Movable</string> | ||
309 | </property> | ||
310 | <property> | ||
311 | <name>whatsThis</name> | ||
312 | <string>Switch to moveable menu-/toolbars after restarting application !</string> | ||
313 | </property> | ||
314 | </widget> | ||
315 | </hbox> | ||
316 | </widget> | ||
258 | <spacer> | 317 | <spacer> |
259 | <property> | 318 | <property> |
260 | <name>name</name> | 319 | <name>name</name> |
261 | <cstring>Spacer3</cstring> | 320 | <cstring>Spacer3</cstring> |
262 | </property> | 321 | </property> |
263 | <property stdset="1"> | 322 | <property stdset="1"> |
264 | <name>orientation</name> | 323 | <name>orientation</name> |
265 | <enum>Vertical</enum> | 324 | <enum>Vertical</enum> |
266 | </property> | 325 | </property> |
267 | <property stdset="1"> | 326 | <property stdset="1"> |
268 | <name>sizeType</name> | 327 | <name>sizeType</name> |
269 | <enum>Expanding</enum> | 328 | <enum>Expanding</enum> |
270 | </property> | 329 | </property> |
271 | <property> | 330 | <property> |
272 | <name>sizeHint</name> | 331 | <name>sizeHint</name> |
273 | <size> | 332 | <size> |
274 | <width>20</width> | 333 | <width>20</width> |
275 | <height>20</height> | 334 | <height>20</height> |
276 | </size> | 335 | </size> |
277 | </property> | 336 | </property> |
278 | </spacer> | 337 | </spacer> |
279 | </vbox> | 338 | </vbox> |
280 | </widget> | 339 | </widget> |
281 | <widget> | 340 | <widget> |
diff --git a/core/pim/addressbook/version.h b/core/pim/addressbook/version.h index 999ce67..d590a86 100644 --- a/core/pim/addressbook/version.h +++ b/core/pim/addressbook/version.h | |||
@@ -1,10 +1,10 @@ | |||
1 | #ifndef _VERSION_H_ | 1 | #ifndef _VERSION_H_ |
2 | #define _VERSION_H_ | 2 | #define _VERSION_H_ |
3 | 3 | ||
4 | #define MAINVERSION "0" | 4 | #define MAINVERSION "0" |
5 | #define SUBVERSION "9" | 5 | #define SUBVERSION "9" |
6 | #define PATCHVERSION "2" | 6 | #define PATCHVERSION "3" |
7 | 7 | ||
8 | #define APPNAME "OPIE_ADDRESSBOOK" | 8 | #define APPNAME "OPIE_ADDRESSBOOK" |
9 | 9 | ||
10 | #endif | 10 | #endif |