OSDN Git Service

[denncoCreator] implemented rename file functionality
[dennco/denncoCreator.git] / Source / visualizer / component / dcvccellcode.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 DCVCCELLCODE_H
20 #define DCVCCELLCODE_H
21
22 #include "dcvpagecomponent.h"
23
24 class DCCellCode;
25
26 class DCVCCellCode : public DCVPageComponent
27 {
28     DCCellCode *d_owner;
29
30 public:
31     DCVCCellCode(DCCellCode *owner, DCVCPage *page);
32
33     virtual DCCell *    getOwnerCell() const { return NULL; }
34     virtual bool        isResizingArea(float x, float y, float z) const { return false; }
35
36     /**
37      * @brief Change page this cell code belongs.
38      * @param page
39      * @note DCVCPage will call this.
40      * Other classes shouldn't directly call this method.
41      * To move cell to other page, DCMoveCellCodeClassCommand should be used.
42      */
43     DCCellCode*     getOwnerCellCodeClass() const { return d_owner; }
44     virtual void    changePageBelonging(DCVCPage *page);
45     virtual void    prepareChildrenForDraw(bool isAnimationInterval) {}
46     virtual void    drawChildren(bool isAnimationInterval) {}
47     virtual void    drawChildrenForSelection(QList<DCVComponent*> *itemList) {}
48     virtual void    translate() {}
49     virtual void    renderOwnShape(bool isAnimationInterval, bool renderAsWireframe) {}
50     virtual void    updateShape() {}
51
52     virtual bool    startDrag(float x, float y, float z, bool isResizingDrag){return false;}
53     virtual bool    dragging(float x, float y, float z, bool isResizingDrag){return false;}
54     virtual bool    endDrag(float x, float y, float z, bool isResizingDrag){return false; }
55
56     virtual void    saveAttributesToXML(QDomDocument *document, QDomElement* element) {}
57     virtual void    loadAttributesFromXML(QDomElement element) {}
58
59 };
60
61 #endif // DCVCCELLCODE_H