Collection of tools useful for audio production
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.2KB

  1. /*
  2. * PatchCanvas test app
  3. */
  4. #ifndef CANVASTESTAPP_H
  5. #define CANVASTESTAPP_H
  6. #include <QMainWindow>
  7. #include <jack/jack.h>
  8. #include "patchcanvas-api.h"
  9. namespace Ui {
  10. class CanvasTestApp;
  11. }
  12. class QSettings;
  13. class CanvasTestApp : public QMainWindow
  14. {
  15. Q_OBJECT
  16. public:
  17. explicit CanvasTestApp(QWidget *parent = 0);
  18. ~CanvasTestApp();
  19. static void client_register_callback(const char* name, int register_, void *arg);
  20. static void port_register_callback(jack_port_id_t port_id_jack, int register_, void *arg);
  21. static void port_connect_callback(jack_port_id_t port_a, jack_port_id_t port_b, int connect, void* arg);
  22. signals:
  23. void clientRegisterCallback(QString name, bool yesno);
  24. void portRegisterCallback(int port, bool yesno);
  25. void connectionCallback(int port_a, int port_b, bool yesno);
  26. private slots:
  27. void handle_clientRegisterCallback(QString name, bool yesno);
  28. void handle_portRegisterCallback(int port, bool yesno);
  29. void handle_connectionCallback(int port_a, int port_b, bool yesno);
  30. private:
  31. Ui::CanvasTestApp* ui;
  32. PatchScene* scene;
  33. QSettings* settings;
  34. virtual void closeEvent(QCloseEvent* event);
  35. };
  36. #endif // CANVASTESTAPP_H