mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 07:07:05 +02:00
* Bring back the filter, move deps into libtomahawk/thirdparty/.
This commit is contained in:
@@ -126,8 +126,6 @@ SET( tomahawkHeadersGui ${tomahawkHeadersGui}
|
|||||||
resolversmodel.h
|
resolversmodel.h
|
||||||
delegateconfigwrapper.h
|
delegateconfigwrapper.h
|
||||||
tomahawkwindow.h
|
tomahawkwindow.h
|
||||||
|
|
||||||
Qocoa/qsearchfield.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SET( tomahawkUI ${tomahawkUI}
|
SET( tomahawkUI ${tomahawkUI}
|
||||||
@@ -178,13 +176,11 @@ IF( APPLE )
|
|||||||
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/thirdparty/SPMediaKeyTap )
|
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/thirdparty/SPMediaKeyTap )
|
||||||
|
|
||||||
SET( tomahawkHeaders ${tomahawkHeaders} mac/tomahawkapp_mac.h mac/macshortcuthandler.h )
|
SET( tomahawkHeaders ${tomahawkHeaders} mac/tomahawkapp_mac.h mac/macshortcuthandler.h )
|
||||||
SET( tomahawkSources ${tomahawkSources} mac/tomahawkapp_mac.mm mac/macshortcuthandler.cpp Qocoa/qsearchfield_mac.mm )
|
SET( tomahawkSources ${tomahawkSources} mac/tomahawkapp_mac.mm mac/macshortcuthandler.cpp )
|
||||||
|
|
||||||
IF(HAVE_SPARKLE)
|
IF(HAVE_SPARKLE)
|
||||||
SET( tomahawkHeaders ${tomahawkHeaders} ${SPARKLE}/Headers )
|
SET( tomahawkHeaders ${tomahawkHeaders} ${SPARKLE}/Headers )
|
||||||
ENDIF(HAVE_SPARKLE)
|
ENDIF(HAVE_SPARKLE)
|
||||||
ELSE( APPLE )
|
|
||||||
SET( tomahawkSources ${tomahawkSources} Qocoa/qsearchfield.cpp )
|
|
||||||
ENDIF( APPLE )
|
ENDIF( APPLE )
|
||||||
|
|
||||||
IF(GLOOX_FOUND)
|
IF(GLOOX_FOUND)
|
||||||
|
@@ -207,10 +207,10 @@ set( libSources
|
|||||||
widgets/headerbreadcrumb.cpp
|
widgets/headerbreadcrumb.cpp
|
||||||
widgets/siblingcrumbbutton.cpp
|
widgets/siblingcrumbbutton.cpp
|
||||||
|
|
||||||
kdsingleapplicationguard/kdsingleapplicationguard.cpp
|
thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp
|
||||||
kdsingleapplicationguard/kdsharedmemorylocker.cpp
|
thirdparty/kdsingleapplicationguard/kdsharedmemorylocker.cpp
|
||||||
kdsingleapplicationguard/kdtoolsglobal.cpp
|
thirdparty/kdsingleapplicationguard/kdtoolsglobal.cpp
|
||||||
kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
|
thirdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set( libHeaders
|
set( libHeaders
|
||||||
@@ -407,7 +407,8 @@ set( libHeaders
|
|||||||
widgets/headerbreadcrumb.h
|
widgets/headerbreadcrumb.h
|
||||||
widgets/siblingcrumbbutton.h
|
widgets/siblingcrumbbutton.h
|
||||||
|
|
||||||
kdsingleapplicationguard/kdsingleapplicationguard.h
|
thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h
|
||||||
|
thirdparty/Qocoa/qsearchfield.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set( libHeaders_NoMOC
|
set( libHeaders_NoMOC
|
||||||
@@ -499,7 +500,8 @@ IF( APPLE )
|
|||||||
SET( libSources ${libSources}
|
SET( libSources ${libSources}
|
||||||
infosystem/infoplugins/mac/adium.mm
|
infosystem/infoplugins/mac/adium.mm
|
||||||
infosystem/infoplugins/mac/adiumplugin.cpp
|
infosystem/infoplugins/mac/adiumplugin.cpp
|
||||||
utils/tomahawkutils_mac.mm )
|
utils/tomahawkutils_mac.mm
|
||||||
|
thirdparty/Qocoa/qsearchfield_mac.mm )
|
||||||
|
|
||||||
SET( libHeaders ${libHeaders}
|
SET( libHeaders ${libHeaders}
|
||||||
infosystem/infoplugins/mac/adium.h
|
infosystem/infoplugins/mac/adium.h
|
||||||
@@ -515,6 +517,8 @@ IF( APPLE )
|
|||||||
|
|
||||||
/System/Library/Frameworks/AppKit.framework
|
/System/Library/Frameworks/AppKit.framework
|
||||||
)
|
)
|
||||||
|
ELSE( APPLE )
|
||||||
|
SET( libSources ${libSources} thirdparty/Qocoa/qsearchfield.cpp )
|
||||||
ENDIF( APPLE )
|
ENDIF( APPLE )
|
||||||
|
|
||||||
IF(LIBLASTFM_FOUND)
|
IF(LIBLASTFM_FOUND)
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
|
||||||
#include "context/ContextWidget.h"
|
#include "thirdparty/Qocoa/qsearchfield.h"
|
||||||
#include "utils/tomahawkutils.h"
|
#include "utils/tomahawkutils.h"
|
||||||
#include "utils/logger.h"
|
#include "utils/logger.h"
|
||||||
|
|
||||||
@@ -69,6 +69,13 @@ InfoBar::InfoBar( QWidget* parent )
|
|||||||
ui->longDescriptionLabel->setText( QString() );
|
ui->longDescriptionLabel->setText( QString() );
|
||||||
ui->imageLabel->setText( QString() );
|
ui->imageLabel->setText( QString() );
|
||||||
|
|
||||||
|
m_searchWidget = new QSearchField( this );
|
||||||
|
m_searchWidget->setPlaceholderText( "Filter..." );
|
||||||
|
m_searchWidget->setMinimumWidth( 180 );
|
||||||
|
connect( m_searchWidget, SIGNAL( textChanged( QString ) ), this, SLOT( onFilterEdited() ) );
|
||||||
|
|
||||||
|
ui->horizontalLayout->addWidget( m_searchWidget );
|
||||||
|
|
||||||
setAutoFillBackground( true );
|
setAutoFillBackground( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,6 +124,13 @@ InfoBar::setPixmap( const QPixmap& p )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
InfoBar::onFilterEdited()
|
||||||
|
{
|
||||||
|
emit filterTextChanged( m_searchWidget->text() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
InfoBar::changeEvent( QEvent* e )
|
InfoBar::changeEvent( QEvent* e )
|
||||||
{
|
{
|
||||||
|
@@ -22,10 +22,10 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include "dllmacro.h"
|
#include "dllmacro.h"
|
||||||
|
|
||||||
#include "query.h"
|
#include "query.h"
|
||||||
|
|
||||||
class QTimeLine;
|
class QTimeLine;
|
||||||
|
class QSearchField;
|
||||||
class ContextWidget;
|
class ContextWidget;
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
@@ -47,12 +47,20 @@ public slots:
|
|||||||
void setLongDescription( const QString& s );
|
void setLongDescription( const QString& s );
|
||||||
void setPixmap( const QPixmap& p );
|
void setPixmap( const QPixmap& p );
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void filterTextChanged( const QString& filter );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void changeEvent( QEvent* e );
|
void changeEvent( QEvent* e );
|
||||||
void resizeEvent( QResizeEvent* e );
|
void resizeEvent( QResizeEvent* e );
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void onFilterEdited();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::InfoBar* ui;
|
Ui::InfoBar* ui;
|
||||||
|
|
||||||
|
QSearchField* m_searchWidget;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INFOBAR_H
|
#endif // INFOBAR_H
|
||||||
|
@@ -29,7 +29,7 @@ THE SOFTWARE.
|
|||||||
#include "playlist/topbar/searchlineedit.h"
|
#include "playlist/topbar/searchlineedit.h"
|
||||||
#include "utils/tomahawkutils.h"
|
#include "utils/tomahawkutils.h"
|
||||||
|
|
||||||
class QSearchFieldPrivate
|
class DLLEXPORT QSearchFieldPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QSearchFieldPrivate(SearchLineEdit *lineEdit) : lineEdit(lineEdit) {}
|
QSearchFieldPrivate(SearchLineEdit *lineEdit) : lineEdit(lineEdit) {}
|
@@ -3,8 +3,10 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
#include "dllmacro.h"
|
||||||
|
|
||||||
class QSearchFieldPrivate;
|
class QSearchFieldPrivate;
|
||||||
class QSearchField : public QWidget
|
class DLLEXPORT QSearchField : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
@@ -76,28 +76,14 @@ ViewManager::ViewManager( QObject* parent )
|
|||||||
s_instance = this;
|
s_instance = this;
|
||||||
|
|
||||||
m_widget->setLayout( new QVBoxLayout() );
|
m_widget->setLayout( new QVBoxLayout() );
|
||||||
|
|
||||||
// m_topbar = new TopBar();
|
|
||||||
m_infobar = new InfoBar();
|
m_infobar = new InfoBar();
|
||||||
m_stack = new QStackedWidget();
|
m_stack = new QStackedWidget();
|
||||||
|
|
||||||
/* m_splitter = new AnimatedSplitter();
|
|
||||||
m_splitter->setOrientation( Qt::Vertical );
|
|
||||||
m_splitter->setChildrenCollapsible( false );
|
|
||||||
m_splitter->setGreedyWidget( 0 );
|
|
||||||
m_splitter->addWidget( m_stack );*/
|
|
||||||
|
|
||||||
// m_splitter->addWidget( m_queueView );
|
|
||||||
// m_splitter->hide( 1, false );
|
|
||||||
|
|
||||||
m_contextWidget = new ContextWidget();
|
m_contextWidget = new ContextWidget();
|
||||||
|
|
||||||
m_widget->layout()->addWidget( m_infobar );
|
m_widget->layout()->addWidget( m_infobar );
|
||||||
// m_widget->layout()->addWidget( m_topbar );
|
|
||||||
// m_widget->layout()->addWidget( m_splitter );
|
|
||||||
m_widget->layout()->addWidget( m_stack );
|
m_widget->layout()->addWidget( m_stack );
|
||||||
m_widget->layout()->addWidget( m_contextWidget );
|
m_widget->layout()->addWidget( m_contextWidget );
|
||||||
// m_widget->layout()->addWidget( m_queueButton );
|
|
||||||
|
|
||||||
m_superCollectionView = new ArtistView();
|
m_superCollectionView = new ArtistView();
|
||||||
m_superCollectionModel = new TreeModel( m_superCollectionView );
|
m_superCollectionModel = new TreeModel( m_superCollectionView );
|
||||||
@@ -122,11 +108,10 @@ ViewManager::ViewManager( QObject* parent )
|
|||||||
connect( AudioEngine::instance(), SIGNAL( playlistChanged( Tomahawk::PlaylistInterface* ) ), this, SLOT( playlistInterfaceChanged( Tomahawk::PlaylistInterface* ) ) );
|
connect( AudioEngine::instance(), SIGNAL( playlistChanged( Tomahawk::PlaylistInterface* ) ), this, SLOT( playlistInterfaceChanged( Tomahawk::PlaylistInterface* ) ) );
|
||||||
|
|
||||||
connect( &m_filterTimer, SIGNAL( timeout() ), SLOT( applyFilter() ) );
|
connect( &m_filterTimer, SIGNAL( timeout() ), SLOT( applyFilter() ) );
|
||||||
|
connect( m_infobar, SIGNAL( filterTextChanged( QString ) ), SLOT( setFilter( QString ) ) );
|
||||||
/* connect( m_topbar, SIGNAL( filterTextChanged( QString ) ), SLOT( setFilter( QString ) ) );
|
/* connect( m_infobar, SIGNAL( flatMode() ), SLOT( setTableMode() ) );
|
||||||
connect( m_topbar, SIGNAL( flatMode() ), SLOT( setTableMode() ) );
|
connect( m_infobar, SIGNAL( artistMode() ), SLOT( setTreeMode() ) );
|
||||||
connect( m_topbar, SIGNAL( artistMode() ), SLOT( setTreeMode() ) );
|
connect( m_infobar, SIGNAL( albumMode() ), SLOT( setAlbumMode() ) );*/
|
||||||
connect( m_topbar, SIGNAL( albumMode() ), SLOT( setAlbumMode() ) );*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include "tomahawkapp.h"
|
#include "tomahawkapp.h"
|
||||||
|
|
||||||
#include "kdsingleapplicationguard/kdsingleapplicationguard.h"
|
#include "thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h"
|
||||||
|
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
#include "network/servent.h"
|
#include "network/servent.h"
|
||||||
|
|
||||||
#include "utils/tomahawkutils.h"
|
#include "utils/tomahawkutils.h"
|
||||||
#include "kdsingleapplicationguard/kdsingleapplicationguard.h"
|
#include "thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h"
|
||||||
|
|
||||||
class AudioEngine;
|
class AudioEngine;
|
||||||
class Database;
|
class Database;
|
||||||
|
@@ -47,6 +47,7 @@
|
|||||||
#include "widgets/newplaylistwidget.h"
|
#include "widgets/newplaylistwidget.h"
|
||||||
#include "widgets/searchwidget.h"
|
#include "widgets/searchwidget.h"
|
||||||
#include "widgets/playlisttypeselectordlg.h"
|
#include "widgets/playlisttypeselectordlg.h"
|
||||||
|
#include "thirdparty/Qocoa/qsearchfield.h"
|
||||||
|
|
||||||
#include "audiocontrols.h"
|
#include "audiocontrols.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingsdialog.h"
|
||||||
@@ -66,7 +67,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "utils/logger.h"
|
#include "utils/logger.h"
|
||||||
#include "Qocoa/qsearchfield.h"
|
|
||||||
|
|
||||||
using namespace Tomahawk;
|
using namespace Tomahawk;
|
||||||
|
|
||||||
|
@@ -105,6 +105,7 @@ private slots:
|
|||||||
void maximize();
|
void maximize();
|
||||||
|
|
||||||
void playlistCreateDialogFinished( int ret );
|
void playlistCreateDialogFinished( int ret );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void loadSettings();
|
void loadSettings();
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
|
Reference in New Issue
Block a user