26 #if defined (HAVE_CONFIG_H)
31 #include <QActionEvent>
32 #include <QApplication>
35 #include <QMainWindow>
53 pix.fill (Qt::transparent);
63 QAction *a = bar->addAction (empty_icon,
"Empty Toolbar");
65 a->setEnabled (
false);
73 const graphics_object& go)
82 return new ToolBar (oct_qobj, interp, go,
83 new QToolBar (parentWidget));
90 const graphics_object& go, QToolBar *bar)
91 :
Object (oct_qobj, interp, go, bar), m_empty (nullptr), m_figure (nullptr)
95 bar->setFloatable (
false);
96 bar->setMovable (
false);
97 bar->setVisible (tp.is_visible ());
107 tp.get_tag () ==
"__default_toolbar__");
109 bar->installEventFilter (
this);
119 QToolBar *bar = qWidget<QToolBar> ();
123 case base_properties::ID_VISIBLE:
139 switch (xevent->type ())
141 case QEvent::ActionAdded:
142 case QEvent::ActionRemoved:
144 QActionEvent *ae =
dynamic_cast<QActionEvent *
> (xevent);
145 QToolBar *bar = qWidget<QToolBar> ();
149 if (xevent->type () == QEvent::ActionAdded)
151 if (bar->actions ().size () == 2)
156 if (bar->actions ().size () == 1)
182 QToolBar *bar = qWidget<QToolBar> ();
static Object * parentObject(octave::interpreter &interp, const graphics_object &go)
static Object * fromQObject(QObject *obj)
virtual QObject * qObject(void)
virtual void update(int pId)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
const QString global_toolbar_style("QToolBar {" "margin-top: 0px;" "margin-bottom: 0px;" "padding-top: 0px;" "padding-bottom: 0px;" "border-top: 0px;" "border-bottom: 0px;" "}")
T::properties & properties(graphics_object obj)