-
Notifications
You must be signed in to change notification settings - Fork 0
/
qgsgcplistwidget.h
79 lines (65 loc) · 2.4 KB
/
qgsgcplistwidget.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
/***************************************************************************
qgsgcplistwidget.h - Widget for GCP list display
--------------------------------------
Date : 27-Feb-2009
Copyright : (c) 2009 by Manuel Massing
Email : m.massing at warped-space.de
***************************************************************************
* *
* 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. *
* *
***************************************************************************/
/* $Id$ */
#ifndef QGS_GCP_LIST_WIDGET_H
#define QGS_GCP_LIST_WIDGET_H
#include <QTableView>
class QgsDoubleSpinBoxDelegate;
class QgsNonEditableDelegate;
class QgsDmsAndDdDelegate;
class QgsCoordDelegate;
class QgsGCPList;
class QgsGCPListModel;
class QgsGeorefTransform;
class QgsGeorefDataPoint;
class QgsPoint;
class QgsGCPListWidget : public QTableView
{
Q_OBJECT
public:
QgsGCPListWidget(QWidget *parent = 0);
void setGCPList(QgsGCPList *theGCPList);
void setGeorefTransform(QgsGeorefTransform *theGeorefTransform);
QgsGCPList *gcpList() { return mGCPList; }
void updateGCPList();
public slots:
// This slot is called by the list view if an item is double-clicked
void itemDoubleClicked(QModelIndex index);
void itemClicked(QModelIndex index);
signals:
void jumpToGCP(uint theGCPIndex);
// void replaceDataPoint(QgsGeorefDataPoint *pnt, int row);
void pointEnabled(QgsGeorefDataPoint *pnt, int i);
void deleteDataPoint(int index);
private slots:
void updateItemCoords(QWidget *editor);
void showContextMenu(QPoint);
void removeRow();
void editCell();
void jumpToPoint();
private:
void createActions();
void createItemContextMenu();
void adjustTableContent();
QMenu *mItemContextMenu;
QgsGCPList *mGCPList;
QgsGCPListModel *mGCPListModel;
QgsNonEditableDelegate *mNonEditableDelegate;
QgsDmsAndDdDelegate *mDmsAndDdDelegate;
QgsCoordDelegate *mCoordDelegate;
int mPrevRow;
int mPrevColumn;
};
#endif