Developer documentation | Axl-2.5.1
Main Page
Classes
Files
File List
File Members
src
axlCore
axlMenuFactory.cpp
Go to the documentation of this file.
1
/* dtkAbstractProcessFactory.cpp ---
2
*
3
* Author: Julien Wintz
4
* Copyright (C) 2008 - Julien Wintz, Inria.
5
* Created: Fri Nov 7 15:54:10 2008 (+0100)
6
* Version: $Id: 2460ccb9838680880c0ff0a202c702fd0d42c97f $
7
* Last-Updated: mar. févr. 4 15:17:39 2014 (+0100)
8
* By: Nicolas Niclausse
9
* Update #: 125
10
*/
11
12
/* Commentary:
13
*
14
*/
15
16
/* Change log:
17
*
18
*/
19
20
#include "
axlMenuFactory.h
"
21
22
class
axlMenuFactoryPrivate
23
{
24
public
:
25
QList<QMenu *> menus;
26
};
27
28
axlMenuFactory
*
axlMenuFactory::instance
(
void
)
29
{
30
if
(!s_instance)
31
s_instance =
new
axlMenuFactory
;
32
33
return
s_instance;
34
}
35
36
37
QList<QMenu *>
axlMenuFactory::menus
(
void
)
38
{
39
return
d->menus;
40
}
41
42
bool
axlMenuFactory::registerMenu
(QMenu * m)
43
{
44
if
( ! d->menus.contains(m) )
45
{
46
d->menus << m;
47
return
true
;
48
}
49
else
50
return
false
;
51
}
52
53
axlMenuFactory::axlMenuFactory
(
void
) : QObject(), d(new axlMenuFactoryPrivate)
54
{
55
56
}
57
58
axlMenuFactory::~axlMenuFactory
(
void
)
59
{
60
delete
d;
61
62
d = NULL;
63
}
64
65
axlMenuFactory
*axlMenuFactory::s_instance = NULL;
axlMenuFactory::instance
static axlMenuFactory * instance(void)
Definition:
axlMenuFactory.cpp:28
axlMenuFactory::~axlMenuFactory
~axlMenuFactory(void)
Definition:
axlMenuFactory.cpp:58
axlMenuFactory::menus
QList< QMenu * > menus(void)
Definition:
axlMenuFactory.cpp:37
axlMenuFactory
Definition:
axlMenuFactory.h:28
axlMenuFactory::axlMenuFactory
axlMenuFactory(void)
Definition:
axlMenuFactory.cpp:53
axlMenuFactory::registerMenu
bool registerMenu(QMenu *menu)
Definition:
axlMenuFactory.cpp:42
axlMenuFactory.h
Generated on Sun Dec 2 2018 20:28:09 for Axl-2.5.1 by 1.8.9.1