Files
CodeRepository/Apps/App_ResistanceMatcher/3rd/QXlsx/include/xlsxcellreference.h
chenzhen 222dda1e43 1,新增“App_ThermalImageSystem”;
2,新增“Apps”;
3,新增“Common”;
4,新增“FileList”;
5,新增“MediaX”;
6,新增“OpenSource”;
7,新增“Samples”;
8,新增“SoftwareBusinessLines”.
2026-02-14 23:03:23 +08:00

49 lines
1.2 KiB
C++

// xlsxcellreference.h
#ifndef QXLSX_XLSXCELLREFERENCE_H
#define QXLSX_XLSXCELLREFERENCE_H
#include "xlsxglobal.h"
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX
class QXLSX_EXPORT CellReference
{
public:
CellReference();
CellReference(int row, int column);
CellReference(const QString &cell);
CellReference(const char *cell);
CellReference(const CellReference &other);
~CellReference();
QString toString(bool row_abs = false, bool col_abs = false) const;
static CellReference fromString(const QString &cell);
bool isValid() const;
inline void setRow(int row) { _row = row; }
inline void setColumn(int col) { _column = col; }
inline int row() const { return _row; }
inline int column() const { return _column; }
inline bool operator==(const CellReference &other) const
{
return _row == other._row && _column == other._column;
}
inline bool operator!=(const CellReference &other) const
{
return _row != other._row || _column != other._column;
}
private:
void init(const QString &cell);
int _row, _column;
};
QT_END_NAMESPACE_XLSX
Q_DECLARE_TYPEINFO(QXlsx::CellReference, Q_MOVABLE_TYPE);
#endif // QXLSX_XLSXCELLREFERENCE_H