Some inlining.
This commit is contained in:
parent
236591c141
commit
16e2df6575
@ -290,7 +290,3 @@ void FeedMessageViewer::initializeViews() {
|
||||
// Set layout as active.
|
||||
setLayout(central_layout);
|
||||
}
|
||||
|
||||
WebBrowser *FeedMessageViewer::webBrowser() {
|
||||
return m_messagesBrowser;
|
||||
}
|
||||
|
@ -24,7 +24,9 @@ class FeedMessageViewer : public TabContent {
|
||||
virtual ~FeedMessageViewer();
|
||||
|
||||
// WebBrowser getter from TabContent interface.
|
||||
WebBrowser *webBrowser();
|
||||
inline WebBrowser *webBrowser() {
|
||||
return m_messagesBrowser;
|
||||
}
|
||||
|
||||
// Loads/saves sizes and states of ALL
|
||||
// underlying widgets, this contains primarily
|
||||
|
@ -170,8 +170,7 @@ void FeedsView::updateCountsOfSelectedFeeds(bool update_total_too) {
|
||||
// Make sure that selected view reloads changed indexes.
|
||||
m_sourceModel->reloadChangedLayout(m_proxyModel->mapListToSource(selectionModel()->selectedRows()));
|
||||
|
||||
emit feedCountsChanged(m_sourceModel->countOfUnreadMessages(),
|
||||
m_sourceModel->countOfAllMessages());
|
||||
notifyWithCounts();
|
||||
}
|
||||
}
|
||||
|
||||
@ -183,8 +182,7 @@ void FeedsView::updateCountsOfAllFeeds(bool update_total_too) {
|
||||
// Make sure that all views reloads its data.
|
||||
m_sourceModel->reloadWholeLayout();
|
||||
|
||||
emit feedCountsChanged(m_sourceModel->countOfUnreadMessages(),
|
||||
m_sourceModel->countOfAllMessages());
|
||||
notifyWithCounts();
|
||||
}
|
||||
|
||||
void FeedsView::updateCountsOfParticularFeed(FeedsModelFeed *feed,
|
||||
@ -196,8 +194,7 @@ void FeedsView::updateCountsOfParticularFeed(FeedsModelFeed *feed,
|
||||
m_sourceModel->reloadChangedLayout(QModelIndexList() << index);
|
||||
}
|
||||
|
||||
emit feedCountsChanged(m_sourceModel->countOfUnreadMessages(),
|
||||
m_sourceModel->countOfAllMessages());
|
||||
notifyWithCounts();
|
||||
}
|
||||
|
||||
void FeedsView::initializeContextMenuCategoriesFeeds() {
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <QTreeView>
|
||||
|
||||
#include "core/messagesmodel.h"
|
||||
#include "core/feedsmodel.h"
|
||||
|
||||
|
||||
// TODO: http://soundguyrob.files.wordpress.com/2011/03/screen-shot-2011-03-01-at-7-45-23-pm.jpg
|
||||
@ -18,7 +19,6 @@
|
||||
// jako navigateToMessages(const QList<Message> &messages), mrknout
|
||||
// do navigateToMessage
|
||||
|
||||
class FeedsModel;
|
||||
class FeedsProxyModel;
|
||||
class FeedsModelFeed;
|
||||
class FeedsModelCategory;
|
||||
@ -77,6 +77,16 @@ class FeedsView : public QTreeView {
|
||||
// Reloads counts for particular feed.
|
||||
void updateCountsOfParticularFeed(FeedsModelFeed *feed, bool update_total_too = true);
|
||||
|
||||
// TODO: pouzit metodu dole pro uvodni zobrazeni
|
||||
// poctu v trayi
|
||||
|
||||
// Notifies other components about messages
|
||||
// counts.
|
||||
void notifyWithCounts() {
|
||||
emit feedCountsChanged(m_sourceModel->countOfUnreadMessages(),
|
||||
m_sourceModel->countOfAllMessages());
|
||||
}
|
||||
|
||||
protected:
|
||||
// Initializes context menus.
|
||||
void initializeContextMenuCategoriesFeeds();
|
||||
|
Loading…
x
Reference in New Issue
Block a user