File indexing completed on 2024-06-16 03:42:35

0001 /*
0002     File                 : ColumnStringIO.h
0003     Project              : LabPlot
0004     Description          : Aspect that manages a column string IO
0005     --------------------------------------------------------------------
0006     SPDX-FileCopyrightText: 2007-2009 Tilman Benkert <thzs@gmx.net>
0007     SPDX-FileCopyrightText: 2013-2017 Alexander Semke <alexander.semke@web.de>
0008     SPDX-License-Identifier: GPL-2.0-or-later
0009 */
0010 
0011 #ifndef COLUMNSTRINGIO_H
0012 #define COLUMNSTRINGIO_H
0013 
0014 #include "backend/core/column/Column.h"
0015 
0016 class ColumnStringIO : public AbstractColumn {
0017     Q_OBJECT
0018 
0019 public:
0020     explicit ColumnStringIO(Column* owner);
0021     AbstractColumn::ColumnMode columnMode() const override;
0022     AbstractColumn::PlotDesignation plotDesignation() const override;
0023     int rowCount() const override;
0024     int rowCount(double min, double max) const override;
0025     QString textAt(int) const override;
0026     int availableRowCount(int max = -1) const override;
0027     void setTextAt(int, const QString&) override;
0028     virtual bool isValid(int) const;
0029     bool copy(const AbstractColumn*) override;
0030     bool copy(const AbstractColumn* source, int source_start, int dest_start, int num_rows) override;
0031     void replaceTexts(int start_row, const QVector<QString>& texts) override;
0032     void save(QXmlStreamWriter*) const override{};
0033     bool load(XmlStreamReader*, bool preview) override {
0034         Q_UNUSED(preview);
0035         return true;
0036     };
0037 
0038 private:
0039     Column* m_owner;
0040     bool m_setting{false};
0041     QString m_to_set;
0042 };
0043 
0044 #endif