Frapper
1.0a
Main Page
Namespaces
Classes
Files
File List
File Members
plugins
panels
PainterPanel
PainterPanelListItem.h
Go to the documentation of this file.
1
/*
2
-----------------------------------------------------------------------------
3
This source file is part of FRAPPER
4
research.animationsinstitut.de
5
sourceforge.net/projects/frapper
6
7
Copyright (c) 2008-2012 Filmakademie Baden-Wuerttemberg, Institute of Animation
8
9
This program is free software; you can redistribute it and/or modify it under
10
the terms of the GNU Lesser General Public License as published by the Free Software
11
Foundation; version 2.1 of the License.
12
13
This program is distributed in the hope that it will be useful, but WITHOUT
14
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17
You should have received a copy of the GNU Lesser General Public License along with
18
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19
Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
21
-----------------------------------------------------------------------------
22
*/
23
32
33
#ifndef PAINTERPANELLISTITEM_H
34
#define PAINTERPANELLISTITEM_H
35
36
#include "
FrapperPrerequisites.h
"
37
38
#include "
Parameter.h
"
39
#include "
PainterGraphicsScene.h
"
40
41
42
#include <QListWidget>
43
#include <QListWidgetItem>
44
45
namespace
PainterPanel {
46
using namespace
Frapper;
47
48
49
/************************************************************************/
50
/* PainterPanelImageListItemData */
51
/************************************************************************/
52
53
class
PainterPanelImageListItemData
54
{
55
56
public
:
57
PainterPanelImageListItemData
(
Parameter
* parameter,
PainterGraphicsScene
* scene) :
58
m_parameter(parameter),
59
m_scene(scene)
60
{};
61
62
public
:
// data
63
65
Parameter
*m_parameter;
66
68
PainterGraphicsScene
*
m_scene
;
69
70
};
//PainterPanelImageListItem
71
72
73
74
/************************************************************************/
75
/* PainterPanelImageListItem */
76
/************************************************************************/
77
78
class
PainterPanelImageListItem
:
public
QListWidgetItem
79
{
80
81
public
:
// constructors and destructors
82
84
PainterPanelImageListItem
(
PainterPanelImageListItemData
* data, QListWidget * parent = 0,
int
type = UserType ) :
85
QListWidgetItem(
"invalid parameter!"
, parent, type ),
86
m_data( data)
87
{
88
if
( data && data->
m_parameter
)
89
setText(data->
m_parameter
->
getName
());
90
};
91
93
~
PainterPanelImageListItem
()
94
{};
95
97
Parameter
*
getParameter
()
const
{
return
m_data->m_parameter; }
98
100
void
setParameter
(
Parameter
*val) { m_data->m_parameter = val; }
101
103
PainterGraphicsScene
*
getScene
() {
return
m_data->m_scene; }
104
105
private
:
// data
106
108
PainterPanelImageListItemData
*
m_data
;
109
110
};
//PainterPanelImageListItem
111
112
113
114
/************************************************************************/
115
/* PainterPanelHistoryListItem */
116
/************************************************************************/
117
118
class
PainterPanelHistoryListItem
:
public
QListWidgetItem
119
{
120
121
public
:
// constructors and destructors
122
124
PainterPanelHistoryListItem
(
BaseShapeItem
* item, QListWidget * parent = 0,
int
type = UserType ) :
125
QListWidgetItem( parent, type ), m_item( item)
126
{
127
if
( item) setText( item->
getDescriptionText
());
128
};
129
131
BaseShapeItem
*
getItem
()
const
{
return
m_item; }
132
134
void
Item
(
BaseShapeItem
* val) { m_item = val; }
135
136
private
:
// data
138
BaseShapeItem
*
m_item
;
139
140
};
//PainterPanelHistoryListItem
141
142
}
// end namespace Frapper
143
144
#endif
Generated on Tue Sep 18 2012 11:43:03 for Frapper by
1.8.2