Mercurial > octave-nkf
view libgui/src/news-dock-widget.h @ 17599:f5950975a172
community news dock widget and other user info in GUI
* news-dock-widget.h, news-dock-widget.cc: New files.
* libgui/src/module.mk: Update file lists.
* configure.ac: Check for QtWebKit module.
* default-qt-settings.in: Update default geometry.
* main-window.cc, main-window.h (main_window::news_window):
New data member.
(main_window::dock_widget_list): Include it in the list.
(main_window::display_release_notes,
main_window::display_url_in_window, main_window::construct_news_menu):
New functions.
(main_window::construct): Add news_window dock widget.
(main_window::construct_menu_bar): Call construct_news_menu.
(main_window::construct_window_menu): New items for Showing news
window and menu.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 07 Oct 2013 21:13:11 -0400 |
parents | |
children | 482222fe5b35 |
line wrap: on
line source
/* Copyright (C) 2013 John W. Eaton This file is part of Octave. Octave 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. Octave 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 Octave; see the file COPYING. If not, see <http://www.gnu.org/licenses/>. */ #ifndef NEWSDOCKWIDGET_H #define NEWSDOCKWIDGET_H #include <QBasicTimer> #include <QWebView> #include "octave-dock-widget.h" class news_dock_widget : public octave_dock_widget { Q_OBJECT public: news_dock_widget (QWidget *parent = 0); void load_news (void); protected slots: void display_news (const QString& news, const QUrl& base_url); private: QWebView *news_browser; }; class news_reader : public QObject { Q_OBJECT public: news_reader (const QString& xbase_url, const QString& xpage) : QObject (), base_url (xbase_url), page (xpage) { } public slots: void process (void); signals: void display_news_signal (const QString& news, const QUrl& base_url); void finished (void); private: QString base_url; QString page; }; #endif // NEWSDOCKWIDGET_H