void VerticalLine::prefDialog () { QString pl = tr("Details"); QString cl = tr("Color"); QString sd = tr("Set Default"); PrefDialog *dialog = new PrefDialog(); dialog->setCaption(tr("Edit VerticalLine")); dialog->createPage (pl); dialog->setHelpFile (helpFile); dialog->addColorPrefItem(cl, pl, color); dialog->addCheckItem(sd, pl, FALSE); int rc = dialog->exec(); if (rc == QDialog::Accepted) { dialog->getColor(cl, color); bool f = dialog->getCheck(sd); if (f) { defaultColor = color; saveDefaults(); } emit signalDraw(); } delete dialog; }
void CDPWizard::accept() { //LOGIC REQUIRED TO CHECK THE USER IS ON THE LAST PAGE //Save default settings saveDefaults(); done(1); }
InputMap::~InputMap() { saveDefaults(); while (m_plugins.isEmpty() == false) delete m_plugins.takeFirst(); while (m_profiles.isEmpty() == false) delete m_profiles.takeFirst(); }
OutputMap::~OutputMap() { saveDefaults(); delete m_universeArray; m_universeArray = NULL; for (int i = 0; i < m_universes; i++) delete m_patch[i]; while (m_plugins.isEmpty() == false) delete m_plugins.takeFirst(); /* The purge above gets rid of m_dummyOut as well. Just NULL it. */ m_dummyOut = NULL; }
void Text::prefDialog () { QString pl = tr("Details"); QString cl = tr("Color"); QString sd = tr("Set Default"); QString fl = tr("Font"); QString ll = tr("Label"); QString vl = tr("Value"); PrefDialog *dialog = new PrefDialog(); dialog->setCaption(tr("Edit Text")); dialog->createPage (pl); dialog->setHelpFile (helpFile); dialog->addColorPrefItem(cl, pl, color); dialog->addFontItem(fl, pl, font); dialog->addTextItem(ll, pl, label); dialog->addDoubleItem(vl, pl, getValue()); dialog->addCheckItem(sd, pl, FALSE); int rc = dialog->exec(); if (rc == QDialog::Accepted) { dialog->getColor(cl, color); dialog->getText(ll, label); dialog->getFont(fl, font); value = dialog->getDouble(vl); setSaveFlag(TRUE); bool f = dialog->getCheck(sd); if (f) { dialog->getColor(cl, defaultColor); dialog->getFont(fl, dfont); saveDefaults(); } emit signalDraw(); } delete dialog; }
void SellArrow::prefDialog () { QString pl = tr("Details"); QString cl = tr("Color"); QString vl = tr("Value"); QString il = tr("Identifier"); QString bl = tr("Price"); QString sd = tr("Set Default"); PrefDialog *dialog = new PrefDialog(); dialog->setCaption(tr("Edit SellArrow")); dialog->createPage (pl); dialog->setHelpFile (helpFile); dialog->addColorPrefItem(cl, pl, color); dialog->addDoubleItem(vl, pl, getValue()); dialog->addTextItem(il, pl, identifier); dialog->addTextItem(bl, pl, price); dialog->addCheckItem(sd, pl, FALSE); int rc = dialog->exec(); if (rc == QDialog::Accepted) { dialog->getColor(cl, color); value = dialog->getDouble(vl); dialog->getText(il, identifier); dialog->getText(bl, price); setSaveFlag(TRUE); bool f = dialog->getCheck(sd); if (f) { defaultColor = color; saveDefaults(); } emit signalDraw(); } delete dialog; }
void HorizontalLine::prefDialog () { QString pl = tr("Details"); QString cl = tr("Color"); QString sd = tr("Set Default"); QString vl = tr("Value"); QString tx = tr("Text"); PrefDialog *dialog = new PrefDialog(); dialog->setCaption(tr("Edit HorizontalLine")); dialog->createPage (pl); dialog->setHelpFile (helpFile); dialog->addColorPrefItem(cl, pl, color); dialog->addDoubleItem(vl, pl, getValue()); dialog->addTextItem(tx, pl, text); //cz odkazy na objekty definovane nahore dialog->addCheckItem(sd, pl, FALSE); int rc = dialog->exec(); if (rc == QDialog::Accepted) { dialog->getColor(cl, color); value = dialog->getDouble(vl); dialog->getText(tx, text); setSaveFlag(TRUE); bool f = dialog->getCheck(sd); if (f) { defaultColor = color; saveDefaults(); } emit signalDraw(); } delete dialog; }
void ImportMusicDialog::showMenu() { if (m_popupMenu) return; if (m_tracks->size() == 0) return; MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythDialogBox *menu = new MythDialogBox("", popupStack, "importmusicmenu"); if (menu->Create()) popupStack->AddScreen(menu); else { delete menu; return; } menu->SetReturnEvent(this, "menu"); menu->AddButton(tr("Save Defaults"), SLOT(saveDefaults())); if (m_haveDefaults) { menu->AddButton(tr("Change Compilation Flag"), SLOT(setCompilation())); menu->AddButton(tr("Change Compilation Artist"), SLOT(setCompilationArtist())); menu->AddButton(tr("Change Artist"), SLOT(setArtist())); menu->AddButton(tr("Change Album"), SLOT(setAlbum())); menu->AddButton(tr("Change Genre"), SLOT(setGenre())); menu->AddButton(tr("Change Year"), SLOT(setYear())); menu->AddButton(tr("Change Rating"), SLOT(setRating())); } menu->AddButton(tr("Cancel")); }
BOOL XAP_Win32Dialog_HTMLOptions::_onCommand(HWND hWnd, WPARAM wParam, LPARAM /*lParam*/) { WORD wId = LOWORD(wParam); switch (wId) { case XAP_RID_DIALOG_HTMLOPTIONS_CHK_HTML4: set_HTML4( (isChecked(wId)!=0) ? true : false ); return 1; case XAP_RID_DIALOG_HTMLOPTIONS_CHK_PHP: set_PHTML( (isChecked(wId)!=0) ? true : false ); return 1; case XAP_RID_DIALOG_HTMLOPTIONS_CHK_XML: set_Declare_XML( (isChecked(wId)!=0) ? true : false ); return 1; case XAP_RID_DIALOG_HTMLOPTIONS_CHK_AWML: set_Allow_AWML( (isChecked(wId)!=0) ? true : false ); return 1; case XAP_RID_DIALOG_HTMLOPTIONS_CHK_EMBEDCSS: set_Embed_CSS( (isChecked(wId)!=0) ? true : false ); return 1; case XAP_RID_DIALOG_HTMLOPTIONS_CHK_URLIMAGE: set_Embed_Images( (isChecked(wId)!=0) ? true : false ); return 1; case XAP_RID_DIALOG_HTMLOPTIONS_CHK_PNGMATHML: set_MathML_Render_PNG( (isChecked(wId)!=0) ? true : false ); return 1; case XAP_RID_DIALOG_HTMLOPTIONS_CHK_SPLITFILE: if (can_set_Split_Document()) set_Split_Document( (isChecked(wId)!=0) ? true : false ); return 1; case XAP_RID_DIALOG_HTMLOPTIONS_BTN_SAVE: saveDefaults(); return 1; case XAP_RID_DIALOG_HTMLOPTIONS_BTN_RESTORE: restoreDefaults(); refreshStates(); return 1; case IDCANCEL: // also XAP_RID_DIALOG_HTMLOPTIONS_BTN_CANCEL m_bShouldSave = false; EndDialog(hWnd,0); return 1; case IDOK: // also XAP_RID_DIALOG_HTMLOPTIONS_BTN_OK m_bShouldSave = true; EndDialog(hWnd,0); return 1; default: // we did not handle this notification UT_DEBUGMSG(("WM_Command for id %ld\n",wId)); return 0; // return zero to let windows take care of it. } }