summaryrefslogtreecommitdiffstats
path: root/krita/plugins/viewplugins/substrate
diff options
context:
space:
mode:
Diffstat (limited to 'krita/plugins/viewplugins/substrate')
-rw-r--r--krita/plugins/viewplugins/substrate/Makefile.am26
-rw-r--r--krita/plugins/viewplugins/substrate/dlg_substrate.cc59
-rw-r--r--krita/plugins/viewplugins/substrate/dlg_substrate.h62
-rw-r--r--krita/plugins/viewplugins/substrate/kis_repeating_substrate.cc0
-rw-r--r--krita/plugins/viewplugins/substrate/kis_repeating_substrate.h69
-rw-r--r--krita/plugins/viewplugins/substrate/kritasubstrate.desktop35
-rw-r--r--krita/plugins/viewplugins/substrate/substrate.cc78
-rw-r--r--krita/plugins/viewplugins/substrate/substrate.h45
-rw-r--r--krita/plugins/viewplugins/substrate/substrate.rc8
-rw-r--r--krita/plugins/viewplugins/substrate/wdgsubstrate.ui221
10 files changed, 0 insertions, 603 deletions
diff --git a/krita/plugins/viewplugins/substrate/Makefile.am b/krita/plugins/viewplugins/substrate/Makefile.am
deleted file mode 100644
index 01927b91..00000000
--- a/krita/plugins/viewplugins/substrate/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-kritarcdir = $(kde_datadir)/kritaplugins
-kritarc_DATA = substrate.rc
-
-EXTRA_DIST = $(kritarc_DATA)
-
-
-INCLUDES = -I$(srcdir)/../../../sdk \
- -I$(srcdir)/../../../core \
- -I$(srcdir)/../../../kritacolor/ \
- -I$(srcdir)/../../../ui \
- -I$/../../../ui \
- $(KOFFICE_INCLUDES) \
- $(all_includes)
-
-kde_module_LTLIBRARIES = kritasubstrate.la
-
-kritasubstrate_la_SOURCES = substrate.cc dlg_substrate.cc wdgsubstrate.ui kis_repeating_substrate.cc
-noinst_HEADERS = wdgsubstrate.h dlg_substrate.h kis_repeating_substrate.h substrate.h
-
-kritasubstrate_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) kritablurfilter_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_QT) -lkdecore -lkdeui -lkjs -lkdefx -lkio -lkparts -L../../../../krita/kritacolor/.libs -lkritacolor -L../../../../krita/core/.libs -lkritaimage \
- -L../../../../krita/ui/.libs -lkritaui -L../../../../lib/kofficeui/.libs -lkofficeui
-kritasubstrate_la_LIBADD = ../../../libkritacommon.la
-
-kde_services_DATA = kritasubstrate.desktop
-
-METASOURCES = AUTO
diff --git a/krita/plugins/viewplugins/substrate/dlg_substrate.cc b/krita/plugins/viewplugins/substrate/dlg_substrate.cc
deleted file mode 100644
index 51de887d..00000000
--- a/krita/plugins/viewplugins/substrate/dlg_substrate.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * dlg_substrate.cc - part of KimageShop^WKrayon^WKrita
- *
- * Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
- *
- * 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.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include <klocale.h>
-
-#include "dlg_substrate.h"
-#include "wdgsubstrate.h"
-
-
-DlgSubstrate::DlgSubstrate( TQWidget * tqparent,
- const char * name)
- : super (tqparent, name, true, i18n("Color Range"), Ok | Cancel, Ok)
-{
- m_previewPix = TQPixmap();
- m_page = new WdgSubstrate(this, "substrate");
- Q_CHECK_PTR(m_page);
- setCaption(i18n("Substrate"));
- setMainWidget(m_page);
- resize(m_page -> size());
-
- connect(this, TQT_SIGNAL(okClicked()),
- this, TQT_SLOT(okClicked()));
-}
-
-DlgSubstrate::~DlgSubstrate()
-{
- delete m_page;
-}
-
-void DlgSubstrate::setPixmap(TQPixmap pix)
-{
- m_previewPix = pix;
- m_previewPix.detach();
-}
-
-void DlgSubstrate::okClicked()
-{
- accept();
-}
-
-#include "dlg_substrate.moc"
-
diff --git a/krita/plugins/viewplugins/substrate/dlg_substrate.h b/krita/plugins/viewplugins/substrate/dlg_substrate.h
deleted file mode 100644
index 869eaafa..00000000
--- a/krita/plugins/viewplugins/substrate/dlg_substrate.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * dlg_substrate.h -- part of KimageShop^WKrayon^WKrita
- *
- * Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
- *
- * 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.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-#ifndef DLG_SUBSTRATE
-#define DLG_SUBSTRATE
-
-#include <tqpixmap.h>
-
-#include <kdialogbase.h>
-
-#include "wdgsubstrate.h"
-
-
-/**
- * This dialog allows the user to modify a layer or a selection
- * by adding more colour in a particular channel or lighten or
- * darken an image.
- */
-class DlgSubstrate: public KDialogBase {
-
- typedef KDialogBase super;
- Q_OBJECT
- TQ_OBJECT
-
-public:
-
- DlgSubstrate(TQWidget * tqparent = 0,
- const char* name = 0);
- ~DlgSubstrate();
-
- /**
- * Set the initial preview pixmap
- */
- void setPixmap(TQPixmap pix);
-
-private slots:
-
- void okClicked();
-
-private:
-
- WdgSubstrate * m_page;
- TQPixmap m_previewPix;
-};
-
-#endif // DLG_SUBSTRATE
diff --git a/krita/plugins/viewplugins/substrate/kis_repeating_substrate.cc b/krita/plugins/viewplugins/substrate/kis_repeating_substrate.cc
deleted file mode 100644
index e69de29b..00000000
--- a/krita/plugins/viewplugins/substrate/kis_repeating_substrate.cc
+++ /dev/null
diff --git a/krita/plugins/viewplugins/substrate/kis_repeating_substrate.h b/krita/plugins/viewplugins/substrate/kis_repeating_substrate.h
deleted file mode 100644
index 1a229dc1..00000000
--- a/krita/plugins/viewplugins/substrate/kis_repeating_substrate.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2006 Boudewijn Rempt (boud@valdyas.org)
- *
- * 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.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-#ifndef KIS_SUBSTRATE_H
-#define KIS_SUBSTRATE_H
-
-#include <tqrect.h>
-#include <ksharedptr.h>
-
-class KisImage;
-
-/// All values are normalized to a range between 0 and 1.
-/// XXX: Do we need more?
-struct KisSubstratePixel {
- float height; // absolute height of the current position
- float smoothness; // determines how easily the painting tool "slips" over the surface
- float absorbency; // determines how much wetness the substrate can absorb. XXX: How about speed of absorbing?
- float r; //.Red component of reflectivity
- float g; // Green component of reflectivity
- float b; // Blue component of reflectivity
- float transmittance; // Similar to alpha. XXX: Ask Leonardo about this.
-};
-
-/**
- * This abstract class defines the properties of a substrate -- that is, the simulation
- * of the paper or canvas for natural media.
- *
- * Subclass this interface to define a specific type of substrate: repeating,
- * or full-size, with specific and cool ways of generating the surface, or
- * maybe based on scans of real substrates.
- */
-class KisSubstrate : public KShared {
-
-public:
-
- KisSubstrate(KisImage * /*img*/) : KShared() {};
- virtual ~KisSubstrate() {};
-
-
- /**
- * Copy the pixel values in the specified rect into an array of Substrate.
- * Make sure the array is big enough!
- */
- virtual void getPixels(KisSubstratePixel * /*substrate*/, const TQRect & /*rc*/) = 0;
-
- /**
- * Return a pointer to the substrate at the specified position. Note that
- * you cannot do pointe arithmetic with this value: the position of the
- * neighbouring pixels cannot be determined from this value
- */
- virtual KisSubstratePixel * getPixel(uint x, uint y) = 0;
-
-};
-
-#endif
diff --git a/krita/plugins/viewplugins/substrate/kritasubstrate.desktop b/krita/plugins/viewplugins/substrate/kritasubstrate.desktop
deleted file mode 100644
index 85e58263..00000000
--- a/krita/plugins/viewplugins/substrate/kritasubstrate.desktop
+++ /dev/null
@@ -1,35 +0,0 @@
-[Desktop Entry]
-Name=Substrate
-Name[bg]=Основа
-Name[ca]=Substrat
-Name[da]=Substrat
-Name[de]=Träger
-Name[el]=Υπόστρωμα
-Name[es]=Sustrato
-Name[et]=Substraat
-Name[fa]=زیربنا
-Name[fy]=Substraat
-Name[ga]=Foshraith
-Name[gl]=Substrato
-Name[hu]=Szubsztrát
-Name[it]=Substrato
-Name[ja]=下地
-Name[nb]=Substrat
-Name[nds]=Wassboden
-Name[ne]=जीवाधार
-Name[nl]=Substraat
-Name[pl]=Wycięcie
-Name[pt]=Substrato
-Name[pt_BR]=Substrato
-Name[ru]=Подложка
-Name[sk]=Substrát
-Name[sl]=Substrat
-Name[sr]=Супстрат
-Name[sr@Latn]=Supstrat
-Name[sv]=Substrat
-Name[uk]=Підложка
-Name[zh_TW]=基底
-ServiceTypes=Krita/ViewPlugin
-Type=Service
-X-KDE-Library=kritasubstrate
-X-Krita-Version=2
diff --git a/krita/plugins/viewplugins/substrate/substrate.cc b/krita/plugins/viewplugins/substrate/substrate.cc
deleted file mode 100644
index 996516e1..00000000
--- a/krita/plugins/viewplugins/substrate/substrate.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2006 Boudewijn Rempt (boud@valdyas.org)
- *
- * 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.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-#include <math.h>
-
-#include <stdlib.h>
-
-#include <tqslider.h>
-#include <tqpoint.h>
-
-#include <klocale.h>
-#include <kiconloader.h>
-#include <kinstance.h>
-#include <kmessagebox.h>
-#include <kstandarddirs.h>
-#include <ktempfile.h>
-#include <kdebug.h>
-#include <kgenericfactory.h>
-
-#include <kis_doc.h>
-#include <kis_image.h>
-#include <kis_layer.h>
-#include <kis_global.h>
-#include <kis_types.h>
-#include <kis_view.h>
-
-#include "substrate.h"
-#include "dlg_substrate.h"
-
-typedef KGenericFactory<SubstratePlugin> SubstrateFactory;
-K_EXPORT_COMPONENT_FACTORY( kritasubstrate, SubstrateFactory( "krita" ) )
-
-SubstratePlugin::SubstratePlugin(TQObject *tqparent, const char *name, const TQStringList &)
- : KParts::Plugin(tqparent, name)
-{
-
- if ( tqparent->inherits("KisView") )
- {
- setInstance(SubstrateFactory::instance());
- setXMLFile(locate("data","kritaplugins/substrate.rc"), true);
-
- (void) new KAction(i18n("&Substrate..."), 0, 0, this, TQT_SLOT(slotSubstrateActivated()), actionCollection(), "substrate");
-
- m_view = (KisView*) tqparent;
- }
-}
-
-SubstratePlugin::~SubstratePlugin()
-{
-}
-
-void SubstratePlugin::slotSubstrateActivated()
-{
- DlgSubstrate * dlgSubstrate = new DlgSubstrate(m_view, "Substrate");
- Q_CHECK_PTR(dlgSubstrate);
- if (dlgSubstrate -> exec() == TQDialog::Accepted) {
- // Retrieve changes made by dialog
- // Apply changes to layer (selection)
- }
- delete dlgSubstrate;
-}
-
-#include "substrate.moc"
-
diff --git a/krita/plugins/viewplugins/substrate/substrate.h b/krita/plugins/viewplugins/substrate/substrate.h
deleted file mode 100644
index 2d00e234..00000000
--- a/krita/plugins/viewplugins/substrate/substrate.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * substrate.h -- Part of Krita
- *
- * Copyright (c) 2006 Boudewijn Rempt (boud@valdyas.org)
- *
- * 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.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef SUBSTATE_H
-#define SUBSTATE_H
-
-#include <kparts/plugin.h>
-
-class KisView;
-
-class SubstratePlugin : public KParts::Plugin
-{
- Q_OBJECT
- TQ_OBJECT
-public:
- SubstratePlugin(TQObject *tqparent, const char *name, const TQStringList &);
- virtual ~SubstratePlugin();
-
-private slots:
- void slotSubstrateActivated();
-
-private:
- KisView * m_view;
- KisPainter * m_painter;
-
-};
-
-#endif // SUBSTATE_H
diff --git a/krita/plugins/viewplugins/substrate/substrate.rc b/krita/plugins/viewplugins/substrate/substrate.rc
deleted file mode 100644
index 4251e87f..00000000
--- a/krita/plugins/viewplugins/substrate/substrate.rc
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui library="kritasubstrate" version="1">
-<MenuBar>
- <Menu name="Image"><text>Image</text>
- <Action name="substrate"/>
- </Menu>
-</MenuBar>
-</kpartgui>
diff --git a/krita/plugins/viewplugins/substrate/wdgsubstrate.ui b/krita/plugins/viewplugins/substrate/wdgsubstrate.ui
deleted file mode 100644
index be0713ed..00000000
--- a/krita/plugins/viewplugins/substrate/wdgsubstrate.ui
+++ /dev/null
@@ -1,221 +0,0 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>WdgSubstrate</class>
-<widget class="TQWidget">
- <property name="name">
- <cstring>Form1</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>478</width>
- <height>358</height>
- </rect>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="TQButtonGroup" row="0" column="0">
- <property name="name">
- <cstring>grpCustom</cstring>
- </property>
- <property name="title">
- <string>Custom Canvas Definition</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="TQLayoutWidget">
- <property name="name">
- <cstring>tqlayout3</cstring>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="TQComboBox" row="0" column="1" rowspan="1" colspan="2">
- <item>
- <property name="text">
- <string>Custom</string>
- </property>
- </item>
- <property name="name">
- <cstring>cmbPredefinedCanvases</cstring>
- </property>
- </widget>
- <widget class="KColorButton" row="2" column="2">
- <property name="name">
- <cstring>bnBackground</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- </widget>
- <widget class="TQLabel" row="1" column="0">
- <property name="name">
- <cstring>textLabel1</cstring>
- </property>
- <property name="text">
- <string>Save custom substrate as:</string>
- </property>
- </widget>
- <widget class="TQLabel" row="0" column="0">
- <property name="name">
- <cstring>lblPredefined</cstring>
- </property>
- <property name="text">
- <string>&amp;Pre-defined canvas types:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>cmbPredefinedCanvases</cstring>
- </property>
- </widget>
- <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>lblColor</cstring>
- </property>
- <property name="text">
- <string>&amp;Basic color:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>bnBackground</cstring>
- </property>
- </widget>
- <widget class="TQLineEdit" row="1" column="1" rowspan="1" colspan="2">
- <property name="name">
- <cstring>lineEdit1</cstring>
- </property>
- </widget>
- </grid>
- </widget>
- <widget class="TQLayoutWidget">
- <property name="name">
- <cstring>tqlayout2</cstring>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="TQSlider" row="3" column="1">
- <property name="name">
- <cstring>slAbsorbency</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- </widget>
- <widget class="TQSlider" row="2" column="1">
- <property name="name">
- <cstring>slFiber</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- </widget>
- <widget class="TQLabel" row="1" column="2">
- <property name="name">
- <cstring>textLabel9</cstring>
- </property>
- <property name="text">
- <string>Grainy</string>
- </property>
- </widget>
- <widget class="TQLabel" row="0" column="0">
- <property name="name">
- <cstring>lblSmoothness</cstring>
- </property>
- <property name="text">
- <string>&amp;Smooth:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>slSlippery</cstring>
- </property>
- </widget>
- <widget class="TQLabel" row="3" column="0">
- <property name="name">
- <cstring>lblAbsorbency</cstring>
- </property>
- <property name="text">
- <string>&amp;Water repellant:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>slAbsorbency</cstring>
- </property>
- </widget>
- <widget class="TQSlider" row="0" column="1">
- <property name="name">
- <cstring>slSlippery</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- </widget>
- <widget class="TQLabel" row="1" column="0">
- <property name="name">
- <cstring>lblHeight</cstring>
- </property>
- <property name="text">
- <string>&amp;Flat:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>slHeight</cstring>
- </property>
- </widget>
- <widget class="TQLabel" row="2" column="0">
- <property name="name">
- <cstring>lblFiber</cstring>
- </property>
- <property name="text">
- <string>Fine &amp;fiber:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>slFiber</cstring>
- </property>
- </widget>
- <widget class="TQLabel" row="0" column="2">
- <property name="name">
- <cstring>lblRough</cstring>
- </property>
- <property name="text">
- <string>Rough</string>
- </property>
- </widget>
- <widget class="TQSlider" row="1" column="1">
- <property name="name">
- <cstring>slHeight</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- </widget>
- <widget class="TQLabel" row="3" column="2">
- <property name="name">
- <cstring>textLabel11</cstring>
- </property>
- <property name="text">
- <string>Absorbent</string>
- </property>
- </widget>
- <widget class="TQLabel" row="2" column="2">
- <property name="name">
- <cstring>textLabel10</cstring>
- </property>
- <property name="text">
- <string>Coarse</string>
- </property>
- </widget>
- </grid>
- </widget>
- </vbox>
- </widget>
- </grid>
-</widget>
-<customwidgets>
-</customwidgets>
-<tqlayoutdefaults spacing="6" margin="11"/>
-<includehints>
- <includehint>kcolorbutton.h</includehint>
-</includehints>
-</UI>