这篇教程C++ updateColors函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateColors函数的典型用法代码示例。如果您正苦于以下问题:C++ updateColors函数的具体用法?C++ updateColors怎么用?C++ updateColors使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateColors函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: assertvoid SDLFontGL::setupColors(std::vector<SDL_Color> colors) { assert(!colors.empty()); m_colors = colors; updateColors(); // cursor does a manual color lookup updateCursor();}
开发者ID:RyanHope,项目名称:wTerm,代码行数:8,
示例2: HbWidgetBaseHbAnchorArrowDrawer::HbAnchorArrowDrawer(HbAnchorLayout *layout, QGraphicsItem *parent) : HbWidgetBase(parent), mLayout(layout), mDrawOutlines(true), mDrawArrows(true), mDrawSpacers(true){#if defined(HB_DEVELOPER) || defined(CSS_INSPECTOR) updateColors();#endif}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:8,
示例3: updateColors void Canvas::update() { if (_dirty) { updateColors(); _dirty = false; } }
开发者ID:gwthomas,项目名称:sol-framework,代码行数:8,
示例4: updateVerticesinline void vertex_buffer_object<Ta, Te>::update(){ updateVertices(); updateNormals(); updateColors(); updateTexCoords(); updateElements();}
开发者ID:xalpha,项目名称:nyx,代码行数:8,
示例5: WXUNUSEDvoid FieldPropertiesDialog::OnRadioGeneratorClick(wxCommandEvent& WXUNUSED(event)){ textctrl_generator_name->SetEditable(radio_generator_new->GetValue()); updateColors(); choice_generator->Enable(radio_generator_existing->GetValue()); updateSqlStatement();}
开发者ID:DragonZX,项目名称:flamerobin,代码行数:8,
示例6: updateColorsvoid SkLabel::setDefaultForegroundColor (const QColor &color){ // TODO: this will use the parent's foreground color as this widget's // foreground color, which means that it will not be updated if the // style is changed. defaultForegroundColor=color; updateColors ();}
开发者ID:fb,项目名称:startkladde,代码行数:8,
示例7: updateRed//! Updates all the gui componentsvoid VtkColorTable::updateAll(const QColor & val) { updateRed(val.red(), false); updateGreen(val.green(), false); updateBlue(val.blue(), false); updateColors(); updateColorFunction();}
开发者ID:pengwg,项目名称:vurtigo,代码行数:9,
示例8: definedvoid HbAnchorArrowDrawer::changeEvent(QEvent *event){#if defined(HB_DEVELOPER) || defined(CSS_INSPECTOR) if (event->type() == HbEvent::ThemeChanged) updateColors();#endif HbWidgetBase::changeEvent(event);}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:8,
示例9: setupUicolorPicker::colorPicker(QWidget *parent):QWidget(parent){ setupUi(this); color=Qt::black; connect(red, SIGNAL( valueChanged(int) ), this, SLOT( setRed(int) ) ); connect(green, SIGNAL( valueChanged(int) ), this, SLOT( setGreen(int) ) ); connect(blue, SIGNAL( valueChanged(int) ), this, SLOT( setBlue(int) ) ); connect(editBtn, SIGNAL( clicked() ), this, SLOT( displayPicker() ) ); updateColors();}
开发者ID:Lorentz83,项目名称:fractals3d,代码行数:9,
示例10: getColorsvoid Vga::sunset() { Dac tab[256]; getColors(tab); for (int i = 64; i >= 0; i -= kFadeStep) { setColors(tab, i); waitVR(); updateColors(); }}
开发者ID:grayfoxier,项目名称:scummvm,代码行数:9,
示例11: dataEnginevoid Clock::init(){ ClockApplet::init(); dataEngine("time")->connectSource(currentTimezone(), this, updateInterval(), intervalAlignment()); connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(updateColors())); connect(KGlobalSettings::self(), SIGNAL(appearanceChanged()), SLOT(resetSize())); connect(KGlobalSettings::self(), SIGNAL(settingsChanged(int)), SLOT(updateClock(int)));}
开发者ID:mgottschlag,项目名称:kwin-tiling,代码行数:9,
示例12: updateColorsvoid PropertyEditor::slotColoring(bool coloring){ if (coloring == m_coloring) return; m_coloring = coloring; updateColors();}
开发者ID:Fale,项目名称:qtmoko,代码行数:9,
示例13: WXUNUSEDvoid DatabaseRegistrationDialog::OnAuthenticationChange( wxCommandEvent& WXUNUSED(event)){ if (IsShown()) { updateAuthenticationMode(); updateColors(); }}
开发者ID:AlfiyaZi,项目名称:flamerobin,代码行数:9,
示例14: whilevoid Simulator::processInput(void){ // handle events sf::Event event; while (window.pollEvent(event)) { if (event.type == sf::Event::Closed) { // end the program running = false; } else if (event.type == sf::Event::Resized) { // adjust the viewport when the window is resized glViewport(0, 0, event.size.width, event.size.height); } else if (event.type == sf::Event::KeyPressed) { if (event.key.code == sf::Keyboard::I) { colors_inverted = !colors_inverted; updateColors(); } else if (event.key.code == sf::Keyboard::Up) { if (colorscheme < (colorschemes.size()/2)-1) { colorscheme++; updateColors(); } } else if (event.key.code == sf::Keyboard::Down) { if (colorscheme > 0) { colorscheme--; updateColors(); } } } } if (sf::Keyboard::isKeyPressed(sf::Keyboard::Escape)) { running = false; } // use convenient static functions input.button_a = sf::Keyboard::isKeyPressed(sf::Keyboard::Left); input.button_b = sf::Keyboard::isKeyPressed(sf::Keyboard::Right); input.button_p2_a = sf::Keyboard::isKeyPressed(sf::Keyboard::A); input.button_p2_b = sf::Keyboard::isKeyPressed(sf::Keyboard::E); input.restart = sf::Keyboard::isKeyPressed(sf::Keyboard::R);}
开发者ID:megaknoc,项目名称:mini_hexagon,代码行数:44,
示例15: disconnectvoid Workspace::setCurrentProject( Project *pro ){ if ( project == pro ) return; if ( project ) { disconnect( project, SIGNAL( sourceFileAdded(SourceFile*) ), this, SLOT( sourceFileAdded(SourceFile*) ) ); disconnect( project, SIGNAL( sourceFileRemoved(SourceFile*) ), this, SLOT( sourceFileRemoved(SourceFile*) ) ); disconnect( project, SIGNAL( formFileAdded(FormFile*) ), this, SLOT( formFileAdded(FormFile*) ) ); disconnect( project, SIGNAL( formFileRemoved(FormFile*) ), this, SLOT( formFileRemoved(FormFile*) ) ); disconnect( project, SIGNAL( objectAdded(QObject*) ), this, SLOT( objectAdded(QObject*) ) ); disconnect( project, SIGNAL( objectRemoved(QObject*) ), this, SLOT( objectRemoved(QObject*) ) ); disconnect( project, SIGNAL( projectModified() ), this, SLOT( update() ) ); } project = pro; connect( project, SIGNAL( sourceFileAdded(SourceFile*) ), this, SLOT( sourceFileAdded(SourceFile*) ) ); connect( project, SIGNAL( sourceFileRemoved(SourceFile*) ), this, SLOT( sourceFileRemoved(SourceFile*) ) ); connect( project, SIGNAL( formFileAdded(FormFile*) ), this, SLOT( formFileAdded(FormFile*) ) ); connect( project, SIGNAL( formFileRemoved(FormFile*) ), this, SLOT( formFileRemoved(FormFile*) ) ); connect( project, SIGNAL( destroyed(QObject*) ), this, SLOT( projectDestroyed(QObject*) ) ); connect( project, SIGNAL( objectAdded(QObject*) ), this, SLOT( objectAdded(QObject*) ) ); connect( project, SIGNAL( objectRemoved(QObject*) ), this, SLOT( objectRemoved(QObject*) ) ); connect( project, SIGNAL( projectModified() ), this, SLOT( update() ) ); clear(); if ( bufferEdit ) bufferEdit->clear(); projectItem = new WorkspaceItem( this, project ); projectItem->setOpen( TRUE ); for ( QPtrListIterator<SourceFile> sources = project->sourceFiles(); sources.current(); ++sources ) { SourceFile* f = sources.current(); (void) new WorkspaceItem( projectItem, f ); } for ( QPtrListIterator<FormFile> forms = project->formFiles(); forms.current(); ++forms ) { FormFile* f = forms.current(); if ( f->isFake() ) continue; (void) new WorkspaceItem( projectItem, f ); } QObjectList l = project->objects(); QObjectListIt objs( l ); for ( ;objs.current(); ++objs ) { QObject* o = objs.current(); (void) new WorkspaceItem( projectItem, o, project ); } updateColors(); completionDirty = TRUE;}
开发者ID:Miguel-J,项目名称:eneboo-core,代码行数:56,
示例16: configvoid Clock::clockConfigChanged(){ KConfigGroup cg = config(); m_showTimezone = cg.readEntry("showTimezone", !isLocalTimezone()); kDebug() << "showTimezone:" << m_showTimezone; if (cg.hasKey("showDate")) { //legacy config entry as of 2011-1-4 m_dateStyle = cg.readEntry("showDate", false) ? 2 : 0; //short date : no date cg.deleteEntry("showDate"); } else { m_dateStyle = cg.readEntry("dateStyle", 0); } if (cg.hasKey("showYear")) { //legacy config entry as of 2011-1-4 if( m_dateStyle ) { m_dateStyle = cg.readEntry("showYear", false) ? 2 : 1; //short date : compact date } cg.deleteEntry("showYear"); } m_showSeconds = cg.readEntry("showSeconds", false); if (m_showSeconds) { //We don't need to cache the applet if it update every seconds setCacheMode(QGraphicsItem::NoCache); } else { setCacheMode(QGraphicsItem::DeviceCoordinateCache); } QFont f = cg.readEntry("plainClockFont", m_plainClockFont); m_isDefaultFont = f == m_plainClockFont; m_plainClockFont = f; m_useCustomColor = cg.readEntry("useCustomColor", m_useCustomColor); m_plainClockColor = cg.readEntry("plainClockColor", m_plainClockColor); m_useCustomShadowColor = cg.readEntry("useCustomShadowColor", m_useCustomShadowColor); m_plainClockShadowColor = cg.readEntry("plainClockShadowColor", m_plainClockShadowColor); m_drawShadow = cg.readEntry("plainClockDrawShadow", m_drawShadow); updateColors(); if (m_useCustomColor) { m_pixmap = QPixmap(); delete m_svg; m_svg = 0; } const QFontMetricsF metrics(KGlobalSettings::smallestReadableFont()); const QString timeString = KGlobal::locale()->formatTime(QTime(23, 59), m_showSeconds); setMinimumSize(metrics.size(Qt::TextSingleLine, timeString)); if (isUserConfiguring()) { updateSize(); }}
开发者ID:mgottschlag,项目名称:kwin-tiling,代码行数:56,
示例17: updateColorsvoid AbstractTableView::Initialize(){ // Required to be called by each constructor because // of VTable changes // // Init all other updates once updateColors(); updateFonts(); updateShortcuts();}
开发者ID:killbug2004,项目名称:xiew,代码行数:10,
示例18: updateColors// Draws snake body as single point(1 pixel)void Board::drawPointFast(uint8_t xPoint, uint8_t yPoint){ // Set new stroke TFTscreen.stroke(rgbColour[0], rgbColour[1], rgbColour[2]); // Draw 9x9 square TFTscreen.point(xPoint, yPoint); // Set new colors updateColors();}
开发者ID:IdarV,项目名称:Arduino,代码行数:11,
示例19: updateColorsvoid myGLWidget::setColor(Color c){ m_color = c; for (unsigned int x = 0; x < m_colors.size(); x += 3) { m_colors[x] = m_color.red(); m_colors[x + 1] = m_color.green(); m_colors[x + 2] = m_color.blue(); } updateColors();}
开发者ID:GuillaumeGomez,项目名称:file-explorer-3D,代码行数:10,
示例20: GMScrollFrameGMSourceView::GMSourceView(FXComposite* p) : GMScrollFrame(p) , source(NULL) { sourcelistheader = new GMHeaderButton(this,tr("Sources/tPress to change sorting order/tPress to change sorting order"),NULL,this,ID_SOURCE_LIST_HEADER,LAYOUT_FILL_X|FRAME_RAISED|JUSTIFY_LEFT); sourcelist = new GMTreeList(this,this,ID_SOURCE_LIST,LAYOUT_FILL_X|LAYOUT_FILL_Y|TREELIST_BROWSESELECT); sourcelist->dropEnable(); sourcelist->setSortFunc(source_list_sort); sourcelistheader->setArrowState(ARROW_DOWN); updateColors(); }
开发者ID:AenBleidd,项目名称:gogglesmm,代码行数:11,
示例21: updateColorsvoid QScintillaWidget::changeEvent(QEvent *pEvent){ // Default handling of the event QsciScintilla::changeEvent(pEvent); // Check whether the palette has changed and if so then update our colors if (pEvent->type() == QEvent::PaletteChange) updateColors();}
开发者ID:nickerso,项目名称:opencor,代码行数:11,
示例22: SWAPvoid Vga::update() { SWAP(Vga::_page[0], Vga::_page[1]); if (_setPal) { updateColors(); _setPal = false; } g_system->copyRectToScreen((const byte *)Vga::_page[0]->getBasePtr(0, 0), kScrWidth, 0, 0, kScrWidth, kScrHeight); g_system->updateScreen();}
开发者ID:grayfoxier,项目名称:scummvm,代码行数:11,
示例23: switchbool FlatTitleBar::eventFilter(QObject *, QEvent *event){ switch (event->type()) { case QEvent::WindowActivate: case QEvent::WindowDeactivate: updateColors(); default: break; } return false;}
开发者ID:destan,项目名称:cevirgec,代码行数:11,
示例24: palettevoid PropertyEditor::updateForegroundBrightness(){ QColor c = palette().color(QPalette::Text); bool newBrightness = qRound(0.3 * c.redF() + 0.59 * c.greenF() + 0.11 * c.blueF()); if (m_brightness == newBrightness) return; m_brightness = newBrightness; updateColors();}
开发者ID:Fale,项目名称:qtmoko,代码行数:12,
示例25: QColorDialogvoid DotPlotDialog::sl_invertedColorButton() { QObjectScopedPointer<QColorDialog> d = new QColorDialog(invertedColor, this); d->exec(); CHECK(!d.isNull(), ); if (QDialog::Accepted == d->result()) { invertedColor = d->selectedColor(); invertedCheckBox->setChecked(true); } updateColors();}
开发者ID:ugeneunipro,项目名称:ugene-old,代码行数:12,
示例26: QPlainTextEditEditor::Editor(QWidget *parent) : QPlainTextEdit(parent){ propDialog = ((MainWindow *) parent)->propDialog; ctrlPressed = false; isSpin = false; expectAutoComplete = false; canUndo = false; canRedo = false; canCopy = false; lineNumberArea = new LineNumberArea(this); connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateLineNumberAreaWidth())); connect(this, SIGNAL(updateRequest(QRect,int)), this, SLOT(updateLineNumberArea(QRect,int))); updateLineNumberAreaWidth(); highlighter = 0; setHighlights(); setMouseTracking(true); setCenterOnScroll(true); setWordWrapMode(QTextOption::NoWrap); currentTheme = &Singleton<ColorScheme>::Instance(); updateColors(); updateFonts(); saveContent(); connect(this,SIGNAL(cursorPositionChanged()),this,SLOT(updateBackgroundColors())); connect(propDialog,SIGNAL(updateColors()),this,SLOT(updateColors())); connect(propDialog,SIGNAL(updateFonts()),this,SLOT(updateFonts())); connect(propDialog->getTabSpaceLedit(),SIGNAL(textChanged(QString)), this, SLOT(tabSpacesChanged())); connect(this,SIGNAL(undoAvailable(bool)), this, SLOT(setUndo(bool))); connect(this,SIGNAL(redoAvailable(bool)), this, SLOT(setRedo(bool))); connect(this,SIGNAL(copyAvailable(bool)), this, SLOT(setCopy(bool))); // this must be a pointer otherwise we can't control the position. cbAuto = new QComboBox(this); cbAuto->hide();}
开发者ID:FeodorFitsner,项目名称:PropellerIDE,代码行数:40,
示例27: configvoid DateTimeGroup::configChanged(){ KConfigGroup cg = config(); if (isUserConfiguring()) { configAccepted(); } m_natoOperation = cg.readEntry("natoOperation", m_natoOperation); m_local= cg.readEntry("localTime", m_local); QFont f = cg.readEntry("plainDateTimeGroupFont", m_plainDateTimeGroupFont); m_isDefaultFont = f == m_plainDateTimeGroupFont; m_plainDateTimeGroupFont = f; m_useCustomColor = cg.readEntry("useCustomColor", m_useCustomColor); m_plainDateTimeGroupColor = cg.readEntry("plainDateTimeGroupColor", m_plainDateTimeGroupColor); m_useCustomShadowColor = cg.readEntry("useCustomShadowColor", m_useCustomShadowColor); m_plainDateTimeGroupShadowColor = cg.readEntry("plainDateTimeGroupShadowColor", m_plainDateTimeGroupShadowColor); m_drawShadow = cg.readEntry("plainDateTimeGroupDrawShadow", m_drawShadow); m_rounded=cg.readEntry("rounded",m_rounded); m_format=cg.readEntry("format",m_format); m_showSeconds=m_format==2; if (m_showSeconds) { //We don't need to cache the applet if it update every seconds setCacheMode(QGraphicsItem::NoCache); } else { setCacheMode(QGraphicsItem::DeviceCoordinateCache); } m_sAfterDay =cg.readEntry("sAfterDay", m_sAfterDay); m_sAfterHour = cg.readEntry("sAfterHour", m_sAfterHour); m_sAfterMinute = cg.readEntry("sAfterMinute", m_sAfterMinute); m_sAfterSecond = cg.readEntry("sAfterSecond", m_sAfterSecond); m_sAfterTimeZone = cg.readEntry("sAfterTimeZone", m_sAfterTimeZone); m_sAfterMonth = cg.readEntry("sAfterMonth", m_sAfterMonth); updateColors(); if (m_useCustomColor) { m_pixmap = QPixmap(); delete m_svg; m_svg = 0; } const QFontMetricsF metrics(KGlobalSettings::smallestReadableFont()); setMinimumSize(metrics.size(Qt::TextSingleLine, dtg)); updateSize();}
开发者ID:friedrico,项目名称:datetimegroup,代码行数:52,
示例28: updateColorsvoid VtkColorTable::updateBlue(int val, bool updateAll) { mainTable->item(mainTable->currentRow(), 3)->setText(QString::number(val)); Point point = points.at(mainTable->currentRow()); QColor & color = point.color; color.setBlue(val); points.replace(mainTable->currentRow(), point); if (updateAll) { updateColors(); updateColorFunction(); }}
开发者ID:pengwg,项目名称:vurtigo,代码行数:13,
示例29: debugvoid KIconEditGrid::load( QImage *image){ debug("KIconEditGrid::load"); setUpdatesEnabled(false); if(image != 0L) { *img = *fixTransparence(image); //*img = image->convertDepth(32); //img->setAlphaBuffer(true); } else { QString msg = i18n("There was an error loading a blank image./n"); KMsgBox::message (this, i18n("Error"), msg.data()); return; } setNumRows(img->height()); setNumCols(img->width()); for(int y = 0; y < numRows(); y++) { uint *l = (uint*)img->scanLine(y); for(int x = 0; x < numCols(); x++, l++) {/* //uint gray = (qRgb(200, 200, 200) | OPAQUE_MASK); //uint bc = (TRANSPARENT | OPAQUE_MASK); //if(*l == gray || *l == bc || *l < 0xff000000) // this is a hack but I couldn't save it as transparent otherwise if(*l < 0xff000000 || *l == (TRANSPARENT|OPAQUE_MASK)) // this is a hack but I couldn't save it as transparent otherwise { *l = TRANSPARENT; } //debug("KIcnGrid::load: %d %%", (((y*ncols)+x)/imgsize) * 100); //debug("KIconEditGrid::load: RGB: %d %d %d", qRed(*l), qGreen(*l), qBlue(*l));*/ setColor((y*numCols())+x, *l, false); } //debug("Row: %d", y); kapp->processEvents(200); } updateColors(); emit sizechanged(numCols(), numRows()); emit colorschanged(numColors(), data()); emit changed(pixmap()); setUpdatesEnabled(true); emit needPainting(); //repaint(viewRect(), false);}
开发者ID:kthxbyte,项目名称:KDE1-Linaro,代码行数:51,
注:本文中的updateColors函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updateContent函数代码示例 C++ updateColor函数代码示例 |