void KOViewManager::readSettings(KConfig *config)
{
    config->setGroup("General");
    QString view = config->readEntry("Current View");

    if(view == "WhatsNext") showWhatsNextView();
    else if(view == "Month") showMonthView();
    else if(view == "List") showListView();
    else if(view == "Journal") showJournalView();
    else if(view == "Todo") showTodoView();
    else if(view == "Timeline") showTimelineView();
    else showAgendaView();
}
void KOViewManager::readSettings( KConfig *config )
{
    KConfigGroup generalConfig( config, "General" );
    QString view = generalConfig.readEntry( "Current View" );

    if ( view == QLatin1String( "WhatsNext" ) ) {
        showWhatsNextView();
    } else if ( view == QLatin1String( "OldMonth" ) ) {
        // the oldmonth view is gone, so we assume the new month view
        showMonthView();
    } else if ( view == QLatin1String( "List" ) ) {
        showListView();
    } else if ( view == QLatin1String( "Journal" ) ) {
        showJournalView();
    } else if ( view == QLatin1String( "Todo" ) ) {
        showTodoView();
    } else if ( view == QLatin1String( "Timeline" ) ) {
        showTimeLineView();
    } else if ( view == QLatin1String( "TimeSpent" ) ) {
        showTimeSpentView();
    } else if ( view == QLatin1String( "Month" ) ) {
        showMonthView();
    } else {
        mAgendaMode = AgendaMode( generalConfig.readEntry( "Agenda Mode", int( AGENDA_OTHER ) ) );

        switch ( mAgendaMode ) {
        case AGENDA_WORK_WEEK:
            showWorkWeekView();
            break;
        case AGENDA_WEEK:
            showWeekView();
            break;
        case AGENDA_NEXTX:
            showNextXView();
            break;
        case AGENDA_DAY:
            showDayView();
            break;
        case AGENDA_NONE:
        // Someone has been playing with the config file.
        default:
            mAgendaMode = AGENDA_OTHER;
            showAgendaView();
        }
    }
}