Esempio n. 1
0
void PostData::clear()
{
	PostData &self = *this;
	
	clearAction();
	self["client"]["card"].setValue();
	self["client"]["pin"].setValue();
}
Esempio n. 2
0
void PostData::setAction(const QString &type, const Json &modifier)
{
	PostData &self = *this;
	
	clearAction();
	self["action"]["type"] = type;
	self["action"]["modifier"] = modifier;
}
Esempio n. 3
0
int main() {
    while (1) {
        switch (action) {
            case NONE:
                // sleep a bit
                break;
            case DO_START:
                clearAction();
                int result = task_do_work();
                sendResult(result);
                break;
        }
    }
}
Esempio n. 4
0
History::History(QWidget *parent)
    : QDialog(parent),noteOn(0), amplitude(0),countTry(0),totalPercent(0),
      prevNoteFreq(0),
      currentNoteFreq(0) ,
      nextNoteFreq(0),
      ratio(0),
      prevFreq(0),

      summation(0)
{
	ui.setupUi(this);
	for(int i = 0; i < 84;i++){
		notenum[i][0] = 0; //count correct
		notenum[i][1] = 0; //count try this note
		notenum[i][2] = 0; //percent correct
	}
	clear();

	connect(ui.clearButton, SIGNAL(clicked()),SLOT(clearAction()));
	connect(ui.closeButton, SIGNAL(clicked()),SLOT(closeAction()));
}
	void run() {
		switch (routes[action]) {
		case LOAD:
			loadAction();
			break;
		case INSERT:
			insertAction();
			break;
		case FIND:
			findAction();
			break;
		case REMOVE:
			removeAction();
			break;
		case CLEAR:
			clearAction();
			break;
		case DELETE:
			deleteAction();
			break;
		case SHOW:
			showAction();
			break;
		case TEST:
			testAction();
			break;
		case HELP:
			helpAction();
			break;
		case REPORT:
			reportAction();
			break;
		default:
			usageAction();
			break;
		}
	}