CSELECT_EXCEL_TAB::CSELECT_EXCEL_TAB(int intCount, QAxObject* workbook, QWidget *parent) :
    QDialog(parent),
    ui(new Ui::CSELECT_EXCEL_TAB)
{
    ui->setupUi(this);    
    m_index = 0;
    m_workbook = workbook;
    selectWorksheetTab(intCount);
    connect(this, SIGNAL(accepted()), this, SLOT(sendIndex()));
}
Beispiel #2
0
 virtual bool write(yarp::os::ConnectionState& proto, yarp::os::SizedWriter& writer) {
     bool ok = sendIndex(proto);
     if (!ok) return false;
     writer.write(proto.os());
     return proto.os().isOk();
 }
Beispiel #3
0
void Visualight::processServer() {
  if (wifly.available() > 0) { // check for data from wifly


    if (wifly.gets(buf, sizeof(buf))) { /* See if there is a request */

      if (strstr_P(buf, PSTR("GET /mac")) > 0) { /* GET request */
        VPRINTLN(F("Got GET MAC request"));
        while (wifly.gets(buf, sizeof(buf)) > 0) { /* Skip rest of request */
        }
        //int numNetworks = wifly.getNumNetworks();
        sendMac();
        wifly.flushRx();    // discard rest of input
        VPRINTLN(F("Sent Mac address"));
        wifly.close();
      } 
      
      else if (strstr_P(buf, PSTR("GET / ")) > 0) { // GET request
        VPRINTLN(F("Got GET request"));
        while (wifly.gets(buf, sizeof(buf)) > 0) { /* Skip rest of request */
        }
        //int numNetworks = wifly.getNumNetworks();
        wifly.flushRx();    // discard rest of input
        sendIndex();
        VPRINTLN(F("Sent index page"));
        wifly.close();
      }
      
      else if (strstr_P(buf, PSTR("POST")) > 0) { /* Form POST */
         
        VPRINTLN(F("Got POST"));

        if (wifly.match(F("net="))) { /* Get posted field value */
          //Serial.println(buf);
          memset(decodeBuffer, 0, 65);

          wifly.getsTerm(decodeBuffer, sizeof(decodeBuffer),'&');

          urldecode(network, decodeBuffer);

          replaceAll(network,"+","$");
          VPRINTLN(F("Got network: "));
          VPRINTLN(network);

            if (wifly.match(F("pas="******"+","$");
              //wifly.gets(security, 1); //no need for sizeof() -- it's a 1 or 2
              VPRINTLN(F("Got password: "******"sec="))) {
              wifly.gets(security, sizeof(security));
              
              VPRINTLN(F("Got security: "));
              VPRINTLN(security);

            }
          }
          
          wifly.flushRx();    // discard rest of input
          VPRINT(F("Sending greeting page: "));
          sendGreeting(network); //send greeting back
          delay(500);
          sendGreeting(network); //send a second time *just in case*
          delay(500);
          wifly.flushRx();
          joinWifi();
        }
      } 
      else { /* Unexpected request */
        delay(100);
        wifly.flushRx();    // discard rest of input
        VPRINTLN(F("Sending 404"));
        send404();
      }
    }
  }
}