filters

kis_raw_import.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,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#ifndef KIS_RAW_IMPORT_H_
21#define KIS_RAW_IMPORT_H_
22
23#include <KoFilter.h>
24
25class TDEProcess;
26class KDialogBase;
27class WdgRawImport;
28class KisProfile;
29class TQProgressDialog;
30
31class KisRawImport : public KoFilter {
32 TQ_OBJECT
33
34
35public:
36 KisRawImport(KoFilter *parent, const char *name, const TQStringList&);
37 virtual ~KisRawImport();
38
39public:
40 virtual KoFilter::ConversionStatus convert(const TQCString& from, const TQCString& to);
41
42
43private slots:
44
45 void slotUpdatePreview();
46 void slotFillCmbProfiles();
47 void slotProcessDone();
48 void slotReceivedStdout(TDEProcess *proc, char *buffer, int buflen);
49 void slotReceivedStderr(TDEProcess *proc, char *buffer, int buflen);
50 void incrementProgress();
51
52private:
53
54 TQStringList createArgumentList(bool forPreview = false);
55 TQSize determineSize(TQ_UINT32& startOfImageData);
56 void getImageData(TQStringList arguments);
57 KisProfile * profile();
58 KisID getColorSpace();
59
60private:
61 TQByteArray * m_data;
62 KDialogBase * m_dialog;
63 WdgRawImport * m_page;
64 KisProfile * m_monitorProfile;
65 TDEProcess * m_process;
66 TQProgressDialog* m_progress;
67 bool m_err; // Set to true when slotReceivedStderr is called
68};
69
70#endif // KIS_RAW_IMPORT_H_
71