class Cell : public QTableWidgetItem{ public: Cell(QStringList names_for_columns_,QString text); Cell(QStringList names_for_columns__); ~Cell() { } QTableWidgetItem *clone() const; void setData(int role, const QVariant &value); QVariant data(int role) const; void setFormula(const QString &formula); QString formula() const; void setDirty(); void set_names_for_columns(QStringList names_for_columns_) { names_for_columns =names_for_columns_; }// QString text(); private: QVariant value() const; QVariant evalExpression(const QString &str) const; mutable QVariant cachedValue; mutable bool cacheIsDirty;mutable QStringList names_for_columns;mutable parser par; };