File indexing completed on 2024-05-12 04:58:13
0001 /* ============================================================ 0002 * Falkon - Qt web browser 0003 * Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com> 0004 * 0005 * This program is free software: you can redistribute it and/or modify 0006 * it under the terms of the GNU General Public License as published by 0007 * the Free Software Foundation, either version 3 of the License, or 0008 * (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, see <http://www.gnu.org/licenses/>. 0017 * ============================================================ */ 0018 #ifndef SITEINFO_H 0019 #define SITEINFO_H 0020 0021 #include "qzcommon.h" 0022 0023 #include <QUrl> 0024 #include <QDialog> 0025 0026 namespace Ui 0027 { 0028 class SiteInfo; 0029 } 0030 0031 class QNetworkReply; 0032 class QTreeWidgetItem; 0033 class QTreeWidget; 0034 0035 class WebView; 0036 class CertificateInfoWidget; 0037 0038 class FALKON_EXPORT SiteInfo : public QDialog 0039 { 0040 Q_OBJECT 0041 0042 public: 0043 explicit SiteInfo(WebView *view); 0044 ~SiteInfo(); 0045 0046 static bool canShowSiteInfo(const QUrl &url); 0047 0048 private Q_SLOTS: 0049 void showImagePreview(QTreeWidgetItem *item); 0050 void imagesCustomContextMenuRequested(const QPoint &p); 0051 void tagsCustomContextMenuRequested(const QPoint &p); 0052 void copySelectedItems(const QTreeWidget* treeWidget, const bool both); 0053 void saveImage(); 0054 0055 private: 0056 void showLoadingText(); 0057 void showPixmap(QPixmap pixmap); 0058 0059 Ui::SiteInfo* ui; 0060 CertificateInfoWidget* m_certWidget; 0061 WebView* m_view; 0062 QNetworkReply *m_imageReply; 0063 0064 QUrl m_baseUrl; 0065 }; 0066 0067 #endif // SITEINFO_H