summaryrefslogtreecommitdiffstats
path: root/workspace/LogWriter/logwriter.h
blob: 1646433f84acdddf671716e1f94c71b660992655 (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
#ifndef LOGWRITER_H
#define LOGWRITER_H

#include <QtGui/QDialog>
#include <qlocalsocket.h>
#include "ui_logwriter.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:
	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