void GroupGeneralPage::loadPage(Group *pGroup) { Button_SetCheck(m_hCheckAdmin,pGroup->isAdmin()); Button_SetCheck(m_hCheckBrowser,pGroup->isBrowser()); Button_SetCheck(m_hCheckBypassLimits,pGroup->isBypassLimits()); Button_SetCheck(m_hCheckMaxSessions,pGroup->isMaxSessionsEnabled()); SetWindowText(m_hEditMaxSessions, Util::ConvertUtil::toString(pGroup->getMaxSessions()).c_str()); Button_SetCheck(m_hCheckMaxSessionsPerIp,pGroup->isMaxSessionsPerIpEnabled()); SetWindowText(m_hEditMaxSessionsPerIp, Util::ConvertUtil::toString(pGroup->getMaxSessionsPerIp()).c_str()); Button_SetCheck(m_hCheckMaxDownload,pGroup->isMaxDownloadEnabled()); SetWindowText(m_hEditMaxDownload, Util::ConvertUtil::toString(pGroup->getMaxDownloadBytes()/1024/1024).c_str()); ComboBox_SetCurSel(m_hComboMaxDownloadPeriod,0); int maxDownloadPeriodCount = ComboBox_GetCount(m_hComboMaxDownloadPeriod); for ( int i=0; i<maxDownloadPeriodCount; i++ ) { if ( ComboBox_GetItemData(m_hComboMaxDownloadPeriod,i)==pGroup->getMaxDownloadPeriod() ) { ComboBox_SetCurSel(m_hComboMaxDownloadPeriod,i); break; } } Button_SetCheck(m_hCheckMaxBandwidth,pGroup->isMaxBandwidthEnabled()); SetWindowText(m_hEditMaxBandwidth, Util::ConvertUtil::toString(pGroup->getMaxBandwidth()).c_str()); updateDialog(); }
/* ********************************** @ Implemented by Daniel Santos & Hung Q Nguyen @ Note: * ***********************************/ void Universe::Universe::run() { while (window_.isOpen() && elapsedTime_ < uni_total_times) { sf::Event event; while (window_.pollEvent(event)) { switch (event.type) { case sf::Event::Closed: window_.close(); break; case sf::Event::KeyPressed: shipMove(event.key); break; default: break; } } window_.clear(); // Update and draw checkClickOnSprite(); updateDialog(selectedPlanet_); updateUniverse(); window_.draw(dialogBox_); window_.draw(dialogText_); window_.draw(textTime_); drawStars(); window_.draw(*ship_); window_.display(); // Update current updateTime(step_time); } printState(); }
static LRESULT CALLBACK opacitySliderSubProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData) { ID2D1RenderTarget *rt; struct colorDialog *c; D2D1_POINT_2F *pos; D2D1_SIZE_F *size; c = (struct colorDialog *) dwRefData; switch (uMsg) { case msgD2DScratchPaint: rt = (ID2D1RenderTarget *) lParam; drawOpacitySlider(c, rt); return 0; case msgD2DScratchLButtonDown: pos = (D2D1_POINT_2F *) wParam; size = (D2D1_SIZE_F *) lParam; c->a = 1 - (pos->x / size->width); updateDialog(c, NULL); return 0; case WM_NCDESTROY: if (RemoveWindowSubclass(hwnd, opacitySliderSubProc, uIdSubclass) == FALSE) logLastError(L"error removing color dialog opacity slider subclass"); break; } return DefSubclassProc(hwnd, uMsg, wParam, lParam); }
void AP_UnixDialog_Stylist::setStyleInGUI(void) { UT_sint32 row,col; UT_UTF8String sCurStyle = *getCurStyle(); if((getStyleTree() == NULL) || (sCurStyle.size() == 0)) updateDialog(); if(m_wStyleList == NULL) return; if(isStyleTreeChanged()) _fillTree(); getStyleTree()->findStyle(sCurStyle,row,col); UT_DEBUGMSG(("After findStyle row %d col %d col \n",row,col)); UT_UTF8String sPathFull = UT_UTF8String_sprintf("%d:%d",row,col); UT_UTF8String sPathRow = UT_UTF8String_sprintf("%d",row); UT_DEBUGMSG(("Full Path string is %s \n",sPathFull.utf8_str())); GtkTreePath * gPathRow = gtk_tree_path_new_from_string (sPathRow.utf8_str()); GtkTreePath * gPathFull = gtk_tree_path_new_from_string (sPathFull.utf8_str()); gtk_tree_view_expand_row( GTK_TREE_VIEW(m_wStyleList),gPathRow,TRUE); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(m_wStyleList),gPathFull,NULL,TRUE,0.5,0.5); gtk_tree_view_set_cursor(GTK_TREE_VIEW(m_wStyleList),gPathFull,NULL,TRUE); setStyleChanged(false); gtk_tree_path_free(gPathRow); gtk_tree_path_free(gPathFull); }
void AP_Win32Dialog_Stylist::setStyleInGUI(void) { UT_sint32 row,col; UT_UTF8String sCurStyle = *getCurStyle(); if((getStyleTree() == NULL) || (sCurStyle.size() == 0)) updateDialog(); if(isStyleTreeChanged()) _fillTree(); getStyleTree()->findStyle(sCurStyle,row,col); UT_DEBUGMSG(("After findStyle row %d col %d col \n",row,col)); UT_UTF8String sPathFull = UT_UTF8String_sprintf("%d:%d",row,col); UT_UTF8String sPathRow = UT_UTF8String_sprintf("%d",row); UT_DEBUGMSG(("Full Path string is %s \n",sPathFull.utf8_str())); HWND hTree = GetDlgItem(m_hWnd, AP_RID_DIALOG_STYLIST_TREE_STYLIST); HTREEITEM hitem = NULL; hitem = TreeView_GetRoot(hTree); UT_sint32 i; // Go through each row until we've found ours for (i = 0; i < row; i++) hitem = TreeView_GetNextItem(hTree, hitem, TVGN_NEXT); hitem = TreeView_GetNextItem(hTree, hitem, TVGN_CHILD); for (i = 0; i < col; i++) hitem = TreeView_GetNextItem(hTree, hitem, TVGN_NEXT); TreeView_SelectItem(hTree, hitem); setStyleChanged(false); }
void FindReplaceDlg::doDialog(HWND hParent, BOOL findReplace) { if (_hSCI == NULL) { /* create new scintilla handle */ _hSCI = (HWND)::SendMessage(_nppData._nppHandle, NPPM_CREATESCINTILLAHANDLE, 0, (LPARAM)_hSelf); } if (!isCreated()) { create(IDD_FINDREPLACE_DLG); ::SendMessage(_hParent, NPPM_MODELESSDIALOG, MODELESSDIALOGADD, (LPARAM)_hSelf); ETDTProc EnableDlgTheme = (ETDTProc)::SendMessage(_nppData._nppHandle, NPPM_GETENABLETHEMETEXTUREFUNC, 0, 0); if (EnableDlgTheme != NULL) EnableDlgTheme(_hSelf, ETDT_ENABLETAB); } /* set kind of dialog */ _findReplace = findReplace; _hParentHandle = hParent; /* update dialog */ display(); updateDialog(); ::SetFocus(::GetDlgItem(_hSelf, IDC_COMBO_FIND)); }
void ossimQtPluginsDialog::addButtonPressed() { QStringList plugins = QFileDialog::getOpenFileNames(); QStringList::iterator iter = plugins.begin(); while(iter != plugins.end()) { ossimFilename file = (*iter).ascii(); if (ossimSharedPluginRegistry::instance()->isLoaded(file) == false) { ossimSharedPluginRegistry::instance()->registerPlugin(file); } else { QString caption = "Sorry:"; QString text = "Plugin loaded already!\n"; text += file.c_str(); QMessageBox::information( this, caption, text, QMessageBox::Ok ); } ++iter; } updateDialog(); }
BOOL PreferencesDialog::OnInitDialog() { CDialog::OnInitDialog(); CWnd* item = GetDlgItem(IDOK); SetDefID(IDOK); if (item) ((CButton*)item)->SetButtonStyle(BS_DEFPUSHBUTTON); item = GetDlgItem(IDCANCEL); if (item) ((CButton*)item)->SetButtonStyle(0); GetPreferencesInfo(&info); CRect rect; // initialize buttons textColorWnd = GetDlgItem(ID_TEXTCOLOR); highlightTextColorWnd = GetDlgItem(ID_HIGHLIGHTTEXTCOLOR); outputTextColorWnd = GetDlgItem(ID_OUTPUTTEXTCOLOR); hintBackgroundColorWnd = GetDlgItem(ID_HINTBACKGROUNDCOLOR); updateDialog(); return TRUE; }
int QtEngineThread::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QThread::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: updateTypes((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break; case 1: updateGeometry((*reinterpret_cast< QString(*)>(_a[1]))); break; case 2: updateTime((*reinterpret_cast< QString(*)>(_a[1]))); break; case 3: updateStatus((*reinterpret_cast< QString(*)>(_a[1]))); break; case 4: updateDialog((*reinterpret_cast< Tissue*(*)>(_a[1]))); break; case 5: onLoadDef((*reinterpret_cast< QString(*)>(_a[1]))); break; case 6: onLoadInit((*reinterpret_cast< QString(*)>(_a[1]))); break; case 7: onSetSeed((*reinterpret_cast< int(*)>(_a[1]))); break; case 8: onSetDur((*reinterpret_cast< int(*)>(_a[1]))); break; case 9: onSetUpdate((*reinterpret_cast< int(*)>(_a[1]))); break; case 10: onSetStep((*reinterpret_cast< double(*)>(_a[1]))); break; case 11: onSetView((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QWidget*(*)>(_a[2]))); break; case 12: onWriteHistory((*reinterpret_cast< QString(*)>(_a[1]))); break; case 13: onWriteDetail((*reinterpret_cast< QString(*)>(_a[1]))); break; case 14: toggleRun(); break; case 15: onIdle(); break; default: ; } _id -= 16; } return _id; }
void DialogsProvider::customEvent( QEvent *event ) { if( event->type() == DialogEvent::DialogEvent_Type ) { DialogEvent *de = static_cast<DialogEvent*>(event); switch( de->i_dialog ) { case INTF_DIALOG_FILE_SIMPLE: case INTF_DIALOG_FILE: openDialog(); break; case INTF_DIALOG_FILE_GENERIC: openFileGenericDialog( de->p_arg ); break; case INTF_DIALOG_DISC: openDiscDialog(); break; case INTF_DIALOG_NET: openNetDialog(); break; case INTF_DIALOG_SAT: case INTF_DIALOG_CAPTURE: openCaptureDialog(); break; case INTF_DIALOG_DIRECTORY: PLAppendDir(); break; case INTF_DIALOG_PLAYLIST: playlistDialog(); break; case INTF_DIALOG_MESSAGES: messagesDialog(); break; case INTF_DIALOG_FILEINFO: mediaInfoDialog(); break; case INTF_DIALOG_PREFS: prefsDialog(); break; case INTF_DIALOG_BOOKMARKS: bookmarksDialog(); break; case INTF_DIALOG_EXTENDED: extendedDialog(); break; #ifdef ENABLE_VLM case INTF_DIALOG_VLM: vlmDialog(); break; #endif case INTF_DIALOG_POPUPMENU: VLCMenuBar::PopupMenu( p_intf, (de->i_arg != 0) ); break; case INTF_DIALOG_AUDIOPOPUPMENU: VLCMenuBar::AudioPopupMenu( p_intf, (de->i_arg != 0) ); break; case INTF_DIALOG_VIDEOPOPUPMENU: VLCMenuBar::VideoPopupMenu( p_intf, (de->i_arg != 0) ); break; case INTF_DIALOG_MISCPOPUPMENU: VLCMenuBar::MiscPopupMenu( p_intf, (de->i_arg != 0) ); break; case INTF_DIALOG_WIZARD: case INTF_DIALOG_STREAMWIZARD: openAndStreamingDialogs(); break; #ifdef UPDATE_CHECK case INTF_DIALOG_UPDATEVLC: updateDialog(); break; #endif case INTF_DIALOG_EXIT: quit(); break; default: msg_Warn( p_intf, "unimplemented dialog" ); } } }
void GuiDialog::slotRestore() { // Tell the controller that a request to refresh the dialog's contents // has been received. It's up to the controller to supply the necessary // info by calling GuiDialog::updateView(). updateDialog(); bc().restore(); }
void AP_UnixDialog_Lists::notifyActiveFrame(XAP_Frame * /*pFrame*/) { UT_ASSERT(m_wMainWindow); ConstructWindowName(); gtk_window_set_title (GTK_WINDOW (m_wMainWindow), getWindowName()); m_bDontUpdate = false; updateDialog(); previewExposed(); }
void AP_UnixDialog_Lists::activate (void) { UT_ASSERT (m_wMainWindow); ConstructWindowName(); gtk_window_set_title (GTK_WINDOW (m_wMainWindow), getWindowName()); m_bDontUpdate = false; updateDialog(); gdk_window_raise (gtk_widget_get_window(m_wMainWindow)); }
void PreferencesDialog::OnChangeHintBackgroundColor() { CColorDialog dlg(info.hintBackgroundColor, 0, this); if (dlg.DoModal() == IDOK) { info.hintBackgroundColor = dlg.GetColor(); updateDialog(); hintBackgroundColorWnd->InvalidateRect(NULL, FALSE); } }
void PreferencesDialog::OnChangeOutputTextColor() { CColorDialog dlg(info.outputTextColor, 0, this); if (dlg.DoModal() == IDOK) { info.outputTextColor = dlg.GetColor(); updateDialog(); outputTextColorWnd->InvalidateRect(NULL, FALSE); } }
static void aIntChanged(struct colorDialog *c) { int a; a = editInt(c->editAInt); if (a < 0 || a > 255) return; c->a = ((double) a) / 255; updateDialog(c, c->editAInt); }
static void aDoubleChanged(struct colorDialog *c) { double a; a = editDouble(c->editADouble); if (a < 0 || a > 1) return; c->a = a; updateDialog(c, c->editADouble); }
static void vChanged(struct colorDialog *c) { double v; v = editDouble(c->editV); if (v < 0 || v > 1) return; c->v = v; updateDialog(c, c->editV); }
static void hChanged(struct colorDialog *c) { double h; h = editDouble(c->editH); if (h < 0 || h >= 1.0) // note the >= return; c->h = h; updateDialog(c, c->editH); }
static void sChanged(struct colorDialog *c) { double s; s = editDouble(c->editS); if (s < 0 || s > 1) return; c->s = s; updateDialog(c, c->editS); }
void ShareSetupPage::loadPage(Share *pShare) { SetWindowText(m_hEditPath,pShare->getPath().c_str()); SetWindowText(m_hEditVirtualName,pShare->getName().c_str()); Button_SetCheck(m_hCheckAutoIndex,pShare->isAutoIndex()); SetWindowText(m_hEditAutoIndexInterval, Util::ConvertUtil::toString(pShare->getAutoIndexInterval()).c_str()); updateDialog(); }
static void bDoubleChanged(struct colorDialog *c) { double r, g, b; hsv2RGB(c->h, c->s, c->v, &r, &g, &b); b = editDouble(c->editBDouble); if (b < 0 || b > 1) return; rgb2HSV(r, g, b, &(c->h), &(c->s), &(c->v)); updateDialog(c, c->editBDouble); }
void ossimQtBrightnessContrastDialog::resetClicked() { if (theFilter) { theFilter->setBrightness(0.0); theFilter->setContrast(1.0); updateDialog(); // Force the window to repaint. ossimQtDisplayUtility::flushAllOutputs(theFilter, true); } }
SoundLibraryRepositoryDialog::SoundLibraryRepositoryDialog( QWidget* pParent ) : QDialog( pParent ) , Object( __class_name ) { setupUi( this ); INFOLOG( "INIT" ); setWindowTitle( trUtf8( "Edit repository settings" ) ); setFixedSize( width(), height() ); updateDialog(); }
void SoundLibraryRepositoryDialog::on_AddBtn_clicked() { H2Core::Preferences *pPref = H2Core::Preferences::get_instance(); bool ok; QString text = QInputDialog::getText(this, trUtf8("Edit server list"), trUtf8("URL"), QLineEdit::Normal,QString(""), &ok); if( ok && !text.isEmpty() ){ pPref->sServerList.push_back( text ); } updateDialog(); }
static void bIntChanged(struct colorDialog *c) { double r, g, b; int i; hsv2RGB(c->h, c->s, c->v, &r, &g, &b); i = editInt(c->editBInt); if (i < 0 || i > 255) return; b = ((double) i) / 255.0; rgb2HSV(r, g, b, &(c->h), &(c->s), &(c->v)); updateDialog(c, c->editBInt); }
/** * Help/About Menu **/ QMenu *QVLCMenu::HelpMenu( QWidget *parent ) { QMenu *menu = new QMenu( parent ); addDPStaticEntry( menu, qtr( "&Help..." ) , ":/menu/help", SLOT( helpDialog() ), "F1" ); #ifdef UPDATE_CHECK addDPStaticEntry( menu, qtr( "Check for &Updates..." ) , "", SLOT( updateDialog() ) ); #endif menu->addSeparator(); addDPStaticEntry( menu, qtr( I_MENU_ABOUT ), ":/menu/info", SLOT( aboutDialog() ), "Shift+F1" ); return menu; }
INT CALLBACK GroupGeneralPage::dialogProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) { switch ( msg ) { case WM_COMMAND: { if ( HIWORD(wParam)==BN_CLICKED ) { updateDialog(); } } break; } return 0; }
static void hexChanged(struct colorDialog *c) { WCHAR *buf; double r, g, b, a; BOOL is; buf = windowText(c->editHex); is = hex2RGBA(buf, &r, &g, &b, &a); uiFree(buf); if (!is) return; rgb2HSV(r, g, b, &(c->h), &(c->s), &(c->v)); c->a = a; updateDialog(c, c->editHex); }
void ossimQtIgenController::setSceneBoundingRect() { if (!theWidget) return; //--- // theWidget is actually on a tile boundary so we want the fitted // rect and not any null buffer pixels. //--- setWidgetRect(theWidget->getSceneBoundingRect()); theLines = getLines(); theSamples = getSamples(); updateOutputGrect(); updateDialog(); }