-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port most code to set up menu items and actions from C++ to Python #442
Conversation
… to Python by using PySide6
@@ -47,43 +47,6 @@ class RAction | |||
QObject * parent = nullptr); | |||
}; /* end class RAction */ | |||
|
|||
class RPythonAction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With action setup code ported to Python, this helper class RPythonAction
is not longer needed.
QString m_pyFuncName; | ||
}; /* end class RPythonAction */ | ||
|
||
class RAppAction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With action setup code ported to Python, this helper class RAppAction
is not longer needed.
@@ -118,92 +118,15 @@ void RManager::setUpMenu() | |||
// "exited with code -1073740791". The reason is not yet clarified. | |||
|
|||
m_fileMenu = m_mainWindow->menuBar()->addMenu(QString("File")); | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the C++ code setting up menu items.
m_viewMenu = m_mainWindow->menuBar()->addMenu(QString("View")); | ||
{ | ||
// Code for controlling camera is not exposed to Python yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Camera control is still in C++. We should expose it to Python later.
void quit() { m_core->quit(); } | ||
|
||
public slots: | ||
QMenu * fileMenu() { return m_fileMenu; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expose menu objects for access from Python.
mw = _vimpl.RManager.instance.mainWindow | ||
mw.clearApplications() | ||
populate_applications() | ||
def populate_menu(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Populate the menu in Python.
Merge for further GUI changes. |
Except the menu for camera control, which needs code that is only available in C++, port the menu and action setup from C++ to Python.