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
d15c2052
Commit
d15c2052
authored
May 16, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: move QVLCVariable out of external dialogs
parent
692ee11c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
131 additions
and
44 deletions
+131
-44
modules/gui/qt4/Modules.am
modules/gui/qt4/Modules.am
+3
-0
modules/gui/qt4/dialogs/external.cpp
modules/gui/qt4/dialogs/external.cpp
+0
-23
modules/gui/qt4/dialogs/external.hpp
modules/gui/qt4/dialogs/external.hpp
+5
-21
modules/gui/qt4/variables.cpp
modules/gui/qt4/variables.cpp
+67
-0
modules/gui/qt4/variables.hpp
modules/gui/qt4/variables.hpp
+56
-0
No files found.
modules/gui/qt4/Modules.am
View file @
d15c2052
...
...
@@ -21,6 +21,7 @@ nodist_SOURCES_qt4 = \
input_manager.moc.cpp \
actions_manager.moc.cpp \
recents.moc.cpp \
variables.moc.cpp \
dialogs/playlist.moc.cpp \
dialogs/bookmarks.moc.cpp \
dialogs/mediainfo.moc.cpp \
...
...
@@ -195,6 +196,7 @@ SOURCES_qt4 = qt4.cpp \
input_manager.cpp \
actions_manager.cpp \
recents.cpp \
variables.cpp \
dialogs/playlist.cpp \
dialogs/bookmarks.cpp \
dialogs/preferences.cpp \
...
...
@@ -241,6 +243,7 @@ noinst_HEADERS = \
input_manager.hpp \
actions_manager.hpp \
recents.hpp \
variables.hpp \
dialogs/playlist.hpp \
dialogs/bookmarks.hpp \
dialogs/mediainfo.hpp \
...
...
modules/gui/qt4/dialogs/external.cpp
View file @
d15c2052
...
...
@@ -36,29 +36,6 @@
#include <QProgressDialog>
#include <QMutex>
QVLCVariable
::
QVLCVariable
(
vlc_object_t
*
obj
,
const
char
*
varname
,
int
type
)
:
object
(
obj
),
name
(
qfu
(
varname
))
{
var_Create
(
object
,
qtu
(
name
),
type
);
var_AddCallback
(
object
,
qtu
(
name
),
callback
,
this
);
}
QVLCVariable
::~
QVLCVariable
(
void
)
{
var_DelCallback
(
object
,
qtu
(
name
),
callback
,
this
);
var_Destroy
(
object
,
qtu
(
name
));
}
int
QVLCVariable
::
callback
(
vlc_object_t
*
object
,
const
char
*
,
vlc_value_t
,
vlc_value_t
cur
,
void
*
data
)
{
QVLCVariable
*
self
=
(
QVLCVariable
*
)
data
;
emit
self
->
pointerChanged
(
object
,
cur
.
p_address
);
return
VLC_SUCCESS
;
}
DialogHandler
::
DialogHandler
(
intf_thread_t
*
intf
)
:
intf
(
intf
),
message
(
VLC_OBJECT
(
intf
),
"dialog-fatal"
,
VLC_VAR_ADDRESS
),
...
...
modules/gui/qt4/dialogs/external.hpp
View file @
d15c2052
...
...
@@ -23,23 +23,7 @@
#include <QObject>
#include <vlc_common.h>
class
QVLCVariable
:
public
QObject
{
Q_OBJECT
private:
static
int
callback
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_object_t
*
object
;
QString
name
;
public:
QVLCVariable
(
vlc_object_t
*
,
const
char
*
,
int
);
virtual
~
QVLCVariable
(
void
);
signals:
void
pointerChanged
(
vlc_object_t
*
,
void
*
);
};
#include "variables.hpp"
struct
intf_thread_t
;
class
QProgressDialog
;
...
...
@@ -56,10 +40,10 @@ public:
private:
intf_thread_t
*
intf
;
QVLC
Variable
message
;
QVLC
Variable
login
;
QVLC
Variable
question
;
QVLC
Variable
progressBar
;
QVLC
Pointer
message
;
QVLC
Pointer
login
;
QVLC
Pointer
question
;
QVLC
Pointer
progressBar
;
signals:
void
progressBarDestroyed
(
QWidget
*
);
...
...
modules/gui/qt4/variables.cpp
0 → 100644
View file @
d15c2052
/*****************************************************************************
* variables.cpp : VLC variable class
****************************************************************************
* Copyright (C) 2009 Rémi Denis-Courmont
* Copyright (C) 2006 the VideoLAN team
*
* 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 "qt4.hpp"
#include "variables.hpp"
QVLCVariable
::
QVLCVariable
(
vlc_object_t
*
obj
,
const
char
*
varname
,
int
type
,
bool
inherit
)
:
object
(
obj
),
name
(
qfu
(
varname
))
{
vlc_object_hold
(
object
);
if
(
inherit
)
type
|=
VLC_VAR_DOINHERIT
;
var_Create
(
object
,
qtu
(
name
),
type
);
var_AddCallback
(
object
,
qtu
(
name
),
callback
,
this
);
}
QVLCVariable
::~
QVLCVariable
(
void
)
{
var_DelCallback
(
object
,
qtu
(
name
),
callback
,
this
);
var_Destroy
(
object
,
qtu
(
name
));
vlc_object_release
(
object
);
}
int
QVLCVariable
::
callback
(
vlc_object_t
*
object
,
const
char
*
,
vlc_value_t
old
,
vlc_value_t
cur
,
void
*
data
)
{
QVLCVariable
*
self
=
static_cast
<
QVLCVariable
*>
(
data
);
self
->
trigger
(
self
->
object
,
old
,
cur
);
return
VLC_SUCCESS
;
}
QVLCPointer
::
QVLCPointer
(
vlc_object_t
*
obj
,
const
char
*
varname
,
bool
inherit
)
:
QVLCVariable
(
obj
,
varname
,
VLC_VAR_ADDRESS
,
inherit
)
{
}
void
QVLCPointer
::
trigger
(
vlc_object_t
*
obj
,
vlc_value_t
old
,
vlc_value_t
cur
)
{
emit
pointerChanged
(
obj
,
old
.
p_address
,
cur
.
p_address
);
emit
pointerChanged
(
obj
,
cur
.
p_address
);
}
modules/gui/qt4/variables.hpp
0 → 100644
View file @
d15c2052
/*****************************************************************************
* external.hpp : Dialogs from other LibVLC core and other plugins
****************************************************************************
* Copyright (C) 2009 Rémi Denis-Courmont
*
* 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 QVLC_VARIABLES_H_
#define QVLC_VARIABLES_H_ 1
#include <QObject>
#include <vlc_common.h>
class
QVLCVariable
:
public
QObject
{
Q_OBJECT
private:
static
int
callback
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_object_t
*
object
;
QString
name
;
virtual
void
trigger
(
vlc_object_t
*
,
vlc_value_t
,
vlc_value_t
)
=
0
;
public:
QVLCVariable
(
vlc_object_t
*
,
const
char
*
,
int
,
bool
);
virtual
~
QVLCVariable
(
void
);
};
class
QVLCPointer
:
public
QVLCVariable
{
Q_OBJECT
private:
virtual
void
trigger
(
vlc_object_t
*
,
vlc_value_t
,
vlc_value_t
);
public:
QVLCPointer
(
vlc_object_t
*
,
const
char
*
,
bool
inherit
=
false
);
signals:
void
pointerChanged
(
vlc_object_t
*
,
void
*
,
void
*
);
void
pointerChanged
(
vlc_object_t
*
,
void
*
);
};
#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