Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
8aa7563a
Commit
8aa7563a
authored
Jun 11, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: ConvertDialog: rewrite logic
parent
258973e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
23 deletions
+30
-23
modules/gui/qt4/dialogs/convert.cpp
modules/gui/qt4/dialogs/convert.cpp
+27
-21
modules/gui/qt4/dialogs/convert.hpp
modules/gui/qt4/dialogs/convert.hpp
+3
-2
No files found.
modules/gui/qt4/dialogs/convert.cpp
View file @
8aa7563a
...
@@ -68,28 +68,41 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
...
@@ -68,28 +68,41 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
destLayout
->
addWidget
(
fileSelectButton
,
0
,
2
);
destLayout
->
addWidget
(
fileSelectButton
,
0
,
2
);
BUTTONACT
(
fileSelectButton
,
fileBrowse
()
);
BUTTONACT
(
fileSelectButton
,
fileBrowse
()
);
displayBox
=
new
QCheckBox
(
qtr
(
"Display the output"
)
);
mainLayout
->
addWidget
(
destBox
,
3
,
0
,
1
,
-
1
);
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
);
/* Profile Editor */
/* Profile Editor */
QGroupBox
*
settingBox
=
new
QGroupBox
(
qtr
(
"Settings"
)
);
QGroupBox
*
settingBox
=
new
QGroupBox
(
qtr
(
"Settings"
)
);
QGridLayout
*
settingLayout
=
new
QGridLayout
(
settingBox
);
QGridLayout
*
settingLayout
=
new
QGridLayout
(
settingBox
);
profile
=
new
VLCProfileSelector
(
this
);
QRadioButton
*
convertRadio
=
new
QRadioButton
(
qtr
(
"Convert"
)
);
settingLayout
->
addWidget
(
profile
,
0
,
0
,
1
,
-
1
);
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"
)
);
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
(
convertPanel
,
2
,
0
);
settingLayout
->
addWidget
(
dumpBox
,
1
,
1
);
mainLayout
->
addWidget
(
settingBox
,
3
,
0
,
1
,
-
1
);
settingLayout
->
addWidget
(
dumpRadio
,
5
,
0
);
mainLayout
->
addWidget
(
settingBox
,
1
,
0
,
1
,
-
1
);
/* Buttons */
/* Buttons */
QPushButton
*
okButton
=
new
QPushButton
(
qtr
(
"&Start"
)
);
QPushButton
*
okButton
=
new
QPushButton
(
qtr
(
"&Start"
)
);
...
@@ -105,7 +118,7 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
...
@@ -105,7 +118,7 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
BUTTONACT
(
okButton
,
close
());
BUTTONACT
(
okButton
,
close
());
BUTTONACT
(
cancelButton
,
cancel
());
BUTTONACT
(
cancelButton
,
cancel
());
CONNECT
(
dumpBox
,
toggled
(
bool
),
this
,
dumpChecked
(
bool
)
);
CONNECT
(
convertRadio
,
toggled
(
bool
),
convertPanel
,
setEnabled
(
bool
)
);
CONNECT
(
profile
,
optionsChanged
(),
this
,
setDestinationFileExtension
());
CONNECT
(
profile
,
optionsChanged
(),
this
,
setDestinationFileExtension
());
CONNECT
(
fileLine
,
editingFinished
(),
this
,
setDestinationFileExtension
());
CONNECT
(
fileLine
,
editingFinished
(),
this
,
setDestinationFileExtension
());
}
}
...
@@ -130,7 +143,7 @@ void ConvertDialog::close()
...
@@ -130,7 +143,7 @@ void ConvertDialog::close()
{
{
hide
();
hide
();
if
(
dump
Box
->
isChecked
()
)
if
(
dump
Radio
->
isChecked
()
)
{
{
mrl
=
"demux=dump :demuxdump-file="
+
fileLine
->
text
();
mrl
=
"demux=dump :demuxdump-file="
+
fileLine
->
text
();
}
}
...
@@ -156,13 +169,6 @@ void ConvertDialog::close()
...
@@ -156,13 +169,6 @@ void ConvertDialog::close()
accept
();
accept
();
}
}
void
ConvertDialog
::
dumpChecked
(
bool
checked
)
{
deinterBox
->
setEnabled
(
!
checked
);
displayBox
->
setEnabled
(
!
checked
);
profile
->
setEnabled
(
!
checked
);
}
void
ConvertDialog
::
setDestinationFileExtension
()
void
ConvertDialog
::
setDestinationFileExtension
()
{
{
if
(
!
fileLine
->
text
().
isEmpty
()
&&
profile
->
isEnabled
()
)
if
(
!
fileLine
->
text
().
isEmpty
()
&&
profile
->
isEnabled
()
)
...
...
modules/gui/qt4/dialogs/convert.hpp
View file @
8aa7563a
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
class
QLineEdit
;
class
QLineEdit
;
class
QCheckBox
;
class
QCheckBox
;
class
QRadioButton
;
class
VLCProfileSelector
;
class
VLCProfileSelector
;
class
ConvertDialog
:
public
QVLCDialog
class
ConvertDialog
:
public
QVLCDialog
...
@@ -42,14 +43,14 @@ public:
...
@@ -42,14 +43,14 @@ public:
private:
private:
QLineEdit
*
fileLine
;
QLineEdit
*
fileLine
;
QCheckBox
*
displayBox
,
*
deinterBox
,
*
dumpBox
;
QCheckBox
*
displayBox
,
*
deinterBox
;
QRadioButton
*
dumpRadio
;
VLCProfileSelector
*
profile
;
VLCProfileSelector
*
profile
;
QString
mrl
;
QString
mrl
;
private
slots
:
private
slots
:
virtual
void
close
();
virtual
void
close
();
virtual
void
cancel
();
virtual
void
cancel
();
void
fileBrowse
();
void
fileBrowse
();
void
dumpChecked
(
bool
);
void
setDestinationFileExtension
();
void
setDestinationFileExtension
();
};
};
...
...
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