kpilot

internalEditorAction.h

Go to the documentation of this file.
00001 #ifndef _INTERNALEDITORACTION_H_
00002 #define _INTERNALEDITORACTION_H_
00003 /* internalEditorAction.h                            KPilot
00004 **
00005 ** Copyright (C) 2003 Reinhold Kainhofer <reinhold@kainhofer.com>
00006 **
00007 */
00008 
00009 /*
00010 ** This program is free software; you can redistribute it and/or modify
00011 ** it under the terms of the GNU General Public License as published by
00012 ** the Free Software Foundation; either version 2 of the License, or
00013 ** (at your option) any later version.
00014 **
00015 ** This program is distributed in the hope that it will be useful,
00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018 ** GNU General Public License for more details.
00019 **
00020 ** You should have received a copy of the GNU General Public License
00021 ** along with this program in a file called COPYING; if not, write to
00022 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00023 ** MA 02110-1301, USA.
00024 */
00025 
00026 /*
00027 ** Bug reports and questions can be sent to kde-pim@kde.org
00028 */
00029 
00030 
00031 #include <qstringlist.h>
00032 
00033 #include "syncAction.h"
00034 
00035 
00036 class InternalEditorAction : public SyncAction
00037 {
00038 Q_OBJECT
00039 
00040 public:
00041     InternalEditorAction(KPilotLink *);
00042     ~InternalEditorAction() {}
00043 
00044 protected:
00045     virtual bool exec();
00046 
00047 private:
00048 private slots:
00049     void syncDirtyDB();
00050     void syncFlagsChangedDB();
00051     void syncAppBlockChangedDB();
00052     void cleanup();
00053 
00054 private:
00055     bool queryUseKPilotChanges(QString dbName, recordid_t id,
00056         PilotRecord*localrec, PilotRecord*serialrec, PilotDatabase*db);
00057     QStringList dirtyDBs;
00058     QStringList::Iterator dbIter;
00059     enum eInternalEditorSyncStatus {
00060         eSyncStarted,
00061         eSyncDirtyDB,
00062         eSyncFlagsChangedDB,
00063         eSyncAppBlockChangedDB,
00064         eSyncFinished
00065     } fInternalEditorSyncStatus;
00066 } ;
00067 
00068 #endif