2013-04-13 17:49:28 +03:00
|
|
|
/***************************************************************************
|
2016-06-03 10:16:00 +02:00
|
|
|
qgsloadstylefromdbdialog.h
|
|
|
|
---------------------
|
|
|
|
begin : April 2013
|
|
|
|
copyright : (C) 2013 by Emilio Loi
|
|
|
|
email : loi at faunalia dot it
|
|
|
|
***************************************************************************
|
2013-04-13 17:49:28 +03:00
|
|
|
* *
|
|
|
|
* 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. *
|
|
|
|
* *
|
|
|
|
***************************************************************************/
|
|
|
|
|
2013-04-14 12:35:50 +03:00
|
|
|
#ifndef QGSLOADFILEFROMDBDIALOG_H
|
|
|
|
#define QGSLOADFILEFROMDBDIALOG_H
|
|
|
|
|
2013-04-13 17:49:28 +03:00
|
|
|
#include "ui_qgsloadstylefromdbdialog.h"
|
2017-05-07 20:58:28 +10:00
|
|
|
#include "qgsguiutils.h"
|
2017-01-04 12:05:04 +01:00
|
|
|
#include "qgis_app.h"
|
2017-01-26 16:31:49 +00:00
|
|
|
#include "qgsvectorlayer.h"
|
|
|
|
#include "qgsvectordataprovider.h"
|
2013-04-13 17:49:28 +03:00
|
|
|
|
2013-09-06 22:07:42 +02:00
|
|
|
class APP_EXPORT QgsLoadStyleFromDBDialog : public QDialog, private Ui::QgsLoadStyleFromDBDialogLayout
|
2013-04-13 17:49:28 +03:00
|
|
|
{
|
2013-04-14 12:35:50 +03:00
|
|
|
QString mSelectedStyleId;
|
2017-01-26 16:31:49 +00:00
|
|
|
QString mSelectedStyleName;
|
2017-09-27 05:02:34 +10:00
|
|
|
int mSectionLimit = 0;
|
2013-04-13 17:49:28 +03:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2015-12-14 11:21:07 +11:00
|
|
|
explicit QgsLoadStyleFromDBDialog( QWidget *parent = nullptr );
|
2013-04-13 17:49:28 +03:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
~QgsLoadStyleFromDBDialog() override;
|
2014-10-05 12:18:57 +02:00
|
|
|
|
2017-03-03 08:42:00 +01:00
|
|
|
void initializeLists( const QStringList &ids, const QStringList &names, const QStringList &descriptions, int sectionLimit );
|
2013-04-14 12:35:50 +03:00
|
|
|
QString getSelectedStyleId();
|
2017-01-26 16:31:49 +00:00
|
|
|
void selectionChanged( QTableWidget *styleTable );
|
|
|
|
void setLayer( QgsVectorLayer *l );
|
2013-04-13 17:49:28 +03:00
|
|
|
|
2013-05-02 23:12:01 +02:00
|
|
|
public slots:
|
2017-02-05 19:35:47 +00:00
|
|
|
void onRelatedTableSelectionChanged();
|
|
|
|
void onOthersTableSelectionChanged();
|
2017-01-26 16:31:49 +00:00
|
|
|
void deleteStyleFromDB();
|
2013-04-13 17:49:28 +03:00
|
|
|
|
2013-05-02 23:12:01 +02:00
|
|
|
private:
|
2017-02-05 19:35:47 +00:00
|
|
|
QgsVectorLayer *mLayer = nullptr;
|
2013-04-13 17:49:28 +03:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2013-04-14 12:35:50 +03:00
|
|
|
#endif //QGSLOADFILEFROMDBDIALOG_H
|