]> git.sesse.net Git - kdenlive/blob - src/effectslistview.h
4970bb164d63fbac19820b78f10ea44619e9b383
[kdenlive] / src / effectslistview.h
1 /***************************************************************************
2  *   Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
3  *                                                                         *
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.                                   *
8  *                                                                         *
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.                          *
13  *                                                                         *
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  ***************************************************************************/
19
20
21 #ifndef EFFECTSLISTVIEW_H
22 #define EFFECTSLISTVIEW_H
23
24 #include <KIcon>
25
26 #include "ui_effectlist_ui.h"
27 #include "gentime.h"
28
29 #include <QDomElement>
30 #include <QFocusEvent>
31
32 class EffectsList;
33 class EffectsListWidget;
34 class QTreeWidget;
35
36 /**
37  * @class EffectsListView
38  * @brief Manages the controls for the treewidget containing the effects.
39  * @author Jean-Baptiste Mardelle
40  */
41
42 class EffectsListView : public QWidget, public Ui::EffectList_UI
43 {
44     Q_OBJECT
45
46 public:
47     EffectsListView(QWidget *parent = 0);
48
49     /** @brief Re-initializes the list of effects. */
50     void reloadEffectList();
51     //void slotAddEffect(GenTime pos, int track, QString name);
52
53 private:
54     EffectsListWidget *m_effectsList;
55
56 private slots:
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);
60
61     /** @brief Updates the info panel to match the selected effect. */
62     void slotUpdateInfo();
63
64     /** @brief Toggles the info panel's visibility. */
65     void showInfoPanel();
66
67     /** @brief Emits addEffect signal for the selected effect. */
68     void slotEffectSelected();
69
70     /** @brief Removes the XML file for the selected effect.
71     *
72     * Only used for custom effects */
73     void slotRemoveEffect();
74
75     /** @brief Makes sure the item fits the type filter.
76     * @param item Current item
77     * @param hidden Hidden or not
78     *
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);
82
83     /** @brief Expands folders that match our search.
84     * @param text Current search string */
85     void slotAutoExpand(QString text);
86
87 signals:
88     void addEffect(const QDomElement);
89     void reloadEffects();
90 };
91
92 #endif