64 buttonBox->addButton(getFortuneButton, QDialogButtonBox::ActionRole); |
64 buttonBox->addButton(getFortuneButton, QDialogButtonBox::ActionRole); |
65 buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole); |
65 buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole); |
66 |
66 |
67 socket = new QLocalSocket(this); |
67 socket = new QLocalSocket(this); |
68 |
68 |
69 connect(hostLineEdit, SIGNAL(textChanged(const QString &)), |
69 connect(hostLineEdit, SIGNAL(textChanged(QString)), |
70 this, SLOT(enableGetFortuneButton())); |
70 this, SLOT(enableGetFortuneButton())); |
71 connect(getFortuneButton, SIGNAL(clicked()), |
71 connect(getFortuneButton, SIGNAL(clicked()), |
72 this, SLOT(requestNewFortune())); |
72 this, SLOT(requestNewFortune())); |
73 connect(quitButton, SIGNAL(clicked()), this, SLOT(close())); |
73 connect(quitButton, SIGNAL(clicked()), this, SLOT(close())); |
74 connect(socket, SIGNAL(readyRead()), this, SLOT(readFortune())); |
74 connect(socket, SIGNAL(readyRead()), this, SLOT(readFortune())); |