Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
2a223cff
Commit
2a223cff
authored
Mar 03, 2008
by
Jean-Baptiste Mardelle
Browse files
Reindent all source files
svn path=/branches/KDE4/; revision=1987
parent
e7a03c1e
Changes
95
Expand all
Hide whitespace changes
Inline
Side-by-side
src/addclipcommand.cpp
View file @
2a223cff
...
...
@@ -22,25 +22,23 @@
#include
"addclipcommand.h"
AddClipCommand
::
AddClipCommand
(
KdenliveDoc
*
doc
,
const
QDomElement
&
xml
,
const
uint
id
,
bool
doIt
)
:
m_doc
(
doc
),
m_xml
(
xml
),
m_id
(
id
),
m_doIt
(
doIt
)
{
if
(
doIt
)
setText
(
i18n
(
"Add clip"
));
else
setText
(
i18n
(
"Delete clip"
));
}
:
m_doc
(
doc
),
m_xml
(
xml
),
m_id
(
id
),
m_doIt
(
doIt
)
{
if
(
doIt
)
setText
(
i18n
(
"Add clip"
));
else
setText
(
i18n
(
"Delete clip"
));
}
// virtual
void
AddClipCommand
::
undo
()
{
kDebug
()
<<
"---- undoing action"
;
if
(
m_doIt
)
m_doc
->
deleteClip
(
m_id
);
else
m_doc
->
addClip
(
m_xml
,
m_id
);
// virtual
void
AddClipCommand
::
undo
()
{
kDebug
()
<<
"---- undoing action"
;
if
(
m_doIt
)
m_doc
->
deleteClip
(
m_id
);
else
m_doc
->
addClip
(
m_xml
,
m_id
);
}
// virtual
void
AddClipCommand
::
redo
()
{
kDebug
()
<<
"---- redoing action"
;
if
(
m_doIt
)
m_doc
->
addClip
(
m_xml
,
m_id
);
else
m_doc
->
deleteClip
(
m_id
);
// virtual
void
AddClipCommand
::
redo
()
{
kDebug
()
<<
"---- redoing action"
;
if
(
m_doIt
)
m_doc
->
addClip
(
m_xml
,
m_id
);
else
m_doc
->
deleteClip
(
m_id
);
}
#include
"addclipcommand.moc"
src/addclipcommand.h
View file @
2a223cff
...
...
@@ -26,20 +26,19 @@
#include
"kdenlivedoc.h"
class
AddClipCommand
:
public
QUndoCommand
{
public:
AddClipCommand
(
KdenliveDoc
*
list
,
const
QDomElement
&
xml
,
const
uint
id
,
bool
doIt
);
class
AddClipCommand
:
public
QUndoCommand
{
public:
AddClipCommand
(
KdenliveDoc
*
list
,
const
QDomElement
&
xml
,
const
uint
id
,
bool
doIt
);
virtual
void
undo
();
virtual
void
redo
();
private:
KdenliveDoc
*
m_doc
;
QDomElement
m_xml
;
uint
m_id
;
bool
m_doIt
;
};
private:
KdenliveDoc
*
m_doc
;
QDomElement
m_xml
;
uint
m_id
;
bool
m_doIt
;
};
#endif
src/addeffectcommand.cpp
View file @
2a223cff
...
...
@@ -22,25 +22,23 @@
#include
"addeffectcommand.h"
AddEffectCommand
::
AddEffectCommand
(
CustomTrackView
*
view
,
const
int
track
,
GenTime
pos
,
QDomElement
effect
,
bool
doIt
)
:
m_view
(
view
),
m_track
(
track
),
m_pos
(
pos
),
m_effect
(
effect
),
m_doIt
(
doIt
)
{
if
(
doIt
)
setText
(
i18n
(
"Add effect"
));
else
setText
(
i18n
(
"Delete effect"
));
}
:
m_view
(
view
),
m_track
(
track
),
m_pos
(
pos
),
m_effect
(
effect
),
m_doIt
(
doIt
)
{
if
(
doIt
)
setText
(
i18n
(
"Add effect"
));
else
setText
(
i18n
(
"Delete effect"
));
}
// virtual
void
AddEffectCommand
::
undo
()
{
kDebug
()
<<
"---- undoing action"
;
if
(
m_doIt
)
m_view
->
deleteEffect
(
m_track
,
m_pos
,
m_effect
);
else
m_view
->
addEffect
(
m_track
,
m_pos
,
m_effect
);
// virtual
void
AddEffectCommand
::
undo
()
{
kDebug
()
<<
"---- undoing action"
;
if
(
m_doIt
)
m_view
->
deleteEffect
(
m_track
,
m_pos
,
m_effect
);
else
m_view
->
addEffect
(
m_track
,
m_pos
,
m_effect
);
}
// virtual
void
AddEffectCommand
::
redo
()
{
kDebug
()
<<
"---- redoing action"
;
if
(
m_doIt
)
m_view
->
addEffect
(
m_track
,
m_pos
,
m_effect
);
else
m_view
->
deleteEffect
(
m_track
,
m_pos
,
m_effect
);
// virtual
void
AddEffectCommand
::
redo
()
{
kDebug
()
<<
"---- redoing action"
;
if
(
m_doIt
)
m_view
->
addEffect
(
m_track
,
m_pos
,
m_effect
);
else
m_view
->
deleteEffect
(
m_track
,
m_pos
,
m_effect
);
}
#include
"addeffectcommand.moc"
src/addeffectcommand.h
View file @
2a223cff
...
...
@@ -26,21 +26,20 @@
#include
"customtrackview.h"
class
AddEffectCommand
:
public
QUndoCommand
{
public:
AddEffectCommand
(
CustomTrackView
*
view
,
const
int
track
,
GenTime
pos
,
QDomElement
effect
,
bool
doIt
);
class
AddEffectCommand
:
public
QUndoCommand
{
public:
AddEffectCommand
(
CustomTrackView
*
view
,
const
int
track
,
GenTime
pos
,
QDomElement
effect
,
bool
doIt
);
virtual
void
undo
();
virtual
void
redo
();
private:
CustomTrackView
*
m_view
;
int
m_track
;
QDomElement
m_effect
;
GenTime
m_pos
;
bool
m_doIt
;
};
private:
CustomTrackView
*
m_view
;
int
m_track
;
QDomElement
m_effect
;
GenTime
m_pos
;
bool
m_doIt
;
};
#endif
src/addtimelineclipcommand.cpp
View file @
2a223cff
...
...
@@ -22,26 +22,24 @@
#include
"addtimelineclipcommand.h"
AddTimelineClipCommand
::
AddTimelineClipCommand
(
CustomTrackView
*
view
,
QDomElement
xml
,
int
clipId
,
int
track
,
int
startpos
,
QRectF
rect
,
int
duration
,
bool
doIt
,
bool
doRemove
)
:
m_view
(
view
),
m_xml
(
xml
),
m_clipId
(
clipId
),
m_clipTrack
(
track
),
m_clipPos
(
startpos
),
m_clipRect
(
rect
),
m_clipDuration
(
duration
),
m_doIt
(
doIt
),
m_remove
(
doRemove
)
{
if
(
!
m_remove
)
setText
(
i18n
(
"Add timeline clip"
));
else
setText
(
i18n
(
"Delete timeline clip"
));
}
:
m_view
(
view
),
m_xml
(
xml
),
m_clipId
(
clipId
),
m_clipTrack
(
track
),
m_clipPos
(
startpos
),
m_clipRect
(
rect
),
m_clipDuration
(
duration
),
m_doIt
(
doIt
),
m_remove
(
doRemove
)
{
if
(
!
m_remove
)
setText
(
i18n
(
"Add timeline clip"
));
else
setText
(
i18n
(
"Delete timeline clip"
));
}
// virtual
void
AddTimelineClipCommand
::
undo
()
{
if
(
!
m_remove
)
m_view
->
deleteClip
(
m_clipTrack
,
m_clipPos
,
m_clipRect
);
else
m_view
->
addClip
(
m_xml
,
m_clipId
,
m_clipTrack
,
m_clipPos
,
m_clipRect
,
m_clipDuration
);
// virtual
void
AddTimelineClipCommand
::
undo
()
{
if
(
!
m_remove
)
m_view
->
deleteClip
(
m_clipTrack
,
m_clipPos
,
m_clipRect
);
else
m_view
->
addClip
(
m_xml
,
m_clipId
,
m_clipTrack
,
m_clipPos
,
m_clipRect
,
m_clipDuration
);
}
// virtual
void
AddTimelineClipCommand
::
redo
()
{
if
(
m_doIt
)
{
if
(
!
m_remove
)
m_view
->
addClip
(
m_xml
,
m_clipId
,
m_clipTrack
,
m_clipPos
,
m_clipRect
,
m_clipDuration
);
else
m_view
->
deleteClip
(
m_clipTrack
,
m_clipPos
,
m_clipRect
);
}
m_doIt
=
true
;
// virtual
void
AddTimelineClipCommand
::
redo
()
{
if
(
m_doIt
)
{
if
(
!
m_remove
)
m_view
->
addClip
(
m_xml
,
m_clipId
,
m_clipTrack
,
m_clipPos
,
m_clipRect
,
m_clipDuration
);
else
m_view
->
deleteClip
(
m_clipTrack
,
m_clipPos
,
m_clipRect
);
}
m_doIt
=
true
;
}
#include
"addtimelineclipcommand.moc"
src/addtimelineclipcommand.h
View file @
2a223cff
...
...
@@ -30,24 +30,23 @@
#include
"projectlist.h"
#include
"customtrackview.h"
class
AddTimelineClipCommand
:
public
QUndoCommand
{
public:
AddTimelineClipCommand
(
CustomTrackView
*
view
,
QDomElement
xml
,
int
clipId
,
int
track
,
int
startpos
,
QRectF
rect
,
int
duration
,
bool
doIt
,
bool
doRemove
);
class
AddTimelineClipCommand
:
public
QUndoCommand
{
public:
AddTimelineClipCommand
(
CustomTrackView
*
view
,
QDomElement
xml
,
int
clipId
,
int
track
,
int
startpos
,
QRectF
rect
,
int
duration
,
bool
doIt
,
bool
doRemove
);
virtual
void
undo
();
virtual
void
redo
();
private:
CustomTrackView
*
m_view
;
int
m_clipDuration
;
int
m_clipId
;
QDomElement
m_xml
;
int
m_clipTrack
;
int
m_clipPos
;
QRectF
m_clipRect
;
bool
m_doIt
;
bool
m_remove
;
};
private:
CustomTrackView
*
m_view
;
int
m_clipDuration
;
int
m_clipId
;
QDomElement
m_xml
;
int
m_clipTrack
;
int
m_clipPos
;
QRectF
m_clipRect
;
bool
m_doIt
;
bool
m_remove
;
};
#endif
src/clipitem.cpp
View file @
2a223cff
This diff is collapsed.
Click to expand it.
src/clipitem.h
View file @
2a223cff
...
...
@@ -33,17 +33,16 @@
#include
"kthumb.h"
class
ClipItem
:
public
QObject
,
public
QGraphicsRectItem
{
Q_OBJECT
class
ClipItem
:
public
QObject
,
public
QGraphicsRectItem
{
Q_OBJECT
public:
public:
ClipItem
(
DocClipBase
*
clip
,
int
track
,
int
startpos
,
const
QRectF
&
rect
,
int
duration
);
virtual
~
ClipItem
();
virtual
void
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
);
virtual
int
type
()
const
;
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
);
virtual
int
type
()
const
;
void
moveTo
(
int
x
,
double
scale
,
double
offset
,
int
newTrack
);
void
resizeStart
(
int
posx
,
double
scale
);
void
resizeEnd
(
int
posx
,
double
scale
);
...
...
@@ -82,15 +81,15 @@ class ClipItem : public QObject, public QGraphicsRectItem
void
setEffectAt
(
int
ix
,
QDomElement
effect
);
void
flashClip
();
protected:
virtual
void
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
);
protected:
virtual
void
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
dragEnterEvent
(
QGraphicsSceneDragDropEvent
*
event
);
virtual
void
dragLeaveEvent
(
QGraphicsSceneDragDropEvent
*
event
);
virtual
void
dropEvent
(
QGraphicsSceneDragDropEvent
*
event
);
private:
private:
QDomElement
m_xml
;
DocClipBase
*
m_clip
;
int
m_textWidth
;
...
...
@@ -117,25 +116,25 @@ class ClipItem : public QObject, public QGraphicsRectItem
double
m_opacity
;
QTimeLine
*
m_timeLine
;
uint
m_thumbsRequested
;
EffectsList
m_effectList
;
QMap
<
int
,
QPixmap
>
audioThumbCachePic
;
bool
audioThumbWasDrawn
,
audioThumbReady
;
QMap
<
int
,
QPixmap
>
audioThumbCachePic
;
bool
audioThumbWasDrawn
,
audioThumbReady
;
double
framePixelWidth
;
QMap
<
int
,
QPainterPath
>
channelPaths
;
QMap
<
int
,
QPainterPath
>
channelPaths
;
private
slots
:
private
slots
:
void
slotThumbReady
(
int
frame
,
QPixmap
pix
);
void
slotFetchThumbs
();
void
slotGetStartThumb
();
void
slotGetEndThumb
();
void
slotGotAudioData
();
void
slotPrepareAudioThumb
(
double
,
QPainterPath
,
int
,
int
);
void
slotPrepareAudioThumb
(
double
,
QPainterPath
,
int
,
int
);
void
animate
(
qreal
value
);
signals:
signals:
void
getThumb
(
int
,
int
);
void
prepareAudioThumb
(
double
,
QPainterPath
,
int
,
int
);
void
prepareAudioThumb
(
double
,
QPainterPath
,
int
,
int
);
};
...
...
src/clipmanager.cpp
View file @
2a223cff
...
...
@@ -24,69 +24,59 @@
#include
"clipmanager.h"
#include
"docclipbase.h"
ClipManager
::
ClipManager
(
KdenliveDoc
*
doc
)
:
m_doc
(
doc
)
{
m_clipIdCounter
=
1
;
ClipManager
::
ClipManager
(
KdenliveDoc
*
doc
)
:
m_doc
(
doc
)
{
m_clipIdCounter
=
1
;
}
ClipManager
::~
ClipManager
()
{
ClipManager
::~
ClipManager
()
{
}
void
ClipManager
::
setThumbsProgress
(
KUrl
url
,
int
progress
)
{
m_doc
->
setThumbsProgress
(
url
,
progress
);
void
ClipManager
::
setThumbsProgress
(
KUrl
url
,
int
progress
)
{
m_doc
->
setThumbsProgress
(
url
,
progress
);
}
void
ClipManager
::
addClip
(
DocClipBase
*
clip
)
{
m_clipList
.
append
(
clip
);
void
ClipManager
::
addClip
(
DocClipBase
*
clip
)
{
m_clipList
.
append
(
clip
);
}
void
ClipManager
::
slotDeleteClip
(
uint
clipId
)
{
for
(
int
i
=
0
;
i
<
m_clipList
.
count
();
i
++
)
{
if
(
m_clipList
.
at
(
i
)
->
getId
()
==
clipId
)
{
//m_clipList.removeAt(i
);
AddClipCommand
*
command
=
new
AddClipCommand
(
m_doc
,
m_clipList
.
at
(
i
)
->
toXML
(),
clipId
,
false
);
m_doc
->
commandStack
()
->
push
(
command
)
;
break
;
void
ClipManager
::
slotDeleteClip
(
uint
clipId
)
{
for
(
int
i
=
0
;
i
<
m_clipList
.
count
();
i
++
)
{
if
(
m_clipList
.
at
(
i
)
->
getId
()
==
clipId
)
{
//
m_clipList.
removeAt(i);
AddClipCommand
*
command
=
new
AddClipCommand
(
m_doc
,
m_clipList
.
at
(
i
)
->
toXML
(),
clipId
,
false
);
m_doc
->
commandStack
()
->
push
(
command
);
break
;
}
}
}
}
void
ClipManager
::
deleteClip
(
uint
clipId
)
{
for
(
int
i
=
0
;
i
<
m_clipList
.
count
();
i
++
)
{
if
(
m_clipList
.
at
(
i
)
->
getId
()
==
clipId
)
{
m_clipList
.
removeAt
(
i
)
;
break
;
void
ClipManager
::
deleteClip
(
uint
clipId
)
{
for
(
int
i
=
0
;
i
<
m_clipList
.
count
();
i
++
)
{
if
(
m_clipList
.
at
(
i
)
->
getId
()
==
clipId
)
{
m_clipList
.
removeAt
(
i
);
break
;
}
}
}
}
DocClipBase
*
ClipManager
::
getClipAt
(
int
pos
)
{
return
m_clipList
.
at
(
pos
);
DocClipBase
*
ClipManager
::
getClipAt
(
int
pos
)
{
return
m_clipList
.
at
(
pos
);
}
DocClipBase
*
ClipManager
::
getClipById
(
int
clipId
)
{
kDebug
()
<<
"++++ CLIP MAN, LOOKING FOR CLIP ID: "
<<
clipId
;
for
(
int
i
=
0
;
i
<
m_clipList
.
count
();
i
++
)
{
if
(
m_clipList
.
at
(
i
)
->
getId
()
==
clipId
)
{
kDebug
()
<<
"++++ CLIP MAN, FOUND FOR CLIP ID: "
<<
clipId
;
return
m_clipList
.
at
(
i
);
DocClipBase
*
ClipManager
::
getClipById
(
int
clipId
)
{
kDebug
()
<<
"++++ CLIP MAN, LOOKING FOR CLIP ID: "
<<
clipId
;
for
(
int
i
=
0
;
i
<
m_clipList
.
count
();
i
++
)
{
if
(
m_clipList
.
at
(
i
)
->
getId
()
==
clipId
)
{
kDebug
()
<<
"++++ CLIP MAN, FOUND FOR CLIP ID: "
<<
clipId
;
return
m_clipList
.
at
(
i
);
}
}
}
return
NULL
;
return
NULL
;
}
void
ClipManager
::
slotAddClipFile
(
const
KUrl
url
,
const
QString
group
)
{
kDebug
()
<<
"///// CLIP MANAGER, ADDING CLIP: "
<<
url
;
void
ClipManager
::
slotAddClipFile
(
const
KUrl
url
,
const
QString
group
)
{
kDebug
()
<<
"///// CLIP MANAGER, ADDING CLIP: "
<<
url
;
QDomDocument
doc
;
QDomElement
prod
=
doc
.
createElement
(
"producer"
);
prod
.
setAttribute
(
"resource"
,
url
.
path
());
...
...
@@ -95,16 +85,15 @@ void ClipManager::slotAddClipFile(const KUrl url, const QString group)
if
(
!
group
.
isEmpty
())
prod
.
setAttribute
(
"group"
,
group
);
KMimeType
::
Ptr
type
=
KMimeType
::
findByUrl
(
url
);
if
(
type
->
name
().
startsWith
(
"image/"
))
{
prod
.
setAttribute
(
"type"
,
(
int
)
IMAGE
);
prod
.
setAttribute
(
"in"
,
"0"
);
prod
.
setAttribute
(
"out"
,
m_doc
->
getFramePos
(
KdenliveSettings
::
image_duration
()));
prod
.
setAttribute
(
"type"
,
(
int
)
IMAGE
);
prod
.
setAttribute
(
"in"
,
"0"
);
prod
.
setAttribute
(
"out"
,
m_doc
->
getFramePos
(
KdenliveSettings
::
image_duration
()));
}
AddClipCommand
*
command
=
new
AddClipCommand
(
m_doc
,
prod
,
id
,
true
);
m_doc
->
commandStack
()
->
push
(
command
);
}
void
ClipManager
::
slotAddColorClipFile
(
const
QString
name
,
const
QString
color
,
QString
duration
,
const
QString
group
)
{
void
ClipManager
::
slotAddColorClipFile
(
const
QString
name
,
const
QString
color
,
QString
duration
,
const
QString
group
)
{
QDomDocument
doc
;
QDomElement
prod
=
doc
.
createElement
(
"producer"
);
prod
.
setAttribute
(
"mlt_service"
,
"colour"
);
...
...
src/clipmanager.h
View file @
2a223cff
...
...
@@ -39,8 +39,8 @@
class
KdenliveDoc
;
class
DocClipBase
;
class
ClipManager
:
public
QObject
{
Q_OBJECT
public
:
class
ClipManager
:
public
QObject
{
Q_OBJECT
public
:
ClipManager
(
KdenliveDoc
*
doc
);
...
...
@@ -54,7 +54,7 @@ class ClipManager:public QObject {
void
slotDeleteClip
(
uint
clipId
);
void
setThumbsProgress
(
KUrl
url
,
int
progress
);
private:
// Private attributes
private:
// Private attributes
/** the list of clips in the document */
QList
<
DocClipBase
*>
m_clipList
;
/** the document undo stack*/
...
...
src/complexparameter.cpp
View file @
2a223cff
...
...
@@ -25,115 +25,114 @@
#include
<QMenu>
ComplexParameter
::
ComplexParameter
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
ui
.
setupUi
(
this
);
//ui.effectlist->horizontalHeader()->setVisible(false);
//ui.effectlist->verticalHeader()->setVisible(false);
activeRow
=-
1
;
clipref
=
NULL
;
ui
.
buttonLeftRight
->
setIcon
(
KIcon
(
"go-next"
));
//better icons needed
ui
.
buttonLeftRight
->
setToolTip
(
i18n
(
"Allow horizontal moves"
));
ui
.
buttonUpDown
->
setIcon
(
KIcon
(
"go-up"
));
ui
.
buttonUpDown
->
setToolTip
(
i18n
(
"Allow vertical moves"
));
ui
.
buttonShowInTimeline
->
setIcon
(
KIcon
(
"kmplayer"
));
ui
.
buttonShowInTimeline
->
setToolTip
(
i18n
(
"Show keyframes in timeline"
));
ui
.
buttonHelp
->
setIcon
(
KIcon
(
"help-about"
));
ui
.
buttonHelp
->
setToolTip
(
i18n
(
"Parameter info"
));
ui
.
buttonNewPoints
->
setIcon
(
KIcon
(
"xedit"
));
ui
.
buttonNewPoints
->
setToolTip
(
i18n
(
"Add keyframe"
));
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
.
buttonNewPoints
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotSetNew
()
)
);
connect
(
ui
.
buttonHelp
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotSetHelp
()
)
);
connect
(
ui
.
parameterList
,
SIGNAL
(
currentIndexChanged
(
const
QString
&
)
),
this
,
SLOT
(
slotParameterChanged
(
const
QString
&
)
)
);
//connect (ui.effectlist, SIGNAL (itemSelectionChanged() ) , this, SLOT ( itemSelectionChanged()));
connect
(
this
,
SIGNAL
(
transferParamDesc
(
const
QDomElement
&
,
int
,
int
)
),
ui
.
kplotwidget
,
SLOT
(
setPointLists
(
const
QDomElement
&
,
int
,
int
)
));
connect
(
ui
.
kplotwidget
,
SIGNAL
(
parameterChanged
(
QDomElement
)
),
this
,
SLOT
(
slotUpdateEffectParams
(
QDomElement
)));
connect
(
ui
.
kplotwidget
,
SIGNAL
(
parameterList
(
QStringList
)),
this
,
SLOT
(
slotUpdateParameterList
(
QStringList
)));
/*ÜeffectLists["audio"]=audioEffectList;
effectLists["video"]=videoEffectList;
effectLists["custom"]=customEffectList;*/
setSizePolicy
(
QSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Expanding
));
ui
.
infoBox
->
hide
();
updateButtonStatus
();
:
QWidget
(
parent
)
{
ui
.
setupUi
(
this
);
//ui.effectlist->horizontalHeader()->setVisible(false);
//ui.effectlist->verticalHeader()->setVisible(false);
activeRow
=
-
1
;
clipref
=
NULL
;
ui
.
buttonLeftRight
->
setIcon
(
KIcon
(
"go-next"
));
//better icons needed
ui
.
buttonLeftRight
->
setToolTip
(
i18n
(
"Allow horizontal moves"
));
ui
.
buttonUpDown
->
setIcon
(
KIcon
(
"go-up"
));
ui
.
buttonUpDown
->
setToolTip
(
i18n
(
"Allow vertical moves"
));
ui
.
buttonShowInTimeline
->
setIcon
(
KIcon
(
"kmplayer"
));
ui
.
buttonShowInTimeline
->
setToolTip
(
i18n
(
"Show keyframes in timeline"
));
ui
.
buttonHelp
->
setIcon
(
KIcon
(
"help-about"
));
ui
.
buttonHelp
->
setToolTip
(
i18n
(
"Parameter info"
));
ui
.
buttonNewPoints
->
setIcon
(
KIcon
(
"xedit"
));
ui
.
buttonNewPoints
->
setToolTip
(
i18n
(
"Add keyframe"
));
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
.
buttonNewPoints
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotSetNew
()));
connect
(
ui
.
buttonHelp
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotSetHelp
()));
connect
(
ui
.
parameterList
,
SIGNAL
(
currentIndexChanged
(
const
QString
&
)),
this
,
SLOT
(
slotParameterChanged
(
const
QString
&
)));
//connect (ui.effectlist, SIGNAL (itemSelectionChanged() ) , this, SLOT ( itemSelectionChanged()));
connect
(
this
,
SIGNAL
(
transferParamDesc
(
const
QDomElement
&
,
int
,
int
)),
ui
.
kplotwidget
,
SLOT
(
setPointLists
(
const
QDomElement
&
,
int
,
int
)));
connect
(
ui
.
kplotwidget
,
SIGNAL
(
parameterChanged
(
QDomElement
)),
this
,
SLOT
(
slotUpdateEffectParams
(
QDomElement
)));
connect
(
ui
.
kplotwidget
,
SIGNAL
(
parameterList
(
QStringList
)),
this
,
SLOT
(
slotUpdateParameterList
(
QStringList
)));
/*ÜeffectLists["audio"]=audioEffectList;
effectLists["video"]=videoEffectList;
effectLists["custom"]=customEffectList;*/
setSizePolicy
(
QSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Expanding
));
ui
.
infoBox
->
hide
();
updateButtonStatus
();
}
void
ComplexParameter
::
slotSetMoveX
(){
ui
.
kplotwidget
->
setMoveX
(
!
ui
.
kplotwidget
->
isMoveX
());
updateButtonStatus
();
void
ComplexParameter
::
slotSetMoveX
()
{
ui
.
kplotwidget
->
setMoveX
(
!
ui
.
kplotwidget
->
isMoveX
());
updateButtonStatus
();
}
void
ComplexParameter
::
slotSetMoveY
(){
ui
.
kplotwidget
->
setMoveY
(
!
ui
.
kplotwidget
->
isMoveY
());
updateButtonStatus
();
void
ComplexParameter
::
slotSetMoveY
()
{
ui
.
kplotwidget
->
setMoveY
(
!
ui
.
kplotwidget
->
isMoveY
());
updateButtonStatus
();
}
void
ComplexParameter
::
slotSetNew
(){
ui
.
kplotwidget
->
setNewPoints
(
!
ui
.
kplotwidget
->
isNewPoints
());
updateButtonStatus
();
void
ComplexParameter
::
slotSetNew
()
{
ui
.
kplotwidget
->
setNewPoints
(
!
ui
.
kplotwidget
->
isNewPoints
());
updateButtonStatus
();
}
void
ComplexParameter
::
slotSetHelp
(){
ui
.
infoBox
->
setVisible
(
!
ui
.
infoBox
->
isVisible
());
ui
.
buttonHelp
->
setDown
(
ui
.
infoBox
->
isVisible
());
void
ComplexParameter
::
slotSetHelp
()
{
ui
.
infoBox
->
setVisible
(
!
ui
.
infoBox
->
isVisible
());
ui
.
buttonHelp
->
setDown
(
ui
.
infoBox
->
isVisible
());
}
void
ComplexParameter
::
slotShowInTimeline
(){
void
ComplexParameter
::
slotShowInTimeline
()
{
ui
.
kplotwidget
->
setMoveTimeLine
(
!
ui
.
kplotwidget
->
isMoveTimeline
());
updateButtonStatus
();
ui
.
kplotwidget
->
setMoveTimeLine
(
!
ui
.
kplotwidget
->
isMoveTimeline
());
updateButtonStatus
();
}
void
ComplexParameter
::
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
());
ui
.
buttonNewPoints
->
setEnabled
(
ui
.
parameterList
->
currentText
()
!=
"all"
);
ui
.
buttonNewPoints
->
setDown
(
ui
.
kplotwidget
->
isNewPoints
());
void
ComplexParameter
::
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
());
ui
.
buttonNewPoints
->
setEnabled
(
ui
.
parameterList
-&