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

KBlog Client Library

  • kblog
blog.cpp
1 /*
2  This file is part of the kblog library.
3 
4  Copyright (c) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
5  Copyright (c) 2006-2007 Christian Weilbach <christian_weilbach@web.de>
6  Copyright (c) 2007 Mike McQuaid <mike@mikemcquaid.com>
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
23 
24 #include "blog.h"
25 #include "blog_p.h"
26 #include "blogpost_p.h"
27 
28 #include <kdeversion.h>
29 
30 #include <KDebug>
31 
32 using namespace KBlog;
33 
34 Blog::Blog( const KUrl &server, QObject *parent, const QString &applicationName,
35  const QString &applicationVersion ) :
36  QObject( parent ), d_ptr( new BlogPrivate )
37 {
38  Q_UNUSED( server );
39  d_ptr->q_ptr = this;
40  setUserAgent( applicationName, applicationVersion );
41 }
42 
43 Blog::Blog( const KUrl &server, BlogPrivate &dd, QObject *parent,
44  const QString &applicationName, const QString &applicationVersion )
45  : QObject( parent ), d_ptr( &dd )
46 {
47  Q_UNUSED( server );
48  d_ptr->q_ptr = this;
49  setUserAgent( applicationName, applicationVersion );
50 }
51 
52 Blog::~Blog()
53 {
54  kDebug() << "~Blog()";
55  delete d_ptr;
56 }
57 
58 QString Blog::userAgent() const
59 {
60  Q_D( const Blog );
61  return d->mUserAgent;
62 }
63 
64 void Blog::setUserAgent( const QString &applicationName,
65  const QString &applicationVersion )
66 {
67  Q_D( Blog );
68  QString userAgent;
69  if ( !applicationName.isEmpty() &&
70  !applicationVersion.isEmpty() ) {
71  userAgent = '(' + applicationName + '/' + applicationVersion + ") KDE-KBlog/";
72  } else {
73  userAgent = "KDE-KBlog/";
74  }
75  userAgent += KDE_VERSION_STRING;
76  d->mUserAgent = userAgent;
77 }
78 
79 void Blog::setPassword( const QString &pass )
80 {
81  Q_D( Blog );
82  d->mPassword = pass;
83 }
84 
85 QString Blog::password() const
86 {
87  Q_D( const Blog );
88  return d->mPassword;
89 }
90 
91 QString Blog::username() const
92 {
93  Q_D( const Blog );
94  return d->mUsername;
95 }
96 
97 void Blog::setUsername( const QString &username )
98 {
99  Q_D( Blog );
100  d->mUsername = username;
101 }
102 
103 void Blog::setBlogId( const QString &blogId )
104 {
105  Q_D( Blog );
106  d->mBlogId = blogId;
107 }
108 
109 QString Blog::blogId() const
110 {
111  Q_D( const Blog );
112  return d->mBlogId;
113 }
114 
115 void Blog::setUrl( const KUrl &url )
116 {
117  Q_D( Blog );
118  d->mUrl = url;
119 }
120 
121 KUrl Blog::url() const
122 {
123  Q_D( const Blog );
124  return d->mUrl;
125 }
126 
127 void Blog::setTimeZone( const KTimeZone &tz )
128 {
129  Q_D( Blog );
130  d->mTimeZone = tz;
131 }
132 
133 KTimeZone Blog::timeZone()
134 {
135  Q_D( const Blog );
136  return d->mTimeZone;
137 }
138 
139 BlogPrivate::BlogPrivate() : q_ptr(0)
140 {
141 }
142 
143 BlogPrivate::~BlogPrivate()
144 {
145  kDebug() << "~BlogPrivate()";
146 }
147 
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:24:42 by doxygen 1.8.3.1 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-4.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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