DAWorkbench 0.0.1
DAWorkbench API
载入中...
搜索中...
未找到
DA::DACommandDataFrame_astype类 参考

转换列的数据类型 更多...

#include <DACommandsDataFrame.h>

类 DA::DACommandDataFrame_astype 继承关系图:
DA::DACommandWithTemporaryData DA::DACallBackInterface DA::DACommandWithRedoCount

Public 成员函数

 DACommandDataFrame_astype (const DAPyDataFrame &df, const QList< int > &index, const DAPyDType &dt, QUndoCommand *par=nullptr)
 
virtual void undo () override
 
virtual bool exec () override
 执行函数,此函数返回false,说明执行失败,不应该被放入command stack中,在DACommandWithRedoCount中,exec函数应该替代redo函数
 
- Public 成员函数 继承自 DA::DACommandWithTemporaryData
 DACommandWithTemporaryData (const DAPyDataFrame &df, QUndoCommand *par=nullptr, bool saveOnConstruct=true)
 构造函数执行会自动把原始的dataframe保存到临时目录中
 
QString getTemplateFileName () const
 获取临时文件的路径
 
QDir templateDir () const
 获得临时路径
 
QString getTemplateFilePath () const
 获取临时文件的完整路径
 
bool save ()
 把dataframe保存到临时文件中
 
bool load ()
 从文件加载回来
 
DAPyDataFramedataframe ()
 
const DAPyDataFramedataframe () const
 
- Public 成员函数 继承自 DA::DACommandWithRedoCount
 DACommandWithRedoCount (QUndoCommand *par=nullptr)
 
virtual void redo () override
 
- Public 成员函数 继承自 DA::DACallBackInterface
void setCallBack (CallBack fn)
 
CallBack getCallBack () const
 
void callback ()
 
bool hasCallback () const
 

额外继承的成员函数

- Public 类型 继承自 DA::DACallBackInterface
using CallBack = std::function< void() >
 
- 静态 Public 成员函数 继承自 DA::DACommandWithTemporaryData
static QString getDataframeTempPath ()
 获取Dataframe保存的临时文件路径
 
- Protected 属性 继承自 DA::DACommandWithTemporaryData
DAPyDataFrame mDataframe
 
- Protected 属性 继承自 DA::DACommandWithRedoCount
bool mIsFirstRedo { true }
 

详细描述

转换列的数据类型

成员函数说明

◆ exec()

bool DA::DACommandDataFrame_astype::exec ( )
overridevirtual

执行函数,此函数返回false,说明执行失败,不应该被放入command stack中,在DACommandWithRedoCount中,exec函数应该替代redo函数

返回

重载 DA::DACommandWithRedoCount .


该类的文档由以下文件生成: