summaryrefslogtreecommitdiffstats
path: root/examples/corelib/ipc/localfortuneserver/server.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/corelib/ipc/localfortuneserver/server.h')
-rw-r--r--examples/corelib/ipc/localfortuneserver/server.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/examples/corelib/ipc/localfortuneserver/server.h b/examples/corelib/ipc/localfortuneserver/server.h
index 26e4792347..1efba8fca9 100644
--- a/examples/corelib/ipc/localfortuneserver/server.h
+++ b/examples/corelib/ipc/localfortuneserver/server.h
@@ -4,27 +4,33 @@
#ifndef SERVER_H
#define SERVER_H
+#include <QApplication>
#include <QDialog>
-
-QT_BEGIN_NAMESPACE
-class QLabel;
-class QPushButton;
-class QLocalServer;
-QT_END_NAMESPACE
+#include <QLabel>
+#include <QLineEdit>
+#include <QLocalServer>
+#include <QPushButton>
class Server : public QDialog
{
- Q_OBJECT
+ Q_DECLARE_TR_FUNCTIONS(Server)
public:
explicit Server(QWidget *parent = nullptr);
-private slots:
+private:
void sendFortune();
+ void toggleListenButton();
+ void listenToServer();
+ void stopListening();
-private:
QLocalServer *server;
+ QLineEdit *hostLineEdit;
+ QLabel *statusLabel;
+ QPushButton *listenButton;
+ QPushButton *stopListeningButton;
QStringList fortunes;
+ QString name;
};
#endif