akonadi
firstrun_p.h
00001 /* 00002 Copyright (c) 2008 Volker Krause <vkrause@kde.org> 00003 00004 This library is free software; you can redistribute it and/or modify it 00005 under the terms of the GNU Library General Public License as published by 00006 the Free Software Foundation; either version 2 of the License, or (at your 00007 option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, but WITHOUT 00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00012 License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to the 00016 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00017 02110-1301, USA. 00018 */ 00019 00020 #ifndef AKONADI_FIRSTRUN_P_H 00021 #define AKONADI_FIRSTRUN_P_H 00022 00023 #include <QObject> 00024 #include <QStringList> 00025 #include <QVariant> 00026 00027 class KConfig; 00028 class KJob; 00029 class KProcess; 00030 struct QMetaObject; 00031 00032 namespace Akonadi { 00033 00067 class Firstrun : public QObject 00068 { 00069 Q_OBJECT 00070 public: 00071 Firstrun( QObject * parent = 0 ); 00072 ~Firstrun(); 00073 00074 private: 00075 void findPendingDefaults(); 00076 void setupNext(); 00077 #ifndef KDEPIM_NO_KRESOURCES 00078 void migrateKresType( const QString &resourceFamily ); 00079 #endif 00080 static QVariant::Type argumentType( const QMetaObject *mo, const QString &method ); 00081 00082 private slots: 00083 void instanceCreated( KJob* job ); 00084 #ifndef KDEPIM_NO_KRESOURCES 00085 void migrationFinished( int exitCode ); 00086 #endif 00087 00088 private: 00089 QStringList mPendingDefaults; 00090 KConfig *mConfig; 00091 KConfig *mCurrentDefault; 00092 KProcess *mProcess; 00093 #ifndef KDEPIM_NO_KRESOURCES 00094 QStringList mPendingKres; 00095 QString mResourceFamily; 00096 #endif 00097 }; 00098 00099 } 00100 00101 #endif 00102