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
a3120aa5
Commit
a3120aa5
authored
Jan 31, 2010
by
Jean-Philippe André
Committed by
Jean-Philippe André
Feb 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extensions/Qt: Use a custom QListView in Plugins & Extensions panel
parent
3990277e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
260 additions
and
114 deletions
+260
-114
modules/gui/qt4/dialogs/plugins.cpp
modules/gui/qt4/dialogs/plugins.cpp
+208
-104
modules/gui/qt4/dialogs/plugins.hpp
modules/gui/qt4/dialogs/plugins.hpp
+52
-10
No files found.
modules/gui/qt4/dialogs/plugins.cpp
View file @
a3120aa5
This diff is collapsed.
Click to expand it.
modules/gui/qt4/dialogs/plugins.hpp
View file @
a3120aa5
...
@@ -31,7 +31,8 @@
...
@@ -31,7 +31,8 @@
#include <QStringList>
#include <QStringList>
#include <QTreeWidgetItem>
#include <QTreeWidgetItem>
#include <QListWidgetItem>
#include <QAbstractListModel>
#include <QStyledItemDelegate>
class
QLabel
;
class
QLabel
;
class
QTabWidget
;
class
QTabWidget
;
...
@@ -39,10 +40,16 @@ class QComboBox;
...
@@ -39,10 +40,16 @@ class QComboBox;
class
QTreeWidget
;
class
QTreeWidget
;
class
QLineEdit
;
class
QLineEdit
;
class
QTextBrowser
;
class
QTextBrowser
;
class
QListView
;
class
QStyleOptionViewItem
;
class
QPainter
;
class
QKeyEvent
;
class
PluginTab
;
class
PluginTab
;
class
ExtensionTab
;
class
ExtensionTab
;
class
ExtensionListItem
;
class
ExtensionListItem
;
class
SearchLineEdit
;
class
SearchLineEdit
;
class
ExtensionCopy
;
class
PluginDialog
:
public
QVLCFrame
,
public
Singleton
<
PluginDialog
>
class
PluginDialog
:
public
QVLCFrame
,
public
Singleton
<
PluginDialog
>
{
{
...
@@ -81,19 +88,15 @@ class ExtensionTab : public QVLCFrame
...
@@ -81,19 +88,15 @@ class ExtensionTab : public QVLCFrame
{
{
Q_OBJECT
;
Q_OBJECT
;
protected:
virtual
void
keyPressEvent
(
QKeyEvent
*
keyEvent
);
private:
private:
ExtensionTab
(
intf_thread_t
*
p_intf
);
ExtensionTab
(
intf_thread_t
*
p_intf
);
virtual
~
ExtensionTab
();
virtual
~
ExtensionTab
();
QComboBox
*
extList
;
QListView
*
extList
;
QLabel
*
author
,
*
version
,
*
url
;
QPushButton
*
butMoreInfo
;
QTextBrowser
*
description
;
QLineEdit
*
name
;
private
slots
:
void
fillList
();
void
selectionChanged
(
int
index
);
void
reloadExtensions
();
friend
class
PluginDialog
;
friend
class
PluginDialog
;
};
};
...
@@ -108,5 +111,44 @@ public:
...
@@ -108,5 +111,44 @@ public:
virtual
bool
operator
<
(
const
QTreeWidgetItem
&
other
)
const
;
virtual
bool
operator
<
(
const
QTreeWidgetItem
&
other
)
const
;
};
};
class
ExtensionListModel
:
public
QAbstractListModel
{
Q_OBJECT
public:
ExtensionListModel
(
QListView
*
view
,
intf_thread_t
*
p_intf
);
virtual
~
ExtensionListModel
();
virtual
QVariant
data
(
const
QModelIndex
&
index
,
int
role
)
const
;
virtual
QModelIndex
index
(
int
row
,
int
column
=
0
,
const
QModelIndex
&
=
QModelIndex
()
)
const
;
virtual
int
rowCount
(
const
QModelIndex
&
=
QModelIndex
()
)
const
;
private
slots
:
void
updateList
();
private:
intf_thread_t
*
p_intf
;
QList
<
ExtensionCopy
*>
extensions
;
};
class
ExtensionItemDelegate
:
public
QStyledItemDelegate
{
public:
ExtensionItemDelegate
(
intf_thread_t
*
p_intf
,
QListView
*
view
);
virtual
~
ExtensionItemDelegate
();
virtual
void
paint
(
QPainter
*
painter
,
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
;
virtual
QSize
sizeHint
(
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
;
private:
QListView
*
view
;
intf_thread_t
*
p_intf
;
};
#endif
#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