corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kelly <>
Subject Re: Progress on Qt app
Date Sat, 11 Apr 2015 17:56:49 GMT
I’ve now pushed this (very bare-bones) version of the app to the repository. Take a look
at it and let me know if you have any questions. I’ve attached the log message for reference
below. Screenshot here:

Because it doesn’t yet build on all platforms, it’s still commented out in the CMakeLists.txt
in the root of the repository. To build, change the following line:

#TEST add_subdirectory(consumers/corinthia/src)



Log message:

Desktop app: Basic infrastructure for Editor lib

This commit sets up the basic architecture for a functional editor implemented as a Qt app.
While it currently does not have the necessary facilities to actually edit documents, it lays
the groundwork by providing a web view injected with the javascript editing library, and a
C++ interface to interact with this library.

See JSInterface.h for information about how the interaction between the two languages works.
Essentially, this file contains a series of classes containing methods which call through
to the corresponding functions in javascript. These methods handle marshalling of arguments
from Qt types to JSON types, and similarly in the other direction for return values.

A callback interface is also provided to allow JS code to cause C++ functions to be invoked
in response to certain events occurring, like the cursor moving (and thus requiring redisplay).

The user interface is very bare-bones and incomplete; it simply contains a web view, loaded
at startup with a sample document, and buttons to invoke various functions in the editor library
like inserting/deleting characters and moving the cursor. These are intended not for actual
usage, but as demonstrations of how to invoke JS methods from Qt even callbacks ("slots").
Functionality to open and save documents is also absent.

Currently this only builds on OS X, but that's an issue with the CMake config files which,
once fixed, should enable building on Linux and Windows as well.

Dr Peter M. Kelly

PGP key: <>
(fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)

> On 8 Apr 2015, at 8:44 pm, Peter Kelly <> wrote:
> Just a heads up to what I’ll be committing soon… I’ve finally found some time to
invest in the basic architecture of the Qt-based desktop app in place, in particular the javascript
bridge which interfaces between C++ and the JS code used by the editing library. Jan has already
got a skeleton project in place which builds on windows, and I now have that building on the
> I still have a few bits and pieces to clean up, primarily ensuring it builds again on
Windows (and also Linux), as well as bundling the JS files and a sample document as part of
the build process. I have a very basic UI with a few buttons which trigger actions like insert
table, insert/delete character, undo/redo etc - primarily to illustrate how to have a UI element
that calls through to the editing library via the JS bridge.
> I’m also going to document this properly, including the functions exposed by the editing
library, to make it easier to understand what it all does. My intention is to try and give
enough info & example code to enable newcomers to the project to have an easy path into
participation. To this end, I’ll also be creating a bunch of issues in Jira which will be
relatively straightforward tasks people can do if they have a working knowledge of C++ and
Qt (and fortunately Qt is quite easy to learn if you already know C++).
> I was hoping to have this in already, but other work is keeping me busy this week. But
it’s coming shortly, and hopefully this will help us get the desktop app moving along, which
I think will make a big difference to the usefulness of the project.
> —
> Dr Peter M. Kelly
> PGP key: <>
> (fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message