Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a20dba71
Commit
a20dba71
authored
Feb 10, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Messages. Simplification and extend the tree item by default.
parent
b7138f27
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
37 deletions
+33
-37
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.cpp
+33
-36
modules/gui/qt4/dialogs/messages.hpp
modules/gui/qt4/dialogs/messages.hpp
+0
-1
No files found.
modules/gui/qt4/dialogs/messages.cpp
View file @
a20dba71
...
@@ -42,43 +42,16 @@
...
@@ -42,43 +42,16 @@
MessagesDialog
*
MessagesDialog
::
instance
=
NULL
;
MessagesDialog
*
MessagesDialog
::
instance
=
NULL
;
MessagesDialog
::
MessagesDialog
(
intf_thread_t
*
_p_intf
)
:
QVLCFrame
(
_p_intf
)
MessagesDialog
::
MessagesDialog
(
intf_thread_t
*
_p_intf
)
:
QVLCFrame
(
_p_intf
)
{
{
setWindowTitle
(
qtr
(
"Messages"
)
);
setWindowTitle
(
qtr
(
"Messages"
)
);
resize
(
600
,
450
);
/* General widgets */
/* General widgets */
QGridLayout
*
mainLayout
=
new
QGridLayout
(
this
);
QGridLayout
*
mainLayout
=
new
QGridLayout
(
this
);
QTabWidget
*
mainTab
=
new
QTabWidget
(
this
);
QTabWidget
*
mainTab
=
new
QTabWidget
(
this
);
mainTab
->
setTabPosition
(
QTabWidget
::
North
);
mainTab
->
setTabPosition
(
QTabWidget
::
North
);
QPushButton
*
closeButton
=
new
QPushButton
(
qtr
(
"&Close"
)
);
closeButton
->
setDefault
(
true
);
clearButton
=
new
QPushButton
(
qtr
(
"&Clear"
)
);
saveLogButton
=
new
QPushButton
(
qtr
(
"&Save as..."
)
);
verbosityBox
=
new
QSpinBox
();
verbosityBox
->
setRange
(
0
,
2
);
verbosityBox
->
setValue
(
config_GetInt
(
p_intf
,
"verbose"
)
);
verbosityBox
->
setWrapping
(
true
);
verbosityBox
->
setMaximumWidth
(
50
);
verbosityLabel
=
new
QLabel
(
qtr
(
"Verbosity Level"
)
);
mainLayout
->
addWidget
(
mainTab
,
0
,
0
,
1
,
0
);
mainLayout
->
addWidget
(
verbosityLabel
,
1
,
0
,
1
,
1
);
mainLayout
->
addWidget
(
verbosityBox
,
1
,
1
);
mainLayout
->
addWidget
(
saveLogButton
,
1
,
3
);
mainLayout
->
addWidget
(
clearButton
,
1
,
4
);
mainLayout
->
addWidget
(
closeButton
,
1
,
5
);
BUTTONACT
(
closeButton
,
close
()
);
BUTTONACT
(
clearButton
,
clear
()
);
BUTTONACT
(
saveLogButton
,
save
()
);
CONNECT
(
mainTab
,
currentChanged
(
int
),
this
,
updateTab
(
int
)
);
/* Messages */
/* Messages */
QWidget
*
msgWidget
=
new
QWidget
;
QWidget
*
msgWidget
=
new
QWidget
;
QGridLayout
*
msgLayout
=
new
QGridLayout
(
msgWidget
);
QGridLayout
*
msgLayout
=
new
QGridLayout
(
msgWidget
);
...
@@ -103,9 +76,35 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
...
@@ -103,9 +76,35 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
treeLayout
->
addWidget
(
modulesTree
,
0
,
0
,
1
,
0
);
treeLayout
->
addWidget
(
modulesTree
,
0
,
0
,
1
,
0
);
mainTab
->
addTab
(
treeWidget
,
qtr
(
"Modules tree"
)
);
mainTab
->
addTab
(
treeWidget
,
qtr
(
"Modules tree"
)
);
/* Buttons and general layout */
QPushButton
*
closeButton
=
new
QPushButton
(
qtr
(
"&Close"
)
);
closeButton
->
setDefault
(
true
);
clearButton
=
new
QPushButton
(
qtr
(
"&Clear"
)
);
saveLogButton
=
new
QPushButton
(
qtr
(
"&Save as..."
)
);
verbosityBox
=
new
QSpinBox
();
verbosityBox
->
setRange
(
0
,
2
);
verbosityBox
->
setValue
(
config_GetInt
(
p_intf
,
"verbose"
)
);
verbosityBox
->
setWrapping
(
true
);
verbosityBox
->
setMaximumWidth
(
50
);
verbosityLabel
=
new
QLabel
(
qtr
(
"Verbosity Level"
)
);
mainLayout
->
addWidget
(
mainTab
,
0
,
0
,
1
,
0
);
mainLayout
->
addWidget
(
verbosityLabel
,
1
,
0
,
1
,
1
);
mainLayout
->
addWidget
(
verbosityBox
,
1
,
1
);
mainLayout
->
addWidget
(
saveLogButton
,
1
,
3
);
mainLayout
->
addWidget
(
clearButton
,
1
,
4
);
mainLayout
->
addWidget
(
closeButton
,
1
,
5
);
BUTTONACT
(
closeButton
,
hide
()
);
BUTTONACT
(
clearButton
,
clear
()
);
BUTTONACT
(
saveLogButton
,
save
()
);
CONNECT
(
mainTab
,
currentChanged
(
int
),
this
,
updateTab
(
int
)
);
/* General action */
/* General action */
readSettings
(
"Messages"
);
readSettings
(
"Messages"
,
QSize
(
600
,
450
)
);
}
}
void
MessagesDialog
::
updateTab
(
int
index
)
void
MessagesDialog
::
updateTab
(
int
index
)
...
@@ -193,7 +192,8 @@ void MessagesDialog::updateLog()
...
@@ -193,7 +192,8 @@ void MessagesDialog::updateLog()
}
}
}
}
void
MessagesDialog
::
buildTree
(
QTreeWidgetItem
*
parentItem
,
vlc_object_t
*
p_obj
)
void
MessagesDialog
::
buildTree
(
QTreeWidgetItem
*
parentItem
,
vlc_object_t
*
p_obj
)
{
{
vlc_object_yield
(
p_obj
);
vlc_object_yield
(
p_obj
);
QTreeWidgetItem
*
item
;
QTreeWidgetItem
*
item
;
...
@@ -211,6 +211,8 @@ void MessagesDialog::buildTree( QTreeWidgetItem *parentItem, vlc_object_t *p_obj
...
@@ -211,6 +211,8 @@ void MessagesDialog::buildTree( QTreeWidgetItem *parentItem, vlc_object_t *p_obj
item
->
setText
(
0
,
qfu
(
p_obj
->
psz_object_type
)
+
" ("
+
item
->
setText
(
0
,
qfu
(
p_obj
->
psz_object_type
)
+
" ("
+
QString
::
number
(
p_obj
->
i_object_id
)
+
")"
);
QString
::
number
(
p_obj
->
i_object_id
)
+
")"
);
item
->
setExpanded
(
true
);
for
(
int
i
=
0
;
i
<
p_obj
->
i_children
;
i
++
)
for
(
int
i
=
0
;
i
<
p_obj
->
i_children
;
i
++
)
{
{
buildTree
(
item
,
p_obj
->
pp_children
[
i
]);
buildTree
(
item
,
p_obj
->
pp_children
[
i
]);
...
@@ -226,11 +228,6 @@ void MessagesDialog::updateTree()
...
@@ -226,11 +228,6 @@ void MessagesDialog::updateTree()
buildTree
(
NULL
,
VLC_OBJECT
(
p_intf
->
p_libvlc
)
);
buildTree
(
NULL
,
VLC_OBJECT
(
p_intf
->
p_libvlc
)
);
}
}
void
MessagesDialog
::
close
()
{
hide
();
}
void
MessagesDialog
::
clear
()
void
MessagesDialog
::
clear
()
{
{
messages
->
clear
();
messages
->
clear
();
...
...
modules/gui/qt4/dialogs/messages.hpp
View file @
a20dba71
...
@@ -65,7 +65,6 @@ private:
...
@@ -65,7 +65,6 @@ private:
private
slots
:
private
slots
:
void
updateTab
(
int
);
void
updateTab
(
int
);
void
updateLog
();
void
updateLog
();
void
close
();
void
clear
();
void
clear
();
bool
save
();
bool
save
();
private:
private:
...
...
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