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
41 MyEditableLabel(QWidget * parent = 0);
44 virtual void mouseDoubleClickEvent( QMouseEvent *e);
49 * @class CollapsibleEffect
50 * @brief A dialog for editing markers and guides.
51 * @author Jean-Baptiste Mardelle
54 class CollapsibleGroup : public AbstractCollapsibleWidget
59 CollapsibleGroup(int ix, bool firstGroup, bool lastGroup, EffectInfo info, QWidget * parent = 0);
61 void updateTimecodeFormat();
62 void setActive(bool activate);
63 int groupIndex() const;
65 QString infoString() const;
66 bool isActive() const;
67 void addGroupEffect(CollapsibleEffect *effect);
68 void removeGroup(int ix, QVBoxLayout *layout);
69 /** @brief Return all effects in group. */
70 QList <CollapsibleEffect*> effects();
71 /** @brief Return the editable title widget. */
72 QWidget *title() const;
73 /** @brief Return the XML data describing all effects in group. */
74 QDomDocument effectsData();
75 /** @brief Adjust sub effects buttons. */
79 void slotEnable(bool enable, bool emitInfo = true);
83 void slotShow(bool show);
84 void slotDeleteGroup();
86 void slotEffectDown();
88 void slotResetGroup();
90 void slotRenameGroup();
93 QList <CollapsibleEffect *> m_subWidgets;
96 MyEditableLabel *m_title;
100 virtual void mouseDoubleClickEvent ( QMouseEvent * event );
101 virtual void dragEnterEvent(QDragEnterEvent *event);
102 virtual void dragLeaveEvent(QDragLeaveEvent *event);
103 virtual void dropEvent(QDropEvent *event);
106 void deleteGroup(QDomDocument);
107 void unGroup(CollapsibleGroup *);
108 void groupRenamed(CollapsibleGroup *);