Debian Codegraph @

src/librssguard/gui/feedmessageviewer.h

raw symbols SCIP
1 // For license of this file, see <project-root-folder>/LICENSE.md.
2
3 #ifndef FEEDMESSAGEVIEWER_H
4 #define FEEDMESSAGEVIEWER_H
5
6 #include "core/feedsproxymodel.h"
7 #include "core/messagesmodel.h"
8 #include "core/messagesproxymodel.h"
9 #include "gui/tabcontent.h"
10
11 class WebBrowser;
12 class MessagePreviewer;
13 class MessagesView;
14 class MessagesToolBar;
15 class FeedsToolBar;
16 class WebBrowser;
17 class FeedsView;
18 class StandardFeed;
19 class QToolBar;
20 class QSplitter;
21 class QProgressBar;
22
23 class RSSGUARD_DLLSPEC FeedMessageViewer : public TabContent {
24 Q_OBJECT
25
26 public:
27 explicit FeedMessageViewer(QWidget* parent = nullptr);
28 virtual ~FeedMessageViewer();
29
30 virtual WebBrowser* webBrowser() const;
31
32 FeedsView* feedsView() const;
33 MessagesView* messagesView() const;
34 MessagesToolBar* messagesToolBar() const;
35 FeedsToolBar* feedsToolBar() const;
36 MessagePreviewer* messagesBrowser() const;
37
38 bool areToolBarsEnabled() const;
39 bool areListHeadersEnabled() const;
40
41 void normalizeToolbarHeights();
42
43 public slots:
44 void saveSize();
45 void loadSize();
46
47 void loadMessageViewerFonts();
48
49 // Switches orientation horizontal/vertical.
50 void switchMessageSplitterOrientation();
51
52 // Enables/disables main toolbars or list headers.
53 void setToolBarsEnabled(bool enable);
54 void setListHeadersEnabled(bool enable);
55
56 // Reloads some changeable visual settings.
57 void refreshVisualProperties();
58
59 void updateArticleViewerSettings();
60
61 // Switches visibility of feed list and related
62 // toolbar.
63 void switchFeedComponentVisibility();
64
65 void changeMessageFilter(MessagesProxyModel::MessageListFilter filter);
66 void changeFeedFilter(FeedsProxyModel::FeedListFilter filter);
67
68 void toggleShowFeedTreeBranches();
69 void toggleItemsAutoExpandingOnSelection();
70 void alternateRowColorsInLists();
71 void respondToMainWindowResizes();
72
73 void loadMessageToFeedAndArticleList(Feed* feed, const Message& message);
74
75 private slots:
76 void onFeedSplitterResized();
77 void onMessageSplitterResized();
78 void displayMessage(const Message& message, RootItem* root);
79 void onMessageRemoved(RootItem* root);
80
81 private:
82 void initialize();
83 void initializeViews();
84 void createConnections();
85
86 private:
87 bool m_toolBarsEnabled;
88 bool m_listHeadersEnabled;
89 bool m_articleViewerAlwaysVisible;
90 FeedsToolBar* m_toolBarFeeds;
91 MessagesToolBar* m_toolBarMessages;
92 QSplitter* m_feedSplitter;
93 QSplitter* m_messageSplitter;
94 MessagesView* m_messagesView;
95 FeedsView* m_feedsView;
96 QWidget* m_feedsWidget;
97 QWidget* m_messagesWidget;
98 MessagePreviewer* m_messagesBrowser;
99 };
100
101 #endif // FEEDMESSAGEVIEWER_H