1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
//////////////////////////////////////////////////////////////////////////////
//
// KIMG2MPG.H
//
// Copyright (C) 2003 Gilles Caulier <caulier dot gilles at gmail dot com>
//
// 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, Cambridge, MA 02110-1301, USA.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef KImg2mpgData_included
#define KImg2mpgData_included
// Include files for Qt
#include <qstring.h>
#include <qcolor.h>
#include <qtimer.h>
#include <qguardedptr.h>
#include <qdatetime.h>
// Include files for KDE
#include <kdialog.h>
#include <klistbox.h>
#include <kprocess.h>
#include <kio/previewjob.h>
// Include files for KIPI
#include "kpaboutdata.h"
#include <libkipi/interface.h>
// Local includes
#include "kimg2mpgbase.h"
class KFileItem;
class QPushButton;
class QComboBox;
class QSpinBox;
class QGroupBox;
class QListBoxItem;
class QLabel;
class QWidget;
class QPixmap;
class KConfig;
class KProcess;
class KLineEdit;
class KIconLoader;
class KColorButton;
class KListBox;
class KButtonBox;
class KProgress;
class KURL::List;
namespace KIPIMPEGEncoderPlugin
{
class KShowDebuggingOutput;
class OptionsDialog;
class ListImageItems : public KListBox
{
Q_OBJECT
public:
ListImageItems(QWidget *parent=0, const char *name=0);
signals:
void addedDropItems(KURL::List filesUrl);
protected:
void dragEnterEvent(QDragEnterEvent *e);
void dropEvent(QDropEvent *e);
};
class KImg2mpgData : public KImg2mpgBase
{
Q_OBJECT
public:
KImg2mpgData( KIPI::Interface* interface, QWidget* parent = 0, const char * name = 0 );
virtual ~KImg2mpgData();
void show();
void ShowNumberImages( int Number );
void closeEvent(QCloseEvent*);
QPixmap LoadIcon( QString Name, int Group );
void addItems(const KURL::List& fileList);
void writeSettings();
void readSettings();
OptionsDialog* m_OptionDlg;
public slots:
void reset();
void readStderr(KProcess *proc, char *buffer, int buflen);
void EncodeDone(KProcess* );
void slotMPEGFilenameDialog( void );
void slotAudioFilenameDialog( void );
void slotImagesFilesButtonAdd( void );
void slotImagesFilesButtonDelete( void );
void slotImagesFilesButtonUp( void );
void slotImagesFilesButtonDown( void );
void slotEncode( void );
void slotOptions( void );
void slotClose( void );
void slotHelp( void );
void slotImagesFilesSelected( QListBoxItem *item );
void SlotPortfolioDurationChanged ( int );
void slotOptionDlgOkClicked( void );
void slotGotPreview(const KFileItem* , const QPixmap &pixmap);
void slotFailedPreview(const KFileItem*);
void slotAddDropItems(KURL::List filesUrl);
private:
QString m_VideoFormatConfig;
QString m_VideoTypeConfig;
QString m_ChromaConfig;
QString m_ImageDurationConfig;
QString m_TransitionSpeedConfig;
QString m_MPEGOutputFileConfig;
QString m_AudioInputFileConfig;
QString m_IMBinFolderConfig;
QString m_MJBinFolderConfig;
QString m_TmpFolderConfig;
QString m_NoneLabel;
QString m_EncodeString;
QString m_DebugOuputMessages;
QString m_CommandLine;
QString m_ImagesFilesSort;
QColor m_BackgroundColorConfig;
KConfig* m_config;
KIO::PreviewJob* m_thumbJob;
QTime m_EncodingDuration;
QTime m_DurationTime;
bool m_Abort;
bool m_Encoding;
pid_t m_Img2mpgPidNum;
KProcess* m_Proc;
KIconLoader* m_Icons;
KIPI::Interface* m_interface;
KIPIPlugins::KPAboutData* m_about;
class KShowDebuggingOutput* m_DebuggingDialog;
void RemoveTmpFiles( void );
bool DeleteDir(QString dirname);
bool deldir(QString dirname);
};
} // NameSpace KIPIMPEGEncoderPlugin
#endif // KImg2mpgData_included
|