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
2a100fcd
Commit
2a100fcd
authored
Sep 29, 2010
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: NetOpenPanel: add drop-down list
parent
c04668ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
23 deletions
+24
-23
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+11
-10
modules/gui/qt4/components/open_panels.hpp
modules/gui/qt4/components/open_panels.hpp
+1
-1
modules/gui/qt4/ui/open_net.ui
modules/gui/qt4/ui/open_net.ui
+12
-12
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
2a100fcd
...
...
@@ -539,21 +539,22 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
ui
.
setupUi
(
this
);
/* CONNECTs */
CONNECT
(
ui
.
urlText
,
textChanged
(
const
QString
&
),
this
,
updateMRL
());
CONNECT
(
ui
.
urlComboBox
->
lineEdit
(),
textChanged
(
const
QString
&
),
this
,
updateMRL
());
CONNECT
(
ui
.
urlComboBox
,
currentIndexChanged
(
const
QString
&
),
this
,
updateMRL
());
if
(
var_InheritBool
(
p_intf
,
"qt-recentplay"
)
)
{
mrlList
=
new
QStringListModel
(
getSettings
()
->
value
(
"Open/netMRL"
).
toStringList
()
);
QCompleter
*
completer
=
new
QCompleter
(
mrlList
,
this
);
ui
.
urlText
->
setCompleter
(
completer
);
CONNECT
(
ui
.
urlText
,
editingFinished
(),
this
,
updateCompleter
()
);
ui
.
urlComboBox
->
setModel
(
mrlList
);
ui
.
urlComboBox
->
clearEditText
();
CONNECT
(
ui
.
urlComboBox
->
lineEdit
(),
editingFinished
(),
this
,
updateModel
()
);
}
else
mrlList
=
NULL
;
ui
.
urlText
->
setValidator
(
new
UrlValidator
(
this
)
);
ui
.
urlComboBox
->
setValidator
(
new
UrlValidator
(
this
)
);
ui
.
urlComboBox
->
setFocus
();
}
NetOpenPanel
::~
NetOpenPanel
()
...
...
@@ -601,7 +602,7 @@ void NetOpenPanel::updateMRL()
{
"udp"
,
"udp"
},
};
QString
url
=
ui
.
url
Text
->
text
();
QString
url
=
ui
.
url
ComboBox
->
lineEdit
()
->
text
();
if
(
!
url
.
contains
(
"://"
)
)
return
;
/* nothing to do this far */
...
...
@@ -618,12 +619,12 @@ void NetOpenPanel::updateMRL()
emit
mrlUpdated
(
qsl
,
""
);
}
void
NetOpenPanel
::
update
Completer
()
void
NetOpenPanel
::
update
Model
()
{
assert
(
mrlList
);
QStringList
tempL
=
mrlList
->
stringList
();
if
(
!
tempL
.
contains
(
ui
.
url
Text
->
text
()
)
)
tempL
.
append
(
ui
.
url
Text
->
text
()
);
if
(
!
tempL
.
contains
(
ui
.
url
ComboBox
->
lineEdit
()
->
text
()
)
)
tempL
.
append
(
ui
.
url
ComboBox
->
lineEdit
()
->
text
()
);
mrlList
->
setStringList
(
tempL
);
}
...
...
modules/gui/qt4/components/open_panels.hpp
View file @
2a100fcd
...
...
@@ -146,7 +146,7 @@ private:
public
slots
:
virtual
void
updateMRL
();
private
slots
:
void
update
Completer
();
void
update
Model
();
};
class
UrlValidator
:
public
QValidator
...
...
modules/gui/qt4/ui/open_net.ui
View file @
2a100fcd
...
...
@@ -32,16 +32,6 @@
<property
name=
"text"
>
<string>
Please enter a network URL:
</string>
</property>
<property
name=
"buddy"
>
<cstring>
urlText
</cstring>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLineEdit"
name=
"urlText"
>
<property
name=
"toolTip"
>
<string>
Enter the URL of the network stream here.
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
...
...
@@ -52,7 +42,7 @@
p, li { white-space: pre-wrap; }
p { margin: 0; -qt-block-indent: 0; text-indent: 0;}
body { font-family: 'sans'; font-size: 8pt; font-weight: 400; }
p
>
span { color: #838383; }
p
>
span { color: #838383; }
<
/style
><
/head
><
body
>
<
p
><
span
>
http://www.example.com/stream.avi
<
/span
><
/p
>
<
p
><
span
>
rtp://@:1234
<
/span
><
/p
>
...
...
@@ -68,6 +58,16 @@ p > span { color: #838383; }
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QComboBox"
name=
"urlComboBox"
>
<property
name=
"editable"
>
<bool>
true
</bool>
</property>
<property
name=
"insertPolicy"
>
<enum>
QComboBox::NoInsert
</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
...
...
@@ -90,7 +90,7 @@ p > span { color: #838383; }
</layout>
</widget>
<tabstops>
<tabstop>
url
Text
</tabstop>
<tabstop>
url
ComboBox
</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