~ubuntu-branches/ubuntu/wily/qgis/wily

« back to all changes in this revision

Viewing changes to src/gui/qgsattributedialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
                         qgsattributedialog.h  -  description
3
 
                             -------------------
4
 
    begin                : October 2004
5
 
    copyright            : (C) 2004 by Marco Hugentobler
6
 
    email                : marco.hugentobler@autoform.ch
7
 
 ***************************************************************************/
8
 
 
9
 
/***************************************************************************
10
 
 *                                                                         *
11
 
 *   This program is free software; you can redistribute it and/or modify  *
12
 
 *   it under the terms of the GNU General Public License as published by  *
13
 
 *   the Free Software Foundation; either version 2 of the License, or     *
14
 
 *   (at your option) any later version.                                   *
15
 
 *                                                                         *
16
 
 ***************************************************************************/
17
 
/* $Id: qgsattributedialog.h 6975 2007-06-02 02:50:38Z gsherman $ */
18
 
#ifndef QGSATTRIBUTEDIALOG_H
19
 
#define QGSATTRIBUTEDIALOG_H
20
 
 
21
 
#include "ui_qgsattributedialogbase.h"
22
 
 
23
 
#include "qgsfeatureattribute.h"
24
 
#include <vector>
25
 
 
26
 
class QDialog;
27
 
class QgsFeature;
28
 
 
29
 
class QgsAttributeDialog: public QDialog, private Ui::QgsAttributeDialogBase
30
 
{
31
 
    Q_OBJECT
32
 
 
33
 
  public:
34
 
    QgsAttributeDialog(const std::vector<QgsFeatureAttribute>* attributes);
35
 
 
36
 
    ~QgsAttributeDialog();
37
 
 
38
 
    /** Returns the field value of a row */
39
 
    QString value(int row);
40
 
 
41
 
    /** Returns if the field value of a row was edited since this dialog opened */
42
 
    bool isDirty(int row);
43
 
 
44
 
    /** Opens an attribute dialog and queries the attributes for a given feature. The
45
 
     attribute values are set to the feature if the dialog is accepted.
46
 
     \retval true if accepted
47
 
     \retval false if canceled */
48
 
    static bool queryAttributes(QgsFeature& f);
49
 
 
50
 
    // Saves and restores the size and position from the last time
51
 
    // this dialog box was used.
52
 
    void savePositionAndColumnWidth();
53
 
 
54
 
    void restorePositionAndColumnWidth();
55
 
 
56
 
    void resizeEvent(QResizeEvent *event);
57
 
 
58
 
    void moveEvent(QMoveEvent *event);
59
 
 
60
 
  public slots:
61
 
    //! Slot to be called when an attribute value is edited in the table.
62
 
    void setAttributeValueChanged(int row, int column);
63
 
 
64
 
  private:
65
 
    QString _settingsPath;
66
 
 
67
 
    std::vector<bool> mRowIsDirty;
68
 
};
69
 
 
70
 
#endif