79 changes: 79 additions & 0 deletions src/plugins/filters/window/filterwindow.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/***************************************************************************
* *
* copyright : (C) 2007 The University of Toronto *
* netterfield@astro.utoronto.ca *
* copyright : (C) 2005 University of British Columbia *
* dscott@phas.ubc.ca *
* *
* 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. *
* *
***************************************************************************/

#ifndef FILTERUNWINDPLUGIN_H
#define FILTERUNWINDPLUGIN_H

#include <QFile>

#include <basicplugin.h>
#include <dataobjectplugin.h>

class FilterWindowSource : public Kst::BasicPlugin {
Q_OBJECT

public:
virtual QString _automaticDescriptiveName() const;

virtual QString descriptionTip() const;

Kst::VectorPtr vector() const;
Kst::ScalarPtr minimumScalar() const;
Kst::ScalarPtr maximumScalar() const;

virtual void change(Kst::DataObjectConfigWidget *configWidget);

void setupOutputs();
virtual bool algorithm();

virtual QStringList inputVectorList() const;
virtual QStringList inputScalarList() const;
virtual QStringList inputStringList() const;
virtual QStringList outputVectorList() const;
virtual QStringList outputScalarList() const;
virtual QStringList outputStringList() const;

virtual void saveProperties(QXmlStreamWriter &s);

protected:
FilterWindowSource(Kst::ObjectStore *store);
~FilterWindowSource();

friend class Kst::ObjectStore;


};


class FilterWindowPlugin : public QObject, public Kst::DataObjectPluginInterface {
Q_OBJECT
Q_INTERFACES(Kst::DataObjectPluginInterface)
Q_PLUGIN_METADATA(IID "com.kst.DataObjectPluginInterface/2.0")
public:
virtual ~FilterWindowPlugin() {}

virtual QString pluginName() const;
virtual QString pluginDescription() const;

virtual DataObjectPluginInterface::PluginTypeID pluginType() const { return Filter; }

virtual bool hasConfigWidget() const { return true; }

virtual Kst::DataObject *create(Kst::ObjectStore *store, Kst::DataObjectConfigWidget *configWidget, bool setupInputsOutputs = true) const;

virtual Kst::DataObjectConfigWidget *configWidget(QSettings *settingsObject) const;
};

#endif
// vim: ts=2 sw=2 et
110 changes: 110 additions & 0 deletions src/plugins/filters/window/filterwindowconfig.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FilterUnwindConfig</class>
<widget class="QWidget" name="FilterUnwindConfig">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>89</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>400</width>
<height>0</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Input Vector:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Kst::VectorSelector" name="_vector" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string comment="the minimum value">Minimum:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Kst::ScalarSelector" name="_scalarMinumum" native="true"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string comment="the maximum value">Maximum:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Kst::ScalarSelector" name="_scalarMaximum" native="true"/>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>Kst::VectorSelector</class>
<extends>QWidget</extends>
<header>vectorselector.h</header>
</customwidget>
<customwidget>
<class>Kst::ScalarSelector</class>
<extends>QWidget</extends>
<header>scalarselector.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
36 changes: 36 additions & 0 deletions src/plugins/filters/window/kstplugin_filter_unwind.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[Desktop Entry]
Type=Service
ServiceTypes=Kst Data Object
X-KDE-ModuleType=Plugin
X-KDE-Library=filterunwind
X-Kst-Plugin-Author=C. Barth Netterfield
Name=Filter - Unwind Plugin
Name[bs]=Filter-odmotavanja dodatak
Name[ca]=Filtre - Connector d'eliminació de pics angulars
Name[ca@valencia]=Filtre - Connector d'eliminació de pics angulars
Name[de]=Filter - Abwicklungsmodul
Name[en_GB]=Filter - Unwind Plugin
Name[fr]=Module de filtre de déroulage d'angle
Name[it]=Estensione filtro di rimozione
Name[nl]=Filter - Unwind Plugin
Name[pl]=Wtyczka filtra odwinięcia
Name[pt]='Plugin' de Filtro de Eliminação de Picos Angulares
Name[pt_BR]=Plugin de filtro de eliminação de picos angulares
Name[sv]=Filter - Insticksprogram för avnystning
Name[uk]=Додаток фільтрування з розгортанням
Name[x-test]=xxFilter - Unwind Pluginxx
Comment=Implements an angle unwind Filter Plugin for Kst.
Comment[bs]=Implementira Filter-odmotavanja dodatak za Kst.
Comment[ca]=Implementa un connector de filtre d'eliminació de pics angulars pel Kst.
Comment[ca@valencia]=Implementa un connector de filtre d'eliminació de pics angulars pel Kst.
Comment[de]=Implementiert ein Filtermodul zur Abwicklung von Winkeln für Kst.
Comment[en_GB]=Implements an angle unwind Filter Plugin for Kst.
Comment[fr]=Implémente un module de filtre de déroulage d'angle pour Kst.
Comment[it]=Implementa un'estensione filtro di rimozione per Kst.
Comment[nl]=Implementeert een plugin voor een gegevensobject in Kst voor hoekafwikkeling.
Comment[pl]=Implementuje wtyczkę obiektu danych filtra odwinięcia dla Kst.
Comment[pt]=Implementa um 'plugin' de objectos de dados para a remoção de picos angulares no Kst.
Comment[pt_BR]=Implementa um plugin de objetos de dados para remoção de picos angulares no Kst.
Comment[sv]=Implementerar ett Kst insticksprogram för vinkelavnystning.
Comment[uk]=Реалізує додаток для фільтрування з розгортанням за кутом у Kst.
Comment[x-test]=xxImplements an angle unwind Filter Plugin for Kst.xx
11 changes: 11 additions & 0 deletions src/plugins/filters/window/window.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include(../../plugins_sub.pri)

TARGET = $$kstlib(kstplugin_filterwindow)

SOURCES += \
filterwindow.cpp

HEADERS += \
filterwindow.h

FORMS += filterwindowconfig.ui