1
0
mirror of https://github.com/QtExcel/QXlsx.git synced 2025-01-30 05:02:52 +08:00
QXlsx/SpreadsheetExample/spreadsheetitem.h
Look Skyworker 3623613834 test for ss
2018-06-16 16:28:51 +09:00

39 lines
868 B
C++

// (c) The Qt Company Ltd. BSD License
// Some code is fixed by j2doll.
#ifndef SPREADSHEETITEM_H
#define SPREADSHEETITEM_H
#include "spreadsheet.h"
#include <QTableWidgetItem>
class SpreadSheetItem : public QTableWidgetItem
{
public:
SpreadSheetItem();
SpreadSheetItem(const QString &text);
QTableWidgetItem *clone() const override;
QVariant data(int role) const override;
void setData(int role, const QVariant &value) override;
QVariant display() const;
inline QString formula() const
{
return QTableWidgetItem::data(Qt::DisplayRole).toString();
}
static QVariant computeFormula(const QString &formula,
const QTableWidget *widget,
const QTableWidgetItem *self = 0);
private:
mutable bool isResolving;
};
#endif // SPREADSHEETITEM_H