RootItem now inherits QObject, fetching metadata works for standard feeds, custom context menus moved to interface so that each item can provide specific menu items.
This commit is contained in:
parent
5c0f777189
commit
3d59902aeb
@ -422,16 +422,15 @@ set(APP_SOURCES
|
|||||||
src/services/abstract/serviceroot.cpp
|
src/services/abstract/serviceroot.cpp
|
||||||
|
|
||||||
# STANDARD feed service sources.
|
# STANDARD feed service sources.
|
||||||
src/services/standard/standardfeed.cpp
|
|
||||||
src/services/standard/standardfeedsimportexportmodel.cpp
|
|
||||||
src/services/standard/standardcategory.cpp
|
|
||||||
src/services/standard/gui/formstandardcategorydetails.cpp
|
src/services/standard/gui/formstandardcategorydetails.cpp
|
||||||
src/services/standard/gui/formstandardfeeddetails.cpp
|
src/services/standard/gui/formstandardfeeddetails.cpp
|
||||||
src/services/standard/gui/formstandardimportexport.cpp
|
src/services/standard/gui/formstandardimportexport.cpp
|
||||||
|
src/services/standard/standardfeedsimportexportmodel.cpp
|
||||||
src/services/standard/standardserviceentrypoint.cpp
|
src/services/standard/standardserviceentrypoint.cpp
|
||||||
|
src/services/standard/standardcategory.cpp
|
||||||
|
src/services/standard/standardfeed.cpp
|
||||||
src/services/standard/standardserviceroot.cpp
|
src/services/standard/standardserviceroot.cpp
|
||||||
src/services/standard/standardrecyclebin.cpp
|
src/services/standard/standardrecyclebin.cpp
|
||||||
src/services/standard/standarditem.cpp
|
|
||||||
|
|
||||||
# TT-RSS feed service sources.
|
# TT-RSS feed service sources.
|
||||||
src/services/tt-rss/ttrssserviceentrypoint.cpp
|
src/services/tt-rss/ttrssserviceentrypoint.cpp
|
||||||
@ -531,12 +530,25 @@ set(APP_HEADERS
|
|||||||
src/core/feedsmodel.h
|
src/core/feedsmodel.h
|
||||||
src/core/feedsproxymodel.h
|
src/core/feedsproxymodel.h
|
||||||
src/core/feeddownloader.h
|
src/core/feeddownloader.h
|
||||||
|
src/core/rootitem.h
|
||||||
|
|
||||||
|
# ABSTRACT service headers.
|
||||||
|
src/services/abstract/feed.h
|
||||||
|
src/services/abstract/category.h
|
||||||
|
src/services/abstract/serviceroot.h
|
||||||
|
|
||||||
# STANDARD service headers.
|
# STANDARD service headers.
|
||||||
src/services/standard/standardfeedsimportexportmodel.h
|
src/services/standard/standardfeedsimportexportmodel.h
|
||||||
src/services/standard/gui/formstandardcategorydetails.h
|
src/services/standard/gui/formstandardcategorydetails.h
|
||||||
src/services/standard/gui/formstandardfeeddetails.h
|
src/services/standard/gui/formstandardfeeddetails.h
|
||||||
src/services/standard/gui/formstandardimportexport.h
|
src/services/standard/gui/formstandardimportexport.h
|
||||||
|
src/services/standard/standardcategory.h
|
||||||
|
src/services/standard/standardfeed.h
|
||||||
|
src/services/standard/standardserviceroot.h
|
||||||
|
src/services/standard/standardrecyclebin.h
|
||||||
|
|
||||||
|
# TT-RSS service headers.
|
||||||
|
src/services/tt-rss/ttrssserviceroot.h
|
||||||
|
|
||||||
# NETWORK-WEB headers.
|
# NETWORK-WEB headers.
|
||||||
src/network-web/webpage.h
|
src/network-web/webpage.h
|
||||||
|
@ -392,6 +392,11 @@ void FeedsModel::reloadChangedLayout(QModelIndexList list) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FeedsModel::reloadChangedItem(RootItem *item) {
|
||||||
|
QModelIndex index_item = indexForItem(item);
|
||||||
|
reloadChangedLayout(QModelIndexList() << index_item);
|
||||||
|
}
|
||||||
|
|
||||||
QStringList FeedsModel::textualFeedIds(const QList<Feed*> &feeds) {
|
QStringList FeedsModel::textualFeedIds(const QList<Feed*> &feeds) {
|
||||||
QStringList stringy_ids;
|
QStringList stringy_ids;
|
||||||
stringy_ids.reserve(feeds.size());
|
stringy_ids.reserve(feeds.size());
|
||||||
|
@ -144,6 +144,9 @@ class FeedsModel : public QAbstractItemModel {
|
|||||||
// NOTE: This reloads all parent valid indexes too.
|
// NOTE: This reloads all parent valid indexes too.
|
||||||
void reloadChangedLayout(QModelIndexList list);
|
void reloadChangedLayout(QModelIndexList list);
|
||||||
|
|
||||||
|
// Invalidates data under index for the item.
|
||||||
|
void reloadChangedItem(RootItem *item);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
// Is executed when next auto-update round could be done.
|
// Is executed when next auto-update round could be done.
|
||||||
void executeNextAutoUpdate();
|
void executeNextAutoUpdate();
|
||||||
|
@ -41,6 +41,10 @@ RootItem::~RootItem() {
|
|||||||
qDeleteAll(m_childItems);
|
qDeleteAll(m_childItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<QAction *> RootItem::specificActions() {
|
||||||
|
return QList<QAction*>();
|
||||||
|
}
|
||||||
|
|
||||||
void RootItem::setupFonts() {
|
void RootItem::setupFonts() {
|
||||||
m_normalFont = Application::font("FeedsView");
|
m_normalFont = Application::font("FeedsView");
|
||||||
m_boldFont = m_normalFont;
|
m_boldFont = m_normalFont;
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
class Category;
|
class Category;
|
||||||
class Feed;
|
class Feed;
|
||||||
class ServiceRoot;
|
class ServiceRoot;
|
||||||
|
class QAction;
|
||||||
|
|
||||||
namespace RootItemKind {
|
namespace RootItemKind {
|
||||||
// Describes the kind of the item.
|
// Describes the kind of the item.
|
||||||
@ -45,7 +46,9 @@ namespace RootItemKind {
|
|||||||
// Represents ROOT item of FeedsModel.
|
// Represents ROOT item of FeedsModel.
|
||||||
// NOTE: This class is derived to add functionality for
|
// NOTE: This class is derived to add functionality for
|
||||||
// all other non-root items of FeedsModel.
|
// all other non-root items of FeedsModel.
|
||||||
class RootItem {
|
class RootItem : public QObject {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Constructors and destructors.
|
// Constructors and destructors.
|
||||||
explicit RootItem(RootItem *parent_item = NULL);
|
explicit RootItem(RootItem *parent_item = NULL);
|
||||||
@ -73,6 +76,12 @@ class RootItem {
|
|||||||
child->setParent(this);
|
child->setParent(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns list of specific actions which can be done with the item.
|
||||||
|
// NOTE: This method should always create new actions in memory
|
||||||
|
// before returning them because caller takes ownership of any
|
||||||
|
// actions returned from here.
|
||||||
|
virtual QList<QAction*> specificActions();
|
||||||
|
|
||||||
// TODO: pracovat s těmito věcmi
|
// TODO: pracovat s těmito věcmi
|
||||||
virtual bool canBeEdited() {
|
virtual bool canBeEdited() {
|
||||||
return false;
|
return false;
|
||||||
|
@ -125,16 +125,13 @@ QList<QAction*> FormMain::allActions() {
|
|||||||
actions << m_ui->m_actionDeleteSelectedMessages;
|
actions << m_ui->m_actionDeleteSelectedMessages;
|
||||||
actions << m_ui->m_actionUpdateAllFeeds;
|
actions << m_ui->m_actionUpdateAllFeeds;
|
||||||
actions << m_ui->m_actionUpdateSelectedFeeds;
|
actions << m_ui->m_actionUpdateSelectedFeeds;
|
||||||
actions << m_ui->m_actionEditSelectedFeedCategory;
|
actions << m_ui->m_actionEditSelectedItem;
|
||||||
actions << m_ui->m_actionDeleteSelectedFeedCategory;
|
actions << m_ui->m_actionDeleteSelectedItem;
|
||||||
actions << m_ui->m_actionViewSelectedItemsNewspaperMode;
|
actions << m_ui->m_actionViewSelectedItemsNewspaperMode;
|
||||||
actions << m_ui->m_actionAddCategory;
|
|
||||||
actions << m_ui->m_actionAddFeed;
|
|
||||||
actions << m_ui->m_actionSelectNextFeedCategory;
|
actions << m_ui->m_actionSelectNextFeedCategory;
|
||||||
actions << m_ui->m_actionSelectPreviousFeedCategory;
|
actions << m_ui->m_actionSelectPreviousFeedCategory;
|
||||||
actions << m_ui->m_actionSelectNextMessage;
|
actions << m_ui->m_actionSelectNextMessage;
|
||||||
actions << m_ui->m_actionSelectPreviousMessage;
|
actions << m_ui->m_actionSelectPreviousMessage;
|
||||||
actions << m_ui->m_actionFetchFeedMetadata;
|
|
||||||
actions << m_ui->m_actionExpandCollapseFeedCategory;
|
actions << m_ui->m_actionExpandCollapseFeedCategory;
|
||||||
|
|
||||||
return actions;
|
return actions;
|
||||||
@ -248,11 +245,9 @@ void FormMain::setupIcons() {
|
|||||||
m_ui->m_actionUpdateSelectedFeeds->setIcon(icon_theme_factory->fromTheme(QSL("item-update-selected")));
|
m_ui->m_actionUpdateSelectedFeeds->setIcon(icon_theme_factory->fromTheme(QSL("item-update-selected")));
|
||||||
m_ui->m_actionClearSelectedFeeds->setIcon(icon_theme_factory->fromTheme(QSL("mail-remove")));
|
m_ui->m_actionClearSelectedFeeds->setIcon(icon_theme_factory->fromTheme(QSL("mail-remove")));
|
||||||
m_ui->m_actionClearAllFeeds->setIcon(icon_theme_factory->fromTheme(QSL("mail-remove")));
|
m_ui->m_actionClearAllFeeds->setIcon(icon_theme_factory->fromTheme(QSL("mail-remove")));
|
||||||
m_ui->m_actionDeleteSelectedFeedCategory->setIcon(icon_theme_factory->fromTheme(QSL("item-remove")));
|
m_ui->m_actionDeleteSelectedItem->setIcon(icon_theme_factory->fromTheme(QSL("item-remove")));
|
||||||
m_ui->m_actionDeleteSelectedMessages->setIcon(icon_theme_factory->fromTheme(QSL("mail-remove")));
|
m_ui->m_actionDeleteSelectedMessages->setIcon(icon_theme_factory->fromTheme(QSL("mail-remove")));
|
||||||
m_ui->m_actionAddCategory->setIcon(icon_theme_factory->fromTheme(QSL("folder-category")));
|
m_ui->m_actionEditSelectedItem->setIcon(icon_theme_factory->fromTheme(QSL("item-edit")));
|
||||||
m_ui->m_actionAddFeed->setIcon(icon_theme_factory->fromTheme(QSL("folder-feed")));
|
|
||||||
m_ui->m_actionEditSelectedFeedCategory->setIcon(icon_theme_factory->fromTheme(QSL("item-edit")));
|
|
||||||
m_ui->m_actionMarkAllFeedsRead->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-read")));
|
m_ui->m_actionMarkAllFeedsRead->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-read")));
|
||||||
m_ui->m_actionMarkSelectedFeedsAsRead->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-read")));
|
m_ui->m_actionMarkSelectedFeedsAsRead->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-read")));
|
||||||
m_ui->m_actionMarkSelectedFeedsAsUnread->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-unread")));
|
m_ui->m_actionMarkSelectedFeedsAsUnread->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-unread")));
|
||||||
@ -269,7 +264,6 @@ void FormMain::setupIcons() {
|
|||||||
m_ui->m_actionSelectNextMessage->setIcon(icon_theme_factory->fromTheme(QSL("go-down")));
|
m_ui->m_actionSelectNextMessage->setIcon(icon_theme_factory->fromTheme(QSL("go-down")));
|
||||||
m_ui->m_actionSelectPreviousMessage->setIcon(icon_theme_factory->fromTheme(QSL("go-up")));
|
m_ui->m_actionSelectPreviousMessage->setIcon(icon_theme_factory->fromTheme(QSL("go-up")));
|
||||||
m_ui->m_actionShowOnlyUnreadFeeds->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-unread")));
|
m_ui->m_actionShowOnlyUnreadFeeds->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-unread")));
|
||||||
m_ui->m_actionFetchFeedMetadata->setIcon(icon_theme_factory->fromTheme(QSL("download-manager")));
|
|
||||||
m_ui->m_actionExpandCollapseFeedCategory->setIcon(icon_theme_factory->fromTheme(QSL("expand-collapse")));
|
m_ui->m_actionExpandCollapseFeedCategory->setIcon(icon_theme_factory->fromTheme(QSL("expand-collapse")));
|
||||||
|
|
||||||
// Setup icons for underlying components: opened web browsers...
|
// Setup icons for underlying components: opened web browsers...
|
||||||
|
@ -132,18 +132,15 @@
|
|||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="m_menuAddItem">
|
<widget class="QMenu" name="m_menuAddItem">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Add &new feed/category</string>
|
<string>Add &new item</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="m_actionAddCategory"/>
|
|
||||||
<addaction name="m_actionAddFeed"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="m_actionUpdateAllFeeds"/>
|
<addaction name="m_actionUpdateAllFeeds"/>
|
||||||
<addaction name="m_actionUpdateSelectedFeeds"/>
|
<addaction name="m_actionUpdateSelectedFeeds"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="m_menuAddItem"/>
|
<addaction name="m_menuAddItem"/>
|
||||||
<addaction name="m_actionEditSelectedFeedCategory"/>
|
<addaction name="m_actionEditSelectedItem"/>
|
||||||
<addaction name="m_actionDeleteSelectedFeedCategory"/>
|
<addaction name="m_actionDeleteSelectedItem"/>
|
||||||
<addaction name="m_actionFetchFeedMetadata"/>
|
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="m_actionShowOnlyUnreadFeeds"/>
|
<addaction name="m_actionShowOnlyUnreadFeeds"/>
|
||||||
<addaction name="m_actionExpandCollapseFeedCategory"/>
|
<addaction name="m_actionExpandCollapseFeedCategory"/>
|
||||||
@ -272,7 +269,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_actionUpdateAllFeeds">
|
<action name="m_actionUpdateAllFeeds">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Update &all feeds</string>
|
<string>Update &all items</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true">Ctrl+Shift+U</string>
|
<string notr="true">Ctrl+Shift+U</string>
|
||||||
@ -280,20 +277,20 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_actionUpdateSelectedFeeds">
|
<action name="m_actionUpdateSelectedFeeds">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Update &selected feeds</string>
|
<string>Update &selected items</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true">Ctrl+U</string>
|
<string notr="true">Ctrl+U</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="m_actionEditSelectedFeedCategory">
|
<action name="m_actionEditSelectedItem">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Edit selected feed/category</string>
|
<string>&Edit selected item</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="m_actionDeleteSelectedFeedCategory">
|
<action name="m_actionDeleteSelectedItem">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Delete selected feed/category</string>
|
<string>&Delete selected item</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="m_actionMarkSelectedMessagesAsRead">
|
<action name="m_actionMarkSelectedMessagesAsRead">
|
||||||
@ -340,14 +337,6 @@
|
|||||||
<string>Deletes all messages from selected feeds.</string>
|
<string>Deletes all messages from selected feeds.</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="m_actionAddFeed">
|
|
||||||
<property name="text">
|
|
||||||
<string>New &feed</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Add new feed.</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="m_actionOpenSelectedSourceArticlesExternally">
|
<action name="m_actionOpenSelectedSourceArticlesExternally">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Open selected source articles in &external browser</string>
|
<string>Open selected source articles in &external browser</string>
|
||||||
@ -363,14 +352,6 @@
|
|||||||
<string>Open selected source articles in &internal browser</string>
|
<string>Open selected source articles in &internal browser</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="m_actionAddCategory">
|
|
||||||
<property name="text">
|
|
||||||
<string>New &category</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Add new category.</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="m_actionNoActions">
|
<action name="m_actionNoActions">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>No actions available</string>
|
<string>No actions available</string>
|
||||||
@ -436,7 +417,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_actionSelectNextFeedCategory">
|
<action name="m_actionSelectNextFeedCategory">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Select &next feed/category</string>
|
<string>Select &next item</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true">S</string>
|
<string notr="true">S</string>
|
||||||
@ -444,7 +425,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_actionSelectPreviousFeedCategory">
|
<action name="m_actionSelectPreviousFeedCategory">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Select &previous feed/category</string>
|
<string>Select &previous item</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true">A</string>
|
<string notr="true">A</string>
|
||||||
@ -649,14 +630,6 @@
|
|||||||
<string notr="true">Ctrl+Shift+U</string>
|
<string notr="true">Ctrl+Shift+U</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="m_actionFetchFeedMetadata">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Fetch feed metadata</string>
|
|
||||||
</property>
|
|
||||||
<property name="shortcut">
|
|
||||||
<string notr="true">Ctrl+Shift+F</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="m_actionExpandCollapseFeedCategory">
|
<action name="m_actionExpandCollapseFeedCategory">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Expand/collapse selected feed/category</string>
|
<string>&Expand/collapse selected feed/category</string>
|
||||||
|
@ -309,20 +309,17 @@ void FeedMessageViewer::updateFeedButtonsAvailability() {
|
|||||||
bool feed_selected = !m_feedsView->selectionModel()->selectedRows().isEmpty();
|
bool feed_selected = !m_feedsView->selectionModel()->selectedRows().isEmpty();
|
||||||
FormMain *form_main = qApp->mainForm();
|
FormMain *form_main = qApp->mainForm();
|
||||||
|
|
||||||
form_main->m_ui->m_actionAddCategory->setEnabled(!critical_action_running);
|
|
||||||
form_main->m_ui->m_actionAddFeed->setEnabled(!critical_action_running);
|
|
||||||
form_main->m_ui->m_actionBackupDatabaseSettings->setEnabled(!critical_action_running);
|
form_main->m_ui->m_actionBackupDatabaseSettings->setEnabled(!critical_action_running);
|
||||||
form_main->m_ui->m_actionCleanupDatabase->setEnabled(!critical_action_running);
|
form_main->m_ui->m_actionCleanupDatabase->setEnabled(!critical_action_running);
|
||||||
form_main->m_ui->m_actionClearSelectedFeeds->setEnabled(feed_selected);
|
form_main->m_ui->m_actionClearSelectedFeeds->setEnabled(feed_selected);
|
||||||
form_main->m_ui->m_actionDeleteSelectedFeedCategory->setEnabled(!critical_action_running && feed_selected);
|
form_main->m_ui->m_actionDeleteSelectedItem->setEnabled(!critical_action_running && feed_selected);
|
||||||
form_main->m_ui->m_actionEditSelectedFeedCategory->setEnabled(!critical_action_running && feed_selected);
|
form_main->m_ui->m_actionEditSelectedItem->setEnabled(!critical_action_running && feed_selected);
|
||||||
form_main->m_ui->m_actionImportFeeds->setEnabled(!critical_action_running);
|
form_main->m_ui->m_actionImportFeeds->setEnabled(!critical_action_running);
|
||||||
form_main->m_ui->m_actionMarkSelectedFeedsAsRead->setEnabled(feed_selected);
|
form_main->m_ui->m_actionMarkSelectedFeedsAsRead->setEnabled(feed_selected);
|
||||||
form_main->m_ui->m_actionMarkSelectedFeedsAsUnread->setEnabled(feed_selected);
|
form_main->m_ui->m_actionMarkSelectedFeedsAsUnread->setEnabled(feed_selected);
|
||||||
form_main->m_ui->m_actionUpdateAllFeeds->setEnabled(!critical_action_running);
|
form_main->m_ui->m_actionUpdateAllFeeds->setEnabled(!critical_action_running);
|
||||||
form_main->m_ui->m_actionUpdateSelectedFeeds->setEnabled(!critical_action_running && feed_selected);
|
form_main->m_ui->m_actionUpdateSelectedFeeds->setEnabled(!critical_action_running && feed_selected);
|
||||||
form_main->m_ui->m_actionViewSelectedItemsNewspaperMode->setEnabled(feed_selected);
|
form_main->m_ui->m_actionViewSelectedItemsNewspaperMode->setEnabled(feed_selected);
|
||||||
form_main->m_ui->m_actionFetchFeedMetadata->setEnabled(feed_selected);
|
|
||||||
form_main->m_ui->m_actionExpandCollapseFeedCategory->setEnabled(feed_selected);
|
form_main->m_ui->m_actionExpandCollapseFeedCategory->setEnabled(feed_selected);
|
||||||
form_main->m_ui->m_menuAddItem->setEnabled(!critical_action_running);
|
form_main->m_ui->m_menuAddItem->setEnabled(!critical_action_running);
|
||||||
}
|
}
|
||||||
@ -395,8 +392,6 @@ void FeedMessageViewer::createConnections() {
|
|||||||
SIGNAL(triggered()), m_feedsView, SLOT(markSelectedFeedsRead()));
|
SIGNAL(triggered()), m_feedsView, SLOT(markSelectedFeedsRead()));
|
||||||
connect(form_main->m_ui->m_actionExpandCollapseFeedCategory,
|
connect(form_main->m_ui->m_actionExpandCollapseFeedCategory,
|
||||||
SIGNAL(triggered()), m_feedsView, SLOT(expandCollapseCurrentItem()));
|
SIGNAL(triggered()), m_feedsView, SLOT(expandCollapseCurrentItem()));
|
||||||
connect(form_main->m_ui->m_actionFetchFeedMetadata, SIGNAL(triggered()),
|
|
||||||
m_feedsView, SLOT(fetchMetadataForSelectedFeed()));
|
|
||||||
connect(form_main->m_ui->m_actionMarkSelectedFeedsAsUnread,
|
connect(form_main->m_ui->m_actionMarkSelectedFeedsAsUnread,
|
||||||
SIGNAL(triggered()), m_feedsView, SLOT(markSelectedFeedsUnread()));
|
SIGNAL(triggered()), m_feedsView, SLOT(markSelectedFeedsUnread()));
|
||||||
connect(form_main->m_ui->m_actionClearSelectedFeeds,
|
connect(form_main->m_ui->m_actionClearSelectedFeeds,
|
||||||
@ -407,15 +402,11 @@ void FeedMessageViewer::createConnections() {
|
|||||||
SIGNAL(triggered()), m_feedsView, SLOT(updateSelectedFeeds()));
|
SIGNAL(triggered()), m_feedsView, SLOT(updateSelectedFeeds()));
|
||||||
connect(form_main->m_ui->m_actionUpdateAllFeeds,
|
connect(form_main->m_ui->m_actionUpdateAllFeeds,
|
||||||
SIGNAL(triggered()), m_feedsView, SLOT(updateAllFeeds()));
|
SIGNAL(triggered()), m_feedsView, SLOT(updateAllFeeds()));
|
||||||
connect(form_main->m_ui->m_actionAddCategory,
|
connect(form_main->m_ui->m_actionEditSelectedItem,
|
||||||
SIGNAL(triggered()), m_feedsView, SLOT(addNewCategory()));
|
|
||||||
connect(form_main->m_ui->m_actionAddFeed,
|
|
||||||
SIGNAL(triggered()), m_feedsView, SLOT(addNewFeed()));
|
|
||||||
connect(form_main->m_ui->m_actionEditSelectedFeedCategory,
|
|
||||||
SIGNAL(triggered()), m_feedsView, SLOT(editSelectedItem()));
|
SIGNAL(triggered()), m_feedsView, SLOT(editSelectedItem()));
|
||||||
connect(form_main->m_ui->m_actionViewSelectedItemsNewspaperMode,
|
connect(form_main->m_ui->m_actionViewSelectedItemsNewspaperMode,
|
||||||
SIGNAL(triggered()), m_feedsView, SLOT(openSelectedFeedsInNewspaperMode()));
|
SIGNAL(triggered()), m_feedsView, SLOT(openSelectedFeedsInNewspaperMode()));
|
||||||
connect(form_main->m_ui->m_actionDeleteSelectedFeedCategory,
|
connect(form_main->m_ui->m_actionDeleteSelectedItem,
|
||||||
SIGNAL(triggered()), m_feedsView, SLOT(deleteSelectedItem()));
|
SIGNAL(triggered()), m_feedsView, SLOT(deleteSelectedItem()));
|
||||||
connect(form_main->m_ui->m_actionSwitchFeedsList,
|
connect(form_main->m_ui->m_actionSwitchFeedsList,
|
||||||
SIGNAL(triggered()), this, SLOT(switchFeedComponentVisibility()));
|
SIGNAL(triggered()), this, SLOT(switchFeedComponentVisibility()));
|
||||||
|
@ -355,18 +355,6 @@ void FeedsView::markAllFeedsRead() {
|
|||||||
markAllFeedsReadStatus(1);
|
markAllFeedsReadStatus(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FeedsView::fetchMetadataForSelectedFeed() {
|
|
||||||
// TODO: fix
|
|
||||||
/*
|
|
||||||
StandardFeed *selected_feed = (StandardFeed*) selectedFeed();
|
|
||||||
|
|
||||||
if (selected_feed != NULL) {
|
|
||||||
selected_feed->fetchMetadataForItself();
|
|
||||||
m_sourceModel->reloadChangedLayout(QModelIndexList() << m_proxyModel->mapToSource(selectionModel()->selectedRows(0).at(0)));
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
void FeedsView::clearAllReadMessages() {
|
void FeedsView::clearAllReadMessages() {
|
||||||
m_sourceModel->markFeedsDeleted(allFeeds(), 1, 1);
|
m_sourceModel->markFeedsDeleted(allFeeds(), 1, 1);
|
||||||
}
|
}
|
||||||
@ -495,40 +483,58 @@ void FeedsView::selectPreviousItem() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FeedsView::initializeContextMenuCategories() {
|
void FeedsView::initializeContextMenuCategories(RootItem *clicked_item) {
|
||||||
m_contextMenuCategories = new QMenu(tr("Context menu for categories"), this);
|
if (m_contextMenuCategories == NULL) {
|
||||||
|
m_contextMenuCategories = new QMenu(tr("Context menu for categories"), this);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_contextMenuCategories->clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<QAction*> specific_actions = clicked_item->specificActions();
|
||||||
|
|
||||||
m_contextMenuCategories->addActions(QList<QAction*>() <<
|
m_contextMenuCategories->addActions(QList<QAction*>() <<
|
||||||
qApp->mainForm()->m_ui->m_actionUpdateSelectedFeeds <<
|
qApp->mainForm()->m_ui->m_actionUpdateSelectedFeeds <<
|
||||||
qApp->mainForm()->m_ui->m_actionEditSelectedFeedCategory <<
|
qApp->mainForm()->m_ui->m_actionEditSelectedItem <<
|
||||||
qApp->mainForm()->m_ui->m_actionViewSelectedItemsNewspaperMode <<
|
qApp->mainForm()->m_ui->m_actionViewSelectedItemsNewspaperMode <<
|
||||||
qApp->mainForm()->m_ui->m_actionMarkSelectedFeedsAsRead <<
|
qApp->mainForm()->m_ui->m_actionMarkSelectedFeedsAsRead <<
|
||||||
qApp->mainForm()->m_ui->m_actionMarkSelectedFeedsAsUnread <<
|
qApp->mainForm()->m_ui->m_actionMarkSelectedFeedsAsUnread <<
|
||||||
qApp->mainForm()->m_ui->m_actionDeleteSelectedFeedCategory);
|
qApp->mainForm()->m_ui->m_actionDeleteSelectedItem);
|
||||||
m_contextMenuCategories->addSeparator();
|
|
||||||
m_contextMenuCategories->addActions(QList<QAction*>() <<
|
if (!specific_actions.isEmpty()) {
|
||||||
qApp->mainForm()->m_ui->m_actionAddCategory <<
|
m_contextMenuCategories->addSeparator();
|
||||||
qApp->mainForm()->m_ui->m_actionAddFeed);
|
m_contextMenuCategories->addActions(specific_actions);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FeedsView::initializeContextMenuFeeds() {
|
void FeedsView::initializeContextMenuFeeds(RootItem *clicked_item) {
|
||||||
m_contextMenuFeeds = new QMenu(tr("Context menu for categories"), this);
|
if (m_contextMenuFeeds == NULL) {
|
||||||
|
m_contextMenuFeeds = new QMenu(tr("Context menu for categories"), this);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_contextMenuFeeds->clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<QAction*> specific_actions = clicked_item->specificActions();
|
||||||
|
|
||||||
m_contextMenuFeeds->addActions(QList<QAction*>() <<
|
m_contextMenuFeeds->addActions(QList<QAction*>() <<
|
||||||
qApp->mainForm()->m_ui->m_actionUpdateSelectedFeeds <<
|
qApp->mainForm()->m_ui->m_actionUpdateSelectedFeeds <<
|
||||||
qApp->mainForm()->m_ui->m_actionEditSelectedFeedCategory <<
|
qApp->mainForm()->m_ui->m_actionEditSelectedItem <<
|
||||||
qApp->mainForm()->m_ui->m_actionViewSelectedItemsNewspaperMode <<
|
qApp->mainForm()->m_ui->m_actionViewSelectedItemsNewspaperMode <<
|
||||||
qApp->mainForm()->m_ui->m_actionMarkSelectedFeedsAsRead <<
|
qApp->mainForm()->m_ui->m_actionMarkSelectedFeedsAsRead <<
|
||||||
qApp->mainForm()->m_ui->m_actionMarkSelectedFeedsAsUnread <<
|
qApp->mainForm()->m_ui->m_actionMarkSelectedFeedsAsUnread <<
|
||||||
qApp->mainForm()->m_ui->m_actionDeleteSelectedFeedCategory <<
|
qApp->mainForm()->m_ui->m_actionDeleteSelectedItem);
|
||||||
qApp->mainForm()->m_ui->m_actionFetchFeedMetadata);
|
|
||||||
|
if (!specific_actions.isEmpty()) {
|
||||||
|
m_contextMenuFeeds->addSeparator();
|
||||||
|
m_contextMenuFeeds->addActions(specific_actions);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FeedsView::initializeContextMenuEmptySpace() {
|
void FeedsView::initializeContextMenuEmptySpace() {
|
||||||
m_contextMenuEmptySpace = new QMenu(tr("Context menu for empty space"), this);
|
m_contextMenuEmptySpace = new QMenu(tr("Context menu for empty space"), this);
|
||||||
m_contextMenuEmptySpace->addAction(qApp->mainForm()->m_ui->m_actionUpdateAllFeeds);
|
m_contextMenuEmptySpace->addAction(qApp->mainForm()->m_ui->m_actionUpdateAllFeeds);
|
||||||
m_contextMenuEmptySpace->addSeparator();
|
m_contextMenuEmptySpace->addSeparator();
|
||||||
m_contextMenuEmptySpace->addActions(QList<QAction*>() <<
|
|
||||||
qApp->mainForm()->m_ui->m_actionAddCategory <<
|
|
||||||
qApp->mainForm()->m_ui->m_actionAddFeed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FeedsView::setupAppearance() {
|
void FeedsView::setupAppearance() {
|
||||||
@ -590,20 +596,12 @@ void FeedsView::contextMenuEvent(QContextMenuEvent *event) {
|
|||||||
|
|
||||||
if (clicked_item->kind() == RootItemKind::Category) {
|
if (clicked_item->kind() == RootItemKind::Category) {
|
||||||
// Display context menu for categories.
|
// Display context menu for categories.
|
||||||
if (m_contextMenuCategories == NULL) {
|
initializeContextMenuCategories(clicked_item);
|
||||||
// Context menu is not initialized, initialize.
|
|
||||||
initializeContextMenuCategories();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_contextMenuCategories->exec(event->globalPos());
|
m_contextMenuCategories->exec(event->globalPos());
|
||||||
}
|
}
|
||||||
else if (clicked_item->kind() == RootItemKind::Feed) {
|
else if (clicked_item->kind() == RootItemKind::Feed) {
|
||||||
// Display context menu for feeds.
|
// Display context menu for feeds.
|
||||||
if (m_contextMenuFeeds == NULL) {
|
initializeContextMenuFeeds(clicked_item);
|
||||||
// Context menu is not initialized, initialize.
|
|
||||||
initializeContextMenuFeeds();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_contextMenuFeeds->exec(event->globalPos());
|
m_contextMenuFeeds->exec(event->globalPos());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,6 @@ class FeedsView : public QTreeView {
|
|||||||
public slots:
|
public slots:
|
||||||
void invalidateReadFeedsFilter(bool set_new_value = false, bool show_unread_only = false);
|
void invalidateReadFeedsFilter(bool set_new_value = false, bool show_unread_only = false);
|
||||||
void expandCollapseCurrentItem();
|
void expandCollapseCurrentItem();
|
||||||
void fetchMetadataForSelectedFeed();
|
|
||||||
|
|
||||||
// Feed updating.
|
// Feed updating.
|
||||||
void updateAllFeeds();
|
void updateAllFeeds();
|
||||||
@ -136,8 +135,8 @@ class FeedsView : public QTreeView {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Initializes context menus.
|
// Initializes context menus.
|
||||||
void initializeContextMenuCategories();
|
void initializeContextMenuCategories(RootItem *clicked_item);
|
||||||
void initializeContextMenuFeeds();
|
void initializeContextMenuFeeds(RootItem *clicked_item);
|
||||||
void initializeContextMenuEmptySpace();
|
void initializeContextMenuEmptySpace();
|
||||||
|
|
||||||
// Sets up appearance of this widget.
|
// Sets up appearance of this widget.
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
|
|
||||||
class Category : public RootItem {
|
class Category : public RootItem {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Category(RootItem *parent = NULL);
|
explicit Category(RootItem *parent = NULL);
|
||||||
virtual ~Category();
|
virtual ~Category();
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
// Base class for "feed" nodes.
|
// Base class for "feed" nodes.
|
||||||
class Feed : public RootItem {
|
class Feed : public RootItem {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Specifies the auto-update strategy for the feed.
|
// Specifies the auto-update strategy for the feed.
|
||||||
enum AutoUpdateType {
|
enum AutoUpdateType {
|
||||||
|
@ -27,6 +27,8 @@ class FeedsModel;
|
|||||||
// NOTE: The root usually contains some core functionality of the
|
// NOTE: The root usually contains some core functionality of the
|
||||||
// service like service account username/password etc.
|
// service like service account username/password etc.
|
||||||
class ServiceRoot : public RootItem {
|
class ServiceRoot : public RootItem {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ServiceRoot(FeedsModel *feeds_model, RootItem *parent = NULL);
|
explicit ServiceRoot(FeedsModel *feeds_model, RootItem *parent = NULL);
|
||||||
virtual ~ServiceRoot();
|
virtual ~ServiceRoot();
|
||||||
|
@ -31,7 +31,7 @@ class StandardServiceRoot;
|
|||||||
// NOTE: This class should be derived to create PARTICULAR category types.
|
// NOTE: This class should be derived to create PARTICULAR category types.
|
||||||
// NOTE: This class should not be instantiated directly.
|
// NOTE: This class should not be instantiated directly.
|
||||||
class StandardCategory : public Category {
|
class StandardCategory : public Category {
|
||||||
Q_DECLARE_TR_FUNCTIONS(StandardCategory)
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Constructors and destructors
|
// Constructors and destructors
|
||||||
|
@ -99,6 +99,10 @@ int StandardFeed::countOfUnreadMessages() const {
|
|||||||
return m_unreadCount;
|
return m_unreadCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<QAction*> StandardFeed::specificActions() {
|
||||||
|
return serviceRoot()->getMenuForFeed(this);
|
||||||
|
}
|
||||||
|
|
||||||
StandardServiceRoot *StandardFeed::serviceRoot() {
|
StandardServiceRoot *StandardFeed::serviceRoot() {
|
||||||
return static_cast<StandardServiceRoot*>(getParentServiceRoot());
|
return static_cast<StandardServiceRoot*>(getParentServiceRoot());
|
||||||
}
|
}
|
||||||
@ -201,10 +205,14 @@ void StandardFeed::fetchMetadataForItself() {
|
|||||||
|
|
||||||
editItself(metadata.first);
|
editItself(metadata.first);
|
||||||
delete metadata.first;
|
delete metadata.first;
|
||||||
|
|
||||||
|
// Notify the model about fact, that it needs to reload new information about
|
||||||
|
// this item, particularly the icon.
|
||||||
|
serviceRoot()->feedsModel()->reloadChangedItem(this);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qApp->showGuiMessage(tr("Metadata not fetched"),
|
qApp->showGuiMessage(tr("Metadata not fetched"),
|
||||||
tr("Metadata was not fetched because: %1").arg(NetworkFactory::networkErrorText(metadata.second)),
|
tr("Metadata was not fetched because: %1.").arg(NetworkFactory::networkErrorText(metadata.second)),
|
||||||
QSystemTrayIcon::Critical);
|
QSystemTrayIcon::Critical);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ class StandardServiceRoot;
|
|||||||
// Represents BASE class for feeds contained in FeedsModel.
|
// Represents BASE class for feeds contained in FeedsModel.
|
||||||
// NOTE: This class should be derived to create PARTICULAR feed types.
|
// NOTE: This class should be derived to create PARTICULAR feed types.
|
||||||
class StandardFeed : public Feed {
|
class StandardFeed : public Feed {
|
||||||
Q_DECLARE_TR_FUNCTIONS(StandardFeed)
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Describes possible types of feeds.
|
// Describes possible types of feeds.
|
||||||
@ -61,6 +61,8 @@ class StandardFeed : public Feed {
|
|||||||
int countOfAllMessages() const;
|
int countOfAllMessages() const;
|
||||||
int countOfUnreadMessages() const;
|
int countOfUnreadMessages() const;
|
||||||
|
|
||||||
|
QList<QAction*> specificActions();
|
||||||
|
|
||||||
bool canBeEdited() {
|
bool canBeEdited() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
#include "services/standard/standarditem.h"
|
|
||||||
|
|
||||||
#include "services/standard/standardserviceroot.h"
|
|
||||||
|
|
||||||
|
|
||||||
StandardItem::StandardItem(StandardServiceRoot *service_root) : m_serviceRoot(service_root) {
|
|
||||||
}
|
|
||||||
|
|
||||||
StandardItem::~StandardItem() {
|
|
||||||
}
|
|
||||||
|
|
||||||
StandardServiceRoot *StandardItem::serviceRoot() const {
|
|
||||||
return m_serviceRoot;
|
|
||||||
}
|
|
||||||
|
|
||||||
void StandardItem::setServiceRoot(StandardServiceRoot *service_root) {
|
|
||||||
m_serviceRoot = service_root;
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
#ifndef STANDARDITEM_H
|
|
||||||
#define STANDARDITEM_H
|
|
||||||
|
|
||||||
|
|
||||||
class StandardServiceRoot;
|
|
||||||
|
|
||||||
class StandardItem {
|
|
||||||
public:
|
|
||||||
explicit StandardItem(StandardServiceRoot *service_root);
|
|
||||||
virtual ~StandardItem();
|
|
||||||
|
|
||||||
StandardServiceRoot *serviceRoot() const;
|
|
||||||
void setServiceRoot(StandardServiceRoot *service_root);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
StandardServiceRoot *m_serviceRoot;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // STANDARDITEM_H
|
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
class StandardRecycleBin : public RootItem {
|
class StandardRecycleBin : public RootItem {
|
||||||
Q_DECLARE_TR_FUNCTIONS(StandardRecycleBin)
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StandardRecycleBin(RootItem *parent = NULL);
|
explicit StandardRecycleBin(RootItem *parent = NULL);
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/settings.h"
|
#include "miscellaneous/settings.h"
|
||||||
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "core/feedsmodel.h"
|
#include "core/feedsmodel.h"
|
||||||
#include "services/standard/standardserviceentrypoint.h"
|
#include "services/standard/standardserviceentrypoint.h"
|
||||||
#include "services/standard/standardrecyclebin.h"
|
#include "services/standard/standardrecyclebin.h"
|
||||||
@ -208,6 +209,17 @@ QHash<int,StandardCategory*> StandardServiceRoot::allCategories() {
|
|||||||
return categoriesForItem(this);
|
return categoriesForItem(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<QAction*> StandardServiceRoot::getMenuForFeed(StandardFeed *feed) {
|
||||||
|
QList<QAction*> list;
|
||||||
|
|
||||||
|
// Fetch feed metadata.
|
||||||
|
QAction *action_fetch_metadata = new QAction(qApp->icons()->fromTheme(QSL("download-manager")), tr("Fetch metadata"), NULL);
|
||||||
|
connect(action_fetch_metadata, SIGNAL(triggered()), feed, SLOT(fetchMetadataForItself()));
|
||||||
|
|
||||||
|
list.append(action_fetch_metadata);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
void StandardServiceRoot::assembleFeeds(FeedAssignment feeds) {
|
void StandardServiceRoot::assembleFeeds(FeedAssignment feeds) {
|
||||||
QHash<int,StandardCategory*> categories = categoriesForItem(this);
|
QHash<int,StandardCategory*> categories = categoriesForItem(this);
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ typedef QList<QPair<int, StandardFeed*> > FeedAssignment;
|
|||||||
typedef QPair<int, StandardFeed*> FeedAssignmentItem;
|
typedef QPair<int, StandardFeed*> FeedAssignmentItem;
|
||||||
|
|
||||||
class StandardServiceRoot : public ServiceRoot {
|
class StandardServiceRoot : public ServiceRoot {
|
||||||
Q_DECLARE_TR_FUNCTIONS(StandardServiceRoot)
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StandardServiceRoot(FeedsModel *feeds_model, RootItem *parent = NULL);
|
explicit StandardServiceRoot(FeedsModel *feeds_model, RootItem *parent = NULL);
|
||||||
@ -53,6 +53,8 @@ class StandardServiceRoot : public ServiceRoot {
|
|||||||
// consists of ID of parent item and pointer to category.
|
// consists of ID of parent item and pointer to category.
|
||||||
QHash<int,StandardCategory*> allCategories();
|
QHash<int,StandardCategory*> allCategories();
|
||||||
|
|
||||||
|
QList<QAction*> getMenuForFeed(StandardFeed *feed);
|
||||||
|
|
||||||
// Access to standard recycle bin.
|
// Access to standard recycle bin.
|
||||||
StandardRecycleBin *recycleBin() const;
|
StandardRecycleBin *recycleBin() const;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
class FeedsModel;
|
class FeedsModel;
|
||||||
|
|
||||||
class TtRssServiceRoot : public ServiceRoot {
|
class TtRssServiceRoot : public ServiceRoot {
|
||||||
Q_DECLARE_TR_FUNCTIONS(TtRssServiceRoot)
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TtRssServiceRoot(FeedsModel *feeds_model, RootItem *parent = NULL);
|
explicit TtRssServiceRoot(FeedsModel *feeds_model, RootItem *parent = NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user