QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgsprocessingpointcloudexpressionlineedit.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingpointcloudexpressionlineedit.h
3 ---------------------
4 begin : April 2023
5 copyright : (C) 2023 by Alexander Bruy
6 email : alexander dot bruy at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSPROCESSINGPOINTCLOUDEXPRESSIONLINEEDIT_H
19#define QGSPROCESSINGPOINTCLOUDEXPRESSIONLINEEDIT_H
20
21#define SIP_NO_FILE
22
23#include <QWidget>
24#include <QDialog>
25#include <QStandardItemModel>
26#include <QStandardItem>
27#include <QModelIndex>
28
29#include "qgis.h"
30#include "qgis_gui.h"
31#include "ui_qgsprocessingpointcloudexpressiondialogbase.h"
32
33
35class QToolButton;
37
39
47class GUI_EXPORT QgsProcessingPointCloudExpressionLineEdit : public QWidget
48{
49 Q_OBJECT
50
51 public:
52
57 explicit QgsProcessingPointCloudExpressionLineEdit( QWidget *parent SIP_TRANSFERTHIS = nullptr );
58 ~QgsProcessingPointCloudExpressionLineEdit() override;
59
64 void setLayer( QgsPointCloudLayer *layer );
65
70 QgsPointCloudLayer *layer() const;
71
76 QString expression() const;
77
78 signals:
79
84 void expressionChanged( const QString &expression );
85
86 public slots:
87
93 void setExpression( const QString &expression );
94
95 private slots:
96
97 void expressionEdited( const QString &expression );
98 void expressionEdited();
99
101 void editExpression();
102
103 private:
104 QgsFilterLineEdit *mLineEdit = nullptr;
105 QToolButton *mButton = nullptr;
106 QgsPointCloudLayer *mLayer = nullptr;
107};
108
115class GUI_EXPORT QgsProcessingPointCloudExpressionDialog : public QDialog, private Ui::QgsProcessingPointCloudExpressionDialogBase
116{
117 Q_OBJECT
118
119 public:
120
124 QgsProcessingPointCloudExpressionDialog( QgsPointCloudLayer *layer, const QString &startExpression = QString(), QWidget *parent = nullptr );
125
131 void setExpression( const QString &text );
132
137 QString expression();
138
139 private slots:
140
144 void test();
145
149 void clear();
150
151 void lstAttributes_currentChanged( const QModelIndex &current, const QModelIndex &previous );
152 void lstAttributes_doubleClicked( const QModelIndex &index );
153 void lstValues_doubleClicked( const QModelIndex &index );
154 void btnEqual_clicked();
155 void btnLessThan_clicked();
156 void btnGreaterThan_clicked();
157 void btnIn_clicked();
158 void btnNotIn_clicked();
159 void btnLessEqual_clicked();
160 void btnGreaterEqual_clicked();
161 void btnNotEqual_clicked();
162 void btnAnd_clicked();
163 void btnOr_clicked();
164
165 private:
167 void populateAttributes();
168
170 QStandardItemModel *mModelAttributes = nullptr;
171
173 QStandardItemModel *mModelValues = nullptr;
174
175 QgsPointCloudLayer *mLayer = nullptr;
176 const QString mInitialText;
177};
178
180#endif // QGSPROCESSINGPOINTCLOUDEXPRESSIONLINEEDIT_H
QLineEdit subclass with built in support for clearing the widget's value and handling custom null val...
Represents a map layer supporting display of point clouds.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53