#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui
{
	class MainWindow;
}

class ConnectDialog;

class MainWindow : public QMainWindow
{
	Q_OBJECT

  private:
	Ui::MainWindow *ui;
	ConnectDialog* connectDialog;

  public:
	explicit MainWindow(QWidget *parent = 0);
	virtual ~MainWindow();
	QString getUserNickname() const;

  public slots:
	void newConnection();
	void dataReceived(const QString& text);
	void connectionEstablished();
	void connectionLost();

  signals:
	void sendMessage(const QString& text) const;

  protected slots:
	void buttonSendPressed();

  protected:
	bool createConnectDialog();
};

#endif // MAINWINDOW_H
