QGIS API Documentation  2.12.0-Lyon
qgscptcitycolorrampv2dialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgscptcitycolorrampv2dialog.h
3  ---------------------
4  begin : July 2012
5  copyright : (C) 2012 by Etienne Tourigny
6  email : etourigny dot dev at gmail.com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSCPTCITYCOLORRAMPV2DIALOG_H
17 #define QGSCPTCITYCOLORRAMPV2DIALOG_H
18 
19 
20 #include "ui_qgscptcitycolorrampv2dialogbase.h"
21 #include <QDialog>
22 
23 #include "qgscptcityarchive.h"
24 
25 #include <QAbstractProxyModel>
26 
29 class ListFilterProxyModel;
30 class UngroupProxyModel;
31 
32 
33 class GUI_EXPORT QgsCptCityColorRampV2Dialog : public QDialog, private Ui::QgsCptCityColorRampV2DialogBase
34 {
35  Q_OBJECT
36 
37  public:
40 
42  { return mRamp ? QFileInfo( mRamp->schemeName() ).baseName() + mRamp->variantName() : QString(); }
43 
44  bool saveAsGradientRamp() const;
45 
46  public slots:
47  void populateVariants();
48 
49  void on_mTreeView_clicked( const QModelIndex & );
50  void on_mListWidget_itemClicked( QListWidgetItem * item );
51  void on_mListWidget_itemSelectionChanged();
52  void on_tabBar_currentChanged( int index );
53  void on_pbtnLicenseDetails_pressed();
54  void on_cboVariantName_currentIndexChanged( int index );
55  void onFinished();
56  void on_buttonBox_helpRequested();
57  /* void refresh(); */
58 
59  protected:
60 
61  void updatePreview( bool clear = false );
62  void clearCopyingInfo();
63  void updateCopyingInfo( const QMap< QString, QString >& copyingMap );
64  void updateTreeView( QgsCptCityDataItem *item, bool resetRamp = true );
65  void updateListWidget( QgsCptCityDataItem *item );
66  bool eventFilter( QObject *obj, QEvent *event ) override;
67 
71 
72  /* void refreshModel( const QModelIndex& index ); */
73  bool updateRamp();
74  void showAll();
75  void setTreeModel( QgsCptCityBrowserModel* model );
76 
82 
83 };
84 
85 
86 #endif
static unsigned index
QgsCptCityBrowserModel * mSelectionsModel
QVector< QgsCptCityColorRampItem * > mListRamps
QgsCptCityBrowserModel * mAuthorsModel
QgsCptCityBrowserModel::ViewType mArchiveViewType
Base class for all items in the model.
virtual bool eventFilter(QObject *o, QEvent *e)