mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
		
			
				
	
	
		
			46 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef DIVELOCATIONMODEL_H
 | |
| #define DIVELOCATIONMODEL_H
 | |
| 
 | |
| #include <QAbstractTableModel>
 | |
| #include <QStringListModel>
 | |
| #include <stdint.h>
 | |
| #include "core/units.h"
 | |
| #include "ssrfsortfilterproxymodel.h"
 | |
| 
 | |
| class QLineEdit;
 | |
| 
 | |
| #define RECENTLY_ADDED_DIVESITE 1
 | |
| 
 | |
| bool filter_same_gps_cb (QAbstractItemModel *m, int sourceRow, const QModelIndex& parent);
 | |
| 
 | |
| class LocationInformationModel : public QAbstractTableModel {
 | |
| Q_OBJECT
 | |
| public:
 | |
| 	enum Columns { UUID, NAME, LATITUDE, LONGITUDE, COORDS, DESCRIPTION, NOTES, TAXONOMY_1, TAXONOMY_2, TAXONOMY_3, COLUMNS};
 | |
| 	enum Roles { UUID_ROLE = Qt::UserRole + 1 };
 | |
| 	static LocationInformationModel *instance();
 | |
| 	int columnCount(const QModelIndex &parent) const;
 | |
| 	int rowCount(const QModelIndex &parent = QModelIndex()) const;
 | |
| 	QVariant data(const QModelIndex &index = QModelIndex(), int role = Qt::DisplayRole) const;
 | |
| 	uint32_t addDiveSite(const QString& name, timestamp_t divetime, int lat = 0, int lon = 0);
 | |
| 	bool setData(const QModelIndex &index, const QVariant &value, int role);
 | |
| 	bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex());
 | |
| 	void setFirstRowTextField(QLineEdit *textField);
 | |
| 
 | |
| public slots:
 | |
| 	void update();
 | |
| private:
 | |
| 	LocationInformationModel(QObject *obj = 0);
 | |
| 	int internalRowCount;
 | |
| 	QLineEdit *textField;
 | |
| };
 | |
| 
 | |
| class GeoReferencingOptionsModel : public QStringListModel {
 | |
| Q_OBJECT
 | |
| public:
 | |
| 	static GeoReferencingOptionsModel *instance();
 | |
| private:
 | |
| 	GeoReferencingOptionsModel(QObject *parent = 0);
 | |
| };
 | |
| 
 | |
| #endif
 |