23 #if defined (HAVE_CONFIG_H)
29 #include <QMouseEvent>
42 QPalette
p = w->palette ();
47 p.setColor (QPalette::Base,
49 p.setColor (QPalette::Text,
52 else if (props.
style_is (
"popupmenu"))
55 p.setColor (QPalette::Base,
57 p.setColor (QPalette::Text,
59 p.setColor (QPalette::Button,
61 p.setColor (QPalette::ButtonText,
64 else if (props.
style_is (
"radiobutton")
67 p.setColor (QPalette::Button,
69 p.setColor (QPalette::WindowText,
72 else if (props.
style_is (
"pushbutton")
75 p.setColor (QPalette::Button,
77 p.setColor (QPalette::ButtonText,
82 p.setColor (QPalette::Window,
84 p.setColor (QPalette::WindowText,
115 w->installEventFilter (
this);
182 switch (xevent->type ())
190 (properties<uicontrol> ()));
194 case QEvent::MouseButtonPress:
198 QMouseEvent*
m =
dynamic_cast<QMouseEvent*
> (xevent);
203 if (m->button () != Qt::LeftButton
212 "windowbuttondownfcn");
215 if (m->button () == Qt::RightButton)
230 case QEvent::MouseMove:
231 if (qWidget<QWidget> ()->hasMouseTracking ())
235 QMouseEvent*
m =
dynamic_cast<QMouseEvent*
> (xevent);
245 case QEvent::KeyPress:
255 keyData.
getfield (
"Character"),
false);
264 return Object::eventFilter (watched, xevent);
static void post_callback(const graphics_handle &h, const std::string &name, const octave_value &data=Matrix())
bool enable_is(const std::string &v) const
bool is_visible(void) const
Matrix get_boundingbox(bool internal=false, const Matrix &parent_pix_size=Matrix()) const
std::string get_tooltipstring(void) const
QString fromStdString(const std::string &s)
bool eventFilter(QObject *watched, QEvent *e)
bool fontunits_is(const std::string &v) const
void init(QWidget *w, bool callBase=false)
Matrix figureCurrentPoint(const graphics_object &fig, QMouseEvent *event)
Matrix get_backgroundcolor_rgb(void) const
template QFont computeFont< uicontrol >(const uicontrol::properties &props, int height)
static void executeAt(const base_properties &props, const QPoint &pt)
QColor fromRgb(const Matrix &rgb)
static void updatePalette(const uicontrol::properties &props, QWidget *w)
nd deftypefn *octave_map m
octave_scalar_map makeKeyEventStruct(QKeyEvent *event)
std::complex< double > w(std::complex< double > z, double relerr=0)
void init(QObject *obj, bool callBase=false)
Matrix get_foregroundcolor_rgb(void) const
graphics_object get_ancestor(const std::string &type) const
octave_value get_keypressfcn(void) const
graphics_object object(void) const
bool is_empty(void) const
std::string figureSelectionType(QMouseEvent *event, bool isDoubleClick)
bool m_keyPressHandlerDefined
BaseControl(const graphics_object &go, QWidget *w)
octave_value getfield(const std::string &key) const
graphics_handle get_handle(void) const
bool style_is(const std::string &v) const
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))
static void post_set(const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit=true)