16#ifndef QGSCPTCITYCOLORRAMPDIALOG_H
17#define QGSCPTCITYCOLORRAMPDIALOG_H
20#include "ui_qgscptcitycolorrampdialogbase.h"
26#include <QAbstractProxyModel>
27#include <QSortFilterProxyModel>
32class TreeFilterProxyModel;
33class ListFilterProxyModel;
34class UngroupProxyModel;
72 return QFileInfo( mRamp.schemeName() ).baseName() + mRamp.variantName();
78 bool saveAsGradientRamp()
const;
84 QDialogButtonBox *buttonBox()
const;
86 bool eventFilter( QObject *obj, QEvent *event )
override;
94 void populateVariants();
96 void mTreeView_clicked(
const QModelIndex & );
97 void mListWidget_itemClicked( QListWidgetItem *item );
98 void mListWidget_itemSelectionChanged();
99 void tabBar_currentChanged(
int index );
100 void pbtnLicenseDetails_pressed();
101 void cboVariantName_currentIndexChanged(
int index );
108 void updatePreview(
bool clear =
false );
109 void clearCopyingInfo();
110 void updateCopyingInfo(
const QMap<QString, QString> ©ingMap );
126 TreeFilterProxyModel *mTreeFilter =
nullptr;
127 QVector<QgsCptCityColorRampItem *> mListRamps;
137class TreeFilterProxyModel :
public QSortFilterProxyModel
145 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent )
const override;
Represents a CPT City color scheme.
A custom item model for display of CPT City color palettes.
A dialog which allows users to modify the properties of a QgsCptCityColorRamp.
QgsCptCityColorRamp ramp() const
Returns a color ramp representing the current settings from the dialog.
void changed()
Emitted when the dialog settings change.
QString selectedName() const
Returns the name of the ramp currently selected in the dialog.
A color ramp from the CPT City collection.
Base class for all items in the model.