/
qgssnappingdialog.h
83 lines (62 loc) · 2.63 KB
/
qgssnappingdialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/***************************************************************************
qgssnappingdialog.h
--------------------------
begin : June 11, 2007
copyright : (C) 2007 by Marco Hugentobler
email : marco dot hugentobler at karto dot baug dot ethz dot ch
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSSNAPPINGDIALOG_H
#define QGSSNAPPINGDIALOG_H
#include "qgsmaplayer.h"
#include "ui_qgssnappingdialogbase.h"
class QDockWidget;
class QgsMapCanvas;
/**A dialog to enter advanced editing properties, e.g. topological editing, snapping settings
for the individual layers*/
class QgsSnappingDialog: public QDialog, private Ui::QgsSnappingDialogBase
{
Q_OBJECT
public:
//! Returns the instance pointer, creating the object on the first call
//static QgsSnappingDialog * instance( QgsMapCanvas* canvas );
QgsSnappingDialog( QWidget* parent, QgsMapCanvas* canvas );
~QgsSnappingDialog();
public slots:
//! apply the changes
void apply();
//! show dialog or dock
void show();
//! connect to the layers destroyed() and then update()
void connectUpdate( QgsMapLayer* theMapLayer );
void on_cbxEnableTopologicalEditingCheckBox_stateChanged( int );
protected:
/**Constructor
@param canvas pointer to the map canvas (for detecting which vector layers are loaded
*/
//QgsSnappingDialog( QgsMapCanvas* canvas );
/**
* Handle closing of the window
* @param event unused
*/
void closeEvent( QCloseEvent* event );
private:
/**Default constructor forbidden*/
QgsSnappingDialog();
/**Stores ids of layers where intersections of new polygons is considered. Is passed to / read from QgsAvoidIntersectionsDialog*/
QSet<QString> mAvoidIntersectionsSettings;
/**Used to query the loaded layers*/
QgsMapCanvas* mMapCanvas;
QDockWidget *mDock;
private slots:
//! update the Dialog
void update();
};
#endif