• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KBlog Client Library

  • sources
  • kde-4.12
  • kdepimlibs
  • kblog
blogpost.h
1 /*
2  This file is part of the kblog library.
3 
4  Copyright (c) 2007 Christian Weilbach <christian_weilbach@web.de>
5  Copyright (c) 2007 Mike McQuaid <mike@mikemcquaid.com>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 #ifndef KBLOG_BLOGPOSTING_H
24 #define KBLOG_BLOGPOSTING_H
25 
26 #include <kblog/kblog_export.h>
27 
28 #include <kurl.h>
29 
30 #include <QtCore/QtAlgorithms>
31 
32 class QStringList;
33 
34 class KDateTime;
35 class KUrl;
36 
37 namespace KCal {
38  class Journal;
39 }
40 
41 namespace KBlog {
42  class Blog;
43  class BlogPostPrivate;
44 
68 class KBLOG_EXPORT BlogPost
69 {
70 
71 public:
72 
76  BlogPost( const KBlog::BlogPost &post );
77 
82  explicit BlogPost( const QString &postId = QString() );
83 
87  explicit BlogPost( const KCal::Journal &journal );
88 
92  virtual ~BlogPost();
93 
99  KCal::Journal *journal( const Blog &blog ) const;
100 
105  QString journalId() const;
106 
113  bool isPrivate() const;
114 
122  void setPrivate( bool privatePost );
123 
130  QString postId() const;
131 
138  void setPostId( const QString &postId );
139 
146  QString title() const;
147 
154  void setTitle( const QString &title );
155 
162  QString content() const;
163 
170  void setContent( const QString &content );
171 
172 // QString abbreviatedContent() const; // TODO check if necessary
173 // void setAbbreviatedContent( const QString &abbreviatedContent );
174 
181  QString additionalContent() const;
182 
189  void setAdditionalContent( const QString &additionalContent );
190 
198  QString slug() const;
199 
207  void setSlug( const QString &slug );
214  KUrl link() const;
215 
222  void setLink( const KUrl &link ) const;
223 
230  KUrl permaLink() const;
231 
238  void setPermaLink( const KUrl &permalink ) const;
239 
246  bool isCommentAllowed() const;
247 
254  void setCommentAllowed( bool commentAllowed );
255 
262  bool isTrackBackAllowed() const; // pings in Movable Type
263 
270  void setTrackBackAllowed ( bool allowTrackBacks );
271 
278  QString summary() const; // excerpts in Movable Type
279 
286  void setSummary( const QString &summary );
287 
294  QStringList tags() const; // keywords in Movable Type
295 
302  void setTags( const QStringList &tags );
303 
304 // QList<KUrl> trackBackUrls() const; // TODO check if necessary
305 // void setTrackBackUrls( const QList<KUrl> &trackBackUrls );
306 
313  QString mood() const;
314 
321  void setMood( const QString &mood );
322 
329  QString music() const;
330 
337  void setMusic( const QString &music );
338 
345  QStringList categories() const;
346 
354  void setCategories( const QStringList &categories );
355 
362  KDateTime creationDateTime() const;
363 
371  void setCreationDateTime( const KDateTime &datetime );
372 
379  KDateTime modificationDateTime() const;
380 
387  void setModificationDateTime( const KDateTime &datetime );
388 
393  enum Status {
395  New,
398  Fetched,
401  Created,
404  Modified,
407  Removed,
410  Error
411  };
412 
419  Status status() const;
420 
427  void setStatus( Status status );
428 
435  QString error() const;
436 
443  void setError( const QString &error );
444 
448  BlogPost &operator=( const BlogPost &post );
449 
453  void swap( BlogPost &other ) {
454  qSwap( this->d_ptr, other.d_ptr );
455  }
456 
457  private:
458  BlogPostPrivate *d_ptr; //krazy:exclude=dpointer can't constify due to bic and swap being declared inline
459 };
460 
461 } //namespace KBlog
462 
463 #endif
KBlog::BlogPost::Fetched
Status of a successfully fetched post.
Definition: blogpost.h:398
KBlog::BlogPost::Created
Status of a successfully created post.
Definition: blogpost.h:401
KBlog::BlogPost::Status
Status
The enumartion of the different post status, reflecting the status changes on the server...
Definition: blogpost.h:393
KBlog::BlogPost::Modified
Status of a successfully modified post.
Definition: blogpost.h:404
KBlog::BlogPost
A class that represents a blog post on the server.
Definition: blogpost.h:68
KBlog::BlogPost::New
Status of a freshly constructed post on the client.
Definition: blogpost.h:395
KBlog::Blog
A class that provides methods to call functions on a supported blog web application.
Definition: blog.h:71
KBlog::BlogPost::Removed
Status of a successfully removed post.
Definition: blogpost.h:407
KBlog::BlogPost::swap
void swap(BlogPost &other)
The swap operator.
Definition: blogpost.h:453
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KBlog Client Library

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal