00001
00002
00003
00004 #include "htmlexportsettings.h"
00005
00006 #include <klocale.h>
00007
00008 using namespace KCal;
00009
00010 HTMLExportSettings::HTMLExportSettings( const QString & application )
00011 : KConfigSkeleton( QLatin1String( "libkcal_htmlexportrc" ) )
00012 , mParamapplication(application)
00013 {
00014 setCurrentGroup( QString( QLatin1String( "%1-General" ) ).arg( mParamapplication ) );
00015
00016 mNameItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Name" ), mName );
00017 mNameItem->setLabel( i18n("Full name of the calendar owner") );
00018 mNameItem->setWhatsThis( i18n("WhatsThis text for FullName setting") );
00019 addItem( mNameItem, QLatin1String( "Name" ) );
00020 mEMailItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "EMail" ), mEMail );
00021 mEMailItem->setLabel( i18n("Email of the calendar owner") );
00022 mEMailItem->setWhatsThis( i18n("WhatsThis text for Email setting") );
00023 addItem( mEMailItem, QLatin1String( "EMail" ) );
00024 mCreditNameItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Credit Name" ), mCreditName );
00025 mCreditNameItem->setLabel( i18n("Creator application") );
00026 mCreditNameItem->setWhatsThis( i18n("Creator application of the calendar") );
00027 addItem( mCreditNameItem, QLatin1String( "CreditName" ) );
00028 mCreditURLItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Credit URL" ), mCreditURL );
00029 mCreditURLItem->setLabel( i18n("Creator URL") );
00030 mCreditURLItem->setWhatsThis( i18n("URL of the creator application of the calendar.") );
00031 addItem( mCreditURLItem, QLatin1String( "CreditURL" ) );
00032 mPageTitleItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Page Title" ), mPageTitle, i18n("Calendar") );
00033 mPageTitleItem->setLabel( i18n("Page Title") );
00034 addItem( mPageTitleItem, QLatin1String( "PageTitle" ) );
00035 mDateStartItem = new KConfigSkeleton::ItemDateTime( currentGroup(), QLatin1String( "Date Start" ), mDateStart );
00036 mDateStartItem->setLabel( i18n("Date start") );
00037 mDateStartItem->setWhatsThis( i18n("First day of the range that shall be exported to HTML.") );
00038 addItem( mDateStartItem, QLatin1String( "DateStart" ) );
00039 mDateEndItem = new KConfigSkeleton::ItemDateTime( currentGroup(), QLatin1String( "Date End" ), mDateEnd );
00040 mDateEndItem->setLabel( i18n("Date end") );
00041 mDateEndItem->setWhatsThis( i18n("Last day of the range that shall be exported to HTML.") );
00042 addItem( mDateEndItem, QLatin1String( "DateEnd" ) );
00043 mOutputFileItem = new KConfigSkeleton::ItemPath( currentGroup(), QLatin1String( "Output File" ), mOutputFile, QLatin1String( "$HOME/calendar.html" ) );
00044 mOutputFileItem->setLabel( i18n("Output filename") );
00045 mOutputFileItem->setWhatsThis( i18n("The output file name for the HTML export.") );
00046 addItem( mOutputFileItem, QLatin1String( "OutputFile" ) );
00047 mStyleSheetItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Style Sheet" ), mStyleSheet );
00048 mStyleSheetItem->setLabel( i18n("Style sheet") );
00049 mStyleSheetItem->setWhatsThis( i18n("CSS style sheet to be used by the final HTML page. This string contains the actual contents of the CSS, not a path to the style sheet.") );
00050 addItem( mStyleSheetItem, QLatin1String( "StyleSheet" ) );
00051 mExcludePrivateItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Exclude Private" ), mExcludePrivate, true );
00052 mExcludePrivateItem->setLabel( i18n("Exclude private incidences from the export") );
00053 addItem( mExcludePrivateItem, QLatin1String( "ExcludePrivate" ) );
00054 mExcludeConfidentialItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Exclude Confidential" ), mExcludeConfidential, true );
00055 mExcludeConfidentialItem->setLabel( i18n("Exclude confidential incidences from the export") );
00056 addItem( mExcludeConfidentialItem, QLatin1String( "ExcludeConfidential" ) );
00057
00058 setCurrentGroup( QString( QLatin1String( "%1-Events" ) ).arg( mParamapplication ) );
00059
00060 mEventViewItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Event View" ), mEventView, false );
00061 mEventViewItem->setLabel( i18n("Export events as list") );
00062 addItem( mEventViewItem, QLatin1String( "EventView" ) );
00063 mMonthViewItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Month View" ), mMonthView, true );
00064 mMonthViewItem->setLabel( i18n("Export in month view") );
00065 addItem( mMonthViewItem, QLatin1String( "MonthView" ) );
00066 mWeekViewItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Week View" ), mWeekView, false );
00067 mWeekViewItem->setLabel( i18n("Export in week view") );
00068 addItem( mWeekViewItem, QLatin1String( "WeekView" ) );
00069 mEventTitleItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Title" ), mEventTitle, i18n("Calendar") );
00070 mEventTitleItem->setLabel( i18n("Title of the calendar") );
00071 addItem( mEventTitleItem, QLatin1String( "EventTitle" ) );
00072 mEventLocationItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Export Location" ), mEventLocation, true );
00073 mEventLocationItem->setLabel( i18n("Export location of the events") );
00074 addItem( mEventLocationItem, QLatin1String( "EventLocation" ) );
00075 mEventCategoriesItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Export Categories" ), mEventCategories, true );
00076 mEventCategoriesItem->setLabel( i18n("Export categories of the events") );
00077 addItem( mEventCategoriesItem, QLatin1String( "EventCategories" ) );
00078 mEventAttendeesItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Export Attendees" ), mEventAttendees, false );
00079 mEventAttendeesItem->setLabel( i18n("Export attendees of the events") );
00080 addItem( mEventAttendeesItem, QLatin1String( "EventAttendees" ) );
00081
00082 setCurrentGroup( QString( QLatin1String( "%1-Todos" ) ).arg( mParamapplication ) );
00083
00084 mTodoViewItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Todo View" ), mTodoView, true );
00085 mTodoViewItem->setLabel( i18n("Export to-do list") );
00086 addItem( mTodoViewItem, QLatin1String( "TodoView" ) );
00087 mTodoListTitleItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "TodoList Title" ), mTodoListTitle, i18n("To-do List") );
00088 mTodoListTitleItem->setLabel( i18n("Title of the to-do list") );
00089 addItem( mTodoListTitleItem, QLatin1String( "TodoListTitle" ) );
00090 mTaskDueDateItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Export Due Date" ), mTaskDueDate, true );
00091 mTaskDueDateItem->setLabel( i18n("Export due dates of the to-dos") );
00092 addItem( mTaskDueDateItem, QLatin1String( "TaskDueDate" ) );
00093 mTaskLocationItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Export Location" ), mTaskLocation, true );
00094 mTaskLocationItem->setLabel( i18n("Export location of the to-dos") );
00095 addItem( mTaskLocationItem, QLatin1String( "TaskLocation" ) );
00096 mTaskCategoriesItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Export Categories" ), mTaskCategories, true );
00097 mTaskCategoriesItem->setLabel( i18n("Export categories of the to-dos") );
00098 addItem( mTaskCategoriesItem, QLatin1String( "TaskCategories" ) );
00099 mTaskAttendeesItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Export Attendees" ), mTaskAttendees, false );
00100 mTaskAttendeesItem->setLabel( i18n("Export attendees of the to-dos") );
00101 addItem( mTaskAttendeesItem, QLatin1String( "TaskAttendees" ) );
00102
00103 setCurrentGroup( QString( QLatin1String( "%1-Journals" ) ).arg( mParamapplication ) );
00104
00105 mJournalViewItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Journal View" ), mJournalView, false );
00106 mJournalViewItem->setLabel( i18n("Export journals") );
00107 addItem( mJournalViewItem, QLatin1String( "JournalView" ) );
00108 mJournalTitleItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Journal Title" ), mJournalTitle, i18n("Journals") );
00109 mJournalTitleItem->setLabel( i18n("Title of the journal list") );
00110 addItem( mJournalTitleItem, QLatin1String( "JournalTitle" ) );
00111
00112 setCurrentGroup( QString( QLatin1String( "%1-FreeBusy" ) ).arg( mParamapplication ) );
00113
00114 mFreeBusyViewItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "FreeBusy View" ), mFreeBusyView, false );
00115 mFreeBusyViewItem->setLabel( i18n("Export journals") );
00116 addItem( mFreeBusyViewItem, QLatin1String( "FreeBusyView" ) );
00117 mFreeBusyTitleItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Free/Busy Title" ), mFreeBusyTitle, i18n("Busy times") );
00118 mFreeBusyTitleItem->setLabel( i18n("Title of the free/busy list") );
00119 addItem( mFreeBusyTitleItem, QLatin1String( "FreeBusyTitle" ) );
00120 }
00121
00122 HTMLExportSettings::~HTMLExportSettings()
00123 {
00124 }
00125