26#if defined (HAVE_CONFIG_H)
30#include <QDesktopWidget>
32#include <QTextBrowser>
43 :
QWidget (nullptr), m_browser (nullptr)
45 construct (oct_qobj,
"https://octave.org",
"community-news.html", serial);
49 const QString& base_url,
const QString& page,
51 :
QWidget (parent), m_browser (nullptr)
53 construct (oct_qobj, base_url, page, serial);
57 const QString& base_url,
const QString& page,
65 QVBoxLayout *vlayout =
new QVBoxLayout;
70 setWindowTitle (tr (
"Octave Community News"));
75 resize (win_x/2, win_y/2);
76 move ((win_x - width ())/2, (win_y - height ())/2);
83 QString icon =
":/actions/icons/logo.png";
84 setWindowIcon (QIcon (icon));
97 serial, connect_to_web);
99 reader->moveToThread (worker_thread);
104 connect (worker_thread, &QThread::started,
111 connect (worker_thread, &QThread::finished,
112 worker_thread, &QThread::deleteLater);
114 worker_thread->start ();
126 else if (isMinimized ())
138 QRect screen_geometry = QApplication::desktop ()->availableGeometry (
this);
140 width = screen_geometry.width ();
141 height = screen_geometry.height ();
Base class for Octave interfaces that use Qt.
resource_manager & get_resource_manager(void)
void display_news_signal(const QString &news)
gui_settings * get_settings(void) const
const gui_pref nr_allow_connection("news/allow_web_connection", QVariant(false))