QGIS API Documentation 3.41.0-Master (cea29feecf2)
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 <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
69 virtual void test();
70
74 void clear();
75
79 void saveQuery();
80
84 void loadQuery();
85
86 void lstAttributes_currentChanged( const QModelIndex &current, const QModelIndex &previous );
87 void lstAttributes_doubleClicked( const QModelIndex &index );
88 void lstValues_doubleClicked( const QModelIndex &index );
89 void btnEqual_clicked();
90 void btnLessThan_clicked();
91 void btnGreaterThan_clicked();
92 void btnIn_clicked();
93 void btnNotIn_clicked();
94 void btnLessEqual_clicked();
95 void btnGreaterEqual_clicked();
96 void btnNotEqual_clicked();
97 void btnAnd_clicked();
98 void btnOr_clicked();
99
100 private:
102 void populateAttributes();
103
105 void setupGuiViews();
106
107 // private members
109 QStandardItemModel *mModelAttributes = nullptr;
110
112 QStandardItemModel *mModelValues = nullptr;
113
115 QgsPointCloudLayer *mLayer = nullptr;
116
118 QString mOrigSubsetString;
119};
120#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