20#ifndef webpresentation_h
21#define webpresentation_h
26#include <tqvaluelist.h>
49class KPrWebPresentation
53 KPrWebPresentation( KPrDocument *_doc, KPrView *_view );
54 KPrWebPresentation(
const TQString &_config, KPrDocument *_doc, KPrView *_view );
55 KPrWebPresentation(
const KPrWebPresentation &webPres );
57 void setAuthor(
const TQString &_author )
59 void setEMail(
const TQString &_email )
61 void setTitle(
const TQString &_title )
63 void setBackColor(
const TQColor &_backColor )
64 { backColor = _backColor; }
65 void setTitleColor(
const TQColor &_titleColor )
66 { titleColor = _titleColor; }
67 void setTextColor(
const TQColor &_textColor )
68 { textColor = _textColor; }
69 void setXML(
bool _xml )
71 void setWriteHeader(
bool _writeHeader )
72 { m_bWriteHeader = _writeHeader; }
73 void setWriteFooter(
bool _writeFooter )
74 { m_bWriteFooter = _writeFooter; }
75 void setLoopSlides(
bool _loopSlides )
76 { m_bLoopSlides = _loopSlides; }
77 void setPath(
const TQString &_path )
79 void setZoom(
int _zoom )
81 void setTimeBetweenSlides(
int _timeBetweenSlides )
82 { timeBetweenSlides = _timeBetweenSlides; }
83 void setEncoding(
const TQString &_encoding ) { m_encoding = _encoding; }
85 TQString getAuthor()
const {
return author; }
86 TQString getEmail()
const {
return email; }
87 TQString getTitle()
const {
return title; }
88 TQColor getBackColor()
const {
return backColor; }
89 TQColor getTitleColor()
const {
return titleColor; }
90 TQColor getTextColor()
const {
return textColor; }
91 bool isXML()
const {
return xml; }
92 bool wantHeader()
const {
return m_bWriteHeader; }
93 bool wantFooter()
const {
return m_bWriteFooter; }
94 bool wantLoopSlides()
const {
return m_bLoopSlides; }
95 TQString getPath()
const {
return path; }
96 int getZoom()
const {
return zoom; }
97 int getTimeBetweenSlides()
const {
return timeBetweenSlides; }
98 TQString getEncoding()
const {
return m_encoding; }
106 TQValueList<SlideInfo> getSlideInfos()
const {
return slideInfos; }
108 void setSlideTitle(
int i,
const TQString &slideTitle )
109 { slideInfos[i].slideTitle = slideTitle; }
111 void setConfig(
const TQString &_config )
112 { config = _config; }
113 TQString getConfig()
const {
return config; }
118 int initSteps()
const {
return 7; }
119 int slides1Steps() {
return slideInfos.count(); }
120 int slides2Steps() {
return slideInfos.count(); }
121 int mainSteps()
const {
return 1; }
123 void initCreation( KProgress *progressBar );
124 void createSlidesPictures( KProgress *progressBar );
125 void createSlidesHTML( KProgress *progressBar );
126 void createMainPage( KProgress *progressBar );
130 TQString escapeHtmlText( TQTextCodec *codec,
const TQString& strText )
const;
131 void writeStartOfHeader(TQTextStream& streamOut, TQTextCodec *codec,
132 const TQString& subtitle,
const TQString& dest );
137 TQString author, title, email;
138 TQValueList<SlideInfo> slideInfos;
139 TQColor backColor, titleColor, textColor;
142 bool m_bWriteHeader, m_bWriteFooter, m_bLoopSlides;
143 int timeBetweenSlides;
148class KPrWebPresentationWizard :
public KWizard
154 KPrWebPresentationWizard(
const TQString &_config, KPrDocument *_doc, KPrView *_view );
155 ~KPrWebPresentationWizard();
157 static void createWebPresentation(
const TQString &_config, KPrDocument *_doc, KPrView *_view );
167 void closeEvent( TQCloseEvent *e );
172 KPrWebPresentation webPres;
174 TQHBox *page1, *page2, *page3, *page4, *page5;
175 TQCheckBox *writeHeader, *writeFooter, *loopSlides;
176 KLineEdit *author, *title, *email;
177 KColorButton *textColor, *titleColor, *backColor;
178 KComboBox *encoding, *doctype;
179 KIntNumInput *zoom, *timeBetweenSlides;
181 TDEListView *slideTitles;
182 KLineEdit *slideTitle;
185 virtual void finish();
187 void slotChoosePath(
const TQString &);
188 void slideTitleChanged(
const TQString & );
189 void slideTitleChanged( TQListViewItem * );
193class KPrWebPresentationCreateDialog :
public TQDialog
199 KPrWebPresentationCreateDialog( KPrDocument *_doc, KPrView *_view,
const KPrWebPresentation &_webPres );
200 ~KPrWebPresentationCreateDialog();
202 static void createWebPresentation( KPrDocument *_doc, KPrView *_view,
const KPrWebPresentation &_webPres );
207 void createSlidesPictures();
208 void createSlidesHTML();
209 void createMainPage();
213 void resizeEvent( TQResizeEvent *e );
217 KPrWebPresentation webPres;
219 KProgress *progressBar;
220 TQLabel *step1, *step2, *step3, *step4, *step5;
221 TQPushButton *bDone, *bSave;