void QGroupBox::setTitle( const QString &title ) { if ( str == title ) // no change return; str = title; #ifndef QT_NO_ACCEL if ( accel ) delete accel; accel = 0; int s = QAccel::shortcutKey( title ); if ( s ) { accel = new QAccel( this, "automatic focus-change accelerator" ); accel->connectItem( accel->insertItem( s, 0 ), this, SLOT(fixFocus()) ); } #endif #ifndef QT_NO_CHECKBOX if ( d->checkbox ) { d->checkbox->setText( str ); updateCheckBoxGeometry(); } #endif calculateFrame(); setTextSpacer(); update(); updateGeometry(); #if defined(QT_ACCESSIBILITY_SUPPORT) QAccessible::updateAccessibility( this, 0, QAccessible::NameChanged ); #endif }
/*!\reimp */ void QGroupBox::fontChange( const QFont & oldFont ) { QWidget::fontChange( oldFont ); #ifndef QT_NO_CHECKBOX updateCheckBoxGeometry(); #endif calculateFrame(); setTextSpacer(); }
/*! \reimp */ void QGroupBox::resizeEvent( QResizeEvent *e ) { QFrame::resizeEvent(e); #ifndef QT_NO_CHECKBOX if ( align & AlignRight || align & AlignCenter || ( QApplication::reverseLayout() && !(align & AlignLeft) ) ) updateCheckBoxGeometry(); #endif calculateFrame(); }
void CQGroupBox:: setMarginTop(int margin) { marginTop_ = margin; calculateFrame(); update(); }
void CQGroupBox:: setMarginBottom(int margin) { marginBottom_ = margin; calculateFrame(); update(); }
void CQGroupBox:: setMarginRight(int margin) { marginRight_ = margin; calculateFrame(); update(); }
void CQGroupBox:: changeEvent(QEvent *e) { if (e->type() == QEvent::EnabledChange) updateEnabled(); calculateFrame(); QWidget::changeEvent(e); }
void CQGroupBox:: childEvent(QChildEvent *e) { if (e->type() != QEvent::ChildAdded || ! e->child()->isWidgetType()) return; calculateFrame(); if (isCheckable()) updateEnabled(); QWidget::childEvent(e); }
void QGroupBoxPrivate::init() { Q_Q(QGroupBox); align = Qt::AlignLeft; #ifndef QT_NO_SHORTCUT shortcutId = 0; #endif flat = false; checkable = false; checked = true; hover = false; pressedControl = QStyle::SC_None; calculateFrame(); q->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred, QSizePolicy::GroupBox)); }
/** * Returns a pointer to texture referenced by the current animFrame_. * Updates animFrame_ the first time the function gets called in a frame. * * @return pointer to the current texture. */ DX::BaseTexture* AnimatingTexture::pTexture( ) { BW_GUARD; calculateFrame(); // Find the texture for this frame. BaseTexturePtr tp; uint32 uanim = uint32(animFrame_); if (uanim < textures_.size()) { tp = textures_[uanim]; } else { DEBUG_MSG( "Wrong animFrame %f %d\n", animFrame_, textures_.size() ); } // If a texture was found, return it. if (tp) return tp->pTexture(); // Return NULL if no texture was found. return NULL; }