KParts
browseropenorsavequestion.h
Go to the documentation of this file.
00001 /* 00002 Copyright (c) 2009 David Faure <faure@kde.org> 00003 00004 This library is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU Lesser General Public License as published by 00006 the Free Software Foundation; either version 2 of the License or ( at 00007 your option ) version 3 or, at the discretion of KDE e.V. ( which shall 00008 act as a proxy as in section 14 of the GPLv3 ), any later version. 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 Lesser 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 BROWSEROPENORSAVEQUESTION_H 00022 #define BROWSEROPENORSAVEQUESTION_H 00023 00024 #include "kparts_export.h" 00025 #include <kdialog.h> 00026 #include "browserrun.h" 00027 #include <kservice.h> 00028 00029 namespace KParts { 00030 00031 class BrowserOpenOrSaveQuestionPrivate; 00032 00041 class KPARTS_EXPORT BrowserOpenOrSaveQuestion 00042 { 00043 public: 00049 BrowserOpenOrSaveQuestion(QWidget* parent, const KUrl& url, const QString& mimeType); 00050 ~BrowserOpenOrSaveQuestion(); 00051 00056 void setSuggestedFileName(const QString& suggestedFileName); 00057 00064 enum Feature { BasicFeatures = 0, 00065 ServiceSelection = 1 00066 }; 00067 Q_DECLARE_FLAGS(Features, Feature) 00068 00069 00072 void setFeatures(Features features); 00073 00074 enum Result { Save, Open, Embed, Cancel }; 00075 00081 Result askOpenOrSave(); 00082 00091 Result askEmbedOrSave(int flags = 0); 00092 // KDE5 TODO: move BrowserRun::AskEmbedOrSaveFlags to this class. 00093 00094 // TODO askOpenEmbedOrSave 00095 00104 KService::Ptr selectedService() const; 00105 00106 private: 00107 BrowserOpenOrSaveQuestionPrivate* const d; 00108 }; 00109 00110 } 00111 00112 #endif /* BROWSEROPENORSAVEQUESTION_H */ 00113
KDE 4.6 API Reference