Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
f2851a7b
Commit
f2851a7b
authored
Dec 28, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: Move code around and simplify the inclusion of headers.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
d525a353
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
96 deletions
+58
-96
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.cpp
+8
-11
modules/gui/qt4/components/controller.hpp
modules/gui/qt4/components/controller.hpp
+8
-12
modules/gui/qt4/components/controller_widget.cpp
modules/gui/qt4/components/controller_widget.cpp
+19
-24
modules/gui/qt4/components/controller_widget.hpp
modules/gui/qt4/components/controller_widget.hpp
+19
-23
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+0
-12
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+2
-14
modules/gui/qt4/dialogs/toolbar.hpp
modules/gui/qt4/dialogs/toolbar.hpp
+2
-0
No files found.
modules/gui/qt4/components/controller.cpp
View file @
f2851a7b
...
@@ -31,23 +31,19 @@
...
@@ -31,23 +31,19 @@
#include <vlc_vout.h>
#include <vlc_vout.h>
#include <vlc_keys.h>
#include <vlc_keys.h>
#include "dialogs_provider.hpp"
#include "components/controller.hpp"
#include "components/controller_widget.hpp"
#include "components/interface_widgets.hpp"
#include "components/interface_widgets.hpp"
#include "main_interface.hpp"
#include "dialogs_provider.hpp"
#include "input_manager.hpp"
#include "input_manager.hpp"
#include "menus.hpp"
#include "util/input_slider.hpp"
#include "util/customwidgets.hpp"
#include <QLabel>
#include "util/input_slider.hpp"
/* InputSlider */
#include "util/customwidgets.hpp"
/* qEventToKey */
#include <QSpacerItem>
#include <QSpacerItem>
#include <QCursor>
#include <QToolButton>
#include <QToolButton>
#include <QHBoxLayout>
#include <QHBoxLayout>
#include <QMenu>
#include <QPalette>
#include <QResizeEvent>
#include <QDate>
#include <QSignalMapper>
#include <QSignalMapper>
#include <QTimer>
#include <QTimer>
...
@@ -689,6 +685,7 @@ void AbstractController::frame()
...
@@ -689,6 +685,7 @@ void AbstractController::frame()
if
(
p_input
)
if
(
p_input
)
var_SetVoid
(
p_input
,
"frame-next"
);
var_SetVoid
(
p_input
,
"frame-next"
);
}
}
#include <QHBoxLayout>
#include <QHBoxLayout>
/*****************************
/*****************************
* DA Control Widget !
* DA Control Widget !
...
...
modules/gui/qt4/components/controller.hpp
View file @
f2851a7b
...
@@ -30,33 +30,29 @@
...
@@ -30,33 +30,29 @@
# include "config.h"
# include "config.h"
#endif
#endif
#include <vlc_common.h>
#include <vlc_interface.h>
#include "qt4.hpp"
#include "qt4.hpp"
#include "main_interface.hpp"
#include "input_manager.hpp"
#include <QWidget>
#include <QFrame>
#include <QFrame>
#include <Q
ToolButton
>
#include <Q
String
>
#define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")
#define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")
class
QPixmap
;
class
QPixmap
;
class
QLabel
;
class
QLabel
;
class
QGridLayout
;
class
QGridLayout
;
class
QHBoxLayout
;
class
QBoxLayout
;
class
InputSlider
;
class
QAbstractSlider
;
class
QAbstractSlider
;
class
QAbstractButton
;
class
QAbstractButton
;
class
InputSlider
;
class
VolumeClickHandler
;
class
VolumeClickHandler
;
class
QSignalMapper
;
class
WidgetListing
;
class
QSignalMapper
;
class
QTimer
;
class
QTimer
;
class
WidgetListing
;
typedef
enum
buttonType_e
typedef
enum
buttonType_e
{
{
...
@@ -94,7 +90,6 @@ typedef enum buttonType_e
...
@@ -94,7 +90,6 @@ typedef enum buttonType_e
WIDGET_MAX
,
WIDGET_MAX
,
}
buttonType_e
;
}
buttonType_e
;
#include <QString>
static
const
QString
nameL
[
BUTTON_MAX
]
=
{
"Play"
,
"Stop"
,
"Open"
,
static
const
QString
nameL
[
BUTTON_MAX
]
=
{
"Play"
,
"Stop"
,
"Open"
,
"Previous"
,
"Next"
,
"Slower"
,
"Faster"
,
"Fullscreen"
,
"De-Fullscreen"
,
"Previous"
,
"Next"
,
"Slower"
,
"Faster"
,
"Fullscreen"
,
"De-Fullscreen"
,
...
@@ -142,6 +137,7 @@ enum
...
@@ -142,6 +137,7 @@ enum
WIDGET_SHINY
=
0x4
,
WIDGET_SHINY
=
0x4
,
};
};
class
AdvControlsWidget
;
class
AbstractController
:
public
QFrame
class
AbstractController
:
public
QFrame
{
{
friend
class
WidgetListing
;
/* For ToolBar Edition HACKS */
friend
class
WidgetListing
;
/* For ToolBar Edition HACKS */
...
...
modules/gui/qt4/components/controller_widget.cpp
View file @
f2851a7b
...
@@ -4,10 +4,7 @@
...
@@ -4,10 +4,7 @@
* Copyright ( C ) 2006-2008 the VideoLAN team
* Copyright ( C ) 2006-2008 the VideoLAN team
* $Id$
* $Id$
*
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Authors: Jean-Baptiste Kempf <jb@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
* Rafaël Carré <funman@videolanorg>
* Ilkka Ollakka <ileoo@videolan.org>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -28,31 +25,16 @@
...
@@ -28,31 +25,16 @@
# include "config.h"
# include "config.h"
#endif
#endif
//#include <vlc_vout.h>
//#include <vlc_keys.h>
#include "controller_widget.hpp"
#include "controller_widget.hpp"
#include "dialogs_provider.hpp"
#include "input_manager.hpp"
/* Get notification of Volume Change */
#include "components/interface_widgets.hpp"
#include "util/input_slider.hpp"
/* SoundSlider */
#include "main_interface.hpp"
#include "input_manager.hpp"
#include <vlc_aout.h>
/* Volume functions */
#include "menus.hpp"
#include "util/input_slider.hpp"
#include "util/customwidgets.hpp"
#include <QLabel>
#include <QLabel>
#include <QSpacerItem>
#include <QCursor>
#include <QToolButton>
#include <QHBoxLayout>
#include <QHBoxLayout>
#include <QMenu>
#include <QSpinBox>
#include <QPalette>
#include <QResizeEvent>
#include <QDate>
#include <QSignalMapper>
#include <QTimer>
SoundWidget
::
SoundWidget
(
QWidget
*
_parent
,
intf_thread_t
*
_p_intf
,
SoundWidget
::
SoundWidget
(
QWidget
*
_parent
,
intf_thread_t
*
_p_intf
,
bool
b_shiny
)
bool
b_shiny
)
...
@@ -175,3 +157,16 @@ void AtoB_Button::setIcons( bool timeA, bool timeB )
...
@@ -175,3 +157,16 @@ void AtoB_Button::setIcons( bool timeA, bool timeB )
}
}
}
}
bool
VolumeClickHandler
::
eventFilter
(
QObject
*
obj
,
QEvent
*
e
)
{
if
(
e
->
type
()
==
QEvent
::
MouseButtonPress
)
{
aout_VolumeMute
(
p_intf
,
NULL
);
audio_volume_t
i_volume
;
aout_VolumeGet
(
p_intf
,
&
i_volume
);
// m->updateVolume( i_volume * VOLUME_MAX / (AOUT_VOLUME_MAX/2) );
return
true
;
}
return
false
;
}
modules/gui/qt4/components/controller_widget.hpp
View file @
f2851a7b
/*****************************************************************************
/*****************************************************************************
*
interface_widgets.hpp : Custom widgets for the main interface
*
Controller_widget.cpp : Controller Widget for the controllers
****************************************************************************
****************************************************************************
* Copyright (C) 2006 the VideoLAN team
* Copyright (C) 2006
-2008
the VideoLAN team
* $Id$
* $Id$
*
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Authors: Jean-Baptiste Kempf <jb@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
* Rafaël Carré <funman@videolanorg>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -30,34 +28,17 @@
...
@@ -30,34 +28,17 @@
# include "config.h"
# include "config.h"
#endif
#endif
#include <vlc_common.h>
#include <vlc_interface.h>
#include "qt4.hpp"
#include "qt4.hpp"
#include "main_interface.hpp"
#include "input_manager.hpp"
#include <QWidget>
#include <QWidget>
#include <QFrame>
#include <QToolButton>
#include <QToolButton>
#define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")
#define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")
class
QPixmap
;
class
QLabel
;
class
QLabel
;
class
QGridLayout
;
class
QSpinBox
;
class
InputSlider
;
class
QAbstractSlider
;
class
QAbstractSlider
;
class
QAbstractButton
;
class
VolumeClickHandler
;
class
QSignalMapper
;
class
QTimer
;
class
WidgetListing
;
/**
/**
* SPECIAL Widgets that are a bit more than just a ToolButton
* SPECIAL Widgets that are a bit more than just a ToolButton
* and have an icon/behaviour that changes depending on the context:
* and have an icon/behaviour that changes depending on the context:
...
@@ -93,6 +74,9 @@ private slots:
...
@@ -93,6 +74,9 @@ private slots:
void
toggleTeletextTransparency
(
bool
);
void
toggleTeletextTransparency
(
bool
);
};
};
#define VOLUME_MAX 200
class
VolumeClickHandler
;
class
SoundWidget
:
public
QWidget
class
SoundWidget
:
public
QWidget
{
{
Q_OBJECT
Q_OBJECT
...
@@ -113,4 +97,16 @@ protected slots:
...
@@ -113,4 +97,16 @@ protected slots:
void
updateVolume
(
void
);
void
updateVolume
(
void
);
};
};
class
VolumeClickHandler
:
public
QObject
{
public:
VolumeClickHandler
(
intf_thread_t
*
_p_intf
,
SoundWidget
*
_m
)
:
QObject
(
_m
)
{
m
=
_m
;
p_intf
=
_p_intf
;
}
virtual
~
VolumeClickHandler
()
{};
virtual
bool
eventFilter
(
QObject
*
obj
,
QEvent
*
e
);
private:
SoundWidget
*
m
;
intf_thread_t
*
p_intf
;
};
#endif
#endif
modules/gui/qt4/components/interface_widgets.cpp
View file @
f2851a7b
...
@@ -521,16 +521,4 @@ void TimeLabel::setStatus( int i_status )
...
@@ -521,16 +521,4 @@ void TimeLabel::setStatus( int i_status )
setText
(
"Buffering"
);
setText
(
"Buffering"
);
}
}
bool
VolumeClickHandler
::
eventFilter
(
QObject
*
obj
,
QEvent
*
e
)
{
if
(
e
->
type
()
==
QEvent
::
MouseButtonPress
)
{
aout_VolumeMute
(
p_intf
,
NULL
);
audio_volume_t
i_volume
;
aout_VolumeGet
(
p_intf
,
&
i_volume
);
// m->updateVolume( i_volume * VOLUME_MAX / (AOUT_VOLUME_MAX/2) );
return
true
;
}
return
false
;
}
modules/gui/qt4/components/interface_widgets.hpp
View file @
f2851a7b
...
@@ -32,10 +32,11 @@
...
@@ -32,10 +32,11 @@
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_interface.h>
#include <vlc_interface.h>
#include <vlc_aout.h>
//#include <vlc_aout.h> Visualizer
#include "qt4.hpp"
#include "qt4.hpp"
#include "main_interface.hpp"
#include "main_interface.hpp"
#include "input_manager.hpp"
#include "components/controller.hpp"
#include "components/controller.hpp"
#include "components/controller_widget.hpp"
#include "components/controller_widget.hpp"
...
@@ -124,19 +125,6 @@ private slots:
...
@@ -124,19 +125,6 @@ private slots:
};
};
#endif
#endif
#define VOLUME_MAX 200
class
VolumeClickHandler
:
public
QObject
{
public:
VolumeClickHandler
(
intf_thread_t
*
_p_intf
,
SoundWidget
*
_m
)
:
QObject
(
_m
)
{
m
=
_m
;
p_intf
=
_p_intf
;
}
virtual
~
VolumeClickHandler
()
{};
virtual
bool
eventFilter
(
QObject
*
obj
,
QEvent
*
e
);
private:
SoundWidget
*
m
;
intf_thread_t
*
p_intf
;
};
class
TimeLabel
:
public
QLabel
class
TimeLabel
:
public
QLabel
{
{
Q_OBJECT
Q_OBJECT
...
...
modules/gui/qt4/dialogs/toolbar.hpp
View file @
f2851a7b
...
@@ -29,9 +29,11 @@
...
@@ -29,9 +29,11 @@
#include <QRubberBand>
#include <QRubberBand>
#include <QListWidget>
#include <QListWidget>
#include <QCheckBox>
class
ToolbarEditDialog
;
class
ToolbarEditDialog
;
class
DroppingController
;
class
DroppingController
;
class
QCheckBox
;
class
WidgetListing
:
public
QListWidget
class
WidgetListing
:
public
QListWidget
{
{
...
...
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