summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncprofile.h
Unidiff
Diffstat (limited to 'libkdepim/ksyncprofile.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprofile.h106
1 files changed, 106 insertions, 0 deletions
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
new file mode 100644
index 0000000..238ffad
--- a/dev/null
+++ b/libkdepim/ksyncprofile.h
@@ -0,0 +1,106 @@
1/*
2 This file is part of KOrganizer.
3 Copyright (c) 2004 Lutz Rogowski <rogowski@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20#ifndef _KSYNCPROFILE_H
21#define _KSYNCPROFILE_H
22
23#include <qptrlist.h>
24#include <qcolor.h>
25#include <qfont.h>
26#include <qstringlist.h>
27#include <qobject.h>
28#include <qstring.h>
29
30#define SYNC_PREF_LOCAL 0
31#define SYNC_PREF_REMOTE 1
32#define SYNC_PREF_NEWEST 2
33#define SYNC_PREF_ASK 3
34#define SYNC_PREF_FORCE_LOCAL 4
35#define SYNC_PREF_FORCE_REMOTE 5
36#define SYNC_PREF_TAKE_BOTH 6
37
38class KConfig;
39
40/**
41 @short Class for storing a preferences setting
42 @author Cornelius Schumacher
43 @see KPref
44
45 This class represents one preferences setting as used by @ref KPrefs.
46 Subclasses of KPrefsItem implement storage functions for a certain type of
47 setting. Normally you don't have to use this class directly. Use the special
48 addItem() functions of KPrefs instead. If you subclass this class you will
49 have to register instances with the function KPrefs::addItem().
50*/
51class KSyncProfile : public QObject {
52 public:
53 KSyncProfile( const char * name = 0);
54 ~KSyncProfile() ;
55
56 KSyncProfile* clone();
57 void setDefault();
58 void readConfig(KConfig *);
59 void writeConfig(KConfig *);
60 void setName( const QString& n ) {mName = n;}
61 QString getName( ) { return mName;}
62 void setPreSyncCommand( const QString& n ) {mPreSyncCommand = n;}
63 QString getPreSyncCommand( ) { return mPreSyncCommand; }
64 void setPostSyncCommand( const QString& n ) {mPostSyncCommand = n;}
65 QString getPostSyncCommand( ) { return mPostSyncCommand;}
66
67 void setLocalTempFile( const QString& n ) { mLocalTempFile= n;}
68 QString getLocalTempFile( ) { return mLocalTempFile;}
69 void setRemoteFileName( const QString& n ) { mRemoteFileName = n;}
70 QString getRemoteFileName( ) { return mRemoteFileName;}
71 /*
72 void set( const QString& n ) { = n;}
73 QString get( ) { return ;}
74 */
75
76 void setShowSummaryAfterSync( bool b ) { mShowSummaryAfterSync = b;}
77 bool getShowSummaryAfterSync( ) { return mShowSummaryAfterSync ;}
78 void setAskForPreferences( bool b ) { mAskForPreferences= b;}
79 bool getAskForPreferences( ) { return mAskForPreferences;}
80 void setWriteBackExisting( bool b ) { mWriteBackExisting = b;}
81 bool getWriteBackExisting( ) { return mWriteBackExisting;}
82 void setWriteBackFile( bool b ) { mWriteBackFile= b;}
83 bool getWriteBackFile( ) { return mWriteBackFile;}
84 void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;}
85 bool getIncludeInRingSync( ) { return mIncludeInRingSync;}
86 void setSyncPrefs( int n ) { mSyncPrefs= n;}
87 int getSyncPrefs( ) { return mSyncPrefs;}
88 void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;}
89 bool getIsLocalFileSync( ) { return mIsLocalFileSync;}
90
91 private:
92 QString mName;
93 QString mPreSyncCommand;
94 QString mPostSyncCommand;
95 QString mLocalTempFile;
96 QString mRemoteFileName;
97 bool mIncludeInRingSync;
98 int mSyncPrefs;
99 bool mWriteBackFile;
100 bool mWriteBackExisting;
101 bool mAskForPreferences;
102 bool mShowSummaryAfterSync;
103 bool mIsLocalFileSync;
104};
105
106#endif