23 #if defined (HAVE_CONFIG_H)
28 #include <QMainWindow>
49 if (c >=
'A' && c <=
'Z')
51 if (c >=
'a' && c <=
'z')
53 if (c >=
'A' && c <=
'Z')
54 return QKeySequence (keyMod | static_cast<int> (c));
57 return QKeySequence ();
70 return new Menu (go,
new QAction (qObj), parent_obj);
77 :
Object (go, action), m_parent (0), m_separator (0)
85 action->setCheckable (
true);
117 foreach (QAction*
a,
m_parent->actions ())
118 if (! a->isSeparator () && a->objectName () !=
"builtinMenu")
121 (
octave_value (static_cast<double> (count)),
true,
false);
129 foreach (QAction*
a,
m_parent->actions ())
130 if (! a->isSeparator () && a->objectName () !=
"builtinMenu")
142 m_parent->insertAction (before, action);
148 (
octave_value (static_cast<double> (count+1)),
true,
false);
152 connect (action, SIGNAL (triggered (
bool)), SLOT (
actionTriggered (
void)));
162 QAction* action = qWidget<QAction> ();
173 action->setCheckable (
true);
178 action->setChecked (
false);
179 action->setCheckable (
false);
188 if (! action->menu ())
232 foreach (QAction*
a,
m_parent->actions ())
233 if (! a->isSeparator () && a->objectName () !=
"builtinMenu")
247 m_parent->insertAction (before, action);
262 QAction* action = qWidget<QAction> ();
263 QMenu* _menu = action->menu ();
267 _menu =
new QMenu (action->parentWidget ());
268 action->setMenu (_menu);
269 action->setShortcut (QKeySequence ());
270 connect (_menu, SIGNAL (aboutToShow (
void)),
280 QAction* action = qWidget<QAction> ();
282 if (action->isCheckable ())
283 action->setChecked (! action->isChecked ());
300 foreach (QAction*
a,
m_parent->actions ())
302 if (! a->isSeparator () && a->objectName () !=
"builtinMenu")
312 if (go.
isa (
"uimenu"))
static void post_callback(const graphics_handle &h, const std::string &name, const octave_value &data=Matrix())
bool is_visible(void) const
bool isa(const std::string &go_name) const
QString fromStdString(const std::string &s)
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 Menu * create(const graphics_object &go)
Menu(const graphics_object &go, QAction *action, Object *parent)
bool set(const octave_value &val, bool do_run=true, bool do_notify_toolkit=true)
static Object * fromQObject(QObject *obj)
void updateSiblingPositions(void)
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
virtual QObject * qObject(void)
graphics_object object(void) const
virtual void update(int pId)
void actionTriggered(void)
static QKeySequence accelSequence(const uimenu::properties &up)
virtual QWidget * menu(void)=0
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string