File indexing completed on 2024-04-28 04:18:54
0001 /* 0002 Gwenview: an image viewer 0003 Copyright 2007 Aurélien Gâteau <agateau@kde.org> 0004 0005 This program is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU General Public License 0007 as published by the Free Software Foundation; either version 2 0008 of the License, or (at your option) any later version. 0009 0010 This program is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 GNU General Public License for more details. 0014 0015 You should have received a copy of the GNU General Public License 0016 along with this program; if not, write to the Free Software 0017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0018 0019 */ 0020 #ifndef GVPART_H 0021 #define GVPART_H 0022 0023 // Qt 0024 0025 // KF 0026 #include <KParts/ReadOnlyPart> 0027 0028 // Local 0029 #include <lib/document/document.h> 0030 0031 class KPluginMetaData; 0032 0033 namespace Gwenview 0034 { 0035 class DocumentView; 0036 0037 class GVPart : public KParts::ReadOnlyPart 0038 { 0039 Q_OBJECT 0040 public: 0041 GVPart(QWidget *parentWidget, QObject *parent, const KPluginMetaData &metaData, const QVariantList &); 0042 0043 protected: 0044 bool openUrl(const QUrl &url) override; 0045 0046 private Q_SLOTS: 0047 void showContextMenu(); 0048 void showProperties(); 0049 void saveAs(); 0050 void showJobError(KJob *); 0051 0052 private: 0053 DocumentView *mDocumentView = nullptr; 0054 }; 0055 0056 } // namespace 0057 0058 #endif /* GVPART_H */