• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdecore
 

kdecore

  • kdecore
kcalendarsystemfactory.cpp
1 /*
2  Copyright (c) 2002 Carlos Moro <cfmoro@correo.uniovi.es>
3  Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 // Gregorian calendar system implementation factory for creation of kde
22 // calendar systems.
23 // Also default gregorian and factory classes
24 
25 #include <kdebug.h>
26 
27 #include "kcalendarsystemfactory.h"
28 
29 #include "kcalendarsystemgregorian.h"
30 #include "kcalendarsystemhijri.h"
31 #include "kcalendarsystemhebrew.h"
32 #include "kcalendarsystemjalali.h"
33 
34 KCalendarSystemFactory::KCalendarSystemFactory()
35 {
36  kdDebug(5400) << "Created factory calendar" << endl;
37 }
38 
39 KCalendarSystemFactory::~KCalendarSystemFactory()
40 {
41 }
42 
43 KCalendarSystem *KCalendarSystemFactory::create( const TQString &calType,
44  const KLocale * locale )
45 {
46  if ( calType == "hebrew" )
47  return new KCalendarSystemHebrew(locale);
48  if ( calType == "hijri" )
49  return new KCalendarSystemHijri(locale);
50  if ( calType == "gregorian" )
51  return new KCalendarSystemGregorian(locale);
52  if ( calType == "jalali" )
53  return new KCalendarSystemJalali(locale);
54 
55  kdDebug(5400) << "Calendar " << calType << " not found, defaulting to gregorian" << endl;
56 
57  // ### HPB: Should it really be a default here?
58  return new KCalendarSystemGregorian(locale);
59 }
60 
61 TQStringList KCalendarSystemFactory::calendarSystems()
62 {
63  TQStringList lst;
64  lst.append("hebrew");
65  lst.append("hijri");
66  lst.append("gregorian");
67  lst.append("jalali");
68 
69  return lst;
70 }

kdecore

Skip menu "kdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |