WIP icon combobox
This commit is contained in:
@ -4,12 +4,14 @@ project(lightcontrol VERSION 0.1 LANGUAGES CXX)
|
|||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS ON)
|
set(CMAKE_CXX_EXTENSIONS ON)
|
||||||
|
|
||||||
find_package(Qt6 6.2 REQUIRED COMPONENTS SerialPort Quick)
|
find_package(Qt6 6.2 REQUIRED COMPONENTS SerialPort Quick)
|
||||||
|
|
||||||
qt_add_executable(applightcontrol
|
qt_add_executable(applightcontrol
|
||||||
|
resources.qrc
|
||||||
main.cpp
|
main.cpp
|
||||||
devicetypesmodel.h devicetypesmodel.cpp
|
devicetypesmodel.h devicetypesmodel.cpp
|
||||||
dmxcontroller.h dmxcontroller.cpp
|
dmxcontroller.h dmxcontroller.cpp
|
||||||
|
@ -8,6 +8,13 @@ ColumnLayout {
|
|||||||
Label {
|
Label {
|
||||||
text: qsTr("Device Types Settings")
|
text: qsTr("Device Types Settings")
|
||||||
}
|
}
|
||||||
|
Image {
|
||||||
|
height: 64
|
||||||
|
width: 64
|
||||||
|
source: ":/lightcontrol/icons/movinghead.png"
|
||||||
|
onStatusChanged: console.log(status)
|
||||||
|
Component.onCompleted: console.log(status)
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
//Layout.fillWidth: true
|
//Layout.fillWidth: true
|
||||||
@ -48,6 +55,26 @@ ColumnLayout {
|
|||||||
text: listView.currentData.name
|
text: listView.currentData.name
|
||||||
onTextEdited: listView.currentData.name = text
|
onTextEdited: listView.currentData.name = text
|
||||||
}
|
}
|
||||||
|
Label { text: qsTr("Icon:") }
|
||||||
|
ComboBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
id: iconCombobox
|
||||||
|
//textRole: "imageSource"
|
||||||
|
//valueRole: "imageSource"
|
||||||
|
//currentIndex: iconCombobox.indexOfValue(listView.currentData.deviceTypeId)
|
||||||
|
//onActivated: if (listView.currentData) listView.currentData.deviceTypeId = currentValue; else console.warn('discarded');
|
||||||
|
delegate: Image {
|
||||||
|
height: 64
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
source: imageSource
|
||||||
|
}
|
||||||
|
model: ListModel {
|
||||||
|
id: cbItems
|
||||||
|
ListElement { imageSource: ":/lightcontrol/icons/movinghead.png" }
|
||||||
|
ListElement { imageSource: ":/lightcontrol/icons/nebelmaschine.png" }
|
||||||
|
ListElement { imageSource: ":/lightcontrol/icons/rgbstrahler.png" }
|
||||||
|
}
|
||||||
|
}
|
||||||
Label { text: qsTr("Registers:") }
|
Label { text: qsTr("Registers:") }
|
||||||
RegistersSettingsItem {
|
RegistersSettingsItem {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
BIN
icons/movinghead.png
Normal file
BIN
icons/movinghead.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.4 KiB |
BIN
icons/nebelmaschine.png
Normal file
BIN
icons/nebelmaschine.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
BIN
icons/rgbstrahler.png
Normal file
BIN
icons/rgbstrahler.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
7
resources.qrc
Normal file
7
resources.qrc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="/lightcontrol">
|
||||||
|
<file>icons/movinghead.png</file>
|
||||||
|
<file>icons/nebelmaschine.png</file>
|
||||||
|
<file>icons/rgbstrahler.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
Reference in New Issue
Block a user