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;
37 * @class EffectsListView
38 * @brief Manages the controls for the treewidget containing the effects.
39 * @author Jean-Baptiste Mardelle
42 class EffectsListView : public QWidget, public Ui::EffectList_UI
47 EffectsListView(QWidget *parent = 0);
49 /** @brief Re-initializes the list of effects. */
50 void reloadEffectList();
51 //void slotAddEffect(GenTime pos, int track, QString name);
54 EffectsListWidget *m_effectsList;
57 /** @brief Applies the type filter to the effect list.
58 * @param pos Index of the combo box; where 0 = All, 1 = Video, 2 = Audio, 3 = Custom */
59 void filterList(int pos);
61 /** @brief Updates the info panel to match the selected effect. */
62 void slotUpdateInfo();
64 /** @brief Toggles the info panel's visibility. */
67 /** @brief Emits addEffect signal for the selected effect. */
68 void slotEffectSelected();
70 /** @brief Removes the XML file for the selected effect.
72 * Only used for custom effects */
73 void slotRemoveEffect();
75 /** @brief Makes sure the item fits the type filter.
76 * @param item Current item
77 * @param hidden Hidden or not
79 * This is necessary to make the search obey to the type filter.
80 * Called when the visibility of this item was changed by searching */
81 void slotUpdateSearch(QTreeWidgetItem *item, bool hidden);
83 /** @brief Expands folders that match our search.
84 * @param text Current search string */
85 void slotAutoExpand(QString text);
88 void addEffect(const QDomElement);