1
//=========================================================
4
// $Id: stkgui.cpp,v 1.1 2002/01/30 12:08:39 muse Exp $
6
// This is a simple GUI implemented with QT for
7
// stk software synthesizer.
9
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
10
//=========================================================
15
#include <qapplication.h>
16
#include <qsocketnotifier.h>
22
//---------------------------------------------------------
24
//---------------------------------------------------------
27
: StkGuiBase(0, "stkgui", WType_TopLevel | WDestructiveClose),
30
QSocketNotifier* s = new QSocketNotifier(0, QSocketNotifier::Read);
31
connect(s, SIGNAL(activated(int)), SLOT(readStdin(int)));
34
//---------------------------------------------------------
36
//---------------------------------------------------------
38
void StkGui::readStdin(int fd)
40
unsigned char buffer[128];
41
int n = ::read(fd, buffer, 128);
45
void StkGui::sysexReceived(const unsigned char*, int)
49
void StkGui::eventReceived(int, int, int)
53
//---------------------------------------------------------
55
//---------------------------------------------------------
57
int main(int argc, char* argv[])
60
instanceName = argv[1];
62
if (homeDir[0] != '/')
65
QApplication app(argc, argv, true);
66
QWidget* w = new StkGui;
68
w->setCaption(instanceName);
70
app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));