File indexing completed on 2024-05-05 03:50:49

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2011 Valery Kharitonov <kharvd@gmail.com>
0004 //
0005 
0006 #include "PostalCodePlugin.h"
0007 #include "PostalCodeModel.h"
0008 
0009 #include <QIcon>
0010 
0011 using namespace Marble;
0012 
0013 PostalCodePlugin::PostalCodePlugin()
0014     : AbstractDataPlugin( nullptr )
0015 {
0016 }
0017 
0018 PostalCodePlugin::PostalCodePlugin( const MarbleModel *marbleModel )
0019     : AbstractDataPlugin( marbleModel )
0020 {
0021     setEnabled( true );
0022     setVisible( false );
0023 }
0024 
0025 void PostalCodePlugin::initialize()
0026 {
0027     setModel( new PostalCodeModel( marbleModel(), this ) );
0028     setNumberOfItems( 20 );
0029 }
0030 
0031 QString PostalCodePlugin::name() const
0032 {
0033     return tr( "Postal Codes" );
0034 }
0035 
0036 QString PostalCodePlugin::guiString() const
0037 {
0038     return tr( "Postal Codes" );
0039 }
0040 
0041 QString PostalCodePlugin::nameId() const
0042 {
0043     return QStringLiteral("postalCode");
0044 }
0045 
0046 QString PostalCodePlugin::version() const
0047 {
0048     return QStringLiteral("1.0");
0049 }
0050 
0051 QString PostalCodePlugin::copyrightYears() const
0052 {
0053     return QStringLiteral("2011");
0054 }
0055 
0056 QVector<PluginAuthor> PostalCodePlugin::pluginAuthors() const
0057 {
0058     return QVector<PluginAuthor>()
0059             << PluginAuthor(QStringLiteral("Valery Kharitonov"), QStringLiteral("kharvd@gmail.com"));
0060 }
0061 
0062 QString PostalCodePlugin::description() const
0063 {
0064     return tr( "Shows postal codes of the area on the map." );
0065 }
0066 
0067 QIcon PostalCodePlugin::icon() const
0068 {
0069     return QIcon(QStringLiteral(":/icons/postalcode.png"));
0070 }
0071 
0072 #include "moc_PostalCodePlugin.cpp"