[vlc-devel] commit: Qt: plViews, cleanups (Jean-Baptiste Kempf )
git version control
git at videolan.org
Tue Jan 26 01:33:21 CET 2010
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Jan 26 01:33:11 2010 +0100| [ddc7925dd25e8bc236f8e3dbf6f1dc7acc47ff2d] | committer: Jean-Baptiste Kempf
Qt: plViews, cleanups
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ddc7925dd25e8bc236f8e3dbf6f1dc7acc47ff2d
---
.../gui/qt4/components/playlist/standardpanel.cpp | 26 ++++++++++----------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index 4da7e87..a83a5ba 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -88,11 +88,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
layout->setColumnStretch( 1, 10 );
SearchLineEdit *search = new SearchLineEdit( this );
- search->setMaximumWidth( 200 );
+ search->setMaximumWidth( 300 );
layout->addWidget( search, 0, 4 );
CONNECT( search, textChanged( const QString& ),
this, search( const QString& ) );
- layout->setColumnStretch( 4, 1 );
+ layout->setColumnStretch( 4, 2 );
/* Add item to the playlist button */
addButton = new QPushButton;
@@ -112,14 +112,14 @@ StandardPLPanel::~StandardPLPanel()
getSettings()->beginGroup("Playlist");
if( treeView )
getSettings()->setValue( "headerStateV2", treeView->header()->saveState() );
+ getSettings()->setValue( "view-mode", ( currentView == iconView ) ? ICON_VIEW : TREE_VIEW );
getSettings()->endGroup();
}
/* Unused anymore, but might be useful, like in right-click menu */
void StandardPLPanel::gotoPlayingItem()
{
- if( treeView )
- treeView->scrollTo( model->currentIndex() );
+ currentView->scrollTo( model->currentIndex() );
}
void StandardPLPanel::handleExpansion( const QModelIndex& index )
@@ -153,6 +153,15 @@ void StandardPLPanel::popupAdd()
+ QPoint( 0, addButton->height() ) );
}
+void StandardPLPanel::popupPlView( const QPoint &point )
+{
+ QModelIndex index = currentView->indexAt( point );
+ QPoint globalPoint = currentView->viewport()->mapToGlobal( point );
+ QItemSelectionModel *selection = currentView->selectionModel();
+ QModelIndexList list = selection->selectedIndexes();
+ model->popup( index, globalPoint, list );
+}
+
void StandardPLPanel::popupSelectColumn( QPoint pos )
{
QMenu menu;
@@ -173,15 +182,6 @@ void StandardPLPanel::popupSelectColumn( QPoint pos )
menu.exec( QCursor::pos() );
}
-void StandardPLPanel::popupPlView( const QPoint &point )
-{
- QModelIndex index = currentView->indexAt( point );
- QPoint globalPoint = currentView->viewport()->mapToGlobal( point );
- QItemSelectionModel *selection = currentView->selectionModel();
- QModelIndexList list = selection->selectedIndexes();
- model->popup( index, globalPoint, list );
-}
-
void StandardPLPanel::toggleColumnShown( int i )
{
treeView->setColumnHidden( i, !treeView->isColumnHidden( i ) );
More information about the vlc-devel
mailing list