File indexing completed on 2024-04-28 03:50:31
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2010 Dennis Nienhüser <nienhueser@kde.org> 0004 // 0005 0006 #include "HostipPlugin.h" 0007 #include "HostipRunner.h" 0008 #include "MarbleGlobal.h" 0009 0010 namespace Marble 0011 { 0012 0013 HostipPlugin::HostipPlugin( QObject *parent ) : 0014 SearchRunnerPlugin( parent ) 0015 { 0016 setSupportedCelestialBodies(QStringList(QStringLiteral("earth"))); 0017 setCanWorkOffline( false ); 0018 } 0019 0020 QString HostipPlugin::name() const 0021 { 0022 return tr( "Hostip.info Search" ); 0023 } 0024 0025 QString HostipPlugin::guiString() const 0026 { 0027 return tr( "Hostip.info" ); 0028 } 0029 0030 QString HostipPlugin::nameId() const 0031 { 0032 return QStringLiteral("hostip"); 0033 } 0034 0035 QString HostipPlugin::version() const 0036 { 0037 return QStringLiteral("1.0"); 0038 } 0039 0040 QString HostipPlugin::description() const 0041 { 0042 return tr( "Host name and IP geolocation search using the hostip.info service" ); 0043 } 0044 0045 QString HostipPlugin::copyrightYears() const 0046 { 0047 return QStringLiteral("2010"); 0048 } 0049 0050 QVector<PluginAuthor> HostipPlugin::pluginAuthors() const 0051 { 0052 return QVector<PluginAuthor>() 0053 << PluginAuthor(QStringLiteral("Dennis Nienhüser"), QStringLiteral("nienhueser@kde.org")); 0054 } 0055 0056 SearchRunner* HostipPlugin::newRunner() const 0057 { 0058 return new HostipRunner; 0059 } 0060 0061 bool HostipPlugin::canWork() const 0062 { 0063 bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen; 0064 // Disabled on small screen devices to save resources 0065 return !smallScreen; 0066 } 0067 0068 } 0069 0070 #include "moc_HostipPlugin.cpp"