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
a80e0157
Commit
a80e0157
authored
Feb 01, 2010
by
Jean-Philippe André
Committed by
Jean-Philippe André
Feb 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ext/Qt: Enhance more information dialog
parent
a3120aa5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
111 additions
and
0 deletions
+111
-0
modules/gui/qt4/dialogs/plugins.cpp
modules/gui/qt4/dialogs/plugins.cpp
+96
-0
modules/gui/qt4/dialogs/plugins.hpp
modules/gui/qt4/dialogs/plugins.hpp
+15
-0
No files found.
modules/gui/qt4/dialogs/plugins.cpp
View file @
a80e0157
...
...
@@ -231,6 +231,25 @@ void ExtensionTab::keyPressEvent( QKeyEvent *keyEvent )
keyEvent
->
ignore
();
}
// Show more information
void
ExtensionTab
::
moreInformation
()
{
if
(
!
extList
->
selectionModel
()
||
extList
->
selectionModel
()
->
selectedIndexes
().
isEmpty
()
)
{
return
;
}
QModelIndex
index
=
extList
->
selectionModel
()
->
selectedIndexes
().
first
();
ExtensionCopy
*
ext
=
(
ExtensionCopy
*
)
index
.
internalPointer
();
if
(
!
ext
)
return
;
ExtensionInfoDialog
dlg
(
*
ext
,
p_intf
,
this
);
dlg
.
exec
();
}
/* Safe copy of the extension_t struct */
class
ExtensionCopy
{
...
...
@@ -421,3 +440,80 @@ QSize ExtensionItemDelegate::sizeHint( const QStyleOptionViewItem &option,
else
return
QSize
();
}
/* "More information" dialog */
ExtensionInfoDialog
::
ExtensionInfoDialog
(
const
ExtensionCopy
&
extension
,
intf_thread_t
*
p_intf
,
QWidget
*
parent
)
:
QVLCDialog
(
parent
,
p_intf
),
extension
(
new
ExtensionCopy
(
extension
)
)
{
// Let's be a modal dialog
setWindowModality
(
Qt
::
WindowModal
);
// Layout
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
// Icon
QLabel
*
icon
=
new
QLabel
(
this
);
QPixmap
pix
(
":/logo/vlc48.png"
);
icon
->
setPixmap
(
pix
);
layout
->
addWidget
(
icon
,
1
,
0
,
2
,
1
,
Qt
::
AlignLeft
);
// Title
QLabel
*
label
=
new
QLabel
(
extension
.
title
,
this
);
QFont
font
=
label
->
font
();
font
.
setBold
(
true
);
font
.
setPointSizeF
(
font
.
pointSizeF
()
*
1.3
f
);
label
->
setFont
(
font
);
layout
->
addWidget
(
label
,
0
,
0
,
1
,
-
1
,
Qt
::
AlignLeft
);
// Version
label
=
new
QLabel
(
this
);
QString
txt
=
qtr
(
"Version:"
);
txt
+=
extension
.
version
;
label
->
setText
(
txt
);
layout
->
addWidget
(
label
,
1
,
1
,
1
,
1
,
Qt
::
AlignLeft
|
Qt
::
AlignBottom
);
// Author
label
=
new
QLabel
(
this
);
txt
=
qtr
(
"Author(s):"
);
txt
+=
extension
.
author
;
label
->
setText
(
txt
);
layout
->
addWidget
(
label
,
2
,
1
,
1
,
1
,
Qt
::
AlignLeft
|
Qt
::
AlignTop
);
// Description
// FIXME: if( !extension.full_description.isEmpty() ) ...
QTextBrowser
*
text
=
new
QTextBrowser
(
this
);
text
->
setHtml
(
extension
.
description
);
layout
->
addWidget
(
text
,
4
,
0
,
1
,
-
1
,
Qt
::
AlignJustify
);
// URL
label
=
new
QLabel
(
qtr
(
"Website:"
),
this
);
font
=
label
->
font
();
font
.
setBold
(
true
);
label
->
setFont
(
font
);
layout
->
addWidget
(
label
,
5
,
0
,
1
,
1
,
Qt
::
AlignLeft
);
label
=
new
QLabel
(
extension
.
url
,
this
);
label
->
setTextInteractionFlags
(
Qt
::
TextBrowserInteraction
);
layout
->
addWidget
(
label
,
5
,
1
,
1
,
1
,
Qt
::
AlignLeft
);
// Script file
label
=
new
QLabel
(
qtr
(
"File:"
),
this
);
label
->
setFont
(
font
);
layout
->
addWidget
(
label
,
6
,
0
,
1
,
1
,
Qt
::
AlignLeft
);
QLineEdit
*
line
=
new
QLineEdit
(
extension
.
name
,
this
);
layout
->
addWidget
(
line
,
6
,
1
,
1
,
1
,
Qt
::
AlignLeft
);
// Close button
QDialogButtonBox
*
group
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Close
,
Qt
::
Horizontal
,
this
);
layout
->
addWidget
(
group
,
7
,
0
,
1
,
-
1
);
connect
(
group
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
close
())
);
}
ExtensionInfoDialog
::~
ExtensionInfoDialog
()
{
delete
extension
;
}
modules/gui/qt4/dialogs/plugins.hpp
View file @
a80e0157
...
...
@@ -95,6 +95,10 @@ private:
ExtensionTab
(
intf_thread_t
*
p_intf
);
virtual
~
ExtensionTab
();
private
slots
:
void
moreInformation
();
private:
QListView
*
extList
;
QPushButton
*
butMoreInfo
;
...
...
@@ -150,5 +154,16 @@ private:
intf_thread_t
*
p_intf
;
};
class
ExtensionInfoDialog
:
public
QVLCDialog
{
public:
ExtensionInfoDialog
(
const
ExtensionCopy
&
extension
,
intf_thread_t
*
p_intf
,
QWidget
*
parent
);
virtual
~
ExtensionInfoDialog
();
private:
ExtensionCopy
*
extension
;
};
#endif
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