/****************************************************** actViewCallback ******************************************************/ static void actViewCallback(Widget widget, XtPointer calldata, XtPointer cbs) { int item=(long)calldata; ALINK *area; void *link; struct subWindow *treeWindow; XtVaGetValues(widget, XmNuserData, &area, NULL); treeWindow = (struct subWindow *)area->treeWindow; switch (item){ case MENU_VIEW_EXPANDCOLLAPSE1: /* Expand 1 level */ link = treeWindow->selectionLink; if (link) displayNewViewTree(area,link,EXPANDCOLLAPSE1); else createDialog(area->form_main,XmDIALOG_WARNING, "Please select an alarm group first."," "); break; case MENU_VIEW_EXPANDBRANCH: /* Expand Branch */ link = treeWindow->selectionLink; if (link )displayNewViewTree(area,link,EXPAND); else createDialog(area->form_main,XmDIALOG_WARNING, "Please select an alarm group first."," "); break; case MENU_VIEW_EXPANDALL: /* Expand all */ displayNewViewTree(area,(GLINK *)sllFirst(area->pmainGroup),EXPAND); break; case MENU_VIEW_COLLAPSEBRANCH: /* Collapse branch */ link = treeWindow->selectionLink; if (link )displayNewViewTree(area,link,COLLAPSE); else createDialog(area->form_main,XmDIALOG_WARNING, "Please select an alarm group first."," "); break; case MENU_VIEW_PROPERTIES: propShowDialog(area, widget); break; default: createDialog(area->form_main,XmDIALOG_INFORMATION, "Selection not implemented yet."," "); break; } }
void Dialog::initialize(const WidgetFactory& f) { controller.reset(f.controller()); controller->setOwner(this); controller->setDialogRoot(createDialog(f)); controller->initialize(); }
STDMETHODIMP TffdshowPageBase::GetPageInfo(LPPROPPAGEINFO pPageInfo) { CheckPointer(pPageInfo, E_POINTER); pPageInfo->cb = sizeof(PROPPAGEINFO); pPageInfo->pszDocString = NULL; pPageInfo->pszHelpFile = NULL; pPageInfo->dwHelpContext = 0; LPOLESTR pszTitle; AMGetWideString(titleW, &pszTitle); pPageInfo->pszTitle = pszTitle; if (HWND hwnd = createDialog(dialogId, GetDesktopWindow(), 0)) { RECT rc; GetWindowRect(hwnd, &rc); pPageInfo->size.cx = rc.right - rc.left; pPageInfo->size.cy = rc.bottom - rc.top; DestroyWindow(hwnd); } else { pPageInfo->size.cx = 340; pPageInfo->size.cy = 150; } return S_OK; }
FdmAppearancePage::FdmAppearancePage(dwt::Widget* parent) : PropPage(parent) { createDialog(IDD_FDM_APPEARANCE_PAGE); PropPage::fdmTranslate(handle(), texts); PropPage::fdmRead(handle(), items, listItems, ::GetDlgItem(handle(), IDC_FDM_APPEARANCE_BOOLEANS)); opSpoke = SETTING(OP_SPOKE_COLOUR); notOpSpoke = SETTING(NOT_OP_SPOKE_COLOUR); iSpoke = SETTING(I_SPOKE_COLOUR); myNickSpoken = SETTING(MY_NICK_SPOKEN_COLOUR); ButtonPtr button = attachChild<Button>(IDC_FDM_SETTINGS_BROWSE); button->onClicked(std::tr1::bind(&FdmAppearancePage::handleBrowse, this)); button = attachChild<Button>(IDC_FDM_SETTINGS_OP_SPOKE); button->onClicked(std::tr1::bind(&FdmAppearancePage::handleOpSpoke, this)); button = attachChild<Button>(IDC_FDM_SETTINGS_NOT_OP_SPOKE); button->onClicked(std::tr1::bind(&FdmAppearancePage::handleNotOpSpoke, this)); button = attachChild<Button>(IDC_FDM_SETTINGS_I_SPOKE); button->onClicked(std::tr1::bind(&FdmAppearancePage::handleISpoke, this)); button = attachChild<Button>(IDC_FDM_SETTINGS_MY_NICK_SPOKEN); button->onClicked(std::tr1::bind(&FdmAppearancePage::handleMyNickSpoken, this)); ::EnableWindow(GetDlgItem(handle(), IDC_FDM_SETTINGS_OP_SPOKE), false); ::EnableWindow(GetDlgItem(handle(), IDC_FDM_SETTINGS_NOT_OP_SPOKE), false); ::EnableWindow(GetDlgItem(handle(), IDC_FDM_SETTINGS_I_SPOKE), false); ::EnableWindow(GetDlgItem(handle(), IDC_FDM_SETTINGS_MY_NICK_SPOKEN), false); }
bool SCgTupleArranger::configDialog() { if(!mDialog) createDialog(); mDialog->setParent(mView->viewport(), Qt::Dialog); // Create ghost only for visible objects if (!findArrangeItems()) return false; createGhosts(mArrangeItems); recalculateGhostsPosition(); bool res = mDialog->exec() == QDialog::Accepted; mDialog->setParent(0, Qt::Dialog); if (res == QDialog::Rejected) { deleteGhosts(); mArrangeItems.clear(); mBusPairs.clear(); mTupleNode = 0; } return res; }
SceneMaterialHeatDialog::SceneMaterialHeatDialog(SceneMaterialHeat *material, QWidget *parent) : SceneMaterialDialog(parent) { m_material = material; createDialog(); load(); setSize(); }
SceneBoundaryHeatDialog::SceneBoundaryHeatDialog(SceneBoundaryHeat *boundary, QWidget *parent) : SceneBoundaryDialog(parent) { m_boundary = boundary; createDialog(); load(); setSize(); }
void TquantTablesPageBase::create(HWND parent) { createDialog(dialogId,parent); SetParent(m_hwnd,parent); setPos(0,0); show(true); matrixflnm[0]='\0'; _makepath_s(matrixdir,MAX_PATH,NULL,config->pth,_l("custom matrices"),NULL); firstdir=true; }
void ModelTreeDialog::show(ModelWindow *modelWindow, HWND hParentWnd /*= NULL*/) { setModelWindow(modelWindow); if (hWindow == NULL) { createDialog(IDD_MODELTREE, hParentWnd); } ShowWindow(hWindow, SW_SHOW); fillTreeView(); }
void RKProgressControl::doNonModal (bool autodelete) { RK_TRACE (MISC); RK_ASSERT (!dialog); RKProgressControl::autodelete = autodelete; if ((!dialog) && (mode & ShowAtOnce)) { // actually, dialog should alway be 0 at this point createDialog (); dialog->show (); } }
TdeinterlacePageYadif::TdeinterlacePageYadif(Twindow *parent):TdeinterlacePanel(IDD_DEINTERLACE_YADIF,parent) { static const TbindCombobox<TdeinterlacePageYadif> cbx[]= { IDC_CBX_YADIF_PARITY, IDFF_yadifFieldOrder, BINDCBX_DATA, &TdeinterlacePageYadif::cfg2dlg, 0 }; bindComboboxes(cbx); createDialog(dialogId,parent->m_hwnd); }
/****************************************************** actInsertCallback ******************************************************/ static void actInsertCallback(Widget widget, XtPointer calldata, XtPointer cbs) { int item=(long)calldata; ALINK *area; GCLINK *link; int linkType; XtVaGetValues(widget, XmNuserData, &area, NULL); switch (item){ case MENU_INSERT_GROUP: if (checkActiveSelection(area) ) break; /* create a new Group */ link = (GCLINK *)alCreateGroup(); link->viewCount = 1; linkType = GROUP; editPasteLink(area,link,linkType); break; case MENU_INSERT_CHANNEL: if (checkActiveSelection(area) ) break; /* create a new Channel */ link = (GCLINK *)alCreateChannel(); linkType = CHANNEL; editPasteLink(area, link, linkType); break; case MENU_INSERT_FILE: if (checkActiveSelection(area) ) break; area->managed = FALSE; createFileDialog(area->form_main,(void *)fileSetupCallback, (XtPointer)FILE_CONFIG_INSERT,(void *)XtUnmanageChild, (XtPointer)0,(XtPointer)area, "Config File",CONFIG_PATTERN, psetup.configDir); break; default: createDialog(area->form_main,XmDIALOG_INFORMATION, "Selection not implemented yet."," "); break; } }
HWND createMainDialog( HINSTANCE hInstance ) { dcx::dcxWin32DialogTemplate tpl; // Create the dialog tpl.setSizeInDialogUnits( 469, 469 ); tpl.setStyleAsPrompt(); tpl.setStyle( WS_POPUP | WS_CLIPSIBLINGS | WS_SYSMENU | DS_ABSALIGN | DS_NOIDLEMSG | DS_CENTER ); tpl.setTitle( "Evidyon" ); tpl.addEditBoxInDialogUnits( ID_EDITBOX_STATUS, WS_VSCROLL|WS_BORDER|ES_MULTILINE|ES_READONLY|ES_LEFT|ES_AUTOVSCROLL, 10+55, 10 +50, 180, 70, "Contacting update server..." ); tpl.addButtonInDialogUnits( ID_BUTTON_STARTGAME, WS_DISABLED, 10+55, 90+10+5 + 35 , 180, 25, "Play Evidyon" ); tpl.addProgressBarInDialogUnits( ID_PROGRESS, PBS_SMOOTH, 10+55, 90+10+5 +35 + 5 , 180, 15 ); tpl.addButtonInDialogUnits( ID_BUTTON_EXIT, 0, 10+80+30, 90+10+10+15+10+15+5 +50+20+5+15, 70, 20, "Quit" ); tpl.addComboBoxInDialogUnits( ID_COMBO_DISPLAYMODE, WS_DISABLED|CBS_DROPDOWN|CBS_HASSTRINGS|CBS_DROPDOWNLIST| WS_VSCROLL, 10+55, 90+10+10+15+10+15+5 +50+20, 180, 150 ); BYTE buffer[1024]; HWND hWnd = createDialog( hInstance, tpl.compile( buffer, sizeof(buffer) ), NULL ); { // set the window's icon HICON hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1)); SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon); SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon); } if( dcx::dcxWin32WindowsVersionIs2000OrXP() ) { // Set this window up as a layered window, which is only supported on 2000/xp systems #define LWA_COLORKEY 0x00000001 #define WS_EX_LAYERED 0x00080000 typedef BOOL (WINAPI *lpfnSetLayeredWindowAttributes)(HWND hWnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags); lpfnSetLayeredWindowAttributes SetLayeredWindowAttributes; HMODULE hUser32 = GetModuleHandle("user32.dll"); SetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes)GetProcAddress(hUser32,"SetLayeredWindowAttributes"); SetWindowLong( hWnd, GWL_EXSTYLE, GetWindowLong( hWnd, GWL_EXSTYLE) | WS_EX_LAYERED ); SetLayeredWindowAttributes( hWnd, SKIN_TRANSPARENT_COLOR, 0, LWA_COLORKEY ); } else { // Use a region to define this window. This is less efficient on new systems than using the layered approach HRGN hRegion = CreateEllipticRgn( 0, 0, 469, 469 ); SetWindowRgn( hWnd, hRegion, TRUE ); } // Update the window. Get rid of the progress bar for now, since it doesn't do // anything until an update needs to be downloaded. ShowWindow( GetDlgItem( hWnd, ID_PROGRESS ), SW_HIDE ); ShowWindow( GetDlgItem( hWnd, ID_EDITBOX_STATUS ), SW_HIDE ); ShowWindow( GetDlgItem( hWnd, ID_BUTTON_STARTGAME ), SW_HIDE ); ShowWindow( hWnd, SW_SHOW ); // Return the window we just created return hWnd; }
/*! * Constructor. * * @param [in] parameters Parameters for the Constructor. */ EapFastProvWaitNoteDialog::EapFastProvWaitNoteDialog(const QVariantMap ¶meters) :mTranslator(new HbTranslator("eapprompts")) { OstTraceFunctionEntry0( EAPFASTPROVWAITNOTEDIALOG_EAPFASTPROVWAITNOTEDIALOG_ENTRY ); qDebug("EapFastProvWaitNoteDialog::EapFastProvWaitNoteDialog ENTER"); createDialog( parameters ); OstTraceFunctionExit0( EAPFASTPROVWAITNOTEDIALOG_EAPFASTPROVWAITNOTEDIALOG_EXIT ); qDebug("EapFastProvWaitNoteDialog::EapFastProvWaitNoteDialog EXIT"); }
LanguageChooser::LanguageChooser(QWidget *parent) : QDialog(parent) { setModal(true); setWindowTitle(tr("Language")); createDialog(); connect(m_cancel, SIGNAL(clicked()), this, SLOT(reject())); connect(m_select, SIGNAL(clicked()), this, SLOT(accept())); language = tr("English (en)"); }
GTK2CEGuiRendererSelector::GTK2CEGuiRendererSelector() { // fake args for gtk_init int argc = 1; char* argv = "SampleApp"; char** pargv = &argv; gtk_init (&argc, &pargv); createDialog(); }
/*! * Constructor. * * @param [in] parameters Parameters for the Constructor. */ EapQueryDialog::EapQueryDialog(const QVariantMap ¶meters) :mTranslator(new HbTranslator("eapprompts")), mOkActionPressed(false) { OstTraceFunctionEntry0( EAPQUERYDIALOG_EAPQUERYDIALOG_ENTRY ); qDebug("EapQueryDialog::EapQueryDialog ENTER"); createDialog( parameters ); OstTraceFunctionExit0( EAPQUERYDIALOG_EAPQUERYDIALOG_EXIT ); qDebug("EapQueryDialog::EapQueryDialog EXIT"); }
void ChatClient::slotMessageReceived(quint16 dialogNum, quint16 fromId, QDateTime sendTime, const QString &message) { Dialog *dg = userlist->userByDialog(dialogNum);////WRONG if (dg == NULL) { User *us = pSocket->addUserById(myId, fromId, ServerFlags::InUserlist); dg = us; userlist->add(us); connect(us, SIGNAL(readMessages()), this, SLOT(slotReadMessageNotify())); } bool wasCr = dg->createdWidget(); createDialog(dg, wasCr);////no QString name = (fromId == myId ? "You" : dg->name()); dg->appendToHistory(name, sendTime, Dialog::toDocumentFromString(message), Dialog::ReceivedMessage); }
/*************************************************** maskActivateCallback ****************************************************/ static void maskActivateCallback(Widget widget,XtPointer calldata, XtPointer cbs) { int index=(long)calldata; ALINK *area; void *link; int maskid,maskno; int linkType; char buff1[6]; maskid = index/ 10; maskno = index % 10; XtVaGetValues(widget, XmNuserData, &area, NULL); link =getSelectionLinkArea(area); /* Change mask */ if (link){ linkType =getSelectionLinkTypeArea(area); if (linkType == GROUP){ if (maskid == ALARMACK) alRemoveNoAck1HrTimerGroup(link); alForceGroupMask(link,maskid,maskno); awGetMaskString(((GLINK*)link)->pgroupData->mask,buff1); alLogOpModMessage(CHANGE_MASK,(GCLINK*)link, "Group Mask [%s] %s <%s>", masksdata[maskid], mask_str[maskno], buff1); } else { if (maskid == ALARMACK) alRemoveNoAck1HrTimerChan(link); alForceChanMask(link,maskid,maskno); alGetMaskString(((CLINK*)link)->pchanData->curMask,buff1); alLogOpModMessage(CHANGE_MASK,(GCLINK*)link, "Channel Mask [%s] %s <%s>", masksdata[maskid], mask_str[maskno], buff1); } silenceCurrentReset(area); } else { createDialog(widget,XmDIALOG_WARNING, "Please select an alarm group or channel first."," "); } /* --------------------------------- Update all dialog Windows --------------------------------- */ axUpdateDialogs(area); }
/****************************************************** actHelpCallback ******************************************************/ static void actHelpCallback(Widget widget, XtPointer calldata, XtPointer cbs) { int item=(long)calldata; ALINK *area; XtVaGetValues(widget, XmNuserData, &area, NULL); switch (item){ case MENU_HELP_ABOUT: createDialog(area->form_main,XmDIALOG_INFORMATION, "\nAlarm Configuration Tool\n\n" ALH_CREDITS_STRING, alhVersionString); break; default: createDialog(area->form_main,XmDIALOG_INFORMATION, "Help is not available in this release."," "); break; } }
void ChatClient::slotWriteToFriend(User* us) { User *fr = pSocket->addUserById(myId, us->id(), ServerFlags::InUserlist); connect(fr, SIGNAL(readMessages()), this, SLOT(slotReadMessageNotify())); Dialog *dg = userlist->userById(us->id()); if (dg == NULL) { userlist->add(fr); dg = fr; connect(fr, SIGNAL(readMessages()), this, SLOT(slotReadMessageNotify())); } createDialog(dg); activateTab(dg); dialogFindFriends->close(); }
void DialogTestModel::callReflectedDialog(bool modal, bool modifyDataDirectly) { const auto mode = modal ? IDialog::Mode::MODAL : IDialog::Mode::MODELESS; auto uiFramework = context_->queryInterface<IUIFramework>(); assert(uiFramework != nullptr); IDefinitionManager& definitionManager = *context_->queryInterface<IDefinitionManager>(); auto model = definitionManager.create<DialogReflectedTreeModel>(); model->initialise(context_, model.getDefinition(definitionManager)); model->setObject(reflectedData_, modifyDataDirectly); reflectedDialog_ = uiFramework->createDialog("plg_dialog_test/reflected_dialog.qml", model); reflectedDialog_->show(mode); }
bool RKProgressControl::doModal (bool autodelete) { RK_TRACE (MISC); RK_ASSERT (!dialog); modal = true; createDialog (); int res = dialog->exec (); RK_ASSERT ((res == QDialog::Accepted) || (res == QDialog::Rejected)); bool ret = is_done; // for good style, we copy this onto the stack, as we are about to self destruct if (autodelete) deleteLater (); return ret; }
/*! * Constructor. * * @param [in] parameters Parameters for the Constructor. */ EapMschapv2PwdExpNoteDialog::EapMschapv2PwdExpNoteDialog(const QVariantMap ¶meters) :HbMessageBox("default text...",HbMessageBox::MessageTypeInformation), mTranslator(new HbTranslator("eapprompts")), mOkActionPressed(false) { OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_EAPMSCHAPV2PWDEXPNOTEDIALOG_ENTRY ); qDebug("EapMschapv2PwdExpNoteDialog::EapMschapv2PwdExpNoteDialog ENTER"); Q_UNUSED(parameters) createDialog(); OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_EAPMSCHAPV2PWDEXPNOTEDIALOG_EXIT ); qDebug("EapMschapv2PwdExpNoteDialog::EapMschapv2PwdExpNoteDialog EXIT"); }
void TconfPageBase::createWindow(void) { m_hwnd=createDialog(dialogId,hwndParent); assert(m_hwnd); ShowWindow(m_hwnd,SW_HIDE); setWindowText(m_hwnd,dialogName()); translate(); if (tr->translateMode && dialogId!=IDD_ABOUT) { HWND hed=GetDlgItem(m_hwnd,IDC_ED_HELP); if (hed) { SendMessage(hed,EM_SETREADONLY,FALSE,0); SetWindowLong(hed,GWL_STYLE,GetWindowLong(hed,GWL_STYLE)|ES_WANTRETURN); } } }
/*! * Constructor. * * @param [in] parameters Parameters for the Constructor. */ EapMschapv2NewPwdDialog::EapMschapv2NewPwdDialog(const QVariantMap ¶meters) :mEdit1(NULL), mEdit2(NULL), mPwdValidator(NULL), mTranslator(new HbTranslator("eapprompts")), mErrMsgTranslator(new HbTranslator("cpdestinationplugin")), mClose(false) { OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_EAPMSCHAPV2NEWPWDDIALOG_ENTRY ); qDebug("EapMschapv2NewPwdDialog::EapMschapv2NewPwdDialog ENTER"); createDialog(parameters); OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_EAPMSCHAPV2NEWPWDDIALOG_EXIT ); qDebug("EapMschapv2NewPwdDialog::EapMschapv2NewPwdDialog EXIT"); }
QObject *KOCRDialogFactory::createObject( QObject *parent, const char *name, const char *classname, const QStringList &args ) { if ( strcmp( classname, "KOCRDialog" ) != 0 ) return 0; if ( parent && !parent->isWidgetType() ) return 0; bool modal = false; if ( args.count() == 1 ) modal = (bool)args[ 0 ].toInt(); return createDialog( static_cast<QWidget *>( parent ), name, modal ); }
void RKProgressControl::newError (const QString &error) { RK_TRACE (MISC); if (!(mode & IncludeErrorOutput)) return; ROutput outputc; outputc.type = ROutput::Error; outputc.output = error; output_log.append (outputc); if (mode & RaiseOnError) { if (!dialog) createDialog (); dialog->raise (); } if (dialog) dialog->addOutput (&outputc); }
void RKProgressControl::newOutput (const QString &output) { RK_TRACE (MISC); if (!(mode & IncludeRegularOutput)) return; ROutput outputc; outputc.type = ROutput::Output; outputc.output = output; output_log.append (outputc); if (mode & RaiseOnRegularOutput) { if (!dialog) createDialog (); dialog->raise (); } if (dialog) dialog->addOutput (&outputc); }
TQObject *KOCRDialogFactory::createObject( TQObject *parent, const char *name, const char *classname, const TQStringList &args ) { if ( strcmp( classname, "KOCRDialog" ) != 0 ) return 0; if ( parent && !parent->isWidgetType() ) return 0; bool modal = false; if ( args.count() == 1 ) modal = (bool)args[ 0 ].toInt(); return TQT_TQOBJECT(createDialog( TQT_TQWIDGET( parent ), name, modal )); }