class DCCellCode : public TKCellCode
{
friend class DCComponentUtil;
- DCCellCode(std::string theName, std::string theCellAPIName);
- void bindComponent(DCVPageComponent *component) { mVComponent = component; }
+ friend class DCContainer;
- DCVPageComponent *mVComponent;
+ DCCellCode(DCContainer *container, std::string theName, std::string theCellAPIName);
+ void bindComponent(DCVPageComponent *component) { d_vComponent = component; }
+
+ DCVPageComponent *d_vComponent;
+ DCContainer *d_container;
+
+ /**
+ * Change name of this cell code.
+ * DCContainer will call this method.
+ */
+ void changeName(const QString& newName);
+
+ /**
+ * Change the location path for this cell code.
+ * DCContainer will call this method.
+ */
+ void changePath(const QString& newPath);
public:
virtual ~DCCellCode();
virtual TKCellCodeInstance* createCellCodeInstance(TKCell *owner, const void *data) { return 0; }
- void saveScript(DCContainer *container, const QString& script);
- DCVPageComponent *getVComponent() const { return mVComponent; }
- DCVCPage* getPageBelonging() const;
- QString getOwnScript(DCContainer *container) const;
+ void saveScript(const QString& script);
+ DCVPageComponent* getVComponent() const { return d_vComponent; }
+ DCVCPage* getPageBelonging() const;
+ QString getOwnScript() const;
+ DCContainer* getContainer() const { return d_container; }
+ /**
+ * Change the API type of this cell.
+ *
+ */
+ void changeType(const QString& newType);
};
#endif // DCCELLCODE_H