SilentEye 0.4.1
|
00001 // This file is part of SilentEye. 00002 // 00003 // SilentEye is free software: you can redistribute it and/or modify 00004 // it under the terms of the GNU General Public License as published by 00005 // the Free Software Foundation, either version 3 of the License, or 00006 // (at your option) any later version. 00007 // 00008 // SilentEye is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 // GNU General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU General Public License 00014 // along with SilentEye. If not, see <http://www.gnu.org/licenses/>. 00015 00016 #include "image.h" 00017 00018 namespace SilentEyeFramework { 00019 00020 Image::Image() 00021 : QPixmap(), Media() 00022 { 00023 m_type = IMAGE; 00024 setObjectName("Image"); 00025 } 00026 00027 Image::Image(const QString& filePath) 00028 : QPixmap(filePath), Media(filePath) 00029 { 00030 setObjectName("Image"); 00031 m_type = IMAGE; 00032 m_width = width(); 00033 m_height = height(); 00034 } 00035 00036 Image::Image(const QPixmap& pixmap, QString filePath) 00037 : QPixmap(pixmap), Media(filePath) 00038 { 00039 setObjectName("Image"); 00040 m_type = IMAGE; 00041 m_width = width(); 00042 m_height = height(); 00043 } 00044 00045 Image::Image(const Image& img) 00046 : QPixmap(img), Media(img) 00047 { 00048 m_type = IMAGE; 00049 m_width = img.imgWidth(); 00050 m_height = img.imgHeight(); 00051 setObjectName("Image"); 00052 } 00053 00054 Image::Image(Image* img) 00055 : Media(img) 00056 { 00057 m_type = IMAGE; 00058 setObjectName("Image"); 00059 m_width = img->imgWidth(); 00060 m_height = img->imgHeight(); 00061 } 00062 00063 Image::~Image() 00064 { 00065 // NOTHING TO DO 00066 } 00067 00068 int Image::imgWidth() const 00069 { 00070 return m_width; 00071 } 00072 00073 int Image::imgHeight() const 00074 { 00075 return m_height; 00076 } 00077 00078 int Image::quality() const 00079 { 00080 return m_quality; 00081 } 00082 }