X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Feffectslistview.h;h=ab84655407d624869e88a257976248b73585093e;hb=c3302003093710ee247ad84c0fe2ef3c579d417f;hp=6f17209f75369cce4eb51a8196de8312a334f49f;hpb=fc68f9ee6ecc08758384c6c59af249fe98167469;p=kdenlive diff --git a/src/effectslistview.h b/src/effectslistview.h index 6f17209f..ab846554 100644 --- a/src/effectslistview.h +++ b/src/effectslistview.h @@ -32,34 +32,65 @@ class EffectsList; class EffectsListWidget; class QTreeWidget; +class KActionCategory; + +/** + * @class EffectsListView + * @brief Manages the controls for the treewidget containing the effects. + * @author Jean-Baptiste Mardelle + */ class EffectsListView : public QWidget, public Ui::EffectList_UI { Q_OBJECT public: - EffectsListView(QWidget *parent = 0); - void reloadEffectList(); - //void slotAddEffect(GenTime pos, int track, QString name); + explicit EffectsListView(QWidget *parent = 0); -protected: - virtual void focusInEvent(QFocusEvent * event); + /** @brief Re-initializes the list of effects. */ + void reloadEffectList(QMenu *effectsMenu, KActionCategory *effectActions); + QMenu* getEffectsMenu(); + //void slotAddEffect(GenTime pos, int track, QString name); + + /** @brief Palette was changed, update styles. */ + void updatePalette(); private: EffectsListWidget *m_effectsList; private slots: + /** @brief Applies the type filter to the effect list. + * @param pos Index of the combo box; where 0 = All, 1 = Video, 2 = Audio, 3 = Custom */ void filterList(int pos); + + /** @brief Updates the info panel to match the selected effect. */ void slotUpdateInfo(); + + /** @brief Toggles the info panel's visibility. */ void showInfoPanel(); + + /** @brief Emits addEffect signal for the selected effect. */ void slotEffectSelected(); + + /** @brief Removes the XML file for the selected effect. + * + * Only used for custom effects */ void slotRemoveEffect(); + + /** @brief Makes sure the item fits the type filter. + * @param item Current item + * @param hidden Hidden or not + * + * This is necessary to make the search obey to the type filter. + * Called when the visibility of this item was changed by searching */ void slotUpdateSearch(QTreeWidgetItem *item, bool hidden); -public slots: + /** @brief Expands folders that match our search. + * @param text Current search string */ + void slotAutoExpand(const QString &text); signals: - void addEffect(const QDomElement); + void addEffect(const QDomElement&); void reloadEffects(); };