Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLMC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
luyikei
VLMC
Commits
eb8f2eae
Commit
eb8f2eae
authored
Jan 28, 2010
by
Christophe Courtaut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing tr. Translate track control at runtime
parent
c1144938
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
18 deletions
+24
-18
src/Gui/MainWindow.cpp
src/Gui/MainWindow.cpp
+13
-13
src/Gui/widgets/TrackControls.cpp
src/Gui/widgets/TrackControls.cpp
+10
-5
src/Gui/widgets/TrackControls.h
src/Gui/widgets/TrackControls.h
+1
-0
No files found.
src/Gui/MainWindow.cpp
View file @
eb8f2eae
...
...
@@ -309,15 +309,15 @@ void MainWindow::initializeDockWidgets( void )
void
MainWindow
::
createGlobalPreferences
()
{
m_globalPreferences
=
new
Settings
(
false
,
"VLMC"
,
this
);
m_globalPreferences
->
addWidget
(
"VLMC"
,
m_globalPreferences
->
addWidget
(
tr
(
"VLMC"
)
,
new
VLMCPreferences
(
m_globalPreferences
),
QIcon
(
":/images/images/vlmc.png"
),
"VLMC settings"
);
m_globalPreferences
->
addWidget
(
"Language preferences"
,
tr
(
"VLMC settings"
)
);
m_globalPreferences
->
addWidget
(
tr
(
"Language preferences"
)
,
new
LanguagePreferences
(
m_globalPreferences
),
QIcon
(
":/images/images/vlmc.png"
),
"Langage settings"
);
m_globalPreferences
->
addWidget
(
"Keyboard"
,
tr
(
"Language settings"
)
);
m_globalPreferences
->
addWidget
(
tr
(
"Keyboard"
)
,
new
KeyboardShortcut
(
m_globalPreferences
),
QIcon
(
":/images/keyboard"
),
tr
(
"Keyboard Settings"
)
);
...
...
@@ -326,18 +326,18 @@ void MainWindow::createGlobalPreferences()
void
MainWindow
::
createProjectPreferences
()
{
m_projectPreferences
=
new
Settings
(
false
,
"project"
,
this
);
m_projectPreferences
->
addWidget
(
"Project"
,
m_projectPreferences
->
addWidget
(
tr
(
"Project"
)
,
new
ProjectPreferences
,
QIcon
(
":/images/images/vlmc.png"
),
"Project settings"
);
m_projectPreferences
->
addWidget
(
"Video"
,
tr
(
"Project settings"
)
);
m_projectPreferences
->
addWidget
(
tr
(
"Video"
)
,
new
VideoProjectPreferences
,
QIcon
(
":/images/images/video.png"
),
"Video settings"
);
m_projectPreferences
->
addWidget
(
"Audio"
,
tr
(
"Video settings"
)
);
m_projectPreferences
->
addWidget
(
tr
(
"Audio"
)
,
new
AudioProjectPreferences
,
QIcon
(
":/images/images/audio.png"
),
"Audio settings"
);
tr
(
"Audio settings"
)
);
}
...
...
@@ -369,11 +369,11 @@ void MainWindow::on_actionRender_triggered()
{
if
(
MainWorkflow
::
getInstance
()
->
getLengthFrame
()
<=
0
)
{
QMessageBox
::
warning
(
NULL
,
"VLMC Renderer"
,
"There is nothing to render."
);
QMessageBox
::
warning
(
NULL
,
tr
(
"VLMC Renderer"
),
tr
(
"There is nothing to render."
)
);
return
;
}
QString
outputFileName
=
QFileDialog
::
getSaveFileName
(
NULL
,
"Enter the output file name"
,
QFileDialog
::
getSaveFileName
(
NULL
,
tr
(
"Enter the output file name"
)
,
QDir
::
currentPath
(),
"Videos(*.avi *.mpg)"
);
if
(
outputFileName
.
length
()
==
0
)
return
;
...
...
src/Gui/widgets/TrackControls.cpp
View file @
eb8f2eae
...
...
@@ -32,11 +32,7 @@ TrackControls::TrackControls( GraphicsTrack* track, QWidget *parent ) :
setTrackDisabled
(
!
m_track
->
isEnabled
()
);
connect
(
m_ui
->
disableButton
,
SIGNAL
(
clicked
(
bool
)
),
this
,
SLOT
(
setTrackDisabled
(
bool
)
)
);
if
(
m_track
->
mediaType
()
==
MainWorkflow
::
VideoTrack
)
m_ui
->
trackLabel
->
setText
(
tr
(
"Video #%1"
).
arg
(
QString
::
number
(
m_track
->
trackNumber
()
+
1
)
)
);
else
if
(
m_track
->
mediaType
()
==
MainWorkflow
::
AudioTrack
)
m_ui
->
trackLabel
->
setText
(
tr
(
"Audio #%1"
).
arg
(
QString
::
number
(
m_track
->
trackNumber
()
+
1
)
)
);
updateTextLabels
();
}
TrackControls
::~
TrackControls
()
...
...
@@ -44,12 +40,21 @@ TrackControls::~TrackControls()
delete
m_ui
;
}
void
TrackControls
::
updateTextLabels
()
{
if
(
m_track
->
mediaType
()
==
MainWorkflow
::
VideoTrack
)
m_ui
->
trackLabel
->
setText
(
tr
(
"Video #%1"
).
arg
(
QString
::
number
(
m_track
->
trackNumber
()
+
1
)
)
);
else
if
(
m_track
->
mediaType
()
==
MainWorkflow
::
AudioTrack
)
m_ui
->
trackLabel
->
setText
(
tr
(
"Audio #%1"
).
arg
(
QString
::
number
(
m_track
->
trackNumber
()
+
1
)
)
);
}
void
TrackControls
::
changeEvent
(
QEvent
*
e
)
{
QWidget
::
changeEvent
(
e
);
switch
(
e
->
type
()
)
{
case
QEvent
::
LanguageChange
:
m_ui
->
retranslateUi
(
this
);
updateTextLabels
();
break
;
default:
break
;
...
...
src/Gui/widgets/TrackControls.h
View file @
eb8f2eae
...
...
@@ -45,6 +45,7 @@ private slots:
void
setTrackDisabled
(
bool
disable
);
private:
void
updateTextLabels
();
Ui
::
TrackControls
*
m_ui
;
GraphicsTrack
*
m_track
;
};
...
...
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