1620 Commits

Author SHA1 Message Date
Alexandre Quessy a560bbe057 Add embedded MCP server exposing MapMap control over local HTTP (#612)
* Add embedded MCP server exposing MapMap control over local HTTP

Adds a native Model Context Protocol server (QHttpServer, JSON-RPC 2.0)
running on the GUI thread, exposing sources, layers, playback, project
I/O and state read-back to MCP clients at http://localhost:<port>/mcp.

The port is configurable via QSettings (mcpListeningPort, default 49452)
and a new -m/--mcp-port CLI flag; 0 disables the server. Requires the
QtHttpServer module (and its QtWebSockets dependency).

Add port preference UI

Adapt McpServer to Paint->Source and Mapping->Layer renames. Fix
QHttpServer::listen() removal in Qt 6.11 by using QTcpServer::listen()
with QHttpServer::bind(). Add MCP port spinbox to Preferences Controls
tab (0 disables the server).

* Make MCP server build optional when qthttpserver is unavailable

Use qtHaveModule(httpserver) to conditionally enable MCP support,
guarded by HAVE_MCP preprocessor define throughout the codebase.
This fixes CI builds on platforms without the Qt HttpServer module.

* Add create_layer tool to MCP server for triangle, quad and ellipse shapes

Move addMesh/addTriangle/addEllipse from private to public slots in
MainWindow so the MCP server can call them directly.

* Add Claude Code skill for controlling MapMap via MCP

* Add set_vertices MCP tool and update skill doc

Allows setting the output shape vertices of a layer via MCP.
Documents vertex ordering and the new tool in the skill file.

* Guard mcpListeningPort write in writeSettings with HAVE_MCP

The member variable is only declared under #ifdef HAVE_MCP,
so writing it in writeSettings also needs the guard to fix
the build when qthttpserver is unavailable.
2026-05-26 01:21:07 -04:00
Alexandre Quessy c9a0008ad4 Fix crash-prone weak pointers, atomic save, and misc cleanup
- Guard all toStrongRef() calls with null checks to prevent crashes
- Save project files atomically (write to .tmp, then rename)
- Fix macOS CI workflow typo that broke test discovery
- Remove duplicate main.qrc entry in mapmap.pro
- Upgrade C++ standard from c++11 to c++17
- Replace NULL with nullptr throughout our code
- Remove stale FIXME comment and duplicate #include
2026-05-24 10:47:15 -04:00
Alexandre Quessy 2372126309 Gate OSC debug logging behind --verbose flag
OSC message logging on every received message was slowing things down.
Now only printed when running with -V/--verbose. Off by default.
2026-05-23 21:39:35 -04:00
Alexandre Quessy bb5708b610 Add a check step to the GitHub actions 2026-05-23 16:18:55 -04:00
Alexandre Quessy 7b5ebdbb10 Add real unit tests for core math, util, UID, and shape logic
Replace the placeholder TestMaths (which only exercised Qt's
QString::toUpper) with unit tests that cover production code:

- TestMaths: degree/radian conversion, wrapAround, distance helpers, xOr
- TestUtil: map_float/map_int range mapping and clipping, isNumeric,
  fileExists/eraseFile
- TestUidAllocator: sequential allocation, lowest-id reuse, reserve, free
- TestShape: vertex accessors, getCenter, includesPoint, translate,
  applyTransform, polygon round-trip

The test project compiles the real MapMap sources under test and runs
all suites from a single binary via a custom QtTest runner.

Util.cpp uses glTexCoord2f and glVertex2f, which require -lopengl32
on Windows. The main project already links this via src.pri, but the
test project manages its own linkage independently.
2026-05-23 16:18:55 -04:00
Alexandre Quessy 78d401d0aa Mention Art Plus Code and Perte de signal
Fix a typo
2026-05-23 15:33:19 -04:00
Alexandre Quessy 68f44a6909 Fix all build warnings in our code
Replace deprecated Qt 5 APIs with Qt 6 equivalents:
- QVariant::Type enum with QMetaType::Type (Int, Double, QColor, QPointF, QSize)
- QVariant::type() with typeId()
- Q_OS_OSX with Q_OS_MACOS
- QMouseEvent::globalPos() with globalPosition().toPoint()

Silence OpenGL deprecation warnings on macOS with GL_SILENCE_DEPRECATION.
Remove QT_DISABLE_DEPRECATED_BEFORE=0 from qtpropertybrowser build config.
Fix unused variables and parameters, suppress nodiscard warnings.

We cannot replace QImage::mirrored() with flipped(), though:
for Qt < 6.8 compatibility
QImage::flipped() requires Qt 6.8+. Use mirrored() with warning
suppression macros to maintain compatibility with older Qt 6 versions.
2026-05-23 15:21:19 -04:00
Alexandre Quessy b687db3dbb Rename Paint to Source and Mapping to Layer throughout codebase
Aligns C++ class names with the terminology already used in the GUI,
project file format, and OSC interface. MappingManager class keeps
its name. Old project files with TextureMapping/ColorMapping class
names are supported via MetaObjectRegistry aliases. OSC paths change
from /paint/ and /mapping/ to /source/ and /layer/.
2026-05-23 15:21:19 -04:00
Alexandre Quessy 367b0f5575 Move prototypes to separate repository
Prototypes moved to prototypes-mapmap repo to reduce main repo size.
2026-05-23 15:21:19 -04:00
Alexandre Quessy 973fcd9c4b Change settings domain to artpluscode.com and separate website URL
Settings domain changed from mapmap.info to artpluscode.com for
QSettings and macOS bundle identifier. Website URL split into its
own constant pointing to mapmapteam.github.io. Contact email
updated to mapmap@artpluscode.com.
2026-05-23 15:21:19 -04:00
Alexandre Quessy 7ee9e828a0 Merge HACKING into CONTRIBUTING.md
Consolidate developer documentation into a single file. Also fixes
a broken issue tracker link and a typo in the feature requests section.
2026-05-23 15:21:19 -04:00
Alexandre Quessy 03a512a366 Add Art Plus Code sponsor logo to splash screen and About dialog
The logo is part of splash.png directly.
2026-05-23 15:21:19 -04:00
Alexandre Quessy 95f14204b0 Update author listings to reflect new lead developer
Alexandre Quessy is now listed first as lead developer across all
contributor files. Sofian Audry role updated to original lead
developer to honor their founding contribution.
2026-05-23 15:21:19 -04:00
Alexandre Quessy 42fb1e247f Remove stale Travis CI and Appveyor configuration
The project uses GitHub Actions for CI. Remove the unused .travis.yml
and appveyor.yml files, and clean up the README badges.
2026-05-22 00:11:44 -04:00
Alexandre Quessy 67e9216422 Fix video looping by using QMediaPlayer::setLoops()
The manual end-of-stream restart via the _eos flag and update() cycle
was unreliable. Use Qt 6 native infinite looping instead.
2026-05-22 00:11:44 -04:00
Alexandre Quessy 9347f24516 Fix crash in MappingListModel::clear() on empty list
The previous implementation used end()-1 on a potentially empty QList,
causing an invalid iterator and a Qt assertion failure. The iterator
was also invalidated after each erase() call, making the loop UB.

Replace with the standard Qt model reset pattern.
2026-05-22 00:11:44 -04:00
Alexandre Quessy aff0e70af6 Switch project file format from XML to JSON
Replace QDomDocument-based XML serialization with Qt built-in
QJsonDocument/QJsonObject/QJsonArray. Project files (.mmp) are now
saved as human-readable JSON.

File format renames for clarity:
- paints -> sources
- mappings -> layers
- paintId -> sourceId

Remove QT += xml dependency (JSON classes are in QtCore).
2026-05-22 00:11:44 -04:00
Alexandre Quessy 5d8f06ffdd Remove stale liblo references
OSC support now uses the bundled oscpack library, not liblo. Remove
all leftover liblo references from source, CI configs, and docs.

Also fixes a memory leak: osc_timer deletion was guarded by
HAVE_OSC which was never defined.
2026-05-22 00:11:44 -04:00
Alexandre Quessy cd15718757 Fix Windows linker errors for OscReceiver and OscSender
QOSC_LIBRARY is never defined since qosc is compiled directly into the
app, so QOSC_EXPORT was expanding to Q_DECL_IMPORT (__declspec(dllimport)
on Windows), causing undefined __imp_ symbol references at link time.
2026-05-22 00:11:44 -04:00
Alexandre Quessy b12250e3c1 Fix ubuntu and windows GitHub actions 2026-05-22 00:11:44 -04:00
Alexandre Quessy d73552c542 Add missing <QCoreApplication> include for Q_DECLARE_TR_FUNCTIONS 2026-05-22 00:11:44 -04:00
Alexandre Quessy 9d060ebf05 Add macOS and Windows CI workflows, remove old disabled ones
Delete the three old qt-*.yml workflows (disabled, Qt 5.12) and
replace with new macos-build.yml and windows-build.yml using Qt 6.
All three platforms now build on push/PR to dev and master branches.
2026-05-22 00:11:44 -04:00
Alexandre Quessy 338c3aa370 Update GitHub Actions runner to Ubuntu 26.04 2026-05-22 00:11:44 -04:00
Alexandre Quessy fa06eec268 Update Travis CI and AppVeyor configs for Qt 6
Remove GStreamer dependencies and update to Qt 6 packages.
Travis: Ubuntu Noble, Xcode 15.4.
AppVeyor: Qt 6.8, simplified build.
2026-05-22 00:11:44 -04:00
Alexandre Quessy 7d0881efa4 Remove all GStreamer references from docs, comments, and CI
Delete obsolete GStreamer video backend source files
(VideoUriDecodeBinImpl, VideoV4l2SrcImpl, VideoShmSrcImpl),
the GStreamer macOS URL resource, and clean up all remaining
GStreamer mentions in INSTALL.md, README.md, TODO, CI workflows,
build scripts, and source comments. CHANGELOG entries are preserved
as historical record.
2026-05-22 00:11:44 -04:00
Alexandre Quessy 700d08ad58 Remove GStreamer dependency and port to Qt 6
Replace the GStreamer media backend with Qt 6 Multimedia (QMediaPlayer,
QVideoSink, QAudioOutput, QCamera, QMediaCaptureSession). This removes
a heavy native dependency and brings the codebase onto a supported Qt
version.

Key changes:
- New VideoPlayerImpl class using QMediaPlayer/QVideoSink for file playback
- Rewrite CameraSurface (QVideoSink) and CameraImpl (QMediaCaptureSession)
- Drop VideoShmSrcImpl, VideoUriDecodeBinImpl, VideoV4l2SrcImpl
- QGLWidget → QOpenGLWidget, QDesktopWidget → QScreen
- QRegExp → QRegularExpression throughout (including qtpropertybrowser)
- Fix all Qt 5→6 API breakages (endl, toAscii, qCopy, QMutexLocker
  template, enterEvent, QWeakPointer::data, QVariant helpers, etc.)
- Update build scripts for Qt 6 on macOS
2026-05-22 00:11:44 -04:00
yoavv2 94ca264e11 Fix macOS build: remove WebEngine dependency and use pkg-config GStreamer
Co-Authored-By: Oz <oz-agent@warp.dev>
2026-05-01 11:39:44 -04:00
Alexandre Quessy ed57b7039d Update GitHub Sponsors usernames in FUNDING.yml 2026-01-09 16:47:00 -05:00
Alexandre Quessy 21304c3e2a Update GitHub Sponsors username in FUNDING.yml 2026-01-09 16:40:16 -05:00
Alexandre Quessy d1e063449e Update README, CONTRIBUTING and CI for Linux
Add a new CI file for Ubuntu

Disable the old github workflows

Fix the Ubuntu build
2026-01-09 16:06:02 -05:00
Sofian Audry dde2acf4eb Warning message wrt MapMap not maintained anymore. 2022-10-06 12:24:34 -04:00
Michaël Creusy 2099ce0663 Update fileedit.cpp
In gtk linux desktop this QFileDialog wasn't fixed
2021-09-05 12:32:10 +00:00
Desone Burns II 801b00918b Fix build on GCC 10 2021-09-05 12:31:34 +00:00
Peter Urban eeb07756d3 Install message handler after instanciating MainApplication
Fix #514 
related to QT bug https://bugreports.qt.io/browse/QTBUG-27024 : "Crash if QGuiApplication::font() is used without instancing QGuiApplication first"
2021-09-05 12:30:44 +00:00
Alexandre Quessy fac1cbd6e7 Update README with Github Action badges 2020-05-16 06:40:46 -04:00
Alexandre Quessy 0571a1dc71 fix branch name in github workflows 2020-05-16 06:36:23 -04:00
Alexandre Quessy 089c7f9133 Create qt-windows.yml 2020-05-16 06:33:58 -04:00
Alexandre Quessy 6dce0f4072 Create qt-linux.yml 2020-05-16 06:33:09 -04:00
Alexandre Quessy c01a7668a4 Create qt-macos.yml 2020-05-16 06:32:11 -04:00
Antonio 057c9ba1f1 Fix spelling and trailing white spaces (#502)
Change "fot" to "for" and removed trailing white space in Ubuntu dependency list
2020-04-29 09:18:29 -04:00
Bay Dam 774022b336 Update INSTALL.md 2020-04-16 12:12:33 +00:00
baydam 8ab1780501 Improve loading speed of the keyboard shortcut 2020-04-15 20:37:45 +00:00
baydam 280f3c5cf7 Update Windows 10 build instructions 2020-04-15 18:18:41 +00:00
Sofian Audry f77c52aee6 Reorganized order of action items and added new operation items to edit menu. 2020-04-15 12:37:48 -04:00
Sofian Audry 4e0e84f597 Cleanup. 2020-04-15 12:25:28 -04:00
Bay Dam 3c665be8e7 Update appveyor.yml 2020-04-15 14:10:27 +00:00
Bay Dam 23887dc0e5 Update appveyor.yml 2020-04-15 14:09:30 +00:00
Bay Dam 2e57df54b3 Update appveyor.yml 2020-04-15 14:01:48 +00:00
Bay Dam 5cf9ea6983 Update appveyor.yml 2020-04-15 14:00:57 +00:00
Bay Dam 0fe4f2b33f Update .travis.yml 2020-04-15 13:48:35 +00:00