summaryrefslogtreecommitdiff
authoreilers <eilers>2003-05-11 12:53:01 (UTC)
committer eilers <eilers>2003-05-11 12:53:01 (UTC)
commitc24cd890fe8219dcfc740c2e234d2427965d5831 (patch) (side-by-side diff)
tree826600681c77e14a11e36d5c96e3baa50567aa3f
parent597215b1c9e92df95ace33306d93b6c20df8b8c7 (diff)
downloadopie-c24cd890fe8219dcfc740c2e234d2427965d5831.zip
opie-c24cd890fe8219dcfc740c2e234d2427965d5831.tar.gz
opie-c24cd890fe8219dcfc740c2e234d2427965d5831.tar.bz2
Just internal renaming.. Will not affect anything..
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abconfig.cpp2
-rw-r--r--core/pim/addressbook/abconfig.h2
-rw-r--r--core/pim/addressbook/abview.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/core/pim/addressbook/abconfig.cpp b/core/pim/addressbook/abconfig.cpp
index 4a0875b..a3fd222 100644
--- a/core/pim/addressbook/abconfig.cpp
+++ b/core/pim/addressbook/abconfig.cpp
@@ -87,97 +87,97 @@ void AbConfig::setUseQtMail( bool v )
m_changed = true;
}
void AbConfig::setUseOpieMail( bool v )
{
m_useOpieMail = v;
m_changed = true;
}
void AbConfig::setFontSize( int v )
{
m_fontSize = v;
m_changed = true;
}
void AbConfig::setOrderList( const QValueList<int>& list )
{
m_ordered = list;
m_changed = true;
}
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::setLetterPickerSearch( const AbConfig::LPSearchMode mode )
{
m_lpSearchMode = mode;
m_changed = true;
}
void AbConfig::load()
{
// Read Config settings
Config cfg("AddressBook");
cfg.setGroup("Font");
m_fontSize = cfg.readNumEntry( "fontSize", 1 );
cfg.setGroup("Search");
m_useRegExp = cfg.readBoolEntry( "useRegExp", false );
m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive", false );
- m_lpSearchMode = cfg.readNumEntry( "lpSearchMode", FullName );
+ m_lpSearchMode = cfg.readNumEntry( "lpSearchMode", FileAs );
cfg.setGroup("Mail");
m_useQtMail = cfg.readBoolEntry( "useQtMail", true );
m_useOpieMail=cfg.readBoolEntry( "useOpieMail" );
cfg.setGroup("ContactOrder");
int ID = 0;
int i = 0;
ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 );
while ( ID != 0 ){
m_ordered.append( ID );
ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 );
}
// If no contact order is defined, we set the default
if ( m_ordered.count() == 0 ) {
m_ordered.append( Qtopia::DefaultEmail );
m_ordered.append( Qtopia::HomePhone);
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()
{
if ( m_changed ){
Config cfg("AddressBook");
cfg.setGroup("Font");
cfg.writeEntry("fontSize", m_fontSize);
cfg.setGroup("Search");
cfg.writeEntry("useRegExp", m_useRegExp);
cfg.writeEntry("caseSensitive", m_beCaseSensitive);
cfg.writeEntry("lpSearchMode", m_lpSearchMode );
cfg.setGroup("Mail");
cfg.writeEntry( "useQtMail", m_useQtMail );
cfg.writeEntry( "useOpieMail", m_useOpieMail);
cfg.setGroup("ContactOrder");
cfg.clearGroup();
for ( uint i = 0; i < m_ordered.count(); i++ ){
diff --git a/core/pim/addressbook/abconfig.h b/core/pim/addressbook/abconfig.h
index 93764f2..c312179 100644
--- a/core/pim/addressbook/abconfig.h
+++ b/core/pim/addressbook/abconfig.h
@@ -1,60 +1,60 @@
#ifndef _ABCONFIG_H_
#define _ABCONFIG_H_
#include <qstringlist.h>
#include <qmainwindow.h>
class AbConfig
{
public:
enum LPSearchMode{
LastName = 0,
- FullName,
+ FileAs,
LASTELEMENT
};
AbConfig();
~AbConfig();
// Search Settings
bool useRegExp() const;
bool useWildCards() const;
bool beCaseSensitive() const;
bool useQtMail() const;
bool useOpieMail() const;
int fontSize() const;
QValueList<int> orderList() const;
QMainWindow::ToolBarDock getToolBarPos() const;
bool fixedBars() const;
LPSearchMode letterPickerSearch() const;
void setUseRegExp( bool v );
void setUseWildCards( bool v );
void setBeCaseSensitive( bool v );
void setUseQtMail( bool v );
void setUseOpieMail( bool v );
void setFontSize( int v );
void setOrderList( const QValueList<int>& list );
void setToolBarDock( const QMainWindow::ToolBarDock v );
void setFixedBars( const bool fixed );
void setLetterPickerSearch( const LPSearchMode mode );
void operator= ( const AbConfig& cnf );
void load();
void save();
protected:
/* virtual void itemUp(); */
/* virtual void itemDown(); */
QStringList contFields;
bool m_useQtMail;
bool m_useOpieMail;
bool m_useRegExp;
bool m_beCaseSensitive;
int m_fontSize;
QValueList<int> m_ordered;
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 664bd3f..477f85b 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -196,97 +196,97 @@ void AbView::setShowByCategory( const QString& cat )
// Just do anything if we really change the category
if ( intCat != m_curr_category ){
// qWarning ("Categories: Selected %s.. Number: %d", cat.latin1(), m_curr_category);
m_curr_category = intCat;
emit signalClearLetterPicker();
load();
}
}
void AbView::setShowToView( Views view )
{
// qWarning("void AbView::setShowToView( View %d )", view);
// qWarning ("Change the View (Category is: %d)", m_curr_category);
if ( m_curr_View != view ){
m_prev_View = m_curr_View;
m_curr_View = view;
updateView();
}
}
void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode )
{
qWarning("void AbView::setShowByLetter( %c, %d )", c, mode );
assert( mode < AbConfig::LASTELEMENT );
OContact query;
if ( c == 0 ){
load();
return;
}else{
// If the current Backend is unable to solve the query, we will
// ignore the request ..
if ( ! m_contactdb->hasQuerySettings( OContactAccess::WildCards | OContactAccess::IgnoreCase ) ){
return;
}
switch( mode ){
case AbConfig::LastName:
query.setLastName( QString("%1*").arg(c) );
break;
- case AbConfig::FullName:
+ case AbConfig::FileAs:
query.setFileAs( QString("%1*").arg(c) );
break;
default:
qWarning( "Unknown Searchmode for AbView::setShowByLetter ! -> %d", mode );
qWarning( "I will ignore it.." );
return;
}
m_list = m_contactdb->queryByExample( query, OContactAccess::WildCards | OContactAccess::IgnoreCase );
clearForCategory();
m_curr_Contact = 0;
}
updateView( true );
}
void AbView::setListOrder( const QValueList<int>& ordered )
{
m_orderedFields = ordered;
if ( m_abTable ){
m_abTable->setOrderedList( ordered );
m_abTable->refresh();
}
updateView();
}
QString AbView::showCategory() const
{
return mCat.label( "Contacts", m_curr_category );
}
void AbView::showPersonal( bool personal )
{
// qWarning ("void AbView::showPersonal( %d )", personal);
if ( personal ){
if ( m_inPersonal )
return;
// Now switch to vCard Backend and load data.
// The current default backend will be stored
// to avoid unneeded load/stores.
m_storedDB = m_contactdb;
OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
addressbookPersonalVCardName() );
m_contactdb = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );