QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsloadrasterattributetabledialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsloadrasterattributetabledialog.h - QgsLoadRasterAttributeTableDialog
3
4 ---------------------
5 begin : 21.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#ifndef QGSLOADRASTERATTRIBUTETABLEDIALOG_H
17#define QGSLOADRASTERATTRIBUTETABLEDIALOG_H
18
19
20#include "ui_qgsloadrasterattributetabledialogbase.h"
21
22#include "qgis.h"
23#include "qgis_gui.h"
24
25#include <QDialog>
26
27#define SIP_NO_FILE
28
29class QgsRasterLayer;
30class QgsMessageBar;
31
32
41class GUI_EXPORT QgsLoadRasterAttributeTableDialog : public QDialog, private Ui::QgsLoadRasterAttributeTableDialogBase
42{
43 Q_OBJECT
44
45 public:
51 QgsLoadRasterAttributeTableDialog( QgsRasterLayer *rasterLayer, QWidget *parent = nullptr );
52
57 void setMessageBar( QgsMessageBar *bar );
58
62 void setOpenWhenDoneVisible( bool visible );
63
67 bool openWhenDone() const;
68
72 int rasterBand();
73
77 QString filePath() const;
78
79 // QDialog interface
80 public slots:
81
82 void accept() override;
83
84 private slots:
85
86 void updateButtons();
87
88 void notify( const QString &title, const QString &message, Qgis::MessageLevel level = Qgis::MessageLevel::Info );
89
90 private:
91 QgsRasterLayer *mRasterLayer = nullptr;
92 QgsMessageBar *mMessageBar = nullptr;
93};
94
95#endif // QGSLOADRASTERATTRIBUTETABLEDIALOG_H
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition qgis.h:156
@ Info
Information message.
Definition qgis.h:157
bool openWhenDone() const
Returns true if the option to open the newly created attribute table is checked.
int rasterBand()
Returns the raster band associated to the raster attribute table.
QgsLoadRasterAttributeTableDialog(QgsRasterLayer *rasterLayer, QWidget *parent=nullptr)
Creates a new QgsCreateRasterAttributeTableDialog.
QString filePath() const
Returns the file path to VAT.DBF.
void setMessageBar(QgsMessageBar *bar)
Sets the message bar associated with the widget.
void setOpenWhenDoneVisible(bool visible)
Sets the visibility of the "Open newly created raster attribute table" option to visible,...
A bar for displaying non-blocking messages to the user.
Represents a raster layer.