QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgspointcloudquerybuilder.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspointcloudquerybuilder.h - Query builder for point cloud layers
3 ---------------------------
4 begin : March 2022
5 copyright : (C) 2022 by Stefanos Natsis
6 email : uclaros 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#ifndef QGSPOINTCLOUDQUERYBUILDER_H
16#define QGSPOINTCLOUDQUERYBUILDER_H
17#include "ui_qgspointcloudquerybuilderbase.h"
18
19#include "qgis_gui.h"
20#include "qgis_sip.h"
21#include "qgsguiutils.h"
23
24#include <QModelIndex>
25#include <QStandardItem>
26#include <QStandardItemModel>
27
29class QgsCodeEditor;
30
43class GUI_EXPORT QgsPointCloudQueryBuilder : public QgsSubsetStringEditorInterface, private Ui::QgsPointCloudQueryBuilderBase
44{
45 Q_OBJECT
46 public:
54 QgsPointCloudQueryBuilder( QgsPointCloudLayer *layer, QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
55
56 void showEvent( QShowEvent *event ) override;
57
58 QString subsetString() const override { return mTxtSql->text(); }
59 void setSubsetString( const QString &subsetString ) override { mTxtSql->setText( subsetString ); }
60
61
62 public slots:
63 void accept() override;
64 void reject() override;
65
66 private slots:
67
72 bool test( bool skipConfirmation = false );
73
77 void clear();
78
82 void saveQuery();
83
87 void loadQuery();
88
89 void lstAttributes_currentChanged( const QModelIndex &current, const QModelIndex &previous );
90 void lstAttributes_doubleClicked( const QModelIndex &index );
91 void lstValues_doubleClicked( const QModelIndex &index );
92 void btnEqual_clicked();
93 void btnLessThan_clicked();
94 void btnGreaterThan_clicked();
95 void btnIn_clicked();
96 void btnNotIn_clicked();
97 void btnLessEqual_clicked();
98 void btnGreaterEqual_clicked();
99 void btnNotEqual_clicked();
100 void btnAnd_clicked();
101 void btnOr_clicked();
102
103 private:
105 void populateAttributes();
106
108 void setupGuiViews();
109
110 // private members
112 QStandardItemModel *mModelAttributes = nullptr;
113
115 QStandardItemModel *mModelValues = nullptr;
116
118 QgsPointCloudLayer *mLayer = nullptr;
119
121 QString mOrigSubsetString;
122};
123#endif //QGSPOINTCLOUDQUERYBUILDER_H
A text editor based on QScintilla2.
Represents a map layer supporting display of point clouds.
QgsPointCloudQueryBuilder(QgsPointCloudLayer *layer, QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
This constructor is used when the query builder is called from the layer properties dialog.
QString subsetString() const override
Returns the subset string entered in the dialog.
void showEvent(QShowEvent *event) override
void setSubsetString(const QString &subsetString) override
Sets a subset string into the dialog.
QgsSubsetStringEditorInterface(QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
Constructor.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53