Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/PythonEnvHelper.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
macro(ensure_pybind11_cmake_module_is_in_path)
execute_process(
COMMAND "${Python_EXECUTABLE}" "-m" "pybind11" "--cmake"
COMMAND "${Python_EXECUTABLE}" "-m" "pybind11" "--cmakedir"
RESULT_VARIABLE _PYTHON_SUCCESS
OUTPUT_VARIABLE PYBIND11_CMAKE_MODULES_PATH
)
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy>=2.0
pybind11>=2.13.0
pybind11>=3.0
sphinx>=8.0.0
sphinx-rtd-theme
pytest>=8.0.0
Expand Down
2 changes: 1 addition & 1 deletion requirements-release.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
numpy>=2.0
pybind11>=2.13.0
pybind11>=3.0
2 changes: 1 addition & 1 deletion src/PythonRepl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ void PythonRepl::reset()

void PythonRepl::importNeededPackages()
{
executeCode(replArrows + "import pycc");
executeCode(replArrows + "import cccorelib");
executeCode(replArrows + "import pycc");
executeCode(replArrows + "cc = pycc.GetInstance()");
}

Expand Down
22 changes: 21 additions & 1 deletion src/Runtime/Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,27 @@ void unsetCmdLineInterfaceInstance() noexcept

PYBIND11_EMBEDDED_MODULE(ccinternals, m)
{
py::enum_<Qt::GlobalColor>(m, "GlobalColor");
py::enum_<Qt::GlobalColor>(m, "GlobalColor")
.value("color0", Qt::color0)
.value("color1", Qt::color1)
.value("black", Qt::black)
.value("white", Qt::white)
.value("darkGray", Qt::darkGray)
.value("gray", Qt::gray)
.value("lightGray", Qt::lightGray)
.value("red", Qt::red)
.value("green", Qt::green)
.value("blue", Qt::blue)
.value("cyan", Qt::cyan)
.value("magenta", Qt::magenta)
.value("yellow", Qt::yellow)
.value("darkRed", Qt::darkRed)
.value("darkGreen", Qt::darkGreen)
.value("darkBlue", Qt::darkBlue)
.value("darkCyan", Qt::darkCyan)
.value("darkMagenta", Qt::darkMagenta)
.value("darkYellow", Qt::darkYellow)
.value("transparent", Qt::transparent);

py::class_<QColor>(m, "QColor");

Expand Down
8 changes: 7 additions & 1 deletion src/Runtime/ccCommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ void define_ccCommandLine(py::module &m)

py::class_<ccCommandLineInterface> PyccCommandLineInterface(m, "ccCommandLineInterface");

py::enum_<ccCommandLineInterface::ExportOption>(PyccCommandLineInterface, "ExportOption");
py::enum_<ccCommandLineInterface::ExportOption>(
PyccCommandLineInterface, "ExportOption", py::arithmetic())
.value("NoOptions", ccCommandLineInterface::ExportOption::NoOptions)
.value("ForceCloud", ccCommandLineInterface::ExportOption::ForceCloud)
.value("ForceMesh", ccCommandLineInterface::ExportOption::ForceMesh)
.value("ForceHierarchy", ccCommandLineInterface::ExportOption::ForceHierarchy)
.value("ForceNoTimestamp", ccCommandLineInterface::ExportOption::ForceNoTimestamp);

py::class_<ccCommandLineInterface::GlobalShiftOptions> PyGlobalShiftOptions(
PyccCommandLineInterface, "GlobalShiftOptions");
Expand Down
27 changes: 25 additions & 2 deletions wrapper/pycc/src/pycc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,31 @@ void define_someQtThings(py::module &m)
});

py::class_<QPointF>(m, "QPointF");
// TODO: https://doc.qt.io/qt-5/qt.html#CursorShape-enum
py::enum_<Qt::CursorShape>(m, "QtCursorShape");
py::enum_<Qt::CursorShape>(m, "QtCursorShape")
.value("ArrowCursor", Qt::CursorShape::ArrowCursor)
.value("UpArrowCursor", Qt::CursorShape::UpArrowCursor)
.value("CrossCursor", Qt::CursorShape::CrossCursor)
.value("WaitCursor", Qt::CursorShape::WaitCursor)
.value("IBeamCursor", Qt::CursorShape::IBeamCursor)
.value("SizeVerCursor", Qt::CursorShape::SizeVerCursor)
.value("SizeHorCursor", Qt::CursorShape::SizeHorCursor)
.value("SizeBDiagCursor", Qt::CursorShape::SizeBDiagCursor)
.value("SizeFDiagCursor", Qt::CursorShape::SizeFDiagCursor)
.value("SizeAllCursor", Qt::CursorShape::SizeAllCursor)
.value("BlankCursor", Qt::CursorShape::BlankCursor)
.value("SplitVCursor", Qt::CursorShape::SplitVCursor)
.value("SplitHCursor", Qt::CursorShape::SplitHCursor)
.value("PointingHandCursor", Qt::CursorShape::PointingHandCursor)
.value("ForbiddenCursor", Qt::CursorShape::ForbiddenCursor)
.value("WhatsThisCursor", Qt::CursorShape::WhatsThisCursor)
.value("BusyCursor", Qt::CursorShape::BusyCursor)
.value("OpenHandCursor", Qt::CursorShape::OpenHandCursor)
.value("ClosedHandCursor", Qt::CursorShape::ClosedHandCursor)
.value("DragCopyCursor", Qt::CursorShape::DragCopyCursor)
.value("DragLinkCursor", Qt::CursorShape::DragLinkCursor)
.value("LastCursor", Qt::CursorShape::LastCursor)
.value("BitmapCursor", Qt::CursorShape::BitmapCursor)
.value("CustomCursor", Qt::CursorShape::CustomCursor);
}

void define_pycc(py::module &m)
Expand Down
Loading