Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
933b2755
Commit
933b2755
authored
Oct 28, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Open cleaning and comments.
parent
a8add18e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
25 deletions
+12
-25
modules/gui/qt4/components/open.cpp
modules/gui/qt4/components/open.cpp
+11
-23
modules/gui/qt4/components/open.hpp
modules/gui/qt4/components/open.hpp
+1
-2
No files found.
modules/gui/qt4/components/open.cpp
View file @
933b2755
...
...
@@ -33,7 +33,6 @@
#include "dialogs_provider.hpp"
#include "components/preferences_widgets.hpp"
#include <QFileDialog>
#include <QDialogButtonBox>
#include <QLineEdit>
...
...
@@ -96,7 +95,6 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
#if HAS_QT43
lineFileEdit
=
dialogBox
->
findChildren
<
QLineEdit
*>
()[
0
];
#else
// FIXME
lineFileEdit
=
dialogBox
->
findChildren
<
QLineEdit
*>
()[
1
];
#endif
/* Make a list of QLabel inside the QFileDialog to access the good ones */
...
...
@@ -135,23 +133,14 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
BUTTONACT
(
ui
.
subCheckBox
,
toggleSubtitleFrame
());
CONNECT
(
lineFileEdit
,
textChanged
(
QString
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
subInput
,
textChanged
(
QString
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
alignSubComboBox
,
currentIndexChanged
(
int
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
sizeSubComboBox
,
currentIndexChanged
(
int
),
this
,
updateMRL
()
);
}
FileOpenPanel
::~
FileOpenPanel
()
{}
QStringList
FileOpenPanel
::
browse
(
QString
help
)
{
return
THEDP
->
showSimpleOpen
(
help
);
CONNECT
(
ui
.
alignSubComboBox
,
currentIndexChanged
(
int
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
sizeSubComboBox
,
currentIndexChanged
(
int
),
this
,
updateMRL
()
);
}
FileOpenPanel
::~
FileOpenPanel
(){}
/* Show a fileBrowser to select a subtitle */
void
FileOpenPanel
::
browseFileSub
()
{
// FIXME Handle selection of more than one subtitles file
...
...
@@ -163,6 +152,7 @@ void FileOpenPanel::browseFileSub()
updateMRL
();
}
/* Update the current MRL */
void
FileOpenPanel
::
updateMRL
()
{
QString
mrl
=
""
;
...
...
@@ -187,7 +177,7 @@ void FileOpenPanel::updateMRL()
/* Function called by Open Dialog when clicke on Play/Enqueue */
void
FileOpenPanel
::
accept
()
{
//
FIXME
set the completer
//
TODO
set the completer
const
char
*
psz_filepath
=
config_GetPsz
(
p_intf
,
"qt-filedialog-path"
);
if
(
(
NULL
==
psz_filepath
)
||
strcmp
(
psz_filepath
,
qtu
(
dialogBox
->
directory
().
absolutePath
()
))
)
...
...
@@ -197,7 +187,6 @@ void FileOpenPanel::accept()
qtu
(
dialogBox
->
directory
().
absolutePath
()
)
);
}
delete
psz_filepath
;
}
void
FileOpenBox
::
accept
()
...
...
@@ -255,7 +244,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
}
SetErrorMode
(
oldMode
);
}
#else
/*
Disc Probing under Windows
*/
#else
/*
Use a Completer under Linux
*/
QCompleter
*
discCompleter
=
new
QCompleter
(
this
);
discCompleter
->
setModel
(
new
QDirModel
(
discCompleter
)
);
ui
.
deviceCombo
->
setCompleter
(
discCompleter
);
...
...
@@ -303,6 +292,7 @@ void DiscOpenPanel::clear()
ui.deviceCombo->setEditText( qfu( psz_name ) ); }
#endif
/* update the buttons according the type of device */
void
DiscOpenPanel
::
updateButtons
()
{
if
(
ui
.
dvdRadioButton
->
isChecked
()
)
...
...
@@ -345,6 +335,7 @@ void DiscOpenPanel::updateButtons()
updateMRL
();
}
/* Update the current MRL */
void
DiscOpenPanel
::
updateMRL
()
{
QString
mrl
=
""
;
...
...
@@ -422,7 +413,7 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
CONNECT
(
ui
.
protocolCombo
,
currentIndexChanged
(
int
),
this
,
updateProtocol
(
int
)
);
CONNECT
(
ui
.
portSpin
,
valueChanged
(
int
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
addressText
,
textChanged
(
QString
),
this
,
update
Address
());
CONNECT
(
ui
.
addressText
,
textChanged
(
QString
),
this
,
update
MRL
());
CONNECT
(
ui
.
timeShift
,
clicked
(),
this
,
updateMRL
());
CONNECT
(
ui
.
ipv6
,
clicked
(),
this
,
updateMRL
());
...
...
@@ -441,6 +432,7 @@ NetOpenPanel::~NetOpenPanel()
void
NetOpenPanel
::
clear
()
{}
/* update the widgets according the type of protocol */
void
NetOpenPanel
::
updateProtocol
(
int
idx
)
{
QString
addr
=
ui
.
addressText
->
text
();
QString
proto
=
ui
.
protocolCombo
->
itemData
(
idx
).
toString
();
...
...
@@ -459,10 +451,6 @@ void NetOpenPanel::updateProtocol( int idx ) {
updateMRL
();
}
void
NetOpenPanel
::
updateAddress
()
{
updateMRL
();
}
void
NetOpenPanel
::
updateMRL
()
{
QString
mrl
=
""
;
QString
addr
=
ui
.
addressText
->
text
();
...
...
modules/gui/qt4/components/open.hpp
View file @
933b2755
...
...
@@ -123,8 +123,7 @@ private:
public
slots
:
virtual
void
updateMRL
();
private
slots
:
void
updateProtocol
(
int
);
void
updateAddress
();
void
updateProtocol
(
int
);
};
class
DiscOpenPanel
:
public
OpenPanel
...
...
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