]> git.sesse.net Git - kdenlive/blob - src/effectslistview.h
Fix label
[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 class KActionCategory;
36
37 /**
38  * @class EffectsListView
39  * @brief Manages the controls for the treewidget containing the effects.
40  * @author Jean-Baptiste Mardelle
41  */
42
43 class EffectsListView : public QWidget, public Ui::EffectList_UI
44 {
45     Q_OBJECT
46
47 public:
48     explicit EffectsListView(QWidget *parent = 0);
49
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);
54     
55     /** @brief Palette was changed, update styles. */
56     void updatePalette();
57
58 private:
59     EffectsListWidget *m_effectsList;
60
61 private slots:
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);
65
66     /** @brief Updates the info panel to match the selected effect. */
67     void slotUpdateInfo();
68
69     /** @brief Toggles the info panel's visibility. */
70     void showInfoPanel();
71
72     /** @brief Emits addEffect signal for the selected effect. */
73     void slotEffectSelected();
74
75     /** @brief Removes the XML file for the selected effect.
76     *
77     * Only used for custom effects */
78     void slotRemoveEffect();
79
80     /** @brief Makes sure the item fits the type filter.
81     * @param item Current item
82     * @param hidden Hidden or not
83     *
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);
87
88     /** @brief Expands folders that match our search.
89     * @param text Current search string */
90     void slotAutoExpand(const QString &text);
91
92 signals:
93     void addEffect(const QDomElement&);
94     void reloadEffects();
95 };
96
97 #endif