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

« back to all changes in this revision

Viewing changes to plugins/copyright_label/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.13 2004/11/21 00:45:07 timlinux Exp $ */
 
20
#ifndef PLUGIN
 
21
#define PLUGIN
 
22
#include "../qgisplugin.h"
 
23
#include "../../src/qgisapp.h"
 
24
#include <qwidget.h>
 
25
#include <qfont.h>
 
26
#include <qcolor.h>
 
27
#include <qsimplerichtext.h>
 
28
#include <qpainter.h>
 
29
/**
 
30
* \class Plugin
 
31
* \brief OpenModeller plugin for QGIS
 
32
*
 
33
*/
 
34
class Plugin:public QObject, public QgisPlugin
 
35
{
 
36
  Q_OBJECT public:
 
37
      /**
 
38
       * Constructor for a plugin. The QgisApp and QgisIface pointers are passed by
 
39
       * QGIS when it attempts to instantiate the plugin.
 
40
       * @param qgis Pointer to the QgisApp object
 
41
       * @param qI Pointer to the QgisIface object.
 
42
       */
 
43
      Plugin(QgisApp * , QgisIface * );
 
44
  //! Destructor
 
45
  virtual ~ Plugin();
 
46
  void writeEntry(QString theScope, QString theProperty, QVariant theValue);
 
47
  public slots:
 
48
  //! init the gui
 
49
  void initGui();
 
50
  //!set values on the gui when a project is read or the gui first loaded
 
51
  void projectRead();
 
52
  //! Show the dialog box
 
53
  void run();
 
54
  void renderLabel(QPainter *);
 
55
  //! Refresh the map display using the mapcanvas exported via the plugin interface
 
56
  void refreshCanvas();
 
57
  //! unload the plugin
 
58
  void unload();
 
59
  //! show the help document
 
60
  void help();
 
61
  //! change the copyright font
 
62
  void setFont(QFont);
 
63
  //! change the copyright text
 
64
  void setLabel(QString);
 
65
  //! change the copyright font colour
 
66
  void setColor(QColor);
 
67
  //! set copyright label placement
 
68
  void setPlacement(QString);
 
69
  //! set copyright label enabled
 
70
  void setEnable(bool);
 
71
 
 
72
 
 
73
 
 
74
    private:
 
75
  //! This is the font that will be used for the copyright label
 
76
  QFont mQFont;
 
77
  //! This is the string that will be used for the copyright label
 
78
  QString mLabelQString;
 
79
  //! This is the colour for the copyright label
 
80
  QColor mLabelQColor;
 
81
  //! Placement of the copyright label
 
82
  QString mPlacement;
 
83
  //! Copyright label enabled
 
84
  bool mEnable;
 
85
 
 
86
  int pluginType;
 
87
  //! Id of the plugin's menu. Used for unloading
 
88
  int menuIdInt;
 
89
  //! Pointer to our menu
 
90
  QMenuBar *menuBarPointer;
 
91
  //! Pionter to QGIS main application object
 
92
  QgisApp *qgisMainWindowPointer;
 
93
  //! Pointer to the QGIS interface object
 
94
  QgisIface *qGisInterface;
 
95
  //! Pointer to the QAction object used in the menu and toolbar
 
96
  QAction *myQActionPointer;
 
97
};
 
98
 
 
99
#endif