filters

kis_raw_import.h

00001 /*
00002  *  Copyright (c) 2005 Boudewijn Rempt <boud@valdyas.org>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef KIS_RAW_IMPORT_H_
00021 #define KIS_RAW_IMPORT_H_
00022 
00023 #include <KoFilter.h>
00024 
00025 class KProcess;
00026 class KDialogBase;
00027 class WdgRawImport;
00028 class KisProfile;
00029 class QProgressDialog;
00030 
00031 class KisRawImport : public KoFilter {
00032     Q_OBJECT
00033 
00034 public:
00035     KisRawImport(KoFilter *parent, const char *name, const QStringList&);
00036     virtual ~KisRawImport();
00037 
00038 public:
00039     virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to);
00040 
00041 
00042 private slots:
00043 
00044     void slotUpdatePreview();
00045     void slotFillCmbProfiles();
00046     void slotProcessDone();
00047     void slotReceivedStdout(KProcess *proc, char *buffer, int buflen);
00048     void slotReceivedStderr(KProcess *proc, char *buffer, int buflen);
00049     void incrementProgress();
00050 
00051 private:
00052 
00053     QStringList createArgumentList(bool forPreview = false);
00054     QSize determineSize(Q_UINT32& startOfImageData);
00055     void getImageData(QStringList arguments);
00056     KisProfile * profile();
00057     KisID getColorSpace();
00058     
00059 private:
00060     QByteArray * m_data;
00061     KDialogBase * m_dialog;
00062     WdgRawImport * m_page;
00063     KisProfile * m_monitorProfile;
00064     KProcess * m_process;
00065     QProgressDialog* m_progress;
00066     bool m_err; // Set to true when slotReceivedStderr is called
00067 };
00068 
00069 #endif // KIS_RAW_IMPORT_H_
00070 
KDE Home | KDE Accessibility Home | Description of Access Keys