chalk

kis_filter_manager.h
1/*
2 * Copyright (c) 2005 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19#ifndef _KIS_FILTER_MANAGER_
20#define _KIS_FILTER_MANAGER_
21
22#include "tqdict.h"
23#include "tqobject.h"
24#include "tqptrlist.h"
25#include "tqsignalmapper.h"
26#include "tdeactionclasses.h"
27#include "kis_image.h"
28#include "kis_selection.h"
29
30#include <koffice_export.h>
31
32class TDEAction;
33class KisView;
34class KisDoc;
35class KisFilter;
37class TDEAction;
38class TDEActionCollection;
39class KisPreviewDialog;
40
44class KRITACORE_EXPORT KisFilterManager : public TQObject {
45
46 TQ_OBJECT
47
48
49public:
50
51 KisFilterManager(KisView * parent, KisDoc * doc);
53
54 void setup(TDEActionCollection * ac);
55 void updateGUI();
56
57
58 bool apply();
59
60protected slots:
61
62 void slotApply();
63 void slotConfigChanged();
64 void slotApplyFilter(int);
65 void refreshPreview();
66
67private:
68
69 KisView * m_view;
70 KisDoc * m_doc;
71
72 TDEAction * m_reapplyAction;
73
74 TQPtrList<TDEAction> m_filterActions;
75
76 KisFilterConfiguration * m_lastFilterConfig;
77 KisFilter * m_lastFilter;
78 KisPreviewDialog * m_lastDialog;
79 KisFilterConfigWidget * m_lastWidget;
80
81 KisIDList m_filterList; // Map the actions in the signalmapper to the filters
82 TQSignalMapper * m_filterMapper;
83
84 TQDict<TDEActionMenu> m_filterActionMenus;
85};
86
87#endif
A KisFilterConfiguration is the serializable representation of the filter parameters.
Create all the filter actions for the specified view and implement re-apply filter.
Basic interface of a Chalk filter.
Definition kis_filter.h:46