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
PushTool.cc
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
#ifdef HAVE_CONFIG_H
24
#include <config.h>
25
#endif
26
27
#include "
PushTool.h
"
28
29
#include "
ToolBarButton.cc
"
30
31
namespace
QtHandles
32
{
33
34
PushTool*
35
PushTool::create
(
const
graphics_object
& go)
36
{
37
Object
* parent =
Object::parentObject
(go);
38
39
if
(parent)
40
{
41
QWidget
* parentWidget = parent->
qWidget
<
QWidget
> ();
42
43
if
(parentWidget)
44
return
new
PushTool
(go,
new
QAction (parentWidget));
45
}
46
47
return
0;
48
}
49
50
PushTool::PushTool
(
const
graphics_object
& go, QAction* action)
51
:
ToolBarButton
<
uipushtool
> (go, action)
52
{
53
connect (action, SIGNAL (triggered (
bool
)),
this
, SLOT (
clicked
(
void
)));
54
}
55
56
PushTool::~PushTool
(
void
)
57
{
58
}
59
60
void
61
PushTool::update
(
int
pId)
62
{
63
switch
(pId)
64
{
65
default
:
66
ToolBarButton<uipushtool>::update
(pId);
67
break
;
68
}
69
}
70
71
void
72
PushTool::clicked
(
void
)
73
{
74
gh_manager::post_callback
(
m_handle
,
"clickedcallback"
);
75
}
76
77
};
gh_manager::post_callback
static void post_callback(const graphics_handle &h, const std::string &name, const octave_value &data=Matrix())
Definition:
graphics.h:13329
QtHandles::Object
Definition:
Object.h:40
QWidget
QtHandles::PushTool::clicked
void clicked(void)
Definition:
PushTool.cc:72
QtHandles::Object::parentObject
static Object * parentObject(const graphics_object &go)
Definition:
Object.cc:170
QtHandles::ToolBarButton
Definition:
ToolBarButton.h:36
ToolBarButton.cc
QtHandles::PushTool::~PushTool
~PushTool(void)
Definition:
PushTool.cc:56
PushTool.h
QtHandles
Definition:
__init_qt__.cc:41
QtHandles::Object::m_handle
graphics_handle m_handle
Definition:
Object.h:100
QtHandles::Object::qWidget
T * qWidget(void)
Definition:
Object.h:74
QtHandles::ToolBarButton::update
void update(int pId)
Definition:
ToolBarButton.cc:68
QtHandles::PushTool::create
static PushTool * create(const graphics_object &go)
Definition:
PushTool.cc:35
QtHandles::PushTool::update
void update(int pId)
Definition:
PushTool.cc:61
graphics_object
Definition:
graphics.h:3230
uipushtool
Definition:
graphics.h:12624
QtHandles::PushTool::PushTool
PushTool(const graphics_object &go, QAction *action)
Definition:
PushTool.cc:50
Generated on Thu Jun 4 2015 23:30:10 for GNU Octave by
1.8.8