16 #ifndef QGSSTYLEV2MANAGERDIALOG_H
17 #define QGSSTYLEV2MANAGERDIALOG_H
20 #include <QStandardItem>
24 #include "ui_qgsstylemanagerdialogbase.h"
40 explicit QgsCheckableStyleModel(
QgsStyleModel *sourceModel, QObject *parent =
nullptr,
bool readOnly =
false );
41 explicit QgsCheckableStyleModel(
QgsStyle *style, QObject *parent =
nullptr,
bool readOnly =
false );
43 void setCheckable(
bool checkable );
44 void setCheckTag(
const QString &tag );
46 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
47 QVariant data(
const QModelIndex &index,
int role )
const override;
48 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
53 bool mCheckable =
false;
55 bool mReadOnly =
false;
81 bool readOnly =
false );
90 static QString addColorRampStatic( QWidget *parent,
QgsStyle *style,
91 const QString &RampType = QString() );
98 void setFavoritesGroupVisible(
bool show );
105 void setSmartGroupsVisible(
bool show );
116 void setBaseStyleName(
const QString &name );
150 void exportItemsSVG();
158 void exportItemsPNG();
166 void exportSelectedItemsImages(
const QString &dir,
const QString &format, QSize size );
201 Q_DECL_DEPRECATED
void itemChanged( QStandardItem *item )
SIP_DEPRECATED;
206 void groupChanged(
const QModelIndex & );
211 void groupRenamed( QStandardItem *item );
231 void tagSymbolsAction();
236 void editSmartgroupAction();
241 Q_DECL_DEPRECATED
void regrouped( QStandardItem * )
SIP_DEPRECATED;
246 void filterSymbols(
const QString &filter );
249 void symbolSelected(
const QModelIndex & );
252 void selectedSymbolsChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
255 void grouptreeContextMenu( QPoint );
258 void listitemsContextMenu( QPoint );
269 bool addColorRamp(
const QString &type = QString() );
272 void addFavoriteSelectedSymbols();
274 void removeFavoriteSelectedSymbols();
276 void tagSelectedSymbols(
bool newTag =
false );
278 void detagSelectedSymbols();
290 void populateGroups();
295 Q_DECL_DEPRECATED
void setSymbolsChecked(
const QStringList & )
SIP_DEPRECATED;
302 Q_DECL_DEPRECATED
void populateSymbols(
const QStringList &symbolNames,
bool checkable =
false )
SIP_DEPRECATED;
309 Q_DECL_DEPRECATED
void populateColorRamps(
const QStringList &colorRamps,
bool checkable =
false )
SIP_DEPRECATED;
311 int currentItemType();
312 QString currentItemName();
315 bool addSymbol(
int symbolType = -1 );
318 bool editColorRamp();
331 void enableSymbolInputs(
bool );
333 void enableGroupInputs(
bool );
335 void enableItemsForGroupingMode(
bool );
338 void setBold( QStandardItem * );
342 void tabItemType_currentChanged(
int );
344 void copyItemsToDefault();
351 int selectedItemType();
356 bool allTypesSelected()
const;
365 QList< ItemDetails > selectedItems();
370 static int copyItems(
const QList< ItemDetails > &items,
QgsStyle *src,
QgsStyle *dst,
371 QWidget *parentWidget, std::unique_ptr<QgsTemporaryCursorOverride> &cursorOverride,
372 bool isImport,
const QStringList &importTags,
bool addToFavorites,
bool ignoreSourceTags );
378 QgsCheckableStyleModel *mModel =
nullptr;
380 QString mStyleFilename;
382 bool mModified =
false;
385 bool mGroupingMode =
false;
388 QStringList mTagList;
391 QMenu *mGroupMenu =
nullptr;
394 QMenu *mGroupListMenu =
nullptr;
397 QMenu *mGroupTreeContextMenu =
nullptr;
400 QMenu *mMenuBtnAddItemColorRamp =
nullptr;
403 QMenu *mMenuBtnAddItemAll =
nullptr;
406 QMenu *mMenuBtnAddItemLabelSettings =
nullptr;
409 QMenu *mMenuBtnAddItemLegendPatchShape =
nullptr;
412 QMenu *mMenuBtnAddItemSymbol3D =
nullptr;
414 QAction *mActionCopyToDefault =
nullptr;
416 QAction *mActionCopyItem =
nullptr;
417 QAction *mActionPasteItem =
nullptr;
419 int mBlockGroupUpdates = 0;
421 bool mReadOnly =
false;
422 bool mFavoritesGroupVisible =
true;
423 bool mSmartGroupVisible =
true;
426 bool addTextFormat();
427 bool editTextFormat();
430 bool editLabelSettings();
433 bool editLegendPatchShape();
435 bool addSymbol3D(
const QString &type );
A bar for displaying non-blocking messages to the user.
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.
SymbolType
Type of the symbol.
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.