[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim/work/akonadi-ports] /: port to new krss ways
From: Frank Osterfeld <frank.osterfeld () kdab ! com>
Date: 2011-09-19 20:59:23
Message-ID: 20110919205923.60382A60A6 () git ! kde ! org
[Download RAW message or body]
Git commit f87b475629861d870c1270d3850bf367b8c872ab by Frank Osterfeld.
Committed on 19/09/2011 at 22:51.
Pushed by osterfeld into branch 'work/akonadi-ports'.
port to new krss ways
M +3 -0 akregator/src/abstractselectioncontroller.h
M +9 -31 akregator/src/actionmanagerimpl.cpp
M +3 -25 akregator/src/akregator_part.rc
M +61 -54 akregator/src/createtagcommand.cpp
M +10 -10 akregator/src/createtagcommand.h
M +10 -37 akregator/src/mainwidget.cpp
M +2 -4 akregator/src/mainwidget.h
M +4 -0 akregator/src/selectioncontroller.cpp
M +2 -0 akregator/src/selectioncontroller.h
M +8 -1 krss/krss/feedcollection.cpp
M +2 -0 krss/krss/feedcollection.h
M +2 -2 krss/krss/ui/feedlistview.cpp
M +6 -7 krss/krss/ui/feedlistview.h
http://commits.kde.org/kdepim/f87b475629861d870c1270d3850bf367b8c872ab
diff --git a/akregator/src/abstractselectioncontroller.h \
b/akregator/src/abstractselectioncontroller.h index 85d3ae9..b2be3a1 100644
--- a/akregator/src/abstractselectioncontroller.h
+++ b/akregator/src/abstractselectioncontroller.h
@@ -32,6 +32,7 @@
class QAbstractItemModel;
class QAbstractItemView;
class QItemSelectionModel;
+class QModelIndex;
class QPoint;
namespace KRss {
@@ -102,6 +103,8 @@ public:
virtual QList<KRss::Item> selectedItems() const = 0;
+ virtual QModelIndex selectedCollectionIndex() const = 0;
+
virtual Akonadi::Collection selectedCollection() const = 0;
public Q_SLOTS:
diff --git a/akregator/src/actionmanagerimpl.cpp \
b/akregator/src/actionmanagerimpl.cpp index a4a38b9..e9624ba 100644
--- a/akregator/src/actionmanagerimpl.cpp
+++ b/akregator/src/actionmanagerimpl.cpp
@@ -72,7 +72,6 @@ public:
ArticleViewer* articleViewer;
Part* part;
TrayIcon* trayIcon;
- KActionMenu* tagMenu;
KActionCollection* actionCollection;
TabWidget* tabWidget;
KAction* speakSelectedArticlesAction;
@@ -86,49 +85,33 @@ void ActionManagerImpl::slotNodeSelected( const \
Akonadi::Collection& c ) return;
KRss::FeedCollection fc( c );
- if (!fc.xmlUrl().isEmpty() ) {
+ if ( !fc.isFolder() ) {
QAction* remove = action("feed_remove");
if (remove)
remove->setEnabled(true);
-#ifdef KRSS_PORT_DISABLED
if ( QAction* const a = action("feed_homepage") ) {
- a->setEnabled(!feed->htmlUrl().isEmpty());
+ a->setEnabled(!fc.htmlUrl().isEmpty());
}
- if ( QAction* a = action("feed_remove_tag") ) {
- const shared_ptr<const TagNode> tag = feedNode->parent();
- a->setText( i18n("&Remove Tag \"%1\"", tag->tag().label()) );
- a->setVisible( true );
- a->setEnabled( tag->taggedFeedsUserEditable() );
- }
-#endif //KRSS_PORT_DISABLED
-
action("feed_fetch")->setText(i18n("&Fetch Feed"));
action("feed_remove")->setText(i18n("&Delete Feed"));
action("feed_modify")->setText(i18n("&Edit Feed..."));
action("feed_mark_feed_as_read")->setText(i18n("&Mark Feed as Read"));
} else {
-#ifdef KRSS_PORT_DISABLED
QAction* remove = action("feed_remove");
if (remove)
- remove->setEnabled( !tagNode->tag().isNull() );
+ remove->setEnabled( true );
QAction* hp = action("feed_homepage");
if (hp)
hp->setEnabled(false);
action("feed_fetch")->setText(i18n("&Fetch Feeds"));
if ( QAction* const a = action("feed_remove") ) {
- a->setText( i18n("&Delete Tag") );
- a->setEnabled( tagNode->isDeletable() );
- }
- action("feed_modify")->setText(i18n("&Modify Tag"));
-
- if ( QAction* const a = action("feed_remove_tag") ) {
- a->setVisible( false );
- a->setEnabled( false );
+ a->setText( i18n("&Delete Folder") );
+ a->setEnabled( c.parentCollection().isValid() );
}
+ action("feed_modify")->setText(i18n("&Modify Folder"));
action("feed_mark_feed_as_read")->setText(i18n("&Mark Feeds as Read"));
-#endif
}
}
@@ -141,7 +124,6 @@ ActionManagerImpl::ActionManagerImpl(Part* part, QObject* parent \
) : ActionManag d->articleViewer = 0;
d->mainWidget = 0;
d->tabWidget = 0;
- d->tagMenu = 0;
d->frameManager = 0;
d->speakSelectedArticlesAction = 0;
d->actionCollection = part->actionCollection();
@@ -204,9 +186,9 @@ void ActionManagerImpl::initMainWidget(MainWidget* mainWidget)
connect(action, SIGNAL(triggered(bool)), d->mainWidget, SLOT(slotFeedAdd()));
action->setShortcuts(KShortcut( "Insert" ));
- action = coll->addAction("tag_add");
- action->setText(i18n("Ne&w Tag..."));
- connect(action, SIGNAL(triggered(bool)), d->mainWidget, SLOT(slotTagAdd()));
+ action = coll->addAction("folder_add");
+ action->setText(i18n("Ne&w Folder..."));
+ connect(action, SIGNAL(triggered(bool)), d->mainWidget, SLOT(slotFolderAdd()));
action->setShortcuts(KShortcut( "Shift+Insert" ));
action = coll->addAction("feed_remove");
@@ -215,10 +197,6 @@ void ActionManagerImpl::initMainWidget(MainWidget* mainWidget)
connect(action, SIGNAL(triggered(bool)), d->mainWidget, SLOT(slotFeedRemove()));
action->setShortcuts(KShortcut( "Alt+Delete" ));
- action = coll->addAction("feed_remove_tag");
- action->setText(i18n("&Remove Tag..."));
- connect(action, SIGNAL(triggered(bool)), d->mainWidget, \
SLOT(slotFeedRemoveTag()));
-
action = coll->addAction("feed_modify");
action->setIcon(KIcon("document-properties"));
action->setText(i18n("&Edit Feed..."));
diff --git a/akregator/src/akregator_part.rc b/akregator/src/akregator_part.rc
index d29a183..84de89d 100644
--- a/akregator/src/akregator_part.rc
+++ b/akregator/src/akregator_part.rc
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="akregator_part" version="417">
+<kpartgui name="akregator_part" version="418">
<MenuBar>
<Menu name="file">
<Action name="file_import"/>
@@ -41,7 +41,7 @@
<Menu name="feed">
<text>Fee&d</text>
<Action name="feed_add"/>
- <Action name="tag_add"/>
+ <Action name="folder_add"/>
<Separator/>
<Action name="feed_mark_feed_as_read"/>
<Action name="feed_mark_all_feeds_as_read"/>
@@ -60,9 +60,6 @@
<Action name="article_set_status"/>
<Action name="article_delete"/>
<Separator/>
- <Action name="article_assign_tag_menu"/>
- <Action name="article_remove_tag_menu"/>
- <Separator/>
<Action name="file_sendlink"/>
<Action name="file_sendfile"/>
</Menu>
@@ -84,7 +81,6 @@
<Action name="feed_fetch_all"/>
<Action name="feed_stop"/>
<Action name="feed_mark_feed_as_read"/>
- <Action name="article_tagmenu"/>
<DefineGroup name="pageviewer_operations" />
<Merge/>
</ToolBar>
@@ -128,7 +124,6 @@
<Separator/>
<Action name="feed_homepage"/>
<Separator/>
- <Action name="feed_remove_tag"/>
<Action name="feed_modify"/>
<Action name="feed_remove"/>
</Menu>
@@ -139,22 +134,7 @@
<Action name="feed_fetch"/>
<Separator/>
<Action name="feed_add"/>
- <Action name="tag_add"/>
- <Action name="feed_modify"/>
- <Action name="feed_remove"/>
- </Menu>
-
- <Menu name="tagfolder_popup">
- <Action name="feed_mark_feed_as_read"/>
- <Separator/>
- <Action name="tag_new"/>
- <!--<Action name="tag_add"/> -->
- <Action name="feed_modify"/>
- <Action name="feed_remove"/>
- </Menu>
-
- <Menu name="tagnode_popup">
- <Action name="feed_mark_feed_as_read"/>
+ <Action name="folder_add"/>
<Action name="feed_modify"/>
<Action name="feed_remove"/>
</Menu>
@@ -168,8 +148,6 @@
<Action name="article_set_status"/>
<Action name="article_toggle_keep"/>
<Action name="article_delete"/>
- <Separator/>
- <Action name="article_tagmenu"/>
</Menu>
<Menu name="tab_popup">
diff --git a/akregator/src/createtagcommand.cpp b/akregator/src/createtagcommand.cpp
index 82cb752..d1e1f72 100644
--- a/akregator/src/createtagcommand.cpp
+++ b/akregator/src/createtagcommand.cpp
@@ -25,98 +25,105 @@
#include "createtagcommand.h"
#include "command_p.h"
-#include <krss/tag.h>
-#include <krss/tagjobs.h>
-#include <krss/tagprovider.h>
+#include <Akonadi/Collection>
+#include <Akonadi/CollectionCreateJob>
+#include <Akonadi/EntityDisplayAttribute>
+#include <Akonadi/Item>
+#include <Akonadi/Session>
+
+#include <krss/feedcollection.h>
+#include <krss/item.h>
#include <krss/ui/feedlistview.h>
-#include <krss/ui/tagpropertiesdialog.h>
-#include <KDebug>
-#include <KInputDialog>
#include <KLocalizedString>
-#include <KMessageBox>
#include <QPointer>
-#include <QTimer>
-
-#include <cassert>
+using namespace Akonadi;
using namespace Akregator;
-using namespace boost;
using namespace KRss;
-class CreateTagCommand::Private
+class CreateFolderCommand::Private
{
- CreateTagCommand* const q;
+ CreateFolderCommand* const q;
public:
- explicit Private( const shared_ptr<const TagProvider>& tagProvider, \
CreateTagCommand* qq ); + explicit Private( const Collection& c, const QString& \
title, CreateFolderCommand* qq );
- void doCreate();
- void tagCreateJobFinished( KJob* );
+ void collectionCreated( KJob* );
QPointer<FeedListView> feedListView;
- shared_ptr<const TagProvider> tagProvider;
+ Collection parentCollection;
+ QString title;
+ Session* session;
};
-CreateTagCommand::Private::Private( const shared_ptr<const TagProvider>& tp, \
CreateTagCommand* qq )
- : q( qq ),
- feedListView(),
- tagProvider( tp )
+CreateFolderCommand::Private::Private( const Collection& parent, const QString& t, \
CreateFolderCommand* qq ) + : q( qq )
+ , parentCollection( parent )
+ , title( t )
+ , session( 0 )
+
{
- assert( tagProvider );
+ q->setUserVisible( false );
+ q->setShowErrorDialog( true );
}
-void CreateTagCommand::Private::doCreate()
+void CreateFolderCommand::Private::collectionCreated( KJob* j )
{
- EmitResultGuard guard( q );
- QPointer<KRss::TagPropertiesDialog> dialog( new KRss::TagPropertiesDialog( \
q->parentWidget() ) );
- if ( dialog->exec() != KDialog::Accepted || !guard.exists() ) {
- guard.emitResult();
+ if ( j->error() ) {
+ q->setError( KJob::UserDefinedError );
+ q->setErrorText( j->errorText() );
+ q->emitResult();
return;
}
-
- KRss::Tag newTag;
- newTag.setLabel( dialog->label() );
- newTag.setDescription( dialog->description() );
- delete dialog;
-
- KRss::TagCreateJob * const job = tagProvider->tagCreateJob();
- assert( job );
- job->setTag( newTag );
- connect( job, SIGNAL(finished(KJob*)), q, SLOT(tagCreateJobFinished(KJob*)) );
- job->start();
-}
-
-void CreateTagCommand::Private::tagCreateJobFinished( KJob* j )
-{
- EmitResultGuard guard( q );
- if ( j->error() )
- KMessageBox::error( q->parentWidget(), i18n("Could not create the tag: %1", \
j->errorString() ), i18n("Tag Creation Error") );
- const KRss::TagCreateJob* const job = qobject_cast<const KRss::TagCreateJob*>( j \
);
- assert( job );
+#ifdef KRSS_PORT_DISABLED
if ( feedListView )
feedListView->scrollToTag( job->tag() );
- guard.emitResult();
+#endif
+ q->emitResult();
}
-CreateTagCommand::CreateTagCommand( const shared_ptr<const TagProvider>& \
tagProvider, QObject* parent ) : Command( parent ), d( new Private( tagProvider, this \
) ) +CreateFolderCommand::CreateFolderCommand( const Collection& pc, const QString& \
t, QObject* parent ) : Command( parent ), d( new Private( pc, t, this ) ) {
-
}
-CreateTagCommand::~CreateTagCommand()
+CreateFolderCommand::~CreateFolderCommand()
{
delete d;
}
-void CreateTagCommand::setFeedListView( FeedListView* view )
+void CreateFolderCommand::setSession( Session* s ) {
+ d->session = s;
+}
+
+void CreateFolderCommand::setFeedListView( FeedListView* view )
{
d->feedListView = view;
}
-void CreateTagCommand::doStart()
+void CreateFolderCommand::doStart()
{
- QTimer::singleShot( 0, this, SLOT( doCreate() ) );
+ Q_ASSERT( d->session );
+
+ d->parentCollection = FeedCollection::findFolder( d->parentCollection );
+ if ( !d->parentCollection.isValid() ) {
+ setError( KJob::UserDefinedError );
+ setErrorText( tr("Invalid parent collection. Cannot create folder") );
+ emitResult();
+ return;
+ }
+
+ const QString title = !d->title.isEmpty() ? d->title : i18n("New Folder");
+
+ Collection c;
+ c.setParentCollection( d->parentCollection );
+ c.setRemoteId( title );
+ c.setName( title );
+ c.setContentMimeTypes( QStringList( Collection::mimeType() ) );
+ c.attribute<Akonadi::EntityDisplayAttribute>( Akonadi::Collection::AddIfMissing \
)->setDisplayName( title ); + CollectionCreateJob * const job = new \
CollectionCreateJob( c, d->session ); + connect( job, SIGNAL(finished(KJob*)), \
this, SLOT(collectionCreated(KJob*)) ); + job->start();
}
#include "createtagcommand.moc"
diff --git a/akregator/src/createtagcommand.h b/akregator/src/createtagcommand.h
index 6ff2167..8efd1a5 100644
--- a/akregator/src/createtagcommand.h
+++ b/akregator/src/createtagcommand.h
@@ -27,8 +27,10 @@
#include "command.h"
-#include <boost/shared_ptr.hpp>
-
+namespace Akonadi {
+ class Collection;
+ class Session;
+}
namespace KRss {
class FeedListView;
class TagProvider;
@@ -37,27 +39,25 @@ namespace KRss {
namespace Akregator {
class Folder;
-class SubscriptionListView;
-class TreeNode;
-class CreateTagCommand : public Command
+class CreateFolderCommand : public Command
{
Q_OBJECT
public:
- explicit CreateTagCommand( const boost::shared_ptr<const KRss::TagProvider>& \
tagProvider, QObject* parent = 0 );
- ~CreateTagCommand();
+ explicit CreateFolderCommand( const Akonadi::Collection& parentCollection, const \
QString& name, QObject* parent = 0 ); + ~CreateFolderCommand();
+ void setSession( Akonadi::Session* );
void setFeedListView( KRss::FeedListView* view );
-private:
+protected:
void doStart();
void doAbort();
private:
class Private;
Private* const d;
- Q_PRIVATE_SLOT( d, void doCreate() )
- Q_PRIVATE_SLOT( d, void tagCreateJobFinished( KJob* ) )
+ Q_PRIVATE_SLOT( d, void collectionCreated( KJob* ) )
};
}
diff --git a/akregator/src/mainwidget.cpp b/akregator/src/mainwidget.cpp
index c00380a..0489cc8 100644
--- a/akregator/src/mainwidget.cpp
+++ b/akregator/src/mainwidget.cpp
@@ -57,6 +57,7 @@
#include <Akonadi/ItemModifyJob>
#include <Akonadi/Collection>
#include <Akonadi/CollectionDeleteJob>
+#include <Akonadi/EntityTreeModel>
#include <Akonadi/Session>
#include <krss/feedcollection.h>
@@ -561,13 +562,13 @@ void Akregator::MainWidget::addFeed(const QString& url, bool \
autoExec) d->setUpAndStart( cmd.release() );
}
-void Akregator::MainWidget::slotTagAdd()
+void Akregator::MainWidget::slotFolderAdd()
{
-#ifdef KRSS_PORT_DISABLED
- std::auto_ptr<CreateTagCommand> cmd( new CreateTagCommand( m_tagProvider, this ) \
); + const Akonadi::Collection c = m_selectionController->selectedCollection();
+ std::auto_ptr<CreateFolderCommand> cmd( new CreateFolderCommand( c, QString(), \
this ) ); + cmd->setSession( m_session );
cmd->setFeedListView( m_feedListView );
d->setUpAndStart( cmd.release() );
-#endif
}
void Akregator::MainWidget::slotFeedRemove()
@@ -604,46 +605,34 @@ void Akregator::MainWidget::slotFeedModify()
d->setUpAndStart( cmd.release() );
}
-void Akregator::MainWidget::slotFeedRemoveTag()
-{
-#if 0
- const shared_ptr<KRss::TreeNode> treeNode = \
m_selectionController->selectedSubscription();
- RemoveTagFromFeedVisitor v( m_feedList );
- treeNode->accept( &v );
-#endif
-}
-
void Akregator::MainWidget::slotNextUnreadArticle()
{
-#ifdef KRSS_PORT_DISABLED
if (m_viewMode == CombinedView)
{
m_feedListView->slotNextUnreadFeed();
return;
}
- const shared_ptr<KRss::TreeNode> sel = \
m_selectionController->selectedSubscription();
- if (sel && sel->unreadCount( m_feedList ) > 0)
+ const QModelIndex c = m_selectionController->selectedCollectionIndex();
+
+ if ( c.data( Akonadi::EntityTreeModel::UnreadCountRole ).toInt() > 0 )
m_articleListView->slotNextUnreadArticle();
else
m_feedListView->slotNextUnreadFeed();
-#endif
}
void Akregator::MainWidget::slotPrevUnreadArticle()
{
-#ifdef KRSS_PORT_DISABLED
if (m_viewMode == CombinedView)
{
m_feedListView->slotPrevUnreadFeed();
return;
}
- const shared_ptr<KRss::TreeNode> sel = \
m_selectionController->selectedSubscription(); + const QModelIndex c = \
m_selectionController->selectedCollectionIndex();
- if (sel && sel->unreadCount( m_feedList ) > 0)
+ if ( c.data( Akonadi::EntityTreeModel::UnreadCountRole ).toInt() > 0 )
m_articleListView->slotPreviousUnreadArticle();
else
m_feedListView->slotPrevUnreadFeed();
-#endif
}
void Akregator::MainWidget::slotMarkAllFeedsRead()
@@ -673,22 +662,6 @@ void Akregator::MainWidget::slotMarkFeedRead()
cmd->setCollection( c );
cmd->setSession( m_session );
d->setUpAndStart( cmd );
-
-#ifdef KRSS_PORT_DISABLED
- const shared_ptr<KRss::TreeNode> treeNode = \
m_selectionController->selectedSubscription();
- if ( !treeNode )
- return;
-
- KRss::CreateStatusModifyJobVisitor visitor( m_feedList );
- treeNode->accept( &visitor );
- KRss::StatusModifyJob * const job = visitor.statusModifyJob();
- job->clearFlags( QList<KRss::Item::StatusFlag>() << KRss::Item::Unread );
- connect( job, SIGNAL( result( KJob* ) ), this, SLOT( slotJobFinished( KJob* ) ) \
);
-#ifdef WITH_LIBKDEPIM
- ProgressManager::self()->addJob( job );
-#endif
- job->start();
-#endif
}
void Akregator::MainWidget::slotSetTotalUnread()
diff --git a/akregator/src/mainwidget.h b/akregator/src/mainwidget.h
index ff4a004..d72df67 100644
--- a/akregator/src/mainwidget.h
+++ b/akregator/src/mainwidget.h
@@ -156,14 +156,12 @@ class AKREGATORPART_EXPORT MainWidget : public QWidget
/** adds a new feed to the feed tree */
void slotFeedAdd();
- /** adds a new tag to the feed tree */
- void slotTagAdd();
+ /** adds a new folder to the feed tree */
+ void slotFolderAdd();
/** removes the currently selected feed (ask for confirmation)*/
void slotFeedRemove();
/** calls the properties dialog for feeds, starts renaming for feed groups \
*/ void slotFeedModify();
- /** removes the feed from the current tag */
- void slotFeedRemoveTag();
/** fetches the currently selected feed */
void slotFetchCurrentFeed();
/** starts fetching of all feeds in the tree */
diff --git a/akregator/src/selectioncontroller.cpp \
b/akregator/src/selectioncontroller.cpp index 91d7a82..515ac5c 100644
--- a/akregator/src/selectioncontroller.cpp
+++ b/akregator/src/selectioncontroller.cpp
@@ -189,6 +189,10 @@ QList<KRss::Item> \
Akregator::SelectionController::selectedItems() const
return ::itemsForIndexes( \
m_articleLister->articleSelectionModel()->selectedRows() ); }
+QModelIndex Akregator::SelectionController::selectedCollectionIndex() const {
+ return m_feedSelector->selectionModel()->currentIndex();
+}
+
Akonadi::Collection Akregator::SelectionController::selectedCollection() const
{
return m_feedSelector->selectionModel()->currentIndex().data( \
Akonadi::EntityTreeModel::CollectionRole \
).value<Akonadi::Collection>();
diff --git a/akregator/src/selectioncontroller.h \
b/akregator/src/selectioncontroller.h index d9c54af..8920375 100644
--- a/akregator/src/selectioncontroller.h
+++ b/akregator/src/selectioncontroller.h
@@ -73,6 +73,8 @@ public:
//impl
void setSingleArticleDisplay( Akregator::SingleArticleDisplay* display );
+ QModelIndex selectedCollectionIndex() const;
+
Akonadi::Collection selectedCollection() const;
//impl
diff --git a/krss/krss/feedcollection.cpp b/krss/krss/feedcollection.cpp
index 66bc802..3399685 100644
--- a/krss/krss/feedcollection.cpp
+++ b/krss/krss/feedcollection.cpp
@@ -44,9 +44,16 @@ FeedCollection::FeedCollection( const Akonadi::Collection \
&collection ) {
}
+Akonadi::Collection FeedCollection::findFolder( const Akonadi::Collection& c ) {
+ if ( FeedCollection( c ).isFolder() )
+ return c;
+ else
+ return c.parentCollection();
+}
+
bool FeedCollection::isFolder() const
{
- return xmlUrl().isEmpty();
+ return contentMimeTypes() == QStringList( Akonadi::Collection::mimeType() );
}
Feed::Id FeedCollection::feedId() const
diff --git a/krss/krss/feedcollection.h b/krss/krss/feedcollection.h
index f62c82c..dcfa0f9 100644
--- a/krss/krss/feedcollection.h
+++ b/krss/krss/feedcollection.h
@@ -35,6 +35,8 @@ public:
FeedCollection();
FeedCollection( const Akonadi::Collection &collection );
+ static Akonadi::Collection findFolder( const Akonadi::Collection& c );
+
bool isFolder() const;
Feed::Id feedId() const;
diff --git a/krss/krss/ui/feedlistview.cpp b/krss/krss/ui/feedlistview.cpp
index 79ab399..6008b36 100644
--- a/krss/krss/ui/feedlistview.cpp
+++ b/krss/krss/ui/feedlistview.cpp
@@ -324,8 +324,8 @@ void FeedListView::slotNextUnreadFeed()
setCurrentIndex( next );
}
-void FeedListView::scrollToTag( const Tag& tag, QAbstractItemView::ScrollHint hint ) \
{
- Q_UNUSED( tag )
+void FeedListView::scrollToCollection( const Akonadi::Collection& c, \
QAbstractItemView::ScrollHint hint ) { + Q_UNUSED( c )
Q_UNUSED( hint )
//TODO
}
diff --git a/krss/krss/ui/feedlistview.h b/krss/krss/ui/feedlistview.h
index d448573..cb0c19f 100644
--- a/krss/krss/ui/feedlistview.h
+++ b/krss/krss/ui/feedlistview.h
@@ -24,15 +24,14 @@
#include <Akonadi/EntityTreeView>
#include <QtGui/QTreeView>
-#include <boost/shared_ptr.hpp>
class KConfigGroup;
+namespace Akonadi {
+ class Collection;
+}
namespace KRss {
-class Tag;
-class TreeNode;
-
class KRSS_EXPORT FeedListView : public Akonadi::EntityTreeView
{
Q_OBJECT
@@ -47,7 +46,7 @@ public:
KConfigGroup configGroup() const;
void setConfigGroup( const KConfigGroup& group);
- void scrollToTag( const Tag& tag, QAbstractItemView::ScrollHint \
hint=EnsureVisible ); + void scrollToCollection( const Akonadi::Collection& c, \
QAbstractItemView::ScrollHint hint=EnsureVisible );
public Q_SLOTS:
void slotPrevFeed();
@@ -57,8 +56,8 @@ public Q_SLOTS:
Q_SIGNALS:
- void clicked( const boost::shared_ptr<KRss::TreeNode>& node );
- void activated( const boost::shared_ptr<KRss::TreeNode>& node );
+ void clicked( const Akonadi::Collection& );
+ void activated( const Akonadi::Collection& );
private:
class Private;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic