kwave
18.07.70
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
f
h
i
l
m
o
p
r
s
t
u
w
y
z
Functions
Typedefs
Enumerations
+
Enumerator
a
b
c
f
i
l
o
p
r
s
u
w
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
+
Variables
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
x
y
z
Typedefs
Enumerations
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
i
l
m
p
q
r
s
t
x
z
Variables
Typedefs
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
MenuList.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
MenuList.cpp - placeholder for a list of menu entries
3
-------------------
4
begin : Wed Dec 03 2014
5
copyright : (C) 2014 by Thomas Eschenbacher
6
email : Thomas.Eschenbacher@gmx.de
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#include "config.h"
19
20
#include "
libkwave/String.h
"
21
22
#include "
libgui/MenuList.h
"
23
24
//*****************************************************************************
25
Kwave::MenuList::MenuList
(
Kwave::MenuNode
*parent,
26
const
QString &command,
27
const
QString &uid)
28
:
MenuNode
(parent,
_
(
"LISTENTRY["
) + uid +
_
(
"]"
), command, 0, uid)
29
{
30
/* NOTE: the "name" of this node is the uid of the list entries */
31
}
32
33
//*****************************************************************************
34
Kwave::MenuList::~MenuList
()
35
{
36
}
37
38
//*****************************************************************************
39
void
Kwave::MenuList::clear
()
40
{
41
Kwave::MenuNode
*parent =
parentNode
();
42
Q_ASSERT(parent);
43
if
(!parent)
return
;
44
45
QString list_uid =
name
();
46
Kwave::MenuNode
*child;
47
while
((child = parent->
findUID
(list_uid)) != Q_NULLPTR)
48
parent->
removeChild
(child);
49
}
50
51
//*****************************************************************************
52
Kwave::MenuNode
*
Kwave::MenuList::insertLeaf
(
const
QString &
name
,
53
const
QString &
command
,
54
const
QKeySequence &
shortcut
,
55
const
QString &
uid
)
56
{
57
Q_UNUSED(uid);
58
59
Kwave::MenuNode
*parent =
parentNode
();
60
Q_ASSERT(parent);
61
QString list_uid = this->
name
();
62
return
(parent) ?
63
parent->
insertLeaf
(name, command, shortcut, list_uid) : Q_NULLPTR;
64
}
65
66
//*****************************************************************************
67
//*****************************************************************************
Kwave::MenuNode::parentNode
virtual Kwave::MenuNode * parentNode() const
Definition:
MenuNode.cpp:103
Kwave::MenuNode
Definition:
MenuNode.h:43
Kwave::MenuList::~MenuList
virtual ~MenuList() Q_DECL_OVERRIDE
Definition:
MenuList.cpp:34
Kwave::MenuNode::findUID
Kwave::MenuNode * findUID(const QString &uid)
Definition:
MenuNode.cpp:198
Kwave::MenuNode::shortcut
const QKeySequence & shortcut() const
Definition:
MenuNode.h:95
Kwave::MenuNode::removeChild
virtual void removeChild(Kwave::MenuNode *child)
Definition:
MenuNode.cpp:223
Kwave::MenuList::clear
virtual void clear() Q_DECL_OVERRIDE
Definition:
MenuList.cpp:39
Kwave::MenuNode::name
const QString & name() const
Definition:
MenuNode.h:74
Kwave::MenuNode::command
const QString & command() const
Definition:
MenuNode.h:77
Kwave::MenuList::MenuList
MenuList(Kwave::MenuNode *parent, const QString &command, const QString &uid)
Definition:
MenuList.cpp:25
_
#define _(m)
Definition:
memcpy.c:66
Kwave::MenuNode::uid
const QString & uid() const
Definition:
MenuNode.h:85
MenuList.h
Kwave::MenuNode::insertLeaf
virtual Kwave::MenuNode * insertLeaf(const QString &name, const QString &command, const QKeySequence &shortcut, const QString &uid)
Definition:
MenuNode.cpp:243
String.h
Kwave::MenuList::insertLeaf
virtual Kwave::MenuNode * insertLeaf(const QString &name, const QString &command, const QKeySequence &shortcut, const QString &uid) Q_DECL_OVERRIDE
Definition:
MenuList.cpp:52
libgui
MenuList.cpp
Generated on Sat Mar 24 2018 09:10:24 for kwave by
1.8.13