[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/multimedia/amarok/src/playlist
From: Teo Mrnjavac <teo.mrnjavac () gmail ! com>
Date: 2009-07-02 2:30:26
Message-ID: 1246501826.026255.23080.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 990236 by mrnjavac:
Moved sort widget up to experiment with symmetry.
Remember, it's still all very temporary.
M +11 -1 PlaylistSortWidget.cpp
M +5 -6 PlaylistWidget.cpp
M +2 -2 PlaylistWidget.h
--- trunk/extragear/multimedia/amarok/src/playlist/PlaylistSortWidget.cpp #990235:990236
@@ -18,15 +18,22 @@
#include "Debug.h"
-
namespace Playlist
{
SortWidget::SortWidget( QWidget *parent ) : QWidget( parent )
{
DEBUG_BLOCK
+
+ //like BreadcrumbWidget for symmetry:
+ setFixedHeight( 28 );
+ setContentsMargins( 3, 0, 3, 0 );
+
QHBoxLayout *mainLayout = new QHBoxLayout( this );
setLayout( mainLayout );
+ mainLayout->setSpacing( 0 );
+ mainLayout->setContentsMargins( 0, 0, 0, 0 );
+
m_comboLayout = new QHBoxLayout( this );
mainLayout->addLayout( m_comboLayout );
m_sortableCategories.append( internalColumnNames );
@@ -46,10 +53,13 @@
mainLayout->addWidget( btnPushLevel );
btnPushLevel->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
btnPushLevel->resize( btnPushLevel->height(), btnPushLevel->height() );
+ btnPushLevel->setFlat( true );
+
KPushButton *btnPopLevel = new KPushButton( KIcon( "edit-delete" ), "", this );
mainLayout->addWidget( btnPopLevel );
btnPopLevel->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
btnPopLevel->resize( btnPopLevel->height(), btnPopLevel->height() );
+ btnPopLevel->setFlat( true );
mainLayout->addStretch();
m_btnSort = new KPushButton( "Just sort it!", this );
--- trunk/extragear/multimedia/amarok/src/playlist/PlaylistWidget.cpp #990235:990236
@@ -30,9 +30,7 @@
#include "PlaylistDefines.h"
#include "PlaylistHeader.h"
#include "PlaylistModel.h"
-#include "PlaylistSortWidget.h"
#include "layouts/LayoutManager.h"
-#include "proxymodels/FilterProxy.h"
#include "widgets/ProgressiveSearchWidget.h"
#include "layouts/LayoutConfigAction.h"
@@ -48,10 +46,11 @@
DEBUG_BLOCK
setContentsMargins( 1, 1, 1, 1 );
+ m_sortWidget = new Playlist::SortWidget( this );
+ new HorizontalDivider( this );
+
m_searchWidget = new ProgressiveSearchWidget( this );
- Playlist::SortWidget *sortWidget = new Playlist::SortWidget( this );
-
//this is really only useful for debugging at the moment, so dont show it to users and testers
/*m_sortBox = new QComboBox( this );
m_sortBox->insertItem( 0, "Album", Album);
@@ -168,7 +167,7 @@
return QSize( static_cast<QWidget*>( parent() )->size().width() / 4 , 300 );
}
-void
+/*void
Playlist::Widget::sort( int index )
{
DEBUG_BLOCK
@@ -176,7 +175,7 @@
debug() << "Field: " << field;
//The::playlistModel()->sort( field );
FilterProxy::instance()->sort( field );
-}
+}*/
void
Playlist::Widget::showDynamicHint( bool enabled )
--- trunk/extragear/multimedia/amarok/src/playlist/PlaylistWidget.h #990235:990236
@@ -19,6 +19,7 @@
#ifndef AMAROK_PLAYLISTWIDGET_H
#define AMAROK_PLAYLISTWIDGET_H
+#include "PlaylistSortWidget.h"
#include "view/listview/PrettyListView.h"
#include <KVBox>
@@ -40,7 +41,6 @@
PrettyListView* currentView() { return m_playlistView; }
public slots:
- void sort( int field );
void showDynamicHint( bool enabled );
protected:
@@ -49,7 +49,7 @@
private:
PrettyListView* m_playlistView;
ProgressiveSearchWidget * m_searchWidget;
- QComboBox * m_sortBox;
+ SortWidget * m_sortWidget;
QLabel* m_dynamicHintWidget;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic