23 #if defined (HAVE_CONFIG_H)
28 #include <QActionEvent>
29 #include <QApplication>
32 #include <QMainWindow>
53 pix.fill (Qt::transparent);
58 QAction*
a = bar->addAction (_empty,
"Empty Toolbar");
60 a->setEnabled (
false);
76 return new ToolBar (go,
new QToolBar (parentWidget));
83 :
Object (go, bar), m_empty (0), m_figure (0)
87 bar->setFloatable (
false);
88 bar->setMovable (
false);
99 bar->installEventFilter (
this);
109 QToolBar* bar = qWidget<QToolBar> ();
129 switch (xevent->type ())
131 case QEvent::ActionAdded:
132 case QEvent::ActionRemoved:
134 QActionEvent* ae =
dynamic_cast<QActionEvent*
> (xevent);
135 QToolBar* bar = qWidget<QToolBar> ();
139 if (xevent->type () == QEvent::ActionAdded)
141 if (bar->actions ().size () == 2)
142 QTimer::singleShot (0,
this, SLOT (
hideEmpty (
void)));
146 if (bar->actions ().size () == 1)
172 QToolBar* bar = qWidget<QToolBar> ();
bool is_visible(void) const
static Object * parentObject(const graphics_object &go)
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
static QAction * addEmptyAction(QToolBar *bar)
static Object * fromQObject(QObject *obj)
virtual QObject * qObject(void)
virtual void update(int pId)