• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

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 Arthur <mike@mikearthur.co.uk>
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     KUrl link() const;
00182 
00189     void setLink( const KUrl &link ) const;
00190 
00197     KUrl permaLink() const;
00198 
00205     void setPermaLink( const KUrl &permalink ) const;
00206 
00213     bool isCommentAllowed() const;
00214 
00221     void setCommentAllowed( bool commentAllowed );
00222 
00229     bool isTrackBackAllowed() const; // pings in Movable Type
00230 
00237     void setTrackBackAllowed ( bool allowTrackBacks );
00238 
00245     QString summary() const; // excerpts in Movable Type
00246 
00253     void setSummary( const QString &summary );
00254 
00261     QStringList tags() const; // keywords in Movable Type
00262 
00269     void setTags( const QStringList &tags );
00270 
00271 //     QList<KUrl> trackBackUrls() const; // TODO check if necessary
00272 //     void setTrackBackUrls( const QList<KUrl> &trackBackUrls );
00273 
00280     QString mood() const;
00281 
00288     void setMood( const QString &mood );
00289 
00296     QString music() const;
00297 
00304     void setMusic( const QString &music );
00305 
00312     QStringList categories() const;
00313 
00320     void setCategories( const QStringList &categories );
00321 
00328     KDateTime creationDateTime() const;
00329 
00337     void setCreationDateTime( const KDateTime &datetime );
00338 
00345     KDateTime modificationDateTime() const;
00346 
00353     void setModificationDateTime( const KDateTime &datetime );
00354 
00359     enum Status {
00361       New,
00364       Fetched,
00367       Created,
00370       Modified,
00373       Removed,
00376       Error
00377     };
00378 
00385     Status status() const;
00386 
00393     void setStatus( Status status );
00394 
00401     QString error() const;
00402 
00409     void setError( const QString &error );
00410 
00414     BlogPost &operator=( const BlogPost &post );
00415 
00419     void swap( BlogPost &other ) { qSwap( this->d_ptr, other.d_ptr ); }
00420 
00421   private:
00422     BlogPostPrivate *d_ptr;  //krazy:exclude=dpointer can't constify due to bic and swap being declared inline
00423 };
00424 
00425 } //namespace KBlog
00426 
00427 #endif

KBlog Client Library

Skip menu "KBlog Client Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.6
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal