-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 | |||
@@ -11,6 +11,7 @@ AbConfig::AbConfig( ): | |||
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 | } |
@@ -54,6 +55,10 @@ QMainWindow::ToolBarDock AbConfig::getToolBarPos() const | |||
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 | { |
@@ -98,6 +103,12 @@ void AbConfig::setToolBarDock( const QMainWindow::ToolBarDock 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 |
@@ -133,6 +144,7 @@ void AbConfig::load() | |||
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 | } |
@@ -160,6 +172,7 @@ void AbConfig::save() | |||
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); |
@@ -180,5 +193,6 @@ void AbConfig::operator= ( const AbConfig& cnf ) | |||
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 | |||
@@ -19,6 +19,7 @@ public: | |||
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 ); |
@@ -28,6 +29,7 @@ public: | |||
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 | ||
@@ -47,6 +49,7 @@ protected: | |||
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 | }; |
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 | |||
@@ -87,21 +87,30 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, | |||
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" ), |
@@ -243,14 +252,11 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, | |||
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 | ||
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 | |||
@@ -122,7 +122,8 @@ void ConfigDlg::setConfig( const AbConfig& cnf ) | |||
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() |
@@ -146,6 +147,8 @@ AbConfig ConfigDlg::getConfig() | |||
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 | |||
@@ -80,7 +80,7 @@ | |||
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> |
@@ -255,6 +255,65 @@ | |||
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> |
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 | |||
@@ -3,7 +3,7 @@ | |||
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 | ||