feat: 添加、删除,预览,保存等功能实现
基本这里就是QStandardItemmodel的实际使用写完了;后面再写,就是在此基础上写代理部分功能
This commit is contained in:
@@ -19,21 +19,30 @@ public:
|
||||
~ExQStandardItemModel();
|
||||
|
||||
private:
|
||||
void init(QStringList& list); //从list初始化数据模型
|
||||
void init(QStringList& list); //从list初始化数据模型
|
||||
|
||||
private slots:
|
||||
void onCurrentChanged(const QModelIndex& current, const QModelIndex& previous); //当前单元格发生变化时
|
||||
void on_actOpen_triggered(); //打开和导入文件,并且在plainTextEdit里面显示
|
||||
void on_actAppend_triggered(); //在表格的最后一行添加一行
|
||||
void on_actOpen_triggered(); //打开和导入文件,并且在plainTextEdit里面显示
|
||||
void on_actAppend_triggered(); //在表格的最后一行添加一行
|
||||
void on_actSave_triggered(); //保存文件
|
||||
void on_actInsert_triggered(); //在当前选中的一行,其前面插入一行
|
||||
void on_actDelete_triggered(); //删除一行
|
||||
void on_actExit_triggered(); //关闭退出
|
||||
void on_actModelData_triggered(); //预览模型
|
||||
void on_actAlignLeft_triggered(); //左对齐
|
||||
void on_actAlignCenter_triggered(); //文本居中
|
||||
void on_actAlingRight_triggered(); //文本右对齐
|
||||
void on_actBold_triggered(bool checked);//文本加粗
|
||||
|
||||
private:
|
||||
Ui::ExQStandardItemModel *ui;
|
||||
|
||||
QLabel *m_labCurrFile; //当前文件
|
||||
QLabel *m_labCellPos; //当前单元格行列号
|
||||
QLabel *m_labCellText; //当前单元格数据内容
|
||||
QStandardItemModel *m_model; //数据模型
|
||||
QItemSelectionModel *m_selectModet; //选择模型
|
||||
QLabel *m_labCurrFile; //当前文件
|
||||
QLabel *m_labCellPos; //当前单元格行列号
|
||||
QLabel *m_labCellText; //当前单元格数据内容
|
||||
QStandardItemModel *m_model; //数据模型
|
||||
QItemSelectionModel *m_selectModet; //选择模型
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user