QGIS API Documentation 3.43.0-Master (3ee7834ace6)
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 <QStandardItemModel>
18#include <QStandardItem>
19#include <QModelIndex>
20#include "ui_qgspointcloudquerybuilderbase.h"
21#include "qgis_sip.h"
22#include "qgsguiutils.h"
23#include "qgis_gui.h"
25
27class QgsCodeEditor;
28
41class GUI_EXPORT QgsPointCloudQueryBuilder : public QgsSubsetStringEditorInterface, private Ui::QgsPointCloudQueryBuilderBase
42{
43 Q_OBJECT
44 public:
52 QgsPointCloudQueryBuilder( QgsPointCloudLayer *layer, QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
53
54 void showEvent( QShowEvent *event ) override;
55
56 QString subsetString() const override { return mTxtSql->text(); }
57 void setSubsetString( const QString &subsetString ) override { mTxtSql->setText( subsetString ); }
58
59
60 public slots:
61 void accept() override;
62 void reject() override;
63
64 private slots:
65
70 bool test( bool skipConfirmation = false );
71
75 void clear();
76
80 void saveQuery();
81
85 void loadQuery();
86
87 void lstAttributes_currentChanged( const QModelIndex &current, const QModelIndex &previous );
88 void lstAttributes_doubleClicked( const QModelIndex &index );
89 void lstValues_doubleClicked( const QModelIndex &index );
90 void btnEqual_clicked();
91 void btnLessThan_clicked();
92 void btnGreaterThan_clicked();
93 void btnIn_clicked();
94 void btnNotIn_clicked();
95 void btnLessEqual_clicked();
96 void btnGreaterEqual_clicked();
97 void btnNotEqual_clicked();
98 void btnAnd_clicked();
99 void btnOr_clicked();
100
101 private:
103 void populateAttributes();
104
106 void setupGuiViews();
107
108 // private members
110 QStandardItemModel *mModelAttributes = nullptr;
111
113 QStandardItemModel *mModelValues = nullptr;
114
116 QgsPointCloudLayer *mLayer = nullptr;
117
119 QString mOrigSubsetString;
120};
121#endif //QGSPOINTCLOUDQUERYBUILDER_H
A text editor based on QScintilla2.
Represents a map layer supporting display of point clouds.
QString subsetString() const override
Returns the subset string entered in the dialog.
void setSubsetString(const QString &subsetString) override
Sets a subset string into the dialog.
Interface for a dialog that can edit subset strings.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53