void KCSelectAllButton::paintEvent(QPaintEvent* event) { // the painter QPainter painter(this); painter.setClipRect(event->rect()); // if all cells are selected if (m_selection->isAllSelected() && !m_selection->referenceSelectionMode() && m_cellToolIsActive) { // selection brush/color QColor selectionColor(palette().highlight().color()); selectionColor.setAlpha(127); const QBrush selectionBrush(selectionColor); painter.setPen(selectionColor.dark(150)); painter.setBrush(selectionBrush); } else { // background brush/color const QBrush backgroundBrush(palette().window()); const QColor backgroundColor(backgroundBrush.color()); painter.setPen(backgroundColor.dark(150)); painter.setBrush(backgroundBrush); } painter.drawRect(rect().adjusted(0, 0, -1, -1)); }
int GraphView::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = CommonView::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 6) qt_static_metacall(this, _c, _id, _a); _id -= 6; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< GraphWidget::Orientation*>(_v) = orientation(); break; case 1: *reinterpret_cast< GraphWidget::Mode*>(_v) = mode(); break; case 2: *reinterpret_cast< int*>(_v) = timeLinesCount(); break; case 3: *reinterpret_cast< int*>(_v) = valueLinesCount(); break; case 4: *reinterpret_cast< QColor*>(_v) = cursorColor(); break; case 5: *reinterpret_cast< QColor*>(_v) = linesColor(); break; case 6: *reinterpret_cast< QColor*>(_v) = textColor(); break; case 7: *reinterpret_cast< QColor*>(_v) = backColor(); break; case 8: *reinterpret_cast< QColor*>(_v) = selectionColor(); break; case 9: *reinterpret_cast< Plots*>(_v) = plots(); break; } _id -= 10; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setOrientation(*reinterpret_cast< GraphWidget::Orientation*>(_v)); break; case 1: setMode(*reinterpret_cast< GraphWidget::Mode*>(_v)); break; case 2: setTimeLinesCount(*reinterpret_cast< int*>(_v)); break; case 3: setValueLinesCount(*reinterpret_cast< int*>(_v)); break; case 4: setCursorColor(*reinterpret_cast< QColor*>(_v)); break; case 5: setLinesColor(*reinterpret_cast< QColor*>(_v)); break; case 6: setTextColor(*reinterpret_cast< QColor*>(_v)); break; case 7: setBackColor(*reinterpret_cast< QColor*>(_v)); break; case 8: setSelectionColor(*reinterpret_cast< QColor*>(_v)); break; case 9: setPlots(*reinterpret_cast< Plots*>(_v)); break; } _id -= 10; } else if (_c == QMetaObject::ResetProperty) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 10; } #endif // QT_NO_PROPERTIES return _id; }
Layer::Layer(LayerType type, QGraphicsItemGroup *parent) : QGraphicsItemGroup(parent), layerType(type), selectionMarker(this), TreeItem(0) { this->setFlag(QGraphicsItem::ItemIsMovable,true); this->setFlag(QGraphicsItem::ItemIsSelectable,true); QColor selectionColor(Qt::gray); selectionColor.setAlpha(40); QBrush selectionBrush(selectionColor); this->selectionMarker.setBrush(selectionBrush); this->selectionMarker.setZValue(this->zValue()+1); }
QString Style::makeStyleSheet(const QString& _styleSheetTemplate) const { QString styleSheet(_styleSheetTemplate); return styleSheet. replace("%fontFamily%", fontFamily()). replace("%currentTheme%", getStyleId()). replace("%viewItemHeight%", QString("%1px").arg(viewItemHeight())). replace("%fontSizeTiny%", QString("%1px").arg(static_cast<quint8>(FontSize::FONT_TINY))). replace("%fontSizeSmall%", QString("%1px").arg(static_cast<quint8>(FontSize::FONT_SMALL))). replace("%fontSizeNormal%", QString("%1px").arg(static_cast<quint8>(FontSize::FONT_NORMAL))). replace("%fontSizeExtraNormal%", QString("%1px").arg(static_cast<quint8>(FontSize::FONT_EXTRA_NORMAL))). replace("%fontSizeLarge%", QString("%1px").arg(static_cast<quint8>(FontSize::FONT_LARGE))). replace("%fontSizeExtraLarge%", QString("%1px").arg(static_cast<quint8>(FontSize::FONT_EXTRA_LARGE))). replace("%fontSizeHuge%", QString("%1px").arg(static_cast<quint8>(FontSize::FONT_HUGE))). replace("%fontColorGray%", fontColorGray()). replace("%fontColorGreen%", fontColorGreen()). replace("%fontColorRed%", fontColorRed()). replace("%fontColorBlueNormal%", fontColorBlueNormal()). replace("%fontColorBlueHover%", fontColorBlueHover()). replace("%fontColorBluePressed%", fontColorBluePressed()). replace("%backgroundColorGray%", backgroundColorGray()). replace("%backgroundButtonColorGrayHover%", backgroundButtonColorGrayHover()). replace("%backgroundColorBlueNormal%", backgroundColorBlueNormal()). replace("%backgroundColorBlueHover%", backgroundColorBlueHover()). replace("%backgroundColorBluePressed%", backgroundColorBluePressed()). replace("%backgroundColorBlueDisabled%", backgroundColorBlueDisabled()). replace("%backgroundColorGrayNormal%", backgroundColorGrayNormal()). replace("%backgroundColorGrayHover%", backgroundColorGrayHover()). replace("%backgroundColorGrayPressed%", backgroundColorGrayPressed()). replace("%backgroundColorGreen%", backgroundColorGreen()). replace("%backgroundColorGreenHover%", backgroundColorGreenHover()). replace("%backgroundColorAlternate%", backgroundColorAlternate()). replace("%borderColor%", borderColor()). replace("%borderColorDark%", borderColorDark()). replace("%selectionColor%", selectionColor()). replace("%statusBarBackgroundColor%", statusBarBackgroundColor()). replace("%statusBarFontColor%", statusBarFontColor()). replace("%headerBackgroundColor%", headerBackgroundColor()). replace("%headerBorderColor%", headerBorderColor()). replace("%addressFontColor%", addressFontColor()). replace("%balanceFontColor%", balanceFontColor()). replace("%toolButtonBackgroundColorNormal%", toolButtonBackgroundColorNormal()). replace("%toolButtonBackgroundColorHover%", toolButtonBackgroundColorHover()). replace("%toolButtonBackgroundColorPressed%", toolButtonBackgroundColorPressed()). replace("%toolButtonFontColorNormal%", toolButtonFontColorNormal()). replace("%toolButtonFontColorDisabled%", toolButtonFontColorDisabled()). replace("%toolBarBorderColor%", toolBarBorderColor()). replace("%glassColor%", glassColor()); }
void UiSettings::loadSettings() { QSettings s( "CS224", "snow" ); windowPosition() = s.value( "windowPosition", QPoint(0,0) ).toPoint(); windowSize() = s.value( "windowSize", QSize(1000,800) ).toSize(); fillNumParticles() = s.value( "fillNumParticles", 512*128 ).toInt(); fillResolution() = s.value( "fillResolution", 0.05f ).toFloat(); fillDensity() = s.value( "fillDensity", 150.f ).toFloat(); exportDensity() = s.value("exportDensity", false).toBool(); exportVelocity() = s.value("exportVelocity", false).toBool(); exportFPS() = s.value("exportFPS", 24).toInt(); maxTime() = s.value("maxTime", 3).toFloat(); gridPosition() = vec3( s.value("gridPositionX", 0.f).toFloat(), s.value("gridPositionY", 0.f).toFloat(), s.value("gridPositionZ", 0.f).toFloat() ); gridDimensions() = glm::ivec3( s.value("gridDimensionX", 128).toInt(), s.value("gridDimensionY", 128).toInt(), s.value("gridDimensionZ", 128).toInt() ); gridResolution() = s.value( "gridResolution", 0.05f ).toFloat(); timeStep() = s.value( "timeStep", 1e-5 ).toFloat(); implicit() = s.value( "implicit", true ).toBool(); materialPreset() = s.value( "materialPreset", MAT_DEFAULT).toInt(); showContainers() = s.value( "showContainers", true ).toBool(); showContainersMode() = s.value( "showContainersMode", WIREFRAME ).toInt(); showColliders() = s.value( "showColliders", true ).toBool(); showCollidersMode() = s.value( "showCollidersMode", SOLID ).toInt(); showGrid() = s.value( "showGrid", false ).toBool(); showGridMode() = s.value( "showGridMode", MIN_FACE_CELLS ).toInt(); showGridData() = s.value( "showGridData", false ).toBool(); showGridDataMode() = s.value( "showGridDataMode", NODE_DENSITY ).toInt(); showParticles() = s.value( "showParticles", true ).toBool(); showParticlesMode() = s.value( "showParticlesMode", PARTICLE_MASS ).toInt(); selectionColor() = glm::vec4( 0.302f, 0.773f, 0.839f, 1.f ); }
void KCRowHeader::paintEvent(QPaintEvent* event) { register KCSheet * const sheet = m_pView->activeSheet(); if (!sheet) return; // KCElapsedTime et( "Painting vertical header", KCElapsedTime::PrintOnlyTime ); // FIXME Stefan: Make use of clipping. Find the repaint call after the scrolling. // kDebug(36004) << event->rect(); // painting rectangle const QRectF paintRect = m_pView->zoomHandler()->viewToDocument(event->rect()); // the painter QPainter painter(this); painter.scale(m_pView->zoomHandler()->zoomedResolutionX(), m_pView->zoomHandler()->zoomedResolutionY()); painter.setRenderHint(QPainter::TextAntialiasing); // fonts QFont normalFont(painter.font()); QFont boldFont(normalFont); boldFont.setBold(true); // background brush/color const QBrush backgroundBrush(palette().window()); const QColor backgroundColor(backgroundBrush.color()); // selection brush/color QColor selectionColor(palette().highlight().color()); selectionColor.setAlpha(127); const QBrush selectionBrush(selectionColor); painter.setClipRect(paintRect); double yPos; // Get the top row and the current y-position int y = sheet->topRow(paintRect.y() + m_pCanvas->yOffset(), yPos); // Align to the offset yPos = yPos - m_pCanvas->yOffset(); const KViewConverter *converter = m_pCanvas->viewConverter(); const double width = converter->viewToDocumentX(this->width() - 1); QSet<int> selectedRows; QSet<int> affectedRows; if (!m_pView->selection()->referenceSelectionMode() && m_cellToolIsActive) { selectedRows = m_pView->selection()->rowsSelected(); affectedRows = m_pView->selection()->rowsAffected(); } // Loop through the rows, until we are out of range while (yPos <= paintRect.bottom() && y <= KS_rowMax) { const bool selected = (selectedRows.contains(y)); const bool highlighted = (!selected && affectedRows.contains(y)); const KCRowFormat* rowFormat = sheet->rowFormat(y); if (rowFormat->isHiddenOrFiltered()) { ++y; continue; } const double height = rowFormat->height(); if (selected || highlighted) { painter.setPen(selectionColor.dark(150)); painter.setBrush(selectionBrush); } else { painter.setPen(backgroundColor.dark(150)); painter.setBrush(backgroundBrush); } painter.drawRect(QRectF(0, yPos, width, height)); QString rowText = QString::number(y); // Reset painter painter.setFont(normalFont); painter.setPen(palette().text().color()); if (selected) painter.setPen(palette().highlightedText().color()); else if (highlighted) painter.setFont(boldFont); const int ascent = painter.fontMetrics().ascent(); if (height >= ascent - painter.fontMetrics().descent()) { const double len = painter.fontMetrics().width(rowText); #if 0 switch (y % 3) { case 0: rowText = QString::number(height) + 'h'; break; case 1: rowText = QString::number(painter.fontMetrics().ascent()) + 'a'; break; case 2: rowText = QString::number(painter.fontMetrics().descent()) + 'd'; break; } //kDebug() << "font height: " << painter.fontMetrics().ascent(); painter.drawLine(1, yPos, 4, yPos + 3); #endif drawText(painter, normalFont, QPointF((width - len) / 2, yPos + (height - ascent) / 2), // yPos + ( height - painter.fontMetrics().ascent() - painter.fontMetrics().descent() ) / 2 ), rowText); } yPos += rowFormat->height(); y++; } }
void KCColumnHeader::paintEvent(QPaintEvent* event) { register KCSheet * const sheet = m_pView->activeSheet(); if (!sheet) return; // KCElapsedTime et( "Painting horizontal header", KCElapsedTime::PrintOnlyTime ); // FIXME Stefan: Make use of clipping. Find the repaint call after the scrolling. // kDebug(36004) << event->rect(); // painting rectangle const QRectF paintRect = m_pView->zoomHandler()->viewToDocument(event->rect()); // the painter QPainter painter(this); painter.scale(m_pView->zoomHandler()->zoomedResolutionX(), m_pView->zoomHandler()->zoomedResolutionY()); painter.setRenderHint(QPainter::TextAntialiasing); // fonts QFont normalFont(painter.font()); QFont boldFont(normalFont); boldFont.setBold(true); // background brush/color const QBrush backgroundBrush(palette().window()); const QColor backgroundColor(backgroundBrush.color()); // selection brush/color QColor selectionColor(palette().highlight().color()); selectionColor.setAlpha(127); const QBrush selectionBrush(selectionColor); painter.setClipRect(paintRect); double xPos; int x; if (sheet->layoutDirection() == Qt::RightToLeft) { //Get the left column and the current x-position x = sheet->leftColumn(int(m_pView->zoomHandler()->unzoomItX(width()) - paintRect.x() + m_pCanvas->xOffset()), xPos); //Align to the offset xPos = m_pView->zoomHandler()->unzoomItX(width()) - xPos + m_pCanvas->xOffset(); } else { //Get the left column and the current x-position x = sheet->leftColumn(int(paintRect.x() + m_pCanvas->xOffset()), xPos); //Align to the offset xPos = xPos - m_pCanvas->xOffset(); } const KViewConverter *converter = m_pCanvas->viewConverter(); const double height = converter->viewToDocumentY(this->height() - 1); if (sheet->layoutDirection() == Qt::RightToLeft) { if (x > KS_colMax) x = KS_colMax; xPos -= sheet->columnFormat(x)->width(); QSet<int> selectedColumns; QSet<int> affectedColumns; if (!m_pView->selection()->referenceSelectionMode() && m_cellToolIsActive) { selectedColumns = m_pView->selection()->columnsSelected(); affectedColumns = m_pView->selection()->columnsAffected(); } //Loop through the columns, until we are out of range while (xPos <= paintRect.right() && x <= KS_colMax) { bool selected = (selectedColumns.contains(x)); bool highlighted = (!selected && affectedColumns.contains(x)); const KCColumnFormat* columnFormat = sheet->columnFormat(x); if (columnFormat->isHiddenOrFiltered()) { ++x; continue; } double width = columnFormat->width(); if (selected || highlighted) { painter.setPen(selectionColor.dark(150)); painter.setBrush(selectionBrush); } else { painter.setPen(backgroundColor.dark(150)); painter.setBrush(backgroundBrush); } painter.drawRect(QRectF(xPos, 0, width, height)); // Reset painter painter.setFont(normalFont); painter.setPen(palette().text().color()); if (selected) painter.setPen(palette().highlightedText().color()); else if (highlighted) painter.setFont(boldFont); QString colText = sheet->getShowColumnNumber() ? QString::number(x) : KCCell::columnName(x); double len = painter.fontMetrics().width(colText); if (width >= len) { drawText(painter, normalFont, QPointF(xPos + (width - len) / 2, (height - painter.fontMetrics().ascent() - painter.fontMetrics().descent()) / 2), colText, width); } xPos += columnFormat->width(); --x; } } else { // if ( sheet->layoutDirection() == Qt::LeftToRight ) QSet<int> selectedColumns; QSet<int> affectedColumns; if (!m_pView->selection()->referenceSelectionMode() && m_cellToolIsActive) { selectedColumns = m_pView->selection()->columnsSelected(); affectedColumns = m_pView->selection()->columnsAffected(); } //Loop through the columns, until we are out of range while (xPos <= paintRect.right() && x <= KS_colMax) { bool selected = (selectedColumns.contains(x)); bool highlighted = (!selected && affectedColumns.contains(x)); const KCColumnFormat *columnFormat = sheet->columnFormat(x); if (columnFormat->isHiddenOrFiltered()) { ++x; continue; } double width = columnFormat->width(); QColor backgroundColor = palette().window().color(); if (selected || highlighted) { painter.setPen(selectionColor.dark(150)); painter.setBrush(selectionBrush); } else { painter.setPen(backgroundColor.dark(150)); painter.setBrush(backgroundBrush); } painter.drawRect(QRectF(xPos, 0, width, height)); // Reset painter painter.setFont(normalFont); painter.setPen(palette().text().color()); if (selected) painter.setPen(palette().highlightedText().color()); else if (highlighted) painter.setFont(boldFont); QString colText = sheet->getShowColumnNumber() ? QString::number(x) : KCCell::columnName(x); int len = painter.fontMetrics().width(colText); if (width >= len) { #if 0 switch (x % 3) { case 0: colText = QString::number(height) + 'h'; break; case 1: colText = QString::number(painter.fontMetrics().ascent()) + 'a'; break; case 2: colText = QString::number(painter.fontMetrics().descent()) + 'd'; break; } #endif drawText(painter, normalFont, QPointF(xPos + (width - len) / 2, (height - painter.fontMetrics().ascent() - painter.fontMetrics().descent()) / 2), colText, width); } xPos += columnFormat->width(); ++x; } } }
int QDeclarativeTextEdit::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDeclarativeImplicitSizePaintedItem::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 47) qt_static_metacall(this, _c, _id, _a); _id -= 47; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = text(); break; case 1: *reinterpret_cast< QColor*>(_v) = color(); break; case 2: *reinterpret_cast< QColor*>(_v) = selectionColor(); break; case 3: *reinterpret_cast< QColor*>(_v) = selectedTextColor(); break; case 4: *reinterpret_cast< QFont*>(_v) = font(); break; case 5: *reinterpret_cast< HAlignment*>(_v) = hAlign(); break; case 6: *reinterpret_cast< VAlignment*>(_v) = vAlign(); break; case 7: *reinterpret_cast< WrapMode*>(_v) = wrapMode(); break; case 8: *reinterpret_cast< int*>(_v) = lineCount(); break; case 9: *reinterpret_cast< qreal*>(_v) = paintedWidth(); break; case 10: *reinterpret_cast< qreal*>(_v) = paintedHeight(); break; case 11: *reinterpret_cast< TextFormat*>(_v) = textFormat(); break; case 12: *reinterpret_cast< bool*>(_v) = isReadOnly(); break; case 13: *reinterpret_cast< bool*>(_v) = isCursorVisible(); break; case 14: *reinterpret_cast< int*>(_v) = cursorPosition(); break; case 15: *reinterpret_cast< QRect*>(_v) = cursorRectangle(); break; case 16: *reinterpret_cast< QDeclarativeComponent**>(_v) = cursorDelegate(); break; case 17: *reinterpret_cast< int*>(_v) = selectionStart(); break; case 18: *reinterpret_cast< int*>(_v) = selectionEnd(); break; case 19: *reinterpret_cast< QString*>(_v) = selectedText(); break; case 20: *reinterpret_cast< bool*>(_v) = focusOnPress(); break; case 21: *reinterpret_cast< bool*>(_v) = persistentSelection(); break; case 22: *reinterpret_cast< qreal*>(_v) = textMargin(); break; case 23: *reinterpret_cast< Qt::InputMethodHints*>(_v) = inputMethodHints(); break; case 24: *reinterpret_cast< bool*>(_v) = selectByMouse(); break; case 25: *reinterpret_cast< SelectionMode*>(_v) = mouseSelectionMode(); break; case 26: *reinterpret_cast< bool*>(_v) = canPaste(); break; case 27: *reinterpret_cast< bool*>(_v) = isInputMethodComposing(); break; } _id -= 28; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setText(*reinterpret_cast< QString*>(_v)); break; case 1: setColor(*reinterpret_cast< QColor*>(_v)); break; case 2: setSelectionColor(*reinterpret_cast< QColor*>(_v)); break; case 3: setSelectedTextColor(*reinterpret_cast< QColor*>(_v)); break; case 4: setFont(*reinterpret_cast< QFont*>(_v)); break; case 5: setHAlign(*reinterpret_cast< HAlignment*>(_v)); break; case 6: setVAlign(*reinterpret_cast< VAlignment*>(_v)); break; case 7: setWrapMode(*reinterpret_cast< WrapMode*>(_v)); break; case 11: setTextFormat(*reinterpret_cast< TextFormat*>(_v)); break; case 12: setReadOnly(*reinterpret_cast< bool*>(_v)); break; case 13: setCursorVisible(*reinterpret_cast< bool*>(_v)); break; case 14: setCursorPosition(*reinterpret_cast< int*>(_v)); break; case 16: setCursorDelegate(*reinterpret_cast< QDeclarativeComponent**>(_v)); break; case 20: setFocusOnPress(*reinterpret_cast< bool*>(_v)); break; case 21: setPersistentSelection(*reinterpret_cast< bool*>(_v)); break; case 22: setTextMargin(*reinterpret_cast< qreal*>(_v)); break; case 23: setInputMethodHints(*reinterpret_cast< Qt::InputMethodHints*>(_v)); break; case 24: setSelectByMouse(*reinterpret_cast< bool*>(_v)); break; case 25: setMouseSelectionMode(*reinterpret_cast< SelectionMode*>(_v)); break; } _id -= 28; } else if (_c == QMetaObject::ResetProperty) { switch (_id) { case 5: resetHAlign(); break; } _id -= 28; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 28; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 28; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 28; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 28; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 28; } #endif // QT_NO_PROPERTIES return _id; }
int QHexEdit::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QScrollArea::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: currentAddressChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 1: currentSizeChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 2: dataChanged(); break; case 3: overwriteModeChanged((*reinterpret_cast< bool(*)>(_a[1]))); break; case 4: setAddressWidth((*reinterpret_cast< int(*)>(_a[1]))); break; case 5: setAddressArea((*reinterpret_cast< bool(*)>(_a[1]))); break; case 6: setAsciiArea((*reinterpret_cast< bool(*)>(_a[1]))); break; case 7: setHighlighting((*reinterpret_cast< bool(*)>(_a[1]))); break; default: ; } _id -= 8; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QByteArray*>(_v) = data(); break; case 1: *reinterpret_cast< int*>(_v) = addressOffset(); break; case 2: *reinterpret_cast< QColor*>(_v) = addressAreaColor(); break; case 3: *reinterpret_cast< QColor*>(_v) = highlightingColor(); break; case 4: *reinterpret_cast< QColor*>(_v) = selectionColor(); break; case 5: *reinterpret_cast< bool*>(_v) = overwriteMode(); break; case 6: *reinterpret_cast< bool*>(_v) = isReadOnly(); break; case 7: *reinterpret_cast< QFont*>(_v) = font(); break; } _id -= 8; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setData(*reinterpret_cast< QByteArray*>(_v)); break; case 1: setAddressOffset(*reinterpret_cast< int*>(_v)); break; case 2: setAddressAreaColor(*reinterpret_cast< QColor*>(_v)); break; case 3: setHighlightingColor(*reinterpret_cast< QColor*>(_v)); break; case 4: setSelectionColor(*reinterpret_cast< QColor*>(_v)); break; case 5: setOverwriteMode(*reinterpret_cast< bool*>(_v)); break; case 6: setReadOnly(*reinterpret_cast< bool*>(_v)); break; case 7: setFont(*reinterpret_cast< QFont*>(_v)); break; } _id -= 8; } else if (_c == QMetaObject::ResetProperty) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 8; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 8; } #endif // QT_NO_PROPERTIES return _id; }