void Console::setUpConnections(MainWindow* parent) { this->parent = parent; /* set it up so that console can pass input to main window */ connect(this, SIGNAL(enterPressed(QString)), parent, SLOT(receiveInput(QString))); }
int main() { setup(); updateConsole(); while(1) { renderScene(); receiveInput(); glFlush(0); swiWaitForVBlank(); } return 0; }
// FUNCTION: run // Handles the main flow of control for the Converter class, including I/O void Converter::run() { welcomeMessage(); // Loop to allow for multiple conversions bool loop = true; while (loop) { // Receive user input input = receiveInput(); // Convert number to string output = convertToOutput(); // Display the output printOutput(); loop = repeat(); } finalMessage(); }