Skip to main content

Qt Interface Builder (QFace)

Build Status Weekly Build Status Documentation Status Chat at https://gitter.im/qmlbook/qface

QFace is a generator framework based on a common modern IDL. It is not a generator as such but enforces a common IDL format and provides a library to write your own generator. It is actually very easy to create your own generator and generate your custom solution based on your needs from the same IDL.

The IDL is designed after the Qt/QML interface and as such is optimized to generate source code used with Qt C++ or Qt QML, but it is not limited to this use case.

QFace is already very fast by design and suitable for large IDL document sets. Additionally it can use a cache to avoid parsing unchanged IDL documents. It can automatically avoid writing new files if the target file has the same content.

QFace is written out of the learnings of using IDLs in other large projects. Often in the project you need to adjust the code generation but in many generators this is awfully complicated. Or you need to run a report on the documents or generate specific documentation. In QFace this is enabled by having a very flexible code generation framework which enforces the same IDL.

Please see the INSTALL and USAGE guides for more information.

Documentation

Documentation is hosted at readthedocs.

Install

To install the qface library you need to have python3 and pip installed.

pip3 install qface

Install Development Version

Prerequisites

To install the development version you need to clone the repository and ensure you have checkout the develop branch.

git clone git@github.com:Pelagicore/qface.git
cd qface
git checkout develop

The installation requires the python package manager called (pip) using the python 3 version. You can try:

python3 --version
pip3 --version

Installation

Use the editable option of pip to install an editable version.

cd qface
pip3 install --editable .

This reads the setup.py document and installs the package as reference to this repository. So all changes will be immediatly reflected in the installation.

To update the installation just simple pull from the git repository.

Download

If you are looking for the examples and the builtin generators you need to download the code.

git clone git@github.com:Pelagicore/qface.git

Copyright and license

Copyright (C) 2016 Pelagicore AG

The source code in this repository is subject to the terms of the MIT license, please see included "LICENSE" file for details.

QFace Example

// echo.qface
module org.example 1.0;

/**!
The echo interface to call someone
on the other side
*/
interface Echo {
    readonly Message lastMessage;
    void echo(Message message);
    signal callMe();
};

struct Message {
    string text;
};

Now you write a small script using qface to generate your code

# mygenerator.py
from qface.generator import FileSystem, Generator

# load the interface files
system = FileSystem.parse('echo.qface')
# prepare the generator
generator = Generator(searchpath='.')

# iterate over the domain model
for module in system.modules:
    for interface in module.interfaces:
        # prepare a context object
        ctx = { 'interface': interface }
        # use header.h template with ctx to write to a file
        generator.write('{{interface|lower}}.h', 'header.h', ctx)

Depending on the used generator it reads the input file and runs it through the generator. The output files are written relative to the given output directory. The input can be either a file or a folder.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qface-2.0.14.tar.gz (49.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qface-2.0.14-12-py3-none-any.whl (55.8 kB view details)

Uploaded Python 3

File details

Details for the file qface-2.0.14.tar.gz.

File metadata

  • Download URL: qface-2.0.14.tar.gz
  • Upload date:
  • Size: 49.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for qface-2.0.14.tar.gz
Algorithm Hash digest
SHA256 df31014fbe95b3d910d059ce1a8e827d57d234aca3a5c42094d6ad096fd8f39e
MD5 3c0105302ac4a7945c72e68346102046
BLAKE2b-256 1fb96f09a2319e78861396cdc4f07a5075299699d96fde22453d2bb7354af5a3

See more details on using hashes here.

File details

Details for the file qface-2.0.14-12-py3-none-any.whl.

File metadata

  • Download URL: qface-2.0.14-12-py3-none-any.whl
  • Upload date:
  • Size: 55.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for qface-2.0.14-12-py3-none-any.whl
Algorithm Hash digest
SHA256 34ae4e8c40a1d9bdadf724ef273183e0dcedc42729436d5cac5fc08eae5dc212
MD5 a2552876a98dae667e9b2461e62f77fa
BLAKE2b-256 13f9ba8ca316fd142edab23f8e625b900a81ecf4efc57665d9a05c301e5a103f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.14 This release

2 files

2.0.13

2 files

2.0.12

2 files

2.0.11

2 files

2.0.10

2 files

2.0.9

2 files

2.0.8

2 files

2.0.7

2 files

2.0.6

3 files

2.0.5

2 files

2.0.4

2 files

2.0.0

1 file

1.10

1 file

1.9.1

1 file

1.8.1

1 file

1.8

1 file

1.7

1 file

1.6

1 file

1.5

1 file

1.4

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page