//    tonalisa - software to look at overtone-structures
//    Copyright (C) 2016  Dominik Schmidt-Philipp
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
#ifndef OSC_H
#define OSC_H

#include <QObject>

class OSC : public QObject
{
  Q_OBJECT
  Q_PROPERTY(QString address READ address WRITE setAddress NOTIFY addressChanged)
  Q_PROPERTY(QString server READ server WRITE setServer NOTIFY serverChanged)
  Q_PROPERTY(QString port READ port WRITE setPort NOTIFY portChanged)

 public:
  OSC(QObject *parent=0);

  // getter
  QString address() const;
  QString server() const;
  QString port() const;

  void setAddress(const QString &address);
  void setServer(const QString &server);
  void setPort(const QString &port);

  Q_INVOKABLE void sendFloat(float f);
  
 signals:
  void addressChanged();
  void serverChanged();
  void portChanged();

 private:
  QString m_address;
  QString m_server;
  QString m_port;
};

#endif // OSC_H
