void UserSurvey::on_buttonBox_accepted() { // now we need to collect the data and submit it QString values = os; ADD_OPTION(recreational); ADD_OPTION(tech); ADD_OPTION(planning); ADD_OPTION(download); ADD_OPTION(divecomputer); ADD_OPTION(manual); ADD_OPTION(companion); values.append(QString("&suggestion=%1").arg(ui->suggestions->toPlainText())); UserSurveyServices uss(this); connect(uss.sendSurvey(values), SIGNAL(finished()), SLOT(requestReceived())); hide(); }
ConvertHandler() { #define ADD_OPTION(name) mNames.push_back("-" name); mOptions.insert(name) #define ADD_ALIAS(alias,original) ADD_OPTION(alias); mAliases.insert(pair<string,string>(alias,original)) // Long names mNames.push_back("--convert"); mNames.push_back("--input"); mNames.push_back("--output"); // Short names mNames.push_back("-c"); mNames.push_back("-i"); mNames.push_back("-o"); // Options ADD_OPTION("flips"); //flip s coordinate ADD_OPTION("flipt"); //flip t coordinate ADD_OPTION("flipr"); //flip r coordinate ADD_OPTION("flipx"); //flip x coordinate ADD_OPTION("flipy"); //flip y coordinate ADD_OPTION("flipz"); //flip z coordinate ADD_OPTION("flip"); //? ADD_OPTION("flop"); //? ADD_OPTION("flipn"); //flip normals ADD_OPTION("dims"); //show dimensions ADD_OPTION("basepath"); //specify model base path for building material scripts ADD_OPTION("autolod"); //create automatic lods (TODO: may specify distance list) ADD_OPTION("autoedge"); //create edge list (prepare for stencil shadows) ADD_OPTION("autotangent"); //create tangent texcoord unit ADD_OPTION("forceflatshade"); //force flat shading ADD_OPTION("no-optimize"); //forcefully disable mesh optimization ADD_ALIAS ("x","addx"); //translate x (alias) ADD_ALIAS ("y","addy"); //translate y (alias) ADD_ALIAS ("z","addz"); //translate z (alias) ADD_OPTION("addx"); //translate x ADD_OPTION("addy"); //translate y ADD_OPTION("addz"); //translate z ADD_OPTION("adds"); //translate s ADD_OPTION("addt"); //translate t ADD_OPTION("addr"); //translate r ADD_OPTION("mpyx"); //multiply x ADD_OPTION("mpyy"); //multiply y ADD_OPTION("mpyz"); //multiply z ADD_OPTION("mpys"); //multiply s ADD_OPTION("mpyt"); //multiply t ADD_OPTION("mpyr"); //multiply r ADD_OPTION("inputPath"); //override input path ADD_OPTION("outputPath"); //override output path ADD_OPTION("rootPath"); //override executable path #undef ADD_OPTION }