~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to krita/plugins/paintops/chalk/kis_chalk_paintop_settings_widget.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "kis_chalkop_option.h"
22
22
#include "kis_chalk_paintop_settings.h"
23
23
 
 
24
#include <kis_curve_option_widget.h>
 
25
#include <kis_pressure_opacity_option.h>
 
26
 
24
27
#include <kis_paintop_options_widget.h>
25
28
#include <kis_paint_action_type_option.h>
26
29
 
27
30
KisChalkPaintOpSettingsWidget:: KisChalkPaintOpSettingsWidget(QWidget* parent)
28
31
        : KisPaintOpOptionsWidget(parent)
29
32
{
30
 
    m_paintActionTypeOption = new KisPaintActionTypeOption();
31
33
    m_chalkOption =  new KisChalkOpOption();
32
34
 
33
 
    addPaintOpOption(m_chalkOption);
34
 
    addPaintOpOption(m_paintActionTypeOption);
 
35
    addPaintOpOption(new KisChalkOpOption());
 
36
    addPaintOpOption(new KisCurveOptionWidget(new KisPressureOpacityOption()));
 
37
    addPaintOpOption(new KisPaintActionTypeOption());
35
38
}
36
39
 
37
40
KisChalkPaintOpSettingsWidget::~ KisChalkPaintOpSettingsWidget()
38
41
{
39
 
    delete m_chalkOption;
40
 
    delete m_paintActionTypeOption;
41
42
}
42
43
 
43
44
KisPropertiesConfiguration*  KisChalkPaintOpSettingsWidget::configuration() const
48
49
    writeConfiguration(config);
49
50
    return config;
50
51
}
 
52
 
 
53
void KisChalkPaintOpSettingsWidget::changePaintOpSize(qreal x, qreal y)
 
54
{
 
55
    // if the movement is more left<->right then up<->down
 
56
    if (qAbs(x) > qAbs(y)){
 
57
        m_chalkOption->setRadius( m_chalkOption->radius() + qRound(x) );
 
58
    }
 
59
    else // vice-versa
 
60
    {
 
61
        // we can do something different
 
62
    }
 
63
 
 
64
}