KIO
kbookmarkimporter_crash.h
Go to the documentation of this file.00001 // -*- c-basic-offset:4; indent-tabs-mode:nil -*- 00002 // vim: set ts=4 sts=4 sw=4 et: 00003 /* This file is part of the KDE libraries 00004 Copyright (C) 2002 Alexander Kellett <lypanov@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 version 2 as published by the Free Software Foundation. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef __kbookmarkimporter_crash_h 00022 #define __kbookmarkimporter_crash_h 00023 00024 #include <QtCore/QStringList> 00025 #include <QtCore/QMap> 00026 #include <kconfig.h> 00027 #include <kdemacros.h> 00028 00029 #include "kbookmarkimporter.h" 00030 00035 class KIO_EXPORT_DEPRECATED KCrashBookmarkImporter : public QObject 00036 { 00037 Q_OBJECT 00038 public: 00039 KCrashBookmarkImporter( const QString & fileName ) : m_fileName(fileName) {} 00040 ~KCrashBookmarkImporter() {} 00041 void parseCrashBookmarks( bool del = true ); 00042 static QString crashBookmarksDir( ); 00043 Q_SIGNALS: 00044 void newBookmark( const QString & text, const QString & url, const QString & additionalInfo ); 00045 void newFolder( const QString & text, bool open, const QString & additionalInfo ); 00046 void newSeparator(); 00047 void endFolder(); 00048 protected: 00049 QString m_fileName; 00050 }; 00051 00055 class KIO_EXPORT KCrashBookmarkImporterImpl : public KBookmarkImporterBase 00056 { 00057 public: 00058 KCrashBookmarkImporterImpl() : m_shouldDelete(false) { } 00059 void setShouldDelete(bool); 00060 virtual void parse(); 00061 virtual QString findDefaultLocation(bool forSaving = false) const; 00062 static QStringList getCrashLogs(); 00063 private: 00064 bool m_shouldDelete; 00065 QMap<QString, QString> parseCrashLog_noemit( const QString & filename, bool del ); 00066 class KCrashBookmarkImporterImplPrivate *d; 00067 }; 00068 00069 #endif