コード例 #1
0
void VClientWindow::on_connectButton_clicked(){
    ui->connectButton->setEnabled(false);
    client= new Client(ui->hostTextField->text(),ui->portSpin->value(),this);
    connect(client,SIGNAL(connected()),this,SLOT(setConnected()));
    connect(client, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError)));

    client->connectToServer();
    connect(client, SIGNAL(showData()),this,SLOT(showData()));
    connect(client,SIGNAL(showImage(QImage)),screenShareview,SLOT(showImage(QImage)));
    connect(ui->inputTextField,SIGNAL(textChanged()),this,SLOT(commandtyped()));

    connect(ui->actionScreen_Sharing,SIGNAL(triggered()),client,SLOT(startScreenShare()));
    connect(screenShareview->getStopScreenShareButton(),SIGNAL(clicked()),this,SLOT(stopScreenShare()));
    connect(screenShareview->getSizeSlider(),SIGNAL(sliderReleased()),this,SLOT(sendScreenSize()));
    connect(screenShareview->getTimeSlider(),SIGNAL(sliderReleased()),this,SLOT(sendDelayTime()));
    connect(screenShareview->getGrayScaleBox(),SIGNAL(toggled(bool)),client,SLOT(sendGrayScale(bool)));


}
コード例 #2
0
ファイル: touchd.c プロジェクト: Topographic0cean/src
//*************************************************************************
//
//   processCommand -- reads the device type and command from the input
//	stream then calls the appropriate function.
//
//*************************************************************************
int processCommand(int conn, int dev)
{
   char            device;
   char            command;

   device  = readChar(conn);
   command = readChar(conn);

  if (verbose) printf("%c:%c ",device,command);
   
   switch (command)
   {
   case 's':
      syncReport(dev);
      break;

   case 't':
      touch(conn, dev);
      break;

   case 'f':
      mTouch(conn, dev);
      break;

   case 'd':
      touchDownUp(conn, dev);
      break;

   case 'n':
      sendScreenSize(conn);
      break;
   }

   readEOL(conn);

   return 1;
}