16#ifndef QGSSTYLEV2MANAGERDIALOG_H
17#define QGSSTYLEV2MANAGERDIALOG_H
20#include <QStandardItem>
24#include "ui_qgsstylemanagerdialogbase.h"
43 explicit QgsCheckableStyleModel(
QgsStyleModel *sourceModel, QObject *parent =
nullptr,
bool readOnly =
false );
44 explicit QgsCheckableStyleModel(
QgsStyle *style, QObject *parent =
nullptr,
bool readOnly =
false );
46 void setCheckable(
bool checkable );
47 void setCheckTag(
const QString &tag );
49 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
50 QVariant data(
const QModelIndex &index,
int role )
const override;
51 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
56 bool mCheckable =
false;
58 bool mReadOnly =
false;
92 bool readOnly =
false );
110 static QString addColorRampStatic( QWidget *parent,
QgsStyle *style,
111 const QString &RampType = QString() );
118 void setFavoritesGroupVisible(
bool show );
125 void setSmartGroupsVisible(
bool show );
136 void setBaseStyleName(
const QString &name );
170 void exportItemsSVG();
178 void exportItemsPNG();
186 void exportSelectedItemsImages(
const QString &dir,
const QString &format, QSize size );
221 Q_DECL_DEPRECATED
void itemChanged( QStandardItem *item )
SIP_DEPRECATED;
226 void groupChanged(
const QModelIndex & );
231 void groupRenamed( QStandardItem *item );
251 void tagSymbolsAction();
256 void editSmartgroupAction();
261 Q_DECL_DEPRECATED
void regrouped( QStandardItem * )
SIP_DEPRECATED;
266 void filterSymbols(
const QString &filter );
269 void symbolSelected(
const QModelIndex & );
272 void selectedSymbolsChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
275 void grouptreeContextMenu( QPoint );
278 void listitemsContextMenu( QPoint );
289 bool addColorRamp(
const QString &type = QString() );
292 void addFavoriteSelectedSymbols();
294 void removeFavoriteSelectedSymbols();
296 void tagSelectedSymbols(
bool newTag =
false );
298 void detagSelectedSymbols();
310 void populateGroups();
315 Q_DECL_DEPRECATED
void setSymbolsChecked( const QStringList & )
SIP_DEPRECATED;
322 Q_DECL_DEPRECATED
void populateSymbols( const QStringList &symbolNames,
bool checkable = false )
SIP_DEPRECATED;
329 Q_DECL_DEPRECATED
void populateColorRamps( const QStringList &colorRamps,
bool checkable = false )
SIP_DEPRECATED;
331 int currentItemType();
332 QString currentItemName();
335 bool addSymbol(
int symbolType = -1 );
338 bool editColorRamp();
351 void enableSymbolInputs(
bool );
353 void enableGroupInputs(
bool );
355 void enableItemsForGroupingMode(
bool );
358 void setBold( QStandardItem * );
362 void tabItemType_currentChanged(
int );
364 void copyItemsToDefault();
370 void setThumbnailSize(
int );
372 void currentStyleAboutToBeDestroyed();
378 void setCurrentStyle(
QgsStyle *style );
379 int selectedItemType();
384 bool allTypesSelected() const;
386 bool isReadOnly() const;
397 Name = Qt::UserRole + 1,
401 QList< ItemDetails > selectedItems();
406 static int copyItems(
const QList< ItemDetails > &items,
QgsStyle *src,
QgsStyle *dst,
407 QWidget *parentWidget, std::unique_ptr<QgsTemporaryCursorOverride> &cursorOverride,
408 bool isImport,
const QStringList &importTags,
bool addToFavorites,
bool ignoreSourceTags );
414 QgsCheckableStyleModel *mModel =
nullptr;
418 QString mStyleFilename;
420 bool mModified =
false;
423 bool mGroupingMode =
false;
426 QStringList mTagList;
428 QMenu *mShareMenu =
nullptr;
431 QMenu *mGroupMenu =
nullptr;
434 QMenu *mGroupListMenu =
nullptr;
437 QMenu *mGroupTreeContextMenu =
nullptr;
440 QMenu *mMenuBtnAddItemColorRamp =
nullptr;
443 QMenu *mMenuBtnAddItemAll =
nullptr;
446 QMenu *mMenuBtnAddItemLabelSettings =
nullptr;
449 QMenu *mMenuBtnAddItemLegendPatchShape =
nullptr;
452 QMenu *mMenuBtnAddItemSymbol3D =
nullptr;
454 QAction *mActionCopyToDefault =
nullptr;
456 QAction *mActionCopyItem =
nullptr;
457 QAction *mActionPasteItem =
nullptr;
458 QAction *mExportAction =
nullptr;
459 QAction *mImportAction =
nullptr;
461 int mBlockGroupUpdates = 0;
462 int mBlockStyleDatabaseChanges = 0;
464 bool mReadOnly =
false;
465 bool mFavoritesGroupVisible =
true;
466 bool mSmartGroupVisible =
true;
469 static QString sPreviousTag;
471 bool addTextFormat();
472 bool editTextFormat();
475 bool editLabelSettings();
478 bool editLegendPatchShape();
480 bool addSymbol3D(
const QString &type );
483 void addStyleDatabase(
bool createNew );
A bar for displaying non-blocking messages to the user.
List model representing the style databases associated with a QgsProject.
static const char * STYLE_MANAGER
A dialog allowing users to customize and populate a QgsStyle.
A QAbstractItemModel subclass for showing symbol and color ramp entities contained within a QgsStyle ...
A QSortFilterProxyModel subclass for showing filtered symbol and color ramps entries from a QgsStyle ...
StyleEntity
Enum for Entities involved in a style.
Temporarily sets a cursor override for the QApplication for the lifetime of the object.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.