libqutim
0.3.2.0
Main Page
Related Pages
Namespaces
Classes
Globals
Globals
File List
widgetactiongenerator.h
Go to the documentation of this file.
1
/****************************************************************************
2
**
3
** qutIM - instant messenger
4
**
5
** Copyright © 2011 Ruslan Nigmatullin <euroelessar@yandex.ru>
6
**
7
*****************************************************************************
8
**
9
** $QUTIM_BEGIN_LICENSE$
10
** This program is free software: you can redistribute it and/or modify
11
** it under the terms of the GNU General Public License as published by
12
** the Free Software Foundation, either version 3 of the License, or
13
** (at your option) any later version.
14
**
15
** This program is distributed in the hope that it will be useful,
16
** but WITHOUT ANY WARRANTY; without even the implied warranty of
17
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
** See the GNU General Public License for more details.
19
**
20
** You should have received a copy of the GNU General Public License
21
** along with this program. If not, see http://www.gnu.org/licenses/.
22
** $QUTIM_END_LICENSE$
23
**
24
****************************************************************************/
25
26
#ifndef WIDGETACTIONGENERATOR_H
27
#define WIDGETACTIONGENERATOR_H
28
29
#include "
actiontoolbar.h
"
30
#include <QWidgetAction>
31
32
namespace
qutim_sdk_0_3
33
{
34
struct
WidgetActionGeneratorPrivate;
35
36
class
LIBQUTIM_EXPORT
WidgetActionGenerator
:
public
ActionGenerator
37
{
38
public
:
39
WidgetActionGenerator
(
const
QIcon &icon,
const
LocalizedString
&text,
const
QObject *receiver,
const
char
*member);
40
virtual
~
WidgetActionGenerator
();
41
42
template
<
typename
T>
43
WidgetActionGenerator
*setWidget()
44
{
return
setWidget
(
new
GeneralGenerator<T>
()); }
45
WidgetActionGenerator
*setWidget(
ObjectGenerator
*gen);
46
WidgetActionGenerator
*addWidgetProperty(
const
QByteArray &name,
const
QVariant &value);
47
protected
:
48
virtual
QObject *generateHelper()
const
;
49
private
:
50
QScopedPointer<WidgetActionGeneratorPrivate> p;
51
};
52
}
53
54
#endif // WIDGETACTIONGENERATOR_H
55
Generated by Doxygen