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
1bc507d1
Commit
1bc507d1
authored
Dec 26, 2009
by
Geoffroy Couprie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: add the verbose-objects option to the messages window
parent
61eaa3fd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
4 deletions
+50
-4
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.cpp
+46
-4
modules/gui/qt4/dialogs/messages.hpp
modules/gui/qt4/dialogs/messages.hpp
+4
-0
No files found.
modules/gui/qt4/dialogs/messages.cpp
View file @
1bc507d1
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include <QTreeWidgetItem>
#include <QTreeWidgetItem>
#include <QHeaderView>
#include <QHeaderView>
#include <QMutex>
#include <QMutex>
#include <QLineEdit>
#include <assert.h>
#include <assert.h>
...
@@ -119,19 +120,28 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
...
@@ -119,19 +120,28 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
verbosityLabel
=
new
QLabel
(
qtr
(
"Verbosity Level"
)
);
verbosityLabel
=
new
QLabel
(
qtr
(
"Verbosity Level"
)
);
vbobjectsEdit
=
new
QLineEdit
();
vbobjectsEdit
->
setMaximumWidth
(
100
);
vbobjectsEdit
->
setText
(
config_GetPsz
(
p_intf
,
"verbose-objects"
));
vbobjectsLabel
=
new
QLabel
(
qtr
(
"Message filter"
)
);
mainLayout
->
addWidget
(
mainTab
,
0
,
0
,
1
,
0
);
mainLayout
->
addWidget
(
mainTab
,
0
,
0
,
1
,
0
);
mainLayout
->
addWidget
(
verbosityLabel
,
1
,
0
,
1
,
1
);
mainLayout
->
addWidget
(
verbosityLabel
,
1
,
0
,
1
,
1
);
mainLayout
->
addWidget
(
verbosityBox
,
1
,
1
);
mainLayout
->
addWidget
(
verbosityBox
,
1
,
1
);
mainLayout
->
setColumnStretch
(
2
,
10
);
mainLayout
->
addWidget
(
vbobjectsLabel
,
1
,
2
,
1
,
1
);
mainLayout
->
addWidget
(
saveLogButton
,
1
,
3
);
mainLayout
->
addWidget
(
vbobjectsEdit
,
1
,
3
);
mainLayout
->
addWidget
(
clearUpdateButton
,
1
,
4
);
mainLayout
->
setColumnStretch
(
4
,
10
);
mainLayout
->
addWidget
(
closeButton
,
1
,
5
);
mainLayout
->
addWidget
(
saveLogButton
,
1
,
5
);
mainLayout
->
addWidget
(
clearUpdateButton
,
1
,
6
);
mainLayout
->
addWidget
(
closeButton
,
1
,
7
);
BUTTONACT
(
closeButton
,
hide
()
);
BUTTONACT
(
closeButton
,
hide
()
);
BUTTONACT
(
clearUpdateButton
,
clearOrUpdate
()
);
BUTTONACT
(
clearUpdateButton
,
clearOrUpdate
()
);
BUTTONACT
(
saveLogButton
,
save
()
);
BUTTONACT
(
saveLogButton
,
save
()
);
CONNECT
(
mainTab
,
currentChanged
(
int
),
CONNECT
(
mainTab
,
currentChanged
(
int
),
this
,
updateTab
(
int
)
);
this
,
updateTab
(
int
)
);
CONNECT
(
vbobjectsEdit
,
editingFinished
(),
this
,
updateConfig
());
/* General action */
/* General action */
readSettings
(
"Messages"
,
QSize
(
600
,
450
)
);
readSettings
(
"Messages"
,
QSize
(
600
,
450
)
);
...
@@ -157,6 +167,8 @@ void MessagesDialog::updateTab( int index )
...
@@ -157,6 +167,8 @@ void MessagesDialog::updateTab( int index )
{
{
verbosityLabel
->
hide
();
verbosityLabel
->
hide
();
verbosityBox
->
hide
();
verbosityBox
->
hide
();
vbobjectsLabel
->
hide
();
vbobjectsEdit
->
hide
();
clearUpdateButton
->
setText
(
qtr
(
"&Update"
)
);
clearUpdateButton
->
setText
(
qtr
(
"&Update"
)
);
saveLogButton
->
hide
();
saveLogButton
->
hide
();
updateTree
();
updateTree
();
...
@@ -166,11 +178,41 @@ void MessagesDialog::updateTab( int index )
...
@@ -166,11 +178,41 @@ void MessagesDialog::updateTab( int index )
{
{
verbosityLabel
->
show
();
verbosityLabel
->
show
();
verbosityBox
->
show
();
verbosityBox
->
show
();
vbobjectsLabel
->
show
();
vbobjectsEdit
->
show
();
clearUpdateButton
->
setText
(
qtr
(
"&Clear"
)
);
clearUpdateButton
->
setText
(
qtr
(
"&Clear"
)
);
saveLogButton
->
show
();
saveLogButton
->
show
();
}
}
}
}
void
MessagesDialog
::
updateConfig
()
{
config_PutPsz
(
p_intf
,
"verbose-objects"
,
qtu
(
vbobjectsEdit
->
text
()));
//vbobjectsEdit->setText("vbEdit changed!");
char
*
psz_verbose_objects
=
strdup
(
qtu
(
vbobjectsEdit
->
text
()));
msg_EnableObjectPrinting
(
p_intf
,
"all"
);
if
(
psz_verbose_objects
)
{
char
*
psz_object
,
*
iter
=
psz_verbose_objects
;
while
(
(
psz_object
=
strsep
(
&
iter
,
","
))
)
{
switch
(
psz_object
[
0
]
)
{
printf
(
"%s
\n
"
,
psz_object
+
1
);
case
'+'
:
msg_EnableObjectPrinting
(
p_intf
,
psz_object
+
1
);
break
;
case
'-'
:
msg_DisableObjectPrinting
(
p_intf
,
psz_object
+
1
);
break
;
default:
msg_Err
(
p_intf
,
"verbose-objects usage:
\n
"
"--verbose-objects=+printthatobject,"
"-dontprintthatone
\n
"
"(keyword 'all' to applies to all objects)"
);
}
}
free
(
psz_verbose_objects
);
}
}
void
MessagesDialog
::
sinkMessage
(
msg_item_t
*
item
)
void
MessagesDialog
::
sinkMessage
(
msg_item_t
*
item
)
{
{
if
((
item
->
i_type
==
VLC_MSG_WARN
&&
verbosityBox
->
value
()
<
1
)
if
((
item
->
i_type
==
VLC_MSG_WARN
&&
verbosityBox
->
value
()
<
1
)
...
...
modules/gui/qt4/dialogs/messages.hpp
View file @
1bc507d1
...
@@ -35,6 +35,7 @@ class QLabel;
...
@@ -35,6 +35,7 @@ class QLabel;
class
QTextEdit
;
class
QTextEdit
;
class
QTreeWidget
;
class
QTreeWidget
;
class
QTreeWidgetItem
;
class
QTreeWidgetItem
;
class
QLineEdit
;
class
MessagesDialog
:
public
QVLCFrame
,
public
Singleton
<
MessagesDialog
>
class
MessagesDialog
:
public
QVLCFrame
,
public
Singleton
<
MessagesDialog
>
{
{
...
@@ -50,6 +51,8 @@ private:
...
@@ -50,6 +51,8 @@ private:
QTreeWidget
*
modulesTree
;
QTreeWidget
*
modulesTree
;
QPushButton
*
clearUpdateButton
;
QPushButton
*
clearUpdateButton
;
QPushButton
*
saveLogButton
;
QPushButton
*
saveLogButton
;
QLineEdit
*
vbobjectsEdit
;
QLabel
*
vbobjectsLabel
;
msg_subscription_t
*
sub
;
msg_subscription_t
*
sub
;
msg_cb_data_t
*
cbData
;
msg_cb_data_t
*
cbData
;
static
void
sinkMessage
(
msg_cb_data_t
*
,
msg_item_t
*
,
unsigned
);
static
void
sinkMessage
(
msg_cb_data_t
*
,
msg_item_t
*
,
unsigned
);
...
@@ -60,6 +63,7 @@ private slots:
...
@@ -60,6 +63,7 @@ private slots:
void
updateTab
(
int
);
void
updateTab
(
int
);
void
clearOrUpdate
();
void
clearOrUpdate
();
bool
save
();
bool
save
();
void
updateConfig
();
private:
private:
void
clear
();
void
clear
();
void
updateTree
();
void
updateTree
();
...
...
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