Skip to content

Commit

Permalink
rename QgsDiscoverRelationsDlg to QgsDiscoverRelationsDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Aug 7, 2019
1 parent 4e56eaf commit 86eb09f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/app/CMakeLists.txt
Expand Up @@ -34,7 +34,7 @@ SET(QGIS_APP_SRCS
qgscustomization.cpp
qgscustomprojectiondialog.cpp
qgsdatumtransformtablewidget.cpp
qgsdiscoverrelationsdlg.cpp
qgsdiscoverrelationsdialog.cpp
qgsdxfexportdialog.cpp
qgsformannotationdialog.cpp
qgsguivectorlayertools.cpp
Expand Down Expand Up @@ -277,7 +277,7 @@ SET (QGIS_APP_MOC_HDRS
qgsdatumtransformtablewidget.h
qgsdelattrdialog.h
qgsdiagramproperties.h
qgsdiscoverrelationsdlg.h
qgsdiscoverrelationsdialog.h
qgsdisplayangle.h
qgsdxfexportdialog.h
qgsfeatureaction.h
Expand Down
Expand Up @@ -12,20 +12,20 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgsdiscoverrelationsdlg.h"
#include "qgsdiscoverrelationsdialog.h"
#include "qgsvectorlayer.h"
#include "qgsrelationmanager.h"

#include <QPushButton>

QgsDiscoverRelationsDlg::QgsDiscoverRelationsDlg( const QList<QgsRelation> &existingRelations, const QList<QgsVectorLayer *> &layers, QWidget *parent )
QgsDiscoverRelationsDialog::QgsDiscoverRelationsDialog( const QList<QgsRelation> &existingRelations, const QList<QgsVectorLayer *> &layers, QWidget *parent )
: QDialog( parent )
, mLayers( layers )
{
setupUi( this );

mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
connect( mRelationsTable->selectionModel(), &QItemSelectionModel::selectionChanged, this, &QgsDiscoverRelationsDlg::onSelectionChanged );
connect( mRelationsTable->selectionModel(), &QItemSelectionModel::selectionChanged, this, &QgsDiscoverRelationsDialog::onSelectionChanged );

mFoundRelations = QgsRelationManager::discoverRelations( existingRelations, layers );
for ( const QgsRelation &relation : qgis::as_const( mFoundRelations ) )
Expand All @@ -34,7 +34,7 @@ QgsDiscoverRelationsDlg::QgsDiscoverRelationsDlg( const QList<QgsRelation> &exis
mRelationsTable->resizeColumnsToContents();
}

void QgsDiscoverRelationsDlg::addRelation( const QgsRelation &rel )
void QgsDiscoverRelationsDialog::addRelation( const QgsRelation &rel )
{
const int row = mRelationsTable->rowCount();
mRelationsTable->insertRow( row );
Expand All @@ -55,7 +55,7 @@ void QgsDiscoverRelationsDlg::addRelation( const QgsRelation &rel )
mRelationsTable->item( row, 5 )->setToolTip( QStringLiteral( "Composition (child features will be copied too) or Association" ) );
}

QList<QgsRelation> QgsDiscoverRelationsDlg::relations() const
QList<QgsRelation> QgsDiscoverRelationsDialog::relations() const
{
QList<QgsRelation> result;
const auto constSelectedRows = mRelationsTable->selectionModel()->selectedRows();
Expand All @@ -66,7 +66,7 @@ QList<QgsRelation> QgsDiscoverRelationsDlg::relations() const
return result;
}

void QgsDiscoverRelationsDlg::onSelectionChanged()
void QgsDiscoverRelationsDialog::onSelectionChanged()
{
mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( mRelationsTable->selectionModel()->hasSelection() );
}
Expand Up @@ -28,12 +28,12 @@ class QgsVectorLayer;
*
* The user can select some of them to add them to his project.
*/
class APP_EXPORT QgsDiscoverRelationsDlg : public QDialog, private Ui::QgsDiscoverRelationsDlgBase
class APP_EXPORT QgsDiscoverRelationsDialog : public QDialog, private Ui::QgsDiscoverRelationsDlgBase
{
Q_OBJECT

public:
explicit QgsDiscoverRelationsDlg( const QList<QgsRelation> &existingRelations, const QList<QgsVectorLayer *> &layers, QWidget *parent = nullptr );
explicit QgsDiscoverRelationsDialog( const QList<QgsRelation> &existingRelations, const QList<QgsVectorLayer *> &layers, QWidget *parent = nullptr );

/**
* Gets the selected relations.
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsrelationmanagerdialog.cpp
Expand Up @@ -13,7 +13,7 @@
* *
***************************************************************************/

#include "qgsdiscoverrelationsdlg.h"
#include "qgsdiscoverrelationsdialog.h"
#include "qgsrelationadddlg.h"
#include "qgsrelationmanagerdialog.h"
#include "qgsrelationmanager.h"
Expand Down Expand Up @@ -140,7 +140,7 @@ void QgsRelationManagerDialog::mBtnAddRelation_clicked()

void QgsRelationManagerDialog::mBtnDiscoverRelations_clicked()
{
QgsDiscoverRelationsDlg discoverDlg( relations(), mLayers, this );
QgsDiscoverRelationsDialog discoverDlg( relations(), mLayers, this );
if ( discoverDlg.exec() )
{
const auto constRelations = discoverDlg.relations();
Expand Down
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsdualview.cpp
Expand Up @@ -73,7 +73,7 @@ QgsDualView::QgsDualView( QWidget *parent )
auto createShortcuts = [ = ]( const QString & objectName, void ( QgsFeatureListView::* slot )() )
{
QShortcut *sc = QgsGui::shortcutsManager()->shortcutByName( objectName );
Q_ASSERT( sc ); // the shortcut must have been registered in the shortcuts manager
//Q_ASSERT( sc ); // the shortcut must have been registered in the shortcuts manager
connect( sc, &QShortcut::activated, mFeatureListView, slot );
};
createShortcuts( QStringLiteral( "mAttributeTableFirstEditedFeature" ), &QgsFeatureListView::editFirstFeature );
Expand Down
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QgsDiscoverRelationsDlgBase</class>
<widget class="QDialog" name="QgsDiscoverRelationsDlgBase">
<class>QgsDiscoverRelationsDialogBase</class>
<widget class="QDialog" name="QgsDiscoverRelationsDialogBase">
<property name="geometry">
<rect>
<x>0</x>
Expand Down Expand Up @@ -89,7 +89,7 @@
<connection>
<sender>mButtonBox</sender>
<signal>accepted()</signal>
<receiver>QgsDiscoverRelationsDlgBase</receiver>
<receiver>QgsDiscoverRelationsDialogBase</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
Expand All @@ -105,7 +105,7 @@
<connection>
<sender>mButtonBox</sender>
<signal>rejected()</signal>
<receiver>QgsDiscoverRelationsDlgBase</receiver>
<receiver>QgsDiscoverRelationsDialogBase</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
Expand Down

0 comments on commit 86eb09f

Please sign in to comment.