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>
37 class MyEditableLabel : public QLineEdit
42 MyEditableLabel(QWidget * parent = 0);
45 virtual void mouseDoubleClickEvent( QMouseEvent *e);
50 * @class CollapsibleEffect
51 * @brief A dialog for editing markers and guides.
52 * @author Jean-Baptiste Mardelle
55 class CollapsibleGroup : public AbstractCollapsibleWidget
60 CollapsibleGroup(int ix, bool firstGroup, bool lastGroup, EffectInfo info, QWidget * parent = 0);
62 void updateTimecodeFormat();
63 void setActive(bool activate);
64 int groupIndex() const;
66 QString infoString() const;
67 bool isActive() const;
68 void addGroupEffect(CollapsibleEffect *effect);
69 void removeGroup(int ix, QVBoxLayout *layout);
70 /** @brief Return all effects in group. */
71 QList <CollapsibleEffect*> effects();
72 /** @brief Return the editable title widget. */
73 QWidget *title() const;
74 /** @brief Return the XML data describing all effects in group. */
75 QDomDocument effectsData();
76 /** @brief Adjust sub effects buttons. */
80 void slotEnable(bool enable, bool emitInfo = true);
84 void slotShow(bool show);
85 void slotDeleteGroup();
87 void slotEffectDown();
89 void slotResetGroup();
91 void slotRenameGroup();
94 QList <CollapsibleEffect *> m_subWidgets;
97 MyEditableLabel *m_title;
101 virtual void mouseDoubleClickEvent ( QMouseEvent * event );
102 virtual void dragEnterEvent(QDragEnterEvent *event);
103 virtual void dragLeaveEvent(QDragLeaveEvent *event);
104 virtual void dropEvent(QDropEvent *event);
107 void deleteGroup(QDomDocument);
108 void unGroup(CollapsibleGroup *);
109 void groupRenamed(CollapsibleGroup *);