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
97eb2597
Commit
97eb2597
authored
Dec 28, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: New dialog for plugins listing.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
7355193f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
161 additions
and
0 deletions
+161
-0
modules/gui/qt4/Modules.am
modules/gui/qt4/Modules.am
+3
-0
modules/gui/qt4/dialogs/plugins.cpp
modules/gui/qt4/dialogs/plugins.cpp
+103
-0
modules/gui/qt4/dialogs/plugins.hpp
modules/gui/qt4/dialogs/plugins.hpp
+44
-0
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+7
-0
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/dialogs_provider.hpp
+1
-0
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+3
-0
No files found.
modules/gui/qt4/Modules.am
View file @
97eb2597
...
...
@@ -24,6 +24,7 @@ nodist_SOURCES_qt4 = \
dialogs/extended.moc.cpp \
dialogs/messages.moc.cpp \
dialogs/errors.moc.cpp \
dialogs/plugins.moc.cpp \
dialogs/preferences.moc.cpp \
dialogs/interaction.moc.cpp \
dialogs/sout.moc.cpp \
...
...
@@ -188,6 +189,7 @@ SOURCES_qt4 = qt4.cpp \
dialogs/extended.cpp \
dialogs/messages.cpp \
dialogs/errors.cpp \
dialogs/plugins.cpp \
dialogs/interaction.cpp \
dialogs/sout.cpp \
dialogs/help.cpp \
...
...
@@ -226,6 +228,7 @@ noinst_HEADERS = \
dialogs/extended.hpp \
dialogs/messages.hpp \
dialogs/errors.hpp \
dialogs/plugins.hpp \
dialogs/preferences.hpp \
dialogs/interaction.hpp \
dialogs/sout.hpp \
...
...
modules/gui/qt4/dialogs/plugins.cpp
0 → 100644
View file @
97eb2597
/*****************************************************************************
* plugins.hpp : Plug-ins and extensions listing
****************************************************************************
* Copyright (C) 2008 the VideoLAN team
* $Id$
*
* Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "plugins.hpp"
//#include <vlc_modules.h>
#include <QTreeWidget>
#include <QStringList>
#include <QHeaderView>
#include <QDialogButtonBox>
PluginDialog
::
PluginDialog
(
intf_thread_t
*
_p_intf
)
:
QVLCFrame
(
_p_intf
)
{
setAttribute
(
Qt
::
WA_DeleteOnClose
);
setWindowTitle
(
qtr
(
"Plugins and extensions"
)
);
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
/* Main Tree for modules */
treePlugins
=
new
QTreeWidget
;
layout
->
addWidget
(
treePlugins
,
0
,
0
,
1
,
-
1
);
/* Users cannot move the columns around but we need to sort */
treePlugins
->
header
()
->
setMovable
(
false
);
treePlugins
->
header
()
->
setSortIndicatorShown
(
true
);
// treePlugins->header()->setResizeMode( QHeaderView::ResizeToContents );
treePlugins
->
setAlternatingRowColors
(
true
);
treePlugins
->
setColumnWidth
(
0
,
200
);
QStringList
headerNames
;
headerNames
<<
_
(
"Name"
)
<<
_
(
"Capability"
)
<<
_
(
"Score"
);
treePlugins
->
setHeaderLabels
(
headerNames
);
FillTree
();
/* Set capability column to the correct Size*/
treePlugins
->
resizeColumnToContents
(
1
);
treePlugins
->
header
()
->
restoreState
(
getSettings
()
->
value
(
"Plugins/Header-State"
).
toByteArray
()
);
treePlugins
->
setSortingEnabled
(
true
);
treePlugins
->
sortByColumn
(
1
,
Qt
::
AscendingOrder
);
QDialogButtonBox
*
box
=
new
QDialogButtonBox
;
QPushButton
*
okButton
=
new
QPushButton
(
"ok"
,
this
);
box
->
addButton
(
okButton
,
QDialogButtonBox
::
AcceptRole
);
layout
->
addWidget
(
box
,
1
,
2
);
BUTTONACT
(
okButton
,
close
()
);
setMinimumSize
(
500
,
300
);
readSettings
(
"Plugins"
,
QSize
(
500
,
300
)
);
}
inline
void
PluginDialog
::
FillTree
()
{
module_t
**
p_list
=
module_list_get
(
NULL
);
module_t
*
p_module
;
for
(
unsigned
int
i
=
0
;
(
p_module
=
p_list
[
i
]
)
!=
NULL
;
i
++
)
{
QStringList
qs_item
;
qs_item
<<
module_get_name
(
p_module
,
true
)
<<
module_get_capability
(
p_module
)
<<
QString
::
number
(
module_get_score
(
p_module
)
);
QTreeWidgetItem
*
item
=
new
QTreeWidgetItem
(
qs_item
);
treePlugins
->
addTopLevelItem
(
item
);
}
}
PluginDialog
::~
PluginDialog
()
{
writeSettings
(
"Plugins"
);
getSettings
()
->
setValue
(
"Plugins/Header-State"
,
treePlugins
->
header
()
->
saveState
()
);
}
modules/gui/qt4/dialogs/plugins.hpp
0 → 100644
View file @
97eb2597
/*****************************************************************************
* plugins.hpp : Plug-ins and extensions listing
****************************************************************************
* Copyright (C) 2008 the VideoLAN team
* $Id$
*
* Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef _PLUGIN_DIALOG_H_
#define _PLUGIN_DIALOG_H_
#include "util/qvlcframe.hpp"
class
QTreeWidget
;
class
PluginDialog
:
public
QVLCFrame
{
Q_OBJECT
;
public:
PluginDialog
(
intf_thread_t
*
);
private:
void
FillTree
();
virtual
~
PluginDialog
();
QTreeWidget
*
treePlugins
;
};
#endif
modules/gui/qt4/dialogs_provider.cpp
View file @
97eb2597
...
...
@@ -51,6 +51,7 @@
#include "dialogs/gototime.hpp"
#include "dialogs/podcast_configuration.hpp"
#include "dialogs/toolbar.hpp"
#include "dialogs/plugins.hpp"
#include <QEvent>
#include <QApplication>
...
...
@@ -244,6 +245,12 @@ void DialogsProvider::toolbarDialog()
ToolbarEditDialog
::
getInstance
(
p_intf
)
->
toggleVisible
();
}
void
DialogsProvider
::
pluginDialog
()
{
PluginDialog
*
diag
=
new
PluginDialog
(
p_intf
);
diag
->
show
();
}
/* Generic open file */
void
DialogsProvider
::
openFileGenericDialog
(
intf_dialog_args_t
*
p_arg
)
{
...
...
modules/gui/qt4/dialogs_provider.hpp
View file @
97eb2597
...
...
@@ -149,6 +149,7 @@ public slots:
void
gotoTimeDialog
();
void
podcastConfigureDialog
();
void
toolbarDialog
();
void
pluginDialog
();
void
openFileGenericDialog
(
intf_dialog_args_t
*
);
...
...
modules/gui/qt4/menus.cpp
View file @
97eb2597
...
...
@@ -351,6 +351,9 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf )
addDPStaticEntry
(
menu
,
qtr
(
I_MENU_MSG
),
""
,
":/messages"
,
SLOT
(
messagesDialog
()
),
"Ctrl+M"
);
addDPStaticEntry
(
menu
,
qtr
(
"Plugins and extensions"
),
""
,
""
,
SLOT
(
pluginDialog
()
),
""
);
addDPStaticEntry
(
menu
,
qtr
(
I_MENU_INFO
)
,
""
,
":/info"
,
SLOT
(
mediaInfoDialog
()
),
"Ctrl+I"
);
addDPStaticEntry
(
menu
,
qtr
(
I_MENU_CODECINFO
)
,
""
,
...
...
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