OSDN Git Service

8f3f6ec10b59668bdcf7090e4db3d880267a24ef
[dennco/denncoCreator.git] / Source / visualizer / component / dcvcaxonterminal.h
1 //  Copyright (c) 2012 Dennco Project
2 //
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // This program 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
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
16 //
17 //  Created by tkawata on Sep-30, 2012.
18 //
19 #ifndef DCVCAXONTERMINAL_H
20 #define DCVCAXONTERMINAL_H
21
22 #include "dcvcomponent.h"
23
24 class DCAxonTerminal;
25
26 class DCVCAxonTerminal : public DCVComponent
27 {
28     DCVComponent*   getAxonComponent() const;
29     DCVComponent*   getReceptorComponent() const;
30
31     DCAxonTerminal *d_owner;
32     bool            d_isRendered;
33
34 public:
35     DCVCAxonTerminal(DCAxonTerminal *owner);
36
37     virtual DCVVisibility   getIsVisible() const;
38     virtual DCVCPage *      getPageBelonging() const;
39     virtual DCCell*         getOwnerCell() const;
40     virtual bool            isResizingArea(float x, float y, float z) const { return false; }
41
42     bool            isMatrixUpdated() const;
43     const float*    getPointMatrix() const;
44     DCAxonTerminal* getOwnerTerminal() const;
45
46     virtual void    prepareChildrenForDraw(bool isAnimationInterval);
47     virtual void    drawChildren(bool isAnimationInterval);
48     virtual void    drawChildrenForSelection(QList<DCVComponent*> *itemList);
49     virtual void    translate();
50     virtual void    renderOwnShape(bool isAnimationInterval, bool renderAsWireframe);
51     virtual void    updateShape() {}
52
53     virtual bool    startDrag(float x, float y, float z, bool isResizingDrag);
54     virtual bool    dragging(float x, float y, float z, bool isResizingDrag);
55     virtual bool    endDrag(float x, float y, float z, bool isResizingDrag);
56
57     virtual void    saveAttributesToXML(QDomDocument *document, QDomElement* element) const {}
58     virtual void    loadAttributesFromXML(QDomElement element) {}
59
60 };
61
62 #endif // DCVCAXONTERMINAL_H