textnodecontent.h

00001 /*
00002  * Silence
00003  *
00004  * Copyright (C) 2009 Manuel Unglaub
00005  *
00006  * This file is part of Silence.
00007  *
00008  * Silence is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, version GPLv2 only of the License.
00011  *
00012  * Silence is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016 
00017  * You should have received a copy of the GNU General Public License
00018  * along with Silence.  If not, see <http://www.gnu.org/licenses/>.
00019  */
00020 
00021 #ifndef TEXTNODECONTENT_H
00022 #define TEXTNODECONTENT_H
00023 
00024 #include "src/data/node/abstractnodecontent.h"
00025 
00026 
00034 class TextNodeContent : public AbstractNodeContent
00035 {
00036     Q_OBJECT
00037 
00038     public:
00043         TextNodeContent();
00044 
00049         ~TextNodeContent();
00050 
00056         void setText(QString text);
00057 
00063         QString getText() const;
00064 
00065         QDomElement getXmlData(QDomDocument &doc);
00066         void setXmlData(QDomElement &xmlNode);
00067         
00068         AbstractContentView* getWidget();
00069         QHash<QString, QString>* getMetaInfos();
00070         void addMetaInfo(QString key, QString value);
00071         QString getMimeType();
00072         bool contains(const QString& value);
00073 
00079         void setSyntax(QString syntax);
00080 
00081         QPixmap getPixmap();
00082         QIcon getIcon();
00083 
00084         QString toString();
00085     
00086     signals:
00090         void changed();
00091 
00092     private:
00093         QHash<QString, QString> *metaInfos;
00094         QString text;
00095 };
00096 
00097 #endif // TEXTNODECONTENT_H
00098 
00099 
Generated on Fri May 14 19:12:50 2010 for Silence by  doxygen 1.6.3