summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abconfig.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/abconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abconfig.cpp14
1 files changed, 14 insertions, 0 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
@@ -8,12 +8,13 @@ AbConfig::AbConfig( ):
m_useQtMail( true ),
m_useOpieMail( false ),
m_useRegExp( false ),
m_beCaseSensitive( false ),
m_fontSize( 1 ),
m_barPos( QMainWindow::Top ),
+ m_fixedBars( true ),
m_changed( false )
{
}
AbConfig::~AbConfig()
{
@@ -51,12 +52,16 @@ QValueList<int> AbConfig::orderList() const
QMainWindow::ToolBarDock AbConfig::getToolBarPos() const
{
return (QMainWindow::ToolBarDock) m_barPos;
}
+bool AbConfig::fixedBars() const
+{
+ return m_fixedBars;
+}
void AbConfig::setUseRegExp( bool v )
{
m_useRegExp = v ;
m_changed = true;
}
@@ -95,12 +100,18 @@ void AbConfig::setOrderList( const QValueList<int>& list )
void AbConfig::setToolBarDock( const QMainWindow::ToolBarDock v )
{
m_barPos = v;
m_changed = true;
}
+void AbConfig::setFixedBars( const bool fixed )
+{
+ m_fixedBars = fixed;
+ m_changed = true;
+}
+
void AbConfig::load()
{
// Read Config settings
Config cfg("AddressBook");
cfg.setGroup("Font");
@@ -130,12 +141,13 @@ void AbConfig::load()
m_ordered.append( Qtopia::HomeMobile);
m_ordered.append( Qtopia::BusinessPhone);
}
cfg.setGroup("ToolBar");
m_barPos = cfg.readNumEntry( "Position", QMainWindow::Top );
+ m_fixedBars= cfg.readBoolEntry( "fixedBars", true );
m_changed = false;
}
void AbConfig::save()
{
@@ -157,12 +169,13 @@ void AbConfig::save()
for ( uint i = 0; i < m_ordered.count(); i++ ){
cfg.writeEntry( "ContactID_"+QString::number(i), m_ordered[i] );
}
cfg.setGroup("ToolBar");
cfg.writeEntry( "Position", m_barPos );
+ cfg.writeEntry( "fixedBars", m_fixedBars );
cfg.setGroup("Version");
cfg.writeEntry( "AppName", APPNAME + QString(" V" ) + MAINVERSION + QString(".") + SUBVERSION + QString(".") + PATCHVERSION);
cfg.writeEntry( "Mainversion", MAINVERSION );
cfg.writeEntry( "SubVersion", SUBVERSION );
cfg.writeEntry( "PatchVersion", PATCHVERSION );
@@ -177,8 +190,9 @@ void AbConfig::operator= ( const AbConfig& cnf )
m_useOpieMail = cnf.m_useOpieMail;
m_useRegExp = cnf.m_useRegExp;
m_beCaseSensitive = cnf.m_beCaseSensitive;
m_fontSize = cnf.m_fontSize;
m_ordered = cnf.m_ordered;
m_barPos = cnf.m_barPos;
+ m_fixedBars = cnf.m_fixedBars;
}