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
5daa9d29
Commit
5daa9d29
authored
Feb 09, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace the button to the right place.
parent
351cfac2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
29 deletions
+48
-29
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.cpp
+42
-28
modules/gui/qt4/dialogs/messages.hpp
modules/gui/qt4/dialogs/messages.hpp
+6
-1
No files found.
modules/gui/qt4/dialogs/messages.cpp
View file @
5daa9d29
...
...
@@ -54,65 +54,79 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
QPushButton
*
closeButton
=
new
QPushButton
(
qtr
(
"&Close"
)
);
closeButton
->
setDefault
(
true
);
BUTTONACT
(
closeButton
,
close
()
);
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 */
QWidget
*
msgWidget
=
new
QWidget
;
QGridLayout
*
msgLayout
=
new
QGridLayout
(
msgWidget
);
QPushButton
*
clearButton
=
new
QPushButton
(
qtr
(
"&Clear"
)
);
QPushButton
*
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
);
QLabel
*
verbosityLabel
=
new
QLabel
(
qtr
(
"Verbosity Level"
)
);
messages
=
new
QTextEdit
();
messages
->
setReadOnly
(
true
);
messages
->
setGeometry
(
0
,
0
,
440
,
600
);
messages
->
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
msgLayout
->
addWidget
(
messages
,
0
,
0
,
1
,
0
);
msgLayout
->
addWidget
(
verbosityLabel
,
1
,
0
,
1
,
1
);
msgLayout
->
addWidget
(
verbosityBox
,
1
,
1
);
msgLayout
->
addItem
(
new
QSpacerItem
(
20
,
20
,
QSizePolicy
::
Expanding
),
1
,
2
);
msgLayout
->
addWidget
(
saveLogButton
,
1
,
3
);
msgLayout
->
addWidget
(
clearButton
,
1
,
4
);
BUTTONACT
(
clearButton
,
clear
()
);
BUTTONACT
(
saveLogButton
,
save
()
);
mainTab
->
addTab
(
msgWidget
,
qtr
(
"Messages"
)
);
ON_TIMEOUT
(
updateLog
()
);
mainTab
->
addTab
(
msgWidget
,
qtr
(
"Messages"
)
);
/* Module tree */
/* Module
s
tree */
QWidget
*
treeWidget
=
new
QWidget
;
QGridLayout
*
treeLayout
=
new
QGridLayout
(
treeWidget
);
modulesTree
=
new
QTreeWidget
();
modulesTree
->
header
()
->
hide
();
QPushButton
*
updateButton
=
new
QPushButton
(
qtr
(
"&Update"
)
);
treeLayout
->
addWidget
(
modulesTree
,
0
,
0
,
1
,
0
);
treeLayout
->
addWidget
(
updateButton
,
1
,
6
);
BUTTONACT
(
updateButton
,
updateTree
()
);
mainTab
->
addTab
(
treeWidget
,
qtr
(
"Modules tree"
)
);
/* General action */
readSettings
(
"Messages"
);
}
void
MessagesDialog
::
updateTab
(
int
index
)
{
if
(
index
==
1
)
{
verbosityLabel
->
hide
();
verbosityBox
->
hide
();
clearButton
->
hide
();
saveLogButton
->
hide
();
updateTree
();
}
else
{
verbosityLabel
->
show
();
verbosityBox
->
show
();
clearButton
->
show
();
saveLogButton
->
show
();
}
}
void
MessagesDialog
::
updateLog
()
{
msg_subscription_t
*
p_sub
=
p_intf
->
p_sys
->
p_sub
;
...
...
modules/gui/qt4/dialogs/messages.hpp
View file @
5daa9d29
...
...
@@ -56,15 +56,20 @@ private:
MessagesDialog
(
intf_thread_t
*
);
static
MessagesDialog
*
instance
;
QSpinBox
*
verbosityBox
;
QLabel
*
verbosityLabel
;
QTextEdit
*
messages
;
QTreeWidget
*
modulesTree
;
QPushButton
*
clearButton
;
QPushButton
*
saveLogButton
;
private
slots
:
void
updateTab
(
int
);
void
updateLog
();
void
updateTree
();
void
close
();
void
clear
();
bool
save
();
private:
void
updateTree
();
void
buildTree
(
QTreeWidgetItem
*
,
vlc_object_t
*
);
};
...
...
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