File indexing completed on 2024-05-05 05:56:43
0001 /* 0002 This file is part of the Okteta KPart module, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2004, 2009 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef OKTETABROWSEREXTENSION_HPP 0010 #define OKTETABROWSEREXTENSION_HPP 0011 0012 // KF 0013 #include <KParts/BrowserExtension> 0014 0015 class OktetaPart; 0016 0017 /** 0018 * @short Extension for better support for embedding in browsers 0019 * @author Friedrich W. H. Kossebau <kossebau@kde.org> 0020 */ 0021 class OktetaBrowserExtension : public KParts::BrowserExtension 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 explicit OktetaBrowserExtension(OktetaPart* part); 0027 0028 public: // KParts::BrowserExtension API 0029 void saveState(QDataStream& stream) override; 0030 void restoreState(QDataStream& stream) override; 0031 0032 public Q_SLOTS: 0033 /** copy text to clipboard */ 0034 void copy(); 0035 void print(); 0036 0037 private Q_SLOTS: 0038 /** selection has changed */ 0039 void onSelectionChanged(bool hasSelection); 0040 0041 private: 0042 OktetaPart* mPart; 0043 }; 0044 0045 #endif