Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Miguel Lopez
Krita
Commits
4e58ae0b
Commit
4e58ae0b
authored
Jan 15, 2015
by
Dmitry Kazakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused files
parent
f377730c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
250 deletions
+0
-250
krita/plugins/paintops/colorsmudge/kis_colorsmudgeop_settings_widget.cpp
...aintops/colorsmudge/kis_colorsmudgeop_settings_widget.cpp
+0
-1
krita/plugins/paintops/libpaintop/CMakeLists.txt
krita/plugins/paintops/libpaintop/CMakeLists.txt
+0
-2
krita/plugins/paintops/libpaintop/kis_pressure_rate_option.cpp
.../plugins/paintops/libpaintop/kis_pressure_rate_option.cpp
+0
-77
krita/plugins/paintops/libpaintop/kis_pressure_rate_option.h
krita/plugins/paintops/libpaintop/kis_pressure_rate_option.h
+0
-58
krita/plugins/paintops/libpaintop/kis_pressure_rate_option_widget.cpp
...s/paintops/libpaintop/kis_pressure_rate_option_widget.cpp
+0
-69
krita/plugins/paintops/libpaintop/kis_pressure_rate_option_widget.h
...ins/paintops/libpaintop/kis_pressure_rate_option_widget.h
+0
-43
No files found.
krita/plugins/paintops/colorsmudge/kis_colorsmudgeop_settings_widget.cpp
View file @
4e58ae0b
...
@@ -26,7 +26,6 @@
...
@@ -26,7 +26,6 @@
#include <kis_properties_configuration.h>
#include <kis_properties_configuration.h>
#include <kis_paintop_options_widget.h>
#include <kis_paintop_options_widget.h>
#include <kis_pressure_size_option.h>
#include <kis_pressure_size_option.h>
#include <kis_pressure_rate_option.h>
#include <kis_curve_option_widget.h>
#include <kis_curve_option_widget.h>
#include <kis_pressure_rotation_option.h>
#include <kis_pressure_rotation_option.h>
#include <kis_pressure_scatter_option_widget.h>
#include <kis_pressure_scatter_option_widget.h>
...
...
krita/plugins/paintops/libpaintop/CMakeLists.txt
View file @
4e58ae0b
...
@@ -35,8 +35,6 @@ set(kritalibpaintop_LIB_SRCS
...
@@ -35,8 +35,6 @@ set(kritalibpaintop_LIB_SRCS
kis_pressure_sharpness_option.cpp
kis_pressure_sharpness_option.cpp
kis_pressure_sharpness_option_widget.cpp
kis_pressure_sharpness_option_widget.cpp
kis_pressure_mirror_option_widget.cpp
kis_pressure_mirror_option_widget.cpp
kis_pressure_rate_option.cpp
kis_pressure_rate_option_widget.cpp
kis_pressure_rotation_option.cpp
kis_pressure_rotation_option.cpp
kis_pressure_size_option.cpp
kis_pressure_size_option.cpp
kis_pressure_spacing_option.cpp
kis_pressure_spacing_option.cpp
...
...
krita/plugins/paintops/libpaintop/kis_pressure_rate_option.cpp
deleted
100644 → 0
View file @
f377730c
/* This file is part of the KDE project
* Copyright (C) Boudewijn Rempt <boud@valdyas.org>, (C) 2008
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "kis_pressure_rate_option.h"
#include <klocale.h>
#include <kis_paint_device.h>
#include <widgets/kis_curve_widget.h>
#include <KoColor.h>
#include <KoColorSpaceConstants.h>
KisPressureRateOption
::
KisPressureRateOption
()
:
KisCurveOption
(
i18n
(
"Rate"
),
"Rate"
,
KisPaintOpOption
::
generalCategory
(),
true
)
{
}
void
KisPressureRateOption
::
setRate
(
int
rate
)
{
m_rate
=
rate
;
}
int
KisPressureRateOption
::
rate
()
const
{
return
m_rate
;
}
void
KisPressureRateOption
::
writeOptionSetting
(
KisPropertiesConfiguration
*
setting
)
const
{
KisCurveOption
::
writeOptionSetting
(
setting
);
setting
->
setProperty
(
"RateValue"
,
m_rate
);
setting
->
setProperty
(
"RateVersion"
,
"2"
);
}
void
KisPressureRateOption
::
readOptionSetting
(
const
KisPropertiesConfiguration
*
setting
)
{
KisCurveOption
::
readOptionSetting
(
setting
);
if
(
setting
->
getString
(
"RateVersion"
,
"1"
)
==
"1"
)
{
m_rate
=
setting
->
getInt
(
"RatePressure"
);
setChecked
(
true
);
}
else
{
m_rate
=
setting
->
getInt
(
"RateValue"
);
}
}
quint8
KisPressureRateOption
::
apply
(
quint8
opacity
,
const
KisPaintInformation
&
info
)
const
{
opacity
=
(
m_rate
*
255
)
/
100
;
if
(
isChecked
())
{
opacity
=
qBound
((
qint32
)
OPACITY_TRANSPARENT_U8
,
(
qint32
)(
double
(
opacity
)
*
computeValue
(
info
)
/
PRESSURE_DEFAULT
),
(
qint32
)
OPACITY_OPAQUE_U8
);
}
return
opacity
;
}
krita/plugins/paintops/libpaintop/kis_pressure_rate_option.h
deleted
100644 → 0
View file @
f377730c
/* This file is part of the KDE project
* Copyright (C) Boudewijn Rempt <boud@valdyas.org>, (C) 2008
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KIS_PRESSURE_RATE_OPTION_H
#define KIS_PRESSURE_RATE_OPTION_H
#include "kis_curve_option.h"
#include <kis_paint_information.h>
#include <krita_export.h>
#include <kis_types.h>
class
QSlider
;
class
KisPropertiesConfiguration
;
/**
* The pressure opacity option defines a curve that is used to
* calculate the effect of pressure on the rate of the dab
*/
class
PAINTOP_EXPORT
KisPressureRateOption
:
public
KisCurveOption
{
public:
KisPressureRateOption
();
/**
* Set the opacity of the painter based on the rate
* and the curve (if checked) and return the old opacity
* of the painter.
*/
quint8
apply
(
quint8
opacity
,
const
KisPaintInformation
&
info
)
const
;
virtual
void
writeOptionSetting
(
KisPropertiesConfiguration
*
setting
)
const
;
virtual
void
readOptionSetting
(
const
KisPropertiesConfiguration
*
setting
);
void
setRate
(
int
rate
);
int
rate
()
const
;
private:
int
m_rate
;
};
#endif
krita/plugins/paintops/libpaintop/kis_pressure_rate_option_widget.cpp
deleted
100644 → 0
View file @
f377730c
/* This file is part of the KDE project
* Copyright (C) Boudewijn Rempt <boud@valdyas.org>, (C) 2008
* Copyright (C) Sven Langkamp <sven.langkamp@gmail.com>, (C) 2009
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "kis_pressure_rate_option_widget.h"
#include <QWidget>
#include <QCheckBox>
#include <QLabel>
#include <QSlider>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <klocale.h>
#include "kis_pressure_rate_option.h"
KisPressureRateOptionWidget
::
KisPressureRateOptionWidget
()
:
KisCurveOptionWidget
(
new
KisPressureRateOption
())
{
QWidget
*
w
=
new
QWidget
;
QLabel
*
rateLabel
=
new
QLabel
(
i18n
(
"Rate: "
));
m_rateSlider
=
new
QSlider
();
m_rateSlider
->
setMinimum
(
0
);
m_rateSlider
->
setMaximum
(
100
);
m_rateSlider
->
setPageStep
(
1
);
m_rateSlider
->
setValue
(
90
);
m_rateSlider
->
setOrientation
(
Qt
::
Horizontal
);
connect
(
m_rateSlider
,
SIGNAL
(
valueChanged
(
int
)),
SLOT
(
rateChanged
(
int
)));
QHBoxLayout
*
hl
=
new
QHBoxLayout
;
hl
->
addWidget
(
rateLabel
);
hl
->
addWidget
(
m_rateSlider
);
QVBoxLayout
*
vl
=
new
QVBoxLayout
;
vl
->
addLayout
(
hl
);
vl
->
addWidget
(
curveWidget
());
w
->
setLayout
(
vl
);
setConfigurationPage
(
w
);
rateChanged
(
m_rateSlider
->
value
());
}
void
KisPressureRateOptionWidget
::
readOptionSetting
(
const
KisPropertiesConfiguration
*
setting
)
{
KisCurveOptionWidget
::
readOptionSetting
(
setting
);
m_rateSlider
->
setValue
(
static_cast
<
KisPressureRateOption
*>
(
curveOption
())
->
rate
());
}
void
KisPressureRateOptionWidget
::
rateChanged
(
int
rate
)
{
static_cast
<
KisPressureRateOption
*>
(
curveOption
())
->
setRate
(
rate
);
emit
sigSettingChanged
();
}
krita/plugins/paintops/libpaintop/kis_pressure_rate_option_widget.h
deleted
100644 → 0
View file @
f377730c
/* This file is part of the KDE project
* Copyright (C) Sven Langkamp <sven.langkamp@gmail.com>, (C) 2009
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KIS_PRESSURE_RATE_OPTION_WIDGET_H
#define KIS_PRESSURE_RATE_OPTION_WIDGET_H
#include "kis_curve_option_widget.h"
class
QSlider
;
class
PAINTOP_EXPORT
KisPressureRateOptionWidget
:
public
KisCurveOptionWidget
{
Q_OBJECT
public:
KisPressureRateOptionWidget
();
virtual
void
readOptionSetting
(
const
KisPropertiesConfiguration
*
setting
);
private
slots
:
void
rateChanged
(
int
rate
);
private:
QSlider
*
m_rateSlider
;
};
#endif // KIS_PRESSURE_RATE_OPTION_WIDGET_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment