Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLMC
Commits
d3a6beaf
Commit
d3a6beaf
authored
May 27, 2009
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unused class that was "preventing" compilation
w00ps, my bad, forgot this earlier :)
parent
7a035b67
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
135 deletions
+0
-135
src/TimelineBackend.cpp
src/TimelineBackend.cpp
+0
-74
src/TimelineBackend.h
src/TimelineBackend.h
+0
-59
vlmc.pro
vlmc.pro
+0
-2
No files found.
src/TimelineBackend.cpp
deleted
100644 → 0
View file @
7a035b67
/*****************************************************************************
* TimelineBackend.cpp: Backend for Timeline
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Christophe Courtaut <christophe.courtaut@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "TimelineBackend.h"
TimelineBackend
::
TimelineBackend
()
{
m_audioTracks
=
new
QMap
<
int
,
Track
*>
();
m_videoTracks
=
new
QMap
<
int
,
Track
*>
();
}
Track
*
TimelineBackend
::
getTrack
(
TimelineBackend
::
TrackType
type
,
int
index
)
const
{
if
(
type
==
TimelineBackend
::
Audio
)
return
m_audioTracks
->
value
(
index
,
NULL
);
else
if
(
type
==
TimelineBackend
::
Video
)
return
m_videoTracks
->
value
(
index
,
NULL
);
return
NULL
;
}
int
TimelineBackend
::
createNewTrack
(
TimelineBackend
::
TrackType
type
)
{
Track
*
track
=
new
Track
();
if
(
type
==
TimelineBackend
::
Audio
)
m_audioTracks
->
insert
(
findNewIndex
(
type
),
track
);
else
m_videoTracks
->
insert
(
findNewIndex
(
type
),
track
);
return
getTrackIndex
(
type
,
track
);
}
bool
TimelineBackend
::
removeTrack
(
TimelineBackend
::
TrackType
type
,
int
index
)
{
QMap
<
int
,
Track
*>*
map
=
(
type
==
TimelineBackend
::
Audio
)
?
m_audioTracks
:
m_videoTracks
;
return
map
->
remove
(
index
);
}
int
TimelineBackend
::
getTrackIndex
(
TimelineBackend
::
TrackType
type
,
Track
*
track
)
const
{
QMap
<
int
,
Track
*>*
map
=
(
type
==
TimelineBackend
::
Audio
)
?
m_audioTracks
:
m_videoTracks
;
return
map
->
key
(
track
,
-
1
);
}
int
TimelineBackend
::
findNewIndex
(
TimelineBackend
::
TrackType
type
)
const
{
QMap
<
int
,
Track
*>*
map
=
(
type
==
TimelineBackend
::
Audio
)
?
m_audioTracks
:
m_videoTracks
;
int
index
=
0
;
while
(
index
<
map
->
size
()
)
{
if
(
!
map
->
contains
(
index
)
)
return
index
;
index
++
;
}
return
index
;
}
src/TimelineBackend.h
deleted
100644 → 0
View file @
7a035b67
/*****************************************************************************
* TimelineBackend.h: Backend for Timeline
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Christophe Courtaut <christophe.courtaut@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef TIMELINEBACKEND_H
#define TIMELINEBACKEND_H
#include <QObject>
#include <QMap>
#include "Track.h"
class
TimelineBackend
:
public
QObject
{
Q_OBJECT
Q_DISABLE_COPY
(
TimelineBackend
);
public:
enum
TrackType
{
Audio
,
Video
};
TimelineBackend
();
Track
*
getTrack
(
TimelineBackend
::
TrackType
type
,
int
index
)
const
;
int
createNewTrack
(
TimelineBackend
::
TrackType
type
);
bool
removeTrack
(
TimelineBackend
::
TrackType
type
,
int
index
);
int
getTrackIndex
(
TimelineBackend
::
TrackType
type
,
Track
*
track
)
const
;
private:
int
findNewIndex
(
TimelineBackend
::
TrackType
type
)
const
;
private:
QMap
<
int
,
Track
*>*
m_audioTracks
;
QMap
<
int
,
Track
*>*
m_videoTracks
;
};
#endif // TIMELINEBACKEND_H
vlmc.pro
View file @
d3a6beaf
...
...
@@ -37,7 +37,6 @@ SOURCES += src/main.cpp \
src
/
Media
.
cpp
\
src
/
gui
/
FileBrowser
.
cpp
\
src
/
gui
/
GraphicsCursorItem
.
cpp
\
src
/
TimelineBackend
.
cpp
\
src
/
Workflow
/
ClipWorkflow
.
cpp
\
src
/
Workflow
/
TrackWorkflow
.
cpp
\
src
/
Workflow
/
MainWorkflow
.
cpp
\
...
...
@@ -72,7 +71,6 @@ HEADERS += src/gui/MainWindow.h \
src
/
Media
.
h
\
src
/
gui
/
FileBrowser
.
h
\
src
/
gui
/
GraphicsCursorItem
.
h
\
src
/
TimelineBackend
.
h
\
src
/
Workflow
/
ClipWorkflow
.
h
\
src
/
Workflow
/
TrackWorkflow
.
h
\
src
/
Workflow
/
MainWorkflow
.
h
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment