KCal Library
resourcelocaldir_p.h
00001 /* 00002 This file is part of the kcal library. 00003 00004 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.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 KCAL_RESOURCELOCALDIR_P_H 00022 #define KCAL_RESOURCELOCALDIR_P_H 00023 00024 #include <kurl.h> 00025 #include <kdirwatch.h> 00026 00027 class QString; 00028 namespace KABC { class Lock; } 00029 00030 namespace KCal { 00031 00032 class ResourceLocalDir; 00033 class Incidence; 00034 00039 //@cond PRIVATE 00040 class ResourceLocalDir::Private : QObject 00041 { 00042 Q_OBJECT 00043 public: 00044 Private( ResourceLocalDir *resource ) 00045 : mLock( 0 ), mResource( resource ) 00046 { 00047 init(); 00048 } 00049 00050 Private ( const QString &dirName, ResourceLocalDir *resource ) 00051 : mLock( 0 ), 00052 mURL( KUrl::fromPath( dirName ) ), 00053 mResource( resource ) 00054 { 00055 } 00056 00057 void init(); 00058 bool deleteIncidenceFile( Incidence *incidence ); 00059 static QString getUidFromFileName( const QString &fileName ); 00060 bool isTempFile( const QString &fileName ) const; 00061 bool doFileLoad( CalendarLocal &cal, const QString &fileName, bool replace ); 00062 00063 KABC::Lock *mLock; 00064 KUrl mURL; 00065 KDirWatch mDirWatch; 00066 QList<Incidence *> mDeletedIncidences; 00067 ResourceLocalDir *mResource; 00068 00069 signals: 00070 void resourceChanged( ResourceCalendar * ); 00071 00072 protected Q_SLOTS: 00073 void updateIncidenceInCalendar( const QString &file ); 00074 void addIncidenceToCalendar( const QString &file ); 00075 void deleteIncidenceFromCalendar( const QString &file ); 00076 00077 }; 00078 //@endcond 00079 00080 } 00081 00082 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue May 8 2012 00:03:21 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue May 8 2012 00:03:21 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.