]> SALOME platform Git repositories - modules/yacs.git/blob - src/genericgui/ItemMimeData.cxx
Salome HOME
mergefrom branch BR_V511_PR tag mergeto_trunk_03feb09
[modules/yacs.git] / src / genericgui / ItemMimeData.cxx
1 //  Copyright (C) 2006-2008  CEA/DEN, EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #include "ItemMimeData.hxx"
20 #include "guiObservers.hxx"
21 #include "Catalog.hxx"
22
23 //#define _DEVDEBUG_
24 #include "YacsTrace.hxx"
25
26 using namespace std;
27 using namespace YACS::ENGINE;
28 using namespace YACS::HMI;
29
30 ItemMimeData::ItemMimeData(): QMimeData()
31 {
32   _sub = 0;
33   _catalog = 0;
34   _cataName.clear();
35   _compoName.clear();
36   _typeName.clear();
37   _swCase=0;
38 }
39
40 ItemMimeData::~ItemMimeData()
41 {
42 }
43
44 void ItemMimeData::setSubject(Subject *sub)
45 {
46   _sub = sub;
47 }
48
49 void ItemMimeData::setCatalog(YACS::ENGINE::Catalog *cata)
50 {
51   _catalog = cata;
52 }
53
54 void ItemMimeData::setCataName(std::string cataName)
55 {
56   _cataName = cataName;
57 }
58
59 void ItemMimeData::setCompo(std::string compo)
60 {
61   _compoName = compo;
62 }
63
64 void ItemMimeData::setType(std::string aType)
65 {
66   _typeName = aType;
67 }
68
69 void ItemMimeData::setCase(int aCase)
70 {
71   _swCase = aCase;
72 }
73
74 Subject* ItemMimeData::getSubject() const
75 {
76   return _sub;
77 }
78
79 YACS::ENGINE::Catalog* ItemMimeData::getCatalog() const
80 {
81   return _catalog;
82 }
83
84 std::string ItemMimeData::getCataName() const
85 {
86   return _cataName;
87 }
88
89 std::string ItemMimeData::getCompo() const
90 {
91   return _compoName;
92 }
93
94 std::string ItemMimeData::getType() const
95 {
96   return _typeName;
97 }
98
99 int ItemMimeData::getCase() const
100 {
101   return _swCase;
102 }