|
QGIS API Documentation
master-6227475
|
00001 /*************************************************************************** 00002 qgscptcitycolorrampv2dialog.h 00003 --------------------- 00004 begin : July 2012 00005 copyright : (C) 2012 by Etienne Tourigny 00006 email : etourigny dot dev at gmail.com 00007 *************************************************************************** 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 ***************************************************************************/ 00015 00016 #ifndef QGSCPTCITYCOLORRAMPV2DIALOG_H 00017 #define QGSCPTCITYCOLORRAMPV2DIALOG_H 00018 00019 00020 #include "ui_qgscptcitycolorrampv2dialogbase.h" 00021 #include <QDialog> 00022 00023 #include "qgscptcityarchive.h" 00024 00025 #include <QAbstractProxyModel> 00026 00027 class QgsCptCityColorRampV2; 00028 class TreeFilterProxyModel; 00029 class ListFilterProxyModel; 00030 class UngroupProxyModel; 00031 00032 00033 class GUI_EXPORT QgsCptCityColorRampV2Dialog : public QDialog, private Ui::QgsCptCityColorRampV2DialogBase 00034 { 00035 Q_OBJECT 00036 00037 public: 00038 QgsCptCityColorRampV2Dialog( QgsCptCityColorRampV2* ramp, QWidget* parent = NULL ); 00039 ~QgsCptCityColorRampV2Dialog(); 00040 00041 QString selectedName() const 00042 { return mRamp ? QFileInfo( mRamp->schemeName() ).baseName() + mRamp->variantName() : QString(); } 00043 00044 bool saveAsGradientRamp() const; 00045 00046 public slots: 00047 void populateVariants(); 00048 00049 void on_mTreeView_clicked( const QModelIndex & ); 00050 void on_mListWidget_itemClicked( QListWidgetItem * item ); 00051 void on_tabBar_currentChanged( int index ); 00052 void on_pbtnLicenseDetails_pressed(); 00053 void on_cboVariantName_currentIndexChanged( int index ); 00054 void onFinished(); 00055 void on_buttonBox_helpRequested(); 00056 /* void refresh(); */ 00057 00058 protected: 00059 00060 void updatePreview( bool clear = false ); 00061 void clearCopyingInfo(); 00062 void updateCopyingInfo( const QMap< QString, QString >& copyingMap ); 00063 void updateTreeView( QgsCptCityDataItem *item, bool resetRamp = true ); 00064 void updateListWidget( QgsCptCityDataItem *item ); 00065 bool eventFilter( QObject *obj, QEvent *event ); 00066 00067 QgsCptCityColorRampV2* mRamp; 00068 QgsCptCityArchive* mArchive; 00069 QgsCptCityBrowserModel::ViewType mArchiveViewType; 00070 00071 /* void refreshModel( const QModelIndex& index ); */ 00072 bool updateRamp(); 00073 void setTreeModel( QgsCptCityBrowserModel* model ); 00074 00075 QgsCptCityBrowserModel* mModel; 00076 QgsCptCityBrowserModel* mAuthorsModel; 00077 QgsCptCityBrowserModel* mSelectionsModel; 00078 TreeFilterProxyModel* mTreeFilter; 00079 QVector<QgsCptCityColorRampItem*> mListRamps; 00080 00081 }; 00082 00083 00084 #endif