Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move implementations to source files in app

  • Loading branch information...
commit 443d7519ac10329fb0c5c1a93d455d648199284b 1 parent ecf0e67
@dschmidt dschmidt authored
Showing with 521 additions and 86 deletions.
  1. +25 −0 src/ConfigDelegateBase.cpp
  2. +1 −1  src/ConfigDelegateBase.h
  3. +14 −0 src/SocialWidget.cpp
  4. +2 −2 src/SocialWidget.h
  5. +14 −0 src/TomahawkApp.cpp
  6. +2 −6 src/TomahawkApp.h
  7. +14 −0 src/TomahawkWindow.cpp
  8. +2 −2 src/TomahawkWindow.h
  9. +14 −0 src/sourcetree/AnimationHelper.cpp
  10. +2 −2 src/sourcetree/AnimationHelper.h
  11. +7 −0 src/sourcetree/SourcesModel.cpp
  12. +1 −1  src/sourcetree/SourcesModel.h
  13. +28 −0 src/sourcetree/items/CategoryItems.cpp
  14. +3 −12 src/sourcetree/items/CategoryItems.h
  15. +14 −0 src/sourcetree/items/GenericPageItems.cpp
  16. +2 −2 src/sourcetree/items/GenericPageItems.h
  17. +30 −0 src/sourcetree/items/GroupItem.cpp
  18. +4 −4 src/sourcetree/items/GroupItem.h
  19. +21 −1 src/sourcetree/items/LovedTracksItem.cpp
  20. +3 −3 src/sourcetree/items/LovedTracksItem.h
  21. +20 −0 src/sourcetree/items/PlaylistItems.cpp
  22. +3 −3 src/sourcetree/items/PlaylistItems.h
  23. +28 −0 src/sourcetree/items/SourceItem.cpp
  24. +4 −4 src/sourcetree/items/SourceItem.h
  25. +190 −0 src/sourcetree/items/SourceTreeItem.cpp
  26. +27 −27 src/sourcetree/items/SourceTreeItem.h
  27. +21 −0 src/sourcetree/items/TemporaryPageItem.cpp
  28. +3 −3 src/sourcetree/items/TemporaryPageItem.h
  29. +5 −0 src/web/Api_v1.cpp
  30. +1 −4 src/web/Api_v1.h
  31. +7 −0 src/widgets/ContainedMenuButton.cpp
  32. +1 −1  src/widgets/ContainedMenuButton.h
  33. +7 −7 src/widgets/SlideSwitchButton.h
  34. +1 −1  src/widgets/UnstyledFrame.h
View
25 src/ConfigDelegateBase.cpp
@@ -0,0 +1,25 @@
+/*
+ Copyright (C) 2011 Leo Franchi <leo.franchi@kdab.com>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "ConfigDelegateBase.h"
+
+
+QList< int >
+ConfigDelegateBase::extraCheckRoles() const
+{
+ return QList<int>();
+}
View
2  src/ConfigDelegateBase.h
@@ -40,7 +40,7 @@ class Q_DECL_EXPORT ConfigDelegateBase : public QStyledItemDelegate
// if you want to use a config wrench, you need to have this say where to paint it
virtual QRect configRectForIndex( const QStyleOptionViewItem& option, const QModelIndex& idx ) const = 0;
- virtual QList<int> extraCheckRoles() const { return QList<int>(); }
+ virtual QList<int> extraCheckRoles() const;
signals:
void configPressed( const QModelIndex& idx );
View
14 src/SocialWidget.cpp
@@ -266,3 +266,17 @@ SocialWidget::eventFilter( QObject* object, QEvent* event )
return QObject::eventFilter( object, event );
}
+
+
+Tomahawk::query_ptr
+SocialWidget::query() const
+{
+ return m_query;
+}
+
+
+QPoint
+SocialWidget::position() const
+{
+ return m_position;
+}
View
4 src/SocialWidget.h
@@ -39,10 +39,10 @@ Q_OBJECT
SocialWidget( QWidget* parent );
~SocialWidget();
- Tomahawk::query_ptr query() const { return m_query; }
+ Tomahawk::query_ptr query() const;
void setQuery( const Tomahawk::query_ptr& query );
- QPoint position() const { return m_position; }
+ QPoint position() const;
void setPosition( QPoint position );
bool shown() const;
View
14 src/TomahawkApp.cpp
@@ -782,3 +782,17 @@ TomahawkApp::instanceStarted( KDSingleApplicationGuard::Instance instance )
else
activate();
}
+
+
+TomahawkWindow*
+TomahawkApp::mainWindow() const
+{
+ return m_mainwindow;
+}
+
+
+bool
+TomahawkApp::isTomahawkLoaded() const
+{
+ return m_loaded;
+}
View
8 src/TomahawkApp.h
@@ -46,7 +46,6 @@ class ScanManager;
class Servent;
class SipHandler;
class TomahawkSettings;
-class XMPPBot;
class AudioControls;
namespace Tomahawk
@@ -87,17 +86,15 @@ Q_OBJECT
void init();
static TomahawkApp* instance();
- XMPPBot* xmppBot() { return m_xmppBot.data(); }
-
#ifndef ENABLE_HEADLESS
AudioControls* audioControls();
- TomahawkWindow* mainWindow() const { return m_mainwindow; }
+ TomahawkWindow* mainWindow() const;
#endif
// PlatformInterface
virtual bool loadUrl( const QString& url );
- bool isTomahawkLoaded() const { return m_loaded; }
+ bool isTomahawkLoaded() const;
// reimplemented from QApplication/QCoreApplication
virtual bool notify( QObject* receiver, QEvent* e );
@@ -133,7 +130,6 @@ private slots:
QWeakPointer<AudioEngine> m_audioEngine;
QWeakPointer<Servent> m_servent;
QWeakPointer<Tomahawk::InfoSystem::InfoSystem> m_infoSystem;
- QWeakPointer<XMPPBot> m_xmppBot;
QWeakPointer<Tomahawk::ShortcutHandler> m_shortcutHandler;
QWeakPointer< Tomahawk::Accounts::AccountManager > m_accountManager;
bool m_scrubFriendlyName;
View
14 src/TomahawkWindow.cpp
@@ -1318,3 +1318,17 @@ TomahawkWindow::toggleMenuBar() //SLOT
saveSettings();
#endif
}
+
+
+AudioControls*
+TomahawkWindow::audioControls()
+{
+ return m_audioControls;
+}
+
+
+SourceTreeView*
+TomahawkWindow::sourceTreeView() const
+{
+ return m_sourcetree;
+}
View
4 src/TomahawkWindow.h
@@ -76,8 +76,8 @@ Q_OBJECT
TomahawkWindow( QWidget* parent = 0 );
~TomahawkWindow();
- AudioControls* audioControls() { return m_audioControls; }
- SourceTreeView* sourceTreeView() const { return m_sourcetree; }
+ AudioControls* audioControls();
+ SourceTreeView* sourceTreeView() const;
void setWindowTitle( const QString& title );
View
14 src/sourcetree/AnimationHelper.cpp
@@ -128,3 +128,17 @@ void AnimationHelper::collapseAnimationFinished()
{
emit finished( m_index );
}
+
+
+QSize
+AnimationHelper::originalSize() const
+{
+ return m_startSize;
+}
+
+
+QSize
+AnimationHelper::size() const
+{
+ return m_size;
+}
View
4 src/sourcetree/AnimationHelper.h
@@ -34,8 +34,8 @@ class AnimationHelper: public QObject
public:
AnimationHelper( const QModelIndex& index, QObject *parent = 0 );
- QSize originalSize() const { return m_startSize; }
- QSize size() const { return m_size; }
+ QSize originalSize() const;
+ QSize size() const;
bool initialized() const;
void initialize( const QSize& startValue, const QSize& endValue, int duration );
View
7 src/sourcetree/SourcesModel.cpp
@@ -674,3 +674,10 @@ SourcesModel::itemToggleExpandRequest( SourceTreeItem *item )
{
emit toggleExpandRequest( QPersistentModelIndex( indexFromItem( item ) ) );
}
+
+
+QList< source_ptr >
+SourcesModel::sourcesWithViewPage() const
+{
+ return m_sourcesWithViewPage;
+}
View
2  src/sourcetree/SourcesModel.h
@@ -108,7 +108,7 @@ class SourcesModel : public QAbstractItemModel
QModelIndex indexFromItem( SourceTreeItem* item ) const;
- QList< Tomahawk::source_ptr > sourcesWithViewPage() const { return m_sourcesWithViewPage; }
+ QList< Tomahawk::source_ptr > sourcesWithViewPage() const;
public slots:
void loadSources();
View
28 src/sourcetree/items/CategoryItems.cpp
@@ -378,3 +378,31 @@ CategoryItem::activate()
{
emit toggleExpandRequest( this );
}
+
+
+QString
+CategoryItem::text() const
+{
+ switch( m_category )
+ {
+ case SourcesModel::PlaylistsCategory:
+ return tr( "Playlists" );
+ case SourcesModel::StationsCategory:
+ return tr( "Stations" );
+ }
+ return QString();
+}
+
+
+Qt::ItemFlags
+CategoryItem::flags() const
+{
+ return Qt::ItemIsEnabled;
+}
+
+
+SourcesModel::CategoryType
+CategoryItem::categoryType()
+{
+ return m_category;
+}
View
15 src/sourcetree/items/CategoryItems.h
@@ -56,25 +56,16 @@ class CategoryItem : public SourceTreeItem
public:
CategoryItem( SourcesModel* model, SourceTreeItem* parent, SourcesModel::CategoryType category, bool showAddItem );
- virtual QString text() const {
- switch( m_category )
- {
- case SourcesModel::PlaylistsCategory:
- return tr( "Playlists" );
- case SourcesModel::StationsCategory:
- return tr( "Stations" );
- }
- return QString();
- }
+ virtual QString text() const;
virtual void activate();
virtual int peerSortValue() const;
- virtual Qt::ItemFlags flags() const { return Qt::ItemIsEnabled; }
+ virtual Qt::ItemFlags flags() const;
// inserts an item at the end, but before the category add item
void insertItem( SourceTreeItem* item );
void insertItems( QList< SourceTreeItem* > item );
- SourcesModel::CategoryType categoryType() { return m_category; }
+ SourcesModel::CategoryType categoryType();
private:
SourcesModel::CategoryType m_category;
View
14 src/sourcetree/items/GenericPageItems.cpp
@@ -99,3 +99,17 @@ GenericPageItem::isBeingPlayed() const
return false;
}
+
+
+int
+GenericPageItem::peerSortValue() const
+{
+ return m_sortValue;
+}
+
+
+void
+GenericPageItem::setSortValue(int value)
+{
+ m_sortValue = value;
+}
View
4 src/sourcetree/items/GenericPageItems.h
@@ -37,11 +37,11 @@ class GenericPageItem : public SourceTreeItem
virtual void activate();
virtual bool willAcceptDrag( const QMimeData* data ) const;
virtual QIcon icon() const;
- virtual int peerSortValue() const { return m_sortValue; } // How to sort relative to peers in the tree.
+ virtual int peerSortValue() const; // How to sort relative to peers in the tree.
virtual bool isBeingPlayed() const;
void setText( const QString& text );
- void setSortValue( int value ) { m_sortValue = value; }
+ void setSortValue( int value );
signals:
void activated();
View
30 src/sourcetree/items/GroupItem.cpp
@@ -71,3 +71,33 @@ GroupItem::text() const
{
return m_text;
}
+
+
+bool
+GroupItem::willAcceptDrag(const QMimeData* data) const
+{
+ Q_UNUSED( data );
+ return false;
+}
+
+
+QIcon
+GroupItem::icon() const
+{
+ return QIcon();
+}
+
+
+bool
+GroupItem::isBeingPlayed() const
+{
+ return false;
+}
+
+
+void
+GroupItem::setDefaultExpanded(bool b)
+{
+ m_defaultExpanded = b;
+}
+
View
8 src/sourcetree/items/GroupItem.h
@@ -34,12 +34,12 @@ class GroupItem : public SourceTreeItem
virtual ~GroupItem();
virtual QString text() const;
- virtual bool willAcceptDrag( const QMimeData* data ) const { Q_UNUSED( data ); return false; }
- virtual QIcon icon() const { return QIcon(); }
- virtual bool isBeingPlayed() const { return false; }
+ virtual bool willAcceptDrag( const QMimeData* data ) const;
+ virtual QIcon icon() const;
+ virtual bool isBeingPlayed() const;
void checkExpandedState();
- void setDefaultExpanded( bool b ) { m_defaultExpanded = b; }
+ void setDefaultExpanded( bool b );
public slots:
virtual void activate();
View
22 src/sourcetree/items/LovedTracksItem.cpp
@@ -57,6 +57,13 @@ LovedTracksItem::text() const
}
+QIcon
+LovedTracksItem::icon() const
+{
+ return QIcon( RESPATH "images/loved_playlist.png" );
+}
+
+
void
LovedTracksItem::activate()
{
@@ -134,10 +141,23 @@ LovedTracksItem::dropMimeData( const QMimeData* data, Qt::DropAction action )
}
+int
+LovedTracksItem::peerSortValue() const
+{
+ return m_sortValue;
+}
+
+
+void
+LovedTracksItem::setSortValue(int value)
+{
+ m_sortValue = value;
+}
+
+
void
LovedTracksItem::loveDroppedTracks( QList< Tomahawk::query_ptr > qrys )
{
foreach( Tomahawk::query_ptr qry, qrys )
qry->setLoved( true );
}
-
View
6 src/sourcetree/items/LovedTracksItem.h
@@ -34,15 +34,15 @@ class LovedTracksItem : public SourceTreeItem
virtual ~LovedTracksItem();
virtual QString text() const;
- virtual QIcon icon() const { return QIcon( RESPATH "images/loved_playlist.png" ); }
- virtual int peerSortValue() const { return m_sortValue; }
+ virtual QIcon icon() const;
+ virtual int peerSortValue() const;
virtual void activate();
virtual bool willAcceptDrag( const QMimeData* data ) const;
virtual DropTypes supportedDropTypes( const QMimeData* data ) const;
virtual bool dropMimeData( const QMimeData* data, Qt::DropAction action );
- void setSortValue( int value ) { m_sortValue = value; }
+ void setSortValue( int value );
private slots:
void loveDroppedTracks( QList< Tomahawk::query_ptr > qrys );
View
20 src/sourcetree/items/PlaylistItems.cpp
@@ -610,3 +610,23 @@ DynamicPlaylistItem::isBeingPlayed() const
return false;
}
+
+bool
+PlaylistItem::canSubscribe() const
+{
+ return m_canSubscribe;
+}
+
+
+bool
+PlaylistItem::subscribed() const
+{
+ return m_showSubscribed;
+}
+
+
+QPixmap
+PlaylistItem::subscribedIcon() const
+{
+ return m_showSubscribed ? m_subscribedOnIcon : m_subscribedOffIcon;
+}
View
6 src/sourcetree/items/PlaylistItems.h
@@ -43,9 +43,9 @@ class PlaylistItem : public SourceTreeItem
virtual SourceTreeItem* activateCurrent();
// subscription management
- bool canSubscribe() const { return m_canSubscribe; }
- bool subscribed() const { return m_showSubscribed; }
- QPixmap subscribedIcon() const { return m_showSubscribed ? m_subscribedOnIcon : m_subscribedOffIcon; }
+ bool canSubscribe() const;
+ bool subscribed() const;
+ QPixmap subscribedIcon() const;
void setSubscribed( bool subscribed );
bool collaborative() const;
View
28 src/sourcetree/items/SourceItem.cpp
@@ -581,3 +581,31 @@ SourceItem::getRecentPlaysPage() const
{
return m_recentPlaysPage;
}
+
+
+CategoryItem*
+SourceItem::stationsCategory() const
+{
+ return m_stations;
+}
+
+
+CategoryItem*
+SourceItem::playlistsCategory() const
+{
+ return m_playlists;
+}
+
+
+void
+SourceItem::setStationsCategory(CategoryItem* item)
+{
+ m_stations = item;
+}
+
+
+void
+SourceItem::setPlaylistsCategory(CategoryItem* item)
+{
+ m_playlists = item;
+}
View
8 src/sourcetree/items/SourceItem.h
@@ -48,10 +48,10 @@ class SourceItem : public SourceTreeItem
Tomahawk::source_ptr source() const;
- CategoryItem* stationsCategory() const { return m_stations; }
- CategoryItem* playlistsCategory() const { return m_playlists; }
- void setStationsCategory( CategoryItem* item ) { m_stations = item; }
- void setPlaylistsCategory( CategoryItem* item ) { m_playlists = item; }
+ CategoryItem* stationsCategory() const;
+ CategoryItem* playlistsCategory() const;
+ void setStationsCategory( CategoryItem* item );
+ void setPlaylistsCategory( CategoryItem* item );
public slots:
virtual void activate();
View
190 src/sourcetree/items/SourceTreeItem.cpp
@@ -54,3 +54,193 @@ SourceTreeItem::~SourceTreeItem()
{
qDeleteAll( m_children );
}
+
+
+SourcesModel::RowType
+SourceTreeItem::type() const
+{
+ return m_type;
+}
+
+
+SourceTreeItem*
+SourceTreeItem::parent() const
+{
+ return m_parent;
+}
+
+
+SourcesModel*
+SourceTreeItem::model() const
+{
+ return m_model;
+}
+
+
+QList< SourceTreeItem* >
+SourceTreeItem::children() const
+{
+ return m_children;
+}
+
+
+void
+SourceTreeItem::appendChild(SourceTreeItem* item)
+{
+ m_children.append( item );
+}
+
+
+void
+SourceTreeItem::insertChild(int index, SourceTreeItem* item)
+{
+ m_children.insert( index, item );
+}
+
+
+void
+SourceTreeItem::removeChild(SourceTreeItem* item)
+{
+ m_children.removeAll( item );
+}
+
+
+QString
+SourceTreeItem::text() const
+{
+ return QString();
+}
+
+
+QString
+SourceTreeItem::tooltip() const
+{
+ return QString();
+}
+
+
+Qt::ItemFlags
+SourceTreeItem::flags() const
+{
+ return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
+}
+
+
+QIcon
+SourceTreeItem::icon() const
+{
+ return QIcon();
+}
+
+
+bool
+SourceTreeItem::willAcceptDrag(const QMimeData*) const
+{
+ return false;
+}
+
+
+bool
+SourceTreeItem::dropMimeData(const QMimeData*, Qt::DropAction)
+{
+ return false;
+}
+
+
+bool
+SourceTreeItem::setData(const QVariant&, bool)
+{
+ return false;
+}
+
+
+int
+SourceTreeItem::peerSortValue() const
+{
+ return m_peerSortValue;
+}
+
+
+int
+SourceTreeItem::IDValue() const
+{
+ return 0;
+}
+
+
+SourceTreeItem::DropTypes
+SourceTreeItem::supportedDropTypes(const QMimeData* mimeData) const
+{
+ Q_UNUSED( mimeData );
+ return DropTypesNone;
+}
+
+
+void
+SourceTreeItem::setDropType(SourceTreeItem::DropType type)
+{
+ m_dropType = type;
+}
+
+
+SourceTreeItem::DropType
+SourceTreeItem::dropType() const
+{
+ return m_dropType;
+}
+
+
+bool
+SourceTreeItem::isBeingPlayed() const
+{
+ return false;
+}
+
+
+QList< QAction* >
+SourceTreeItem::customActions() const
+{
+ return QList< QAction* >();
+}
+
+
+void
+SourceTreeItem::beginRowsAdded(int from, int to)
+{
+ emit beginChildRowsAdded( from, to );
+}
+
+
+void
+SourceTreeItem::endRowsAdded()
+{
+ emit childRowsAdded();
+}
+
+
+void
+SourceTreeItem::beginRowsRemoved(int from, int to)
+{
+ emit beginChildRowsRemoved( from, to );
+}
+
+
+void
+SourceTreeItem::endRowsRemoved()
+{
+ emit childRowsRemoved();
+}
+
+
+void
+SourceTreeItem::setRowType(SourcesModel::RowType t)
+{
+ m_type = t;
+}
+
+
+void
+SourceTreeItem::setParentItem(SourceTreeItem* item)
+{
+ m_parent = item;
+}
View
54 src/sourcetree/items/SourceTreeItem.h
@@ -47,36 +47,36 @@ class SourceTreeItem : public QObject
virtual ~SourceTreeItem();
// generic info used by the tree model
- SourcesModel::RowType type() const { return m_type; }
- SourceTreeItem* parent() const { return m_parent; }
- SourcesModel* model() const { return m_model; }
+ SourcesModel::RowType type() const;
+ SourceTreeItem* parent() const;
+ SourcesModel* model() const;
- QList< SourceTreeItem* > children() const { return m_children; }
- void appendChild( SourceTreeItem* item ) { m_children.append( item ); }
- void insertChild( int index, SourceTreeItem* item ) { m_children.insert( index, item ); }
- void removeChild( SourceTreeItem* item ) { m_children.removeAll( item ); }
+ QList< SourceTreeItem* > children() const;
+ void appendChild( SourceTreeItem* item );
+ void insertChild( int index, SourceTreeItem* item );
+ void removeChild( SourceTreeItem* item );
// varies depending on the type of the item
- virtual QString text() const { return QString(); }
- virtual QString tooltip() const { return QString(); }
- virtual Qt::ItemFlags flags() const { return Qt::ItemIsSelectable | Qt::ItemIsEnabled; }
- virtual QIcon icon() const { return QIcon(); }
- virtual bool willAcceptDrag( const QMimeData* ) const { return false; }
- virtual bool dropMimeData( const QMimeData*, Qt::DropAction ) { return false; }
- virtual bool setData( const QVariant&, bool ) { return false; }
- virtual int peerSortValue() const { return m_peerSortValue; } // How to sort relative to peers in the tree.
- virtual int IDValue() const { return 0; }
- virtual DropTypes supportedDropTypes( const QMimeData* mimeData ) const { Q_UNUSED( mimeData ); return DropTypesNone; }
- virtual void setDropType( DropType type ) { m_dropType = type; }
- virtual DropType dropType() const { return m_dropType; }
- virtual bool isBeingPlayed() const { return false; }
- virtual QList< QAction* > customActions() const { return QList< QAction* >(); }
+ virtual QString text() const;
+ virtual QString tooltip() const;
+ virtual Qt::ItemFlags flags() const;
+ virtual QIcon icon() const;
+ virtual bool willAcceptDrag( const QMimeData* ) const;
+ virtual bool dropMimeData( const QMimeData*, Qt::DropAction );
+ virtual bool setData( const QVariant&, bool );
+ virtual int peerSortValue() const; // How to sort relative to peers in the tree.
+ virtual int IDValue() const;
+ virtual DropTypes supportedDropTypes( const QMimeData* mimeData ) const;
+ virtual void setDropType( DropType type );
+ virtual DropType dropType() const;
+ virtual bool isBeingPlayed() const;
+ virtual QList< QAction* > customActions() const;
/// don't call me unless you are a sourcetreeitem. i prefer this to making everyone a friend
- void beginRowsAdded( int from, int to ) { emit beginChildRowsAdded( from, to ); }
- void endRowsAdded() { emit childRowsAdded(); }
- void beginRowsRemoved( int from, int to ) { emit beginChildRowsRemoved( from, to ); }
- void endRowsRemoved() { emit childRowsRemoved(); }
+ void beginRowsAdded( int from, int to );
+ void endRowsAdded();
+ void beginRowsRemoved( int from, int to );
+ void endRowsRemoved();
public slots:
virtual void activate() {}
@@ -95,8 +95,8 @@ public slots:
void childRowsRemoved();
protected:
- void setRowType( SourcesModel::RowType t ) { m_type = t; }
- void setParentItem( SourceTreeItem* item ) { m_parent = item; }
+ void setRowType( SourcesModel::RowType t );
+ void setParentItem( SourceTreeItem* item );
private:
SourcesModel::RowType m_type;
View
21 src/sourcetree/items/TemporaryPageItem.cpp
@@ -171,3 +171,24 @@ TemporaryPageItem::linkActionTriggered( QAction* action )
}
}
}
+
+
+QList< QAction* >
+TemporaryPageItem::customActions() const
+{
+ return m_customActions;
+}
+
+
+ViewPage*
+TemporaryPageItem::page() const
+{
+ return m_page;
+}
+
+
+bool
+TemporaryPageItem::isBeingPlayed() const
+{
+ return m_page->isBeingPlayed();
+}
View
6 src/sourcetree/items/TemporaryPageItem.h
@@ -36,10 +36,10 @@ class TemporaryPageItem : public SourceTreeItem
virtual QIcon icon() const;
virtual int peerSortValue() const;
virtual int IDValue() const;
- virtual QList< QAction* > customActions() const { return m_customActions; }
+ virtual QList< QAction* > customActions() const;
- Tomahawk::ViewPage* page() const { return m_page; }
- virtual bool isBeingPlayed() const { return m_page->isBeingPlayed(); }
+ Tomahawk::ViewPage* page() const;
+ virtual bool isBeingPlayed() const;
public slots:
void removeFromList();
View
5 src/web/Api_v1.cpp
@@ -34,6 +34,11 @@
using namespace Tomahawk;
+Api_v1::Api_v1(QxtAbstractWebSessionManager* sm, QObject* parent)
+ : QxtWebSlotService(sm, parent)
+{
+}
+
void
Api_v1::auth_1( QxtWebRequestEvent* event, QString arg )
View
5 src/web/Api_v1.h
@@ -42,10 +42,7 @@ Q_OBJECT
public:
- Api_v1( QxtAbstractWebSessionManager* sm, QObject* parent = 0 )
- : QxtWebSlotService( sm, parent )
- {
- }
+ Api_v1( QxtAbstractWebSessionManager* sm, QObject* parent = 0 );
public slots:
// authenticating uses /auth_1
View
7 src/widgets/ContainedMenuButton.cpp
@@ -50,3 +50,10 @@ ContainedMenuButton::menuHidden()
{
setDown( false );
}
+
+
+QMenu*
+ContainedMenuButton::menu() const
+{
+ return m_menu;
+}
View
2  src/widgets/ContainedMenuButton.h
@@ -34,7 +34,7 @@ class ContainedMenuButton : public QToolButton
explicit ContainedMenuButton( QWidget *parent = 0 );
void setMenu( QMenu *menu );
- QMenu *menu() const { return m_menu; }
+ QMenu *menu() const;
protected:
void mousePressEvent( QMouseEvent *event );
View
14 src/widgets/SlideSwitchButton.h
@@ -45,21 +45,21 @@ class SlideSwitchButton : public QPushButton
void init();
virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const { return sizeHint(); }
+ virtual QSize minimumSizeHint() const;
//the back check-state cannot be changed by the user, only programmatically
//to notify that the user-requested operation has completed
void setBackChecked( bool state );
bool backChecked() const;
- void setKnobX( qreal x ) { m_knobX = x; repaint(); }
- qreal knobX() const { return m_knobX; }
+ void setKnobX( qreal x );
+ qreal knobX() const;
- void setBaseColorTop( const QColor& color ) { m_baseColorTop = color; repaint(); }
- QColor baseColorTop() const { return m_baseColorTop; }
+ void setBaseColorTop( const QColor& color );
+ QColor baseColorTop() const;
- void setBaseColorBottom( const QColor& color ) { m_baseColorBottom = color; }
- QColor baseColorBottom() const { return m_baseColorBottom; }
+ void setBaseColorBottom( const QColor& color );
+ QColor baseColorBottom() const;
protected:
void paintEvent( QPaintEvent* event );
View
2  src/widgets/UnstyledFrame.h
@@ -32,7 +32,7 @@ class UnstyledFrame : public QWidget
public:
explicit UnstyledFrame( QWidget* parent = 0 );
- void setFrameColor( const QColor& color ) { m_frameColor = color; repaint(); }
+ void setFrameColor( const QColor& color );
protected:
void paintEvent( QPaintEvent* event );
Please sign in to comment.
Something went wrong with that request. Please try again.