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 );
86 static QString addColorRampStatic( QWidget *parent,
QgsStyle *style,
87 QString RampType = QString() );
94 void setFavoritesGroupVisible(
bool show );
101 void setSmartGroupsVisible(
bool show );
112 void setBaseStyleName(
const QString &name );
146 void exportItemsSVG();
154 void exportItemsPNG();
162 void exportSelectedItemsImages(
const QString &dir,
const QString &format, QSize size );
197 Q_DECL_DEPRECATED
void itemChanged( QStandardItem *item )
SIP_DEPRECATED;
202 void groupChanged(
const QModelIndex & );
207 void groupRenamed( QStandardItem *item );
227 void tagSymbolsAction();
232 void editSmartgroupAction();
237 Q_DECL_DEPRECATED
void regrouped( QStandardItem * )
SIP_DEPRECATED;
242 void filterSymbols(
const QString &filter );
245 void symbolSelected(
const QModelIndex & );
248 void selectedSymbolsChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
251 void grouptreeContextMenu( QPoint );
254 void listitemsContextMenu( QPoint );
257 bool addColorRamp( QAction *action );
259 void addFavoriteSelectedSymbols();
261 void removeFavoriteSelectedSymbols();
263 void tagSelectedSymbols(
bool newTag =
false );
265 void detagSelectedSymbols();
277 void populateGroups();
282 Q_DECL_DEPRECATED
void setSymbolsChecked(
const QStringList & )
SIP_DEPRECATED;
289 Q_DECL_DEPRECATED
void populateSymbols(
const QStringList &symbolNames,
bool checkable =
false )
SIP_DEPRECATED;
296 Q_DECL_DEPRECATED
void populateColorRamps(
const QStringList &colorRamps,
bool checkable =
false )
SIP_DEPRECATED;
298 int currentItemType();
299 QString currentItemName();
302 bool addSymbol(
int symbolType = -1 );
307 bool editColorRamp();
320 void enableSymbolInputs(
bool );
322 void enableGroupInputs(
bool );
324 void enableItemsForGroupingMode(
bool );
327 void setBold( QStandardItem * );
331 void tabItemType_currentChanged(
int );
333 void copyItemsToDefault();
340 int selectedItemType();
345 bool allTypesSelected()
const;
354 QList< ItemDetails > selectedItems();
359 static int copyItems(
const QList< ItemDetails > &items,
QgsStyle *src,
QgsStyle *dst,
360 QWidget *parentWidget, std::unique_ptr<QgsTemporaryCursorOverride> &cursorOverride,
361 bool isImport,
const QStringList &importTags,
bool addToFavorites,
bool ignoreSourceTags );
367 QgsCheckableStyleModel *mModel =
nullptr;
369 QString mStyleFilename;
371 bool mModified =
false;
374 bool mGroupingMode =
false;
377 QStringList mTagList;
380 QMenu *mGroupMenu =
nullptr;
383 QMenu *mGroupListMenu =
nullptr;
386 QMenu *mGroupTreeContextMenu =
nullptr;
389 QMenu *mMenuBtnAddItemColorRamp =
nullptr;
392 QMenu *mMenuBtnAddItemAll =
nullptr;
395 QMenu *mMenuBtnAddItemLabelSettings =
nullptr;
397 QAction *mActionCopyToDefault =
nullptr;
399 QAction *mActionCopyItem =
nullptr;
400 QAction *mActionPasteItem =
nullptr;
402 int mBlockGroupUpdates = 0;
404 bool mReadOnly =
false;
405 bool mFavoritesGroupVisible =
true;
406 bool mSmartGroupVisible =
true;
409 bool addTextFormat();
410 bool editTextFormat();
413 bool editLabelSettings();
A QAbstractItemModel subclass for showing symbol and color ramp entities contained within a QgsStyle ...
Temporarily sets a cursor override for the QApplication for the lifetime of the object.
A dialog allowing users to customize and populate a QgsStyle.
A bar for displaying non-blocking messages to the user.
StyleEntity
Enum for Entities involved in a style.
SymbolType
Type of the symbol.
A QSortFilterProxyModel subclass for showing filtered symbol and color ramps entries from a QgsStyle ...
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.