File indexing completed on 2025-01-12 04:35:48
0001 /*************************************************************************** 0002 * SPDX-License-Identifier: GPL-2.0-or-later 0003 * * 0004 * SPDX-FileCopyrightText: 2004-2023 Thomas Fischer <fischer@unix-ag.uni-kl.de> 0005 * * 0006 * This program is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU General Public License as published by * 0008 * the Free Software Foundation; either version 2 of the License, or * 0009 * (at your option) any later version. * 0010 * * 0011 * This program is distributed in the hope that it will be useful, * 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0014 * GNU General Public License for more details. * 0015 * * 0016 * You should have received a copy of the GNU General Public License * 0017 * along with this program; if not, see <https://www.gnu.org/licenses/>. * 0018 ***************************************************************************/ 0019 0020 #ifndef KBIBTEX_PROGRAM_DOCKLET_REFERENCEPREVIEW_H 0021 #define KBIBTEX_PROGRAM_DOCKLET_REFERENCEPREVIEW_H 0022 0023 #include <QWidget> 0024 #include <QUrl> 0025 0026 class Element; 0027 class File; 0028 class FileView; 0029 0030 class ReferencePreview : public QWidget 0031 { 0032 Q_OBJECT 0033 public: 0034 explicit ReferencePreview(QWidget *parent); 0035 ~ReferencePreview() override; 0036 0037 void setEnabled(bool); 0038 0039 void setFileView(FileView *fileView); 0040 0041 public Q_SLOTS: 0042 void setElement(QSharedPointer<const Element>, const File *); 0043 0044 private: 0045 class Private; 0046 Private *d; 0047 0048 private Q_SLOTS: 0049 void renderHTML(); 0050 void openAsHTML(); 0051 void saveAsHTML(); 0052 void linkClicked(const QUrl &); 0053 }; 0054 0055 #endif // KBIBTEX_PROGRAM_DOCKLET_REFERENCEPREVIEW_H