Skip to content

Commit

Permalink
Doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 7, 2020
1 parent 77492b1 commit 47fb11a
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion src/gui/qgsmaplayerloadstyledialog.h
Expand Up @@ -27,23 +27,61 @@

class QgsMapLayerStyleCategoriesModel;

/**
* \ingroup gui
* A reusable dialog which allows users to select stored layer styles and categories to load
* for a map layer.
*
* Currently supports
*
* - vector layers
* - vector tile layers
*
* \since QGIS 3.16
*/
class GUI_EXPORT QgsMapLayerLoadStyleDialog : public QDialog, private Ui::QgsVectorLayerLoadStyleDialog
{
Q_OBJECT
public:

/**
* Constructor for QgsMapLayerLoadStyleDialog, associated with the specified map \a layer.
*/
explicit QgsMapLayerLoadStyleDialog( QgsMapLayer *layer, QWidget *parent = nullptr );

/**
* Returns the list of selected style categories the user has opted to load.
*/
QgsMapLayer::StyleCategories styleCategories() const;

/**
* Returns the selected vector style type, for vector layers only.
*/
QgsVectorLayerProperties::StyleType currentStyleType() const;

/**
* Returns the file extension for the selected layer style source file.
*
* \see filePath()
*/
QString fileExtension() const;

/**
* Returns the full path to the selected layer style source file.
*
* \see fileExtension()
*/
QString filePath() const;

/**
* Initialize list of database stored styles.
*/
void initializeLists( const QStringList &ids, const QStringList &names, const QStringList &descriptions, int sectionLimit );

/**
* Returns the ID of the selected database stored style.
*/
QString selectedStyleId();
void selectionChanged( QTableWidget *styleTable );

public slots:
void accept() override;
Expand All @@ -56,6 +94,8 @@ class GUI_EXPORT QgsMapLayerLoadStyleDialog : public QDialog, private Ui::QgsVec
void showHelp();

private:
void selectionChanged( QTableWidget *styleTable );

QgsMapLayer *mLayer = nullptr;
QgsMapLayerStyleCategoriesModel *mModel;
QString mSelectedStyleId;
Expand Down

0 comments on commit 47fb11a

Please sign in to comment.