mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-03 00:14:12 -05:00 
			
		
		
		
	This adds the possibility to manage data on a normalized relational database in N:M relations. On the relation editor in a form, the tools to add, delete, link and unlink work (also) on the linking table if a relation is visualized as N:M relation. Configuration is done through the fields tab where on the relation a second relation can be chosen (if there is a suitable relation in terms of a second relation on the linking table). Limitations =========== QGIS is not a database management system. It is based on assumptions about the underlying database system. In particular it expects * A `ON DELETE CASCADE` or similar measure on the second relation * Does not take care of setting the primary key when adding features. Either users need to be instructed to set them manually or - if it's a database derived value - the layers need to be in transaction mode (currently only activatable through the API)
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/***************************************************************************
 | 
						|
    qgsfeatureselectiondlg.sip
 | 
						|
     --------------------------------------
 | 
						|
    Date                 : 30.11.2015
 | 
						|
    Copyright            : (C) 2015 Matthias Kuhn
 | 
						|
    Email                : matthias at opengis 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.                                   *
 | 
						|
 *                                                                         *
 | 
						|
 ***************************************************************************/
 | 
						|
 | 
						|
// This is required for the ConvertToSubClassCode to work properly
 | 
						|
// so RTTI for casting is available in the whole module.
 | 
						|
%ModuleCode
 | 
						|
#include "qgsfeatureselectiondlg.h"
 | 
						|
%End
 | 
						|
 | 
						|
class QgsFeatureSelectionDlg : QDialog
 | 
						|
{
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgsfeatureselectiondlg.h"
 | 
						|
%End
 | 
						|
 | 
						|
%ConvertToSubClassCode
 | 
						|
  if ( qobject_cast<QgsFeatureSelectionDlg*>( sipCpp ) )
 | 
						|
    sipType = sipType_QgsFeatureSelectionDlg;
 | 
						|
  else
 | 
						|
    sipType = 0;
 | 
						|
%End
 | 
						|
 | 
						|
  public:
 | 
						|
    explicit QgsFeatureSelectionDlg( QgsVectorLayer* vl, QgsAttributeEditorContext &context, QWidget *parent /TransferThis/ = 0 );
 | 
						|
 | 
						|
    /**
 | 
						|
     * Get the selected features
 | 
						|
     *
 | 
						|
     * @return The selected feature ids
 | 
						|
     */
 | 
						|
    const QgsFeatureIds& selectedFeatures();
 | 
						|
 | 
						|
    /**
 | 
						|
     * Set the selected features
 | 
						|
     * @param ids The feature ids to select
 | 
						|
     */
 | 
						|
    void setSelectedFeatures( const QgsFeatureIds& ids );
 | 
						|
};
 |