ui.buttonUp->setIcon(KIcon("go-up"));
ui.buttonDown->setIcon(KIcon("go-down"));
ui.buttonDel->setIcon(KIcon("trash-empty"));
+
+ ui.buttonLeftRight->setIcon(KIcon("go-next"));//better icons needed
+ ui.buttonUpDown->setIcon(KIcon("go-up"));
+ ui.buttonShowInTimeline->setIcon(KIcon("kmplayer"));
+ ui.buttonHelp->setIcon(KIcon("help-about"));
+ ui.buttonNewPoints->setIcon(KIcon("xedit"));
+
connect (ui.effectlist, SIGNAL ( itemSelectionChanged()), this , SLOT( slotItemSelectionChanged() ));
connect (ui.buttonUp, SIGNAL (clicked()), this, SLOT (slotItemUp()) );
connect (ui.buttonDown, SIGNAL (clicked()), this, SLOT (slotItemDown()) );
connect (ui.buttonDel, SIGNAL (clicked()), this, SLOT (slotItemDel()) );
-
+ connect (ui.buttonLeftRight, SIGNAL (clicked()), this , SLOT ( slotSetMoveX() ) );
+ connect (ui.buttonUpDown, SIGNAL (clicked()), this , SLOT ( slotSetMoveY() ) );
+ connect (ui.buttonShowInTimeline, SIGNAL (clicked()), this , SLOT ( slotShowInTimeline() ) );
+ connect (ui.buttonNew, SIGNAL (clicked()), this , SLOT ( slotSetNew() ) );
+ connect (ui.buttonHelp, SIGNAL (clicked()), this , SLOT ( slotSetHelp() ) );
+
+ ui.infoBox->hide();
+ updateButtonStatus();
QList< QPair<QString, QMap<int,QVariant> > > points;
}
+void EffectStackView::slotSetMoveX(){
+ ui.kplotwidget->setMoveX(!ui.kplotwidget->isMoveX());
+ updateButtonStatus();
+}
+
+void EffectStackView::slotSetMoveY(){
+ ui.kplotwidget->setMoveY(!ui.kplotwidget->isMoveY());
+ updateButtonStatus();
+}
+
+void EffectStackView::slotSetNew(){
+
+}
+
+void EffectStackView::slotSetHelp(){
+ ui.infoBox->setVisible(!ui.infoBox->isVisible());
+ ui.buttonHelp->setDown(ui.infoBox->isVisible());
+}
+
+void EffectStackView::slotShowInTimeline(){
+
+ ui.kplotwidget->setMoveTimeLine(!ui.kplotwidget->isMoveTimeline());
+ updateButtonStatus();
+
+}
+
+void EffectStackView::updateButtonStatus(){
+ ui.buttonLeftRight->setDown(ui.kplotwidget->isMoveX());
+ ui.buttonUpDown->setDown(ui.kplotwidget->isMoveY());
+
+ ui.buttonShowInTimeline->setEnabled( ui.kplotwidget->isMoveX() || ui.kplotwidget->isMoveY () );
+ ui.buttonShowInTimeline->setDown(ui.kplotwidget->isMoveTimeline());
+
+}
#include "effectstackview.moc"
Ui::EffectStack_UI ui;
ClipItem* clipref;
void setupListView(const QStringList& );
+ void updateButtonStatus();
public slots:
void slotClipItemSelected(ClipItem*);
void slotItemSelectionChanged();
void slotItemUp();
void slotItemDown();
void slotItemDel();
-
+ void slotSetMoveX();
+ void slotSetMoveY();
+ void slotSetNew();
+ void slotSetHelp();
+ void slotShowInTimeline();
};
#endif
movepoint=NULL;
colors << Qt::white << Qt::red << Qt::green << Qt::blue << Qt::magenta << Qt::gray << Qt::cyan;
maxy=0;
+ m_moveX=false;
+ m_moveY=true;
+ m_moveTimeline=true;
}
void ParameterPlotter::setPointLists(const QList< QPair<QString, QMap< int , QVariant > > >& params,int startframe, int endframe){
for(int p=0;p<points.size();p++){
if (points[p]==movepoint){
QPoint delta=event->pos()-oldmousepoint;
+ if (m_moveY)
movepoint->setY(movepoint->y()-delta.y()*dataRect().height()/pixRect().height() );
if (p>0 && p<points.size()-1){
double newx=movepoint->x()+delta.x()*dataRect().width()/pixRect().width();
- if ( newx>points[p-1]->x() && newx<points[p+1]->x() )
+ if ( newx>points[p-1]->x() && newx<points[p+1]->x() && m_moveX)
movepoint->setX(movepoint->x()+delta.x()*dataRect().width()/pixRect().width() );
}
replacePlotObject(i,o);
}else
movepoint=NULL;
}
+
+void ParameterPlotter::setMoveX(bool b){
+ m_moveX=b;
+}
+
+void ParameterPlotter::setMoveY(bool b){
+ m_moveY=b;
+}
+
+void ParameterPlotter::setMoveTimeLine(bool b){
+ m_moveTimeline=b;
+}
+
+bool ParameterPlotter::isMoveX(){
+ return m_moveX;
+}
+
+bool ParameterPlotter::isMoveY(){
+ return m_moveY;
+}
+
+bool ParameterPlotter::isMoveTimeline(){
+ return m_moveTimeline;
+}
public:
ParameterPlotter (QWidget *parent=0);
virtual ~ParameterPlotter(){}
-
+ void setMoveX(bool);
+ void setMoveY(bool);
+ void setMoveTimeLine(bool);
+ bool isMoveX();
+ bool isMoveY();
+ bool isMoveTimeline();
private:
KPlotPoint* movepoint;
+ bool m_moveX,m_moveY,m_moveTimeline;
QPoint oldmousepoint;
int maxx,maxy;
QStringList parameterNameList;
<rect>
<x>0</x>
<y>0</y>
- <width>886</width>
- <height>622</height>
+ <width>838</width>
+ <height>636</height>
</rect>
</property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="windowTitle" >
<string>Form</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QSplitter" name="splitter_2" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="layoutWidget" >
<layout class="QVBoxLayout" >
<item>
- <widget class="KListWidget" name="effectlist" />
+ <widget class="KListWidget" name="effectlist" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
- <widget class="ParameterPlotter" name="kplotwidget" >
- <property name="grid" stdset="0" >
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QGroupBox" name="groupBox" >
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>74</height>
- </size>
- </property>
- <property name="title" >
- <string>Parameter-Setup</string>
- </property>
+ <widget class="QWidget" name="layoutWidget" >
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="ParameterPlotter" name="kplotwidget" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="grid" stdset="0" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QToolButton" name="buttonLeftRight" >
+ <property name="text" >
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="buttonUpDown" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="buttonShowInTimeline" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="buttonNewPoints" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KComboBox" name="parameterList" />
+ </item>
+ <item>
+ <widget class="QToolButton" name="buttonHelp" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
+ <widget class="KTextEdit" name="infoBox" />
</widget>
</widget>
</item>
- <item row="1" column="1" >
+ <item row="0" column="1" >
<widget class="KSeparator" name="kseparator" />
</item>
</layout>
</widget>
<customwidgets>
+ <customwidget>
+ <class>KComboBox</class>
+ <extends>QComboBox</extends>
+ <header>kcombobox.h</header>
+ </customwidget>
<customwidget>
<class>KListWidget</class>
<extends>QListWidget</extends>
<extends>QFrame</extends>
<header>kseparator.h</header>
</customwidget>
+ <customwidget>
+ <class>KTextEdit</class>
+ <extends>QTextEdit</extends>
+ <header>ktextedit.h</header>
+ </customwidget>
<customwidget>
<class>ParameterPlotter</class>
<extends>KPlotWidget</extends>