File: ExpressionRangeData.hpp

package info (click to toggle)
qnodeeditor 2.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,144 kB
  • sloc: cpp: 8,823; makefile: 3
file content (31 lines) | stat: -rw-r--r-- 780 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
#include <nodes/NodeDataModel>
using QtNodes::NodeDataType;
/// The class can potentially incapsulate any user data which
/// need to be transferred within the Node Editor graph
class ExpressionRangeData : public NodeData
{
  public:
    ExpressionRangeData()
    {
    }
    ExpressionRangeData(QString const &text, std::vector<double> const &range) : _expression(text), _range(range)
    {
    }
    std::shared_ptr<NodeDataType> type() const override
    {
        return std::make_shared<NodeDataType>("ExpressionRange", "E");
    }
    QString const &expression() const
    {
        return _expression;
    }
    std::vector<double> const &range() const
    {
        return _range;
    }

  private:
    QString _expression;
    std::vector<double> _range;
};