• Skip to content
  • Skip to link menu
KDE 4.7 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

KCalCore Library

journal.cpp
Go to the documentation of this file.
00001 /*
00002   This file is part of the kcalcore library.
00003 
00004   Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
00005 
00006   This library is free software; you can redistribute it and/or
00007   modify it under the terms of the GNU Library General Public
00008   License as published by the Free Software Foundation; either
00009   version 2 of the License, or (at your option) any later version.
00010 
00011   This library is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014   Library General Public License for more details.
00015 
00016   You should have received a copy of the GNU Library General Public License
00017   along with this library; see the file COPYING.LIB.  If not, write to
00018   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019   Boston, MA 02110-1301, USA.
00020 */
00032 #include "journal.h"
00033 #include "visitor.h"
00034 
00035 using namespace KCalCore;
00036 
00037 Journal::Journal() : d( 0 )
00038 {
00039 }
00040 
00041 Journal::~Journal()
00042 {
00043 }
00044 
00045 Incidence::IncidenceType Journal::type() const
00046 {
00047   return TypeJournal;
00048 }
00049 
00050 QByteArray Journal::typeStr() const
00051 {
00052   return "Journal";
00053 }
00054 
00055 Journal *Journal::clone() const
00056 {
00057   return new Journal( *this );
00058 }
00059 
00060 IncidenceBase &Journal::assign( const IncidenceBase &other )
00061 {
00062   Incidence::assign( other );
00063   return *this;
00064 }
00065 
00066 bool Journal::equals( const IncidenceBase &journal ) const
00067 {
00068   return Incidence::equals( journal );
00069 }
00070 
00071 bool Journal::accept( Visitor &v, IncidenceBase::Ptr incidence )
00072 {
00073   return v.visit( incidence.staticCast<Journal>() );
00074 }
00075 
00076 KDateTime Journal::dateTime( DateTimeRole role ) const
00077 {
00078   switch ( role ) {
00079     case RoleEnd:
00080     case RoleEndTimeZone:
00081       return KDateTime();
00082     case RoleDisplayStart:
00083     case RoleDisplayEnd:
00084       return dtStart();
00085     default:
00086       return dtStart();
00087   }
00088 }
00089 
00090 void Journal::setDateTime( const KDateTime &dateTime, DateTimeRole role )
00091 {
00092   Q_UNUSED( dateTime );
00093   Q_UNUSED( role );
00094 }
00095 
00096 void Journal::virtual_hook( int id, void *data )
00097 {
00098   Q_UNUSED( id );
00099   Q_UNUSED( data );
00100   Q_ASSERT( false );
00101 }
00102 
00103 QLatin1String Journal::mimeType() const
00104 {
00105   return Journal::journalMimeType();
00106 }
00107 
00108 /* static */
00109 QLatin1String Journal::journalMimeType()
00110 {
00111   return QLatin1String( "application/x-vnd.akonadi.calendar.journal" );
00112 }
00113 
00114 QLatin1String Journal::iconName( const KDateTime & ) const
00115 {
00116   return QLatin1String( "view-pim-journal" );
00117 }

KCalCore Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.5
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