<commit_before>/***************************************************************************
*   Copyright (C) 2003 by                                                 *
*   <NAME> (<EMAIL>)                             *
*   <NAME> (<EMAIL>)                               *
*   <NAME> (<EMAIL>)                                  *
*                                                                         *
*   Copyright (C) 2004-2006 <NAME> (<EMAIL>)          *
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
***************************************************************************/

#include "pref.h"

#include "config-krecipes.h"

#include <qlayout.h>
#include <qlabel.h>


#include <q3buttongroup.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qtooltip.h>

#include <qframe.h>
#include <qcombobox.h>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QVBoxLayout>

#include <kapplication.h>
#include <kconfiggroup.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kfiledialog.h>
#include <knuminput.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <kcombobox.h>
#include <kdebug.h>
#include <ktoolinvocation.h>
#include <kglobal.h>
#include <kvbox.h>

#include <sonnet/configwidget.h>

KrecipesPreferences::KrecipesPreferences( QWidget *parent )
		: KPageDialog( parent )
{
	setFaceType( List );
	setObjectName( i18n( "Krecipes Preferences" ) );
	setButtons( Help | Ok | Cancel );
	setDefaultButton( Ok );

	KConfigGroup config = KGlobal::config()->group( "DBType" );

	KIconLoader *il = KIconLoader::global();

        m_pageServer = new ServerPrefs( this );
        KPageWidgetItem * page = new KPageWidgetItem( m_pageServer , i18n( "Server Settings" ) );
        page->setObjectName("server" );
	page->setHeader( i18n( "Database Server Options (%1)" , config.readEntry( "Type" )));
	il->loadIcon( "network-workgroup", KIconLoader::NoGroup, 32 );
	page->setIcon( KIcon::KIcon( "network-workgroup", il ) );
        m_helpMap.insert(page->objectName(),"configure-server-settings");
        addPage( page );

        m_pageNumbers = new NumbersPrefs( this );
	page = new KPageWidgetItem(m_pageNumbers , i18n( "Formatting" ) );
        page->setObjectName( "formating" );
	page->setHeader( i18n( "Customize Formatting" ) );
	il->loadIcon( "math_frac", KIconLoader::NoGroup, 32 );
	page->setIcon( KIcon::KIcon( "math_frac", il ) );
	addPage(page);
	m_helpMap.insert(page->objectName(),"custom-formatting");

	m_pageImport = new ImportPrefs( this );
        page = new KPageWidgetItem( m_pageImport , i18n( "Import/Export" ) );
        page->setObjectName( "import" );
	page->setHeader( i18n( "Recipe Import and Export Options" ) );
	il->loadIcon( "go-down", KIconLoader::NoGroup, 32 );
	page->setIcon( KIcon::KIcon( "go-down", il ) );
	addPage(page);
	m_helpMap.insert(page->objectName(),"import-export-preference");


	m_pagePerformance = new PerformancePrefs( this );
        page = new KPageWidgetItem( m_pagePerformance , i18n( "performance" ) );
	page->setHeader( i18n( "Performance Options" ) );
        page->setObjectName( "performance" );
	il->loadIcon( "launch", KIconLoader::NoGroup, 32 );
	page->setIcon( KIcon::KIcon( "launch", il ) );
	addPage(page);
	m_helpMap.insert(page->objectName(),"configure-performance");


	m_pageSpellChecking = new SpellCheckingPrefs( this );
        page = new KPageWidgetItem( m_pageSpellChecking , i18n( "spell" ) );
	page->setHeader( i18n( "Spell checking Options" ) );
        page->setObjectName( "spellchecking" );
	il->loadIcon( "launch", KIconLoader::NoGroup, 32 );
	page->setIcon( KIcon::KIcon( "launch", il ) );
	addPage(page);
	m_helpMap.insert(page->objectName() ,"configure-spell");


	// Signals & Slots
	connect ( this, SIGNAL( okClicked() ), this, SLOT( saveSettings() ) );
        connect ( this, SIGNAL( helpClicked() ), this, SLOT( slotHelp() ) );
}

void KrecipesPreferences::saveSettings( void )
{
	m_pageServer->saveOptions();
	m_pageNumbers->saveOptions();
	m_pageImport->saveOptions();
	m_pagePerformance->saveOptions();
        m_pageSpellChecking->saveOptions();
}<commit_msg>Fix icons and text<commit_after>/***************************************************************************
*   Copyright (C) 2003 by                                                 *
*   <NAME> (<EMAIL>)                             *
*   <NAME> (<EMAIL>)                               *
*   <NAME> (<EMAIL>)                                  *
*                                                                         *
*   Copyright (C) 2004-2006 <NAME> (<EMAIL>)          *
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
***************************************************************************/

#include "pref.h"

#include "config-krecipes.h"

#include <qlayout.h>
#include <qlabel.h>


#include <q3buttongroup.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qtooltip.h>

#include <qframe.h>
#include <qcombobox.h>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QVBoxLayout>

#include <kapplication.h>
#include <kconfiggroup.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kfiledialog.h>
#include <knuminput.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <kcombobox.h>
#include <kdebug.h>
#include <ktoolinvocation.h>
#include <kglobal.h>
#include <kvbox.h>

#include <sonnet/configwidget.h>

KrecipesPreferences::KrecipesPreferences( QWidget *parent )
		: KPageDialog( parent )
{
	setFaceType( List );
	setObjectName( i18n( "Krecipes Preferences" ) );
	setButtons( Help | Ok | Cancel );
	setDefaultButton( Ok );

	KConfigGroup config = KGlobal::config()->group( "DBType" );

	KIconLoader *il = KIconLoader::global();

        m_pageServer = new ServerPrefs( this );
        KPageWidgetItem * page = new KPageWidgetItem( m_pageServer , i18n( "Server Settings" ) );
        page->setObjectName("server" );
	page->setHeader( i18n( "Database Server Options (%1)" , config.readEntry( "Type" )));
	il->loadIcon( "network-workgroup", KIconLoader::NoGroup, 32 );
	page->setIcon( KIcon::KIcon( "network-workgroup", il ) );
        m_helpMap.insert(page->objectName(),"configure-server-settings");
        addPage( page );

        m_pageNumbers = new NumbersPrefs( this );
	page = new KPageWidgetItem(m_pageNumbers , i18n( "Formatting" ) );
        page->setObjectName( "formating" );
	page->setHeader( i18n( "Customize Formatting" ) );
	il->loadIcon( "math_frac", KIconLoader::NoGroup, 32 );
	page->setIcon( KIcon::KIcon( "math_frac", il ) );
	addPage(page);
	m_helpMap.insert(page->objectName(),"custom-formatting");

	m_pageImport = new ImportPrefs( this );
        page = new KPageWidgetItem( m_pageImport , i18n( "Import/Export" ) );
        page->setObjectName( "import" );
	page->setHeader( i18n( "Recipe Import and Export Options" ) );
	il->loadIcon( "go-down", KIconLoader::NoGroup, 32 );
	page->setIcon( KIcon::KIcon( "go-down", il ) );
	addPage(page);
	m_helpMap.insert(page->objectName(),"import-export-preference");


	m_pagePerformance = new PerformancePrefs( this );
        page = new KPageWidgetItem( m_pagePerformance , i18n( "performance" ) );
	page->setHeader( i18n( "Performance Options" ) );
        page->setObjectName( "performance" );
	il->loadIcon( "launch", KIconLoader::NoGroup, 32 );
	page->setIcon( KIcon::KIcon( "launch", il ) );
	addPage(page);
	m_helpMap.insert(page->objectName(),"configure-performance");


	m_pageSpellChecking = new SpellCheckingPrefs( this );
        page = new KPageWidgetItem( m_pageSpellChecking , i18n( "Spell checking" ) );
	page->setHeader( i18n( "Spell checking Options" ) );
        page->setObjectName( "spellchecking" );
	il->loadIcon( "tools-check-spelling", KIconLoader::NoGroup, 32 );
	page->setIcon( KIcon::KIcon( "tools-check-spelling", il ) );
	addPage(page);
	m_helpMap.insert(page->objectName() ,"configure-spell");


	// Signals & Slots
	connect ( this, SIGNAL( okClicked() ), this, SLOT( saveSettings() ) );
        connect ( this, SIGNAL( helpClicked() ), this, SLOT( slotHelp() ) );
}

void KrecipesPreferences::saveSettings( void )
{
	m_pageServer->saveOptions();
	m_pageNumbers->saveOptions();
	m_pageImport->saveOptions();
	m_pagePerformance->saveOptions();
        m_pageSpellChecking->saveOptions();
}
{'fraction_non_alphanumeric': 0.17601246105919002, 'fraction_numerical': 0.01045838896306186, 'mean_word_length': 3.3404152583293096, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 135, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3457766', 'n_tokens_mistral': 2974, 'n_tokens_neox': 2825, 'n_words': 610}