Skip to content
Permalink
Browse files

Resolved using signed/unsigned value for map layer transparency

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5145 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Apr 3, 2006
1 parent 6800c21 commit caa3301b80a83644d6841bdbcc29a6ce85c812c6
@@ -304,7 +304,7 @@ class QgsMapLayer : public QObject

public slots:
/** \brief Mutator for transparency level. Should be between 0 and 255 */
virtual void setTransparency(int)=0; //
virtual void setTransparency(unsigned int)=0;
//! event handler for when a coordinate transofrm fails due to bad vertex error
virtual void invalidTransformInput();

@@ -3448,12 +3448,15 @@ inline void QgsVectorLayer::transformPoints(
// position on map canvas
mtp->transformInPlace(x, y);
}

unsigned int QgsVectorLayer::getTransparency()
{
return transparencyLevelInt;
}

//should be between 0 and 255
void QgsVectorLayer::setTransparency(int theInt)
void QgsVectorLayer::setTransparency(unsigned int theInt)
{
transparencyLevelInt=theInt;
} // QgsRasterLayer::setTransparency(int theInt)
} // QgsRasterLayer::setTransparency(unsigned int theInt)

@@ -172,7 +172,7 @@ const QString displayField() const { return fieldIndex; }
public slots:

/** \brief Mutator for transparency level. Should be between 0 and 255 */
void setTransparency(int); //
void setTransparency(unsigned int);

void inOverview( bool );

@@ -3822,7 +3822,7 @@ void QgsRasterLayer::popupTransparencySliderMoved(int theInt)


//should be between 0 and 255
void QgsRasterLayer::setTransparency(int theInt)
void QgsRasterLayer::setTransparency(unsigned int theInt)
{
#ifdef QGISDEBUG
std::cout << "Set transparency called with : " << theInt << std::endl;
@@ -3834,7 +3834,7 @@ void QgsRasterLayer::setTransparency(int theInt)
mTransparencySlider->setValue(255-theInt);
}
transparencyLevelInt=theInt;
} // QgsRasterLayer::setTransparency(int theInt)
} // QgsRasterLayer::setTransparency(unsigned int theInt)



@@ -799,7 +799,7 @@ class QgsRasterLayer : public QgsMapLayer

public slots:
/** \brief Mutator for transparency level. Should be between 0 and 255 */
void setTransparency(int); //
void setTransparency(unsigned int);
/**
* Convert this raster to another format
*/

0 comments on commit caa3301

Please sign in to comment.
You can’t perform that action at this time.