GNU Octave
6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Figure.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (C) 2011-2021 The Octave Project Developers
4
//
5
// See the file COPYRIGHT.md in the top-level directory of this
6
// distribution or <https://octave.org/copyright/>.
7
//
8
// This file is part of Octave.
9
//
10
// Octave is free software: you can redistribute it and/or modify it
11
// under the terms of the GNU General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// Octave is distributed in the hope that it will be useful, but
16
// WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU General Public License for more details.
19
//
20
// You should have received a copy of the GNU General Public License
21
// along with Octave; see the file COPYING. If not, see
22
// <https://www.gnu.org/licenses/>.
23
//
24
////////////////////////////////////////////////////////////////////////
25
26
#if ! defined (octave_Figure_h)
27
#define octave_Figure_h 1
28
29
#include <QRect>
30
#include <QStatusBar>
31
32
#include "
GenericEventNotify.h
"
33
#include "
MenuContainer.h
"
34
#include "
Object.h
"
35
36
class
QMainWindow
;
37
class
QToolBar;
38
class
QScreen;
39
40
namespace
octave
41
{
42
class
base_qobject;
43
class
interpreter;
44
}
45
46
namespace
QtHandles
47
{
48
49
enum
MouseMode
50
{
51
NoMode
,
52
RotateMode
,
53
ZoomInMode
,
54
ZoomOutMode
,
55
PanMode
,
56
SelectMode
,
57
TextMode
58
};
59
60
class
Container;
61
class
FigureWindow;
62
class
MenuBar;
63
class
ToolBar;
64
65
class
Figure
:
66
public
Object
,
67
public
MenuContainer
,
68
public
GenericEventNotifyReceiver
69
{
70
Q_OBJECT
71
72
friend
class
ToolBar
;
73
74
public
:
75
Figure
(
octave::base_qobject
& oct_qobj,
octave::interpreter
& interp,
76
const
graphics_object
& go,
FigureWindow
*win);
77
~Figure
(
void
);
78
79
static
Figure
*
80
create
(
octave::base_qobject
& oct_qobj,
octave::interpreter
& interp,
81
const
graphics_object
& go);
82
83
QString
fileName
(
void
);
84
void
setFileName
(
const
QString&
name
);
85
86
MouseMode
mouseMode
(
void
);
87
88
Container
*
innerContainer
(
void
);
89
QWidget
*
menu
(
void
);
90
void
updateStatusBar
(
ColumnVector
pt);
91
92
void
do_connections
(
const
QObject
*receiver,
93
const
QObject
*emitter =
nullptr
);
94
95
bool
eventNotifyBefore
(
QObject
*watched, QEvent *event);
96
void
eventNotifyAfter
(
QObject
*watched, QEvent *event);
97
98
protected
:
99
enum
UpdateBoundingBoxFlag
100
{
101
UpdateBoundingBoxPosition
= 0x1,
102
UpdateBoundingBoxSize
= 0x2,
103
UpdateBoundingBoxAll
= 0x3
104
};
105
106
protected
:
107
void
redraw
(
void
);
108
void
show
(
void
);
109
void
print
(
const
QString& file_cmd,
const
QString& term);
110
void
update
(
int
pId);
111
void
updateBoundingBox
(
bool
internal
=
false
,
int
flags = 0);
112
void
beingDeleted
(
void
);
113
114
private
:
115
void
showFigureStatusBar
(
bool
visible);
116
void
addCustomToolBar
(QToolBar *bar,
bool
visible,
bool
isdefault);
117
void
showCustomToolBar
(QToolBar *bar,
bool
visible);
118
void
set_geometry
(QRect
r
);
119
120
void
enableMouseTracking
(
void
);
121
122
private
slots:
123
void
updateFigureHeight
(
int
delta_h);
124
void
updateContainer
(
void
);
125
void
figureWindowShown
();
126
void
screenChanged
(QScreen*);
127
128
public
slots:
129
uint8NDArray
slotGetPixels
(
void
);
130
131
signals:
132
void
asyncUpdate
(
void
);
133
134
private
:
135
Container
*
m_container
;
136
bool
m_blockUpdates
;
137
QToolBar *
m_figureToolBar
;
138
MenuBar
*
m_menuBar
;
139
QStatusBar *
m_statusBar
;
140
QRect
m_innerRect
;
141
QRect
m_outerRect
;
142
QImage
m_pointer_cdata
;
143
int
m_previousHeight
;
144
bool
m_resizable
;
145
};
146
147
}
148
149
#endif
GenericEventNotify.h
MenuContainer.h
Object.h
ColumnVector
Definition:
dColVector.h:37
QMainWindow
QObject
QWidget
QtHandles::Container
Definition:
Container.h:49
QtHandles::FigureWindow
Definition:
FigureWindow.h:39
QtHandles::Figure
Definition:
Figure.h:69
QtHandles::Figure::menu
QWidget * menu(void)
Definition:
Figure.cc:603
QtHandles::Figure::eventNotifyAfter
void eventNotifyAfter(QObject *watched, QEvent *event)
Definition:
Figure.cc:721
QtHandles::Figure::screenChanged
void screenChanged(QScreen *)
Definition:
Figure.cc:877
QtHandles::Figure::showFigureStatusBar
void showFigureStatusBar(bool visible)
Definition:
Figure.cc:542
QtHandles::Figure::enableMouseTracking
void enableMouseTracking(void)
Definition:
Figure.cc:901
QtHandles::Figure::do_connections
void do_connections(const QObject *receiver, const QObject *emitter=nullptr)
Definition:
Figure.cc:596
QtHandles::Figure::redraw
void redraw(void)
Definition:
Figure.cc:290
QtHandles::Figure::eventNotifyBefore
bool eventNotifyBefore(QObject *watched, QEvent *event)
Definition:
Figure.cc:667
QtHandles::Figure::updateBoundingBox
void updateBoundingBox(bool internal=false, int flags=0)
Definition:
Figure.cc:609
QtHandles::Figure::showCustomToolBar
void showCustomToolBar(QToolBar *bar, bool visible)
Definition:
Figure.cc:828
QtHandles::Figure::Figure
Figure(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go, FigureWindow *win)
Definition:
Figure.cc:119
QtHandles::Figure::slotGetPixels
uint8NDArray slotGetPixels(void)
Definition:
Figure.cc:331
QtHandles::Figure::UpdateBoundingBoxFlag
UpdateBoundingBoxFlag
Definition:
Figure.h:100
QtHandles::Figure::UpdateBoundingBoxSize
@ UpdateBoundingBoxSize
Definition:
Figure.h:102
QtHandles::Figure::UpdateBoundingBoxAll
@ UpdateBoundingBoxAll
Definition:
Figure.h:103
QtHandles::Figure::UpdateBoundingBoxPosition
@ UpdateBoundingBoxPosition
Definition:
Figure.h:101
QtHandles::Figure::m_figureToolBar
QToolBar * m_figureToolBar
Definition:
Figure.h:137
QtHandles::Figure::updateContainer
void updateContainer(void)
Definition:
Figure.cc:852
QtHandles::Figure::m_resizable
bool m_resizable
Definition:
Figure.h:144
QtHandles::Figure::beingDeleted
void beingDeleted(void)
Definition:
Figure.cc:349
QtHandles::Figure::m_container
Container * m_container
Definition:
Figure.h:135
QtHandles::Figure::updateStatusBar
void updateStatusBar(ColumnVector pt)
Definition:
Figure.cc:587
QtHandles::Figure::asyncUpdate
void asyncUpdate(void)
QtHandles::Figure::figureWindowShown
void figureWindowShown()
Definition:
Figure.cc:858
QtHandles::Figure::innerContainer
Container * innerContainer(void)
Definition:
Figure.cc:284
QtHandles::Figure::fileName
QString fileName(void)
Definition:
Figure.cc:199
QtHandles::Figure::addCustomToolBar
void addCustomToolBar(QToolBar *bar, bool visible, bool isdefault)
Definition:
Figure.cc:801
QtHandles::Figure::m_innerRect
QRect m_innerRect
Definition:
Figure.h:140
QtHandles::Figure::m_pointer_cdata
QImage m_pointer_cdata
Definition:
Figure.h:142
QtHandles::Figure::m_statusBar
QStatusBar * m_statusBar
Definition:
Figure.h:139
QtHandles::Figure::mouseMode
MouseMode mouseMode(void)
Definition:
Figure.cc:225
QtHandles::Figure::m_outerRect
QRect m_outerRect
Definition:
Figure.h:141
QtHandles::Figure::m_previousHeight
int m_previousHeight
Definition:
Figure.h:143
QtHandles::Figure::show
void show(void)
Definition:
Figure.cc:313
QtHandles::Figure::~Figure
~Figure(void)
Definition:
Figure.cc:195
QtHandles::Figure::set_geometry
void set_geometry(QRect r)
Definition:
Figure.cc:259
QtHandles::Figure::create
static Figure * create(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go)
Definition:
Figure.cc:113
QtHandles::Figure::print
void print(const QString &file_cmd, const QString &term)
Definition:
Figure.cc:322
QtHandles::Figure::update
void update(int pId)
Definition:
Figure.cc:361
QtHandles::Figure::m_blockUpdates
bool m_blockUpdates
Definition:
Figure.h:136
QtHandles::Figure::setFileName
void setFileName(const QString &name)
Definition:
Figure.cc:213
QtHandles::Figure::updateFigureHeight
void updateFigureHeight(int delta_h)
Definition:
Figure.cc:565
QtHandles::Figure::m_menuBar
MenuBar * m_menuBar
Definition:
Figure.h:138
QtHandles::GenericEventNotifyReceiver
Definition:
GenericEventNotify.h:61
QtHandles::MenuBar
Definition:
Figure.cc:71
QtHandles::MenuContainer
Definition:
MenuContainer.h:35
QtHandles::Object
Definition:
Object.h:51
QtHandles::ToolBar
Definition:
ToolBar.h:46
graphics_object
Definition:
graphics.in.h:2696
intNDArray< octave_uint8 >
octave::base_qobject
Base class for Octave interfaces that use Qt.
Definition:
octave-qobject.h:80
octave::interpreter
Definition:
interpreter.h:113
name
QString name
Definition:
gui-preferences-dw.h:51
r
T * r
Definition:
mx-inlines.cc:773
QtHandles
Definition:
BaseControl.cc:43
QtHandles::MouseMode
MouseMode
Definition:
Figure.h:50
QtHandles::ZoomOutMode
@ ZoomOutMode
Definition:
Figure.h:54
QtHandles::TextMode
@ TextMode
Definition:
Figure.h:57
QtHandles::NoMode
@ NoMode
Definition:
Figure.h:51
QtHandles::SelectMode
@ SelectMode
Definition:
Figure.h:56
QtHandles::PanMode
@ PanMode
Definition:
Figure.h:55
QtHandles::ZoomInMode
@ ZoomInMode
Definition:
Figure.h:53
QtHandles::RotateMode
@ RotateMode
Definition:
Figure.h:52
octave
Definition:
aepbalance.cc:41
libgui
graphics
Figure.h
Generated on Tue Apr 13 2021 15:27:43 for GNU Octave by
1.9.1