18#ifndef HTMLGENERATORWIDGET_H
19#define HTMLGENERATORWIDGET_H
21#include "abstractproducerwidget.h"
26class HtmlGeneratorWidget;
29class HtmlGeneratorWidget :
public QWidget,
public AbstractProducerWidget
34 static const char *kColorProperty;
35 static const char *kCssProperty;
36 static const char *kBodyProperty;
37 static const char *kJavaScriptProperty;
38 static const char *kLine1Property;
39 static const char *kLine2Property;
40 static const char *kLine3Property;
42 explicit HtmlGeneratorWidget(QWidget *parent = 0);
43 ~HtmlGeneratorWidget();
46 Mlt::Producer *newProducer(Mlt::Profile &)
override;
47 Mlt::Properties getPreset()
const override;
48 void loadPreset(Mlt::Properties &)
override;
49 void setProducer(Mlt::Producer *p)
override;
52 void producerChanged(Mlt::Producer *);
55 void on_colorButton_clicked();
56 void on_preset_selected(
void *p);
57 void on_preset_saveClicked();
59 void on_imageButton_clicked();
61 void on_pushButton_clicked();
63 void on_videoButton_clicked();
65 void on_cssToggleButton_toggled(
bool checked);
67 void on_bodyToggleButton_toggled(
bool checked);
69 void on_javascriptToggleButton_toggled(
bool checked);
71 void on_bodyTextEdit_textChanged();
73 void on_presetIconView_itemClicked(
class QListWidgetItem *item);
76 bool eventFilter(QObject *watched, QEvent *event)
override;
79 QString generateHtml()
const;
80 void updateTextSectionVisibility();
81 void populatePresetIconView();
82 QString findPresetIconPath(
const QString &presetName);
83 void setupIconAnimation(
class QListWidgetItem *item,
const QString &iconPath);
84 Ui::HtmlGeneratorWidget *ui;
85 QList<class QMovie *> m_iconMovies;
86 class QListWidgetItem *m_lastHoveredItem =
nullptr;