29 #include <QMouseEvent>
42 QPalette p = w->palette ();
48 p.setColor (QPalette::Base,
50 p.setColor (QPalette::Text,
53 else if (props.
style_is (
"pushbutton")
56 p.setColor (QPalette::Button,
58 p.setColor (QPalette::ButtonText,
63 p.setColor (QPalette::Window,
65 p.setColor (QPalette::WindowText,
73 :
Object (go, w), m_normalizedFont (false), m_keyPressHandlerDefined (false)
96 w->installEventFilter (
this);
164 switch (xevent->type ())
172 (properties<uicontrol> ()));
176 case QEvent::MouseButtonPress:
180 QMouseEvent* m =
dynamic_cast<QMouseEvent*
> (xevent);
185 if (m->button () != Qt::LeftButton
194 "windowbuttondownfcn");
197 if (m->button () == Qt::RightButton)
212 case QEvent::MouseMove:
213 if (qWidget<QWidget> ()->hasMouseTracking ())
217 QMouseEvent* m =
dynamic_cast<QMouseEvent*
> (xevent);
227 case QEvent::KeyPress:
237 keyData.
getfield (
"Character"),
false);
246 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)
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)