kabc
addresseehelper.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KABC_ADDRESSEEHELPER_H
00021 #define KABC_ADDRESSEEHELPER_H
00022
00023 #include "kabc_export.h"
00024
00025 #include <QtCore/QObject>
00026 #include <QtCore/QStringList>
00027 #include <QtCore/QSet>
00028
00029 namespace KABC {
00030
00054 class KABC_EXPORT AddresseeHelper : public QObject
00055 {
00056 Q_OBJECT
00057
00058 public:
00064 static AddresseeHelper *self();
00065
00073 bool containsTitle( const QString &title ) const;
00074
00082 bool containsPrefix( const QString &prefix ) const;
00083
00091 bool containsSuffix( const QString &suffix ) const;
00092
00100 bool tradeAsFamilyName() const;
00101
00102 public Q_SLOTS:
00106 void initSettings();
00107
00108 private:
00109 AddresseeHelper();
00110
00111 static void addToSet( const QStringList &list, QSet<QString> &container );
00112 QSet<QString> mTitles;
00113 QSet<QString> mPrefixes;
00114 QSet<QString> mSuffixes;
00115 bool mTradeAsFamilyName;
00116
00117 static AddresseeHelper *s_self;
00118 };
00119
00120 }
00121
00122 #endif