QGIS API Documentation 3.41.0-Master (45a0abf3bec)
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:
45
53 QgsPointCloudQueryBuilder( QgsPointCloudLayer *layer, QWidget *parent SIP_TRANSFERTHIS = nullptr,
54 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
71 virtual void test();
72
76 void clear();
77
81 void saveQuery();
82
86 void loadQuery();
87
88 void lstAttributes_currentChanged( const QModelIndex &current, const QModelIndex &previous );
89 void lstAttributes_doubleClicked( const QModelIndex &index );
90 void lstValues_doubleClicked( const QModelIndex &index );
91 void btnEqual_clicked();
92 void btnLessThan_clicked();
93 void btnGreaterThan_clicked();
94 void btnIn_clicked();
95 void btnNotIn_clicked();
96 void btnLessEqual_clicked();
97 void btnGreaterEqual_clicked();
98 void btnNotEqual_clicked();
99 void btnAnd_clicked();
100 void btnOr_clicked();
101
102 private:
103
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.
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