OpenMS GUI
TOPPView, TOPPAS, INIFileEditor and the OpenMS_GUI library
Loading...
Searching...
No Matches
Developing the GUI layer

Building

OpenMS-TOPP-GUI is built against an installed OpenMS (or the OpenMS SDK) of the same version and Qt 6:

cmake -S OpenMS-TOPP-GUI -B build -DCMAKE_PREFIX_PATH="<OpenMS prefix>;<Qt prefix>"
cmake --build build
ctest --test-dir build
Definition Annotation1DCaret.h:23

The repository's README.md lists all options.

Using the widgets in your own application

Link the target OpenMS::OpenMS_GUI of the CMake package OpenMSGUI (or ask for find_package(OpenMS COMPONENTS GUI), which finds it when the GUI layer is installed into the OpenMS prefix). The examples:

They are built by the target Tutorials_build (with -DENABLE_TUTORIALS=ON).

How to add a new GUI test for a class

Suppose you want to create a GUI class for the class called MyClass. To add a new GUI test:

  1. Create the MyClass_test.cpp in src/tests/class_tests/openms_gui/source.
  2. Add it to src/tests/class_tests/openms_gui/CMakeLists.txt in the GUI section.
  3. Have a look at existing GUI tests, as they use the QT TestLib framework and not the OpenMS macros.

Without a display, run the tests with QT_QPA_PLATFORM=offscreen.