Skip to content

Commit 9eb938c

Browse files
Gustrytimlinux
authored andcommittedDec 15, 2017
add missing metadata fields about contacts and extent (#5878)
1 parent 0c7cf21 commit 9eb938c

File tree

3 files changed

+385
-182
lines changed

3 files changed

+385
-182
lines changed
 

‎src/gui/qgsmetadatawidget.cpp

Lines changed: 131 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <QInputDialog>
2424
#include <QStringListModel>
2525

26+
#include "qgsbox3d.h"
2627
#include "qgsmetadatawidget.h"
2728
#include "qgslogger.h"
2829
#include "qgslayermetadatavalidator.h"
@@ -36,9 +37,8 @@ QgsMetadataWidget::QgsMetadataWidget( QWidget *parent, QgsMapLayer *layer )
3637
mMetadata = layer->metadata();
3738
tabWidget->setCurrentIndex( 0 );
3839

39-
// Disable the encoding and contacts
40+
// Disable the encoding
4041
encodingFrame->setHidden( true );
41-
tabWidget->removeTab( 5 );
4242

4343
// Default categories, we want them translated, so we are not using a CSV.
4444
mDefaultCategories << tr( "Farming" ) << tr( "Climatology Meteorology Atmosphere" ) << tr( "Location" ) << tr( "Intelligence Military" ) << tr( "Transportation" ) << tr( "Structure" ) << tr( "Boundaries" );
@@ -65,6 +65,11 @@ QgsMetadataWidget::QgsMetadataWidget( QWidget *parent, QgsMapLayer *layer )
6565
tabConstraints->setModel( mConstraintsModel );
6666
tabConstraints->setItemDelegate( new ConstraintItemDelegate( this ) );
6767

68+
// Extent
69+
selectionCrs->setOptionVisible( QgsProjectionSelectionWidget::CrsNotSet, true );
70+
dateTimeFrom->setAllowNull( true );
71+
dateTimeTo->setAllowNull( true );
72+
6873
// Setup the link view
6974
mLinksModel = new QStandardItemModel( tabLinks );
7075
mLinksModel->setColumnCount( 7 );
@@ -90,9 +95,9 @@ QgsMetadataWidget::QgsMetadataWidget( QWidget *parent, QgsMapLayer *layer )
9095
connect( btnAddConstraint, &QPushButton::clicked, this, &QgsMetadataWidget::addConstraint );
9196
connect( btnRemoveConstraint, &QPushButton::clicked, this, &QgsMetadataWidget::removeSelectedConstraint );
9297
connect( btnAutoCrs, &QPushButton::clicked, this, &QgsMetadataWidget::fillCrsFromLayer );
93-
connect( btnAddContact, &QPushButton::clicked, this, &QgsMetadataWidget::addContact );
94-
connect( btnRemoveContact, &QPushButton::clicked, this, &QgsMetadataWidget::removeSelectedContact );
95-
connect( tabContacts, &QTableWidget::itemSelectionChanged, this, &QgsMetadataWidget::updateContactDetails );
98+
connect( selectionCrs, &QgsProjectionSelectionWidget::crsChanged, this, &QgsMetadataWidget::toggleExtentSelector );
99+
connect( btnAddAddress, &QPushButton::clicked, this, &QgsMetadataWidget::addAddress );
100+
connect( btnRemoveAddress, &QPushButton::clicked, this, &QgsMetadataWidget::removeSelectedAddress );
96101
connect( btnAddLink, &QPushButton::clicked, this, &QgsMetadataWidget::addLink );
97102
connect( btnRemoveLink, &QPushButton::clicked, this, &QgsMetadataWidget::removeSelectedLink );
98103
connect( btnAddHistory, &QPushButton::clicked, this, &QgsMetadataWidget::addHistory );
@@ -103,7 +108,6 @@ QgsMetadataWidget::QgsMetadataWidget( QWidget *parent, QgsMapLayer *layer )
103108

104109
fillComboBox();
105110
setPropertiesFromLayer();
106-
updateContactDetails();
107111
}
108112

109113
void QgsMetadataWidget::fillSourceFromLayer() const
@@ -196,56 +200,51 @@ void QgsMetadataWidget::removeSelectedConstraint() const
196200
mConstraintsModel->removeRow( selectedRows[0].row() );
197201
}
198202

199-
void QgsMetadataWidget::fillCrsFromLayer() const
203+
void QgsMetadataWidget::toggleExtentSelector() const
200204
{
201-
selectionCrs->setCrs( mLayer->crs() );
205+
spatialExtentSelector->setEnabled( selectionCrs->crs().isValid() );
206+
spatialExtentSelector->setOutputCrs( selectionCrs->crs() );
202207
}
203208

204-
void QgsMetadataWidget::addContact() const
209+
void QgsMetadataWidget::addAddress() const
205210
{
206-
int row = tabContacts->rowCount();
207-
tabContacts->setRowCount( row + 1 );
211+
int row = tabAddresses->rowCount();
212+
tabAddresses->setRowCount( row + 1 );
208213
QTableWidgetItem *pCell = nullptr;
209214

210-
// Name
211-
pCell = new QTableWidgetItem( QString( tr( "unnamed %1" ) ).arg( row + 1 ) );
212-
tabContacts->setItem( row, 0, pCell );
215+
// Type
216+
pCell = new QTableWidgetItem( QString( tr( "postal" ) ) );
217+
tabAddresses->setItem( row, 0, pCell );
218+
219+
// Address
220+
tabAddresses->setItem( row, 1, new QTableWidgetItem() );
213221

214-
// Organization
215-
pCell = new QTableWidgetItem();
216-
tabContacts->setItem( row, 1, pCell );
222+
// postal code
223+
tabAddresses->setItem( row, 2, new QTableWidgetItem() );
224+
225+
// City
226+
tabAddresses->setItem( row, 3, new QTableWidgetItem() );
227+
228+
// Admin area
229+
tabAddresses->setItem( row, 4, new QTableWidgetItem() );
217230

218-
// Set last item selected
219-
tabContacts->selectRow( row );
231+
// Country
232+
tabAddresses->setItem( row, 5, new QTableWidgetItem() );
220233
}
221234

222-
void QgsMetadataWidget::removeSelectedContact() const
235+
void QgsMetadataWidget::removeSelectedAddress() const
223236
{
224-
QItemSelectionModel *selectionModel = tabContacts->selectionModel();
237+
QItemSelectionModel *selectionModel = tabAddresses->selectionModel();
225238
const QModelIndexList selectedRows = selectionModel->selectedRows();
226239
for ( int i = 0; i < selectedRows.size() ; i++ )
227240
{
228-
tabContacts->model()->removeRow( selectedRows[i].row() );
241+
tabAddresses->model()->removeRow( selectedRows[i].row() );
229242
}
230243
}
231244

232-
void QgsMetadataWidget::updateContactDetails() const
245+
void QgsMetadataWidget::fillCrsFromLayer() const
233246
{
234-
QItemSelectionModel *selectionModel = tabContacts->selectionModel();
235-
const QModelIndexList selectedRows = selectionModel->selectedRows();
236-
237-
if ( ! selectedRows.isEmpty() )
238-
{
239-
panelDetails->setDisabled( false );
240-
lineEditContactName->setText( tabContacts->item( selectedRows[0].row(), 0 )->text() );
241-
lineEditContactOrganization->setText( tabContacts->item( selectedRows[0].row(), 1 )->text() );
242-
}
243-
else
244-
{
245-
panelDetails->setDisabled( true );
246-
lineEditContactName->clear();
247-
lineEditContactOrganization->clear();
248-
}
247+
selectionCrs->setCrs( mLayer->crs() );
249248
}
250249

251250
void QgsMetadataWidget::addLink() const
@@ -414,9 +413,57 @@ void QgsMetadataWidget::setPropertiesFromLayer() const
414413
{
415414
selectionCrs->setCrs( mMetadata.crs() );
416415
}
417-
else
416+
toggleExtentSelector();
417+
418+
// Spatial extent
419+
const QList<QgsLayerMetadata::SpatialExtent> &spatialExtents = mMetadata.extent().spatialExtents();
420+
if ( ! spatialExtents.isEmpty() )
418421
{
419-
selectionCrs->setOptionVisible( QgsProjectionSelectionWidget::CrsNotSet, true );
422+
// Even if it's a list, it's supposed to store the same extent in different CRS.
423+
spatialExtentSelector->setCurrentExtent( spatialExtents.at( 0 ).bounds.toRectangle(), spatialExtents.at( 0 ).extentCrs );
424+
spatialExtentSelector->setOutputCrs( spatialExtents.at( 0 ).extentCrs );
425+
spinBoxZMaximum->setValue( spatialExtents.at( 0 ).bounds.zMaximum() );
426+
spinBoxZMinimum->setValue( spatialExtents.at( 0 ).bounds.zMinimum() );
427+
}
428+
429+
// Temporal extent
430+
const QList<QgsDateTimeRange> &temporalExtents = mMetadata.extent().temporalExtents();
431+
if ( ! temporalExtents.isEmpty() )
432+
{
433+
// Even if it's a list, it seems we use only one for now (cf discussion with Tom)
434+
dateTimeFrom->setDateTime( temporalExtents.at( 0 ).begin() );
435+
dateTimeFrom->setDateTime( temporalExtents.at( 0 ).end() );
436+
}
437+
438+
// Contacts
439+
const QList<QgsLayerMetadata::Contact> &contacts = mMetadata.contacts();
440+
if ( ! contacts.isEmpty() )
441+
{
442+
// Only one contact supported in the UI for now
443+
const QgsLayerMetadata::Contact &contact = contacts.at( 0 );
444+
lineEditContactName->setText( contact.name );
445+
lineEditContactEmail->setText( contact.email );
446+
lineEditContactFax->setText( contact.fax );
447+
lineEditContactOrganization->setText( contact.organization );
448+
lineEditContactPosition->setText( contact.position );
449+
lineEditContactVoice->setText( contact.voice );
450+
if ( comboContactRole->findText( contact.role ) == -1 )
451+
{
452+
comboContactRole->addItem( contact.role );
453+
}
454+
comboContactRole->setCurrentIndex( comboContactRole->findText( contact.role ) );
455+
tabAddresses->setRowCount( 0 );
456+
const QList<QgsLayerMetadata::Address> &addresses = contact.addresses;
457+
for ( const QgsLayerMetadata::Address &address : addresses )
458+
{
459+
int currentRow = tabKeywords->rowCount() - 1;
460+
tabAddresses->item( currentRow, 0 )->setText( address.type );
461+
tabAddresses->item( currentRow, 1 )->setText( address.address );
462+
tabAddresses->item( currentRow, 2 )->setText( address.postalCode );
463+
tabAddresses->item( currentRow, 3 )->setText( address.city );
464+
tabAddresses->item( currentRow, 4 )->setText( address.administrativeArea );
465+
tabAddresses->item( currentRow, 5 )->setText( address.country );
466+
}
420467
}
421468

422469
// Links
@@ -483,6 +530,50 @@ void QgsMetadataWidget::saveMetadata( QgsLayerMetadata &layerMetadata ) const
483530
// CRS
484531
layerMetadata.setCrs( selectionCrs->crs() );
485532

533+
// Extent
534+
struct QgsLayerMetadata::SpatialExtent spatialExtent = QgsLayerMetadata::SpatialExtent();
535+
spatialExtent.bounds = QgsBox3d( spatialExtentSelector->outputExtent() );
536+
spatialExtent.bounds.setZMinimum( spinBoxZMinimum->value() );
537+
spatialExtent.bounds.setZMaximum( spinBoxZMaximum->value() );
538+
spatialExtent.extentCrs = spatialExtentSelector->outputCrs();
539+
QList<QgsLayerMetadata::SpatialExtent> spatialExtents;
540+
spatialExtents.append( spatialExtent );
541+
QList<QgsDateTimeRange> temporalExtents;
542+
temporalExtents.append( QgsDateTimeRange( dateTimeFrom->dateTime(), dateTimeTo->dateTime() ) );
543+
struct QgsLayerMetadata::Extent extent = QgsLayerMetadata::Extent();
544+
extent.setSpatialExtents( spatialExtents );
545+
extent.setTemporalExtents( temporalExtents );
546+
layerMetadata.setExtent( extent );
547+
548+
// Contacts, only one contact supported in the UI for now.
549+
// We don't want to lost data if more than one contact, so we update only the first one.
550+
QList<QgsLayerMetadata::Contact> contacts = mMetadata.contacts();
551+
if ( contacts.size() > 0 )
552+
contacts.removeFirst();
553+
struct QgsLayerMetadata::Contact contact = QgsLayerMetadata::Contact();
554+
contact.email = lineEditContactEmail->text();
555+
contact.position = lineEditContactPosition->text();
556+
contact.fax = lineEditContactFax->text();
557+
contact.voice = lineEditContactVoice->text();
558+
contact.name = lineEditContactName->text();
559+
contact.organization = lineEditContactOrganization->text();
560+
contact.role = comboContactRole->currentText();
561+
QList<QgsLayerMetadata::Address> addresses;
562+
for ( int i = 0; i < tabAddresses->rowCount() ; i++ )
563+
{
564+
struct QgsLayerMetadata::Address address = QgsLayerMetadata::Address();
565+
address.type = tabAddresses->item( i, 0 )->text();
566+
address.address = tabAddresses->item( i, 1 )->text();
567+
address.postalCode = tabAddresses->item( i, 2 )->text();
568+
address.city = tabAddresses->item( i, 3 )->text();
569+
address.administrativeArea = tabAddresses->item( i, 4 )->text();
570+
address.country = tabAddresses->item( i, 5 )->text();
571+
addresses.append( address );
572+
}
573+
contact.addresses = addresses;
574+
contacts.insert( 0, contact );
575+
layerMetadata.setContacts( contacts );
576+
486577
// Links
487578
QList<QgsLayerMetadata::Link> links;
488579
for ( int row = 0; row < mLinksModel->rowCount() ; row++ )

‎src/gui/qgsmetadatawidget.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ class GUI_EXPORT QgsMetadataWidget : public QWidget, private Ui::QgsMetadataWidg
101101
void removeSelectedRight() const;
102102
void addConstraint() const;
103103
void removeSelectedConstraint() const;
104-
void addContact() const;
105-
void removeSelectedContact() const;
104+
void toggleExtentSelector() const;
105+
void addAddress() const;
106+
void removeSelectedAddress() const;
106107
void addLink() const;
107108
void removeSelectedLink() const;
108109
void addHistory();
109110
void removeSelectedHistory() const;
110-
void updateContactDetails() const;
111111
void fillComboBox() const;
112112
void setPropertiesFromLayer() const;
113113
void syncFromCategoriesTabToKeywordsTab() const;

‎src/ui/qgsmetadatawidget.ui

Lines changed: 251 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>797</width>
10-
<height>568</height>
9+
<width>804</width>
10+
<height>697</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -35,7 +35,7 @@
3535
<enum>QTabWidget::Rounded</enum>
3636
</property>
3737
<property name="currentIndex">
38-
<number>0</number>
38+
<number>4</number>
3939
</property>
4040
<widget class="QWidget" name="tabIdentificationDialog">
4141
<attribute name="title">
@@ -67,8 +67,8 @@
6767
<rect>
6868
<x>0</x>
6969
<y>0</y>
70-
<width>777</width>
71-
<height>596</height>
70+
<width>798</width>
71+
<height>668</height>
7272
</rect>
7373
</property>
7474
<layout class="QVBoxLayout" name="verticalLayout_15">
@@ -222,7 +222,7 @@
222222
<item>
223223
<widget class="QFrame" name="encodingFrame">
224224
<property name="enabled">
225-
<bool>false</bool>
225+
<bool>true</bool>
226226
</property>
227227
<property name="frameShape">
228228
<enum>QFrame::NoFrame</enum>
@@ -571,8 +571,8 @@
571571
<rect>
572572
<x>0</x>
573573
<y>0</y>
574-
<width>767</width>
575-
<height>521</height>
574+
<width>798</width>
575+
<height>668</height>
576576
</rect>
577577
</property>
578578
<layout class="QVBoxLayout" name="verticalLayout_16">
@@ -802,7 +802,7 @@
802802
<item>
803803
<widget class="QLabel" name="label_9">
804804
<property name="text">
805-
<string>Coordinate Reference System, spatial and temporal extent(s) for this dataset.</string>
805+
<string>Coordinate Reference System and spatial extent for this dataset.</string>
806806
</property>
807807
</widget>
808808
</item>
@@ -838,6 +838,76 @@
838838
</layout>
839839
</widget>
840840
</item>
841+
<item>
842+
<widget class="QgsExtentGroupBox" name="spatialExtentSelector">
843+
<property name="title">
844+
<string/>
845+
</property>
846+
</widget>
847+
</item>
848+
<item>
849+
<layout class="QHBoxLayout" name="horizontalLayout_14">
850+
<item>
851+
<widget class="QLabel" name="label_32">
852+
<property name="text">
853+
<string>Z Maximum</string>
854+
</property>
855+
</widget>
856+
</item>
857+
<item>
858+
<widget class="QgsSpinBox" name="spinBoxZMaximum"/>
859+
</item>
860+
</layout>
861+
</item>
862+
<item>
863+
<layout class="QHBoxLayout" name="horizontalLayout_13">
864+
<item>
865+
<widget class="QLabel" name="label_31">
866+
<property name="text">
867+
<string>Z Minimum</string>
868+
</property>
869+
</widget>
870+
</item>
871+
<item>
872+
<widget class="QgsSpinBox" name="spinBoxZMinimum"/>
873+
</item>
874+
</layout>
875+
</item>
876+
<item>
877+
<widget class="QLabel" name="label_35">
878+
<property name="text">
879+
<string>Temporal extent for this dataset.</string>
880+
</property>
881+
</widget>
882+
</item>
883+
<item>
884+
<layout class="QHBoxLayout" name="horizontalLayout_15">
885+
<item>
886+
<widget class="QLabel" name="label_33">
887+
<property name="text">
888+
<string>From</string>
889+
</property>
890+
</widget>
891+
</item>
892+
<item>
893+
<widget class="QgsDateTimeEdit" name="dateTimeFrom"/>
894+
</item>
895+
</layout>
896+
</item>
897+
<item>
898+
<layout class="QHBoxLayout" name="horizontalLayout_16">
899+
<item>
900+
<widget class="QLabel" name="label_34">
901+
<property name="text">
902+
<string>To</string>
903+
</property>
904+
</widget>
905+
</item>
906+
<item>
907+
<widget class="QgsDateTimeEdit" name="dateTimeTo"/>
908+
</item>
909+
</layout>
910+
</item>
841911
<item>
842912
<spacer name="verticalSpacer">
843913
<property name="orientation">
@@ -854,93 +924,19 @@
854924
</layout>
855925
</widget>
856926
<widget class="QWidget" name="tabContactsDialog">
857-
<property name="enabled">
858-
<bool>false</bool>
859-
</property>
860927
<attribute name="title">
861-
<string>Contacts</string>
928+
<string>Contact</string>
862929
</attribute>
863930
<layout class="QVBoxLayout" name="verticalLayout_10">
864931
<item>
865932
<widget class="QLabel" name="label_16">
866933
<property name="text">
867-
<string>Contacts, HELP TEXT</string>
934+
<string>Contact describe the owner of the dataset.</string>
868935
</property>
869936
</widget>
870937
</item>
871-
<item>
872-
<layout class="QHBoxLayout" name="horizontalLayout_10">
873-
<item>
874-
<spacer name="horizontalSpacer_6">
875-
<property name="orientation">
876-
<enum>Qt::Horizontal</enum>
877-
</property>
878-
<property name="sizeHint" stdset="0">
879-
<size>
880-
<width>40</width>
881-
<height>20</height>
882-
</size>
883-
</property>
884-
</spacer>
885-
</item>
886-
<item>
887-
<widget class="QPushButton" name="btnAddContact">
888-
<property name="toolTip">
889-
<string>Add class</string>
890-
</property>
891-
<property name="icon">
892-
<iconset resource="../../images/images.qrc">
893-
<normaloff>:/images/themes/default/symbologyAdd.svg</normaloff>:/images/themes/default/symbologyAdd.svg</iconset>
894-
</property>
895-
</widget>
896-
</item>
897-
<item>
898-
<widget class="QPushButton" name="btnRemoveContact">
899-
<property name="toolTip">
900-
<string>Delete</string>
901-
</property>
902-
<property name="icon">
903-
<iconset resource="../../images/images.qrc">
904-
<normaloff>:/images/themes/default/symbologyRemove.svg</normaloff>:/images/themes/default/symbologyRemove.svg</iconset>
905-
</property>
906-
</widget>
907-
</item>
908-
</layout>
909-
</item>
910938
<item>
911939
<layout class="QHBoxLayout" name="horizontalLayout_3">
912-
<item>
913-
<widget class="QTableWidget" name="tabContacts">
914-
<property name="maximumSize">
915-
<size>
916-
<width>200</width>
917-
<height>16777215</height>
918-
</size>
919-
</property>
920-
<property name="editTriggers">
921-
<set>QAbstractItemView::NoEditTriggers</set>
922-
</property>
923-
<property name="selectionMode">
924-
<enum>QAbstractItemView::SingleSelection</enum>
925-
</property>
926-
<property name="selectionBehavior">
927-
<enum>QAbstractItemView::SelectRows</enum>
928-
</property>
929-
<attribute name="horizontalHeaderStretchLastSection">
930-
<bool>true</bool>
931-
</attribute>
932-
<column>
933-
<property name="text">
934-
<string>Name</string>
935-
</property>
936-
</column>
937-
<column>
938-
<property name="text">
939-
<string>Organization</string>
940-
</property>
941-
</column>
942-
</widget>
943-
</item>
944940
<item>
945941
<widget class="QScrollArea" name="panelDetails">
946942
<property name="sizePolicy">
@@ -957,147 +953,247 @@
957953
<rect>
958954
<x>0</x>
959955
<y>0</y>
960-
<width>513</width>
961-
<height>419</height>
956+
<width>754</width>
957+
<height>608</height>
962958
</rect>
963959
</property>
964960
<layout class="QGridLayout" name="gridLayout_2">
965-
<item row="0" column="0">
966-
<widget class="QLabel" name="label_10">
967-
<property name="text">
968-
<string>Name</string>
961+
<item row="3" column="2" colspan="2">
962+
<widget class="QLineEdit" name="lineEditContactPosition">
963+
<property name="toolTip">
964+
<string>Position/title of contact</string>
969965
</property>
970966
</widget>
971967
</item>
972-
<item row="0" column="1" colspan="2">
973-
<widget class="QLineEdit" name="lineEditContactName"/>
968+
<item row="0" column="2" colspan="2">
969+
<widget class="QLineEdit" name="lineEditContactName">
970+
<property name="toolTip">
971+
<string>Name of contact</string>
972+
</property>
973+
</widget>
974974
</item>
975975
<item row="1" column="0">
976976
<widget class="QLabel" name="label_15">
977-
<property name="text">
978-
<string>Role</string>
977+
<property name="toolTip">
978+
<string>Role of contact</string>
979979
</property>
980-
</widget>
981-
</item>
982-
<item row="1" column="1" colspan="2">
983-
<widget class="QComboBox" name="comboContactRole"/>
984-
</item>
985-
<item row="2" column="0">
986-
<widget class="QLabel" name="label_12">
987980
<property name="text">
988-
<string>Organization</string>
981+
<string>Role</string>
989982
</property>
990983
</widget>
991984
</item>
992-
<item row="2" column="1" colspan="2">
993-
<widget class="QLineEdit" name="lineEditContactOrganization"/>
994-
</item>
995985
<item row="3" column="0">
996986
<widget class="QLabel" name="label_14">
987+
<property name="toolTip">
988+
<string>Position/title of contact</string>
989+
</property>
997990
<property name="text">
998991
<string>Position</string>
999992
</property>
1000993
</widget>
1001994
</item>
1002-
<item row="3" column="1" colspan="2">
1003-
<widget class="QLineEdit" name="lineEditContactPosition"/>
995+
<item row="2" column="2" colspan="2">
996+
<widget class="QLineEdit" name="lineEditContactOrganization">
997+
<property name="toolTip">
998+
<string>Organization contact belongs to/represents</string>
999+
</property>
1000+
</widget>
10041001
</item>
1005-
<item row="4" column="0">
1006-
<widget class="QLabel" name="label_18">
1002+
<item row="0" column="0">
1003+
<widget class="QLabel" name="label_10">
1004+
<property name="toolTip">
1005+
<string>Name of contact</string>
1006+
</property>
10071007
<property name="text">
1008-
<string>Email</string>
1008+
<string>Name</string>
10091009
</property>
10101010
</widget>
10111011
</item>
1012-
<item row="4" column="1" colspan="2">
1013-
<widget class="QLineEdit" name="lineEditContactEmail"/>
1014-
</item>
1015-
<item row="5" column="0">
1016-
<widget class="QLabel" name="label_19">
1017-
<property name="text">
1018-
<string>Voice</string>
1012+
<item row="5" column="2" colspan="2">
1013+
<widget class="QLineEdit" name="lineEditContactVoice">
1014+
<property name="toolTip">
1015+
<string>Phone number</string>
10191016
</property>
10201017
</widget>
10211018
</item>
1022-
<item row="5" column="1" colspan="2">
1023-
<widget class="QLineEdit" name="lineEditContactVoice"/>
1019+
<item row="6" column="2" colspan="2">
1020+
<widget class="QLineEdit" name="lineEditContactFax">
1021+
<property name="toolTip">
1022+
<string>Fax number</string>
1023+
</property>
1024+
</widget>
10241025
</item>
10251026
<item row="6" column="0">
10261027
<widget class="QLabel" name="label_20">
1028+
<property name="toolTip">
1029+
<string>Fax number</string>
1030+
</property>
10271031
<property name="text">
10281032
<string>Fax</string>
10291033
</property>
10301034
</widget>
10311035
</item>
1032-
<item row="6" column="1" colspan="2">
1033-
<widget class="QLineEdit" name="lineEditContactFax"/>
1034-
</item>
1035-
<item row="7" column="0">
1036-
<widget class="QLabel" name="label_21">
1036+
<item row="2" column="0">
1037+
<widget class="QLabel" name="label_12">
1038+
<property name="toolTip">
1039+
<string>Organization contact belongs to/represents</string>
1040+
</property>
10371041
<property name="text">
1038-
<string>Address</string>
1042+
<string>Organization</string>
10391043
</property>
10401044
</widget>
10411045
</item>
1042-
<item row="7" column="1">
1043-
<widget class="QPushButton" name="btnAddAddress">
1046+
<item row="1" column="2" colspan="2">
1047+
<widget class="QComboBox" name="comboContactRole">
10441048
<property name="toolTip">
1045-
<string>Add class</string>
1049+
<string>Role of contact</string>
10461050
</property>
1047-
<property name="icon">
1048-
<iconset resource="../../images/images.qrc">
1049-
<normaloff>:/images/themes/default/symbologyAdd.svg</normaloff>:/images/themes/default/symbologyAdd.svg</iconset>
1051+
<property name="editable">
1052+
<bool>true</bool>
1053+
</property>
1054+
<item>
1055+
<property name="text">
1056+
<string/>
1057+
</property>
1058+
</item>
1059+
<item>
1060+
<property name="text">
1061+
<string>custodian</string>
1062+
</property>
1063+
</item>
1064+
<item>
1065+
<property name="text">
1066+
<string>distributor</string>
1067+
</property>
1068+
</item>
1069+
<item>
1070+
<property name="text">
1071+
<string>owner</string>
1072+
</property>
1073+
</item>
1074+
</widget>
1075+
</item>
1076+
<item row="4" column="2" colspan="2">
1077+
<widget class="QLineEdit" name="lineEditContactEmail">
1078+
<property name="toolTip">
1079+
<string>Electronic mail address</string>
10501080
</property>
10511081
</widget>
10521082
</item>
1053-
<item row="7" column="2">
1054-
<widget class="QPushButton" name="btnRemoveAddress">
1083+
<item row="5" column="0">
1084+
<widget class="QLabel" name="label_19">
10551085
<property name="toolTip">
1056-
<string>Delete</string>
1086+
<string>Phone number</string>
10571087
</property>
1058-
<property name="icon">
1059-
<iconset resource="../../images/images.qrc">
1060-
<normaloff>:/images/themes/default/symbologyRemove.svg</normaloff>:/images/themes/default/symbologyRemove.svg</iconset>
1088+
<property name="text">
1089+
<string>Voice</string>
1090+
</property>
1091+
</widget>
1092+
</item>
1093+
<item row="7" column="0">
1094+
<widget class="QLabel" name="label_21">
1095+
<property name="text">
1096+
<string>Address</string>
10611097
</property>
10621098
</widget>
10631099
</item>
1064-
<item row="8" column="0" colspan="3">
1100+
<item row="8" column="0" colspan="4">
10651101
<widget class="QTableWidget" name="tabAddresses">
1102+
<property name="selectionMode">
1103+
<enum>QAbstractItemView::SingleSelection</enum>
1104+
</property>
1105+
<property name="selectionBehavior">
1106+
<enum>QAbstractItemView::SelectRows</enum>
1107+
</property>
10661108
<attribute name="horizontalHeaderStretchLastSection">
10671109
<bool>true</bool>
10681110
</attribute>
10691111
<column>
10701112
<property name="text">
10711113
<string>Type</string>
10721114
</property>
1115+
<property name="toolTip">
1116+
<string>Type of address, e.g 'postal'</string>
1117+
</property>
10731118
</column>
10741119
<column>
10751120
<property name="text">
10761121
<string>Address</string>
10771122
</property>
1123+
<property name="toolTip">
1124+
<string>Free-form physical address component</string>
1125+
</property>
10781126
</column>
10791127
<column>
10801128
<property name="text">
10811129
<string>Postal Code</string>
10821130
</property>
1131+
<property name="toolTip">
1132+
<string>Postal (or ZIP) code</string>
1133+
</property>
10831134
</column>
10841135
<column>
10851136
<property name="text">
10861137
<string>City</string>
10871138
</property>
1139+
<property name="toolTip">
1140+
<string>City or locality name</string>
1141+
</property>
10881142
</column>
10891143
<column>
10901144
<property name="text">
10911145
<string>Administrative Area</string>
10921146
</property>
1147+
<property name="toolTip">
1148+
<string>Administrative area (state, provice/territory, etc.)</string>
1149+
</property>
10931150
</column>
10941151
<column>
10951152
<property name="text">
10961153
<string>Country</string>
10971154
</property>
1155+
<property name="toolTip">
1156+
<string>Free-form country</string>
1157+
</property>
10981158
</column>
10991159
</widget>
11001160
</item>
1161+
<item row="4" column="0">
1162+
<widget class="QLabel" name="label_18">
1163+
<property name="toolTip">
1164+
<string>Electronic mail address</string>
1165+
</property>
1166+
<property name="text">
1167+
<string>Email</string>
1168+
</property>
1169+
</widget>
1170+
</item>
1171+
<item row="7" column="3">
1172+
<layout class="QHBoxLayout" name="horizontalLayout_10">
1173+
<item>
1174+
<widget class="QPushButton" name="btnAddAddress">
1175+
<property name="toolTip">
1176+
<string>Add address</string>
1177+
</property>
1178+
<property name="icon">
1179+
<iconset resource="../../images/images.qrc">
1180+
<normaloff>:/images/themes/default/symbologyAdd.svg</normaloff>:/images/themes/default/symbologyAdd.svg</iconset>
1181+
</property>
1182+
</widget>
1183+
</item>
1184+
<item>
1185+
<widget class="QPushButton" name="btnRemoveAddress">
1186+
<property name="toolTip">
1187+
<string>Remove Address</string>
1188+
</property>
1189+
<property name="icon">
1190+
<iconset resource="../../images/images.qrc">
1191+
<normaloff>:/images/themes/default/symbologyRemove.svg</normaloff>:/images/themes/default/symbologyRemove.svg</iconset>
1192+
</property>
1193+
</widget>
1194+
</item>
1195+
</layout>
1196+
</item>
11011197
</layout>
11021198
</widget>
11031199
</widget>
@@ -1280,6 +1376,22 @@
12801376
<header>qgsprojectionselectionwidget.h</header>
12811377
<container>1</container>
12821378
</customwidget>
1379+
<customwidget>
1380+
<class>QgsExtentGroupBox</class>
1381+
<extends>QGroupBox</extends>
1382+
<header>qgsextentgroupbox.h</header>
1383+
<container>1</container>
1384+
</customwidget>
1385+
<customwidget>
1386+
<class>QgsSpinBox</class>
1387+
<extends>QSpinBox</extends>
1388+
<header>qgsspinbox.h</header>
1389+
</customwidget>
1390+
<customwidget>
1391+
<class>QgsDateTimeEdit</class>
1392+
<extends>QDateTimeEdit</extends>
1393+
<header>qgsdatetimeedit.h</header>
1394+
</customwidget>
12831395
</customwidgets>
12841396
<resources>
12851397
<include location="../../images/images.qrc"/>

0 commit comments

Comments
 (0)
Please sign in to comment.