Logo Search packages:      
Sourcecode: qt4-x11 version File versions

int QStyle::pixelMetric ( PixelMetric  metric,
const QStyleOption option = 0,
const QWidget widget = 0 
) const [pure virtual]

Returns the value of the given pixel metric.

The specified option and widget can be used for calculating the metric. In general, the widget argument is not used. The option can be cast to the appropriate type using the qstyleoption_cast() function. Note that the option may be zero even for PixelMetrics that can make use of it. See the table below for the appropriate option casts:

Pixel Metric QStyleOption Subclass PM_SliderControlThickness QStyleOptionSlider PM_SliderLength QStyleOptionSlider PM_SliderTickmarkOffset QStyleOptionSlider PM_SliderSpaceAvailable QStyleOptionSlider PM_ScrollBarExtent QStyleOptionSlider PM_TabBarTabOverlap QStyleOptionTab PM_TabBarTabHSpace QStyleOptionTab PM_TabBarTabVSpace QStyleOptionTab PM_TabBarBaseHeight QStyleOptionTab PM_TabBarBaseOverlap QStyleOptionTab

Implemented in QCDEStyle, QCleanlooksStyle, QCommonStyle, QMotifStyle, QPlastiqueStyle, QWindowsStyle, and QWindowsXPStyle.

Referenced by Q3CheckListItem::activate(), QItemDelegate::doLayout(), QItemDelegate::drawDisplay(), QItemDelegate::editorEvent(), Q3Header::handleAt(), QMenuBar::heightForWidth(), QMenu::keyPressEvent(), Q3DockWindow::minimumSize(), QSlider::minimumSizeHint(), QMenuBar::minimumSizeHint(), QCalendarWidget::minimumSizeHint(), QGroupBox::minimumSizeHint(), Q3DockWindow::minimumSizeHint(), QSlider::mouseMoveEvent(), QScrollBar::mouseMoveEvent(), Q3Header::mousePressEvent(), Q3CheckListItem::paintCell(), QMenuBar::paintEvent(), QTabBar::paintEvent(), QMenu::paintEvent(), Q3CheckListItem::paintFocus(), Q3Header::paintSectionLabel(), QMenu::popup(), QHeaderView::sectionSizeFromContents(), Q3CheckListItem::setup(), QComboBox::showPopup(), QProgressDialog::sizeHint(), QMenuBar::sizeHint(), QProgressBar::sizeHint(), Q3DockWindow::sizeHint(), Q3TimeEdit::sizeHint(), QPushButton::sizeHint(), Q3DateEdit::sizeHint(), QScrollBar::sizeHint(), Q3ListView::sizeHint(), QSlider::sizeHint(), Q3IconView::sizeHint(), Q3ProgressBar::sizeHint(), QMenu::sizeHint(), QToolButton::sizeHint(), QMessageBox::standardIcon(), QTabBar::tabSizeHint(), QItemDelegate::textRectangle(), QAbstractItemView::viewOptions(), QListView::viewOptions(), QDateTimeEdit::wheelEvent(), and Q3CheckListItem::width().


Generated by  Doxygen 1.6.0   Back to index