这篇教程C++ updateLayout函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateLayout函数的典型用法代码示例。如果您正苦于以下问题:C++ updateLayout函数的具体用法?C++ updateLayout怎么用?C++ updateLayout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateLayout函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: layoutvoid TrayApplet::onWindowClosed(WId window){ for(QList<CWindowIcon*>::iterator pos = m_icons.begin(); pos != m_icons.end(); pos++) { if(**pos == window) { layout()->removeWidget(*pos); delete *pos; m_icons.erase(pos); updateLayout(); break; } }}
开发者ID:GravisZro,项目名称:qtpanel,代码行数:14,
示例2: switchvoid MusicBar::setInsertSymbolFromCursor(){ /*! @todo There has to be something to get all Embellishments, or else * this code has to be modified for every new Embellishmet */ int t_insSymType = 0; if(m_insertSymbol != 0){ t_insSymType = m_insertSymbol->type(); } if(m_cursor != 0){ int type = m_cursor->type(); switch(type){ case MelodyNoteType: { const MelodyNote *note = qgraphicsitem_cast<const MelodyNote *>(m_cursor); m_insertSymbol = new MelodyNote(note->pitchList(), note->pen(), note->pitch(), note->length()->length()); m_insertSymbol->setVisible(true); break; } case DoublingType: { const Doubling *dbl = qgraphicsitem_cast<const Doubling *>(m_cursor); m_insertSymbol = new Doubling(dbl->pitchList(), dbl->pen()); break; } case SingleGraceType: { const SingleGrace *grace = qgraphicsitem_cast<const SingleGrace *>(m_cursor); m_insertSymbol = new SingleGrace(grace->pitchList(), grace->pen()); break; } case GripType: { const Grip *grip = qgraphicsitem_cast<const Grip *>(m_cursor); m_insertSymbol = new Grip(grip->pitchList(), grip->pen()); } } m_insertSymbol->setHovermode(true); m_insertSymbol->setFlags(QGraphicsItem::ItemIsFocusable); m_insertSymbol->setFocus(Qt::MouseFocusReason); } else { if(m_cursorIdx != -1){ removeSymbol(m_cursorIdx); updateLayout(); m_cursorIdx = -1; m_stemDrawer->update(m_stemDrawer->boundingRect()); } if(m_insertSymbol != 0){ delete m_insertSymbol; m_insertSymbol = 0; } }}
开发者ID:tomvodi,项目名称:LimePipes-prototype,代码行数:49,
示例3: switch/*! /brief Adds handling of layout requests /param event Event /return See QFrame::event()*/bool QwtPlot::event( QEvent *event ){ bool ok = QFrame::event( event ); switch ( event->type() ) { case QEvent::LayoutRequest: updateLayout(); break; case QEvent::PolishRequest: replot(); break; default:; } return ok;}
开发者ID:AleksandraPalosz,项目名称:ecg_holter,代码行数:21,
示例4: getRectvoid LLAccordionCtrlTab::onScrollPosChangeCallback(S32, LLScrollbar*){ LLRect child_rect; S32 width = getRect().getWidth(); S32 height = getRect().getHeight(); child_rect.setLeftTopAndSize( getPaddingLeft(), height - getHeaderHeight() - getPaddingTop(), width - getPaddingLeft() - getPaddingRight(), height - getHeaderHeight() - getPaddingTop() - getPaddingBottom() ); updateLayout(child_rect);}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:15,
示例5: vec2void UIView::setPosition(float x, float y){ // Offset children vec2 offset = vec2(x,y) - getPosition(); // -- update the top-left position of this control mRect.left = x; mRect.top = y; updateLayout(); offsetChildrenPosition(offset); onPositionChanged();}
开发者ID:YurieCo,项目名称:Nephilim,代码行数:15,
示例6: switch //__________________________________________________________________ bool StyleConfig::eventFilter( QObject* object, QEvent* event ) { switch( event->type() ) { case QEvent::ShowToParent: object->event( event ); updateLayout(); return true; default: return false; } }
开发者ID:walac,项目名称:kde-workspace,代码行数:16,
示例7: getCustomComponentComponent* AlertWindow::removeCustomComponent (const int index){ Component* const c = getCustomComponent (index); if (c != nullptr) { customComps.removeFirstMatchingValue (c); allComps.removeFirstMatchingValue (c); removeChildComponent (c); updateLayout (false); } return c;}
开发者ID:Amcut,项目名称:pizmidi,代码行数:15,
示例8: QPlainTextEditGenericCodeEditor::GenericCodeEditor( Document *doc, QWidget *parent ): QPlainTextEdit( parent ), mDoc(doc){ Q_ASSERT(mDoc != 0); setFrameShape( QFrame::NoFrame ); mLineIndicator = new LineIndicator(this); mLineIndicator->move( contentsRect().topLeft() ); mOverlay = new QGraphicsScene(this); QGraphicsView *overlayView = new QGraphicsView(mOverlay, this); overlayView->setFrameShape( QFrame::NoFrame ); overlayView->setBackgroundBrush( Qt::NoBrush ); overlayView->setStyleSheet("background: transparent"); overlayView->setFocusPolicy( Qt::NoFocus ); overlayView->setAttribute(Qt::WA_TransparentForMouseEvents, true); overlayView->setSceneRect(QRectF(0,0,1,1)); overlayView->setAlignment(Qt::AlignLeft | Qt::AlignTop); mOverlayWidget = overlayView; connect( mDoc, SIGNAL(defaultFontChanged()), this, SLOT(onDocumentFontChanged()) ); connect( this, SIGNAL(blockCountChanged(int)), mLineIndicator, SLOT(setLineCount(int)) ); connect( mLineIndicator, SIGNAL( widthChanged() ), this, SLOT( updateLayout() ) ); connect( this, SIGNAL(updateRequest(QRect,int)), this, SLOT(updateLineIndicator(QRect,int)) ); connect( this, SIGNAL(selectionChanged()), mLineIndicator, SLOT(update()) ); connect( Main::instance(), SIGNAL(applySettingsRequest(Settings::Manager*)), this, SLOT(applySettings(Settings::Manager*)) ); QTextDocument *tdoc = doc->textDocument(); QPlainTextEdit::setDocument(tdoc); onDocumentFontChanged(); mLineIndicator->setLineCount(blockCount()); applySettings( Main::settings() );}
开发者ID:Sybn,项目名称:supercollider,代码行数:48,
示例9: ASSERTvoid EditCommand::apply(){ ASSERT(m_document); ASSERT(m_document->frame()); Frame* frame = m_document->frame(); if (isTopLevelCommand()) { if (!endingSelection().isContentRichlyEditable()) { switch (editingAction()) { case EditActionTyping: case EditActionPaste: case EditActionDrag: case EditActionSetWritingDirection: case EditActionCut: case EditActionUnspecified: break; default: ASSERT_NOT_REACHED(); return; } } } // Changes to the document may have been made since the last editing operation that // require a layout, as in <rdar://problem/5658603>. Low level operations, like // RemoveNodeCommand, don't require a layout because the high level operations that // use them perform one if one is necessary (like for the creation of VisiblePositions). if (isTopLevelCommand()) updateLayout(); { EventQueueScope scope; DeleteButtonController* deleteButtonController = frame->editor()->deleteButtonController(); deleteButtonController->disable(); doApply(); deleteButtonController->enable(); } if (isTopLevelCommand()) { // Only need to call appliedEditing for top-level commands, and TypingCommands do it on their // own (see TypingCommand::typingAddedToOpenCommand). if (!isTypingCommand()) frame->editor()->appliedEditing(this); } setShouldRetainAutocorrectionIndicator(false);}
开发者ID:13W,项目名称:phantomjs,代码行数:48,
示例10: updateCanvasMargins/*! /brief Event filter The plot handles the following events for the canvas: - QEvent::Resize The canvas margins might depend on its size - QEvent::ContentsRectChange The layout needs to be recalculated /param object Object to be filtered /param event Event /return See QFrame::eventFilter() /sa updateCanvasMargins(), updateLayout()*/bool QwtPlot::eventFilter( QObject *object, QEvent *event ){ if ( object == d_data->canvas ) { if ( event->type() == QEvent::Resize ) { updateCanvasMargins(); } else if ( event->type() == QEvent::ContentsRectChange ) { updateLayout(); } } return QFrame::eventFilter( object, event );}
开发者ID:AleksandraPalosz,项目名称:ecg_holter,代码行数:34,
示例11: show_hide_scrollbarvoid LLAccordionCtrlTab::adjustContainerPanel(const LLRect& child_rect){ if(!mContainerPanel) return; if(!mFitPanel) { show_hide_scrollbar(child_rect); updateLayout(child_rect); } else { mContainerPanel->reshape(child_rect.getWidth(),child_rect.getHeight()); mContainerPanel->setRect(child_rect); }}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:16,
示例12: setMinZoomFactorvoid SinglePhotoPreviewLayout::updateZoomAndSize(){ // Set zoom for fit-in-window as minimum, but don't scale up images // that are smaller than the available space, only scale down. double fitZoom = d->zoomSettings()->fitToSizeZoomFactor(d->frameSize(), ImageZoomSettings::OnlyScaleDown); setMinZoomFactor(fitZoom); setMaxZoomFactor(12.0); // Is currently the zoom factor set to fit to window? Then set it again to fit the new size. if (zoomFactor() <= fitZoom || d->isFitToWindow) { fitToWindow(); } updateLayout();}
开发者ID:UIKit0,项目名称:digikam,代码行数:16,
示例13: setDockAreavoidCQSplitterArea::setDockArea(Qt::DockWidgetArea dockArea){ dockArea_ = dockArea; if (isVerticalDockArea()) splitter()->setOrientation(Qt::Vertical); else splitter()->setOrientation(Qt::Horizontal); handle_->updateState(); if (isVisible()) updateLayout();}
开发者ID:colinw7,项目名称:CQPaletteArea,代码行数:16,
示例14: CQSplitterAreaCQSplitterArea::CQSplitterArea(CQPaletteArea *palette) : QWidget(0), palette_(palette), dockArea_(Qt::LeftDockWidgetArea), resizable_(true), floating_(false){ splitter_ = new QSplitter(this); splitter_->setObjectName("splitter"); handle_ = new CQSplitterHandle(this); handle_->setObjectName(QString("%1_handle").arg(palette_->objectName())); if (isVisible()) updateLayout();}
开发者ID:colinw7,项目名称:CQPaletteArea,代码行数:16,
示例15: removeSymbolvoid MusicBar::keyPressEvent(QKeyEvent *event){ //qDebug() << "MusicBar Key press event"; if(event->key() == Qt::Key_Delete){ for(int i=0; i<m_symbols.size(); i++){ Symbol *t_sym = m_symbols.at(i); if(t_sym->hasFocus()){ removeSymbol(i); delete t_sym; } } updateLayout(); } else { event->ignore(); }}
开发者ID:tomvodi,项目名称:LimePipes-prototype,代码行数:16,
示例16: switch/*! /brief Adds handling of QEvent::LayoutHint*/bool QwtPlot::event(QEvent *e){ bool ok = QFrame::event(e); switch(e->type()) {#if 0 case QEvent::ChildInserted: case QEvent::ChildRemoved:#endif case QEvent::LayoutHint: updateLayout(); break; default:; } return ok;}
开发者ID:ahinoamp,项目名称:Research,代码行数:19,
示例17: ComboBox//==============================================================================void AlertWindow::addComboBox (const String& name, const StringArray& items, const String& onScreenLabel){ ComboBox* const cb = new ComboBox (name); comboBoxes.add (cb); allComps.add (cb); cb->addItemList (items, 1); addAndMakeVisible (cb); cb->setSelectedItemIndex (0); comboBoxNames.add (onScreenLabel); updateLayout (false);}
开发者ID:Amcut,项目名称:pizmidi,代码行数:17,
示例18: updateLayout/* SToolBar::addGroup * Adds [group] to the toolbar *******************************************************************/void SToolBar::addGroup(SToolBarGroup* group){ // Set the group's parent group->SetParent(this); // Set background colour group->SetBackgroundColour(GetBackgroundColour()); // Add it to the list of groups groups.push_back(group); // Update layout updateLayout(true); Bind(wxEVT_STOOLBAR_BUTTON_CLICKED, &SToolBar::onButtonClick, this, group->GetId());}
开发者ID:Blzut3,项目名称:SLADE,代码行数:19,
示例19: ComboBox//==============================================================================void AlertWindow::addComboBox (const String& name, const StringArray& items, const String& onScreenLabel){ ComboBox* const cb = new ComboBox (name); comboBoxes.add (cb); allComps.add (cb); for (int i = 0; i < items.size(); ++i) cb->addItem (items[i], i + 1); addAndMakeVisible (cb); cb->setSelectedItemIndex (0); comboBoxNames.add (onScreenLabel); updateLayout (false);}
开发者ID:baeksanchang,项目名称:juce,代码行数:18,
示例20: jassertvoid FoldablePanel::addSection (const String& sectionTitle, Component* const newPanel, const Colour sectionColour, const int sectionHeight, ParamStepped<eSectionState>* sectionState, const int indexToInsertAt){ jassert (sectionTitle.isNotEmpty()); if (isEmpty()) { repaint(); } panelHolderComponent->insertSection (indexToInsertAt, new SectionComponent (sectionTitle, newPanel, sectionColour, sectionHeight, sectionState)); resized(); updateLayout();}
开发者ID:ahmadfarihan,项目名称:the-source,代码行数:17,
示例21: ifvoid OverlayUserGroup::wheelEvent(QGraphicsSceneWheelEvent *event) { event->accept(); qreal scale = 0.875f; if (event->delta() > 0) scale = 1.0f / 0.875f; if ((scale < 1.0f) && (os->fZoom <= (1.0f / 4.0f))) return; else if ((scale > 1.0f) && (os->fZoom >= 4.0f)) return; os->fZoom *= scale; updateLayout();}
开发者ID:Chasophias,项目名称:mumble,代码行数:17,
示例22: SToolBarGroupvoid SToolBar::addActionGroup(string name, wxArrayString actions){ // Do nothing if no actions were given if (actions.size() == 0) return; // Create new toolbar group SToolBarGroup* group = new SToolBarGroup(this, name); groups.push_back(group); // Add actions to the group for (unsigned a = 0; a < actions.size(); a++) group->addActionButton(actions[a]); // Update layout updateLayout(true);}
开发者ID:DemolisherOfSouls,项目名称:SLADE,代码行数:17,
示例23: QWidgetQWidget* TKAction::createLayout(QWidget* parent, QWidget* children){ QWidget* base = new QWidget(parent,"KTToolBarLayout"); QLabel* textLabel = new QLabel(base,"text"); textLabel->setMinimumHeight(1); QLabel* pixLabel = new QLabel(base,"pixmap"); children->reparent(base,QPoint(0,0)); children->setName("widget"); QHBoxLayout* layout = new QHBoxLayout(base,0,3); layout->setResizeMode(QLayout::Minimum); layout->addWidget(textLabel); layout->addWidget(pixLabel); layout->addWidget(children,1); updateLayout(base); return base;}
开发者ID:RainerBlessing,项目名称:KTagebuch,代码行数:17,
示例24: updateButtonsvoid OsuPauseMenu::setVisible(bool visible){ m_bVisible = visible; // reset m_selectedButton = NULL; m_bInitialWarningArrowFlyIn = true; m_fWarningArrowsAnimAlpha = 0.0f; if (m_bVisible) { updateButtons(); updateLayout(); } m_osu->updateConfineCursor();}
开发者ID:Simonas1122,项目名称:McOsu,代码行数:17,
示例25: TQFrameTDEAboutContributor::TDEAboutContributor( TQWidget *_parent, const char *wname, const TQString &_name,const TQString &_email, const TQString &_url, const TQString &_work, bool showHeader, bool showFrame, bool showBold ) : TQFrame( _parent, wname ), mShowHeader(showHeader), mShowBold(showBold), d(0){ if( showFrame ) { setFrameStyle(TQFrame::Panel | TQFrame::Raised); } mLabel[0] = new TQLabel( this ); mLabel[1] = new TQLabel( this ); mLabel[2] = new TQLabel( this ); mLabel[3] = new TQLabel( this ); mText[0] = new TQLabel( this ); mText[1] = new KURLLabel( this ); mText[2] = new KURLLabel( this ); mText[3] = new TQLabel( this ); setName( _name, i18n("Author"), false ); setEmail( _email, i18n("Email"), false ); setURL( _url, i18n("Homepage"), false ); setWork( _work, i18n("Task"), false ); KURLLabel *kurl = static_cast<KURLLabel *>(mText[1]); kurl->setFloat(true); kurl->setUnderline(true); kurl->setMargin(0); connect(kurl, TQT_SIGNAL(leftClickedURL(const TQString &)), TQT_SLOT(emailClickedSlot(const TQString &))); kurl = static_cast<KURLLabel *>(mText[2]); kurl->setFloat(true); kurl->setUnderline(true); kurl->setMargin(0); connect(kurl, TQT_SIGNAL(leftClickedURL(const TQString &)), TQT_SLOT(urlClickedSlot(const TQString &))); mLabel[3]->setAlignment( AlignTop ); fontChange( font() ); updateLayout();}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:45,
示例26: AlertWindowTextEditor//==============================================================================void AlertWindow::addTextEditor (const String& name, const String& initialContents, const String& onScreenLabel, const bool isPasswordBox){ AlertWindowTextEditor* const tc = new AlertWindowTextEditor (name, isPasswordBox); textBoxes.add (tc); allComps.add (tc); tc->setColour (TextEditor::outlineColourId, findColour (ComboBox::outlineColourId)); tc->setFont (getLookAndFeel().getAlertWindowMessageFont()); tc->setText (initialContents); tc->setCaretPosition (initialContents.length()); addAndMakeVisible (tc); textboxNames.add (onScreenLabel); updateLayout (false);}
开发者ID:Amcut,项目名称:pizmidi,代码行数:19,
示例27: TagWidgetvoid TagFilterWidget::onTagAdded(const QString& name, TagFilter::Action action){ TagWidget* widget = new TagWidget(name, action, this); widget->show(); widgets_.append(widget); connect(widget, SIGNAL(changed(QString,TagFilter::Action)), filter_, SLOT(setTag(QString,TagFilter::Action))); connect(widget, SIGNAL(removed(QString)), filter_, SLOT(removeTag(QString))); updateLayout();}
开发者ID:phantom-code,项目名称:mindcache,代码行数:18,
示例28: updateLayoutvoid MainWindow::on_renderingCheckBox_stateChanged(int state ){ iTimer->stop(); if( state == Qt::Unchecked ) { ui->rendererName->setEnabled( false ); ui->rendererUid->setEnabled( false ); ui->comboBox->setEnabled( true ); updateLayout(); } else if ( state == Qt::Checked) { ui->rendererName->setEnabled( true ); ui->rendererUid->setEnabled( true); ui->comboBox->setEnabled( false ); }}
开发者ID:wannaphongcom,项目名称:symbian-incubation-projects.fcl-widgetbuilder,代码行数:18,
注:本文中的updateLayout函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updateLineNumberAreaWidth函数代码示例 C++ updateLabel函数代码示例 |