Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
450
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
8aa7563a
Commit
8aa7563a
authored
11 years ago
by
François Cartegnie
Browse files
Options
Downloads
Patches
Plain Diff
Qt: ConvertDialog: rewrite logic
parent
258973e8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/gui/qt4/dialogs/convert.cpp
+27
-21
27 additions, 21 deletions
modules/gui/qt4/dialogs/convert.cpp
modules/gui/qt4/dialogs/convert.hpp
+3
-2
3 additions, 2 deletions
modules/gui/qt4/dialogs/convert.hpp
with
30 additions
and
23 deletions
modules/gui/qt4/dialogs/convert.cpp
+
27
−
21
View file @
8aa7563a
...
...
@@ -68,28 +68,41 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
destLayout
->
addWidget
(
fileSelectButton
,
0
,
2
);
BUTTONACT
(
fileSelectButton
,
fileBrowse
()
);
displayBox
=
new
QCheckBox
(
qtr
(
"Display the output"
)
);
displayBox
->
setToolTip
(
qtr
(
"This display the resulting media, but can "
"slow things down."
)
);
destLayout
->
addWidget
(
displayBox
,
2
,
0
,
1
,
-
1
);
mainLayout
->
addWidget
(
destBox
,
1
,
0
,
1
,
-
1
);
mainLayout
->
addWidget
(
destBox
,
3
,
0
,
1
,
-
1
);
/* Profile Editor */
QGroupBox
*
settingBox
=
new
QGroupBox
(
qtr
(
"Settings"
)
);
QGridLayout
*
settingLayout
=
new
QGridLayout
(
settingBox
);
profile
=
new
VLCProfileSelector
(
this
);
settingLayout
->
addWidget
(
profile
,
0
,
0
,
1
,
-
1
);
QRadioButton
*
convertRadio
=
new
QRadioButton
(
qtr
(
"Convert"
)
);
dumpRadio
=
new
QRadioButton
(
qtr
(
"Dump raw input"
)
);
QButtonGroup
*
buttonGroup
=
new
QButtonGroup
(
this
);
buttonGroup
->
addButton
(
convertRadio
);
buttonGroup
->
addButton
(
dumpRadio
);
convertRadio
->
setChecked
(
true
);
settingLayout
->
addWidget
(
convertRadio
,
1
,
0
);
QWidget
*
convertPanel
=
new
QWidget
(
this
);
QVBoxLayout
*
convertLayout
=
new
QVBoxLayout
(
convertPanel
);
displayBox
=
new
QCheckBox
(
qtr
(
"Display the output"
)
);
displayBox
->
setToolTip
(
qtr
(
"This display the resulting media, but can "
"slow things down."
)
);
convertLayout
->
addWidget
(
displayBox
);
deinterBox
=
new
QCheckBox
(
qtr
(
"Deinterlace"
)
);
settingLayout
->
addWidget
(
deinterBox
,
1
,
0
);
convertLayout
->
addWidget
(
deinterBox
);
profile
=
new
VLCProfileSelector
(
this
);
convertLayout
->
addWidget
(
profile
);
dumpBox
=
new
QCheckBox
(
qtr
(
"Dump raw input"
)
);
settingLayout
->
addWidget
(
dumpBox
,
1
,
1
);
settingLayout
->
addWidget
(
convertPanel
,
2
,
0
);
mainLayout
->
addWidget
(
settingBox
,
3
,
0
,
1
,
-
1
);
settingLayout
->
addWidget
(
dumpRadio
,
5
,
0
);
mainLayout
->
addWidget
(
settingBox
,
1
,
0
,
1
,
-
1
);
/* Buttons */
QPushButton
*
okButton
=
new
QPushButton
(
qtr
(
"&Start"
)
);
...
...
@@ -105,7 +118,7 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
BUTTONACT
(
okButton
,
close
());
BUTTONACT
(
cancelButton
,
cancel
());
CONNECT
(
dumpBox
,
toggled
(
bool
),
this
,
dumpCheck
ed
(
bool
));
CONNECT
(
convertRadio
,
toggled
(
bool
),
convertPanel
,
setEnabl
ed
(
bool
)
);
CONNECT
(
profile
,
optionsChanged
(),
this
,
setDestinationFileExtension
());
CONNECT
(
fileLine
,
editingFinished
(),
this
,
setDestinationFileExtension
());
}
...
...
@@ -130,7 +143,7 @@ void ConvertDialog::close()
{
hide
();
if
(
dump
Box
->
isChecked
()
)
if
(
dump
Radio
->
isChecked
()
)
{
mrl
=
"demux=dump :demuxdump-file="
+
fileLine
->
text
();
}
...
...
@@ -156,13 +169,6 @@ void ConvertDialog::close()
accept
();
}
void
ConvertDialog
::
dumpChecked
(
bool
checked
)
{
deinterBox
->
setEnabled
(
!
checked
);
displayBox
->
setEnabled
(
!
checked
);
profile
->
setEnabled
(
!
checked
);
}
void
ConvertDialog
::
setDestinationFileExtension
()
{
if
(
!
fileLine
->
text
().
isEmpty
()
&&
profile
->
isEnabled
()
)
...
...
This diff is collapsed.
Click to expand it.
modules/gui/qt4/dialogs/convert.hpp
+
3
−
2
View file @
8aa7563a
...
...
@@ -28,6 +28,7 @@
class
QLineEdit
;
class
QCheckBox
;
class
QRadioButton
;
class
VLCProfileSelector
;
class
ConvertDialog
:
public
QVLCDialog
...
...
@@ -42,14 +43,14 @@ public:
private
:
QLineEdit
*
fileLine
;
QCheckBox
*
displayBox
,
*
deinterBox
,
*
dumpBox
;
QCheckBox
*
displayBox
,
*
deinterBox
;
QRadioButton
*
dumpRadio
;
VLCProfileSelector
*
profile
;
QString
mrl
;
private
slots
:
virtual
void
close
();
virtual
void
cancel
();
void
fileBrowse
();
void
dumpChecked
(
bool
);
void
setDestinationFileExtension
();
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment