Commit a4588987 authored by Cyrille Berger's avatar Cyrille Berger

Fix: translations of filter categories not appearing in the menu.

CCMAIL:kde-i18n-doc@kde.org

svn path=/trunk/koffice/; revision=937515
parent fa5c238d
......@@ -27,16 +27,55 @@
#include "kis_selection.h"
#include "kis_types.h"
const KoID KisFilter::CategoryAdjust = KoID("adjust_filters", i18n("Adjust"));
const KoID KisFilter::CategoryArtistic = KoID("artistic_filters", i18n("Artistic"));
const KoID KisFilter::CategoryBlur = KoID("blur_filters", i18n("Blur"));
const KoID KisFilter::CategoryColors = KoID("color_filters", i18n("Colors"));
const KoID KisFilter::CategoryEdgeDetection = KoID("edge_filters", i18n("Edge Detection"));
const KoID KisFilter::CategoryEmboss = KoID("emboss_filters", i18n("Emboss"));
const KoID KisFilter::CategoryEnhance = KoID("enhance_filters", i18n("Enhance"));
const KoID KisFilter::CategoryMap = KoID("map_filters", i18n("Map"));
const KoID KisFilter::CategoryNonPhotorealistic = KoID("nonphotorealistic_filters", i18n("Non-photorealistic"));
const KoID KisFilter::CategoryOther = KoID("other_filters", i18n("Other"));
KoID KisFilter::categoryAdjust()
{
return KoID("adjust_filters", i18n("Adjust"));
}
KoID KisFilter::categoryArtistic()
{
return KoID("artistic_filters", i18n("Artistic"));
}
KoID KisFilter::categoryBlur()
{
return KoID("blur_filters", i18n("Blur"));
}
KoID KisFilter::categoryColors()
{
return KoID("color_filters", i18n("Colors"));
}
KoID KisFilter::categoryEdgeDetection()
{
return KoID("edge_filters", i18n("Edge Detection"));
}
KoID KisFilter::categoryEmboss()
{
return KoID("emboss_filters", i18n("Emboss"));
}
KoID KisFilter::categoryEnhance()
{
return KoID("enhance_filters", i18n("Enhance"));
}
KoID KisFilter::categoryMap()
{
return KoID("map_filters", i18n("Map"));
}
KoID KisFilter::categoryNonPhotorealistic()
{
return KoID("nonphotorealistic_filters", i18n("Non-photorealistic"));
}
KoID KisFilter::categoryOther()
{
return KoID("other_filters", i18n("Other"));
}
KisFilter::KisFilter(const KoID& id, const KoID & category, const QString & entry)
......
......@@ -42,16 +42,16 @@ class KRITAIMAGE_EXPORT KisFilter : public KisBaseProcessor
{
public:
static const KoID CategoryAdjust;
static const KoID CategoryArtistic;
static const KoID CategoryBlur;
static const KoID CategoryColors;
static const KoID CategoryEdgeDetection;
static const KoID CategoryEmboss;
static const KoID CategoryEnhance;
static const KoID CategoryMap;
static const KoID CategoryNonPhotorealistic;
static const KoID CategoryOther;
static KoID categoryAdjust();
static KoID categoryArtistic();
static KoID categoryBlur();
static KoID categoryColors();
static KoID categoryEdgeDetection();
static KoID categoryEmboss();
static KoID categoryEnhance();
static KoID categoryMap();
static KoID categoryNonPhotorealistic();
static KoID categoryOther();
public:
......
......@@ -36,7 +36,7 @@
#include <kis_processing_information.h>
#include "kis_mask_generator.h"
KisBlurFilter::KisBlurFilter() : KisFilter(id(), CategoryBlur, i18n("&Blur..."))
KisBlurFilter::KisBlurFilter() : KisFilter(id(), categoryBlur(), i18n("&Blur..."))
{
setSupportsPainting(true);
setSupportsPreview(true);
......
......@@ -90,7 +90,7 @@ KritaBumpmap::~KritaBumpmap()
}
KisFilterBumpmap::KisFilterBumpmap()
: KisFilter(KoID("bumpmap", i18n("Bumpmap")), KisFilter::CategoryMap, i18n("&Bumpmap..."))
: KisFilter(KoID("bumpmap", i18n("Bumpmap")), KisFilter::categoryMap(), i18n("&Bumpmap..."))
{
setColorSpaceIndependence(TO_LAB16);
setSupportsPainting(true);
......@@ -219,7 +219,7 @@ void KisFilterBumpmap::process(KisConstProcessingInformation srcInfo,
// Crate a grayscale layer from the bumpmap layer.
QRect bmRect;
const KisPaintDevice * bumpmap;
const KisPaintDevice * bumpmap = 0;
KisNodeSP node = config->getProperty("source_layer").value<KisNodeSP>();
if (node) {
......
......@@ -35,7 +35,7 @@
#include "ui_wdgcolortoalphabase.h"
#include "kis_wdg_color_to_alpha.h"
KisFilterColorToAlpha::KisFilterColorToAlpha() : KisFilter(id(), CategoryColors, i18n("&Color to Alpha..."))
KisFilterColorToAlpha::KisFilterColorToAlpha() : KisFilter(id(), categoryColors(), i18n("&Color to Alpha..."))
{
setSupportsPainting(true);
setSupportsPreview(true);
......
......@@ -65,7 +65,7 @@ void minimize(const quint8* s, quint8* d, uint nbpixels)
}
}
KisFilterMax::KisFilterMax() : KisFilter(id(), CategoryColors, i18n("M&aximize Channel"))
KisFilterMax::KisFilterMax() : KisFilter(id(), categoryColors(), i18n("M&aximize Channel"))
{
setSupportsPainting(true);
setSupportsPreview(true);
......@@ -119,7 +119,7 @@ void KisFilterMax::process(KisConstProcessingInformation srcInfo,
}
}
KisFilterMin::KisFilterMin() : KisFilter(id(), CategoryColors, i18n("M&inimize Channel"))
KisFilterMin::KisFilterMin() : KisFilter(id(), categoryColors(), i18n("M&inimize Channel"))
{
setSupportsPainting(true);
setSupportsPreview(true);
......
......@@ -87,7 +87,7 @@ ColorsFilters::~ColorsFilters()
//==================================================================
KisAutoContrast::KisAutoContrast() : KisFilter(id(), CategoryAdjust, i18n("&Auto Contrast"))
KisAutoContrast::KisAutoContrast() : KisFilter(id(), categoryAdjust(), i18n("&Auto Contrast"))
{
setSupportsPreview(true);
setSupportsPainting(false);
......@@ -241,7 +241,7 @@ void KisAutoContrast::process(KisConstProcessingInformation srcInfo,
//==================================================================
KisDesaturateFilter::KisDesaturateFilter()
: KisFilter(id(), CategoryAdjust, i18n("&Desaturate"))
: KisFilter(id(), categoryAdjust(), i18n("&Desaturate"))
{
}
......
......@@ -154,7 +154,7 @@ QString KisBrightnessContrastFilterConfiguration::toString()
}
KisBrightnessContrastFilter::KisBrightnessContrastFilter()
: KisFilter(id(), CategoryAdjust, i18n("&Brightness/Contrast curve..."))
: KisFilter(id(), categoryAdjust(), i18n("&Brightness/Contrast curve..."))
{
setSupportsPainting(true);
setSupportsPreview(true);
......
......@@ -28,7 +28,7 @@
#include <kis_processing_information.h>
KisHSVAdjustmentFilter::KisHSVAdjustmentFilter()
: KisFilter(id(), CategoryAdjust, i18n("&HSV Adjustment..."))
: KisFilter(id(), categoryAdjust(), i18n("&HSV Adjustment..."))
{
setSupportsPainting(true);
setSupportsPreview(true);
......
......@@ -398,7 +398,7 @@ QString KisPerChannelFilterConfiguration::toString()
return doc.toString();
}
KisPerChannelFilter::KisPerChannelFilter() : KisFilter(id(), CategoryAdjust, i18n("&Color Adjustment curves..."))
KisPerChannelFilter::KisPerChannelFilter() : KisFilter(id(), categoryAdjust(), i18n("&Color Adjustment curves..."))
{
setSupportsPainting(true);
setSupportsPreview(true);
......
......@@ -30,8 +30,6 @@
#include "ui_wdg_perchannel.h"
enum Qt::Orientation;
class WdgPerChannel : public QWidget, public Ui::WdgPerChannel
{
Q_OBJECT
......
......@@ -84,7 +84,7 @@ KritaConvolutionFilters::~KritaConvolutionFilters()
}
KisGaussianBlurFilter::KisGaussianBlurFilter()
: KisConvolutionFilter(id(), CategoryBlur, i18n("&Gaussian Blur"))
: KisConvolutionFilter(id(), categoryBlur(), i18n("&Gaussian Blur"))
{
m_matrix = createKernel(1, 2, 1, 2, 4, 2, 1, 2, 1, 16, 0);
setSupportsPainting(true);
......@@ -94,7 +94,7 @@ KisGaussianBlurFilter::KisGaussianBlurFilter()
KisSharpenFilter::KisSharpenFilter()
: KisConvolutionFilter(id(), CategoryEnhance, i18n("&Sharpen"))
: KisConvolutionFilter(id(), categoryEnhance(), i18n("&Sharpen"))
{
setSupportsPainting(true);
setSupportsIncrementalPainting(false);
......@@ -103,49 +103,49 @@ KisSharpenFilter::KisSharpenFilter()
}
KisMeanRemovalFilter::KisMeanRemovalFilter()
: KisConvolutionFilter(id(), CategoryEnhance, i18n("&Mean Removal"))
: KisConvolutionFilter(id(), categoryEnhance(), i18n("&Mean Removal"))
{
setSupportsPainting(false);
m_matrix = createKernel(-1, -1, -1, -1, 9, -1, -1, -1, -1, 1, 0);
}
KisEmbossLaplascianFilter::KisEmbossLaplascianFilter()
: KisConvolutionFilter(id(), CategoryEmboss, i18n("Emboss Laplascian"))
: KisConvolutionFilter(id(), categoryEmboss(), i18n("Emboss Laplascian"))
{
setSupportsPainting(false);
m_matrix = createKernel(-1, 0, -1 , 0, 4, 0 , -1, 0, -1, 1, 127);
}
KisEmbossInAllDirectionsFilter::KisEmbossInAllDirectionsFilter()
: KisConvolutionFilter(id(), CategoryEmboss, i18n("Emboss in All Directions"))
: KisConvolutionFilter(id(), categoryEmboss(), i18n("Emboss in All Directions"))
{
setSupportsPainting(false);
m_matrix = createKernel(-1, -1, -1 , -1, 8, -1 , -1, -1, -1, 1, 127);
}
KisEmbossHorizontalVerticalFilter::KisEmbossHorizontalVerticalFilter()
: KisConvolutionFilter(id(), CategoryEmboss, i18n("Emboss Horizontal && Vertical"))
: KisConvolutionFilter(id(), categoryEmboss(), i18n("Emboss Horizontal && Vertical"))
{
setSupportsPainting(false);
m_matrix = createKernel(0, -1, 0 , -1, 4, -1 , 0, -1, 0, 1, 127);
}
KisEmbossVerticalFilter::KisEmbossVerticalFilter()
: KisConvolutionFilter(id(), CategoryEmboss, i18n("Emboss Vertical Only"))
: KisConvolutionFilter(id(), categoryEmboss(), i18n("Emboss Vertical Only"))
{
setSupportsPainting(false);
m_matrix = createKernel(0, -1, 0 , 0, 2, 0 , 0, -1, 0, 1, 127);
}
KisEmbossHorizontalFilter::KisEmbossHorizontalFilter() :
KisConvolutionFilter(id(), CategoryEmboss, i18n("Emboss Horizontal Only"))
KisConvolutionFilter(id(), categoryEmboss(), i18n("Emboss Horizontal Only"))
{
setSupportsPainting(false);
m_matrix = createKernel(0, 0, 0 , -1, 4, -1 , 0, 0, 0, 1, 127);
}
KisEmbossDiagonalFilter::KisEmbossDiagonalFilter()
: KisConvolutionFilter(id(), CategoryEdgeDetection, i18n("Top Edge Detection"))
: KisConvolutionFilter(id(), categoryEdgeDetection(), i18n("Top Edge Detection"))
{
setSupportsPainting(false);
m_matrix = createKernel(-1, 0, -1 , 0, 4, 0 , -1, 0, -1, 1, 127);
......@@ -153,7 +153,7 @@ KisEmbossDiagonalFilter::KisEmbossDiagonalFilter()
KisTopEdgeDetectionFilter::KisTopEdgeDetectionFilter()
: KisConvolutionFilter(id(), CategoryEdgeDetection, i18n("Top Edge Detection"))
: KisConvolutionFilter(id(), categoryEdgeDetection(), i18n("Top Edge Detection"))
{
setSupportsPainting(false);
m_matrix = createKernel(1, 1, 1 , 0, 0, 0 , -1, -1, -1, 1, 127);
......@@ -161,19 +161,19 @@ KisTopEdgeDetectionFilter::KisTopEdgeDetectionFilter()
}
KisRightEdgeDetectionFilter::KisRightEdgeDetectionFilter()
: KisConvolutionFilter(id(), CategoryEdgeDetection, i18n("Right Edge Detection"))
: KisConvolutionFilter(id(), categoryEdgeDetection(), i18n("Right Edge Detection"))
{
setSupportsPainting(false);
m_matrix = createKernel(-1, 0, 1 , -1, 0, 1 , -1, 0, 1, 1, 127);
}
KisBottomEdgeDetectionFilter::KisBottomEdgeDetectionFilter() : KisConvolutionFilter(id(), CategoryEdgeDetection, i18n("Bottom Edge Detection"))
KisBottomEdgeDetectionFilter::KisBottomEdgeDetectionFilter() : KisConvolutionFilter(id(), categoryEdgeDetection(), i18n("Bottom Edge Detection"))
{
setSupportsPainting(false);
m_matrix = createKernel(-1, -1, -1 , 0, 0, 0 , 1, 1, 1, 1, 127);
}
KisLeftEdgeDetectionFilter::KisLeftEdgeDetectionFilter() : KisConvolutionFilter(id(), CategoryEdgeDetection, i18n("Left Edge Detection"))
KisLeftEdgeDetectionFilter::KisLeftEdgeDetectionFilter() : KisConvolutionFilter(id(), categoryEdgeDetection(), i18n("Left Edge Detection"))
{
setSupportsPainting(false);
m_matrix = createKernel(1, 0, -1 , 1, 0, -1 , 1, 0, -1, 1, 127);
......
......@@ -66,7 +66,7 @@
#define CLAMP(x,l,u) ((x)<(l)?(l):((x)>(u)?(u):(x)))
#define SQR(x) ((x) * (x))
KisCubismFilter::KisCubismFilter() : KisFilter(id(), KisFilter::CategoryArtistic, i18n("&Cubism..."))
KisCubismFilter::KisCubismFilter() : KisFilter(id(), KisFilter::categoryArtistic(), i18n("&Cubism..."))
{
setSupportsPainting(false);
setSupportsPreview(true);
......
......@@ -54,7 +54,7 @@
#include "widgets/kis_multi_integer_filter_widget.h"
KisEmbossFilter::KisEmbossFilter() : KisFilter(id(), CategoryEmboss, i18n("&Emboss with Variable Depth..."))
KisEmbossFilter::KisEmbossFilter() : KisFilter(id(), categoryEmboss(), i18n("&Emboss with Variable Depth..."))
{
setSupportsPainting(false);
setSupportsPreview(true);
......
......@@ -63,7 +63,7 @@ KritaExample::~KritaExample()
{
}
KisFilterInvert::KisFilterInvert() : KisFilter(id(), CategoryAdjust, i18n("&Invert"))
KisFilterInvert::KisFilterInvert() : KisFilter(id(), categoryAdjust(), i18n("&Invert"))
{
setColorSpaceIndependence(FULLY_INDEPENDENT);
setSupportsPainting(true);
......
......@@ -57,7 +57,7 @@ FastColorTransferPlugin::~FastColorTransferPlugin()
{
}
KisFilterFastColorTransfer::KisFilterFastColorTransfer() : KisFilter(id(), CategoryColors, i18n("&Color Transfer..."))
KisFilterFastColorTransfer::KisFilterFastColorTransfer() : KisFilter(id(), categoryColors(), i18n("&Color Transfer..."))
{
setColorSpaceIndependence(FULLY_INDEPENDENT);
setSupportsPainting(true);
......
......@@ -34,7 +34,7 @@
#include <kis_selection.h>
KisSimpleNoiseReducer::KisSimpleNoiseReducer()
: KisFilter(id(), CategoryEnhance, i18n("&Gaussian Noise Reduction"))
: KisFilter(id(), categoryEnhance(), i18n("&Gaussian Noise Reduction"))
{
setSupportsPainting(false);
setSupportsPreview(true);
......
......@@ -34,7 +34,7 @@
#include <kis_processing_information.h>
KisWaveletNoiseReduction::KisWaveletNoiseReduction()
: KisFilter(id(), CategoryEnhance, i18n("&Wavelet Noise Reducer"))
: KisFilter(id(), categoryEnhance(), i18n("&Wavelet Noise Reducer"))
{
setSupportsPainting(false);
setSupportsPreview(true);
......
......@@ -72,7 +72,7 @@ KritaLensCorrectionFilter::~KritaLensCorrectionFilter()
{
}
KisFilterLensCorrection::KisFilterLensCorrection() : KisFilter(id(), CategoryOther, i18n("&Lens Correction..."))
KisFilterLensCorrection::KisFilterLensCorrection() : KisFilter(id(), categoryOther(), i18n("&Lens Correction..."))
{
setColorSpaceIndependence(FULLY_INDEPENDENT);
setSupportsPainting(true);
......
......@@ -46,7 +46,7 @@
#include "kis_types.h"
KisLevelFilter::KisLevelFilter()
: KisFilter(id(), CategoryAdjust, i18n("&Levels"))
: KisFilter(id(), categoryAdjust(), i18n("&Levels"))
{
setSupportsPainting(true);
setSupportsPreview(true);
......
......@@ -69,7 +69,7 @@ KritaNoiseFilter::~KritaNoiseFilter()
{
}
KisFilterNoise::KisFilterNoise() : KisFilter(id(), CategoryOther, i18n("&Random Noise..."))
KisFilterNoise::KisFilterNoise() : KisFilter(id(), categoryOther(), i18n("&Random Noise..."))
{
setColorSpaceIndependence(FULLY_INDEPENDENT);
setSupportsPainting(true);
......
......@@ -55,7 +55,7 @@
#include "widgets/kis_multi_integer_filter_widget.h"
KisOilPaintFilter::KisOilPaintFilter() : KisFilter(id(), KisFilter::CategoryArtistic, i18n("&Oilpaint..."))
KisOilPaintFilter::KisOilPaintFilter() : KisFilter(id(), KisFilter::categoryArtistic(), i18n("&Oilpaint..."))
{
setSupportsPainting(true);
setSupportsPreview(true);
......
......@@ -56,7 +56,7 @@
#include "widgets/kis_multi_integer_filter_widget.h"
KisPixelizeFilter::KisPixelizeFilter() : KisFilter(id(), KisFilter::CategoryArtistic, i18n("&Pixelize..."))
KisPixelizeFilter::KisPixelizeFilter() : KisFilter(id(), KisFilter::categoryArtistic(), i18n("&Pixelize..."))
{
setSupportsPainting(true);
setSupportsPreview(true);
......
......@@ -55,7 +55,7 @@
#include "widgets/kis_multi_integer_filter_widget.h"
KisRainDropsFilter::KisRainDropsFilter() : KisFilter(id(), KisFilter::CategoryArtistic, i18n("&Raindrops..."))
KisRainDropsFilter::KisRainDropsFilter() : KisFilter(id(), KisFilter::categoryArtistic(), i18n("&Raindrops..."))
{
setSupportsPainting(false);
setSupportsPreview(true);
......
......@@ -70,7 +70,7 @@ KritaRandomPickFilter::~KritaRandomPickFilter()
{
}
KisFilterRandomPick::KisFilterRandomPick() : KisFilter(id(), CategoryOther, i18n("&Random Pick..."))
KisFilterRandomPick::KisFilterRandomPick() : KisFilter(id(), categoryOther(), i18n("&Random Pick..."))
{
setColorSpaceIndependence(FULLY_INDEPENDENT);
setSupportsPainting(true);
......
......@@ -48,7 +48,7 @@
#include <kis_processing_information.h>
#include <kis_types.h>
KisRoundCornersFilter::KisRoundCornersFilter() : KisFilter(id(), KisFilter::CategoryMap, i18n("&Round Corners..."))
KisRoundCornersFilter::KisRoundCornersFilter() : KisFilter(id(), KisFilter::categoryMap(), i18n("&Round Corners..."))
{
setSupportsPainting(false);
setSupportsPreview(true);
......
......@@ -54,7 +54,7 @@
#include "widgets/kis_multi_integer_filter_widget.h"
KisSmallTilesFilter::KisSmallTilesFilter() : KisFilter(id(), KisFilter::CategoryMap, i18n("&Small Tiles..."))
KisSmallTilesFilter::KisSmallTilesFilter() : KisFilter(id(), KisFilter::categoryMap(), i18n("&Small Tiles..."))
{
setSupportsPainting(true);
setSupportsPreview(true);
......
......@@ -74,7 +74,7 @@
// return KisFilterConfiguration::toString();
// }
KisSobelFilter::KisSobelFilter() : KisFilter(id(), CategoryEdgeDetection, i18n("&Sobel..."))
KisSobelFilter::KisSobelFilter() : KisFilter(id(), categoryEdgeDetection(), i18n("&Sobel..."))
{
setSupportsPainting(false);
setSupportsPreview(true);
......
......@@ -37,7 +37,7 @@
#include "kis_wdg_unsharp.h"
#include "ui_wdgunsharp.h"
KisUnsharpFilter::KisUnsharpFilter() : KisFilter(id(), CategoryEnhance, i18n("&Unsharp Mask..."))
KisUnsharpFilter::KisUnsharpFilter() : KisFilter(id(), categoryEnhance(), i18n("&Unsharp Mask..."))
{
setSupportsPainting(true);
setSupportsPreview(true);
......
......@@ -106,7 +106,7 @@ KritaWaveFilter::~KritaWaveFilter()
{
}
KisFilterWave::KisFilterWave() : KisFilter(id(), CategoryOther, i18n("&Wave..."))
KisFilterWave::KisFilterWave() : KisFilter(id(), categoryOther(), i18n("&Wave..."))
{
setColorSpaceIndependence(FULLY_INDEPENDENT);
setSupportsPainting(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment