Skip to content
ispyisail edited this page Sep 9, 2026 · 2 revisions

Contributing to QElectroTech

Thank you for your interest in contributing to QElectroTech! This guide explains how to get involved, from reporting bugs to writing code.

Quick links:

Ways to Contribute

Report Bugs

Found a problem? Help us fix it:

  1. Search existing issues to avoid duplicates
  2. Create an issue with:
    • Clear description of the problem
    • Steps to reproduce
    • Expected vs. actual behavior
    • Your QET version and OS
    • Screenshots if helpful

Suggest Features

Have an idea? Share it:

  1. Search discussions to see if it's been discussed
  2. Open a discussion explaining:
    • What you want to do
    • Why it would be useful
    • Any alternative approaches

Write Documentation

Help improve this wiki and other documentation:

  1. See Contributing to the Wiki
  2. Help translate documentation
  3. Create tutorials or guides for common workflows

Create Custom Elements

Share your element libraries with the community:

  1. Learn to create elements
  2. Publish on the Elements Repository
  3. Join the elements maintenance team

Contribute Code

Ready to code? Follow these steps:


Getting Started with Code Contributions

Prerequisites

You'll need:

Programming Skills:

  • C++ β€” QET is written in modern C++ (C++11 and later)
  • Qt Framework β€” Qt 5.x (current stable), Qt 6.x (in active development)
  • Git β€” Version control; essential for collaboration

Tools & Knowledge:

  • Build QET from source β€” Able to compile the project
  • CMake β€” Build system used by QET
  • Understanding of:
    • Qt Framework fundamentals (signals/slots, widgets, models)
    • XML processing (QET uses XML for files)
    • The codebase structure

Recommended:

  • Some familiarity with electrical schematics (helps understand the domain)
  • Experience with open-source contribution workflow

Key Technologies

Component Technology Use
GUI Framework Qt 5.x / Qt 6.x User interface, cross-platform
Language C++ Core application logic
Build System CMake Build configuration and compilation
Testing Catch2, googletest Unit testing framework
Documentation Doxygen API documentation generation
Translations Qt Linguist Internationalization (i18n)
File Formats XML Projects (.qet), elements (.elmt), titleblocks
VCS Git Version control (GitHub)

Setup Your Development Environment

  1. Fork the repository on GitHub:

  2. Clone your fork locally (with submodules):

    git clone --recursive https://github.com/YOUR_USERNAME/qelectrotech-source-mirror.git
    cd qelectrotech-source-mirror
  3. Add upstream remote to track main repository:

    git remote add upstream https://github.com/qelectrotech/qelectrotech-source-mirror.git
  4. Create a feature branch for your work:

    git checkout -b fix/issue-123
    # or
    git checkout -b feature/my-feature
    # Branch naming: fix/*, feature/*, docs/*, refactor/*, etc.
  5. Configure Git user (if not done already):

    git config user.name "Your Name"
    git config user.email "your.email@example.com"
  6. Build from source to ensure environment works:

    mkdir build && cd build
    cmake ..
    cmake --build . --config Release

Making Changes

  1. Understand the issue/feature:

    • Read the GitHub issue thoroughly
    • Post a comment if unclear ("I'd like to work on this")
    • Discuss approach with maintainers for major changes
  2. Write clean, maintainable code:

    • Follow code formatting: Use clang-format (configuration included)
    • One logical change per commit β€” don't mix unrelated fixes
    • Meaningful commit messages β€” explain WHY, not just WHAT
    • Comment sparingly: Only complex logic needs comments
    • Keep functions focused and small
  3. Code style guidelines:

    • Naming: camelCase for variables/functions, PascalCase for classes
    • Formatting: Configured via .clang-format file (run before committing)
    • Qt conventions: Follow Qt/KDE coding standards
    • Modern C++: Use C++11/14/17 features appropriately
  4. Add tests for new functionality:

    • Test framework: Catch2 or googletest
    • Write unit tests that verify your changes
    • Ensure existing tests still pass: ctest
    • Run: cmake --build . && ctest
  5. Build locally & test:

    cd build
    cmake --build . --config Release
    ctest  # Run tests
    ./qelectrotech  # Test the app manually
  6. Keep your branch updated with upstream:

    git fetch upstream
    git rebase upstream/main
    # or merge if you prefer: git merge upstream/main

Submitting Your Contribution

  1. Push your branch to your fork:

    git push origin fix/issue-123
  2. Create a Pull Request (PR) on GitHub:

    • Go to your fork β†’ "Create Pull Request" button
    • Title: Short, descriptive (e.g., "Fix NaN coordinate handling in element loading")
    • Description: Include:
      • What problem does this solve?
      • How does your solution work?
      • Screenshots for UI changes
      • Tests added
      • Related issues: "Fixes #781" or "Closes #782"
    • Base: Set to main branch
    • Draft PR: Mark as Draft if still work-in-progress
  3. Respond to feedback:

    • Maintainers will review your code
    • Address comments and suggestions
    • Push additional commits to same branch (updates PR automatically)
    • Be patient and collaborative
  4. Keep PR updated if main branch changes:

    git fetch upstream
    git rebase upstream/main
    git push --force-with-lease origin fix/issue-123
  5. Celebrate! πŸŽ‰ Once approved and merged, your contribution is part of QET


Code Quality & Standards

Code Formatting

QET uses clang-format for consistent code style:

# Format your files before committing
clang-format -i src/my_file.cpp
# or format all changed files
git diff --name-only | xargs clang-format -i

Documentation

  • Inline comments: Only for non-obvious logic
  • Function documentation: Use Doxygen style for public APIs
  • Commit messages: Clear, descriptive, explain why not just what

Testing

  • Unit tests: Write tests for new functionality
  • Run existing tests: Ensure you don't break anything
  • Test coverage: More tests = better confidence

Commit Message Guidelines

Good commit message structure:

Brief one-line summary (50 chars or less)

Longer explanation of the change. Explain the problem,
your solution, and any trade-offs or considerations.
Keep to 72 character line width.

Fixes #123

Examples:

  • βœ… "Fix NaN coordinate validation on element load"
  • βœ… "Add terminal strip generator feature with tests"
  • βœ… "Refactor QAction management into ActionPool"
  • ❌ "Fixed stuff"
  • ❌ "Work in progress"

Review Process

  1. Automatic checks run (tests, linting)
  2. Maintainers review your code for:
    • Correctness
    • Code quality
    • Compatibility
    • Performance
  3. Address feedback by pushing new commits
  4. Merge once approved βœ…

Code of Conduct

We're committed to providing a welcoming community. Please:

  • Be respectful and constructive
  • Welcome different viewpoints
  • Report inappropriate behavior to maintainers
  • Focus on the code, not the person

Questions?

  • Forum β€” Ask the community
  • Discussions β€” Open-ended questions
  • Maintainers β€” Direct questions about contributions

Thank you for helping make QElectroTech better! πŸŽ‰

Getting Started

Home

🌐 Languages β€” English Β· FranΓ§ais Β· Deutsch

Downloads

Windows without admin rights β€” the portable archive, no installer

Quick Start Guide

User Manual

FAQ

Tips & Tricks

Guides

Conductors β€” wire properties, what feeds which export, cables, and hops where wires cross

Wires per terminal β€” limit the wires on a terminal, chain wiring instead of stars

Printing and exporting β€” paper, PDF, images, and what each path does differently

Linking elements β€” master, slave, terminal

PLC modules β€” I/O tables and linking a wire to a specific point

Using the element editor β€” drawing tools, saving, checks

Grid size and element size β€” why symbols aren't all the same scale, and scaling one without leaving the grid

Preferences reference β€” what each settings page does

Saving and loading settings β€” your whole setup in one file, to copy or keep

Keyboard-only control β€” mouseless QET, and what still needs a mouse

Mouse modifiers β€” what Shift, Ctrl and Alt change while you drag

3D mouse β€” SpaceMouse pan, zoom and buttons

Aligning items β€” snap symbols back to the grid, or line them up

Pictures on a sheet β€” labels, crop, transparency, what they cost in the file

Arcs and curved wires β€” the Arc tool, pulling an arc in or out, rounding a corner with a fillet, dashed arcs for lighting layouts

Grouping items β€” select, move and copy several items as one

Finding your place on a sheet β€” go to a cell like B13 or 4-B7, keep the headers in sight, show the cell limits, zoom and pan

Showing and hiding kinds of items β€” hide texts, wire numbers, shapes, pictures, tables or cross-references on every sheet

Drawing faster β€” place without dragging, the S shortcut bar, command search, gestures

Customising QElectroTech β€” keys, toolbar size and contents, the gesture ring (partly pending)

Managing collections β€” folders, writability, building your own shortlist

Templates β€” reusable multi-element blocks, placed by double-click or drag

Search & Replace β€” bulk property changes

Building a nomenclature query β€” the BOM/summary table builder

Linking wires across pages β€” sheet reports

Variables & formulas β€” %f, %{label}, sequences

Auto-numbering β€” schemes, sequences, freezing

Terminal strips β€” strips, levels, bridges

Title block templates β€” the .titleblock format

Importing EPLAN parts (.edz) β€” EPLAN Data Portal

DXF import & export β€” two unrelated features, one format; command-line export and layers

The project database β€” the in-memory SQLite cache

File formats
Elements XML
Project XML
Development

Building from Source

Contributing Code

Automating QET β€” CLI, XML formats, external tools

CLI Reference β€” command line usage

JavaScript Scripting β€” --run, geometry editing, undo

MCP server β€” let an AI assistant read, verify and edit projects

Connecting an AI assistant β€” setup for Claude, Copilot, Gemini, Codex, Cursor, LM Studio

Script buttons β€” stored scripts with an icon, by hand or by an assistant

Live mode β€” an assistant working in the open project while you watch

Macro recorder β€” record a task by hand, for an assistant to script

Development Roadmap

Vision β€” proposal, under discussion

Developer Tools

About

Features

History

Community

License

Contributing to this Wiki

Clone this wiki locally