korganizer
kocorehelper.h
00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 1999 Preston Brown <pbrown@kde.org> 00005 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 00006 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00007 00008 This program is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 2 of the License, or 00011 (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00021 00022 As a special exception, permission is given to link this program 00023 with any edition of Qt, and distribute the resulting executable, 00024 without including the source code for Qt in the source distribution. 00025 */ 00026 #ifndef _KOCOREHELPER_H 00027 #define _KOCOREHELPER_H 00028 00029 00030 #include "korganizer/corehelper.h" 00031 #include "koprefs.h" 00032 #include "koglobals.h" 00033 #include "kocore.h" 00034 00035 class KCalendarSystem; 00036 00037 class KOCoreHelper : public KOrg::CoreHelper 00038 { 00039 public: 00040 KOCoreHelper() {} 00041 virtual ~KOCoreHelper() {} 00042 00043 virtual QColor defaultEventColor() { return KOPrefs::instance()->mEventColor; } 00044 virtual QColor textColor( const QColor &bgColor ) { return getTextColor( bgColor ); } 00045 virtual QColor categoryColor( const QStringList &cats ); 00046 virtual QString holidayString( const QDate &dt ); 00047 virtual QTime dayStart() { return KOPrefs::instance()->mDayBegins.time(); } 00048 virtual const KCalendarSystem *calendarSystem() { return KOGlobals::self()->calendarSystem(); } 00049 virtual KOrg::PrintPlugin::List loadPrintPlugins() { return KOCore::self()->loadPrintPlugins(); } 00050 virtual bool isWorkingDay( const QDate &dt ) { return KOGlobals::self()->isWorkDay( dt ); } 00051 }; 00052 00053 #endif