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

« back to all changes in this revision

Viewing changes to src/qgsdlgvectorlayerproperties.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
                          qgsdlgvectorlayerproperties.h
 
3
                   Unified property dialog for vector layers
 
4
                             -------------------
 
5
    begin                : 2004-01-28
 
6
    copyright            : (C) 2004 by Gary E.Sherman
 
7
    email                : sherman at mrcc.com
 
8
***************************************************************************/
 
9
 
 
10
/***************************************************************************
 
11
 *                                                                         *
 
12
 *   This program is free software; you can redistribute it and/or modify  *
 
13
 *   it under the terms of the GNU General Public License as published by  *
 
14
 *   the Free Software Foundation; either version 2 of the License, or     *
 
15
 *   (at your option) any later version.                                   *
 
16
 *                                                                         *
 
17
 ***************************************************************************/
 
18
 /* $Id: qgsdlgvectorlayerproperties.h,v 1.12 2004/11/21 02:11:44 timlinux Exp $ */
 
19
#ifndef QGSDLGVECTORLAYERPROPERTIES
 
20
#define QGSDLGVECTORLAYERPROPERTIES
 
21
#ifdef WIN32
 
22
#include "qgsdlgvectorlayerpropertiesbase.h"
 
23
#else
 
24
#include "qgsdlgvectorlayerpropertiesbase.uic.h"
 
25
#endif
 
26
#include "qgsrenderer.h"
 
27
#include "qpixmap.h"
 
28
#include "qlineedit.h"
 
29
 
 
30
class QgsVectorLayer;
 
31
class QgsLabelDialog;
 
32
class QgsAttributeActionDialog;
 
33
 
 
34
class QgsDlgVectorLayerProperties : public QgsDlgVectorLayerPropertiesBase{
 
35
  Q_OBJECT
 
36
  public:
 
37
  QgsDlgVectorLayerProperties(QgsVectorLayer *lyr =0,QWidget *parent=0, const char *name=0, bool modal=true);
 
38
  ~QgsDlgVectorLayerProperties();
 
39
  /**Sets the legend type to "single symbol", "graduated symbol" or "continuous color"*/
 
40
  void setLegendType(QString type);
 
41
  /**Returns the display name entered in the dialog*/
 
42
  QString displayName();
 
43
  /**Sets the attribute that is used in the Identify Results dialog box*/
 
44
  void setDisplayField(QString name);
 
45
  /**Sets the rendererDirty flag*/
 
46
  void setRendererDirty(bool enabled=true);
 
47
  /**Returns a pointer to the bufferDialog*/
 
48
  QDialog* getBufferDialog();
 
49
  /**Sets the buffer dialog*/
 
50
  void setBufferDialog(QDialog* dialog);
 
51
  /**Returns a pointer to the buffer pixmap*/
 
52
  QPixmap* getBufferPixmap();
 
53
  /**Returns a pointer to the buffer renderer*/
 
54
  QgsRenderer* getBufferRenderer();
 
55
 
 
56
 
 
57
  public slots:
 
58
  void alterLayerDialog(const QString& string);
 
59
  /** Reset to original (vector layer) values */
 
60
  void reset();
 
61
 
 
62
  //
 
63
  //methods reimplemented from qt designer base class
 
64
  //
 
65
 
 
66
 
 
67
  void pbnCancel_clicked();
 
68
  void pbnOK_clicked();
 
69
  void pbnApply_clicked();
 
70
  void btnHelp_clicked();
 
71
  void pbnQueryBuilder_clicked();
 
72
 
 
73
 
 
74
  protected:
 
75
  QgsVectorLayer *layer;
 
76
  /**Flag indicating that the render type has changed compared to the vector layer (true)*/
 
77
  bool rendererDirty;
 
78
  /**Renderer dialog which is shown. If apply is pressed, it assigned to the vector layer*/
 
79
  QDialog* bufferDialog;
 
80
  /**Buffer renderer, which is assigned to the vector layer when apply is pressed*/
 
81
  QgsRenderer* bufferRenderer;
 
82
  /**Label dialog. If apply is pressed, options are applied to vector's QgsLabel */
 
83
  QgsLabelDialog* labelDialog;
 
84
  /**Actions dialog. If apply is pressed, the actions are stored for later use */
 
85
  QgsAttributeActionDialog* actionDialog;
 
86
  /**Buffer pixmap which takes the picture of renderers before they are assigned to the vector layer*/
 
87
  QPixmap bufferPixmap;
 
88
};
 
89
 
 
90
inline void QgsDlgVectorLayerProperties::setBufferDialog(QDialog* dialog)
 
91
{
 
92
    bufferDialog=dialog;
 
93
}
 
94
 
 
95
inline QPixmap* QgsDlgVectorLayerProperties::getBufferPixmap()
 
96
{
 
97
    return &bufferPixmap;
 
98
}
 
99
 
 
100
inline QString QgsDlgVectorLayerProperties::displayName()
 
101
{
 
102
    return txtDisplayName->text();
 
103
}
 
104
 
 
105
#endif