16 #ifndef QGSSTYLEV2MANAGERDIALOG_H 17 #define QGSSTYLEV2MANAGERDIALOG_H 20 #include <QStandardItem> 24 #include "ui_qgsstylemanagerdialogbase.h" 40 explicit QgsCheckableStyleModel(
QgsStyle *style, QObject *parent =
nullptr,
bool readOnly =
false );
42 void setCheckable(
bool checkable );
43 void setCheckTag(
const QString &tag );
45 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
46 QVariant data(
const QModelIndex &index,
int role )
const override;
47 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
52 bool mCheckable =
false;
54 bool mReadOnly =
false;
80 bool readOnly =
false );
85 static QString addColorRampStatic( QWidget *parent,
QgsStyle *style,
86 QString RampType = QString() );
93 void setFavoritesGroupVisible(
bool show );
100 void setSmartGroupsVisible(
bool show );
111 void setBaseStyleName(
const QString &name );
145 void exportItemsSVG();
153 void exportItemsPNG();
161 void exportSelectedItemsImages(
const QString &dir,
const QString &format, QSize size );
196 Q_DECL_DEPRECATED
void itemChanged( QStandardItem *item )
SIP_DEPRECATED;
201 void groupChanged(
const QModelIndex & );
206 void groupRenamed( QStandardItem *item );
226 void tagSymbolsAction();
231 void editSmartgroupAction();
236 Q_DECL_DEPRECATED
void regrouped( QStandardItem * )
SIP_DEPRECATED;
241 void filterSymbols(
const QString &filter );
244 void symbolSelected(
const QModelIndex & );
247 void selectedSymbolsChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
250 void grouptreeContextMenu( QPoint );
253 void listitemsContextMenu( QPoint );
256 bool addColorRamp( QAction *action );
258 void addFavoriteSelectedSymbols();
260 void removeFavoriteSelectedSymbols();
262 void tagSelectedSymbols(
bool newTag =
false );
264 void detagSelectedSymbols();
276 void populateGroups();
281 Q_DECL_DEPRECATED
void setSymbolsChecked(
const QStringList & )
SIP_DEPRECATED;
288 Q_DECL_DEPRECATED
void populateSymbols(
const QStringList &symbolNames,
bool checkable =
false )
SIP_DEPRECATED;
295 Q_DECL_DEPRECATED
void populateColorRamps(
const QStringList &colorRamps,
bool checkable =
false )
SIP_DEPRECATED;
297 int currentItemType();
298 QString currentItemName();
301 bool addSymbol(
int symbolType = -1 );
306 bool editColorRamp();
319 void enableSymbolInputs(
bool );
321 void enableGroupInputs(
bool );
323 void enableItemsForGroupingMode(
bool );
326 void setBold( QStandardItem * );
330 void tabItemType_currentChanged(
int );
332 void copyItemsToDefault();
335 int selectedItemType();
340 bool allTypesSelected()
const;
349 QList< ItemDetails > selectedItems();
354 static int copyItems(
const QList< ItemDetails > &items,
QgsStyle *src,
QgsStyle *dst,
355 QWidget *parentWidget, std::unique_ptr<QgsTemporaryCursorOverride> &cursorOverride,
356 bool isImport,
const QStringList &importTags,
bool addToFavorites,
bool ignoreSourceTags );
362 QgsCheckableStyleModel *mModel =
nullptr;
364 QString mStyleFilename;
366 bool mModified =
false;
369 bool mGroupingMode =
false;
372 QStringList mTagList;
375 QMenu *mGroupMenu =
nullptr;
378 QMenu *mGroupListMenu =
nullptr;
381 QMenu *mGroupTreeContextMenu =
nullptr;
384 QMenu *mMenuBtnAddItemColorRamp =
nullptr;
387 QMenu *mMenuBtnAddItemAll =
nullptr;
389 QAction *mActionCopyToDefault =
nullptr;
391 int mBlockGroupUpdates = 0;
393 bool mReadOnly =
false;
394 bool mFavoritesGroupVisible =
true;
395 bool mSmartGroupVisible =
true;
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 ...