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
06825f81
Commit
06825f81
authored
Dec 09, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Qt] Menu integration.
parent
1dbee658
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
0 deletions
+100
-0
modules/gui/qt4/dialogs/toolbar.hpp
modules/gui/qt4/dialogs/toolbar.hpp
+91
-0
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+6
-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
+2
-0
No files found.
modules/gui/qt4/dialogs/toolbar.hpp
0 → 100644
View file @
06825f81
/*****************************************************************************
* ToolbarEdit.hpp : ToolbarEdit dialogs
****************************************************************************
* Copyright (C) 2007 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 _TOOLBAREDIT_DIALOG_H_
#define _TOOLBAREDIT_DIALOG_H_
#include "util/qvlcframe.hpp"
#include "components/controller.hpp"
#include <QRubberBand>
#include <QListWidget>
class
ToolbarEditDialog
;
class
WidgetListing
:
public
QListWidget
{
Q_OBJECT
;
public:
WidgetListing
(
intf_thread_t
*
,
QWidget
*
_parent
=
0
);
protected:
virtual
void
startDrag
(
Qt
::
DropActions
/*supportedActions*/
);
private:
ToolbarEditDialog
*
parent
;
};
class
ToolbarEditDialog
:
public
QVLCFrame
{
Q_OBJECT
;
public:
static
ToolbarEditDialog
*
getInstance
(
intf_thread_t
*
p_intf
)
{
if
(
!
instance
)
instance
=
new
ToolbarEditDialog
(
p_intf
);
return
instance
;
}
virtual
~
ToolbarEditDialog
();
int
getOptions
()
{
return
flatBox
->
isChecked
()
*
WIDGET_FLAT
+
bigBox
->
isChecked
()
*
WIDGET_BIG
;
}
private:
ToolbarEditDialog
(
intf_thread_t
*
);
static
ToolbarEditDialog
*
instance
;
QCheckBox
*
flatBox
,
*
bigBox
,
*
shinyBox
;
WidgetListing
*
widgetListing
;
};
class
DroppingController
:
public
AbstractController
{
Q_OBJECT
;
public:
DroppingController
(
intf_thread_t
*
);
protected:
virtual
void
createAndAddWidget
(
QBoxLayout
*
controlLayout
,
int
i_index
,
buttonType_e
i_type
,
int
i_option
);
virtual
void
dragEnterEvent
(
QDragEnterEvent
*
event
);
virtual
void
dragMoveEvent
(
QDragMoveEvent
*
event
);
virtual
void
dropEvent
(
QDropEvent
*
event
);
virtual
void
dragLeaveEvent
(
QDragLeaveEvent
*
event
);
virtual
void
doAction
(
int
);
private:
QRubberBand
*
rubberband
;
int
getParentPosInLayout
(
QPoint
point
);
};
#endif
modules/gui/qt4/dialogs_provider.cpp
View file @
06825f81
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
#include "dialogs/help.hpp"
#include "dialogs/help.hpp"
#include "dialogs/gototime.hpp"
#include "dialogs/gototime.hpp"
#include "dialogs/podcast_configuration.hpp"
#include "dialogs/podcast_configuration.hpp"
#include "dialogs/toolbar.hpp"
#include <QEvent>
#include <QEvent>
#include <QApplication>
#include <QApplication>
...
@@ -238,6 +239,11 @@ void DialogsProvider::podcastConfigureDialog()
...
@@ -238,6 +239,11 @@ void DialogsProvider::podcastConfigureDialog()
PodcastConfigDialog
::
getInstance
(
p_intf
)
->
toggleVisible
();
PodcastConfigDialog
::
getInstance
(
p_intf
)
->
toggleVisible
();
}
}
void
DialogsProvider
::
toolbarDialog
()
{
ToolbarEditDialog
::
getInstance
(
p_intf
)
->
toggleVisible
();
}
/* Generic open file */
/* Generic open file */
void
DialogsProvider
::
openFileGenericDialog
(
intf_dialog_args_t
*
p_arg
)
void
DialogsProvider
::
openFileGenericDialog
(
intf_dialog_args_t
*
p_arg
)
{
{
...
...
modules/gui/qt4/dialogs_provider.hpp
View file @
06825f81
...
@@ -148,6 +148,7 @@ public slots:
...
@@ -148,6 +148,7 @@ public slots:
void
aboutDialog
();
void
aboutDialog
();
void
gotoTimeDialog
();
void
gotoTimeDialog
();
void
podcastConfigureDialog
();
void
podcastConfigureDialog
();
void
toolbarDialog
();
void
openFileGenericDialog
(
intf_dialog_args_t
*
);
void
openFileGenericDialog
(
intf_dialog_args_t
*
);
...
...
modules/gui/qt4/menus.cpp
View file @
06825f81
...
@@ -362,6 +362,8 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf )
...
@@ -362,6 +362,8 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf )
#endif
#endif
menu
->
addSeparator
();
menu
->
addSeparator
();
addDPStaticEntry
(
menu
,
qtr
(
"&Customize Interface..."
),
""
,
":/preferences"
,
SLOT
(
toolbarDialog
()
),
""
);
addDPStaticEntry
(
menu
,
qtr
(
"&Preferences..."
),
""
,
addDPStaticEntry
(
menu
,
qtr
(
"&Preferences..."
),
""
,
":/preferences"
,
SLOT
(
prefsDialog
()
),
"Ctrl+P"
);
":/preferences"
,
SLOT
(
prefsDialog
()
),
"Ctrl+P"
);
...
...
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