| 
    QGIS API Documentation 3.99.0-Master (f78f5286a64)
    
   | 
 
List model representing the style databases associated with a QgsProject. More...
#include <qgsprojectstylesettings.h>

Public Types | |
| enum class | CustomRole : int { Style = Qt::UserRole + 1 , Path } | 
| Custom model roles.  More... | |
Public Member Functions | |
| QgsProjectStyleDatabaseModel (QgsProjectStyleSettings *settings, QObject *parent=nullptr) | |
| Constructor for QgsProjectStyleDatabaseModel, showing the styles from the specified settings.   | |
| QVariant | data (const QModelIndex &index, int role) const override | 
| QModelIndex | indexFromStyle (QgsStyle *style) const | 
| Returns the model index corresponding to a style.   | |
| int | rowCount (const QModelIndex &parent) const override | 
| void | setShowDefaultStyle (bool show) | 
| Sets whether the default style should also be included in the model.   | |
| bool | showDefaultStyle () const | 
Returns true if the model includes the default style.   | |
| QgsStyle * | styleFromIndex (const QModelIndex &index) const | 
| Returns the style at the corresponding index.   | |
List model representing the style databases associated with a QgsProject.
Definition at line 371 of file qgsprojectstylesettings.h.
      
  | 
  strong | 
Custom model roles.
| Enumerator | |
|---|---|
| Style | Style object.  | 
| Path | Style path.  | 
Definition at line 385 of file qgsprojectstylesettings.h.
      
  | 
  explicit | 
Constructor for QgsProjectStyleDatabaseModel, showing the styles from the specified settings.
Definition at line 593 of file qgsprojectstylesettings.cpp.
      
  | 
  override | 
Definition at line 613 of file qgsprojectstylesettings.cpp.
| QModelIndex QgsProjectStyleDatabaseModel::indexFromStyle | ( | QgsStyle * | style | ) | const | 
Returns the model index corresponding to a style.
Definition at line 678 of file qgsprojectstylesettings.cpp.
      
  | 
  override | 
Definition at line 607 of file qgsprojectstylesettings.cpp.
| void QgsProjectStyleDatabaseModel::setShowDefaultStyle | ( | bool | show | ) | 
Sets whether the default style should also be included in the model.
Definition at line 703 of file qgsprojectstylesettings.cpp.
      
  | 
  inline | 
Returns true if the model includes the default style. 
Definition at line 425 of file qgsprojectstylesettings.h.
| QgsStyle * QgsProjectStyleDatabaseModel::styleFromIndex | ( | const QModelIndex & | index | ) | const | 
Returns the style at the corresponding index.
Definition at line 666 of file qgsprojectstylesettings.cpp.