annotate libgui/src/community-news.h @ 31639:ca7d58406f82

eliminate unnecessary uses of octave_qobject in GUI classes * BaseControl.cc, BaseControl.h, ButtonControl.cc, ButtonControl.h, ButtonGroup.cc, ButtonGroup.h, Canvas.cc, Canvas.h, CheckBoxControl.cc, CheckBoxControl.h, Container.cc, Container.h, ContextMenu.cc, ContextMenu.h, EditControl.cc, EditControl.h, Figure.cc, Figure.h, GLCanvas.cc, GLCanvas.h, ListBoxControl.cc, ListBoxControl.h, Menu.cc, Menu.h, Object.cc, Object.h, Panel.cc, Panel.h, PopupMenuControl.cc, PopupMenuControl.h, PushButtonControl.cc, PushButtonControl.h, PushTool.cc, PushTool.h, RadioButtonControl.cc, RadioButtonControl.h, SliderControl.cc, SliderControl.h, Table.cc, Table.h, TextControl.cc, TextControl.h, ToggleButtonControl.cc, ToggleButtonControl.h, ToggleTool.cc, ToggleTool.h, ToolBar.cc, ToolBar.h, ToolBarButton.cc, ToolBarButton.h, annotation-dialog.cc, annotation-dialog.h, qt-graphics-toolkit.cc, qt-graphics-toolkit.h, command-widget.h, community-news.cc, community-news.h, documentation-bookmarks.cc, documentation-bookmarks.h, documentation.cc, external-editor-interface.cc, external-editor-interface.h, find-files-dialog.cc, find-files-dialog.h, graphics-init.cc, graphics-init.h, interpreter-qobject.cc, file-editor.cc, find-dialog.cc, find-dialog.h, main-window.cc, main-window.h, news-reader.cc, news-reader.h, octave-qobject.cc, release-notes.cc, resource-manager.cc, set-path-dialog.cc, set-path-dialog.h, shortcut-manager.cc, shortcut-manager.h, welcome-wizard.cc, welcome-wizard.h, workspace-model.cc: Don't store references to octave_qobject in GUI classes where it is no longer needed. Eliminate unnecessary octave_qobject constructor arguments. Change all uses.
author John W. Eaton <jwe@octave.org>
date Sun, 04 Dec 2022 22:57:02 -0500
parents e2c8c852399e
children 431f80aba37a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29835
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 ////////////////////////////////////////////////////////////////////////
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 //
30564
796f54d4ddbf update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 29835
diff changeset
3 // Copyright (C) 2011-2022 The Octave Project Developers
29835
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 //
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 // See the file COPYRIGHT.md in the top-level directory of this
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 // distribution or <https://octave.org/copyright/>.
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 //
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 // This file is part of Octave.
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 //
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 // Octave is free software: you can redistribute it and/or modify it
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 // under the terms of the GNU General Public License as published by
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12 // the Free Software Foundation, either version 3 of the License, or
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13 // (at your option) any later version.
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 //
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 // Octave is distributed in the hope that it will be useful, but
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
18 // GNU General Public License for more details.
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19 //
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20 // You should have received a copy of the GNU General Public License
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 // along with Octave; see the file COPYING. If not, see
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 // <https://www.gnu.org/licenses/>.
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
23 //
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24 ////////////////////////////////////////////////////////////////////////
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 #if ! defined (octave_community_news_h)
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27 #define octave_community_news_h 1
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29 #include <QString>
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
30 #include <QWidget>
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
32 class QTextBrowser;
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
33
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
34 namespace octave
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
35 {
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36 class community_news : public QWidget
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37 {
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 Q_OBJECT
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40 public:
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
41
31639
ca7d58406f82 eliminate unnecessary uses of octave_qobject in GUI classes
John W. Eaton <jwe@octave.org>
parents: 30690
diff changeset
42 community_news (int serial);
29835
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
43
31639
ca7d58406f82 eliminate unnecessary uses of octave_qobject in GUI classes
John W. Eaton <jwe@octave.org>
parents: 30690
diff changeset
44 community_news (QWidget *parent = nullptr,
29835
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
45 const QString& base_url = "https://octave.org",
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
46 const QString& page = "community-news.html",
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
47 int serial = -1);
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
48
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
49 ~community_news (void) = default;
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
50
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
51 public slots:
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
52
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
53 void set_news (const QString& news);
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
54
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
55 void display (void);
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
56
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
57 private:
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
58
31639
ca7d58406f82 eliminate unnecessary uses of octave_qobject in GUI classes
John W. Eaton <jwe@octave.org>
parents: 30690
diff changeset
59 void construct (const QString& base_url, const QString& page, int serial);
29835
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
60
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
61 QTextBrowser *m_browser;
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
62 };
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
63 }
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
64
a946d742fb97 allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
diff changeset
65 #endif