| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/qt/TeDecoderQtImage.h
Go to the documentation of this file.

    00001 /************************************************************************************
    00002 TerraLib - a library for developing GIS applications.
    00003 Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
    00004
    00005 This code is part of the TerraLib library.
    00006 This library is free software; you can redistribute it and/or
    00007 modify it under the terms of the GNU Lesser General Public
    00008 License as published by the Free Software Foundation; either
    00009 version 2.1 of the License, or (at your option) any later version.
    00010
    00011 You should have received a copy of the GNU Lesser General Public
    00012 License along with this library.
    00013
    00014 The authors reassure the license terms regarding the warranties.
    00015 They specifically disclaim any warranties, including, but not limited to,
    00016 the implied warranties of merchantability and fitness for a particular purpose.
    00017 The library provided hereunder is on an "as is" basis, and the authors have no
    00018 obligation to provide maintenance, support, updates, enhancements, or modifications.
    00019 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
    00020 indirect, special, incidental, or consequential damages arising out of the use
    00021 of this library and its documentation.
    00022 *************************************************************************************/
    00026 #ifndef __TERRALIB_INTERNAL_DECODERQTIMAGE_H
    00027 #define __TERRALIB_INTERNAL_DECODERQTIMAGE_H
    00028
    00029 #include "../../kernel/TeDecoder.h"
    00030 #include <qimage.h>
    00031
    00032 #include "../../kernel/TeDefines.h"
    00033
    00035 class TL_DLL TeDecoderQtImage : public TeDecoder
    00036 {
    00037 public:
    00038            TeDecoderQtImage ( const TeRasterParams& );
    00039            ~TeDecoderQtImage ();
    00040
    00041            bool setElement (int col, int lin, double val, int band = 0);
    00042            bool getElement (int col, int lin, double &val, int band = 0);
    00043
    00044            void init  ();
    00045            bool clear ();
    00046            QImage*    getImage () { return image_; }
    00047
    00048            bool setElementRGB(int col, int lin, double Rval, double Gval, double Bval, unsigned int /*transp*/ = 255);
    00049
    00050            bool setAlphaBufferToTransparent();
    00051
    00052            void setTransparency(int t)
    00053            { transp_ = t; }
    00054
    00055            unsigned int getTransparency()
    00056            {          return transp_; }
    00057
    00058 private:
    00059
    00060            QImage*    image_;
    00061            unsigned int transp_;
    00062 };
    00063
    00065 class TL_DLL TeDecoderQtImageFactory : public TeDecoderFactory
    00066 {
    00067 public:
    00068
    00069            TeDecoderQtImageFactory(const string& name) : TeDecoderFactory(name) {}
    00070
    00071            virtual TeDecoder* build (const TeRasterParams& arg)
    00072            {  return new TeDecoderQtImage(arg); }
    00073 };
    00074
    00075 #endif
    00076

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines