-
Notifications
You must be signed in to change notification settings - Fork 31
/
widget.h
executable file
·64 lines (59 loc) · 1.62 KB
/
widget.h
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QProcess>
#include <QLabel>
#include <QPushButton>
#include <QTextEdit>
#include <QDebug>
#include <QTimer>
#include <QtMultimedia>
#include <QPaintEvent>
#include <QNetworkAccessManager>
#include "protocol.h"
#include "speechinput.h"
#include "socketdemo.h"
class mainWidget : public QWidget
{
Q_OBJECT
public:
mainWidget(QWidget *parent = 0);
~mainWidget();
void initializeAudioInput();
void createAudioInput();
void stopAudioInput();
QProcess* flacEncoder;
Protocol* protocol;
QAudioFormat speechInput_AudioFormat;
QAudioDeviceInfo speechInput_AudioDeviceInfo;
QAudioInput* speechInput_AudioInput;
AudioInfo* speechInput_AudioInfo;
SocketDemo* myDemo;
RenderArea* speechArea;
QTimer *timer;
QString curName;
QPushButton* frame_Speech;
QTextEdit* textEdit_Input;
QPushButton* label_Speech_Waiting;
QPushButton* cancel_btn;
QPushButton* close_btn;
qreal curI;
bool canmove;
QPoint oldPos;
QString curPath;
public slots:
void pushButton_SpeechCancel_clicked();
void pushButton_Speech_clicked();
void pushButton_Close_Clicked();
void flacEncoderFinished(int exitCode, QProcess::ExitStatus exitStatus);
void refreshRender();
void slotGoogleApiData(int,QString,double);
void slotStateChanged(QAudio::State);
void slotUpdate();
void slotNotify();
protected:
void paintEvent(QPaintEvent *);
void mousePressEvent(QMouseEvent *e);
void mouseMoveEvent(QMouseEvent *e);
};
#endif // WIDGET_H