|
|
@ -2728,7 +2728,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
#define me TQT_TQMOUSEEVENT(e)
|
|
|
|
#define me TQT_TQMOUSEEVENT(e)
|
|
|
|
#define ke TQT_TQKEYEVENT(e)
|
|
|
|
#define ke TQT_TQKEYEVENT(e)
|
|
|
|
|
|
|
|
|
|
|
|
if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header()) && e->type() == TQEvent::MouseButtonPress && me->button() == Qt::RightButton )
|
|
|
|
if( o == header() && e->type() == TQEvent::MouseButtonPress && me->button() == Qt::RightButton )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
enum { HIDE = 1000, SELECT, CUSTOM, SMARTRESIZING };
|
|
|
|
enum { HIDE = 1000, SELECT, CUSTOM, SMARTRESIZING };
|
|
|
|
|
|
|
|
|
|
|
@ -2794,7 +2794,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// not in slotMouseButtonPressed because we need to disable normal usage.
|
|
|
|
// not in slotMouseButtonPressed because we need to disable normal usage.
|
|
|
|
if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) && e->type() == TQEvent::MouseButtonPress && me->state() == TQt::ControlButton && me->button() == Qt::RightButton )
|
|
|
|
if( o == viewport() && e->type() == TQEvent::MouseButtonPress && me->state() == TQt::ControlButton && me->button() == Qt::RightButton )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PlaylistItem *item = static_cast<PlaylistItem*>( itemAt( me->pos() ) );
|
|
|
|
PlaylistItem *item = static_cast<PlaylistItem*>( itemAt( me->pos() ) );
|
|
|
|
|
|
|
|
|
|
|
@ -2809,7 +2809,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// trigger in-place tag editing
|
|
|
|
// trigger in-place tag editing
|
|
|
|
else if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) && e->type() == TQEvent::MouseButtonPress && me->button() == Qt::LeftButton )
|
|
|
|
else if( o == viewport() && e->type() == TQEvent::MouseButtonPress && me->button() == Qt::LeftButton )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_clicktimer->stop();
|
|
|
|
m_clicktimer->stop();
|
|
|
|
m_itemToRename = 0;
|
|
|
|
m_itemToRename = 0;
|
|
|
@ -2832,7 +2832,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
else if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) && e->type() == TQEvent::MouseButtonRelease && me->button() == Qt::LeftButton )
|
|
|
|
else if( o == viewport() && e->type() == TQEvent::MouseButtonRelease && me->button() == Qt::LeftButton )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int col = header()->sectionAt( viewportToContents( me->pos() ).x() );
|
|
|
|
int col = header()->sectionAt( viewportToContents( me->pos() ).x() );
|
|
|
|
if( col != PlaylistItem::Rating )
|
|
|
|
if( col != PlaylistItem::Rating )
|
|
|
@ -2858,7 +2858,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Toggle play/pause if user middle-clicks on current track
|
|
|
|
// Toggle play/pause if user middle-clicks on current track
|
|
|
|
else if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) && e->type() == TQEvent::MouseButtonPress && me->button() == Qt::MidButton )
|
|
|
|
else if( o == viewport() && e->type() == TQEvent::MouseButtonPress && me->button() == Qt::MidButton )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PlaylistItem *item = static_cast<PlaylistItem*>( itemAt( me->pos() ) );
|
|
|
|
PlaylistItem *item = static_cast<PlaylistItem*>( itemAt( me->pos() ) );
|
|
|
|
|
|
|
|
|
|
|
@ -2869,7 +2869,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
else if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(renameLineEdit()) && e->type() == 6 /*TQEvent::KeyPress*/ && m_renameItem )
|
|
|
|
else if( o == renameLineEdit() && e->type() == 6 /*TQEvent::KeyPress*/ && m_renameItem )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const int visibleCols = numVisibleColumns();
|
|
|
|
const int visibleCols = numVisibleColumns();
|
|
|
|
int physicalColumn = visibleCols - 1;
|
|
|
|
int physicalColumn = visibleCols - 1;
|
|
|
@ -2960,7 +2960,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
else if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(renameLineEdit()) && ( e->type() == TQEvent::Hide || e->type() == TQEvent::Close ) )
|
|
|
|
else if( o == renameLineEdit() && ( e->type() == TQEvent::Hide || e->type() == TQEvent::Close ) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_renameItem = 0;
|
|
|
|
m_renameItem = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|