QGIS API Documentation
3.41.0-Master (3440c17df1d)
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 "moc_qgsrasterattributetabledialog.cpp"
18
#include "
qgsrasterlayer.h
"
19
20
21
QgsRasterAttributeTableDialog::QgsRasterAttributeTableDialog
(
QgsRasterLayer
*rasterLayer,
int
bandNumber, QWidget *parent )
22
: QDialog( parent )
23
{
24
Q_ASSERT( rasterLayer );
25
setupUi(
this
);
26
mRatWidget->setRasterLayer( rasterLayer, bandNumber );
27
setWindowTitle( tr(
"Raster Attribute Table for %1"
).arg( rasterLayer->
name
() ) );
28
29
connect( rasterLayer, &
QgsRasterLayer::dataSourceChanged
,
this
, &
QgsRasterAttributeTableDialog::reject
);
30
connect( rasterLayer, &
QgsRasterLayer::willBeDeleted
,
this
, &
QgsRasterAttributeTableDialog::reject
);
31
32
}
33
34
void
QgsRasterAttributeTableDialog::reject
()
35
{
36
if
( mRatWidget->setEditable(
false
) )
37
{
38
QDialog::reject();
39
}
40
}
QgsMapLayer::name
QString name
Definition
qgsmaplayer.h:80
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:21
QgsRasterAttributeTableDialog::reject
void reject() override
Definition
qgsrasterattributetabledialog.cpp:34
QgsRasterLayer
Represents a raster layer.
Definition
qgsrasterlayer.h:78
qgsrasterattributetabledialog.h
qgsrasterlayer.h
Generated on Sat Nov 23 2024 09:26:05 for QGIS API Documentation by
1.9.8