File indexing completed on 2023-10-01 07:35:56
0001 /* 0002 SPDX-License-Identifier: GPL-2.0-or-later 0003 SPDX-FileCopyrightText: 2018 Nikita Sirgienko <warquark@gmail.com> 0004 */ 0005 0006 #ifndef _RVARIABLEMODEL_H 0007 #define _RVARIABLEMODEL_H 0008 0009 #include "defaultvariablemodel.h" 0010 0011 class RSession; 0012 0013 class RVariableModel : public Cantor::DefaultVariableModel 0014 { 0015 Q_OBJECT 0016 public: 0017 RVariableModel(RSession*); 0018 ~RVariableModel() override; 0019 0020 // List of virables from other R namespaces (packages), which can be treted as constants, like "pi" 0021 //QStringList constants() const; 0022 0023 void update() override; 0024 0025 Q_SIGNALS: 0026 void constantsAdded(QStringList); 0027 void constantsRemoved(QStringList); 0028 0029 public Q_SLOTS: 0030 void parseResult(Cantor::Expression::Status); 0031 0032 private: 0033 void setConstants(QStringList); 0034 0035 private: 0036 QStringList m_constants; 0037 Cantor::Expression* m_expression{nullptr}; 0038 }; 0039 0040 #endif /* _RVARIABLEMODEL_H */