1 /***************************************************************************
2 effecstackedit.h - description
5 copyright : (C) 2008 by Marco Gittler
6 email : g.marco@freenet.de
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
18 #include "transitionsettings.h"
19 #include "transition.h"
21 #include "effectslist.h"
23 TransitionSettings::TransitionSettings(EffectsList *transitions, QWidget* parent): QWidget(parent) {
26 m_transitions = transitions;
27 ui.listWidget->addItems(transitions->effectNames());
28 kDebug() << transitions->effectNames().size() << " -" << transitions->size();
29 connect(ui.listWidget, SIGNAL(currentRowChanged(int)), this, SLOT(slotTransitionChanged()));
32 void TransitionSettings::slotTransitionChanged() {
33 QDomElement e = m_usedTransition->toXML();
34 QDomElement newElement = e.cloneNode().toElement();
36 QDomElement desc = m_transitions->getEffectByName(ui.listWidget->currentItem()->text());
38 newElement.setAttribute("type", desc.attribute("tag"));
39 emit transitionUpdated(e, newElement);
42 void TransitionSettings::slotTransitionItemSelected(Transition* t) {
43 setEnabled(t != NULL);