mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 15:29:42 +01:00
* Moved widgets out of utils/ dir.
This commit is contained in:
parent
b83a7bed00
commit
914c02b7ab
@ -22,7 +22,7 @@
|
||||
#include <QTreeWidget>
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "utils/animatedsplitter.h"
|
||||
#include "widgets/animatedsplitter.h"
|
||||
|
||||
class StreamConnection;
|
||||
|
||||
|
@ -24,18 +24,16 @@
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include "audio/audioengine.h"
|
||||
#include "viewmanager.h"
|
||||
#include "playlist/playlistview.h"
|
||||
#include "database/database.h"
|
||||
#include "database/databasecommand_socialaction.h"
|
||||
|
||||
#include "album.h"
|
||||
|
||||
#include "utils/imagebutton.h"
|
||||
#include "widgets/imagebutton.h"
|
||||
#include "utils/tomahawkutils.h"
|
||||
#include "utils/logger.h"
|
||||
#include <globalactionmanager.h>
|
||||
#include "album.h"
|
||||
#include "dropjob.h"
|
||||
#include "globalactionmanager.h"
|
||||
#include "viewmanager.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@ -90,7 +88,7 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
|
||||
ui->ownerLabel->setForegroundRole( QPalette::Dark );
|
||||
ui->metaDataArea->setStyleSheet( "QWidget#metaDataArea {\nborder-width: 4px;\nborder-image: url(" RESPATH "images/now-playing-panel.png) 4 4 4 4 stretch stretch; }" );
|
||||
|
||||
|
||||
ui->seekSlider->setEnabled( true );
|
||||
ui->volumeSlider->setRange( 0, 100 );
|
||||
ui->volumeSlider->setValue( AudioEngine::instance()->volume() );
|
||||
@ -99,7 +97,7 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
ui->seekSlider->setTimeLine( &m_sliderTimeLine );
|
||||
|
||||
connect( &m_sliderTimeLine, SIGNAL( frameChanged( int ) ), ui->seekSlider, SLOT( setValue( int ) ) );
|
||||
|
||||
|
||||
connect( ui->seekSlider, SIGNAL( valueChanged( int ) ), AudioEngine::instance(), SLOT( seek( int ) ) );
|
||||
connect( ui->volumeSlider, SIGNAL( valueChanged( int ) ), AudioEngine::instance(), SLOT( setVolume( int ) ) );
|
||||
connect( ui->prevButton, SIGNAL( clicked() ), AudioEngine::instance(), SLOT( previous() ) );
|
||||
@ -189,7 +187,7 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
|
||||
if ( result.isNull() )
|
||||
return;
|
||||
|
||||
|
||||
if ( m_currentTrack.isNull() || ( !m_currentTrack.isNull() && m_currentTrack.data()->id() != result.data()->id() ) )
|
||||
onPlaybackLoading( result );
|
||||
|
||||
@ -197,7 +195,7 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
|
||||
if ( duration == -1 )
|
||||
duration = result.data()->duration() * 1000;
|
||||
|
||||
|
||||
ui->seekSlider->setRange( 0, duration );
|
||||
ui->seekSlider->setValue( 0 );
|
||||
|
||||
@ -208,7 +206,7 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
m_seekMsecs = -1;
|
||||
|
||||
ui->seekSlider->setVisible( true );
|
||||
|
||||
|
||||
Tomahawk::InfoSystem::InfoCriteriaHash trackInfo;
|
||||
trackInfo["artist"] = result->artist()->name();
|
||||
trackInfo["album"] = result->album()->name();
|
||||
@ -374,7 +372,7 @@ AudioControls::onPlaybackTimer( qint64 msElapsed )
|
||||
const int seconds = msElapsed / 1000;
|
||||
ui->timeLabel->setText( TomahawkUtils::timeToString( seconds ) );
|
||||
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( m_currentTrack->duration() - seconds ) );
|
||||
|
||||
|
||||
if ( m_sliderTimeLine.currentTime() > msElapsed || m_seekMsecs != -1 )
|
||||
{
|
||||
m_sliderTimeLine.setPaused( true );
|
||||
|
@ -537,12 +537,12 @@
|
||||
<customwidget>
|
||||
<class>ImageButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>utils/imagebutton.h</header>
|
||||
<header>widgets/imagebutton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QueryLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>utils/querylabel.h</header>
|
||||
<header>widgets/querylabel.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
|
@ -170,12 +170,9 @@ set( libSources
|
||||
network/controlconnection.cpp
|
||||
|
||||
utils/tomahawkutils.cpp
|
||||
utils/querylabel.cpp
|
||||
utils/imagebutton.cpp
|
||||
utils/logger.cpp
|
||||
utils/proxystyle.cpp
|
||||
utils/widgetdragfilter.cpp
|
||||
utils/animatedsplitter.cpp
|
||||
utils/xspfloader.cpp
|
||||
utils/xspfgenerator.cpp
|
||||
utils/jspfloader.cpp
|
||||
@ -184,6 +181,9 @@ set( libSources
|
||||
utils/shortenedlinkparser.cpp
|
||||
utils/stylehelper.cpp
|
||||
|
||||
widgets/querylabel.cpp
|
||||
widgets/imagebutton.cpp
|
||||
widgets/animatedsplitter.cpp
|
||||
widgets/elidedlabel.cpp
|
||||
widgets/newplaylistwidget.cpp
|
||||
widgets/searchwidget.cpp
|
||||
@ -370,11 +370,7 @@ set( libHeaders
|
||||
playlist/dynamic/database/DatabaseControl.h
|
||||
playlist/dynamic/database/DatabaseGenerator.h
|
||||
|
||||
utils/querylabel.h
|
||||
utils/animatedcounterlabel.h
|
||||
utils/imagebutton.h
|
||||
utils/widgetdragfilter.h
|
||||
utils/animatedsplitter.h
|
||||
utils/xspfloader.h
|
||||
utils/xspfgenerator.h
|
||||
utils/jspfloader.h
|
||||
@ -383,6 +379,10 @@ set( libHeaders
|
||||
utils/shortenedlinkparser.h
|
||||
utils/stylehelper.h
|
||||
|
||||
widgets/querylabel.h
|
||||
widgets/animatedcounterlabel.h
|
||||
widgets/imagebutton.h
|
||||
widgets/animatedsplitter.h
|
||||
widgets/elidedlabel.h
|
||||
widgets/newplaylistwidget.h
|
||||
widgets/searchwidget.h
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
#include "utils/animatedsplitter.h"
|
||||
#include "widgets/animatedsplitter.h"
|
||||
#include "playlistview.h"
|
||||
|
||||
#include "dllmacro.h"
|
||||
|
@ -311,7 +311,7 @@
|
||||
<customwidget>
|
||||
<class>AnimatedCounterLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>utils/animatedcounterlabel.h</header>
|
||||
<header>widgets/animatedcounterlabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SearchLineEdit</class>
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include "audio/audioengine.h"
|
||||
#include "context/ContextWidget.h"
|
||||
#include "utils/animatedsplitter.h"
|
||||
#include "infobar/infobar.h"
|
||||
#include "topbar/topbar.h"
|
||||
|
||||
@ -49,6 +48,7 @@
|
||||
#include "widgets/infowidgets/ArtistInfoWidget.h"
|
||||
#include "widgets/infowidgets/AlbumInfoWidget.h"
|
||||
#include "widgets/newplaylistwidget.h"
|
||||
#include "widgets/animatedsplitter.h"
|
||||
|
||||
#include "utils/logger.h"
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "artist.h"
|
||||
#include "album.h"
|
||||
#include "query.h"
|
||||
#include "tomahawkutils.h"
|
||||
#include "utils/tomahawkutils.h"
|
||||
#include "utils/logger.h"
|
||||
|
||||
#define BOXMARGIN 2
|
@ -41,9 +41,9 @@
|
||||
#include "viewmanager.h"
|
||||
#include "sip/SipHandler.h"
|
||||
#include "sourcetree/sourcetreeview.h"
|
||||
#include "utils/animatedsplitter.h"
|
||||
#include "utils/proxystyle.h"
|
||||
#include "utils/xspfloader.h"
|
||||
#include "widgets/animatedsplitter.h"
|
||||
#include "widgets/newplaylistwidget.h"
|
||||
#include "widgets/searchwidget.h"
|
||||
#include "widgets/playlisttypeselectordlg.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <QTreeWidget>
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "utils/animatedsplitter.h"
|
||||
#include "widgets/animatedsplitter.h"
|
||||
|
||||
class StreamConnection;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user