status-desktop/ui/StatusQ
Jonathan Rainville 2aa759adcf refactor(section-model): change model to be sorted to fix reorder
Part of #3364

To make the drag and drop reorder work correctly on channels, we needed to change the model again so that it was sorted in the model itself.
That is because the drag and drop gives us the value of the position it is dropped to as a single list, so dragging the second item of the second category would mean from position 5 to position to position 4, but what the backend wants is moving the item 2 to position 1.
Sorting the model enables us to get the category that is the parent of that position and call the service with the right positions and id.
It also enables us to reorder the channel in and out of the category.
See the module code to see how the calculation is done with an explanatory comment.
The model needed some changes to support that. Some of the function where changed from dataChange calls to resetModel calls, since we need to re-sort the model.
I tried using beginMove, but it would crash. Maybe there is a bug in NimQML or I used it badly, I'm not sure.
2023-04-19 12:26:15 -04:00
..
doc feat(@desktop/wallet): add support for more NFTs media types 2023-04-11 12:40:38 -03:00
include/StatusQ fix(StatusQ): StatusQ is QML module (#10207) 2023-04-14 11:18:56 +03:00
sandbox chore(StatusStickerButton): refactor to use StatusButton 2023-04-18 13:45:38 +02:00
sanity_checker fix(StatusQ): StatusQ is QML module (#10207) 2023-04-14 11:18:56 +03:00
scripts fix(StatusQ/Sandbox): move and update build script 2023-02-20 20:36:05 +01:00
src refactor(section-model): change model to be sorted to fix reorder 2023-04-19 12:26:15 -04:00
tests fix(StatusQ): StatusQ is QML module (#10207) 2023-04-14 11:18:56 +03:00
CHANGELOG.md chore: cut v0.25.0 release 2022-09-21 18:20:07 +02:00
CMakeLists.txt fix(StatusQ): Remove debug postfix (#10337) 2023-04-18 13:35:23 +03:00
README.md fix(StatusQ/Sandbox): move and update build script 2023-02-20 20:36:05 +01:00

README.md

StatusQ

An emerging reusable QML UI component library for Status applications.

Usage

StatusQ introduces a module namespace that semantically groups components so they can be easily imported. These modules are:

Provided components can be viewed and tested in the sandbox application that comes with this repository. Other than that, modules and components can be used as expected.

Example:

import Status.Core 0.1
import Status.Controls 0.1

StatusInput {
  ...
}

Viewing and testing components

To make viewing and testing components easy, we've added a sandbox application to this repository in which StatusQ components are being build. This is the first place where components see the light of the world and can be run in a proper application environment.

Using Qt Creator

The easiest way to run the sandbox application is to simply open the provided CMakeLists.txt file using Qt Creator.

Using command line interface

To run the sandbox from within a command line interface, run the following commands:

$ git clone https://github.com/status-im/StatusQ
$ cd StatusQ
$ git submodule update --init
$ ./scripts/build

Once that is done, the sandbox can be started with the generated executable:

$ ./build/sandbox/Sandbox