void CsvParser::field( const QString &data, uint row, uint column ) { const int tmp = qMax( mColumnCount, (int)column + 1 ); if ( tmp != mColumnCount ) { mColumnCount = tmp; emit columnCountChanged( tmp ); } emit dataChanged( data, row, column ); }
int QTreeView::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QAbstractItemView::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: expanded((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 1: collapsed((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 2: hideColumn((*reinterpret_cast< int(*)>(_a[1]))); break; case 3: showColumn((*reinterpret_cast< int(*)>(_a[1]))); break; case 4: expand((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 5: collapse((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 6: resizeColumnToContents((*reinterpret_cast< int(*)>(_a[1]))); break; case 7: sortByColumn((*reinterpret_cast< int(*)>(_a[1]))); break; case 8: expandAll(); break; case 9: collapseAll(); break; case 10: expandToDepth((*reinterpret_cast< int(*)>(_a[1]))); break; case 11: columnResized((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break; case 12: columnCountChanged((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break; case 13: columnMoved(); break; case 14: reexpand(); break; case 15: rowsRemoved((*reinterpret_cast< const QModelIndex(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break; case 16: d_func()->_q_endAnimatedOperation(); break; case 17: d_func()->_q_modelAboutToBeReset(); break; case 18: d_func()->_q_sortIndicatorChanged((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< Qt::SortOrder(*)>(_a[2]))); break; default: ; } _id -= 19; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< int*>(_v) = autoExpandDelay(); break; case 1: *reinterpret_cast< int*>(_v) = indentation(); break; case 2: *reinterpret_cast< bool*>(_v) = rootIsDecorated(); break; case 3: *reinterpret_cast< bool*>(_v) = uniformRowHeights(); break; case 4: *reinterpret_cast< bool*>(_v) = itemsExpandable(); break; case 5: *reinterpret_cast< bool*>(_v) = isSortingEnabled(); break; case 6: *reinterpret_cast< bool*>(_v) = isAnimated(); break; case 7: *reinterpret_cast< bool*>(_v) = allColumnsShowFocus(); break; case 8: *reinterpret_cast< bool*>(_v) = wordWrap(); break; case 9: *reinterpret_cast< bool*>(_v) = isHeaderHidden(); break; case 10: *reinterpret_cast< bool*>(_v) = expandsOnDoubleClick(); break; } _id -= 11; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setAutoExpandDelay(*reinterpret_cast< int*>(_v)); break; case 1: setIndentation(*reinterpret_cast< int*>(_v)); break; case 2: setRootIsDecorated(*reinterpret_cast< bool*>(_v)); break; case 3: setUniformRowHeights(*reinterpret_cast< bool*>(_v)); break; case 4: setItemsExpandable(*reinterpret_cast< bool*>(_v)); break; case 5: setSortingEnabled(*reinterpret_cast< bool*>(_v)); break; case 6: setAnimated(*reinterpret_cast< bool*>(_v)); break; case 7: setAllColumnsShowFocus(*reinterpret_cast< bool*>(_v)); break; case 8: setWordWrap(*reinterpret_cast< bool*>(_v)); break; case 9: setHeaderHidden(*reinterpret_cast< bool*>(_v)); break; case 10: setExpandsOnDoubleClick(*reinterpret_cast< bool*>(_v)); break; } _id -= 11; } else if (_c == QMetaObject::ResetProperty) { _id -= 11; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 11; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 11; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 11; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 11; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 11; } #endif // QT_NO_PROPERTIES return _id; }
void KNMusicMainPlayerContent::setColumnCount(int columnCount) { //Checkout the column count. if(columnCount>3) { //Greater than 3 columns, take it as 3 column. columnCount=3; } //If the column is less than 1, there will be at least 1 column. else if(columnCount<1) { //Save the column count. columnCount=1; } //Check out whether the column count is the same or not. if(columnCount!=m_columnCount) { //Save the valid column count. m_columnCount=columnCount; //Emit the changed signal. emit columnCountChanged(m_columnCount); //Check out the column count first. switch(m_columnCount) { case 1: //Reset the current index to 0. m_currentIndex=0; m_singleSwitcher->setCurrentIndex(0); //Hide the second and the third widget. setWidgetVisible(0, true); setWidgetVisible(1, false); setWidgetVisible(2, false); //Show up the switcher. m_singleSwitcher->show(); break; case 2: //Reset the index to -1. m_currentIndex=-1; //Hide the single switcher. m_singleSwitcher->hide(); //Show the first and second widget. setWidgetVisible(0, true); setWidgetVisible(1, true); setWidgetVisible(2, false); break; case 3: //Reset the index to -1. m_currentIndex=-1; //Show all the widgets. setWidgetVisible(0, true); setWidgetVisible(1, true); setWidgetVisible(2, true); //Hide the single switcher. m_singleSwitcher->hide(); break; } } //Update the geometry. regeometryWidgets(); }