Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
luyikei
VLMC
Commits
5492f2ad
Commit
5492f2ad
authored
Apr 24, 2009
by
Ludovic Fauvet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support of the Type field for QGraphicsItems
This enables the use of qgraphicsitem_cast()
parent
8bffbf86
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
src/gui/AbstractGraphicsMediaItem.h
src/gui/AbstractGraphicsMediaItem.h
+3
-0
src/gui/GraphicsMovieItem.h
src/gui/GraphicsMovieItem.h
+2
-0
No files found.
src/gui/AbstractGraphicsMediaItem.h
View file @
5492f2ad
...
...
@@ -35,6 +35,9 @@ public:
AbstractGraphicsMediaItem
();
virtual
~
AbstractGraphicsMediaItem
()
{
}
/// Return the Type of the MediaItem (see http://doc.trolltech.com/4.5/qgraphicsitem.html#type)
virtual
int
type
()
const
=
0
;
/// The item length can be expanded or shrinked by the user.
virtual
bool
expandable
()
const
=
0
;
...
...
src/gui/GraphicsMovieItem.h
View file @
5492f2ad
...
...
@@ -31,9 +31,11 @@ class GraphicsMovieItem : public AbstractGraphicsMediaItem
{
Q_OBJECT
public:
enum
{
Type
=
UserType
+
1
};
GraphicsMovieItem
(
Media
*
media
);
virtual
~
GraphicsMovieItem
();
virtual
int
type
()
const
{
return
Type
;
}
virtual
bool
expandable
()
const
{
return
false
;
}
virtual
bool
moveable
()
const
{
return
true
;
}
virtual
const
QUuid
&
uuid
()
const
{
return
m_media
->
getUuid
();
}
...
...
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