kitchensync

profile.h

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 */
00021 #ifndef KITCHENSYNC_PROFILE_H
00022 #define KITCHENSYNC_PROFILE_H
00023 
00024 #include <qmap.h>
00025 #include <qstring.h>
00026 
00027 #include "actionpartservice.h"
00028 
00029 #include <kdepimmacros.h>
00030 
00031 namespace KSync {
00032 
00038 class KDE_EXPORT Profile
00039 {
00040   public:
00041     typedef QMap<QString,  QString> PathMap;
00042     bool operator==( const Profile& );
00043 //        bool operator!=( const Profile& a) { return !(a == *this); };
00044     typedef QValueList<Profile> List;
00045 
00050     Profile();
00051 
00055     Profile( const Profile & );
00056 
00060     ~Profile();
00061 
00065     QString name() const;
00066 
00070     QString uid() const;
00071 
00076     QString pixmap() const;
00077 
00082     bool confirmSync() const;
00083 
00088     bool confirmDelete() const;
00089 
00094     void setName( const QString &name ) ;
00095 
00100     void setUid( const QString &id );
00101 
00106     void setPixmap( const QString &pix);
00107 
00112     ActionPartService::List actionParts() const;
00113 
00118     void setActionParts( const ActionPartService::List &lst );
00119 
00124     QString path( const QString &partName ) const;
00125 
00132     void setPath( const QString &partName, const QString &path );
00133 
00137     void setPaths( const PathMap & );
00138 
00142     PathMap paths() const;
00143 
00147     void setConfirmSync( bool );
00148 
00152     void setConfirmDelete( bool );
00153 
00157     Profile &operator=( const Profile & );
00158 
00159   private:
00160     QString m_name;
00161     QString m_uid;
00162     QString m_pixmap;
00163     ActionPartService::List m_actionPartServices;
00164     PathMap m_map;
00165     bool m_confirmSync   : 1;
00166     bool m_confirmDelete : 1;
00167 };
00168 
00169 }
00170 
00171 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys