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
58f43231
Commit
58f43231
authored
Nov 10, 2009
by
Jean-Philippe André
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extensions/Qt: dialogs
These are the main UI files for extensions' dialogs.
parent
42bfc70b
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
791 additions
and
0 deletions
+791
-0
modules/gui/qt4/dialogs/extensions.cpp
modules/gui/qt4/dialogs/extensions.cpp
+648
-0
modules/gui/qt4/dialogs/extensions.hpp
modules/gui/qt4/dialogs/extensions.hpp
+143
-0
No files found.
modules/gui/qt4/dialogs/extensions.cpp
0 → 100644
View file @
58f43231
This diff is collapsed.
Click to expand it.
modules/gui/qt4/dialogs/extensions.hpp
0 → 100644
View file @
58f43231
/*****************************************************************************
* extensions.hpp: Extensions manager for Qt: dialogs manager
****************************************************************************
* Copyright (C) 2009-2010 VideoLAN and authors
* $Id$
*
* Authors: Jean-Philippe André < jpeg # 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 EXTENSIONS_HPP
#define EXTENSIONS_HPP
#include "qt4.hpp"
#include <vlc_extensions.h>
#include "assert.h"
#include <QDialog>
class
QObject
;
class
QGridLayout
;
class
QSignalMapper
;
class
QCloseEvent
;
class
ExtensionsDialogProvider
;
class
ExtensionDialog
;
class
WidgetMapper
;
class
ExtensionsDialogProvider
:
public
QObject
{
/** This is the dialog provider for Extensions dialogs
* @todo Make this class be a public Singleton<EDP>
* @todo Add a setExtManager() function (with vlc_object_hold)
**/
Q_OBJECT
private:
static
ExtensionsDialogProvider
*
instance
;
intf_thread_t
*
p_intf
;
extensions_manager_t
*
p_extensions_manager
;
private
slots
:
ExtensionDialog
*
CreateDialog
(
extension_dialog_t
*
p_dialog
);
int
DestroyDialog
(
extension_dialog_t
*
p_dialog
);
ExtensionDialog
*
UpdateDialog
(
extension_dialog_t
*
p_dialog
);
public:
ExtensionsDialogProvider
(
intf_thread_t
*
p_intf
,
extensions_manager_t
*
p_mgr
);
virtual
~
ExtensionsDialogProvider
();
static
ExtensionsDialogProvider
*
getInstance
(
intf_thread_t
*
p_intf
=
NULL
,
extensions_manager_t
*
p_mgr
=
NULL
)
{
if
(
!
instance
)
{
assert
(
p_intf
!=
NULL
&&
p_mgr
!=
NULL
);
instance
=
new
ExtensionsDialogProvider
(
p_intf
,
p_mgr
);
}
return
instance
;
}
static
void
killInstance
()
{
assert
(
instance
!=
NULL
);
delete
instance
;
instance
=
NULL
;
}
void
ManageDialog
(
extension_dialog_t
*
p_dialog
);
signals:
void
SignalDialog
(
extension_dialog_t
*
p_dialog
);
};
class
ExtensionDialog
:
public
QDialog
{
Q_OBJECT
private:
intf_thread_t
*
p_intf
;
extensions_manager_t
*
p_extensions_manager
;
extension_t
*
p_extension
;
extension_dialog_t
*
p_dialog
;
bool
has_lock
;
///< Indicates whether Qt thread owns the lock
QGridLayout
*
layout
;
QSignalMapper
*
clickMapper
;
QSignalMapper
*
inputMapper
;
QSignalMapper
*
selectMapper
;
QWidget
*
CreateWidget
(
extension_widget_t
*
p_widget
);
QWidget
*
UpdateWidget
(
extension_widget_t
*
p_widget
);
void
DestroyWidget
(
extension_widget_t
*
p_widget
);
protected:
virtual
void
closeEvent
(
QCloseEvent
*
);
private
slots
:
int
TriggerClick
(
QObject
*
object
);
void
SyncInput
(
QObject
*
object
);
void
SyncSelection
(
QObject
*
object
);
signals:
void
destroyDialog
(
extension_dialog_t
*
p_dialog
);
public:
ExtensionDialog
(
intf_thread_t
*
p_intf
,
extensions_manager_t
*
p_mgr
,
extension_dialog_t
*
p_dialog
);
virtual
~
ExtensionDialog
();
void
UpdateWidgets
();
// FIXME: This totally sucks (access to has_lock)
friend
class
ExtensionsDialogProvider
;
};
class
WidgetMapper
:
public
QObject
{
Q_OBJECT
private:
extension_widget_t
*
p_widget
;
public:
WidgetMapper
(
extension_widget_t
*
_p_widget
)
:
QObject
(
NULL
),
p_widget
(
_p_widget
)
{}
~
WidgetMapper
()
{}
extension_widget_t
*
getWidget
()
{
return
p_widget
;
}
};
#endif // EXTENSIONS_HPP
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