Skip to content

Commit

Permalink
Add Navigating the Source section
Browse files Browse the repository at this point in the history
  • Loading branch information
DonLakeFlyer committed May 6, 2024
1 parent 2961273 commit e26c77e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/en/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@
- [Getting Started with source & builds](qgc-dev-guide/getting_started/index.md)
- [Build using Containers](qgc-dev-guide/getting_started/container.md)
- [Using QGC on CentOS](qgc-dev-guide/getting_started/cent_os.md)
- [Navigating the Source Code](qgc-dev-guide/navigating_source.md)
- [Class Hierarchy](qgc-dev-guide/classes/index.md)
- [QGC Release/Branching Process](qgc-dev-guide/release_branching_process.md)
- [Communication Flow](qgc-dev-guide/communication_flow.md)
- [Plugin Architecture](qgc-dev-guide/firmware_plugin.md)
- [Class Hierarchy](qgc-dev-guide/classes/index.md)
- [User Interface Design](qgc-dev-guide/user_interface_design/index.md)
- [Multi-Device Design Pattern](qgc-dev-guide/user_interface_design/multi_device_pattern.md)
- [Font and Colour Palette](qgc-dev-guide/user_interface_design/font_palette.md)
Expand Down
20 changes: 20 additions & 0 deletions docs/en/qgc-dev-guide/navigating_source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Navigating QGC Source Code

QGC is a large code base. With that it can be daunting to find what your are looking for in the source. Below are listed some tips to help you find what you are looking for.

## Start from the top of the UI

The top level window Qml UI code is found in `MainRootWindow.qml`. You can start here and work your way down through the UI hierarchy till you find what you are looking for.

In this qml file you'll find things like:

* How the toolbar is created
* How the top level views are created: Fly, Plan, ...

## Global Search

The best way to find something is to find the UI which is closest to what you are looking for by doing text searches.

### Example: Find the source for the GPS drop down in the toolbar

In the dropdown you see the words "Vehicle GPS Status". Do a global search for those words. Make sure you are doing a case sensitive search. Also make sure you are matching whole words. It can also be helpful to exclude the `*.ts` translation files. Since they can lead to multiple results. If you do the search described here it will take you right to `GPSIndicatorPage.qml`. Some times a search may lead to many results in both qml and .cpp files. In this case limit the results to `*.qml` files.

0 comments on commit e26c77e

Please sign in to comment.