korganizer
previewdialog.h
00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 2003,2004 Cornelius Schumacher <schumacher@kde.org> 00005 Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00006 00007 Copyright (C) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net> 00008 Author: Sergio Martins, <sergio.martins@kdab.com> 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; if not, write to the Free Software 00022 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00023 00024 As a special exception, permission is given to link this program 00025 with any edition of TQt, and distribute the resulting executable, 00026 without including the source code for TQt in the source distribution. 00027 */ 00028 00029 #ifndef PREVIEWDIALOG_H 00030 #define PREVIEWDIALOG_H 00031 00032 #include <kdialogbase.h> 00033 #include <kurl.h> 00034 00035 class KOListView; 00036 00037 namespace KCal { 00038 class CalendarLocal; 00039 } 00040 00041 class PreviewDialog : public KDialogBase 00042 { 00043 Q_OBJECT 00044 public: 00045 PreviewDialog( const KURL &url, TQWidget *parent ); 00046 ~PreviewDialog(); 00047 bool loadCalendar(); 00048 00049 public slots: 00050 void slotAdd(); 00051 void slotMerge(); 00052 00053 signals: 00054 void dialogFinished( PreviewDialog * ); 00055 void openURL( const KURL &, bool ); 00056 void addResource( const KURL & ); 00057 00058 private: 00059 // Checks if mOriginalUrl is a temp file, if it is we ask the user a place to 00060 // keep the calendar file 00061 bool isTempFile() const; 00062 private: 00063 KURL mOriginalUrl; 00064 KURL *mLocalUrl; 00065 KOListView *mListView; 00066 KCal::CalendarLocal *mCalendar; 00067 }; 00068 00069 #endif