mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Undo: implement undo of dive site country editing
Simply copy the code of notes editing, but use the taxonomy_* functions to read and set the value. Moreover, replace the three TAXONOMY_n field ids by a single TAXONOMY id. We will probably never show one column per taxonomy field, but rather a single column with a string derived from all taxonomy fields. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4d183e0d75
commit
021aa4bd57
8 changed files with 54 additions and 20 deletions
|
@ -97,9 +97,7 @@ QVariant LocationInformationModel::getDiveSiteData(const struct dive_site *ds, i
|
|||
case COORDS: return "TODO";
|
||||
case DESCRIPTION: return ds->description;
|
||||
case NOTES: return ds->name;
|
||||
case TAXONOMY_1: return "TODO";
|
||||
case TAXONOMY_2: return "TODO";
|
||||
case TAXONOMY_3: return "TODO";
|
||||
case TAXONOMY: return "TODO";
|
||||
}
|
||||
break;
|
||||
case Qt::ToolTipRole:
|
||||
|
|
|
@ -17,7 +17,7 @@ class LocationInformationModel : public QAbstractTableModel {
|
|||
public:
|
||||
// Common columns, roles and accessor function for all dive-site models.
|
||||
// Thus, different views can connect to different models.
|
||||
enum Columns { REMOVE, NAME, DESCRIPTION, NUM_DIVES, COORDS, NOTES, LATITUDE, LONGITUDE, DIVESITE, TAXONOMY_1, TAXONOMY_2, TAXONOMY_3, COLUMNS};
|
||||
enum Columns { REMOVE, NAME, DESCRIPTION, NUM_DIVES, COORDS, NOTES, LATITUDE, LONGITUDE, DIVESITE, TAXONOMY, COLUMNS};
|
||||
enum Roles { DIVESITE_ROLE = Qt::UserRole + 1 };
|
||||
static QVariant getDiveSiteData(const struct dive_site *ds, int column, int role);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue