kcalendarsystemfactory.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#include <kdebug.h>
00026
00027
#include "kcalendarsystemfactory.h"
00028
00029
#include "kcalendarsystemgregorian.h"
00030
#include "kcalendarsystemhijri.h"
00031
#include "kcalendarsystemhebrew.h"
00032
#include "kcalendarsystemjalali.h"
00033
00034 KCalendarSystemFactory::KCalendarSystemFactory()
00035 {
00036 kdDebug(5400) <<
"Created factory calendar" <<
endl;
00037 }
00038
00039 KCalendarSystemFactory::~KCalendarSystemFactory()
00040 {
00041 }
00042
00043 KCalendarSystem *
KCalendarSystemFactory::create(
const QString &calType,
00044
const KLocale * locale )
00045 {
00046
if ( calType ==
"hebrew" )
00047
return new KCalendarSystemHebrew(locale);
00048
if ( calType ==
"hijri" )
00049
return new KCalendarSystemHijri(locale);
00050
if ( calType ==
"gregorian" )
00051
return new KCalendarSystemGregorian(locale);
00052
if ( calType ==
"jalali" )
00053
return new KCalendarSystemJalali(locale);
00054
00055 kdDebug(5400) <<
"Calendar " << calType <<
" not found, defaulting to gregorian" <<
endl;
00056
00057
00058
return new KCalendarSystemGregorian(locale);
00059 }
00060
00061 QStringList KCalendarSystemFactory::calendarSystems()
00062 {
00063
QStringList lst;
00064 lst.append(
"hebrew");
00065 lst.append(
"hijri");
00066 lst.append(
"gregorian");
00067 lst.append(
"jalali");
00068
00069
return lst;
00070 }
This file is part of the documentation for kdecore Library Version 3.3.1.