text: #ifndef SAVE_H
  #define SAVE_H
  
  #include <QObject>
  #include <QFile>
  #include <QDir>
  #include <QFileDialog>
  #include <QTextStream>
  #include <QIODevice>
  
  namespace CSV
  {
      class Save: public QObject
      {
          Q_OBJECT
          Q_PROPERTY(QString autoSavePath
                     READ getAutoSavePath
                     WRITE setAutoSavePath)
          Q_PROPERTY(QString saveFileName
                     READ getSaveFileName
                     WRITE setSaveFileName
                     NOTIFY saveFileNameChanged)
      public:
          Save();
          QList<QString> curvedNames = QList<QString>() << "室内温度曲线" << "热功率曲线" << "体表温度曲线";
  
          QMap<QString, int> map_channelNums = {{"室内温度曲线", 3}, {"热功率曲线", 29}, {"体表温度曲线", 29}};
          static Save *getInstance();
          QString getAutoSavePath();
  
          QString getSaveFileName();
          Q_INVOKABLE void saveGraphData(QList<int> graphRange);
          Q_INVOKABLE void autoSaveCSV();
      signals:
          void saveFileNameChanged();
  
      public slots:
          void setAutoSavePath(QString path);
          void setSaveFileName(QString filename);
      private:
          void addTmpData(QList<QList<double>>& tmpData, int channelNum,
                          unsigned long long start_frame, unsigned long long end_frame,
                          QVector<QVector<QPointF>> historyPointF);
          QTextStream m_textStream;
          QTextStream m_autoSaveTextStream;
          QString m_autosavepath;
          QString m_saveFileName;
          int m_lastframe = 0;
          int sum_channelNums = map_channelNums[curvedNames[0]] + map_channelNums[curvedNames[1]] + map_channelNums[curvedNames[2]];
      };
  }
  #endif // SAVE_H
  