KBlog Client Library
blogpost.h
00001 /* 00002 This file is part of the kblog library. 00003 00004 Copyright (c) 2007 Christian Weilbach <christian_weilbach@web.de> 00005 Copyright (c) 2007 Mike McQuaid <mike@mikemcquaid.com> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library 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 GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00020 Boston, MA 02110-1301, USA. 00021 */ 00022 00023 #ifndef KBLOG_BLOGPOSTING_H 00024 #define KBLOG_BLOGPOSTING_H 00025 00026 #include <kblog/kblog_export.h> 00027 00028 #include <kurl.h> 00029 00030 #include <QtCore/QtAlgorithms> 00031 00032 class QStringList; 00033 00034 class KDateTime; 00035 class KUrl; 00036 00037 namespace KCal { 00038 class Journal; 00039 } 00040 00041 namespace KBlog { 00042 class Blog; 00043 class BlogPostPrivate; 00044 00068 class KBLOG_EXPORT BlogPost 00069 { 00070 00071 public: 00072 00076 BlogPost( const KBlog::BlogPost &post ); 00077 00082 explicit BlogPost( const QString &postId = QString() ); 00083 00087 explicit BlogPost( const KCal::Journal &journal ); 00088 00092 virtual ~BlogPost(); 00093 00099 KCal::Journal *journal( const Blog &blog ) const; 00100 00105 QString journalId() const; 00106 00113 bool isPrivate() const; 00114 00122 void setPrivate( bool privatePost ); 00123 00130 QString postId() const; 00131 00138 void setPostId( const QString &postId ); 00139 00146 QString title() const; 00147 00154 void setTitle( const QString &title ); 00155 00162 QString content() const; 00163 00170 void setContent( const QString &content ); 00171 00172 // QString abbreviatedContent() const; // TODO check if necessary 00173 // void setAbbreviatedContent( const QString &abbreviatedContent ); 00174 00181 QString additionalContent() const; 00182 00189 void setAdditionalContent( const QString &additionalContent ); 00190 00198 QString slug() const; 00199 00207 void setSlug( const QString &slug ); 00214 KUrl link() const; 00215 00222 void setLink( const KUrl &link ) const; 00223 00230 KUrl permaLink() const; 00231 00238 void setPermaLink( const KUrl &permalink ) const; 00239 00246 bool isCommentAllowed() const; 00247 00254 void setCommentAllowed( bool commentAllowed ); 00255 00262 bool isTrackBackAllowed() const; // pings in Movable Type 00263 00270 void setTrackBackAllowed ( bool allowTrackBacks ); 00271 00278 QString summary() const; // excerpts in Movable Type 00279 00286 void setSummary( const QString &summary ); 00287 00294 QStringList tags() const; // keywords in Movable Type 00295 00302 void setTags( const QStringList &tags ); 00303 00304 // QList<KUrl> trackBackUrls() const; // TODO check if necessary 00305 // void setTrackBackUrls( const QList<KUrl> &trackBackUrls ); 00306 00313 QString mood() const; 00314 00321 void setMood( const QString &mood ); 00322 00329 QString music() const; 00330 00337 void setMusic( const QString &music ); 00338 00345 QStringList categories() const; 00346 00354 void setCategories( const QStringList &categories ); 00355 00362 KDateTime creationDateTime() const; 00363 00371 void setCreationDateTime( const KDateTime &datetime ); 00372 00379 KDateTime modificationDateTime() const; 00380 00387 void setModificationDateTime( const KDateTime &datetime ); 00388 00393 enum Status { 00395 New, 00398 Fetched, 00401 Created, 00404 Modified, 00407 Removed, 00410 Error 00411 }; 00412 00419 Status status() const; 00420 00427 void setStatus( Status status ); 00428 00435 QString error() const; 00436 00443 void setError( const QString &error ); 00444 00448 BlogPost &operator=( const BlogPost &post ); 00449 00453 void swap( BlogPost &other ) { qSwap( this->d_ptr, other.d_ptr ); } 00454 00455 private: 00456 BlogPostPrivate *d_ptr; //krazy:exclude=dpointer can't constify due to bic and swap being declared inline 00457 }; 00458 00459 } //namespace KBlog 00460 00461 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:07:42 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:07:42 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.