Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
585448e1
Commit
585448e1
authored
Jul 18, 2016
by
Hugo Beauzée-Luyssen
Browse files
Remove now unused files
parent
5414132a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Gui/widgets/TrackControls.cpp
deleted
100644 → 0
View file @
5414132a
/*****************************************************************************
* TrackControls.cpp: Widget used to configure a track
*****************************************************************************
* Copyright (C) 2008-2016 VideoLAN
*
* Authors: Ludovic Fauvet <etix@l0cal.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
"TrackControls.h"
#include
"timeline/GraphicsTrack.h"
#include
"effectsengine/EffectStack.h"
#include
"Backend/ITrack.h"
#include
"Workflow/TrackWorkflow.h"
#include
"ui_TrackControls.h"
#include
<QInputDialog>
#include
<QSettings>
TrackControls
::
TrackControls
(
GraphicsTrack
*
track
,
QWidget
*
parent
)
:
QWidget
(
parent
),
m_ui
(
new
Ui
::
TrackControls
),
m_track
(
track
)
{
//FIXME: This type of things should be in the project settings
QSettings
s
(
QSettings
::
UserScope
,
qApp
->
organizationName
(),
"timeline"
);
if
(
track
->
mediaType
()
==
Workflow
::
VideoTrack
&&
s
.
contains
(
"video"
+
QString
::
number
(
track
->
trackNumber
()
)
)
)
m_title
=
s
.
value
(
"video"
+
QString
::
number
(
track
->
trackNumber
()
)
).
toString
();
else
if
(
track
->
mediaType
()
==
Workflow
::
AudioTrack
&&
s
.
contains
(
"audio"
+
QString
::
number
(
track
->
trackNumber
()
)
)
)
m_title
=
s
.
value
(
"audio"
+
QString
::
number
(
track
->
trackNumber
()
)
).
toString
();
m_ui
->
setupUi
(
this
);
if
(
track
->
mediaType
()
!=
Workflow
::
VideoTrack
)
m_ui
->
fxButton
->
hide
();
setTrackDisabled
(
!
m_track
->
isEnabled
()
);
connect
(
m_ui
->
disableButton
,
SIGNAL
(
clicked
(
bool
)
),
this
,
SLOT
(
setTrackDisabled
(
bool
)
)
);
connect
(
m_ui
->
trackLabel
,
SIGNAL
(
doubleClicked
()
),
this
,
SLOT
(
trackNameDoubleClicked
()
)
);
connect
(
m_ui
->
fxButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
fxButtonClicked
()
)
);
updateTextLabels
();
}
TrackControls
::~
TrackControls
()
{
delete
m_ui
;
}
void
TrackControls
::
updateTextLabels
()
{
if
(
m_track
->
mediaType
()
==
Workflow
::
VideoTrack
)
{
if
(
m_title
.
isEmpty
()
==
true
)
m_ui
->
trackLabel
->
setText
(
tr
(
"Video #%1"
).
arg
(
QString
::
number
(
m_track
->
trackNumber
()
+
1
)
)
);
else
m_ui
->
trackLabel
->
setText
(
m_title
);
}
else
if
(
m_track
->
mediaType
()
==
Workflow
::
AudioTrack
)
{
if
(
m_title
.
isEmpty
()
)
m_ui
->
trackLabel
->
setText
(
tr
(
"Audio #%1"
).
arg
(
QString
::
number
(
m_track
->
trackNumber
()
+
1
)
)
);
else
m_ui
->
trackLabel
->
setText
(
m_title
);
}
}
void
TrackControls
::
changeEvent
(
QEvent
*
e
)
{
QWidget
::
changeEvent
(
e
);
switch
(
e
->
type
()
)
{
case
QEvent
::
LanguageChange
:
m_ui
->
retranslateUi
(
this
);
updateTextLabels
();
break
;
default:
break
;
}
}
void
TrackControls
::
setTrackDisabled
(
bool
disable
)
{
m_track
->
setTrackEnabled
(
!
disable
);
if
(
!
disable
)
{
if
(
m_track
->
mediaType
()
==
Workflow
::
VideoTrack
)
m_ui
->
disableButton
->
setIcon
(
QIcon
(
":/images/trackon"
)
);
else
if
(
m_track
->
mediaType
()
==
Workflow
::
AudioTrack
)
m_ui
->
disableButton
->
setIcon
(
QIcon
(
":/images/hpon"
)
);
}
else
{
if
(
m_track
->
mediaType
()
==
Workflow
::
VideoTrack
)
m_ui
->
disableButton
->
setIcon
(
QIcon
(
":/images/trackoff"
)
);
else
if
(
m_track
->
mediaType
()
==
Workflow
::
AudioTrack
)
m_ui
->
disableButton
->
setIcon
(
QIcon
(
":/images/hpoff"
)
);
}
}
void
TrackControls
::
trackNameDoubleClicked
()
{
QString
name
=
QInputDialog
::
getText
(
nullptr
,
tr
(
"Rename track"
),
tr
(
"Enter the track new name"
)
);
if
(
name
.
isEmpty
()
==
false
)
{
QSettings
s
(
QSettings
::
UserScope
,
qApp
->
organizationName
(),
"timeline"
);
m_title
=
name
;
if
(
m_track
->
mediaType
()
==
Workflow
::
VideoTrack
)
s
.
setValue
(
"video"
+
QString
::
number
(
m_track
->
trackNumber
()
),
name
);
else
s
.
setValue
(
"audio"
+
QString
::
number
(
m_track
->
trackNumber
()
),
name
);
updateTextLabels
();
}
}
void
TrackControls
::
fxButtonClicked
()
{
EffectStack
*
stack
=
new
EffectStack
(
m_track
->
trackWorkflow
()
->
input
(),
this
);
stack
->
show
();
}
src/Gui/widgets/TrackControls.h
deleted
100644 → 0
View file @
5414132a
/*****************************************************************************
* TrackControls.h: Widget used to configure a track
*****************************************************************************
* Copyright (C) 2008-2016 VideoLAN
*
* Authors: Ludovic Fauvet <etix@l0cal.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 TRACKCONTROLS_H
#define TRACKCONTROLS_H
#include
<QWidget>
class
GraphicsTrack
;
namespace
Ui
{
class
TrackControls
;
}
class
TrackControls
:
public
QWidget
{
Q_OBJECT
public:
TrackControls
(
GraphicsTrack
*
track
,
QWidget
*
parent
=
0
);
~
TrackControls
();
protected:
void
changeEvent
(
QEvent
*
e
);
private
slots
:
void
setTrackDisabled
(
bool
disable
);
void
trackNameDoubleClicked
();
void
fxButtonClicked
();
private:
void
updateTextLabels
();
private:
Ui
::
TrackControls
*
m_ui
;
GraphicsTrack
*
m_track
;
QString
m_title
;
};
#endif // TRACKCONTROLS_H
src/Gui/widgets/ui/TrackControls.ui
deleted
100644 → 0
View file @
5414132a
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
TrackControls
</class>
<widget
class=
"QWidget"
name=
"TrackControls"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
131
</width>
<height>
29
</height>
</rect>
</property>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<property
name=
"spacing"
>
<number>
1
</number>
</property>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
4
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QPushButton"
name=
"disableButton"
>
<property
name=
"maximumSize"
>
<size>
<width>
22
</width>
<height>
22
</height>
</size>
</property>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"iconSize"
>
<size>
<width>
20
</width>
<height>
20
</height>
</size>
</property>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"flat"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"fxButton"
>
<property
name=
"maximumSize"
>
<size>
<width>
22
</width>
<height>
22
</height>
</size>
</property>
<property
name=
"icon"
>
<iconset
resource=
"../../../../resources.qrc"
>
<normaloff>
:/images/fx
</normaloff>
:/images/fx
</iconset>
</property>
<property
name=
"iconSize"
>
<size>
<width>
20
</width>
<height>
20
</height>
</size>
</property>
<property
name=
"checkable"
>
<bool>
false
</bool>
</property>
<property
name=
"flat"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
10
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"ExtendedLabel"
name=
"trackLabel"
>
<property
name=
"text"
>
<string>
TextLabel
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>
ExtendedLabel
</class>
<extends>
QLabel
</extends>
<header>
Gui/widgets/ExtendedLabel.h
</header>
</customwidget>
</customwidgets>
<resources>
<include
location=
"../../../../resources.qrc"
/>
</resources>
<connections/>
</ui>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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