Commit f5714b1e authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: PL/MLModels: implement columnCount() in parent class

parent 3f169532
......@@ -214,11 +214,6 @@ QMimeData* MLModel::mimeData( const QModelIndexList &indexes ) const
return data;
}
int MLModel::columnCount( const QModelIndex & ) const
{
return columnFromMeta( COLUMN_END );
}
int MLModel::rowCount( const QModelIndex & parent ) const
{
if( !parent.isValid() )
......
......@@ -67,7 +67,6 @@ public:
const QModelIndex & parent = QModelIndex() ) const;
virtual QModelIndex currentIndex() const;
int rowCount( const QModelIndex & parent = QModelIndex() ) const;
int columnCount( const QModelIndex & parent = QModelIndex() ) const;
QModelIndex parent( const QModelIndex& ) const;
QVariant headerData( int, Qt::Orientation, int ) const;
......
......@@ -575,11 +575,6 @@ QModelIndex PLModel::parent( const QModelIndex &index ) const
return createIndex(parentItem->row(), 0, parentItem);
}
int PLModel::columnCount( const QModelIndex &) const
{
return columnFromMeta( COLUMN_END );
}
int PLModel::rowCount( const QModelIndex &parent ) const
{
const PLItem *parentItem = parent.isValid() ? getItem( parent ) : rootItem;
......
......@@ -78,7 +78,6 @@ public:
virtual QVariant headerData( int section, Qt::Orientation orientation,
int role = Qt::DisplayRole ) const;
virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
virtual QModelIndex index( const int r, const int c, const QModelIndex &parent ) const;
virtual QModelIndex parent( const QModelIndex &index ) const;
......
......@@ -76,3 +76,9 @@ QPixmap VLCModel::getArtPixmap( const QModelIndex & index, const QSize & size )
return artPix;
}
int VLCModel::columnCount( const QModelIndex & ) const
{
return columnFromMeta( COLUMN_END );
}
......@@ -50,6 +50,9 @@ public:
};
VLCModel( intf_thread_t *_p_intf, QObject *parent = 0 );
/*** QAbstractItemModel subclassing ***/
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;
virtual int itemId( const QModelIndex & ) const = 0;
virtual input_item_t *getInputItem( const QModelIndex & ) const = 0;
virtual QModelIndex currentIndex() const = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment