1
#ifndef oxygenmenu_datah
2
#define oxygenmenu_datah
4
//////////////////////////////////////////////////////////////////////////////
6
// data container for QMenu animations
9
// Copyright (c) 2009 Hugo Pereira Da Costa <hugo@oxygen-icons.org>
11
// Permission is hereby granted, free of charge, to any person obtaining a copy
12
// of this software and associated documentation files (the "Software"), to
13
// deal in the Software without restriction, including without limitation the
14
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15
// sell copies of the Software, and to permit persons to whom the Software is
16
// furnished to do so, subject to the following conditions:
18
// The above copyright notice and this permission notice shall be included in
19
// all copies or substantial portions of the Software.
21
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
28
//////////////////////////////////////////////////////////////////////////////
30
#include "oxygenmenubardata.h"
31
#include <QtGui/QMenu>
38
most members are identical to menubar data. The one that are not are
39
using templatized versions, because QMenuBar and QMenu API are very similar
41
class MenuDataV1: public MenuBarDataV1
49
MenuDataV1( QObject* parent, QWidget* target, int duration ):
50
MenuBarDataV1( parent, target, duration )
54
virtual ~MenuDataV1( void )
59
//! menubar enterEvent
60
virtual void enterEvent( const QObject* object )
61
{ MenuBarDataV1::enterEvent<QMenu>( object ); }
63
//! menubar enterEvent
64
virtual void leaveEvent( const QObject* object )
65
{ MenuBarDataV1::leaveEvent<QMenu>( object ); }
67
//! menubar mouseMoveEvent
68
virtual void mouseMoveEvent( const QObject* object )
69
{ MenuBarDataV1::mouseMoveEvent<QMenu>( object ); }
71
//! menubar mousePressEvent
72
virtual void mousePressEvent( const QObject* object )
73
{ MenuBarDataV1::mousePressEvent<QMenu>( object ); }
79
most members are identical to menubar data. The one that are not are
80
using templatized versions, because QMenuBar and QMenu API are very similar
82
class MenuDataV2: public MenuBarDataV2
89
MenuDataV2( QObject* parent, QWidget* target, int duration ):
90
MenuBarDataV2( parent, target, duration )
91
{ setEntered( false ); }
94
virtual ~MenuDataV2( void )
99
//! menubar enterEvent
100
virtual void enterEvent( const QObject* object )
101
{ MenuBarDataV2::enterEvent<QMenu>( object ); }
103
//! menubar enterEvent
104
virtual void leaveEvent( const QObject* object )
105
{ MenuBarDataV2::leaveEvent<QMenu>( object ); }
107
//! menubar mouseMoveEvent
108
virtual void mouseMoveEvent( const QObject* object )
109
{ MenuBarDataV2::mouseMoveEvent<QMenu>( object ); }