X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Feffectslistwidget.h;h=5df95d1a5de77c8c465e1c3eb660644c2cda76ee;hb=c3302003093710ee247ad84c0fe2ef3c579d417f;hp=a1aa7ac85d0901f4357fcd5bd50f5c3a95184320;hpb=99e988b87962ad41476e358e62f73c7bdf5b3914;p=kdenlive diff --git a/src/effectslistwidget.h b/src/effectslistwidget.h index a1aa7ac8..5df95d1a 100644 --- a/src/effectslistwidget.h +++ b/src/effectslistwidget.h @@ -24,32 +24,50 @@ #include #include +#include + class EffectsList; +class KIcon; class EffectsListWidget : public QTreeWidget { Q_OBJECT public: - explicit EffectsListWidget(QMenu *menu, QWidget *parent = 0); + explicit EffectsListWidget(QMenu *contextMenu, QWidget *parent = 0); virtual ~EffectsListWidget(); const QDomElement currentEffect() const; - QString currentInfo(); + QString currentInfo() const; const QDomElement itemEffect(QTreeWidgetItem *item) const; - void initList(); + void initList(QMenu *effectsMenu, KActionCategory *effectActions); protected: virtual void dragMoveEvent(QDragMoveEvent *event); virtual void contextMenuEvent(QContextMenuEvent * event); virtual QMimeData *mimeData(const QList list) const; + virtual void keyPressEvent(QKeyEvent *e); private: QMenu *m_menu; - /** @brief Returns the folder item with name equal to passed parameter. */ - QTreeWidgetItem *findFolder(const QString name); + /** @brief Returns the folder item whose name == @param name. */ + QTreeWidgetItem *findFolder(const QString &name); + + /** @brief Loads the effects from the given effectlist as item of this widget. + * @param effectlist effectlist containing the effects that should be loaded + * @param icon the icon to be used for the QTreeWidgetItems + * @param defaultFolder parent item which will be used by default + * @param folders list of folders which might be used instead for specific effects + * @param type type of the effects + * @param current name of selected effect before reload; if an effect name matches this one it will become selected + * @param found will be set to true if an effect name matches current + */ + void loadEffects(const EffectsList *effectlist, KIcon icon, QTreeWidgetItem *defaultFolder, const QList *folders, int type, const QString ¤t, bool *found); private slots: void slotExpandItem(const QModelIndex & index); + +signals: + void applyEffect(const QDomElement); }; #endif