source: smplayer/trunk/src/myactiongroup.h@ 103

Last change on this file since 103 was 93, checked in by Silvan Scherrer, 16 years ago

smplayer: 0.6.9

File size: 2.6 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2010 Ricardo Villalba <[email protected]>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17*/
18
19#ifndef _MYACTIONGROUP_H_
20#define _MYACTIONGROUP_H_
21
22#include <QActionGroup>
23#include <QWidget>
24#include "myaction.h"
25
26class MyActionGroup;
27
28//! This class makes easy to create actions for MyActionGroup
29
30class MyActionGroupItem : public MyAction
31{
32public:
33 //! Creates a new item.
34 /*! \a group is the group where the action will be added, \a data is
35 the ID of the item. If \autoadd is true the action will be added to
36 the parent (if it's a QWidget), so the shortcut could work. */
37 MyActionGroupItem( QObject * parent, MyActionGroup *group,
38 const char * name, int data, bool autoadd = true );
39
40 //! Creates a new item.
41 /*! \a text is the text that the item will have. */
42 MyActionGroupItem( QObject * parent, MyActionGroup *group,
43 const QString & text, const char * name,
44 int data, bool autoadd = true );
45};
46
47class QAction;
48
49//! MyActionGroup makes easier to create exclusive menus based on items
50//! with an integer data.
51
52
53class MyActionGroup : public QActionGroup
54{
55 Q_OBJECT
56
57public:
58 MyActionGroup ( QObject * parent );
59