void FGFSIoTelnet::slotChangeConnection(bool checked) {
  // convenient for easier messing with checkable PushButton
  if (checked) {
    slotConnectToHost();
  } else {
    slotDisconnect();
  }
};
예제 #2
0
MobileDClient::MobileDClient() : QMainWindow()
{
	setupUi(this);
	setWindowTitle("MobileDClient");

	logger = Logger::instance();
	config = Configuration::instance();

	socket = new QTcpSocket(this);
	socket->connectToHost(QHostAddress::LocalHost, 1234);

	connect(socket, SIGNAL(readyRead()), this, SLOT(slotIncomingPacket()));
	connect(socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(slotSocketStateChanged(QAbstractSocket::SocketState)));

	connect(connectionConnect, SIGNAL(clicked()), this, SLOT(slotConnectToHost()));
	connect(connectionDisconnect, SIGNAL(clicked()), this, SLOT(slotDisconnectFromHost()));

	connect(poseGet, SIGNAL(clicked()), this, SLOT(slotPoseGet()));
	connect(poseSet, SIGNAL(clicked()), this, SLOT(slotPoseSet()));

	connect(caEnable, SIGNAL(clicked()), this, SLOT(slotCaEnable()));
	connect(caDisable, SIGNAL(clicked()), this, SLOT(slotCaDisable()));

	connect(moveSpline, SIGNAL(clicked()), this, SLOT(slotMoveSpline()));
	connect(moveRotate, SIGNAL(clicked()), this, SLOT(slotMoveRotate()));
	connect(moveTranslate, SIGNAL(clicked()), this, SLOT(slotMoveTranslate()));
	connect(moveStop, SIGNAL(clicked()), this, SLOT(slotMoveStop()));

	connect(robotStatusGet, SIGNAL(clicked()), this, SLOT(slotRobotStatusGet()));

	connect(scannerGet, SIGNAL(clicked()), this, SLOT(slotScannerGet()));
	connect(voltageGet, SIGNAL(clicked()), this, SLOT(slotVoltageGet()));
	connect(tempsGet, SIGNAL(clicked()), this, SLOT(slotTempsGet()));

	errDialog = new QErrorMessage(this);
}