void DialogEditAccount::on_btnExecute_clicked() { bool result = operation(); if(result){ populateDialog(); emit operationMaked(); } }
static void ASAPI attributeListChanged( ADMItemRef item, ADMNotifierRef notifier) { if ( sADMNotifier->IsNotifierType(notifier, kADMUserChangedNotifier) ) { ADMListRef listRef = sADMItem->GetList(ghAttributeList); ADMEntryRef selectedEntry = sADMList->GetActiveEntry( listRef ); ADMInt32 entryIndex = sADMEntry->GetIndex(selectedEntry); ADMDialogRef dlg = sADMItem->GetDialog(item); populateDialog(dlg, entryIndex); //This is a neat little expression which turns the Include Tints checkbox on and off depending on whether Overprint is selected // and whether Add or Remove is selected // We take the Active Entry in Add/Remove ( 0 == Remove , 1 == Add ) // We take the Active Entry in Attribute ( 0 == Color , 1 == Overprint) // Now we bitwise AND them then NOT the result, so we only turn the check box OFF if we are ADD OVERPRINT otherwise we turn it on sADMItem->SetBooleanValue(ghIncludeTintsCheckBox, !(bool(entryIndex) & bool(sADMEntry->GetIndex(sADMList->GetActiveEntry( sADMItem->GetList(ghAddRemoveList) )))) ); } }
void DialogEditAccount::bindData(Container<ElencoConti::ContoPtr>::Iterator it, ElencoConti* ec){ itAccount = it; elenco = ec; populateDialog(); }
// Initialize dialog items and notification procedures for the ADM dialog ASErr ASAPI DlgInit(ADMDialogRef dlg) { ASErr fxErr = kNoErr; AIAppContextHandle AppContext; SPPluginRef pluginRef; char tipString[64]; char groupName[64] = "SDK Dialogs"; ADMPoint location, size; ADMRect rect, dimensions, boundsRect; long positionCode; tipString[0] = 0; // Set up the application context, so that suite calls will work pluginRef = sADMDialog->GetPluginRef(dlg); sAIAppContext->PushAppContext(pluginRef, &AppContext); // Acquire yourself to stay in memory sSPAccess->AcquirePlugin( pluginRef, &g->accessRef ); // Acquire suites to stay in memory acquireSuites( g->basic ); /******************************************************************************* ** Dialog level stuff **/ // Attach the dialog-level callbacks sADMDialog->SetDestroyProc( dlg, DlgDestroyProc ); // sADMDialog->SetNotifyProc( dlg, DlgNotifyProc ); // Do this only if you have a resizable dialog of type kADMTabbedResizingFloatingDialogStyle or kADMResizingFloatingDialogStyle // Set the increments and min/max sizes to limit grow behavior. //sADMDialog->SetMinWidth( dlg, layerMinWidth ); //sADMDialog->SetMinHeight( dlg, layerMinHeight ); //sADMDialog->SetMaxWidth( dlg, layerMaxWidth ); //sADMDialog->SetVerticalIncrement( dlg, layerLineHeight ); populateDialog(dlg, 0); //SET THE NOTIFY PROCEDURE FOR Change BUTTON if (ghChangeButton) { sADMItem->SetNotifyProc(ghChangeButton, changeButtonUp); } //SET THE NOTIFY PROCEDURE FOR RemoveColors BUTTON if (ghChangeButton) { sADMItem->SetNotifyProc(ghRemoveUnused, removeUnusedButtonUp); } //SET THE NOTIFY and TRACK PROCEDURE FOR From List if (ghFromList) { sADMItem->SetTrackProc(ghFromList, fromListClicked); sADMItem->SetNotifyProc(ghFromList, listChanged); } //SET THE NOTIFY and TRACK PROCEDURE FOR To List if (ghToList) { sADMItem->SetTrackProc(ghToList, toListClicked); sADMItem->SetNotifyProc(ghToList, listChanged); } //SET THE NOTIFY PROCEDURE FOR Attribute List if (ghAttributeList) { sADMItem->SetNotifyProc(ghAttributeList, attributeListChanged); } //SET THE NOTIFY PROCEDURE FOR Add/Remove List if (ghAttributeList) { sADMItem->SetNotifyProc(ghAddRemoveList, addRemoveListChanged); } /******************************************************************************* * Restore dialog position * * A note about Dialog position code: * positionCode is a code to restore a * dialog's position within a docked/tabbed group. The group is * referred to by name, this being the name of the ADM Dialog that is * the first tab in the top dock of the group. * * You don't need to know what positionCode means, but if you are curious: * * byte meaning * ---- ------------------------------ * 1 (0x000000ff) dock position. 0 is no dock, 1 is first docked (i.e. top dock), 2 etc. * 2 (0x0000ff00) tab position, 0 is no tab group, 1 is the 1st tab, 2 etc. * 3 (0x00010000) bit 16, boolean, 1 for front tab. * 3 (0x00020000) bit 17, boolean, 0 is zoom up, 1 is zoom down. * 3 (0x00040000) bit 18, boolean, 0 is in hidden dock, 1 is in visible dock. * 4 (0x00000000) reserved. currently unused * **/ // Get the last known Docking group and Docking code out of the Prefs file //sASLib->strcpy( groupName, kLayersPaletteDockGroup ); // is this a default value? sAIPreference->GetStringPreference( "FindReplaceGraphics", "kADM_DPDockGroupStr", groupName ); positionCode = 0x00001c00; // Default: no dock, no tab group, front tab, zoom down, visible sAIPreference->GetIntegerPreference( "FindReplaceGraphics", "kADM_DPDockCodeStr", &positionCode ); // Pick a default location in case it has never come up before on this machine sADMDialog->GetBoundsRect( dlg, &boundsRect ); sADMBasic->GetPaletteLayoutBounds( &dimensions ); location.h = dimensions.right - (boundsRect.right - boundsRect.left); location.v = dimensions.bottom - (boundsRect.bottom - boundsRect.top); // Get the last known location out of the Prefs file sAIPreference->GetPointPreference( "FindReplaceGraphics", "kADM_DPLocationStr", &location ); size.h = 208; // minimum width (which governs the inner client rect) + 2 //size.v = layerMinHeight; size.v = 258; //was: 258 #ifdef WIN_ENV // different rules about whether the borders and tabs are in the dlg rect size.v += 6; location.v -= 6; size.h += 4; #endif // Get the last known size out of the Prefs file sAIPreference->GetPointPreference( "FindReplaceGraphics", "kADM_DPSizeStr", &size ); rect.left = location.h; rect.right = location.h + size.h; rect.top = location.v; rect.bottom = location.v + size.v; // restore the size and location of the dialog //THIS LINE IS COMMENTED OUT SO SIZE CAN BE SET IN RESOURCE FILE // sADMDialog->SetBoundsRect(dlg, &rect); // restore the position code of the dialog sADMDialogGroup->SetDialogGroupInfo(dlg, groupName, positionCode ); // Initialize the palette internals //result = LayersDlgInit(dlg); ADMIconRef icon = sADMIcon2->GetFromResource(pluginRef, 0, ID_DIALOG_ICON, 0); sADMDialog->SetIcon(dlg,false, icon); icon = sADMIcon2->GetFromResource(pluginRef, 0, ID_DIALOG_ICON_ROLLOVER, 0); sADMDialog->SetIcon(dlg,true, icon); // Clean up the application context and return sAIAppContext->PopAppContext(AppContext); return fxErr; }