QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsprocessingtoolboxtreeview.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingtoolboxtreeview.h
3 -----------------------------
4 begin : July 2018
5 copyright : (C) 2018 by Nyall Dawson
6 email : nyall dot dawson at gmail dot 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 QGSPROCESSINGTOOLBOXTREEVIEW_H
17#define QGSPROCESSINGTOOLBOXTREEVIEW_H
18
19#include "qgis.h"
20#include "qgis_gui.h"
21#include <QTreeView>
23
25class QgsProcessingRecentAlgorithmLog;
27class QgsProcessingFavoriteAlgorithmManager;
28
30
37class GUI_EXPORT QgsProcessingToolboxTreeView : public QTreeView
38{
39 Q_OBJECT
40
41 public:
55 QgsProcessingToolboxTreeView( QWidget *parent SIP_TRANSFERTHIS = nullptr, QgsProcessingRegistry *registry = nullptr, QgsProcessingRecentAlgorithmLog *recentLog = nullptr, QgsProcessingFavoriteAlgorithmManager *favoriteManager = nullptr );
56
66 void setRegistry(
67 QgsProcessingRegistry *registry,
68 QgsProcessingRecentAlgorithmLog *recentLog = nullptr,
69 QgsProcessingFavoriteAlgorithmManager *favoriteManager = nullptr
70 );
71
75 void setToolboxProxyModel( QgsProcessingToolboxProxyModel *model SIP_TRANSFER );
76
81 const QgsProcessingAlgorithm *algorithmForIndex( const QModelIndex &index );
82
87 const QgsProcessingAlgorithm *selectedAlgorithm();
88
93 void setFilters( QgsProcessingToolboxProxyModel::Filters filters );
94
101
105 void setInPlaceLayer( QgsVectorLayer *layer );
106
107 public slots:
108
113 void setFilterString( const QString &filter );
114
115 protected:
116 void keyPressEvent( QKeyEvent *event ) override;
117
118 private:
119 QgsProcessingToolboxProxyModel *mModel = nullptr;
120 QgsProcessingToolboxModel *mToolboxModel = nullptr;
121
125 QModelIndex findFirstVisibleAlgorithm( const QModelIndex &parent );
126
127 friend class TestQgsProcessingModel;
128};
129
131#endif // QGSPROCESSINGTOOLBOXTREEVIEW_H
Abstract base class for processing algorithms.
Registry for various processing components, including providers, algorithms and various parameters an...
A model for providers and algorithms shown within the Processing toolbox.
A sort/filter proxy model for providers and algorithms shown within the Processing toolbox,...
Represents a vector layer which manages a vector based data sets.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_TRANSFER
Definition qgis_sip.h:36