QGIS API Documentation 3.99.0-Master (752b475928d)
Loading...
Searching...
No Matches
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 "ui_qgscreaterasterattributetabledialogbase.h"
20
21#include "qgis.h"
22#include "qgis_gui.h"
23
24#include <QDialog>
25
26#define SIP_NO_FILE
27
28class QgsRasterLayer;
29class QgsMessageBar;
30
31
41class GUI_EXPORT QgsCreateRasterAttributeTableDialog : public QDialog, private Ui::QgsCreateRasterAttributeTableDialogBase
42{
43 Q_OBJECT
44 public:
50 QgsCreateRasterAttributeTableDialog( QgsRasterLayer *rasterLayer, QWidget *parent = nullptr );
51
55 QString filePath() const;
56
60 bool saveToFile() const;
61
65 bool openWhenDone() const;
66
71 void setMessageBar( QgsMessageBar *bar );
72
76 void setOpenWhenDoneVisible( bool visible );
77
78 // QDialog interface
79 public slots:
80
81 void accept() override;
82
83 private slots:
84
85 void updateButtons();
86
87 void notify( const QString &title, const QString &message, Qgis::MessageLevel level = Qgis::MessageLevel::Info );
88
89 private:
90 QgsRasterLayer *mRasterLayer = nullptr;
91 QgsMessageBar *mMessageBar = nullptr;
92};
93
94#endif // QGSCREATERASTERATTRIBUTETABLEDIALOG_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
QgsCreateRasterAttributeTableDialog(QgsRasterLayer *rasterLayer, QWidget *parent=nullptr)
Creates a new QgsCreateRasterAttributeTableDialog.
void setOpenWhenDoneVisible(bool visible)
Sets the visibility of the "Open newly created raster attribute table" option to visible,...
QString filePath() const
Returns the file path in case of VAT.DBF save option.
void setMessageBar(QgsMessageBar *bar)
Sets the message bar associated with the widget.
bool openWhenDone() const
Returns true if the option to open the newly created attribute table is checked.
bool saveToFile() const
Returns true if the option to save to a file is selected.
A bar for displaying non-blocking messages to the user.
Represents a raster layer.