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
4f28199b
Commit
4f28199b
authored
Feb 12, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an "update button" to update the modules tree.
parent
5609e081
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
8 deletions
+23
-8
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.cpp
+18
-6
modules/gui/qt4/dialogs/messages.hpp
modules/gui/qt4/dialogs/messages.hpp
+5
-2
No files found.
modules/gui/qt4/dialogs/messages.cpp
View file @
4f28199b
...
...
@@ -49,9 +49,10 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
/* General widgets */
QGridLayout
*
mainLayout
=
new
QGridLayout
(
this
);
QTabWidget
*
mainTab
=
new
QTabWidget
(
this
);
mainTab
=
new
QTabWidget
(
this
);
mainTab
->
setTabPosition
(
QTabWidget
::
North
);
/* Messages */
QWidget
*
msgWidget
=
new
QWidget
;
QGridLayout
*
msgLayout
=
new
QGridLayout
(
msgWidget
);
...
...
@@ -76,10 +77,11 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
treeLayout
->
addWidget
(
modulesTree
,
0
,
0
,
1
,
0
);
mainTab
->
addTab
(
treeWidget
,
qtr
(
"Modules tree"
)
);
/* Buttons and general layout */
QPushButton
*
closeButton
=
new
QPushButton
(
qtr
(
"&Close"
)
);
closeButton
->
setDefault
(
true
);
clearButton
=
new
QPushButton
(
qtr
(
"&Clear"
)
);
clear
Update
Button
=
new
QPushButton
(
qtr
(
"&Clear"
)
);
saveLogButton
=
new
QPushButton
(
qtr
(
"&Save as..."
)
);
verbosityBox
=
new
QSpinBox
();
...
...
@@ -94,11 +96,11 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
mainLayout
->
addWidget
(
verbosityLabel
,
1
,
0
,
1
,
1
);
mainLayout
->
addWidget
(
verbosityBox
,
1
,
1
);
mainLayout
->
addWidget
(
saveLogButton
,
1
,
3
);
mainLayout
->
addWidget
(
clearButton
,
1
,
4
);
mainLayout
->
addWidget
(
clear
Update
Button
,
1
,
4
);
mainLayout
->
addWidget
(
closeButton
,
1
,
5
);
BUTTONACT
(
closeButton
,
hide
()
);
BUTTONACT
(
clear
Button
,
clear
()
);
BUTTONACT
(
clear
UpdateButton
,
clearOrUpdate
()
);
BUTTONACT
(
saveLogButton
,
save
()
);
CONNECT
(
mainTab
,
currentChanged
(
int
),
this
,
updateTab
(
int
)
);
...
...
@@ -109,19 +111,21 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
void
MessagesDialog
::
updateTab
(
int
index
)
{
/* Second tab : modules tree */
if
(
index
==
1
)
{
verbosityLabel
->
hide
();
verbosityBox
->
hide
();
clear
Button
->
hide
(
);
clear
UpdateButton
->
setText
(
qtr
(
"&Update"
)
);
saveLogButton
->
hide
();
updateTree
();
}
/* First tab : messages */
else
{
verbosityLabel
->
show
();
verbosityBox
->
show
();
clear
Button
->
show
(
);
clear
UpdateButton
->
setText
(
qtr
(
"&Clear"
)
);
saveLogButton
->
show
();
}
}
...
...
@@ -221,6 +225,14 @@ void MessagesDialog::buildTree( QTreeWidgetItem *parentItem,
vlc_object_release
(
p_obj
);
}
void
MessagesDialog
::
clearOrUpdate
()
{
if
(
mainTab
->
currentIndex
()
)
updateTree
();
else
clear
();
}
void
MessagesDialog
::
updateTree
()
{
modulesTree
->
clear
();
...
...
modules/gui/qt4/dialogs/messages.hpp
View file @
4f28199b
...
...
@@ -26,6 +26,7 @@
#include "util/qvlcframe.hpp"
class
QTabWidget
;
class
QPushButton
;
class
QSpinBox
;
class
QGridLayout
;
...
...
@@ -55,19 +56,21 @@ public:
private:
MessagesDialog
(
intf_thread_t
*
);
static
MessagesDialog
*
instance
;
QTabWidget
*
mainTab
;
QSpinBox
*
verbosityBox
;
QLabel
*
verbosityLabel
;
QTextEdit
*
messages
;
QTreeWidget
*
modulesTree
;
QPushButton
*
clearButton
;
QPushButton
*
clear
Update
Button
;
QPushButton
*
saveLogButton
;
private
slots
:
void
updateTab
(
int
);
void
updateLog
();
void
clear
();
void
clear
OrUpdate
();
bool
save
();
private:
void
clear
();
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