blob: a4ddea373228bfe63888f0fddc84ea54a6d1a039 (
plain) (
blame)
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
|
#ifndef LOGWRITER_H
#define LOGWRITER_H
#include <QtGui/QDialog>
#include <qlocalsocket.h>
#include "ui_logwriter.h"
#include "status.h"
class QDialogButtonBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QLocalSocket;
class LogWriter: public QDialog {
Q_OBJECT
public:
LogWriter(QWidget *parent = 0);
~LogWriter();
private slots:
void requestNewFortune();
void readFortune();
void displayError(QLocalSocket::LocalSocketError socketError);
void enableWriteButton();
void writeToLogReceiver();
private:
// enum STATUS stat, enum SUBSTATUS sub_stat
void writeToLogReceiver(int stat, int sub_stat);
Ui::LogWriterClass ui;
QLabel *hostLabel;
QLineEdit *hostLineEdit;
QLabel *statusLabel;
QPushButton *connectToLogReceiver;
QPushButton *quitButton;
QPushButton *writeButton;
QDialogButtonBox *buttonBox;
QString currentFortune;
quint16 blockSize;
QString serverName;
int sockfd;
};
#endif // LOGWRITER_H
|