1 // Copyright (c) 2012 Dennco Project
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.
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.
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/>.
17 // Created by tkawata on Sep-30, 2012.
19 #ifndef DCVCCELLCODE_H
20 #define DCVCCELLCODE_H
22 #include "dcvpagecomponent.h"
26 class DCVCCellCode : public DCVPageComponent
31 DCVCCellCode(DCCellCode *owner, DCVCPage *page);
33 virtual DCCell * getOwnerCell() const { return NULL; }
34 virtual bool isResizingArea(float x, float y, float z) const { return false; }
37 * @brief Change page this cell code belongs.
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.
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() {}
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; }
56 virtual void saveAttributesToXML(QDomDocument *document, QDomElement* element) {}
57 virtual void loadAttributesFromXML(QDomElement element) {}
61 #endif // DCVCCELLCODE_H