rssguard/src/gui/feedmessageviewer.h

110 lines
2.9 KiB
C
Raw Normal View History

2014-02-26 07:41:40 +01:00
// This file is part of RSS Guard.
//
2016-01-13 09:57:05 +01:00
// Copyright (C) 2011-2016 by Martin Rotter <rotter.martinos@gmail.com>
2014-02-26 07:41:40 +01:00
//
// RSS Guard 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.
//
// RSS Guard 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 RSS Guard. If not, see <http://www.gnu.org/licenses/>.
2013-10-05 07:43:10 +02:00
#ifndef FEEDMESSAGEVIEWER_H
#define FEEDMESSAGEVIEWER_H
#include "gui/tabcontent.h"
#include "core/messagesmodel.h"
2016-04-01 08:44:59 +02:00
#include <QTextBrowser>
2013-10-05 07:43:10 +02:00
class WebBrowser;
2013-10-13 16:12:15 +02:00
class MessagesView;
2014-04-01 08:12:54 +02:00
class MessagesToolBar;
2014-04-07 08:21:55 +02:00
class FeedsToolBar;
2016-06-18 20:38:24 +02:00
class WebBrowser;
2014-02-02 12:34:32 +01:00
class FeedsView;
class StandardFeed;
2013-10-20 14:45:14 +02:00
class QToolBar;
class QSplitter;
2014-01-06 21:22:00 +01:00
class QProgressBar;
2013-10-05 07:43:10 +02:00
class FeedMessageViewer : public TabContent {
Q_OBJECT
public:
2013-10-20 18:09:15 +02:00
// Constructors and destructors.
2013-10-05 07:43:10 +02:00
explicit FeedMessageViewer(QWidget *parent = 0);
virtual ~FeedMessageViewer();
2016-08-15 10:35:22 +02:00
WebBrowser *webBrowser() const;
FeedsView *feedsView() const;
MessagesView *messagesView() const;
MessagesToolBar *messagesToolBar() const;
FeedsToolBar *feedsToolBar() const;
2013-10-05 07:43:10 +02:00
2016-08-15 10:35:22 +02:00
bool areToolBarsEnabled() const;
bool areListHeadersEnabled() const;
2014-04-07 08:21:55 +02:00
2016-08-15 10:35:22 +02:00
public slots:
// Loads/saves sizes and states of ALL
// underlying widgets, this contains primarily
// splitters, toolbar and views.
void saveSize();
void loadSize();
2015-07-12 13:58:22 +02:00
void loadMessageViewerFonts();
// Switches orientation horizontal/vertical.
2014-11-05 16:56:02 +01:00
void switchMessageSplitterOrientation();
2014-03-28 13:02:02 +01:00
// Enables/disables main toolbars or list headers.
2014-03-27 13:43:13 +01:00
void setToolBarsEnabled(bool enable);
2014-03-28 13:02:02 +01:00
void setListHeadersEnabled(bool enable);
2014-03-27 13:43:13 +01:00
// Reloads some changeable visual settings.
void refreshVisualProperties();
2015-06-12 20:10:18 +02:00
private slots:
2014-03-08 18:46:36 +01:00
// Switches visibility of feed list and related
// toolbar.
2014-03-08 17:43:02 +01:00
void switchFeedComponentVisibility();
// Toggles displayed feeds.
2015-07-16 09:18:07 +02:00
void toggleShowOnlyUnreadFeeds();
2013-10-13 16:12:15 +02:00
protected:
2013-10-20 18:09:15 +02:00
// Initializes some properties of the widget.
void initialize();
// Initializes both messages/feeds views.
2013-10-13 16:12:15 +02:00
void initializeViews();
2013-10-05 07:43:10 +02:00
2013-12-04 21:03:09 +01:00
// Sets up connections.
2013-12-08 14:02:28 +01:00
void createConnections();
2013-12-04 21:03:09 +01:00
2013-10-13 16:12:15 +02:00
private:
2014-03-27 13:43:13 +01:00
bool m_toolBarsEnabled;
2014-03-28 13:02:02 +01:00
bool m_listHeadersEnabled;
2014-04-07 08:21:55 +02:00
FeedsToolBar *m_toolBarFeeds;
2014-04-01 08:12:54 +02:00
MessagesToolBar *m_toolBarMessages;
2013-11-24 14:44:17 +01:00
QSplitter *m_feedSplitter;
QSplitter *m_messageSplitter;
2013-10-13 16:12:15 +02:00
MessagesView *m_messagesView;
FeedsView *m_feedsView;
2014-03-08 17:43:02 +01:00
QWidget *m_feedsWidget;
QWidget *m_messagesWidget;
2016-06-18 20:38:24 +02:00
WebBrowser *m_messagesBrowser;
2013-10-05 07:43:10 +02:00
};
#endif // FEEDMESSAGEVIEWER_H