16#ifndef QGSCPTCITYCOLORRAMPDIALOG_H
17#define QGSCPTCITYCOLORRAMPDIALOG_H
20#include "ui_qgscptcitycolorrampdialogbase.h"
26#include <QAbstractProxyModel>
29#include <QSortFilterProxyModel>
32class TreeFilterProxyModel;
33class ListFilterProxyModel;
34class UngroupProxyModel;
70 QString
selectedName()
const {
return QFileInfo( mRamp.schemeName() ).baseName() + mRamp.variantName(); }
75 bool saveAsGradientRamp()
const;
81 QDialogButtonBox *buttonBox()
const;
83 bool eventFilter( QObject *obj, QEvent *event )
override;
91 void populateVariants();
93 void mTreeView_clicked(
const QModelIndex & );
94 void mListWidget_itemClicked( QListWidgetItem *item );
95 void mListWidget_itemSelectionChanged();
96 void tabBar_currentChanged(
int index );
97 void pbtnLicenseDetails_pressed();
98 void cboVariantName_currentIndexChanged(
int index );
105 void updatePreview(
bool clear =
false );
106 void clearCopyingInfo();
107 void updateCopyingInfo(
const QMap<QString, QString> ©ingMap );
123 TreeFilterProxyModel *mTreeFilter =
nullptr;
124 QVector<QgsCptCityColorRampItem *> mListRamps;
134class TreeFilterProxyModel :
public QSortFilterProxyModel
142 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.
QgsCptCityColorRampDialog(const QgsCptCityColorRamp &ramp, QWidget *parent=nullptr)
Constructor for QgsCptCityColorRampDialog.
QgsCptCityColorRamp ramp() const
Returns a color ramp representing the current settings from the dialog.
void setRamp(const QgsCptCityColorRamp &ramp)
Sets the color ramp to show in 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 a QgsCptCityBrowserModel model.