QGIS API Documentation 3.41.0-Master (cea29feecf2)
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:
56 explicit QgsProcessingPointCloudExpressionLineEdit( QWidget *parent SIP_TRANSFERTHIS = nullptr );
57 ~QgsProcessingPointCloudExpressionLineEdit() override;
58
63 void setLayer( QgsPointCloudLayer *layer );
64
69 QgsPointCloudLayer *layer() const;
70
75 QString expression() const;
76
77 signals:
78
83 void expressionChanged( const QString &expression );
84
85 public slots:
86
92 void setExpression( const QString &expression );
93
94 private slots:
95
96 void expressionEdited( const QString &expression );
97 void expressionEdited();
98
100 void editExpression();
101
102 private:
103 QgsFilterLineEdit *mLineEdit = nullptr;
104 QToolButton *mButton = nullptr;
105 QgsPointCloudLayer *mLayer = nullptr;
106};
107
114class GUI_EXPORT QgsProcessingPointCloudExpressionDialog : public QDialog, private Ui::QgsProcessingPointCloudExpressionDialogBase
115{
116 Q_OBJECT
117
118 public:
122 QgsProcessingPointCloudExpressionDialog( QgsPointCloudLayer *layer, const QString &startExpression = QString(), QWidget *parent = nullptr );
123
129 void setExpression( const QString &text );
130
135 QString expression();
136
137 private slots:
138
142 void test();
143
147 void clear();
148
149 void lstAttributes_currentChanged( const QModelIndex &current, const QModelIndex &previous );
150 void lstAttributes_doubleClicked( const QModelIndex &index );
151 void lstValues_doubleClicked( const QModelIndex &index );
152 void btnEqual_clicked();
153 void btnLessThan_clicked();
154 void btnGreaterThan_clicked();
155 void btnIn_clicked();
156 void btnNotIn_clicked();
157 void btnLessEqual_clicked();
158 void btnGreaterEqual_clicked();
159 void btnNotEqual_clicked();
160 void btnAnd_clicked();
161 void btnOr_clicked();
162
163 private:
165 void populateAttributes();
166
168 QStandardItemModel *mModelAttributes = nullptr;
169
171 QStandardItemModel *mModelValues = nullptr;
172
173 QgsPointCloudLayer *mLayer = nullptr;
174 const QString mInitialText;
175};
176
178#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