1 Star 0 Fork 4

lisuke / spreadsheet

forked from EarlDoss / spreadsheet 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
spreadsheet.h 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
#ifndef SPREADSHEET_H
#define SPREADSHEET_H
#include<QTableWidget>
class Cell;
class SpreadsheetCompare;
class Spreadsheet:public QTableWidget
{
Q_OBJECT
public:
Spreadsheet(QWidget*parent=0);
bool readFile(const QString &fileName);
bool writeFile(const QString &fileName);
void clear();
void sort(const SpreadsheetCompare &compare);
QTableWidgetSelectionRange selectedRange() const;
QString currentLocation()const;
QString currentFormula()const;
public slots:
void cut();
void copy();
void paste();
void del();
void selectCurrentRow();
void selectCurrentColumn();
void recalculate();
void setAutoRecalculate(bool recal);
void findNext(const QString &str, Qt::CaseSensitivity cs);
void findPrevious(const QString &str, Qt::CaseSensitivity cs);
private slots:
void somethingChanged();
signals:
void modified();
private:
enum{MagicNumber=0x7F51C883, RowCount=999,ColumCount=26};
Cell* cell(int row,int column)const;
QString formula(int row,int column) const;
void setFormula(int row,int column,const QString &formula);
bool autoRecalc;
QString text(int row,int column) const;
};
class SpreadsheetCompare
{
public:
bool operator()(const QStringList &row1,
const QStringList &row2) const;
enum{KeyCount=3};
int keys[KeyCount];
bool ascending[KeyCount];
};
#endif // SPREADSHEET_H
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/lisuke/spreadsheet.git
git@gitee.com:lisuke/spreadsheet.git
lisuke
spreadsheet
spreadsheet
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891