status-qml/sandbox
Pascal Precht 6e10959e40 feat(StatusQ.Controls): introduce `StatusSelect`
This introduces a new `StatusSelect` component which is a select form control.
The `model` property can be used to apply a `ListModel` for dynamic data.
To give users full control over what the menu items look like, `StatusSelect`
exposes a `selectMenu.delegate` property.

Most of the time this should be a `StatusMenuItemDelegate` to get access to the
comple `MenuItem` component (remember that `StatusMenuItem` is merely an `Action`
type).

`StatusMenuItemDelegate` derives most of its behaviour by its applied `action`,
so the easiest way to construct a dynamic select with StatusQ menu item look and feel
is a combination of `StatusMenuItemDelegate` and `StatusMenuItem` as shown below.

Further more, because `StatusSelect` can't know what the `delegate` is going to look like
it also can't decide what data goes into a `selectedItem`. Therefore, it offers another API,
the `selectedItemComponent` which can be any component. This component can then be accessed
by menu item actions to set corresponding properties.

Usage:

```qml
import StatusQ.Controls 0.1

StatusSelect {
    label: "Some label"
    model: ListModel {
        ListElement {
            name: "Pascal"
        }
        ListElement {
            name: "Khushboo"
        }
        ListElement {
            name: "Alexandra"
        }
        ListElement {
            name: "Eric"
        }
    }

    selectMenu.delegate: StatusMenuItemDelegate {
        statusPopupMenu: select
        action: StatusMenuItem {
            iconSettings.name: "filled-account"
            text: name
            onTriggered: {
                selectedItem.text = name
            }
        }
    }

    selectedItemComponent: Item {
        id: selectedItem
        anchors.fill: parent
        property string text: ""

        StatusBaseText {
            text: selectedItem.text
            anchors.centerIn: parent
            color: Theme.palette.directColor1
        }
    }
}
```

Closes #436
2021-10-15 11:00:30 +02:00
..
android Revert "Revert "feat: can be used on tablets (#146)"" 2021-06-15 11:16:22 +02:00
dictionaries feat(Spellchecking): Add dictionaries 2021-09-16 15:37:59 +02:00
scripts chore: introduce build script for sandbox app 2021-06-16 11:11:04 +02:00
Buttons.qml [#202] Added Picker button 2021-07-09 11:16:04 +02:00
Controls.qml feature(StatusSelectableText): Added a selectable text component (#431) 2021-09-29 15:22:23 -04:00
DemoApp.qml refactor(StatusModal): Remove custom content property 2021-09-02 11:06:32 +02:00
Icons.qml feat: Set up catalog app (sandbox) 2021-05-05 07:55:43 +02:00
Layout.qml feat(Components): introduce `StatusChatToolBar` 2021-05-28 11:56:49 +02:00
ListItems.qml feat(StatusDescriptionListItem): introduce support for `value` 2021-08-31 11:27:43 +02:00
Models.qml refactor(StatusSearchPopup): change expected search model shape 2021-08-31 11:23:23 +02:00
Others.qml feat(Components): introduce `StatusRoundIcon` component 2021-05-25 12:23:47 +02:00
Popups.qml feat(StatusModal): Add edit avatar button 2021-10-15 10:49:40 +02:00
StatusChatInfoToolBarPage.qml feat(Components): introduce `StatusChatInfoToolBar` component 2021-06-16 11:01:22 +02:00
StatusExpandableSettingsItemPage.qml feat(StatusExpandableItem): Refactored the StatusExpandableSettingsItem to support different types 2021-09-08 13:37:03 +02:00
StatusInputPage.qml feat(StatusBaseInput): introduce `component` property 2021-09-13 09:56:24 +02:00
StatusPopupMenuPage.qml feat(StatusQ.Popups) Adding SearchPopup component 2021-08-12 11:35:09 +02:00
StatusSelectPage.qml feat(StatusQ.Controls): introduce `StatusSelect` 2021-10-15 11:00:30 +02:00
StatusTabSwitchPage.qml feat(StatusQ.Controls): introduce StatusSwitchTabBar and StatusSwitchTabButton 2021-09-03 10:45:45 +02:00
ThemeSwitch.qml chore: add tooltip to theme switch 2021-06-03 16:40:57 +02:00
handler.cpp feat: Set up catalog app (sandbox) 2021-05-05 07:55:43 +02:00
handler.h feat: Set up catalog app (sandbox) 2021-05-05 07:55:43 +02:00
main.cpp feat: Set up catalog app (sandbox) 2021-05-05 07:55:43 +02:00
main.qml feat(StatusQ.Controls): introduce `StatusSelect` 2021-10-15 11:00:30 +02:00
qml.qrc feat(StatusExpandableSettingsItem): Added new component for wallet settings 2021-09-03 10:55:27 +02:00
sandbox.pro feat(Spellchecking): Add dictionaries 2021-09-16 15:37:59 +02:00
sandboxapp.cpp feat(Spellchecker): Add Spellchecker class 2021-09-14 14:34:25 +02:00
sandboxapp.h fix: fix crash on removing title bar 2021-05-20 10:48:51 +02:00
spellchecker.cpp fix: Sandbox doesn't build on Linux machines 2021-10-08 08:37:01 +02:00
spellchecker.h feat(Spellchecker): Add Spellchecker class 2021-09-14 14:34:25 +02:00
statuswindow.cpp Revert "Revert "feat: can be used on tablets (#146)"" 2021-06-15 11:16:22 +02:00
statuswindow.h fix: update position of window to center, add traffic lights 2021-06-03 16:38:08 +02:00
statuswindow_mac.mm fix: update position of window to center, add traffic lights 2021-06-03 16:38:08 +02:00