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
3a95e2c1
Commit
3a95e2c1
authored
Aug 20, 2006
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* First implementation of the simpleOpenFile Dialog for Qt4
* Cosmetic fixes in messages.
parent
a4697ffa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
17 deletions
+57
-17
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.cpp
+6
-7
modules/gui/qt4/dialogs/messages.hpp
modules/gui/qt4/dialogs/messages.hpp
+6
-8
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+44
-2
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/dialogs_provider.hpp
+1
-0
No files found.
modules/gui/qt4/dialogs/messages.cpp
View file @
3a95e2c1
...
...
@@ -35,19 +35,18 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf, bool _main_input ) :
setWindowTitle
(
_
(
"Messages"
)
);
resize
(
420
,
600
);
layout
=
new
QGridLayout
(
this
);
closeButton
=
new
QPushButton
(
qtr
(
"&Close"
));
clearButton
=
new
QPushButton
(
qtr
(
"&Clear"
));
saveLogButton
=
new
QPushButton
(
qtr
(
"&Save as..."
));
verbosityBox
=
new
QSpinBox
();
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
QPushButton
*
closeButton
=
new
QPushButton
(
qtr
(
"&Close"
));
QPushButton
*
clearButton
=
new
QPushButton
(
qtr
(
"&Clear"
));
QPushButton
*
saveLogButton
=
new
QPushButton
(
qtr
(
"&Save as..."
));
QSpinBox
*
verbosityBox
=
new
QSpinBox
();
verbosityBox
->
setRange
(
1
,
3
);
verbosityBox
->
setWrapping
(
true
);
verbosityLabel
=
new
QLabel
(
qtr
(
"Verbosity Level"
));
QLabel
*
verbosityLabel
=
new
QLabel
(
qtr
(
"Verbosity Level"
));
messages
=
new
QTextEdit
();
messages
->
setReadOnly
(
true
);
messages
->
setGeometry
(
0
,
0
,
440
,
600
);
messages
->
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
messagesCursor
=
new
QTextCursor
();
layout
->
addWidget
(
messages
,
0
,
0
,
1
,
0
);
layout
->
addWidget
(
verbosityLabel
,
1
,
0
,
1
,
1
);
...
...
modules/gui/qt4/dialogs/messages.hpp
View file @
3a95e2c1
...
...
@@ -32,6 +32,12 @@
#include <QTextStream>
#include <QMessageBox>
class
QPushButton
;
class
QSpinBox
;
class
QGridLayout
;
class
QLabel
;
class
QTextEdit
;
class
MessagesDialog
:
public
QVLCFrame
{
Q_OBJECT
;
...
...
@@ -50,15 +56,7 @@ private:
bool
main_input
;
static
MessagesDialog
*
instance
;
QPushButton
*
closeButton
;
QPushButton
*
clearButton
;
QPushButton
*
saveLogButton
;
QGridLayout
*
layout
;
QSpinBox
*
verbosityBox
;
QLabel
*
verbosityLabel
;
QTextEdit
*
messages
;
QTextCursor
*
messagesCursor
;
QFile
*
saveLogFile
;
public
slots
:
void
updateLog
();
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
3a95e2c1
...
...
@@ -170,15 +170,57 @@ void DialogsProvider::menuUpdateAction( QObject *data )
f
->
doFunc
(
p_intf
);
}
void
DialogsProvider
::
simpleAppendDialog
()
{
}
void
DialogsProvider
::
simpleOpenDialog
()
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
QString
FileTypes
;
FileTypes
=
"Sound Files ( "
;
FileTypes
+=
EXTENSIONS_AUDIO
;
FileTypes
+=
");; Video Files ( "
;
FileTypes
+=
EXTENSIONS_VIDEO
;
FileTypes
+=
");; PlayList Files ( "
;
FileTypes
+=
EXTENSIONS_PLAYLIST
;
FileTypes
+=
");; Subtitles Files ( "
;
FileTypes
+=
EXTENSIONS_SUBTITLE
;
FileTypes
+=
");; All Files (*.*) "
;
FileTypes
.
replace
(
QString
(
";*"
),
QString
(
", *"
));
QStringList
fileList
=
QFileDialog
::
getOpenFileNames
(
NULL
,
qtr
(
"Select one or more files to open"
),
p_intf
->
p_vlc
->
psz_homedir
,
FileTypes
);
QStringList
files
=
fileList
;
for
(
size_t
i
=
0
;
i
<
files
.
size
();
i
++
)
{
const
char
*
psz_utf8
=
files
[
i
].
toUtf8
().
data
();
playlist_PlaylistAdd
(
p_playlist
,
psz_utf8
,
psz_utf8
,
PLAYLIST_APPEND
|
(
i
?
0
:
PLAYLIST_GO
)
|
(
i
?
PLAYLIST_PREPARSE
:
0
),
PLAYLIST_END
);
}
vlc_object_release
(
p_playlist
);
}
void
DialogsProvider
::
bookmarksDialog
()
{
}
void
DialogsProvider
::
popupMenu
(
int
i_dialog
)
{
...
...
modules/gui/qt4/dialogs_provider.hpp
View file @
3a95e2c1
...
...
@@ -69,6 +69,7 @@ public slots:
void
streaminfoDialog
();
void
prefsDialog
();
void
messagesDialog
();
void
simpleAppendDialog
();
void
simpleOpenDialog
();
void
openDialog
();
void
openDialog
(
int
);
...
...
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