class library: Spawner - don't access PriorityQueue-array
[supercollider.git] / QtCollider / LanguageClient.h
blob0b1486017a64964fc6f15af0e32702ea0b3d1ab0
1 /************************************************************************
3 * Copyright 2011 Jakob Leben (jakob.leben@gmail.com)
5 * This file is part of SuperCollider Qt GUI.
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ************************************************************************/
22 #ifndef QC_LANGUAGE_CLIENT_H
23 #define QC_LANGUAGE_CLIENT_H
25 #include "SC_TerminalClient.h"
26 #include "QC_Export.h"
27 #include "Common.h"
29 #include <QObject>
30 #include <QBasicTimer>
31 #include <QEvent>
33 namespace QtCollider {
35 struct SCRequestEvent : public QEvent
37 SCRequestEvent( QtCollider::EventType type, const QVariant & d = QVariant() ) :
38 QEvent( (QEvent::Type) type ),
39 data( d )
42 QVariant data;
45 class LangClient : public QObject, public SC_TerminalClient
47 Q_OBJECT
48 public:
49 LangClient( const char* name );
50 virtual ~LangClient() {};
51 private Q_SLOTS:
52 void doSchedule();
53 protected:
54 virtual void commandLoop();
55 virtual void daemonLoop();
57 virtual void onScheduleChanged();
58 virtual void onInput();
59 virtual void onQuit( int exitCode );
60 virtual void onRecompileLibrary();
62 virtual void customEvent( QEvent * );
63 virtual void timerEvent( QTimerEvent * );
64 private:
65 void doInput();
67 QBasicTimer appClockTimer;
70 } // namespace QtCollider
72 #endif // QC_LANGUAGE_CLIENT_H