Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
0166bb73
Commit
0166bb73
authored
Apr 17, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: add QVLCVariable::addCallback helper
parent
02746c1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
modules/gui/qt4/variables.cpp
modules/gui/qt4/variables.cpp
+29
-0
modules/gui/qt4/variables.hpp
modules/gui/qt4/variables.hpp
+10
-0
No files found.
modules/gui/qt4/variables.cpp
View file @
0166bb73
...
...
@@ -67,6 +67,11 @@ void QVLCPointer::trigger (vlc_value_t, vlc_value_t cur)
emit
pointerChanged
(
cur
.
p_address
);
}
bool
QVLCPointer
::
addCallback
(
QObject
*
tgt
,
const
char
*
method
,
Qt
::
ConnectionType
type
)
{
return
tgt
->
connect
(
this
,
SIGNAL
(
pointerChanged
(
void
*
)),
method
,
type
);
}
QVLCInteger
::
QVLCInteger
(
vlc_object_t
*
obj
,
const
char
*
varname
,
bool
inherit
)
:
QVLCVariable
(
obj
,
varname
,
VLC_VAR_INTEGER
,
inherit
)
...
...
@@ -78,6 +83,12 @@ void QVLCInteger::trigger (vlc_value_t, vlc_value_t cur)
emit
integerChanged
(
cur
.
i_int
);
}
bool
QVLCInteger
::
addCallback
(
QObject
*
tgt
,
const
char
*
method
,
Qt
::
ConnectionType
type
)
{
return
tgt
->
connect
(
this
,
SIGNAL
(
integerChanged
(
int64_t
)),
method
,
type
);
}
QVLCBool
::
QVLCBool
(
vlc_object_t
*
obj
,
const
char
*
varname
,
bool
inherit
)
:
QVLCVariable
(
obj
,
varname
,
VLC_VAR_BOOL
,
inherit
)
{
...
...
@@ -88,6 +99,12 @@ void QVLCBool::trigger (vlc_value_t, vlc_value_t cur)
emit
boolChanged
(
cur
.
b_bool
);
}
bool
QVLCBool
::
addCallback
(
QObject
*
tgt
,
const
char
*
method
,
Qt
::
ConnectionType
type
)
{
return
tgt
->
connect
(
this
,
SIGNAL
(
boolChanged
(
bool
)),
method
,
type
);
}
QVLCFloat
::
QVLCFloat
(
vlc_object_t
*
obj
,
const
char
*
varname
,
bool
inherit
)
:
QVLCVariable
(
obj
,
varname
,
VLC_VAR_FLOAT
,
inherit
)
{
...
...
@@ -98,6 +115,12 @@ void QVLCFloat::trigger (vlc_value_t, vlc_value_t cur)
emit
floatChanged
(
cur
.
f_float
);
}
bool
QVLCFloat
::
addCallback
(
QObject
*
tgt
,
const
char
*
method
,
Qt
::
ConnectionType
type
)
{
return
tgt
->
connect
(
this
,
SIGNAL
(
floatChanged
(
float
)),
method
,
type
);
}
QVLCString
::
QVLCString
(
vlc_object_t
*
obj
,
const
char
*
varname
,
bool
inherit
)
:
QVLCVariable
(
obj
,
varname
,
VLC_VAR_STRING
,
inherit
)
{
...
...
@@ -108,3 +131,9 @@ void QVLCString::trigger (vlc_value_t, vlc_value_t cur)
QString
str
=
qfu
(
cur
.
psz_string
);
emit
stringChanged
(
str
);
}
bool
QVLCString
::
addCallback
(
QObject
*
tgt
,
const
char
*
method
,
Qt
::
ConnectionType
type
)
{
return
tgt
->
connect
(
this
,
SIGNAL
(
stringChanged
(
QString
)),
method
,
type
);
}
modules/gui/qt4/variables.hpp
View file @
0166bb73
...
...
@@ -51,6 +51,8 @@ private:
public:
QVLCPointer
(
vlc_object_t
*
,
const
char
*
,
bool
inherit
=
false
);
bool
addCallback
(
QObject
*
,
const
char
*
,
Qt
::
ConnectionType
type
=
Qt
::
AutoConnection
);
signals:
void
pointerChanged
(
void
*
);
...
...
@@ -64,6 +66,8 @@ private:
public:
QVLCInteger
(
vlc_object_t
*
,
const
char
*
,
bool
inherit
=
false
);
bool
addCallback
(
QObject
*
,
const
char
*
,
Qt
::
ConnectionType
type
=
Qt
::
AutoConnection
);
signals:
void
integerChanged
(
int64_t
);
...
...
@@ -77,6 +81,8 @@ private:
public:
QVLCBool
(
vlc_object_t
*
,
const
char
*
,
bool
inherit
=
false
);
bool
addCallback
(
QObject
*
,
const
char
*
,
Qt
::
ConnectionType
type
=
Qt
::
AutoConnection
);
signals:
void
boolChanged
(
bool
);
...
...
@@ -90,6 +96,8 @@ private:
public:
QVLCFloat
(
vlc_object_t
*
,
const
char
*
,
bool
inherit
=
false
);
bool
addCallback
(
QObject
*
,
const
char
*
,
Qt
::
ConnectionType
type
=
Qt
::
AutoConnection
);
signals:
void
floatChanged
(
float
);
...
...
@@ -103,6 +111,8 @@ private:
public:
QVLCString
(
vlc_object_t
*
,
const
char
*
,
bool
inherit
=
false
);
bool
addCallback
(
QObject
*
,
const
char
*
,
Qt
::
ConnectionType
type
=
Qt
::
AutoConnection
);
signals:
void
stringChanged
(
QString
);
...
...
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