QGIS API Documentation
3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
src
gui
raster
qgsrasterattributetabledialog.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsrasterattributetabledialog.cpp - QgsRasterAttributeTableDialog
3
4
---------------------
5
begin : 13.10.2022
6
copyright : (C) 2022 by Alessandro Pasotti
7
email : elpaso at itopen dot it
8
***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
#include "
qgsrasterattributetabledialog.h
"
17
#include "
qgsrasterlayer.h
"
18
19
20
QgsRasterAttributeTableDialog::QgsRasterAttributeTableDialog
(
QgsRasterLayer
*rasterLayer,
int
bandNumber, QWidget *parent )
21
: QDialog( parent )
22
{
23
Q_ASSERT( rasterLayer );
24
setupUi(
this
);
25
mRatWidget->setRasterLayer( rasterLayer, bandNumber );
26
setWindowTitle( tr(
"Raster Attribute Table for %1"
).arg( rasterLayer->
name
() ) );
27
28
connect( rasterLayer, &
QgsRasterLayer::dataSourceChanged
,
this
, &
QgsRasterAttributeTableDialog::reject
);
29
connect( rasterLayer, &
QgsRasterLayer::willBeDeleted
,
this
, &
QgsRasterAttributeTableDialog::reject
);
30
31
}
32
33
void
QgsRasterAttributeTableDialog::reject
()
34
{
35
if
( mRatWidget->setEditable(
false
) )
36
{
37
QDialog::reject();
38
}
39
}
QgsMapLayer::name
QString name
Definition
qgsmaplayer.h:79
QgsMapLayer::dataSourceChanged
void dataSourceChanged()
Emitted whenever the layer's data source has been changed.
QgsMapLayer::willBeDeleted
void willBeDeleted()
Emitted in the destructor when the layer is about to be deleted, but it is still in a perfectly valid...
QgsRasterAttributeTableDialog::QgsRasterAttributeTableDialog
QgsRasterAttributeTableDialog(QgsRasterLayer *rasterLayer, int bandNumber=0, QWidget *parent SIP_TRANSFERTHIS=nullptr)
Create a new QgsRasterAttributeTableDialog.
Definition
qgsrasterattributetabledialog.cpp:20
QgsRasterAttributeTableDialog::reject
void reject() override
Definition
qgsrasterattributetabledialog.cpp:33
QgsRasterLayer
Represents a raster layer.
Definition
qgsrasterlayer.h:78
qgsrasterattributetabledialog.h
qgsrasterlayer.h
Generated on Thu Jun 27 2024 20:32:17 for QGIS API Documentation by
1.9.8