author | zecke <zecke> | 2002-11-15 21:43:59 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-15 21:43:59 (UTC) |
commit | a1306f7603ab9a05f7d0059fad60b68f01a0ae71 (patch) (unidiff) | |
tree | 9af055fb6dea589ac5e5d93a7bf9f192b257c4c8 /libopie2/opiepim/core | |
parent | 11116312592ada97b202f09c6e9ee57c9dd80b84 (diff) | |
download | opie-a1306f7603ab9a05f7d0059fad60b68f01a0ae71.zip opie-a1306f7603ab9a05f7d0059fad60b68f01a0ae71.tar.gz opie-a1306f7603ab9a05f7d0059fad60b68f01a0ae71.tar.bz2 |
Make OTodo compile
add the MaintainerMode to OTodo
-rw-r--r-- | libopie2/opiepim/core/opimmaintainer.cpp | 37 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimmaintainer.h | 36 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimxrefmanager.cpp | 2 |
3 files changed, 75 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/opimmaintainer.cpp b/libopie2/opiepim/core/opimmaintainer.cpp new file mode 100644 index 0000000..e34f035 --- a/dev/null +++ b/libopie2/opiepim/core/opimmaintainer.cpp | |||
@@ -0,0 +1,37 @@ | |||
1 | #include "opimmaintainer.h" | ||
2 | |||
3 | OPimMaintainer::OPimMaintainer( enum Mode mode, int uid ) | ||
4 | : m_mode(mode), m_uid(uid ) | ||
5 | {} | ||
6 | OPimMaintainer::~OPimMaintainer() { | ||
7 | } | ||
8 | OPimMaintainer::OPimMaintainer( const OPimMaintainer& main ) { | ||
9 | *this = main; | ||
10 | } | ||
11 | OPimMaintainer &OPimMaintainer::operator=( const OPimMaintainer& main ) { | ||
12 | m_mode = main.m_mode; | ||
13 | m_uid = main.m_uid; | ||
14 | |||
15 | return *this; | ||
16 | } | ||
17 | bool OPimMaintainer::operator==( const OPimMaintainer& main ) { | ||
18 | if (m_mode != main.m_mode ) return false; | ||
19 | if (m_uid != main.m_uid ) return false; | ||
20 | |||
21 | return true; | ||
22 | } | ||
23 | bool OPimMaintainer::operator!=( const OPimMaintainer& main ) { | ||
24 | return !(*this == main ); | ||
25 | } | ||
26 | OPimMaintainer::Mode OPimMaintainer::mode()const { | ||
27 | return m_mode; | ||
28 | } | ||
29 | int OPimMaintainer::uid()const { | ||
30 | return m_uid; | ||
31 | } | ||
32 | void OPimMaintainer::setMode( enum Mode mo) { | ||
33 | m_mode = mo; | ||
34 | } | ||
35 | void OPimMaintainer::setUid( int uid ) { | ||
36 | m_uid = uid; | ||
37 | } | ||
diff --git a/libopie2/opiepim/core/opimmaintainer.h b/libopie2/opiepim/core/opimmaintainer.h new file mode 100644 index 0000000..310e15a --- a/dev/null +++ b/libopie2/opiepim/core/opimmaintainer.h | |||
@@ -0,0 +1,36 @@ | |||
1 | #ifndef OPIE_PIM_MAINTAINER_H | ||
2 | #define OPIE_PIM_MAINTAINER_H | ||
3 | |||
4 | #include <qstring.h> | ||
5 | |||
6 | /** | ||
7 | * Who maintains what? | ||
8 | */ | ||
9 | class OPimMaintainer { | ||
10 | public: | ||
11 | enum Mode { Undefined = -1, | ||
12 | Responsible = 0, | ||
13 | DoneBy, | ||
14 | Coordinating }; | ||
15 | OPimMaintainer( enum Mode mode = Undefined, int uid = 0); | ||
16 | OPimMaintainer( const OPimMaintainer& ); | ||
17 | ~OPimMaintainer(); | ||
18 | |||
19 | OPimMaintainer &operator=( const OPimMaintainer& ); | ||
20 | bool operator==( const OPimMaintainer& ); | ||
21 | bool operator!=( const OPimMaintainer& ); | ||
22 | |||
23 | |||
24 | Mode mode()const; | ||
25 | int uid()const; | ||
26 | |||
27 | void setMode( enum Mode ); | ||
28 | void setUid( int uid ); | ||
29 | |||
30 | private: | ||
31 | Mode m_mode; | ||
32 | int m_uid; | ||
33 | |||
34 | }; | ||
35 | |||
36 | #endif | ||
diff --git a/libopie2/opiepim/core/opimxrefmanager.cpp b/libopie2/opiepim/core/opimxrefmanager.cpp index d49f5f5..965f542 100644 --- a/libopie2/opiepim/core/opimxrefmanager.cpp +++ b/libopie2/opiepim/core/opimxrefmanager.cpp | |||
@@ -1,56 +1,58 @@ | |||
1 | #include "opimxrefmanager.h" | 1 | #include "opimxrefmanager.h" |
2 | 2 | ||
3 | 3 | ||
4 | OPimXRefManager::OPimXRefManager() { | 4 | OPimXRefManager::OPimXRefManager() { |
5 | } | 5 | } |
6 | OPimXRefManager::OPimXRefManager( const OPimXRefManager& ref) { | 6 | OPimXRefManager::OPimXRefManager( const OPimXRefManager& ref) { |
7 | m_list = ref.m_list; | 7 | m_list = ref.m_list; |
8 | } | 8 | } |
9 | OPimXRefManager::~OPimXRefManager() { | ||
10 | } | ||
9 | OPimXRefManager &OPimXRefManager::operator=( const OPimXRefManager& ref) { | 11 | OPimXRefManager &OPimXRefManager::operator=( const OPimXRefManager& ref) { |
10 | m_list = ref.m_list; | 12 | m_list = ref.m_list; |
11 | return *this; | 13 | return *this; |
12 | } | 14 | } |
13 | bool OPimXRefManager::operator==( const OPimXRefManager& /*ref*/) { | 15 | bool OPimXRefManager::operator==( const OPimXRefManager& /*ref*/) { |
14 | // if ( m_list == ref.m_list ) return true; | 16 | // if ( m_list == ref.m_list ) return true; |
15 | 17 | ||
16 | return false; | 18 | return false; |
17 | } | 19 | } |
18 | void OPimXRefManager::add( const OPimXRef& ref) { | 20 | void OPimXRefManager::add( const OPimXRef& ref) { |
19 | m_list.append( ref ); | 21 | m_list.append( ref ); |
20 | } | 22 | } |
21 | void OPimXRefManager::remove( const OPimXRef& ref) { | 23 | void OPimXRefManager::remove( const OPimXRef& ref) { |
22 | m_list.remove( ref ); | 24 | m_list.remove( ref ); |
23 | } | 25 | } |
24 | void OPimXRefManager::replace( const OPimXRef& ref) { | 26 | void OPimXRefManager::replace( const OPimXRef& ref) { |
25 | m_list.remove( ref ); | 27 | m_list.remove( ref ); |
26 | m_list.append( ref ); | 28 | m_list.append( ref ); |
27 | } | 29 | } |
28 | void OPimXRefManager::clear() { | 30 | void OPimXRefManager::clear() { |
29 | m_list.clear(); | 31 | m_list.clear(); |
30 | } | 32 | } |
31 | QStringList OPimXRefManager::apps()const { | 33 | QStringList OPimXRefManager::apps()const { |
32 | OPimXRef::ValueList::ConstIterator it; | 34 | OPimXRef::ValueList::ConstIterator it; |
33 | QStringList list; | 35 | QStringList list; |
34 | 36 | ||
35 | QString str; | 37 | QString str; |
36 | for ( it = m_list.begin(); it != m_list.end(); ++it ) { | 38 | for ( it = m_list.begin(); it != m_list.end(); ++it ) { |
37 | str = (*it).partner( OPimXRef::One ).appName(); | 39 | str = (*it).partner( OPimXRef::One ).appName(); |
38 | if ( !list.contains( str ) ) list << str; | 40 | if ( !list.contains( str ) ) list << str; |
39 | 41 | ||
40 | str = (*it).partner( OPimXRef::Two ).appName(); | 42 | str = (*it).partner( OPimXRef::Two ).appName(); |
41 | if ( !list.contains( str ) ) list << str; | 43 | if ( !list.contains( str ) ) list << str; |
42 | } | 44 | } |
43 | return list; | 45 | return list; |
44 | } | 46 | } |
45 | OPimXRef::ValueList OPimXRefManager::list()const { | 47 | OPimXRef::ValueList OPimXRefManager::list()const { |
46 | return m_list; | 48 | return m_list; |
47 | } | 49 | } |
48 | OPimXRef::ValueList OPimXRefManager::list( const QString& appName )const{ | 50 | OPimXRef::ValueList OPimXRefManager::list( const QString& appName )const{ |
49 | OPimXRef::ValueList list; | 51 | OPimXRef::ValueList list; |
50 | OPimXRef::ValueList::ConstIterator it; | 52 | OPimXRef::ValueList::ConstIterator it; |
51 | 53 | ||
52 | for ( it = m_list.begin(); it != m_list.end(); ++it ) { | 54 | for ( it = m_list.begin(); it != m_list.end(); ++it ) { |
53 | if ( (*it).containsString( appName ) ) | 55 | if ( (*it).containsString( appName ) ) |
54 | list.append( (*it) ); | 56 | list.append( (*it) ); |
55 | } | 57 | } |
56 | 58 | ||