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
c07eff52
Commit
c07eff52
authored
Jan 25, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: create new classes for IconView
parent
251ae55f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
0 deletions
+104
-0
modules/gui/qt4/Modules.am
modules/gui/qt4/Modules.am
+3
-0
modules/gui/qt4/components/playlist/icon_view.cpp
modules/gui/qt4/components/playlist/icon_view.cpp
+48
-0
modules/gui/qt4/components/playlist/icon_view.hpp
modules/gui/qt4/components/playlist/icon_view.hpp
+53
-0
No files found.
modules/gui/qt4/Modules.am
View file @
c07eff52
...
...
@@ -52,6 +52,7 @@ nodist_SOURCES_qt4 = \
components/interface_widgets.moc.cpp \
components/controller.moc.cpp \
components/controller_widget.moc.cpp \
components/playlist/icon_view.moc.cpp \
components/playlist/playlist_model.moc.cpp \
components/playlist/playlist.moc.cpp \
components/playlist/standardpanel.moc.cpp \
...
...
@@ -244,6 +245,7 @@ SOURCES_qt4 = qt4.cpp \
components/interface_widgets.cpp \
components/controller.cpp \
components/controller_widget.cpp \
components/playlist/icon_view.cpp \
components/playlist/playlist_model.cpp \
components/playlist/playlist_item.cpp \
components/playlist/standardpanel.cpp \
...
...
@@ -294,6 +296,7 @@ noinst_HEADERS = \
components/interface_widgets.hpp \
components/controller.hpp \
components/controller_widget.hpp \
components/playlist/icon_view.hpp \
components/playlist/playlist_model.hpp \
components/playlist/playlist_item.hpp \
components/playlist/standardpanel.hpp \
...
...
modules/gui/qt4/components/playlist/icon_view.cpp
0 → 100644
View file @
c07eff52
/*****************************************************************************
* icon_view.cpp : Icon view for the Playlist
****************************************************************************
* Copyright © 2010 the VideoLAN team
* $Id$
*
* Authors: Jean-Baptiste Kempf <jb@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.
*****************************************************************************/
#include "components/playlist/icon_view.hpp"
#include "components/playlist/playlist_model.hpp"
#include <QPainter>
void
PlListViewItemDelegate
::
paint
(
QPainter
*
painter
,
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
{
}
QSize
PlListViewItemDelegate
::
sizeHint
(
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
{
return
QSize
(
100
,
100
);
}
PlIconView
::
PlIconView
(
PLModel
*
model
,
QWidget
*
parent
)
:
QListView
(
parent
)
{
setModel
(
model
);
setViewMode
(
QListView
::
IconMode
);
setMovement
(
QListView
::
Snap
);
PlListViewItemDelegate
*
pl
=
new
PlListViewItemDelegate
();
setItemDelegate
(
pl
);
}
modules/gui/qt4/components/playlist/icon_view.hpp
0 → 100644
View file @
c07eff52
/*****************************************************************************
* icon_view.hpp : Icon view for the Playlist
****************************************************************************
* Copyright © 2010 the VideoLAN team
* $Id$
*
* Authors: Jean-Baptiste Kempf <jb@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 _ICON_VIEW_H_
#define _ICON_VIEW_H_
#include <QStyledItemDelegate>
#include <QListView>
class
QPainter
;
class
PLModel
;
class
PlListViewItemDelegate
:
public
QStyledItemDelegate
{
Q_OBJECT
public:
PlListViewItemDelegate
(
QWidget
*
parent
=
0
)
:
QStyledItemDelegate
(
parent
)
{}
void
paint
(
QPainter
*
painter
,
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
;
QSize
sizeHint
(
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
;
};
class
PlIconView
:
public
QListView
{
Q_OBJECT
public:
PlIconView
(
PLModel
*
model
,
QWidget
*
parent
=
0
);
};
#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