Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
28f24bd1
Commit
28f24bd1
authored
May 28, 2009
by
Francois Cartegnie
Committed by
Jean-Baptiste Kempf
Jun 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI open_file menus and layout fixes
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
8681fa9a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
134 additions
and
117 deletions
+134
-117
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+13
-2
modules/gui/qt4/components/open_panels.hpp
modules/gui/qt4/components/open_panels.hpp
+2
-1
modules/gui/qt4/ui/open_file.ui
modules/gui/qt4/ui/open_file.ui
+119
-114
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
28f24bd1
...
...
@@ -93,7 +93,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
/* Connects */
BUTTONACT
(
ui
.
fileBrowseButton
,
browseFile
()
);
BUTTONACT
(
ui
.
delFileButton
,
delet
eFile
()
);
BUTTONACT
(
ui
.
removeFileButton
,
remov
eFile
()
);
BUTTONACT
(
ui
.
subBrowseButton
,
browseFileSub
()
);
CONNECT
(
ui
.
subCheckBox
,
toggled
(
bool
),
this
,
toggleSubtitleFrame
(
bool
)
);
...
...
@@ -102,6 +102,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
CONNECT
(
ui
.
subInput
,
textChanged
(
const
QString
&
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
alignSubComboBox
,
currentIndexChanged
(
int
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
sizeSubComboBox
,
currentIndexChanged
(
int
),
this
,
updateMRL
()
);
updateButtons
();
}
inline
void
FileOpenPanel
::
BuildOldPanel
()
...
...
@@ -171,10 +172,11 @@ void FileOpenPanel::browseFile()
item
->
setFlags
(
Qt
::
ItemIsEditable
|
Qt
::
ItemIsEnabled
);
ui
.
fileListWidg
->
addItem
(
item
);
}
updateButtons
();
updateMRL
();
}
void
FileOpenPanel
::
delet
eFile
()
void
FileOpenPanel
::
remov
eFile
()
{
int
i
=
ui
.
fileListWidg
->
currentRow
();
if
(
i
!=
-
1
)
...
...
@@ -184,6 +186,7 @@ void FileOpenPanel::deleteFile()
}
updateMRL
();
updateButtons
();
}
/* Show a fileBrowser to select a subtitle */
...
...
@@ -252,6 +255,14 @@ void FileOpenPanel::clear()
ui
.
subInput
->
clear
();
}
/* Update buttons depending on current selection */
void
FileOpenPanel
::
updateButtons
()
{
bool
b_has_files
=
(
ui
.
fileListWidg
->
count
()
>
0
);
ui
.
removeFileButton
->
setEnabled
(
b_has_files
);
ui
.
subCheckBox
->
setEnabled
(
b_has_files
);
}
/**************************************************************************
* Open Discs ( DVD, CD, VCD and similar devices ) *
**************************************************************************/
...
...
modules/gui/qt4/components/open_panels.hpp
View file @
28f24bd1
...
...
@@ -137,7 +137,8 @@ public slots:
private
slots
:
void
browseFileSub
();
void
browseFile
();
void
deleteFile
();
void
removeFile
();
void
updateButtons
();
void
toggleSubtitleFrame
(
bool
);
};
...
...
modules/gui/qt4/ui/open_file.ui
View file @
28f24bd1
...
...
@@ -67,10 +67,21 @@
<property
name=
"text"
>
<string>
Add...
</string>
</property>
<property
name=
"icon"
>
<iconset>
<normaloff>
:/playlist_add
</normaloff>
:/playlist_add
</iconset>
</property>
</widget>
</item>
<item
row=
"2"
column=
"2"
>
<widget
class=
"QPushButton"
name=
"delFileButton"
>
<widget
class=
"QPushButton"
name=
"removeFileButton"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"icon"
>
<iconset>
<normaloff>
:/playlist_remove
</normaloff>
:/playlist_remove
</iconset>
</property>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Maximum"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
...
...
@@ -78,7 +89,7 @@
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Delet
e
</string>
<string>
Remov
e
</string>
</property>
</widget>
</item>
...
...
@@ -87,6 +98,9 @@
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"subCheckBox"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"toolTip"
>
<string>
Add a subtitles file
</string>
</property>
...
...
@@ -106,115 +120,110 @@
<property
name=
"frameShape"
>
<enum>
QFrame::StyledPanel
</enum>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout2"
>
<item
row=
"1"
column=
"0"
>
<spacer>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
16
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"1"
column=
"3"
>
<spacer>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
30
</width>
<height>
26
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"1"
column=
"7"
>
<spacer>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
16
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QLabel"
name=
"sizeSubLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Size:
</string>
</property>
<property
name=
"buddy"
>
<cstring>
sizeSubComboBox
</cstring>
</property>
</widget>
</item>
<item
row=
"1"
column=
"2"
>
<widget
class=
"QComboBox"
name=
"sizeSubComboBox"
>
<property
name=
"minimumSize"
>
<size>
<width>
100
</width>
<height>
0
</height>
</size>
</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 subtitles file
</string>
</property>
<property
name=
"text"
>
<string>
Browse...
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item
row=
"1"
column=
"4"
>
<widget
class=
"QLabel"
name=
"alignSubLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Alignment:
</string>
</property>
<property
name=
"buddy"
>
<cstring>
alignSubComboBox
</cstring>
</property>
</widget>
</item>
<item
row=
"1"
column=
"5"
colspan=
"2"
>
<widget
class=
"QComboBox"
name=
"alignSubComboBox"
>
<property
name=
"minimumSize"
>
<size>
<width>
100
</width>
<height>
0
</height>
</size>
</property>
</widget>
</item>
<item
row=
"0"
column=
"0"
colspan=
"6"
>
<widget
class=
"QLineEdit"
name=
"subInput"
/>
</item>
<item
row=
"0"
column=
"6"
colspan=
"2"
>
<widget
class=
"QPushButton"
name=
"subBrowseButton"
>
<property
name=
"minimumSize"
>
<size>
<width>
100
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"toolTip"
>
<string>
Select the subtitles file
</string>
</property>
<property
name=
"text"
>
<string>
Browse...
</string>
</property>
<item>
<widget
class=
"QWidget"
name=
"widget_2"
native=
"true"
>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"sizeSubLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"layoutDirection"
>
<enum>
Qt::LeftToRight
</enum>
</property>
<property
name=
"text"
>
<string>
Font size:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"buddy"
>
<cstring>
sizeSubComboBox
</cstring>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"alignSubLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Text alignment:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"buddy"
>
<cstring>
alignSubComboBox
</cstring>
</property>
</widget>
</item>
<item
row=
"0"
column=
"2"
>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"alignSubComboBox"
>
<property
name=
"minimumSize"
>
<size>
<width>
100
</width>
<height>
0
</height>
</size>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"sizeSubComboBox"
>
<property
name=
"minimumSize"
>
<size>
<width>
100
</width>
<height>
0
</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
...
...
@@ -241,12 +250,8 @@
<tabstops>
<tabstop>
fileListWidg
</tabstop>
<tabstop>
fileBrowseButton
</tabstop>
<tabstop>
del
FileButton
</tabstop>
<tabstop>
remove
FileButton
</tabstop>
<tabstop>
subCheckBox
</tabstop>
<tabstop>
subInput
</tabstop>
<tabstop>
subBrowseButton
</tabstop>
<tabstop>
sizeSubComboBox
</tabstop>
<tabstop>
alignSubComboBox
</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