Logo
  • Main Page
  • Related Pages
  • Modules
  • Classes
  • Files

mmsplugindata.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005-2007 Stefan Schwarzer, Jens Schneider,             *
00003  *                           Matthias Hardt, Guido Madaus                  *
00004  *                                                                         *
00005  *   Copyright (C) 2007-2008 BerLinux Solutions GbR                        *
00006  *                           Stefan Schwarzer & Guido Madaus               *
00007  *                                                                         *
00008  *   Copyright (C) 2009-2013 BerLinux Solutions GmbH                       *
00009  *                                                                         *
00010  *   Authors:                                                              *
00011  *      Stefan Schwarzer   <stefan.schwarzer@diskohq.org>,                 *
00012  *      Matthias Hardt     <matthias.hardt@diskohq.org>,                   *
00013  *      Jens Schneider     <jens.schneider@diskohq.org>,                   *
00014  *      Guido Madaus       <guido.madaus@diskohq.org>,                     *
00015  *      Patrick Helterhoff <patrick.helterhoff@diskohq.org>,               *
00016  *      René Bählkow       <rene.baehlkow@diskohq.org>                     *
00017  *                                                                         *
00018  *   This library is free software; you can redistribute it and/or         *
00019  *   modify it under the terms of the GNU Lesser General Public            *
00020  *   License version 2.1 as published by the Free Software Foundation.     *
00021  *                                                                         *
00022  *   This library is distributed in the hope that it will be useful,       *
00023  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00024  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00025  *   Lesser General Public License for more details.                       *
00026  *                                                                         *
00027  *   You should have received a copy of the GNU Lesser General Public      *
00028  *   License along with this library; if not, write to the                 *
00029  *   Free Software Foundation, Inc.,                                       *
00030  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
00031  **************************************************************************/
00032 
00033 #include "mmsconfig/mmsplugindata.h"
00034 
00035 MMSPluginData::MMSPluginData() :
00036     id(-1),
00037     type(NULL),
00038     name(""),
00039     title(""),
00040     description(""),
00041     path(""),
00042     filename(""),
00043     active(false),
00044     icon(""),
00045     selectedicon(""),
00046     smallicon(""),
00047     smallselectedicon(""),
00048     importProperties(NULL),
00049     category(NULL),
00050     orderpos(-1),
00051     version("") {
00052 }
00053 
00054 MMSPluginData::MMSPluginData(const MMSPluginData &pd) :
00055     id(pd.id),
00056     type(pd.type),
00057     name(pd.name),
00058     title(pd.title),
00059     description(pd.description),
00060     path(pd.path),
00061     filename(pd.filename),
00062     active(pd.active),
00063     icon(pd.icon),
00064     selectedicon(pd.selectedicon),
00065     smallicon(pd.smallicon),
00066     smallselectedicon(pd.smallselectedicon),
00067     properties(pd.properties),
00068     importProperties(pd.importProperties),
00069     category(pd.category),
00070     orderpos(pd.orderpos),
00071     version(pd.version) {
00072 }
00073 
00074 MMSPluginData& MMSPluginData::operator=(const MMSPluginData &pd) {
00075     this->id                = pd.id;
00076     this->type              = pd.type;
00077     this->name              = pd.name;
00078     this->title             = pd.title;
00079     this->description       = pd.description;
00080     this->path              = pd.path;
00081     this->filename          = pd.filename;
00082     this->active            = pd.active;
00083     this->icon              = pd.icon;
00084     this->selectedicon      = pd.selectedicon;
00085     this->smallicon         = pd.smallicon;
00086     this->smallselectedicon = pd.smallselectedicon;
00087     this->properties        = pd.properties;
00088     this->importProperties  = pd.importProperties;
00089     this->category          = pd.category;
00090     this->orderpos          = pd.orderpos;
00091     this->version           = pd.version;
00092 
00093     return *this;
00094 }
00095 
00096 MMSPluginData::~MMSPluginData() {
00097     this->properties.clear();
00098 }
00099 
00100 void MMSPluginData::clear() {
00101     for(vector<MMSPropertyData *>::iterator it = this->properties.begin(); it != this->properties.end();it++) {
00102         if ((*it))
00103             delete (*it);
00104     }
00105     this->properties.clear();
00106 
00107     if (this->category)
00108         delete this->category;
00109     if (this->type)
00110         delete this->type;
00111 }
00112 
00113 int MMSPluginData::getId() {
00114     return this->id;
00115 }
00116 
00117 void MMSPluginData::setId(int id) {
00118     this->id = id;
00119 }
00120 
00121 MMSPluginTypeData *MMSPluginData::getType() {
00122     return this->type;
00123 }
00124 
00125 void MMSPluginData::setType(MMSPluginTypeData *type) {
00126     this->type = type;
00127 }
00128 
00129 string MMSPluginData::getName() {
00130     return this->name;
00131 }
00132 void MMSPluginData::setName(string name) {
00133     this->name = name;
00134 }
00135 
00136 string MMSPluginData::getTitle() {
00137     return this->title;
00138 }
00139 void MMSPluginData::setTitle(string title) {
00140     this->title = title;
00141 }
00142 
00143 string MMSPluginData::getDescription() {
00144     return this->description;
00145 }
00146 void MMSPluginData::setDescription(string description) {
00147     this->description = description;
00148 }
00149 
00150 string MMSPluginData::getPath() {
00151     return this->path;
00152 }
00153 void MMSPluginData::setPath(string path) {
00154     this->path = path;
00155 }
00156 
00157 string MMSPluginData::getFilename() {
00158     return this->filename;
00159 }
00160 
00161 void MMSPluginData::setFilename(string filename) {
00162     this->filename = filename;
00163 }
00164 
00165 bool MMSPluginData::getActive() {
00166     return this->active;
00167 }
00168 
00169 void MMSPluginData::setActive(bool active) {
00170     this->active = active;
00171 }
00172 
00173 string MMSPluginData::getIcon() {
00174     return this->icon;
00175 }
00176 
00177 void MMSPluginData::setIcon(string icon) {
00178     this->icon = icon;
00179 }
00180 
00181 string MMSPluginData::getSelectedIcon() {
00182     return this->selectedicon;
00183 }
00184 
00185 void MMSPluginData::setSelectedIcon(string icon) {
00186     this->selectedicon = icon;
00187 }
00188 
00189 string MMSPluginData::getSmallIcon() {
00190     return this->smallicon;
00191 }
00192 
00193 void MMSPluginData::setSmallIcon(string icon) {
00194     this->smallicon = icon;
00195 }
00196 
00197 string MMSPluginData::getSmallSelectedIcon() {
00198     return this->smallselectedicon;
00199 }
00200 
00201 void MMSPluginData::setSmallSelectedIcon(string icon) {
00202     this->smallselectedicon = icon;
00203 }
00204 
00205 vector<MMSPropertyData *>  MMSPluginData::getProperties() {
00206     return this->properties;
00207 }
00208 
00209 void MMSPluginData::setProperties(vector <MMSPropertyData *> props) {
00210     this->properties = props;
00211 }
00212 
00213 MMSImportPropertyData *MMSPluginData::getImportProperties() {
00214     return this->importProperties;
00215 }
00216 
00217 void MMSPluginData::setImportProperties(MMSImportPropertyData *props) {
00218     this->importProperties = props;
00219 }
00220 
00221 MMSPluginCategoryData *MMSPluginData::getCategory() {
00222     return this->category;
00223 }
00224 
00225 void MMSPluginData::setCategory(MMSPluginCategoryData *category){
00226     this->category = category;
00227 }
00228 
00229 
00230 MMSPropertyData*  MMSPluginData::getProperty(string name) {
00231 
00232     for(vector<MMSPropertyData*>::iterator it=properties.begin();it!=properties.end();it++) {
00233 
00234         if ((*it)->getParameter()==name)
00235             return (*it);
00236     }
00237     return NULL;
00238 }
00239 
00240 int MMSPluginData::getOrderpos() {
00241     return this->orderpos;
00242 }
00243 
00244 void MMSPluginData::setOrderpos(int orderpos) {
00245     this->orderpos = orderpos;
00246 }
00247 
00248 string MMSPluginData::getVersion() {
00249     return this->version;
00250 }
00251 
00252 void MMSPluginData::setVersion(string version) {
00253     this->version = version;
00254 }

Generated by doxygen