Commit 0b49fce1 authored by Jakob Leben's avatar Jakob Leben

Qt: remove unused code

parent ab43895a
......@@ -83,9 +83,6 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
treeView->setDropIndicatorShown( true );
treeView->setContextMenuPolicy( Qt::CustomContextMenu );
//treeView->installEventFilter( this );
//<jleben> I guess we don't need that
/* Saved Settings */
getSettings()->beginGroup("Playlist");
if( getSettings()->contains( "headerStateV2" ) )
......@@ -240,13 +237,6 @@ void StandardPLPanel::search( const QString& searchText )
model->search( searchText );
}
void StandardPLPanel::doPopup( QModelIndex index, QPoint point )
{
QItemSelectionModel *selection = treeView->selectionModel();
QModelIndexList list = selection->selectedIndexes();
model->popup( index, point, list );
}
/* Set the root of the new Playlist */
/* This activated by the selector selection */
void StandardPLPanel::setRoot( playlist_item_t *p_item )
......@@ -320,7 +310,6 @@ void StandardPLPanel::toggleView()
{
iconView = new PlIconView( model, this );
layout->addWidget( iconView, 1, 0, 1, -1 );
//iconView->installEventFilter( this );
iconView->setContextMenuPolicy( Qt::CustomContextMenu );
CONNECT( iconView, customContextMenuRequested( const QPoint & ),
this, playlistPopup( const QPoint & ) );
......@@ -335,46 +324,6 @@ void StandardPLPanel::toggleView()
}
}
bool StandardPLPanel::eventFilter( QObject *obj, QEvent *event )
{
QAbstractItemView *aView = qobject_cast<QAbstractItemView *>(obj);
if( !aView ) return false;
switch( event->type() )
{
case QEvent::MouseButtonPress:
{
QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
if( mouseEvent->button() & Qt::RightButton )
{
QModelIndex index = aView->indexAt(
QPoint( mouseEvent->x(), mouseEvent->y() ) );
doPopup( index, QCursor::pos() );
return true;
}
else if( mouseEvent->button() & Qt::LeftButton )
{
if( !aView->indexAt( QPoint( mouseEvent->x(),
mouseEvent->y() ) ).isValid() )
aView->clearSelection();
}
// aView->mousePressEvent( mouseEvent );
}
return true;
case QEvent::MouseButtonRelease:
{
QMouseEvent *mouseEvent2 = static_cast<QMouseEvent *>(event);
if( mouseEvent2->button() & Qt::RightButton )
return false; /* Do NOT forward to QTreeView!! */
// aView->mouseReleaseEvent( mouseEvent );
return true;
}
default:
return false;
}
return true;
}
void StandardPLPanel::wheelEvent( QWheelEvent *e )
{
// Accept this event in order to prevent unwanted volume up/down changes
......
......@@ -60,8 +60,6 @@ protected:
virtual void keyPressEvent( QKeyEvent *e );
virtual void wheelEvent( QWheelEvent *e );
bool eventFilter(QObject *obj, QEvent *event);
PLModel *model;
private:
intf_thread_t *p_intf;
......@@ -77,7 +75,6 @@ private:
int currentRootId;
QSignalMapper *selectColumnsSigMapper;
void doPopup( QModelIndex index, QPoint point );
public slots:
void removeItem( int );
virtual void setRoot( playlist_item_t * );
......
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