1 /***************************************************************************
2 * Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
21 #ifndef EFFECTSLISTVIEW_H
22 #define EFFECTSLISTVIEW_H
26 #include "ui_effectlist_ui.h"
29 #include <QDomElement>
30 #include <QFocusEvent>
33 class EffectsListWidget;
35 class KActionCategory;
38 * @class EffectsListView
39 * @brief Manages the controls for the treewidget containing the effects.
40 * @author Jean-Baptiste Mardelle
43 class EffectsListView : public QWidget, public Ui::EffectList_UI
48 explicit EffectsListView(QWidget *parent = 0);
50 /** @brief Re-initializes the list of effects. */
51 void reloadEffectList(QMenu *effectsMenu, KActionCategory *effectActions);
52 QMenu* getEffectsMenu();
53 //void slotAddEffect(GenTime pos, int track, QString name);
55 /** @brief Palette was changed, update styles. */
59 EffectsListWidget *m_effectsList;
62 /** @brief Applies the type filter to the effect list.
63 * @param pos Index of the combo box; where 0 = All, 1 = Video, 2 = Audio, 3 = Custom */
64 void filterList(int pos);
66 /** @brief Updates the info panel to match the selected effect. */
67 void slotUpdateInfo();
69 /** @brief Toggles the info panel's visibility. */
72 /** @brief Emits addEffect signal for the selected effect. */
73 void slotEffectSelected();
75 /** @brief Removes the XML file for the selected effect.
77 * Only used for custom effects */
78 void slotRemoveEffect();
80 /** @brief Makes sure the item fits the type filter.
81 * @param item Current item
82 * @param hidden Hidden or not
84 * This is necessary to make the search obey to the type filter.
85 * Called when the visibility of this item was changed by searching */
86 void slotUpdateSearch(QTreeWidgetItem *item, bool hidden);
88 /** @brief Expands folders that match our search.
89 * @param text Current search string */
90 void slotAutoExpand(const QString &text);
93 void addEffect(const QDomElement);