korganizer

koglobals.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018 
00019     As a special exception, permission is given to link this program
00020     with any edition of Qt, and distribute the resulting executable,
00021     without including the source code for Qt in the source distribution.
00022 */
00023 #ifndef KORG_GLOBALS_H
00024 #define KORG_GLOBALS_H
00025 
00026 #include <kdepimmacros.h>
00027 
00028 class QPixmap;
00029 class QIconSet;
00030 class KCalendarSystem;
00031 class AlarmClient;
00032 
00033 class KConfig;
00034 class KInstance;
00035 class KHolidays;
00036 
00037 class KDE_EXPORT KOGlobals
00038 {
00039   public:
00040     static KOGlobals *self();
00041 
00042     enum { INCIDENCEADDED, INCIDENCEEDITED, INCIDENCEDELETED };
00043     enum { PRIORITY_MODIFIED, COMPLETION_MODIFIED, CATEGORY_MODIFIED,
00044            DATE_MODIFIED, RELATION_MODIFIED, ALARM_MODIFIED,
00045            DESCRIPTION_MODIFIED, SUMMARY_MODIFIED,
00046            COMPLETION_MODIFIED_WITH_RECURRENCE, UNKNOWN_MODIFIED };
00047 
00048     static void fitDialogToScreen( QWidget *widget, bool force=false );
00049     KConfig *config() const;
00050 
00051     static bool reverseLayout();
00052 
00053     const KCalendarSystem *calendarSystem() const;
00054 
00055     AlarmClient *alarmClient() const;
00056 
00057     ~KOGlobals();
00058 
00059     QPixmap smallIcon( const QString& name );
00060     QIconSet smallIconSet( const QString& name, int size = 0 );
00061 
00062     QStringList holiday( const QDate & );
00063     bool isWorkDay( const QDate & );
00064 
00070     void setHolidays( KHolidays *h );
00071 
00074     KHolidays *holidays() const;
00075 
00076   protected:
00077     KOGlobals();
00078 
00079   private:
00080     static KOGlobals *mSelf;
00081 
00082     KInstance *mOwnInstance;
00083 
00084     AlarmClient *mAlarmClient;
00085 
00086     KHolidays *mHolidays;
00087 };
00088 
00089 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys