~ubuntu-branches/ubuntu/oneiric/koffice/oneiric-updates

« back to all changes in this revision

Viewing changes to krita/plugins/paintops/hatching/kis_hatching_preferences.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
*  Copyright (c) 2008 Lukas Tvrdy <lukast.dev@gmail.com>
 
3
*  Copyright (c) 2010 José Luis Vergara <pentalis@gmail.com>
 
4
*
 
5
*  This program is free software; you can redistribute it and/or modify
 
6
*  it under the terms of the GNU General Public License as published by
 
7
*  the Free Software Foundation; either version 2 of the License, or
 
8
*  (at your option) any later version.
 
9
*
 
10
*  This program is distributed in the hope that it will be useful,
 
11
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
*  GNU General Public License for more details.
 
14
*
 
15
*  You should have received a copy of the GNU General Public License
 
16
*  along with this program; if not, write to the Free Software
 
17
*  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
18
*/
 
19
 
 
20
#include "kis_hatching_preferences.h"
 
21
 
 
22
#include "ui_wdghatchingpreferences.h"
 
23
 
 
24
class KisHatchingPreferencesWidget: public QWidget, public Ui::WdgHatchingPreferences
 
25
{
 
26
    public:
 
27
        KisHatchingPreferencesWidget(QWidget *parent = 0)
 
28
        : QWidget(parent) {
 
29
            setupUi(this);
 
30
        }
 
31
};
 
32
 
 
33
KisHatchingPreferences::KisHatchingPreferences()
 
34
: KisPaintOpOption(i18n("Hatching preferences"), KisPaintOpOption::brushCategory(), false)
 
35
{
 
36
    m_checkable = false;
 
37
    m_options = new KisHatchingPreferencesWidget();
 
38
 
 
39
    /*
 
40
    connect(m_options->trigonometryAlgebraRadioButton, SIGNAL(clicked(bool)),SIGNAL(sigSettingChanged()));
 
41
    connect(m_options->scratchOffRadioButton, SIGNAL(clicked(bool)),SIGNAL(sigSettingChanged()));
 
42
    */
 
43
    
 
44
    connect(m_options->antialiasCheckBox, SIGNAL(clicked(bool)),SIGNAL(sigSettingChanged()));
 
45
    connect(m_options->opaqueBackgroundCheckBox, SIGNAL(clicked(bool)),SIGNAL(sigSettingChanged()));
 
46
    connect(m_options->subpixelPrecisionCheckBox, SIGNAL(clicked(bool)),SIGNAL(sigSettingChanged()));
 
47
    
 
48
    setConfigurationPage(m_options);
 
49
}
 
50
 
 
51
KisHatchingPreferences::~KisHatchingPreferences()
 
52
{
 
53
}
 
54
 
 
55
void KisHatchingPreferences::writeOptionSetting(KisPropertiesConfiguration* setting) const
 
56
{
 
57
    /*
 
58
    setting->setProperty("Hatching/bool_trigonometryalgebra", m_options->trigonometryAlgebraRadioButton->isChecked() );
 
59
    setting->setProperty("Hatching/bool_scratchoff", m_options->scratchOffRadioButton->isChecked() );
 
60
    */
 
61
    
 
62
    setting->setProperty("Hatching/bool_antialias", m_options->antialiasCheckBox->isChecked() );
 
63
    setting->setProperty("Hatching/bool_opaquebackground", m_options->opaqueBackgroundCheckBox->isChecked() );
 
64
    setting->setProperty("Hatching/bool_subpixelprecision", m_options->subpixelPrecisionCheckBox->isChecked() );
 
65
}
 
66
 
 
67
void KisHatchingPreferences::readOptionSetting(const KisPropertiesConfiguration* setting)
 
68
{
 
69
    /*
 
70
    m_options->trigonometryAlgebraRadioButton->setChecked( setting->getBool("Hatching/bool_trigonometryalgebra") );
 
71
    m_options->scratchOffRadioButton->setChecked( setting->getBool("Hatching/bool_scratchoff") );
 
72
    */
 
73
    
 
74
    m_options->antialiasCheckBox->setChecked( setting->getBool("Hatching/bool_antialias") );
 
75
    m_options->opaqueBackgroundCheckBox->setChecked( setting->getBool("Hatching/bool_opaquebackground") );
 
76
    m_options->subpixelPrecisionCheckBox->setChecked( setting->getBool("Hatching/bool_subpixelprecision") );
 
77
}
 
78
;