1 /***************************************************************************
2 * Copyright (C) 2008 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 COLLAPSIBLEGROUP_H
22 #define COLLAPSIBLEGROUP_H
25 #include "abstractcollapsiblewidget.h"
26 #include "collapsibleeffect.h"
28 #include "keyframeedit.h"
30 #include <QDomElement>
31 #include <QToolButton>
36 class MyEditableLabel : public QLineEdit
40 explicit MyEditableLabel(QWidget * parent = 0);
43 void mouseDoubleClickEvent( QMouseEvent *e);
48 * @class CollapsibleEffect
49 * @brief A dialog for editing markers and guides.
50 * @author Jean-Baptiste Mardelle
53 class CollapsibleGroup : public AbstractCollapsibleWidget
58 CollapsibleGroup(int ix, bool firstGroup, bool lastGroup, const EffectInfo &info, QWidget * parent = 0);
60 void updateTimecodeFormat();
61 void setActive(bool activate);
62 int groupIndex() const;
64 QString infoString() const;
65 bool isActive() const;
66 void addGroupEffect(CollapsibleEffect *effect);
67 void removeGroup(int ix, QVBoxLayout *layout);
68 /** @brief Return all effects in group. */
69 QList <CollapsibleEffect*> effects();
70 /** @brief Return the editable title widget. */
71 QWidget *title() const;
72 /** @brief Return the XML data describing all effects in group. */
73 QDomDocument effectsData();
74 /** @brief Adjust sub effects buttons. */
78 void slotEnable(bool enable, bool emitInfo = true);
82 void slotShow(bool show);
83 void slotDeleteGroup();
85 void slotEffectDown();
87 void slotResetGroup();
89 void slotRenameGroup();
92 QList <CollapsibleEffect *> m_subWidgets;
95 MyEditableLabel *m_title;
99 void mouseDoubleClickEvent ( QMouseEvent * event );
100 void dragEnterEvent(QDragEnterEvent *event);
101 void dragLeaveEvent(QDragLeaveEvent *event);
102 void dropEvent(QDropEvent *event);
105 void deleteGroup(const QDomDocument&);
106 void unGroup(CollapsibleGroup *);
107 void groupRenamed(CollapsibleGroup *);