File indexing completed on 2025-02-16 04:40:53
0001 /*************************************************************************** 0002 * SPDX-License-Identifier: GPL-2.0-or-later 0003 * * 0004 * SPDX-FileCopyrightText: 2004-2019 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 #ifdef HAVE_WEBENGINEWIDGETS 0021 0022 #ifndef KBIBTEX_NETWORKING_ONLINESEARCHJSTOR_H 0023 #define KBIBTEX_NETWORKING_ONLINESEARCHJSTOR_H 0024 0025 #include <onlinesearch/OnlineSearchAbstract> 0026 0027 #ifdef HAVE_KF 0028 #include "kbibtexnetworking_export.h" 0029 #endif // HAVE_KF 0030 0031 /** 0032 * @author Thomas Fischer <fischer@unix-ag.uni-kl.de> 0033 */ 0034 class KBIBTEXNETWORKING_EXPORT OnlineSearchJStor : public OnlineSearchAbstract 0035 { 0036 Q_OBJECT 0037 0038 public: 0039 explicit OnlineSearchJStor(QObject *parent); 0040 ~OnlineSearchJStor() override; 0041 0042 void startSearch(const QMap<QueryKey, QString> &query, int numResults) override; 0043 QString label() const override; 0044 QUrl homepage() const override; 0045 0046 protected: 0047 void sanitizeEntry(QSharedPointer<Entry> entry) override; 0048 0049 private Q_SLOTS: 0050 void doneFetchingStartPage(); 0051 void doneFetchingResultPage(); 0052 void doneFetchingBibTeXCode(); 0053 0054 private: 0055 class OnlineSearchJStorPrivate; 0056 OnlineSearchJStorPrivate *d; 0057 }; 0058 0059 #endif // KBIBTEX_NETWORKING_ONLINESEARCHJSTOR_H 0060 0061 #endif // HAVE_WEBENGINEWIDGETS