Skip to content

Commit

Permalink
qt6 and fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and nyalldawson committed Nov 8, 2022
1 parent 31a5d63 commit 65c3472
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/core/raster/qgspalettedrasterrenderer.cpp
Expand Up @@ -457,7 +457,7 @@ QgsPalettedRasterRenderer::MultiValueClassData QgsPalettedRasterRenderer::raster
classData.push_back( { minMaxClass.minMaxValues, minMaxClass.color, minMaxClass.name } );
}

int numClasses { classData.count( ) };
int numClasses { static_cast<int>( classData.count( ) ) };

// assign colors from ramp
if ( ramp && numClasses > 0 )
Expand Down
4 changes: 2 additions & 2 deletions src/gui/raster/qgsrasterattributetableaddcolumndialog.cpp
Expand Up @@ -169,7 +169,7 @@ void QgsRasterAttributeTableAddColumnDialog::updateDialog()
mUsage->addItem( QgsRasterAttributeTable::usageName( it.key() ), static_cast<int>( it.key() ) );
}
}
mUsage->setCurrentIndex( std::clamp( currentUsageIndex, 0, mUsage->count() - 1 ) );
mUsage->setCurrentIndex( std::clamp( currentUsageIndex, 0, static_cast<int>( mUsage->count() - 1 ) ) );

const QList<QgsRasterAttributeTable::Field> fields { mAttributeTable->fields() };

Expand All @@ -185,7 +185,7 @@ void QgsRasterAttributeTableAddColumnDialog::updateDialog()
{
mColumn->addItem( field.name );
}
mColumn->setCurrentIndex( std::clamp( currentIndex, 0, fields.count( ) - 1 ) );
mColumn->setCurrentIndex( std::clamp( currentIndex, 0, static_cast<int>( fields.count( ) - 1 ) ) );

if ( ! isValid )
{
Expand Down
4 changes: 2 additions & 2 deletions src/gui/raster/qgsrasterattributetablemodel.h
Expand Up @@ -16,7 +16,7 @@
#ifndef QGSRASTERATTRIBUTETABLEMODEL_H
#define QGSRASTERATTRIBUTETABLEMODEL_H

#include "qgis_core.h"
#include "qgis_gui.h"
#include "qgsrasterattributetable.h"
#include "qgis_sip.h"

Expand All @@ -28,7 +28,7 @@
* \brief The QgsRasterAttributeTableModel class manages a QgsRasterAttributeTable
* \since QGIS 3.30
*/
class CORE_EXPORT QgsRasterAttributeTableModel : public QAbstractTableModel
class GUI_EXPORT QgsRasterAttributeTableModel : public QAbstractTableModel
{
Q_OBJECT

Expand Down
8 changes: 4 additions & 4 deletions src/gui/raster/qgsrasterattributetablewidget.h
Expand Up @@ -87,6 +87,8 @@ class ColorRampDelegate: public QStyledItemDelegate
class ColorRampAlphaDelegate: public ColorRampDelegate
{

Q_OBJECT

public:

ColorRampAlphaDelegate( QObject *parent = nullptr ): ColorRampDelegate( parent ) {};
Expand All @@ -105,6 +107,7 @@ class ColorRampAlphaDelegate: public ColorRampDelegate
class GUI_EXPORT QgsRasterAttributeTableWidget : public QWidget, private Ui::QgsRasterAttributeTableWidgetBase
{
Q_OBJECT

public:

/**
Expand Down Expand Up @@ -154,8 +157,7 @@ class GUI_EXPORT QgsRasterAttributeTableWidget : public QWidget, private Ui::Qgs
*/
bool setEditable( bool editable, bool allowCancel = true );

private slots:

private:

void classify();
void addColumn();
Expand All @@ -166,8 +168,6 @@ class GUI_EXPORT QgsRasterAttributeTableWidget : public QWidget, private Ui::Qgs
void notify( const QString &title, const QString &message, Qgis::MessageLevel level = Qgis::MessageLevel::Info );
void setDelegates( );

private:

QgsRasterLayer *mRasterLayer = nullptr;
std::unique_ptr<QgsRasterAttributeTable> mAttributeTableBuffer;
// Default to invalid (bands are 1-indexed)
Expand Down

0 comments on commit 65c3472

Please sign in to comment.