~ubuntu-branches/ubuntu/quantal/qgis/quantal

« back to all changes in this revision

Viewing changes to plugins/grid_maker/plugin.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Halasz
  • Date: 2004-12-21 09:46:27 UTC
  • Revision ID: james.westby@ubuntu.com-20041221094627-r9lb6mlz2o3yp8gn
Tags: upstream-0.6.0
ImportĀ upstreamĀ versionĀ 0.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                          plugin.h 
 
3
 Functions:
 
4
                             -------------------
 
5
    begin                : Jan 21, 2004
 
6
    copyright            : (C) 2004 by Tim Sutton
 
7
    email                : tim@linfiniti.com
 
8
  
 
9
 ***************************************************************************/
 
10
 
 
11
/***************************************************************************
 
12
 *                                                                         *
 
13
 *   This program is free software; you can redistribute it and/or modify  *
 
14
 *   it under the terms of the GNU General Public License as published by  *
 
15
 *   the Free Software Foundation; either version 2 of the License, or     *
 
16
 *   (at your option) any later version.                                   *
 
17
 *                                                                         *
 
18
 ***************************************************************************/
 
19
 /*  $Id: plugin.h,v 1.4 2004/11/12 13:55:17 timlinux Exp $ */
 
20
#ifndef PLUGIN
 
21
#define PLUGIN
 
22
#include "../qgisplugin.h"
 
23
#include <qwidget.h>
 
24
#include <qgisapp.h>
 
25
 
 
26
/**
 
27
* \class Plugin
 
28
* \brief OpenModeller plugin for QGIS
 
29
*
 
30
*/
 
31
class Plugin:public QObject, public QgisPlugin
 
32
{
 
33
  Q_OBJECT public:
 
34
      /** 
 
35
       * Constructor for a plugin. The QgisApp and QgisIface pointers are passed by 
 
36
       * QGIS when it attempts to instantiate the plugin.
 
37
       * @param qgis Pointer to the QgisApp object
 
38
       * @param qI Pointer to the QgisIface object. 
 
39
       */
 
40
      Plugin(QgisApp * , QgisIface * );
 
41
  /**
 
42
   * Virtual function to return the name of the plugin. The name will be used when presenting a list 
 
43
   * of installable plugins to the user
 
44
   */
 
45
  virtual QString name();
 
46
  /**
 
47
   * Virtual function to return the version of the plugin. 
 
48
   */
 
49
  virtual QString version();
 
50
  /**
 
51
   * Virtual function to return a description of the plugins functions 
 
52
   */
 
53
  virtual QString description();
 
54
  /**
 
55
   * Return the plugin type
 
56
   */
 
57
  virtual int type();
 
58
  //! Destructor
 
59
  virtual ~ Plugin();
 
60
  public slots:
 
61
  //! init the gui
 
62
  virtual void initGui();
 
63
  //! Show the dialog box
 
64
  void run();
 
65
  //!draw a raster layer in the qui
 
66
  void drawRasterLayer(QString);
 
67
  //! Add a vector layer given vectorLayerPath, baseName, providerKey ("ogr" or "postgres");
 
68
  void drawVectorLayer(QString,QString,QString);
 
69
  //! unload the plugin
 
70
  void unload();
 
71
  //! show the help document
 
72
  void help();
 
73
    private:
 
74
 
 
75
 
 
76
  //! Name of the plugin
 
77
  QString pluginNameQString;
 
78
  //! Version
 
79
  QString pluginVersionQString;
 
80
  //! Descrption of the plugin
 
81
  QString pluginDescriptionQString;
 
82
  //! Plugin type as defined in QgisPlugin::PLUGINTYPE
 
83
  int pluginType;
 
84
  //! Id of the plugin's menu. Used for unloading
 
85
  int menuIdInt;
 
86
  //! Pointer to our menu
 
87
  QMenuBar *menuBarPointer;
 
88
  //! Pionter to QGIS main application object
 
89
  QgisApp *qgisMainWindowPointer;
 
90
  //! Pointer to the QGIS interface object
 
91
  QgisIface *qGisInterface;
 
92
  //! Pointer to the QAction object used in the menu and toolbar
 
93
  QAction *myQActionPointer;
 
94
};
 
95
 
 
96
#endif