Skip to content
Snippets Groups Projects
  1. Mar 27, 2025
  2. Mar 26, 2025
  3. Mar 25, 2025
  4. Mar 24, 2025
  5. Mar 22, 2025
  6. Mar 20, 2025
  7. Mar 17, 2025
  8. Mar 13, 2025
    • Marc SCHWEITZER's avatar
      enh(ui): add frameless window mode in frame · b7b72fca
      Marc SCHWEITZER authored and Marc SCHWEITZER's avatar Marc SCHWEITZER committed
      * add new qss class to round background as toolbar
      b7b72fca
    • Didier WECKMANN's avatar
      fix(ui): ensure the application and GUI test is correctly closed · e6984faa
      Didier WECKMANN authored
      This _should_ stabilize GUI tests a bit. This roughly fixes a kind of race condition in the GUI test start and stop code.
      
      When test instructions are posted in the GUI thread (because we must do that to manipulate GUI stuff), mutexes are used to allow the test thread to wait until the current test instruction is processed on the GUI thread event loop. This mechanism works well, ...until the last window is closed, which exit the application. In that case, the GUI event loop is stopped straight, which is not problematic most of the time in a real application, but unfortunately in a GUI test, if something that should have been processed is still in the event loop, like the synchronization mutex unlock, the calling thread will simply expire, making the test fail.
      
      This MR try to work around that, we try to avoid closing the window in the GUI event loop, we try to close _ALL_ window, including modal dialogs, and we try to flush the GUI event loop before exiting the test thread.
      e6984faa
  9. Mar 11, 2025
    • Flavien BRIDAULT's avatar
      enh(core): add a toggle state in module::ui::qt::signal_shortcut · 59ec7f53
      Flavien BRIDAULT authored
      `sight::module::ui::qt::signal_shortcut` provides a signal that can be connected in XML, triggered by a keyboard shortcut.
      
      We added an optional toggle state, offering a similar signal/slots interface as a `sight::module::ui::action`:
       - is_checked(bool): Emitted when the state is checked or unchecked.
       - checked(): Emitted when the state is checked.
       - unchecked(): Emitted when the state is unchecked..
       - set_checked(bool): sets whether the state is checked.
       - check(): check the state.
       - uncheck(): uncheck the state.
      
      On top of that, three other improvements were made:
      - a comma or semi-colon-separated list of shortcuts can be given
      - the `QShortcut` are now only created when the state is enabled, which allows to have multiple services running at the same time on the same shortcut, but of course, only one can be enabled at once, and it will be up to the developer to ensure that
      - the unit test has been really implemented, testing previous and new features
      59ec7f53
    • Flavien BRIDAULT's avatar
      83f6e2c5
  10. Mar 10, 2025
  11. Mar 05, 2025
    • Flavien BRIDAULT's avatar
      feat(core): add a new service to reset any data · 174731b7
      Flavien BRIDAULT authored
      So far, we have had no service to reset any data object to the default. We used a `sight::data::module::copy` service with a default "empty" object to achieve that.
      
      The new service `sight::data::module::reset` does this in a simpler way, because empty objects in XML are thus no longer necessary.
      
      ```xml
      <service uid="..." type="sight::module::data::reset" >
          <inout key="target" uid="..." />
      </service>
      ```
      174731b7
  12. Mar 04, 2025
  13. Mar 02, 2025
  14. Feb 27, 2025
    • Flavien BRIDAULT's avatar
      refactor(core): sight::app::config_controller rework · b01cd329
      Flavien BRIDAULT authored
      `sight::app::multi_config_controller` has been very useful, but having another service to launch configuration is not great.
      
      Actually `sight::app::multi_config_controller`, comparing to `sight::app::config_controller` only allowed:
      
      1. to dynamically change the name of the configuration
      2. to associate a key to a configuration name
      
      To get rid of `sight::app::multi_config_controller`, we first modify `sight::app::config_controller` to allow to set dynamically the configuration thanks to a property:
      
      ```xml
      <service type="sight::app::config_controller" >
          <properties config="..." />
          <inout group="data">
              <key name="object1" uid="..." />
              <key name="object2" uid="..." />
              ...
          </inout>
          <parameter replace="..." by="..." />
      </service>
      ```
      
      Second, to associate a key to a configuration name, we introduced a new generic service that associates an input property with another. It allows mapping any string_serializable data to another string_serializable data, like of course key strings to key string values, but also colours to strings, booleans to strings, etc...
      
      ```xml
      <service uid="..." type="sight::module::data::translate" >
          <map>
              <entry key="green" value="#00FF00" />
              <entry key="red" value="#FF0000" />
          </map>
          <in key="key" uid="..." />
          <inout key="value" uid="..." />
      </service>
      ```
      
      To sum up, instead of writing:
      
      ```xml
      <service type="sight::app::multi_config_controller" >
          <appConfig key="..." default="config1">
              <config name="config1" id="sight::config::config1" />
              <config name="config2" id="sight::config::config2" />
              <config name="config3" id="sight::config::config3" />
              <parameter replace="model" by="model_key"  />
          </appConfig>
          <inout group="data">
              <key name="object1" uid="..." />
              <key name="object2" uid="..." />
              ...
          </inout>
          <parameter replace="channel" by="..."  />
      </service>
      ```
      You have to write now:
      
      ```xml
      <object uid="selected_config" type="sight::data::string" />
      <object uid="selected_config_key" type="sight::data::string" />
      
      <service uid="..." type="sight::module::data::translate" >
          <map>
              <entry key="config1" value="sight::config::config1" />
              <entry key="config2" value="sight::config::config2" />
              <entry key="config3" value="sight::config::config3" />
          </map>
          <in key="key" uid="selected_config_key" />
          <inout key="value" uid="selected_config" />
      </service>
      
      <service type="sight::app::config_controller" >
          <properties config="selected_config_key" />
          <inout group="data">
              <key name="object1" uid="..." />
              <key name="object2" uid="..." />
              ...
          </inout>
          <parameter replace="..." by="..." />
      </service>
      ```
      
      misc: apply review suggestion
      b01cd329
  15. Feb 26, 2025
  16. Feb 20, 2025
  17. Feb 19, 2025
Loading