Skip to content

Commit 899596b

Browse files
author
ersts
committed
-Removed strange triplicate defs in .h file
-Moved loadDefaultStyle() to prevent crash when loading qml git-svn-id: http://svn.osgeo.org/qgis/trunk@8051 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent e4e86b8 commit 899596b

11 files changed

+5
-1193
lines changed

src/core/raster/qgscliptominmaxenhancement.h

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -31,69 +31,3 @@ class CORE_EXPORT QgsClipToMinMaxEnhancement : public QgsContrastEnhancementFunc
3131
};
3232

3333
#endif
34-
/* **************************************************************************
35-
qgscliptominmaxenhancement.h - description
36-
-------------------
37-
begin : Fri Nov 16 2007
38-
copyright : (C) 2007 by Peter J. Ersts
39-
email : ersts@amnh.org
40-
41-
****************************************************************************/
42-
43-
/* **************************************************************************
44-
* *
45-
* This program is free software; you can redistribute it and/or modify *
46-
* it under the terms of the GNU General Public License as published by *
47-
* the Free Software Foundation; either version 2 of the License, or *
48-
* (at your option) any later version. *
49-
* *
50-
***************************************************************************/
51-
52-
#ifndef QGSCLIPTOMINMAXENHANCEMENT_H
53-
#define QGSCLIPTOMINMAXENHANCEMENT_H
54-
55-
#include "qgscontrastenhancementfunction.h"
56-
57-
class CORE_EXPORT QgsClipToMinMaxEnhancement : public QgsContrastEnhancementFunction
58-
{
59-
60-
public:
61-
QgsClipToMinMaxEnhancement(QgsContrastEnhancement::QgsRasterDataType, double, double);
62-
int enhanceValue(double);
63-
bool isValueInDisplayableRange(double);
64-
};
65-
66-
#endif
67-
/* **************************************************************************
68-
qgscliptominmaxenhancement.h - description
69-
-------------------
70-
begin : Fri Nov 16 2007
71-
copyright : (C) 2007 by Peter J. Ersts
72-
email : ersts@amnh.org
73-
74-
****************************************************************************/
75-
76-
/* **************************************************************************
77-
* *
78-
* This program is free software; you can redistribute it and/or modify *
79-
* it under the terms of the GNU General Public License as published by *
80-
* the Free Software Foundation; either version 2 of the License, or *
81-
* (at your option) any later version. *
82-
* *
83-
***************************************************************************/
84-
85-
#ifndef QGSCLIPTOMINMAXENHANCEMENT_H
86-
#define QGSCLIPTOMINMAXENHANCEMENT_H
87-
88-
#include "qgscontrastenhancementfunction.h"
89-
90-
class CORE_EXPORT QgsClipToMinMaxEnhancement : public QgsContrastEnhancementFunction
91-
{
92-
93-
public:
94-
QgsClipToMinMaxEnhancement(QgsContrastEnhancement::QgsRasterDataType, double, double);
95-
int enhanceValue(double);
96-
bool isValueInDisplayableRange(double);
97-
};
98-
99-
#endif

src/core/raster/qgscolorrampshader.h

Lines changed: 0 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -68,162 +68,6 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction {
6868

6969

7070

71-
private:
72-
/**Gets the color for a pixel value from the classification vector mValueClassification. Assigns the color of the lower class for every pixel between two class breaks.*/
73-
bool getDiscreteColor(double, int*, int*, int*);
74-
/**Gets the color for a pixel value from the classification vector mValueClassification. Interpolates the color between two class breaks linearly.*/
75-
bool getInterpolatedColor(double, int*, int*, int*);
76-
77-
/**This vector holds the information for classification based on values. Each item holds a value, a label and a color. The member mDiscreteClassification holds if one color is applied for all values between two class breaks (true) or if the item values are (linearly) interpolated for values between the item values (false)*/
78-
QList<QgsColorRampShader::ColorRampItem> mColorRampItemList;
79-
80-
QgsColorRampShader::COLOR_RAMP_TYPE mColorRampType;
81-
};
82-
83-
#endif
84-
/* **************************************************************************
85-
qgscolorrampshader.h - description
86-
-------------------
87-
begin : Fri Dec 28 2007
88-
copyright : (C) 2007 by Peter J. Ersts
89-
email : ersts@amnh.org
90-
91-
This class is based off of code that was originally written by Marco Hugentobler and
92-
originally part of the larger QgsRasterLayer class
93-
****************************************************************************/
94-
95-
/* **************************************************************************
96-
* *
97-
* This program is free software; you can redistribute it and/or modify *
98-
* it under the terms of the GNU General Public License as published by *
99-
* the Free Software Foundation; either version 2 of the License, or *
100-
* (at your option) any later version. *
101-
* *
102-
***************************************************************************/
103-
104-
#ifndef QGSCOLORRAMPSHADER_H
105-
#define QGSCOLORRAMPSHADER_H
106-
107-
#include <QColor>
108-
109-
#include "qgsrastershaderfunction.h"
110-
111-
class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction {
112-
113-
public:
114-
QgsColorRampShader(double theMinimumValue=0.0, double theMaximumValue=255.0);
115-
116-
//An entry for classification based upon value.
117-
//Such a classification is typically used for
118-
//single band layers where a pixel value represents
119-
//not a color but a quantity, e.g. temperature or elevation
120-
struct ColorRampItem
121-
{
122-
QString label;
123-
double value;
124-
QColor color;
125-
};
126-
127-
enum COLOR_RAMP_TYPE {
128-
INTERPOLATED,
129-
DISCRETE
130-
};
131-
132-
bool generateShadedValue(double, int*, int*, int*);
133-
bool generateShadedValue(double, double, double, int*, int*, int*);
134-
135-
/** Get the custom colormap*/
136-
QList<QgsColorRampShader::ColorRampItem> getColorRampItemList() const {return mColorRampItemList;}
137-
138-
/**Get the color ramp type */
139-
QgsColorRampShader::COLOR_RAMP_TYPE getColorRampType() {return mColorRampType;}
140-
141-
/**Set custom colormap */
142-
void setColorRampItemList(const QList<QgsColorRampShader::ColorRampItem>& theList) { mColorRampItemList = theList; }
143-
144-
/**Set discrete/interpolated colors for custom classification*/
145-
void setColorRampType(QgsColorRampShader::COLOR_RAMP_TYPE theColorRampType) {mColorRampType = theColorRampType;}
146-
147-
148-
149-
private:
150-
/**Gets the color for a pixel value from the classification vector mValueClassification. Assigns the color of the lower class for every pixel between two class breaks.*/
151-
bool getDiscreteColor(double, int*, int*, int*);
152-
/**Gets the color for a pixel value from the classification vector mValueClassification. Interpolates the color between two class breaks linearly.*/
153-
bool getInterpolatedColor(double, int*, int*, int*);
154-
155-
/**This vector holds the information for classification based on values. Each item holds a value, a label and a color. The member mDiscreteClassification holds if one color is applied for all values between two class breaks (true) or if the item values are (linearly) interpolated for values between the item values (false)*/
156-
QList<QgsColorRampShader::ColorRampItem> mColorRampItemList;
157-
158-
QgsColorRampShader::COLOR_RAMP_TYPE mColorRampType;
159-
};
160-
161-
#endif
162-
/* **************************************************************************
163-
qgscolorrampshader.h - description
164-
-------------------
165-
begin : Fri Dec 28 2007
166-
copyright : (C) 2007 by Peter J. Ersts
167-
email : ersts@amnh.org
168-
169-
This class is based off of code that was originally written by Marco Hugentobler and
170-
originally part of the larger QgsRasterLayer class
171-
****************************************************************************/
172-
173-
/* **************************************************************************
174-
* *
175-
* This program is free software; you can redistribute it and/or modify *
176-
* it under the terms of the GNU General Public License as published by *
177-
* the Free Software Foundation; either version 2 of the License, or *
178-
* (at your option) any later version. *
179-
* *
180-
***************************************************************************/
181-
182-
#ifndef QGSCOLORRAMPSHADER_H
183-
#define QGSCOLORRAMPSHADER_H
184-
185-
#include <QColor>
186-
187-
#include "qgsrastershaderfunction.h"
188-
189-
class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction {
190-
191-
public:
192-
QgsColorRampShader(double theMinimumValue=0.0, double theMaximumValue=255.0);
193-
194-
//An entry for classification based upon value.
195-
//Such a classification is typically used for
196-
//single band layers where a pixel value represents
197-
//not a color but a quantity, e.g. temperature or elevation
198-
struct ColorRampItem
199-
{
200-
QString label;
201-
double value;
202-
QColor color;
203-
};
204-
205-
enum COLOR_RAMP_TYPE {
206-
INTERPOLATED,
207-
DISCRETE
208-
};
209-
210-
bool generateShadedValue(double, int*, int*, int*);
211-
bool generateShadedValue(double, double, double, int*, int*, int*);
212-
213-
/** Get the custom colormap*/
214-
QList<QgsColorRampShader::ColorRampItem> getColorRampItemList() const {return mColorRampItemList;}
215-
216-
/**Get the color ramp type */
217-
QgsColorRampShader::COLOR_RAMP_TYPE getColorRampType() {return mColorRampType;}
218-
219-
/**Set custom colormap */
220-
void setColorRampItemList(const QList<QgsColorRampShader::ColorRampItem>& theList) { mColorRampItemList = theList; }
221-
222-
/**Set discrete/interpolated colors for custom classification*/
223-
void setColorRampType(QgsColorRampShader::COLOR_RAMP_TYPE theColorRampType) {mColorRampType = theColorRampType;}
224-
225-
226-
22771
private:
22872
/**Gets the color for a pixel value from the classification vector mValueClassification. Assigns the color of the lower class for every pixel between two class breaks.*/
22973
bool getDiscreteColor(double, int*, int*, int*);

0 commit comments

Comments
 (0)