summaryrefslogblamecommitdiffstats
path: root/workspace/LogWriter/logwriter.h
blob: 1646433f84acdddf671716e1f94c71b660992655 (plain) (tree)














































                                                                      
#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