Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
55e27bb1
Commit
55e27bb1
authored
Jun 11, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: OpenFile: Use QGroupBox for subs.
And don't make use of confusing raised QFrame panels.
parent
8aa7563a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
68 deletions
+44
-68
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+4
-13
modules/gui/qt4/components/open_panels.hpp
modules/gui/qt4/components/open_panels.hpp
+0
-1
modules/gui/qt4/ui/open_file.ui
modules/gui/qt4/ui/open_file.ui
+40
-54
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
55e27bb1
...
...
@@ -107,14 +107,14 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
/* Subtitles */
/* Deactivate the subtitles control by default. */
ui
.
sub
Frame
->
setEnabled
(
false
);
ui
.
sub
GroupBox
->
setEnabled
(
false
);
/* Connects */
BUTTONACT
(
ui
.
fileBrowseButton
,
browseFile
()
);
BUTTONACT
(
ui
.
removeFileButton
,
removeFile
()
);
BUTTONACT
(
ui
.
subBrowseButton
,
browseFileSub
()
);
CONNECT
(
ui
.
sub
CheckBox
,
toggled
(
bool
),
this
,
toggleSubtitleFrame
(
bool
)
);
CONNECT
(
ui
.
sub
GroupBox
,
toggled
(
bool
),
this
,
updateMRL
(
)
);
CONNECT
(
ui
.
fileListWidg
,
itemChanged
(
QListWidgetItem
*
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
subInput
,
textChanged
(
const
QString
&
),
this
,
updateMRL
()
);
...
...
@@ -257,15 +257,6 @@ void FileOpenPanel::browseFileSub()
updateMRL
();
}
void
FileOpenPanel
::
toggleSubtitleFrame
(
bool
b
)
{
ui
.
subFrame
->
setEnabled
(
b
);
/* Update the MRL */
updateMRL
();
}
/* Update the current MRL */
void
FileOpenPanel
::
updateMRL
()
{
...
...
@@ -287,7 +278,7 @@ void FileOpenPanel::updateMRL()
}
/* Options */
if
(
ui
.
sub
Check
Box
->
isChecked
()
&&
!
ui
.
subInput
->
text
().
isEmpty
()
)
{
if
(
ui
.
sub
Group
Box
->
isChecked
()
&&
!
ui
.
subInput
->
text
().
isEmpty
()
)
{
mrl
.
append
(
" :sub-file="
+
colon_escape
(
ui
.
subInput
->
text
()
)
);
}
...
...
@@ -315,7 +306,7 @@ void FileOpenPanel::updateButtons()
{
bool
b_has_files
=
(
ui
.
fileListWidg
->
count
()
>
0
);
ui
.
removeFileButton
->
setEnabled
(
b_has_files
);
ui
.
sub
Check
Box
->
setEnabled
(
b_has_files
);
ui
.
sub
Group
Box
->
setEnabled
(
b_has_files
);
}
/**************************************************************************
...
...
modules/gui/qt4/components/open_panels.hpp
View file @
55e27bb1
...
...
@@ -130,7 +130,6 @@ private slots:
void
browseFile
();
void
removeFile
();
void
updateButtons
();
void
toggleSubtitleFrame
(
bool
);
};
class
NetOpenPanel
:
public
OpenPanel
...
...
modules/gui/qt4/ui/open_file.ui
View file @
55e27bb1
...
...
@@ -21,6 +21,46 @@
<string>
Open File
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QGroupBox"
name=
"subGroupBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Minimum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"title"
>
<string>
Use a sub
&
title file
</string>
</property>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"checked"
>
<bool>
false
</bool>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<widget
class=
"QLineEdit"
name=
"subInput"
/>
</item>
<item>
<widget
class=
"QPushButton"
name=
"subBrowseButton"
>
<property
name=
"minimumSize"
>
<size>
<width>
100
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"toolTip"
>
<string>
Select the subtitle file
</string>
</property>
<property
name=
"text"
>
<string>
Browse...
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QGroupBox"
name=
"tempWidget"
>
<property
name=
"toolTip"
>
...
...
@@ -96,60 +136,7 @@
</layout>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"subCheckBox"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"toolTip"
>
<string>
Add a subtitle file
</string>
</property>
<property
name=
"text"
>
<string>
Use a sub
&
title file
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QFrame"
name=
"subFrame"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Minimum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"frameShape"
>
<enum>
QFrame::StyledPanel
</enum>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QWidget"
name=
"widget"
native=
"true"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLineEdit"
name=
"subInput"
/>
</item>
<item>
<widget
class=
"QPushButton"
name=
"subBrowseButton"
>
<property
name=
"minimumSize"
>
<size>
<width>
100
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"toolTip"
>
<string>
Select the subtitle file
</string>
</property>
<property
name=
"text"
>
<string>
Browse...
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<spacer>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
...
...
@@ -171,7 +158,6 @@
<tabstop>
fileListWidg
</tabstop>
<tabstop>
fileBrowseButton
</tabstop>
<tabstop>
removeFileButton
</tabstop>
<tabstop>
subCheckBox
</tabstop>
</tabstops>
<resources/>
<connections/>
...
...
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