1
/***************************************************************************
2
qgsattributedialog.h - description
5
copyright : (C) 2004 by Marco Hugentobler
6
email : marco.hugentobler@autoform.ch
7
***************************************************************************/
9
/***************************************************************************
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. *
16
***************************************************************************/
17
/* $Id: qgsattributedialog.h 6975 2007-06-02 02:50:38Z gsherman $ */
18
#ifndef QGSATTRIBUTEDIALOG_H
19
#define QGSATTRIBUTEDIALOG_H
21
#include "ui_qgsattributedialogbase.h"
23
#include "qgsfeatureattribute.h"
29
class QgsAttributeDialog: public QDialog, private Ui::QgsAttributeDialogBase
34
QgsAttributeDialog(const std::vector<QgsFeatureAttribute>* attributes);
36
~QgsAttributeDialog();
38
/** Returns the field value of a row */
39
QString value(int row);
41
/** Returns if the field value of a row was edited since this dialog opened */
42
bool isDirty(int row);
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);
50
// Saves and restores the size and position from the last time
51
// this dialog box was used.
52
void savePositionAndColumnWidth();
54
void restorePositionAndColumnWidth();
56
void resizeEvent(QResizeEvent *event);
58
void moveEvent(QMoveEvent *event);
61
//! Slot to be called when an attribute value is edited in the table.
62
void setAttributeValueChanged(int row, int column);
65
QString _settingsPath;
67
std::vector<bool> mRowIsDirty;