QGIS API Documentation 3.43.0-Master (c67cf405802)
qgscreaterasterattributetabledialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgscreaterasterattributetabledialog.h - QgsCreateRasterAttributeTableDialog
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#ifndef QGSCREATERASTERATTRIBUTETABLEDIALOG_H
17#define QGSCREATERASTERATTRIBUTETABLEDIALOG_H
18
19#include "qgis_gui.h"
20#include "qgis.h"
21#include "ui_qgscreaterasterattributetabledialogbase.h"
22#include <QDialog>
23
24#define SIP_NO_FILE
25
26class QgsRasterLayer;
27class QgsMessageBar;
28
29
39class GUI_EXPORT QgsCreateRasterAttributeTableDialog : public QDialog, private Ui::QgsCreateRasterAttributeTableDialogBase
40{
41 Q_OBJECT
42 public:
48 QgsCreateRasterAttributeTableDialog( QgsRasterLayer *rasterLayer, QWidget *parent = nullptr );
49
53 QString filePath() const;
54
58 bool saveToFile() const;
59
63 bool openWhenDone() const;
64
69 void setMessageBar( QgsMessageBar *bar );
70
74 void setOpenWhenDoneVisible( bool visible );
75
76 // QDialog interface
77 public slots:
78
79 void accept() override;
80
81 private slots:
82
83 void updateButtons();
84
85 void notify( const QString &title, const QString &message, Qgis::MessageLevel level = Qgis::MessageLevel::Info );
86
87 private:
88 QgsRasterLayer *mRasterLayer = nullptr;
89 QgsMessageBar *mMessageBar = nullptr;
90};
91
92#endif // QGSCREATERASTERATTRIBUTETABLEDIALOG_H
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition qgis.h:154
@ Info
Information message.
Definition qgis.h:155
A dialog which collects the information required to create a new raster attribute table.
A bar for displaying non-blocking messages to the user.
Represents a raster layer.