void ChronoDuino::testAction() { //Settings const QSettings settings; const QString device = settings.value(EditPreferencesDialog::SERIAL_PORT).toString(); const int rate = settings.value(EditPreferencesDialog::SERIAL_RATE).toInt(); SerialTesterDialog test_dialog(device, rate, this); test_dialog.exec(); }
int main(void) { { struct UFontDialogHints hints = DEFAULT_UFONTDIALOGHINTS; hints.InitialFontName = "Arial"; hints.InitialPixelSize = 20; hints.WindowTitle = "Open Font"; test_fontdialog(&hints); } { struct UFileDialogHints hints = DEFAULT_UFILEDIALOGHINTS; hints.InitialDirectory = "/home/"; hints.NameFilter = "Image files (*.jpg *.png)"; hints.Action = UFileDialogActionOpen; hints.WindowTitle = "Open Single File Test"; test_dialog(&hints); hints.Action = UFileDialogActionOpenMultiple; hints.WindowTitle = "Open Multiple Files Test"; test_dialog(&hints); hints.Action = UFileDialogActionOpenDirectory; hints.WindowTitle = "Open Directory Test"; test_dialog(&hints); hints.Action = UFileDialogActionSave; hints.WindowTitle = "Save As Test"; test_dialog(&hints); } return 0; }
void Test_FilterTrans_Dialog::test_mmFilterTransactionsDialog() { TestFrameBase* user_request = new TestFrameBase(m_base_frame); user_request->Show(); // Create it here because we want it to remember last actions. mmFilterTransactionsDialog test_dialog(m_base_frame); bool testing_dialog = true; int test_count = 0; while (testing_dialog && test_count <= 2) { test_count++; switch (test_count) { case 1: user_request->Show_InfoBarMessage("Please set Account as 'Mastercard'\n\n Cancel to bypass this test."); if (test_dialog.ShowModal() == wxID_OK) { int account_id = -1; if (test_dialog.getAccountCheckBox()) { account_id = test_dialog.getAccountID(); } CPPUNIT_ASSERT(account_id == 3); } else testing_dialog = false; break; case 2: user_request->Show_InfoBarMessage("Please set payee to 'Aldi'\n\n Cancel to bypass this test."); if (test_dialog.ShowModal() == wxID_OK) { // dlg.checkAll() CPPUNIT_ASSERT(test_dialog.somethingSelected()); } else testing_dialog = false; break; default: user_request->Show_InfoBarMessage("Test Completed\n\n Refer back to console."); testing_dialog = false; } } }