• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • plugins
  • render
  • postalcode
PostalCodePlugin.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2011 Valery Kharitonov <kharvd@gmail.com>
9 //
10 
11 #include "PostalCodePlugin.h"
12 #include "PostalCodeModel.h"
13 
14 using namespace Marble;
15 
16 PostalCodePlugin::PostalCodePlugin()
17  : AbstractDataPlugin( 0 )
18 {
19 }
20 
21 PostalCodePlugin::PostalCodePlugin( const MarbleModel *marbleModel )
22  : AbstractDataPlugin( marbleModel )
23 {
24  setEnabled( true );
25  setVisible( false );
26 }
27 
28 void PostalCodePlugin::initialize()
29 {
30  setModel( new PostalCodeModel( marbleModel(), this ) );
31  setNumberOfItems( 20 );
32 }
33 
34 QString PostalCodePlugin::name() const
35 {
36  return tr( "Postal Codes" );
37 }
38 
39 QString PostalCodePlugin::guiString() const
40 {
41  return tr( "Postal Codes" );
42 }
43 
44 QString PostalCodePlugin::nameId() const
45 {
46  return "postalCode";
47 }
48 
49 QString PostalCodePlugin::version() const
50 {
51  return "1.0";
52 }
53 
54 QString PostalCodePlugin::copyrightYears() const
55 {
56  return "2011";
57 }
58 
59 QList<PluginAuthor> PostalCodePlugin::pluginAuthors() const
60 {
61  return QList<PluginAuthor>()
62  << PluginAuthor( "Valery Kharitonov", "kharvd@gmail.com" );
63 }
64 
65 QString PostalCodePlugin::description() const
66 {
67  return tr( "Shows postal codes of the area on the map." );
68 }
69 
70 QIcon PostalCodePlugin::icon() const
71 {
72  return QIcon(":/icons/postalcode.png");
73 }
74 
75 Q_EXPORT_PLUGIN2( PostalCodePlugin, Marble::PostalCodePlugin )
76 
77 #include "PostalCodePlugin.moc"
Marble::AbstractDataPlugin::setNumberOfItems
void setNumberOfItems(quint32 number)
Set the number of items to be shown at the same time.
Definition: AbstractDataPlugin.cpp:156
Marble::PluginAuthor
Definition: PluginInterface.h:28
Marble::PostalCodePlugin
Definition: PostalCodePlugin.h:20
Marble::AbstractDataPlugin
An abstract class for plugins that show data that has a geo coordinate.
Definition: AbstractDataPlugin.h:45
PostalCodePlugin.h
Marble::PostalCodeModel
Definition: PostalCodeModel.h:18
QObject::tr
QString tr(const char *sourceText, const char *disambiguation, int n)
Marble::PostalCodePlugin::PostalCodePlugin
PostalCodePlugin()
Definition: PostalCodePlugin.cpp:16
Marble::PostalCodePlugin::icon
QIcon icon() const
Returns an icon for the plugin.
Definition: PostalCodePlugin.cpp:70
Marble::PostalCodePlugin::name
QString name() const
Returns the user-visible name of the plugin.
Definition: PostalCodePlugin.cpp:34
Marble::PostalCodePlugin::description
QString description() const
Returns a user description of the plugin.
Definition: PostalCodePlugin.cpp:65
Marble::RenderPlugin::setVisible
void setVisible(bool visible)
settting visible
Definition: RenderPlugin.cpp:151
QString
QList
Marble::AbstractDataPlugin::setModel
void setModel(AbstractDataPluginModel *model)
Set the model of the plugin.
Definition: AbstractDataPlugin.cpp:134
Marble::PostalCodePlugin::version
QString version() const
Definition: PostalCodePlugin.cpp:49
Q_EXPORT_PLUGIN2
#define Q_EXPORT_PLUGIN2(a, b)
Definition: marble_export.h:34
Marble::PostalCodePlugin::initialize
virtual void initialize()
Definition: PostalCodePlugin.cpp:28
Marble::PostalCodePlugin::nameId
QString nameId() const
Returns the unique name of the plugin.
Definition: PostalCodePlugin.cpp:44
Marble::PostalCodePlugin::pluginAuthors
QList< PluginAuthor > pluginAuthors() const
Definition: PostalCodePlugin.cpp:59
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
Marble::RenderPlugin::setEnabled
void setEnabled(bool enabled)
settting enabled
Definition: RenderPlugin.cpp:139
PostalCodeModel.h
Marble::PostalCodePlugin::guiString
QString guiString() const
String that should be displayed in GUI.
Definition: PostalCodePlugin.cpp:39
Marble::RenderPlugin::marbleModel
const MarbleModel * marbleModel() const
Access to the MarbleModel.
Definition: RenderPlugin.cpp:83
QIcon
Marble::PostalCodePlugin::copyrightYears
QString copyrightYears() const
Definition: PostalCodePlugin.cpp:54
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal