Warning, file /education/khipu/src/spaceitem.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /************************************************************************************* 0002 * Copyright (C) 2010-2012 by Percy Camilo T. Aucahuasi <percy.camilo.ta@gmail.com> * 0003 * * 0004 * This program is free software; you can redistribute it and/or * 0005 * modify it under the terms of the GNU General Public License * 0006 * as published by the Free Software Foundation; either version 2 * 0007 * of the License, or (at your option) any later version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, * 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0012 * GNU General Public License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License * 0015 * along with this program; if not, write to the Free Software * 0016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 0017 *************************************************************************************/ 0018 0019 #ifndef DICTIONARYITEM_H 0020 #define DICTIONARYITEM_H 0021 0022 //Analitza includes 0023 #include <analitzaplot/plottingenums.h> 0024 0025 //Qt includes 0026 #include <QPixmap> 0027 #include <QUuid> 0028 #include <QDateTime> 0029 0030 static const int PreviewWidth = 200; 0031 static const int PreviewHeight = 200; 0032 0033 class SpacesModel; 0034 0035 class SpaceItem 0036 { 0037 friend class SpacesModel; 0038 public: 0039 explicit SpaceItem(Analitza::Dimension dimension); 0040 virtual ~SpaceItem(); 0041 0042 QUuid id() const { return m_id; } 0043 0044 //space's dimension 0045 Analitza::Dimension dimension() const { return m_dimension; } 0046 0047 //space's name 0048 QString name() const { return m_name; } 0049 void setName(const QString &name); 0050 0051 //space's description 0052 QString description() const { return m_description; } 0053 void setDescription(const QString &description); 0054 0055 //space's thumbnail 0056 QPixmap thumbnail() const { return m_thumbnail; } 0057 void setThumbnail(const QPixmap &thumbnail); 0058 0059 QDateTime timestamp() const { return m_dateTime; } 0060 ///marks current time stamp 0061 void stamp(); 0062 0063 private: 0064 SpaceItem() {} 0065 SpaceItem(const SpaceItem &other); 0066 0067 void setModel(SpacesModel *m); 0068 0069 void emitDataChanged(); 0070 0071 Analitza::Dimension m_dimension; 0072 QPixmap m_thumbnail; 0073 QDateTime m_dateTime; 0074 0075 QString m_name; 0076 QString m_description; 0077 0078 SpacesModel *m_model; 0079 bool m_inDestructorSoDontDeleteMe; 0080 bool m_callingCtrFromMode; // true en ctor y false en setmodel 0081 0082 //persistence 0083 QUuid m_id; 0084 }; 0085 0086 #endif 0087