cCustomShotTable::cCustomShotTable(QWidget *parent):QTableWidget(parent) { DragItemSource =-1; DragItemDest =-1; IsDragOn =0; DiaporamaObject =NULL; #if QT_VERSION >= 0x050000 horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed); verticalHeader()->setSectionResizeMode(QHeaderView::Fixed); #else horizontalHeader()->setResizeMode(QHeaderView::Fixed); verticalHeader()->setResizeMode(QHeaderView::Fixed); #endif setSelectionBehavior(QAbstractItemView::SelectItems); setSelectionMode(QAbstractItemView::SingleSelection); setDragDropOverwriteMode(false); setAcceptDrops(false); setDropIndicatorShown(false); setItemDelegate(new cShotTableItemDelegate(this)); setRowCount(1); setContextMenuPolicy(Qt::PreventContextMenu); }
akuTreeWidget::akuTreeWidget(QWidget *parent) : QTreeWidget(parent) { setDragEnabled(false); setDragDropOverwriteMode(false); setDragDropMode(QAbstractItemView::NoDragDrop); setAlternatingRowColors(true); setSelectionMode(QAbstractItemView::ExtendedSelection); setAutoExpandDelay(-1); setRootIsDecorated(true); setUniformRowHeights(false); setSortingEnabled(true); setAnimated(true); setAllColumnsShowFocus(true); headerItem()->setText(0, i18n("File Name", 0)); headerItem()->setText(1, i18n("Size", 0)); headerItem()->setText(2, i18n("Packed Size", 0)); headerItem()->setText(3, i18n("Ratio", 0)); headerItem()->setText(4, i18n("Modified", 0)); headerItem()->setText(5, i18n("Attributes", 0)); headerItem()->setText(6, i18n("CRC", 0)); headerItem()->setText(7, i18n("Method", 0)); headerItem()->setText(8, i18n("Version", 0)); headerItem()->setText(9, i18n("MIME Type", 0)); headerItem()->setText(10,""); headerItem()->setIcon(10,KIcon("document-properties")); headerItem()->setToolTip(10, i18n("Status: a key is shown if the file is crypted")); header() -> moveSection(10,0); header() -> setResizeMode(10,QHeaderView::ResizeToContents); header() -> setResizeMode(4,QHeaderView::ResizeToContents); setupActions(); }
DeviceExplorerView::DeviceExplorerView(QWidget* parent) : QTreeView(parent), m_hasProxy(false) { setAllColumnsShowFocus(true); setSelectionBehavior(QAbstractItemView::SelectRows); setSelectionMode(QAbstractItemView::ExtendedSelection); header()->setContextMenuPolicy(Qt::CustomContextMenu); connect( header(), &QWidget::customContextMenuRequested, this, &DeviceExplorerView::headerMenuRequested); header()->setMaximumHeight(20); //- Drag'n Drop. setDragEnabled(true); setAcceptDrops(true); setUniformRowHeights(true); setDragDropMode(QAbstractItemView::DragDrop); setDropIndicatorShown(true); setDefaultDropAction(Qt::MoveAction); setDragDropOverwriteMode(false); QFile f(":/DeviceExplorer.qss"); if (f.open(QFile::ReadOnly)) setStyleSheet(f.readAll()); }
ComposerAttachmentsList::ComposerAttachmentsList(QWidget *parent): QListView(parent), m_dragging(false), m_dragInside(false), m_composer(0) { setMouseTracking( true ); setAcceptDrops(true); setDragDropMode( DragDrop ); setDragDropOverwriteMode( false ); setDragEnabled(true); setDropIndicatorShown(false); setContextMenuPolicy(Qt::CustomContextMenu); connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint))); m_actionSendInline = new QAction(tr("Send Inline"), this); m_actionSendInline->setCheckable(true); connect(m_actionSendInline, SIGNAL(triggered(bool)), this, SLOT(slotToggledContentDispositionInline(bool))); addAction(m_actionSendInline); m_actionRename = new QAction(tr("Rename..."), this); connect(m_actionRename, SIGNAL(triggered()), this, SLOT(slotRenameAttachment())); addAction(m_actionRename); m_actionRemoveAttachment = new QAction(tr("Remove"), this); connect(m_actionRemoveAttachment, SIGNAL(triggered()), this, SLOT(slotRemoveAttachment())); addAction(m_actionRemoveAttachment); connect(this, SIGNAL(itemDroppedOut()), this, SLOT(slotRemoveAttachment())); connect(this, SIGNAL(clicked(QModelIndex)), this, SLOT(onCurrentChanged())); connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(onCurrentChanged())); }
MovableTableWidget::MovableTableWidget(QWidget *parent) : QTableWidget(parent), m_lineRow(-1) { setSelectionBehavior(QAbstractItemView::SelectRows); setDragDropMode(QAbstractItemView::InternalMove); setDragDropOverwriteMode(false); }
//---------------------------------------------------------------------------------------- OfsTreeWidget::OfsTreeWidget(QWidget *parent, unsigned int capabilities, QStringList initialSelection) : QTreeWidget(parent), mCapabilities(capabilities) { mSelectedItems = initialSelection; mRecycleBinParent = NULL; setColumnCount(1); setHeaderHidden(true); setSelectionMode(QAbstractItemView::ExtendedSelection); setSelectionBehavior(QAbstractItemView::SelectItems); setContextMenuPolicy(Qt::CustomContextMenu); setDragDropOverwriteMode(false); setAutoScroll(true); if(capabilities & CAP_ALLOW_DROPS) setDragDropMode(QAbstractItemView::DragDrop); mUnknownFileIcon = mOgitorMainWindow->mIconProvider.icon(QFileIconProvider::File); mFile = Ogitors::OgitorsRoot::getSingletonPtr()->GetProjectFile(); mFile->addTrigger(this, OFS::_OfsBase::CLBK_CREATE, &triggerCallback); mFile->addTrigger(this, OFS::_OfsBase::CLBK_DELETE, &triggerCallback); refreshWidget(); mAddFilesThread = new AddFilesThread(); mExtractorThread = new ExtractorThread(); connect(mAddFilesThread, SIGNAL(finished()), this, SLOT(threadFinished())); connect(mExtractorThread, SIGNAL(finished()), this, SLOT(threadFinished())); }
SeasonTreeView::SeasonTreeView(Context *context) : context(context) { setDragDropMode(QAbstractItemView::InternalMove); setDragDropOverwriteMode(true); #ifdef Q_OS_MAC setAttribute(Qt::WA_MacShowFocusRect, 0); #endif }
ProjectViewDocTree::ProjectViewDocTree(QWidget* w) : QTreeView(w) { setDragDropMode(QAbstractItemView::DragDrop); setContextMenuPolicy(Qt::CustomContextMenu); setDragEnabled(true); setAcceptDrops(true); setDropIndicatorShown(true); setDragDropOverwriteMode(true); }
//---------------------------------------------------------------------------------------- OfsTreeWidget::OfsTreeWidget(QWidget *parent, unsigned int capabilities, std::string initialSelection) : QTreeWidget(parent), mCapabilities(capabilities) { mSelected = initialSelection; setColumnCount(1); setHeaderHidden(true); setSelectionMode(QAbstractItemView::SingleSelection); setSelectionBehavior(QAbstractItemView::SelectItems); setContextMenuPolicy(Qt::CustomContextMenu); setDragDropOverwriteMode(false); if(capabilities & CAP_ALLOW_DROPS) setDragDropMode(QAbstractItemView::DropOnly); mUnknownFileIcon = mOgitorMainWindow->mIconProvider.icon(QFileIconProvider::File); mFile = Ogitors::OgitorsRoot::getSingletonPtr()->GetProjectFile(); QTreeWidgetItem* item = 0; QTreeWidgetItem* pItem = new QTreeWidgetItem((QTreeWidget*)0, QStringList(QString("Project"))); pItem->setIcon(0, mOgitorMainWindow->mIconProvider.icon(QFileIconProvider::Folder)); pItem->setTextColor(0, Qt::black); QFont fnt = pItem->font(0); fnt.setBold(true); pItem->setFont(0, fnt); pItem->setWhatsThis(0, QString("/")); addTopLevelItem(pItem); fillTree(pItem, "/"); if(capabilities & CAP_SHOW_FILES) fillTreeFiles(pItem, "/"); expandItem(pItem); if(mSelected == "/") setItemSelected(pItem, true); else { NameTreeWidgetMap::iterator it = mItemMap.find(mSelected); if(it != mItemMap.end()) { clearSelection(); scrollToItem(it->second); setItemSelected(it->second, true); } } connect(this, SIGNAL(itemSelectionChanged()), this, SLOT(onSelectionChanged())); if(capabilities & CAP_SHOW_FILES) { connect(this, SIGNAL(itemCollapsed( QTreeWidgetItem * )), this, SLOT(onItemCollapsed( QTreeWidgetItem * ))); connect(this, SIGNAL(itemExpanded( QTreeWidgetItem * )), this, SLOT(onItemExpanded( QTreeWidgetItem * ))); }
TableWidgetDragRows::TableWidgetDragRows(QWidget* parent): QTableWidget(parent) { // Enable drag and drop to rearrange rows setDragEnabled(true); setAcceptDrops(true); viewport()->setAcceptDrops(true); setDragDropOverwriteMode(false); setDropIndicatorShown(true); setDragDropMode(QAbstractItemView::InternalMove); }
MusicListView::MusicListView(QWidget *parent) : ListView(parent), d_ptr(new MusicListViewPrivate(this)) { Q_D(MusicListView); DThemeManager::instance()->registerWidget(this); setObjectName("MusicListView"); d->model = new MusiclistModel(0, 1, this); setModel(d->model); d->delegate = new MusicItemDelegate; setItemDelegate(d->delegate); setDragEnabled(true); viewport()->setAcceptDrops(true); setDropIndicatorShown(true); setDragDropOverwriteMode(false); setVerticalScrollMode(QAbstractItemView::ScrollPerItem); setHorizontalScrollMode(QAbstractItemView::ScrollPerItem); setDefaultDropAction(Qt::MoveAction); setDragDropMode(QAbstractItemView::InternalMove); setMovement(QListView::Free); setSelectionMode(QListView::ExtendedSelection); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setEditTriggers(QAbstractItemView::NoEditTriggers); setSelectionBehavior(QAbstractItemView::SelectRows); setContextMenuPolicy(Qt::CustomContextMenu); connect(this, &MusicListView::customContextMenuRequested, this, &MusicListView::requestCustomContextMenu); connect(this, &MusicListView::doubleClicked, this, [ = ](const QModelIndex & index) { MetaPtr meta = d->model->meta(index); Q_EMIT playMedia(meta); }); // For debug // connect(selectionModel(), &QItemSelectionModel::selectionChanged, // this, [ = ](const QItemSelection & /*selected*/, const QItemSelection & deselected) { // if (!deselected.isEmpty()) { // qDebug() << "cancel" << deselected; // } // }); }
TabTree::TabTree(QWidget *parent) : QTreeWidget(parent) { connect( this, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(onCurrentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)) ); setDragEnabled(true); setDragDropMode(QAbstractItemView::InternalMove); setDragDropOverwriteMode(false); setDefaultDropAction(Qt::CopyAction); // otherwise tab is lost if moved outside tree setFrameShape(QFrame::NoFrame); setHeaderHidden(true); setSelectionMode(QAbstractItemView::SingleSelection); verticalScrollBar()->installEventFilter(this); }
DeviceExplorerView::DeviceExplorerView(QWidget* parent) : QTreeView(parent), m_hasProxy(false) { setAllColumnsShowFocus(true); setSelectionBehavior(QAbstractItemView::SelectRows); setSelectionMode(QAbstractItemView::ExtendedSelection); //cf http://qt-project.org/doc/qt-5/qabstractitemview.html#SelectionBehavior-enum header()->setContextMenuPolicy(Qt::CustomContextMenu); //header will emit the signal customContextMenuRequested() connect(header(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(headerMenuRequested(const QPoint&))); //- Drag'n Drop. setDragEnabled(true); setAcceptDrops(true); setUniformRowHeights(true); //setDragDropMode(QAbstractItemView::InternalMove); //The view accepts move (not copy) operations only from itself. setDragDropMode(QAbstractItemView::DragDrop); setDropIndicatorShown(true); setDefaultDropAction(Qt::MoveAction); //default DefaultDropAction is CopyAction setDragDropOverwriteMode(false); /* - if setDragDropMode(QAbstractItemView::InternalMove); : it is impossible to have copyAction in model::dropMimeData(). -- if model::supportedDragActions & supportedDropActions() return only Copy, it is visually forbidden to drop (model::dropMimeData() is never called) -- if model::supportedDragActions & supportedDropActions() return Move|Copy, Action in model::dropMimeData() will always be a Move. - if setDragDropMode(QAbstractItemView::DragDrop); : we only have copyAction in model::dropMimeData(). [even if model::supportedDragActions & supportedDropActions() return Move|Copy ; even if setDragDropOverwriteMode(false or true) ] ==> setDefaultDropAction(Qt::MoveAction); is needed to have CopyAction */ QFile f(":/DeviceExplorer.qss"); if(f.open(QFile::ReadOnly)) setStyleSheet(f.readAll()); }
void PropertyTableWidget::InitWidget() { // Set up drop functionality. setAcceptDrops(true); setDragEnabled(false); setDragDropMode(QAbstractItemView::DropOnly); setAcceptDrops(true); setDropIndicatorShown(true); setDragDropOverwriteMode(true); // Set up headers and size. // setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Type") << tr("Value")); verticalHeader()->setVisible(false); resizeColumnToContents(0); horizontalHeader()->setStretchLastSection(true); horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); setMouseTracking(true); }
NotesWidget::NotesWidget(QWidget *parent) : QListWidget(parent) { setDragEnabled(true); setAcceptDrops(true); setDropIndicatorShown(true); setDragDropMode(QAbstractItemView::DragDrop); setSelectionMode(QAbstractItemView::SingleSelection); setDragDropOverwriteMode(true); setSortingEnabled(true); listType = TreeItem::allNotes; signalsDisabled = false; sortType = byTitle; QVariant sort = sql::readSyncStatus("noteSortType"); if (!sort.isNull()) sortType = sort.toInt(); connect(this, SIGNAL(itemSelectionChanged()), this, SLOT(switchNote())); }
UserMenuTree::UserMenuTree(QWidget *parent) : QTreeWidget(parent) { setColumnCount(2); header()->setResizeMode(0,QHeaderView::Stretch); header()->setResizeMode(1,QHeaderView::Fixed); header()->setMovable(false); header()->setStretchLastSection(false); setColumnWidth(1,140); setItemDelegateForColumn(0, new MenuentryDelegate(parent)); // drag and drop setDragEnabled(true); setDropIndicatorShown(true); //setAcceptDrops(true); setDragDropMode(QAbstractItemView::InternalMove); setDragDropOverwriteMode(false); initEnvPathlist(); }
int QAbstractItemView::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QAbstractScrollArea::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: pressed((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 1: clicked((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 2: doubleClicked((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 3: activated((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 4: entered((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 5: viewportEntered(); break; case 6: reset(); break; case 7: setRootIndex((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 8: doItemsLayout(); break; case 9: selectAll(); break; case 10: edit((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 11: clearSelection(); break; case 12: setCurrentIndex((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 13: scrollToTop(); break; case 14: scrollToBottom(); break; case 15: update((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 16: dataChanged((*reinterpret_cast< const QModelIndex(*)>(_a[1])),(*reinterpret_cast< const QModelIndex(*)>(_a[2]))); break; case 17: rowsInserted((*reinterpret_cast< const QModelIndex(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break; case 18: rowsAboutToBeRemoved((*reinterpret_cast< const QModelIndex(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break; case 19: selectionChanged((*reinterpret_cast< const QItemSelection(*)>(_a[1])),(*reinterpret_cast< const QItemSelection(*)>(_a[2]))); break; case 20: currentChanged((*reinterpret_cast< const QModelIndex(*)>(_a[1])),(*reinterpret_cast< const QModelIndex(*)>(_a[2]))); break; case 21: updateEditorData(); break; case 22: updateEditorGeometries(); break; case 23: updateGeometries(); break; case 24: verticalScrollbarAction((*reinterpret_cast< int(*)>(_a[1]))); break; case 25: horizontalScrollbarAction((*reinterpret_cast< int(*)>(_a[1]))); break; case 26: verticalScrollbarValueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 27: horizontalScrollbarValueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 28: closeEditor((*reinterpret_cast< QWidget*(*)>(_a[1])),(*reinterpret_cast< QAbstractItemDelegate::EndEditHint(*)>(_a[2]))); break; case 29: commitData((*reinterpret_cast< QWidget*(*)>(_a[1]))); break; case 30: editorDestroyed((*reinterpret_cast< QObject*(*)>(_a[1]))); break; case 31: d_func()->_q_columnsAboutToBeRemoved((*reinterpret_cast< const QModelIndex(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break; case 32: d_func()->_q_columnsRemoved((*reinterpret_cast< const QModelIndex(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break; case 33: d_func()->_q_rowsRemoved((*reinterpret_cast< const QModelIndex(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break; case 34: d_func()->_q_modelDestroyed(); break; case 35: d_func()->_q_layoutChanged(); break; case 36: d_func()->_q_fetchMore(); break; } _id -= 37; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< bool*>(_v) = hasAutoScroll(); break; case 1: *reinterpret_cast< int*>(_v) = autoScrollMargin(); break; case 2: *reinterpret_cast<int*>(_v) = QFlag(editTriggers()); break; case 3: *reinterpret_cast< bool*>(_v) = tabKeyNavigation(); break; case 4: *reinterpret_cast< bool*>(_v) = showDropIndicator(); break; case 5: *reinterpret_cast< bool*>(_v) = dragEnabled(); break; case 6: *reinterpret_cast< bool*>(_v) = dragDropOverwriteMode(); break; case 7: *reinterpret_cast< DragDropMode*>(_v) = dragDropMode(); break; case 8: *reinterpret_cast< bool*>(_v) = alternatingRowColors(); break; case 9: *reinterpret_cast< SelectionMode*>(_v) = selectionMode(); break; case 10: *reinterpret_cast< SelectionBehavior*>(_v) = selectionBehavior(); break; case 11: *reinterpret_cast< QSize*>(_v) = iconSize(); break; case 12: *reinterpret_cast< Qt::TextElideMode*>(_v) = textElideMode(); break; case 13: *reinterpret_cast< ScrollMode*>(_v) = verticalScrollMode(); break; case 14: *reinterpret_cast< ScrollMode*>(_v) = horizontalScrollMode(); break; } _id -= 15; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setAutoScroll(*reinterpret_cast< bool*>(_v)); break; case 1: setAutoScrollMargin(*reinterpret_cast< int*>(_v)); break; case 2: setEditTriggers(QFlag(*reinterpret_cast<int*>(_v))); break; case 3: setTabKeyNavigation(*reinterpret_cast< bool*>(_v)); break; case 4: setDropIndicatorShown(*reinterpret_cast< bool*>(_v)); break; case 5: setDragEnabled(*reinterpret_cast< bool*>(_v)); break; case 6: setDragDropOverwriteMode(*reinterpret_cast< bool*>(_v)); break; case 7: setDragDropMode(*reinterpret_cast< DragDropMode*>(_v)); break; case 8: setAlternatingRowColors(*reinterpret_cast< bool*>(_v)); break; case 9: setSelectionMode(*reinterpret_cast< SelectionMode*>(_v)); break; case 10: setSelectionBehavior(*reinterpret_cast< SelectionBehavior*>(_v)); break; case 11: setIconSize(*reinterpret_cast< QSize*>(_v)); break; case 12: setTextElideMode(*reinterpret_cast< Qt::TextElideMode*>(_v)); break; case 13: setVerticalScrollMode(*reinterpret_cast< ScrollMode*>(_v)); break; case 14: setHorizontalScrollMode(*reinterpret_cast< ScrollMode*>(_v)); break; } _id -= 15; } else if (_c == QMetaObject::ResetProperty) { _id -= 15; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 15; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 15; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 15; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 15; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 15; } #endif // QT_NO_PROPERTIES return _id; }
int QAbstractItemView::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QAbstractScrollArea::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 39) qt_static_metacall(this, _c, _id, _a); _id -= 39; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< bool*>(_v) = hasAutoScroll(); break; case 1: *reinterpret_cast< int*>(_v) = autoScrollMargin(); break; case 2: *reinterpret_cast<int*>(_v) = QFlag(editTriggers()); break; case 3: *reinterpret_cast< bool*>(_v) = tabKeyNavigation(); break; case 4: *reinterpret_cast< bool*>(_v) = showDropIndicator(); break; case 5: *reinterpret_cast< bool*>(_v) = dragEnabled(); break; case 6: *reinterpret_cast< bool*>(_v) = dragDropOverwriteMode(); break; case 7: *reinterpret_cast< DragDropMode*>(_v) = dragDropMode(); break; case 8: *reinterpret_cast< Qt::DropAction*>(_v) = defaultDropAction(); break; case 9: *reinterpret_cast< bool*>(_v) = alternatingRowColors(); break; case 10: *reinterpret_cast< SelectionMode*>(_v) = selectionMode(); break; case 11: *reinterpret_cast< SelectionBehavior*>(_v) = selectionBehavior(); break; case 12: *reinterpret_cast< QSize*>(_v) = iconSize(); break; case 13: *reinterpret_cast< Qt::TextElideMode*>(_v) = textElideMode(); break; case 14: *reinterpret_cast< ScrollMode*>(_v) = verticalScrollMode(); break; case 15: *reinterpret_cast< ScrollMode*>(_v) = horizontalScrollMode(); break; } _id -= 16; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setAutoScroll(*reinterpret_cast< bool*>(_v)); break; case 1: setAutoScrollMargin(*reinterpret_cast< int*>(_v)); break; case 2: setEditTriggers(QFlag(*reinterpret_cast<int*>(_v))); break; case 3: setTabKeyNavigation(*reinterpret_cast< bool*>(_v)); break; case 4: setDropIndicatorShown(*reinterpret_cast< bool*>(_v)); break; case 5: setDragEnabled(*reinterpret_cast< bool*>(_v)); break; case 6: setDragDropOverwriteMode(*reinterpret_cast< bool*>(_v)); break; case 7: setDragDropMode(*reinterpret_cast< DragDropMode*>(_v)); break; case 8: setDefaultDropAction(*reinterpret_cast< Qt::DropAction*>(_v)); break; case 9: setAlternatingRowColors(*reinterpret_cast< bool*>(_v)); break; case 10: setSelectionMode(*reinterpret_cast< SelectionMode*>(_v)); break; case 11: setSelectionBehavior(*reinterpret_cast< SelectionBehavior*>(_v)); break; case 12: setIconSize(*reinterpret_cast< QSize*>(_v)); break; case 13: setTextElideMode(*reinterpret_cast< Qt::TextElideMode*>(_v)); break; case 14: setVerticalScrollMode(*reinterpret_cast< ScrollMode*>(_v)); break; case 15: setHorizontalScrollMode(*reinterpret_cast< ScrollMode*>(_v)); break; } _id -= 16; } else if (_c == QMetaObject::ResetProperty) { _id -= 16; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 16; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 16; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 16; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 16; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 16; } #endif // QT_NO_PROPERTIES return _id; }