GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
libgui
graphics
Figure.h
Go to the documentation of this file.
1
/*
2
3
Copyright (C) 2011-2015 Michael Goffioul
4
5
This file is part of Octave.
6
7
Octave is free software; you can redistribute it and/or modify it
8
under the terms of the GNU General Public License as published by the
9
Free Software Foundation; either version 3 of the License, or (at your
10
option) any later version.
11
12
Octave is distributed in the hope that it will be useful, but WITHOUT
13
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15
for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with Octave; see the file COPYING. If not, see
19
<http://www.gnu.org/licenses/>.
20
21
*/
22
23
#ifndef __QtHandles_Figure__
24
#define __QtHandles_Figure__ 1
25
26
#include <QRect>
27
28
#include "
GenericEventNotify.h
"
29
#include "
MenuContainer.h
"
30
#include "
Object.h
"
31
32
class
QMainWindow
;
33
class
QToolBar;
34
35
namespace
QtHandles
36
{
37
38
enum
MouseMode
39
{
40
// NOTE: These values must match the order of the buttons in the
41
// MouseModeActionGroup object.
42
43
NoMode
= 0,
44
RotateMode
= 1,
45
ZoomInMode
= 2,
46
ZoomOutMode
= 3,
47
PanMode
= 4,
48
TextMode
= 5,
49
SelectMode
= 6
50
};
51
52
class
Container;
53
class
FigureWindow;
54
class
MenuBar;
55
class
ToolBar;
56
57
class
MouseModeActionGroup;
58
59
class
Figure
:
60
public
Object
,
61
public
MenuContainer
,
62
public
GenericEventNotifyReceiver
63
{
64
Q_OBJECT
65
66
friend
class
ToolBar
;
67
68
public
:
69
Figure
(
const
graphics_object
& go,
FigureWindow
* win);
70
~Figure
(
void
);
71
72
static
Figure
*
create
(
const
graphics_object
& go);
73
74
QString
fileName
(
void
);
75
void
setFileName
(
const
QString& name);
76
77
MouseMode
mouseMode
(
void
);
78
79
Container
*
innerContainer
(
void
);
80
QWidget
*
menu
(
void
);
81
82
bool
eventNotifyBefore
(
QObject
* watched, QEvent* event);
83
void
eventNotifyAfter
(
QObject
* watched, QEvent* event);
84
85
protected
:
86
enum
UpdateBoundingBoxFlag
87
{
88
UpdateBoundingBoxPosition
= 0x1,
89
UpdateBoundingBoxSize
= 0x2,
90
UpdateBoundingBoxAll
= 0x3
91
};
92
93
protected
:
94
void
redraw
(
void
);
95
void
print
(
const
QString& file_cmd,
const
QString& term);
96
void
update
(
int
pId);
97
void
updateBoundingBox
(
bool
internal
=
false
,
int
flags = 0);
98
void
beingDeleted
(
void
);
99
100
private
:
101
void
createFigureToolBarAndMenuBar
(
void
);
102
void
showFigureToolBar
(
bool
visible);
103
void
showMenuBar
(
bool
visible);
104
void
addCustomToolBar
(QToolBar* bar,
bool
visible);
105
void
showCustomToolBar
(QToolBar* bar,
bool
visible);
106
107
void
updateFigureToolBarAndMenuBar
(
void
);
108
109
static
void
updateBoundingBoxHelper
(
void
*);
110
111
void
save_figure_callback
(
const
std::string& file);
112
void
copy_figure_callback
(
const
std::string& format);
113
114
private
slots:
115
void
setMouseMode
(
MouseMode
mode);
116
void
fileSaveFigure
(
bool
prompt =
false
);
117
void
fileSaveFigureAs
(
void
);
118
void
fileCloseFigure
(
void
);
119
void
editCopy
(
bool
choose_format =
false
);
120
void
helpAboutQtHandles
(
void
);
121
void
updateMenuBar
(
void
);
122
void
updateContainer
(
void
);
123
void
toggleAxes
(
void
);
124
void
toggleGrid
(
void
);
125
void
autoAxes
(
void
);
126
127
signals:
128
void
asyncUpdate
(
void
);
129
130
private
:
131
Container
*
m_container
;
132
bool
m_blockUpdates
;
133
QToolBar*
m_figureToolBar
;
134
MenuBar
*
m_menuBar
;
135
QRect
m_innerRect
;
136
QRect
m_outerRect
;
137
MouseModeActionGroup
*
m_mouseModeGroup
;
138
};
139
140
};
// namespace QtHandles
141
142
#endif
QtHandles::Figure::fileSaveFigure
void fileSaveFigure(bool prompt=false)
Definition:
Figure.cc:781
QtHandles::Figure::update
void update(int pId)
Definition:
Figure.cc:399
QtHandles::Figure::menu
QWidget * menu(void)
Definition:
Figure.cc:555
QtHandles::Figure::fileName
QString fileName(void)
Definition:
Figure.cc:241
QtHandles::Figure::m_outerRect
QRect m_outerRect
Definition:
Figure.h:136
QtHandles::TextMode
Definition:
Figure.h:48
QtHandles::Figure::showFigureToolBar
void showFigureToolBar(bool visible)
Definition:
Figure.cc:488
QtHandles::Figure::fileCloseFigure
void fileCloseFigure(void)
Definition:
Figure.cc:846
QtHandles::Object
Definition:
Object.h:40
QtHandles::Figure::updateBoundingBoxHelper
static void updateBoundingBoxHelper(void *)
Definition:
Figure.cc:569
QtHandles::Figure::m_container
Container * m_container
Definition:
Figure.h:131
QtHandles::Figure::UpdateBoundingBoxPosition
Definition:
Figure.h:88
QtHandles::MouseMode
MouseMode
Definition:
Figure.h:38
QtHandles::Figure::showCustomToolBar
void showCustomToolBar(QToolBar *bar, bool visible)
Definition:
Figure.cc:902
QWidget
QtHandles::RotateMode
Definition:
Figure.h:44
QtHandles::Figure::beingDeleted
void beingDeleted(void)
Definition:
Figure.cc:386
GenericEventNotify.h
QObject
MenuContainer.h
QtHandles::NoMode
Definition:
Figure.h:43
QtHandles::MenuBar
Definition:
Figure.cc:65
QtHandles::Figure::editCopy
void editCopy(bool choose_format=false)
Definition:
Figure.cc:852
QtHandles::Figure::Figure
Figure(const graphics_object &go, FigureWindow *win)
Definition:
Figure.cc:126
QtHandles::Figure::updateMenuBar
void updateMenuBar(void)
Definition:
Figure.cc:545
QtHandles::Figure::showMenuBar
void showMenuBar(bool visible)
Definition:
Figure.cc:510
QtHandles::Figure::updateContainer
void updateContainer(void)
Definition:
Figure.cc:926
QtHandles::Figure::setMouseMode
void setMouseMode(MouseMode mode)
Definition:
Figure.cc:763
QtHandles::Figure::addCustomToolBar
void addCustomToolBar(QToolBar *bar, bool visible)
Definition:
Figure.cc:876
QtHandles
Definition:
__init_qt__.cc:41
QtHandles::Figure::UpdateBoundingBoxFlag
UpdateBoundingBoxFlag
Definition:
Figure.h:86
QtHandles::Figure::asyncUpdate
void asyncUpdate(void)
Definition:
moc-Figure.cc:136
QtHandles::ZoomOutMode
Definition:
Figure.h:46
QtHandles::Figure::copy_figure_callback
void copy_figure_callback(const std::string &format)
Definition:
Figure.cc:820
QtHandles::Figure::UpdateBoundingBoxAll
Definition:
Figure.h:90
QtHandles::Container
Definition:
Container.h:39
QtHandles::Figure::helpAboutQtHandles
void helpAboutQtHandles(void)
Definition:
Figure.cc:756
QtHandles::Figure::fileSaveFigureAs
void fileSaveFigureAs(void)
Definition:
Figure.cc:840
QtHandles::Figure
Definition:
Figure.h:59
QtHandles::Figure::createFigureToolBarAndMenuBar
void createFigureToolBarAndMenuBar(void)
Definition:
Figure.cc:284
QtHandles::Figure::m_mouseModeGroup
MouseModeActionGroup * m_mouseModeGroup
Definition:
Figure.h:137
QtHandles::Figure::eventNotifyAfter
void eventNotifyAfter(QObject *watched, QEvent *event)
Definition:
Figure.cc:691
QtHandles::Figure::~Figure
~Figure(void)
Definition:
Figure.cc:182
QtHandles::Figure::m_menuBar
MenuBar * m_menuBar
Definition:
Figure.h:134
QtHandles::Figure::toggleGrid
void toggleGrid(void)
Definition:
Figure.cc:941
QtHandles::Figure::eventNotifyBefore
bool eventNotifyBefore(QObject *watched, QEvent *event)
Definition:
Figure.cc:646
QtHandles::SelectMode
Definition:
Figure.h:49
QtHandles::ZoomInMode
Definition:
Figure.h:45
QtHandles::MenuContainer
Definition:
MenuContainer.h:31
QtHandles::Figure::innerContainer
Container * innerContainer(void)
Definition:
Figure.cc:348
QtHandles::Figure::autoAxes
void autoAxes(void)
Definition:
Figure.cc:950
QMainWindow
QtHandles::Figure::m_innerRect
QRect m_innerRect
Definition:
Figure.h:135
QtHandles::Figure::toggleAxes
void toggleAxes(void)
Definition:
Figure.cc:932
QtHandles::Figure::m_blockUpdates
bool m_blockUpdates
Definition:
Figure.h:132
QtHandles::Figure::m_figureToolBar
QToolBar * m_figureToolBar
Definition:
Figure.h:133
Object.h
QtHandles::Figure::UpdateBoundingBoxSize
Definition:
Figure.h:89
QtHandles::Figure::print
void print(const QString &file_cmd, const QString &term)
Definition:
Figure.cc:377
QtHandles::MouseModeActionGroup
Definition:
MouseModeActionGroup.h:36
QtHandles::Figure::mouseMode
MouseMode mouseMode(void)
Definition:
Figure.cc:263
QtHandles::Figure::create
static Figure * create(const graphics_object &go)
Definition:
Figure.cc:121
QtHandles::PanMode
Definition:
Figure.h:47
QtHandles::FigureWindow
Definition:
FigureWindow.h:35
graphics_object
Definition:
graphics.h:3230
QtHandles::Figure::updateFigureToolBarAndMenuBar
void updateFigureToolBarAndMenuBar(void)
Definition:
Figure.cc:337
QtHandles::Figure::redraw
void redraw(void)
Definition:
Figure.cc:354
QtHandles::Figure::updateBoundingBox
void updateBoundingBox(bool internal=false, int flags=0)
Definition:
Figure.cc:587
QtHandles::Figure::save_figure_callback
void save_figure_callback(const std::string &file)
Definition:
Figure.cc:814
QtHandles::GenericEventNotifyReceiver
Definition:
GenericEventNotify.h:57
QtHandles::Figure::setFileName
void setFileName(const QString &name)
Definition:
Figure.cc:253
QtHandles::ToolBar
Definition:
ToolBar.h:36
Generated on Thu Jun 4 2015 23:30:10 for GNU Octave by
1.8.8