summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bluetoothsettings/bluetoothdevice.cpp (renamed from src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.cpp)0
-rw-r--r--src/bluetoothsettings/bluetoothdevice.h (renamed from src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.h)2
-rw-r--r--src/bluetoothsettings/bluetoothsettings.pro19
-rw-r--r--src/bluetoothsettings/bluez/bluetoothdevice_p.cpp (renamed from src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.cpp)0
-rw-r--r--src/bluetoothsettings/bluez/bluetoothdevice_p.h (renamed from src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.h)1
-rw-r--r--src/bluetoothsettings/bluez/bluez.pri (renamed from src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluez.pri)10
-rw-r--r--src/bluetoothsettings/bluez/datatypes.h (renamed from src/qtdevicesettings/bluetoothsettingsplugin/bluez/datatypes.h)0
-rw-r--r--src/bluetoothsettings/bluez/device1.xml (renamed from src/qtdevicesettings/bluetoothsettingsplugin/bluez/device1.xml)0
-rw-r--r--src/bluetoothsettings/bluez/objectmanager.xml (renamed from src/qtdevicesettings/bluetoothsettingsplugin/bluez/objectmanager.xml)0
-rw-r--r--src/bluetoothsettings/discoverymodel.cpp (renamed from src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.cpp)0
-rw-r--r--src/bluetoothsettings/discoverymodel.h (renamed from src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.h)8
-rw-r--r--src/displaysettings/displaysettings.cpp97
-rw-r--r--src/displaysettings/displaysettings.h76
-rw-r--r--src/displaysettings/displaysettings.pro17
-rw-r--r--src/displaysettings/displaysettings_p.cpp247
-rw-r--r--src/displaysettings/displaysettings_p.h100
-rw-r--r--src/imports/bluetoothsettings/bluetoothsettings.pro (renamed from src/qtdevicesettings/bluetoothsettingsplugin/bluetoothsettingsplugin.pro)20
-rw-r--r--src/imports/bluetoothsettings/plugin.cpp (renamed from src/qtdevicesettings/bluetoothsettingsplugin/plugin.cpp)3
-rw-r--r--src/imports/bluetoothsettings/qmldir (renamed from src/qtdevicesettings/bluetoothsettingsplugin/qmldir)1
-rw-r--r--src/imports/displaysettings/displaysettings.pro18
-rw-r--r--src/imports/displaysettings/plugin.cpp (renamed from src/qtdevicesettings/generalsettingsplugin/plugin.cpp)10
-rw-r--r--src/imports/displaysettings/qmldir2
-rw-r--r--src/imports/imports.pro7
-rw-r--r--src/imports/localdevice/localdevice.pro17
-rw-r--r--src/imports/localdevice/plugin.cpp117
-rw-r--r--src/imports/localdevice/plugins.qmltypes (renamed from src/imports/utils/plugins.qmltypes)0
-rw-r--r--src/imports/localdevice/qmldir3
-rw-r--r--src/imports/localesettings/locale.xml (renamed from src/qtdevicesettings/localesettingsplugin/locale.xml)0
-rw-r--r--src/imports/localesettings/localesettings.pro (renamed from src/qtdevicesettings/generalsettingsplugin/generalsettingsplugin.pro)12
-rw-r--r--src/imports/localesettings/plugin.cpp (renamed from src/qtdevicesettings/localesettingsplugin/plugin.cpp)6
-rw-r--r--src/imports/localesettings/qmldir (renamed from src/qtdevicesettings/localesettingsplugin/qmldir)1
-rw-r--r--src/imports/networksettings/networksettings.pro34
-rw-r--r--src/imports/networksettings/plugin.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.cpp)10
-rw-r--r--src/imports/networksettings/plugin.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.h)0
-rw-r--r--src/imports/networksettings/qmldir (renamed from src/qtdevicesettings/networksettingsplugin/qmldir)1
-rw-r--r--src/imports/timedatesettings/plugin.cpp (renamed from src/qtdevicesettings/timedateplugin/plugin.cpp)6
-rw-r--r--src/imports/timedatesettings/qmldir (renamed from src/qtdevicesettings/timedateplugin/qmldir)1
-rw-r--r--src/imports/timedatesettings/timedatesettings.pro19
-rw-r--r--src/imports/utils/plugin.cpp160
-rw-r--r--src/imports/utils/qmldir3
-rw-r--r--src/imports/utils/utils.pro10
-rw-r--r--src/localdevice/localdevice.pro16
-rw-r--r--src/localdevice/qlocaldevice.cpp57
-rw-r--r--src/localdevice/qlocaldevice.h37
-rw-r--r--src/localesettings/locale.xml12
-rw-r--r--src/localesettings/localefiltermodel.cpp (renamed from src/qtdevicesettings/localesettingsplugin/localefiltermodel.cpp)0
-rw-r--r--src/localesettings/localefiltermodel.h (renamed from src/qtdevicesettings/localesettingsplugin/localefiltermodel.h)2
-rw-r--r--src/localesettings/localemodel.cpp (renamed from src/qtdevicesettings/localesettingsplugin/localemodel.cpp)1
-rw-r--r--src/localesettings/localemodel.h (renamed from src/qtdevicesettings/localesettingsplugin/localemodel.h)3
-rw-r--r--src/localesettings/localesettings.pro22
-rw-r--r--src/localesettings/systemlocale.cpp (renamed from src/qtdevicesettings/localesettingsplugin/systemlocale.cpp)0
-rw-r--r--src/localesettings/systemlocale.h (renamed from src/qtdevicesettings/localesettingsplugin/systemlocale.h)2
-rw-r--r--src/localesettings/systemlocale_p.h (renamed from src/qtdevicesettings/localesettingsplugin/systemlocale_p.h)0
-rw-r--r--src/networksettings/connman.pri (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman.pri)6
-rw-r--r--src/networksettings/connman/connman_manager.xml (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_manager.xml)0
-rw-r--r--src/networksettings/connman/connman_service.xml (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_service.xml)0
-rw-r--r--src/networksettings/connman/connman_technology.xml (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_technology.xml)0
-rw-r--r--src/networksettings/connman/connmancommon.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/connmancommon.cpp)0
-rw-r--r--src/networksettings/connman/connmancommon.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/connmancommon.h)28
-rw-r--r--src/networksettings/connman/qnetworksettingsinterface_p.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsinterface_p.cpp)2
-rw-r--r--src/networksettings/connman/qnetworksettingsinterface_p.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsinterface_p.h)0
-rw-r--r--src/networksettings/connman/qnetworksettingsmanager_p.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsmanager_p.cpp)19
-rw-r--r--src/networksettings/connman/qnetworksettingsmanager_p.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsmanager_p.h)7
-rw-r--r--src/networksettings/connman/qnetworksettingsservice_p.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsservice_p.cpp)74
-rw-r--r--src/networksettings/connman/qnetworksettingsservice_p.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsservice_p.h)0
-rw-r--r--src/networksettings/connman/qnetworksettingsuseragent_p.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsuseragent_p.cpp)4
-rw-r--r--src/networksettings/connman/qnetworksettingsuseragent_p.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsuseragent_p.h)2
-rw-r--r--src/networksettings/networksettings.pro37
-rw-r--r--src/networksettings/qnetworksettings.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettings.h)12
-rw-r--r--src/networksettings/qnetworksettingsaddressmodel.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsaddressmodel.cpp)0
-rw-r--r--src/networksettings/qnetworksettingsaddressmodel.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsaddressmodel.h)2
-rw-r--r--src/networksettings/qnetworksettingsinterface.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsinterface.cpp)0
-rw-r--r--src/networksettings/qnetworksettingsinterface.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsinterface.h)2
-rw-r--r--src/networksettings/qnetworksettingsinterfacemodel.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsinterfacemodel.cpp)8
-rw-r--r--src/networksettings/qnetworksettingsinterfacemodel.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsinterfacemodel.h)3
-rw-r--r--src/networksettings/qnetworksettingsmanager.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsmanager.cpp)4
-rw-r--r--src/networksettings/qnetworksettingsmanager.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsmanager.h)3
-rw-r--r--src/networksettings/qnetworksettingsservice.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsservice.cpp)5
-rw-r--r--src/networksettings/qnetworksettingsservice.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsservice.h)2
-rw-r--r--src/networksettings/qnetworksettingsservicemodel.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsservicemodel.cpp)3
-rw-r--r--src/networksettings/qnetworksettingsservicemodel.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsservicemodel.h)2
-rw-r--r--src/networksettings/qnetworksettingsuseragent.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsuseragent.cpp)0
-rw-r--r--src/networksettings/qnetworksettingsuseragent.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsuseragent.h)2
-rw-r--r--src/networksettings/wpasupplicant.pri (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant.pri)0
-rw-r--r--src/networksettings/wpasupplicant/qnetworksettingsinterface_p.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsinterface_p.cpp)0
-rw-r--r--src/networksettings/wpasupplicant/qnetworksettingsinterface_p.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsinterface_p.h)0
-rw-r--r--src/networksettings/wpasupplicant/qnetworksettingsmanager_p.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsmanager_p.cpp)0
-rw-r--r--src/networksettings/wpasupplicant/qnetworksettingsmanager_p.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsmanager_p.h)0
-rw-r--r--src/networksettings/wpasupplicant/qnetworksettingsservice_p.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsservice_p.cpp)0
-rw-r--r--src/networksettings/wpasupplicant/qnetworksettingsservice_p.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsservice_p.h)0
-rw-r--r--src/networksettings/wpasupplicant/qnetworksettingsuseragent_p.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsuseragent_p.cpp)0
-rw-r--r--src/networksettings/wpasupplicant/qnetworksettingsuseragent_p.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsuseragent_p.h)0
-rw-r--r--src/networksettings/wpasupplicant/qwificontroller.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwificontroller.cpp)0
-rw-r--r--src/networksettings/wpasupplicant/qwificontroller_p.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwificontroller_p.h)0
-rw-r--r--src/networksettings/wpasupplicant/qwifidevice.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwifidevice.cpp)0
-rw-r--r--src/networksettings/wpasupplicant/qwifidevice.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwifidevice.h)0
-rw-r--r--src/networksettings/wpasupplicant/qwifisupplicant.cpp (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwifisupplicant.cpp)0
-rw-r--r--src/networksettings/wpasupplicant/qwifisupplicant_p.h (renamed from src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwifisupplicant_p.h)0
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/icons.qrc16
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/qml.qrc6
-rw-r--r--src/qtdevicesettings/generalsettingsplugin/Sound.qml86
-rw-r--r--src/qtdevicesettings/generalsettingsplugin/icons.qrc7
-rw-r--r--src/qtdevicesettings/generalsettingsplugin/qml.qrc6
-rw-r--r--src/qtdevicesettings/generalsettingsplugin/qmldir2
-rw-r--r--src/qtdevicesettings/localesettingsplugin/icons.qrc4
-rw-r--r--src/qtdevicesettings/localesettingsplugin/localesettingsplugin.pro36
-rw-r--r--src/qtdevicesettings/localesettingsplugin/qml.qrc6
-rw-r--r--src/qtdevicesettings/networksettingsplugin/icons.qrc6
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettingsplugin.pro74
-rw-r--r--src/qtdevicesettings/networksettingsplugin/qml.qrc10
-rw-r--r--src/qtdevicesettings/qtdevicesettings.pro11
-rw-r--r--src/qtdevicesettings/settingscomponents/icons.qrc21
-rw-r--r--src/qtdevicesettings/settingscomponents/imports/Settings/qmldir5
-rw-r--r--src/qtdevicesettings/settingscomponents/settingscomponents.pro26
-rw-r--r--src/qtdevicesettings/settingsui/icons.qrc12
-rw-r--r--src/qtdevicesettings/settingsui/qml.qrc6
-rw-r--r--src/qtdevicesettings/timedateplugin/icons.qrc4
-rw-r--r--src/qtdevicesettings/timedateplugin/qml.qrc7
-rw-r--r--src/settingsui/bluetooth/Bluetooth.qml (renamed from src/qtdevicesettings/bluetoothsettingsplugin/Bluetooth.qml)2
-rw-r--r--src/settingsui/bluetooth/Discovery.qml (renamed from src/qtdevicesettings/bluetoothsettingsplugin/Discovery.qml)2
-rw-r--r--src/settingsui/common/CustomCombobox.qml (renamed from src/qtdevicesettings/settingscomponents/imports/Settings/CustomCombobox.qml)0
-rw-r--r--src/settingsui/common/FlatStyledDropdownDelegate.qml (renamed from src/qtdevicesettings/settingscomponents/imports/Settings/FlatStyledDropdownDelegate.qml)0
-rw-r--r--src/settingsui/common/IconButton.qml (renamed from src/qtdevicesettings/settingscomponents/imports/Settings/IconButton.qml)0
-rw-r--r--src/settingsui/common/TextLabel.qml (renamed from src/qtdevicesettings/settingscomponents/imports/Settings/TextLabel.qml)0
-rw-r--r--src/settingsui/deployment.pri (renamed from src/qtdevicesettings/settingsui/deployment.pri)0
-rw-r--r--src/settingsui/display/Display.qml (renamed from src/qtdevicesettings/generalsettingsplugin/Display.qml)19
-rw-r--r--src/settingsui/icons.qrc12
-rw-r--r--src/settingsui/icons/Alert_yellow_1x.png (renamed from src/qtdevicesettings/icons/Alert_yellow_1x.png)bin775 -> 775 bytes
-rw-r--r--src/settingsui/icons/Audio_qt_6x.png (renamed from src/qtdevicesettings/icons/Audio_qt_6x.png)bin444 -> 444 bytes
-rw-r--r--src/settingsui/icons/Bluetooth_qt_1x.png (renamed from src/qtdevicesettings/icons/Bluetooth_qt_1x.png)bin858 -> 858 bytes
-rw-r--r--src/settingsui/icons/Bluetooth_qt_6x.png (renamed from src/qtdevicesettings/icons/Bluetooth_qt_6x.png)bin2349 -> 2349 bytes
-rw-r--r--src/settingsui/icons/Camcorder_qt_1x.png (renamed from src/qtdevicesettings/icons/Camcorder_qt_1x.png)bin719 -> 719 bytes
-rw-r--r--src/settingsui/icons/Camera_qt_1x.png (renamed from src/qtdevicesettings/icons/Camera_qt_1x.png)bin1003 -> 1003 bytes
-rw-r--r--src/settingsui/icons/Chevron-left_black_1x.png (renamed from src/qtdevicesettings/icons/Chevron-left_black_1x.png)bin707 -> 707 bytes
-rw-r--r--src/settingsui/icons/Clock_qt_1x.png (renamed from src/qtdevicesettings/icons/Clock_qt_1x.png)bin1185 -> 1185 bytes
-rw-r--r--src/settingsui/icons/Clock_qt_6x.png (renamed from src/qtdevicesettings/icons/Clock_qt_6x.png)bin3438 -> 3438 bytes
-rw-r--r--src/settingsui/icons/Display_qt_6x.png (renamed from src/qtdevicesettings/icons/Display_qt_6x.png)bin1157 -> 1157 bytes
-rw-r--r--src/settingsui/icons/Flag_qt_6x.png (renamed from src/qtdevicesettings/icons/Flag_qt_6x.png)bin1888 -> 1888 bytes
-rw-r--r--src/settingsui/icons/Headphones_qt_1x.png (renamed from src/qtdevicesettings/icons/Headphones_qt_1x.png)bin1041 -> 1041 bytes
-rw-r--r--src/settingsui/icons/Heartbeat_qt_1x.png (renamed from src/qtdevicesettings/icons/Heartbeat_qt_1x.png)bin1061 -> 1061 bytes
-rw-r--r--src/settingsui/icons/Keyboard_qt_1x.png (renamed from src/qtdevicesettings/icons/Keyboard_qt_1x.png)bin1116 -> 1116 bytes
-rw-r--r--src/settingsui/icons/Laptop_qt_1x.png (renamed from src/qtdevicesettings/icons/Laptop_qt_1x.png)bin861 -> 861 bytes
-rw-r--r--src/settingsui/icons/Microphone_qt_1x.png (renamed from src/qtdevicesettings/icons/Microphone_qt_1x.png)bin943 -> 943 bytes
-rw-r--r--src/settingsui/icons/MobilePhone_qt_1x.png (renamed from src/qtdevicesettings/icons/MobilePhone_qt_1x.png)bin785 -> 785 bytes
-rw-r--r--src/settingsui/icons/Mouse_qt_1x.png (renamed from src/qtdevicesettings/icons/Mouse_qt_1x.png)bin732 -> 732 bytes
-rw-r--r--src/settingsui/icons/Power_black_1x.png (renamed from src/qtdevicesettings/icons/Power_black_1x.png)bin1161 -> 1161 bytes
-rw-r--r--src/settingsui/icons/Tablet_qt_1x.png (renamed from src/qtdevicesettings/icons/Tablet_qt_1x.png)bin721 -> 721 bytes
-rw-r--r--src/settingsui/icons/Volume_down_qt_1x.png (renamed from src/qtdevicesettings/icons/Volume_down_qt_1x.png)bin571 -> 571 bytes
-rw-r--r--src/settingsui/icons/Volume_mute_qt_1x.png (renamed from src/qtdevicesettings/icons/Volume_mute_qt_1x.png)bin778 -> 778 bytes
-rw-r--r--src/settingsui/icons/Volume_up_qt_1x.png (renamed from src/qtdevicesettings/icons/Volume_up_qt_1x.png)bin632 -> 632 bytes
-rw-r--r--src/settingsui/icons/WifiAnim_black_2x.png (renamed from src/qtdevicesettings/icons/WifiAnim_black_2x.png)bin1673 -> 1673 bytes
-rw-r--r--src/settingsui/icons/Wifi_lightgray_2x.png (renamed from src/qtdevicesettings/icons/Wifi_lightgray_2x.png)bin924 -> 924 bytes
-rw-r--r--src/settingsui/icons/World_qt_6x.png (renamed from src/qtdevicesettings/icons/World_qt_6x.png)bin5789 -> 5789 bytes
-rwxr-xr-xsrc/settingsui/icons/generate_icons.sh (renamed from src/qtdevicesettings/icons/generate_icons.sh)0
-rw-r--r--src/settingsui/icons/ref/Audio.png (renamed from src/qtdevicesettings/icons/ref/Audio.png)bin135 -> 135 bytes
-rw-r--r--src/settingsui/icons/ref/Back.png (renamed from src/qtdevicesettings/icons/ref/Back.png)bin1725 -> 1725 bytes
-rw-r--r--src/settingsui/icons/ref/Bluetooth.png (renamed from src/qtdevicesettings/icons/ref/Bluetooth.png)bin1364 -> 1364 bytes
-rw-r--r--src/settingsui/icons/ref/Camcorder.png (renamed from src/qtdevicesettings/icons/ref/Camcorder.png)bin1036 -> 1036 bytes
-rw-r--r--src/settingsui/icons/ref/Camera.png (renamed from src/qtdevicesettings/icons/ref/Camera.png)bin1889 -> 1889 bytes
-rw-r--r--src/settingsui/icons/ref/Chevron-left.png (renamed from src/qtdevicesettings/icons/ref/Chevron-left.png)bin1475 -> 1475 bytes
-rw-r--r--src/settingsui/icons/ref/Chevron-right.png (renamed from src/qtdevicesettings/icons/ref/Chevron-right.png)bin1463 -> 1463 bytes
-rw-r--r--src/settingsui/icons/ref/Circle-x.png (renamed from src/qtdevicesettings/icons/ref/Circle-x.png)bin3358 -> 3358 bytes
-rw-r--r--src/settingsui/icons/ref/Clock.png (renamed from src/qtdevicesettings/icons/ref/Clock.png)bin2438 -> 2438 bytes
-rw-r--r--src/settingsui/icons/ref/Cogs.png (renamed from src/qtdevicesettings/icons/ref/Cogs.png)bin2756 -> 2756 bytes
-rw-r--r--src/settingsui/icons/ref/Connections.png (renamed from src/qtdevicesettings/icons/ref/Connections.png)bin3226 -> 3226 bytes
-rw-r--r--src/settingsui/icons/ref/Display.png (renamed from src/qtdevicesettings/icons/ref/Display.png)bin754 -> 754 bytes
-rw-r--r--src/settingsui/icons/ref/Flag.png (renamed from src/qtdevicesettings/icons/ref/Flag.png)bin1395 -> 1395 bytes
-rw-r--r--src/settingsui/icons/ref/Headphones.png (renamed from src/qtdevicesettings/icons/ref/Headphones.png)bin2141 -> 2141 bytes
-rw-r--r--src/settingsui/icons/ref/Heartbeat.png (renamed from src/qtdevicesettings/icons/ref/Heartbeat.png)bin2280 -> 2280 bytes
-rw-r--r--src/settingsui/icons/ref/Keyboard.png (renamed from src/qtdevicesettings/icons/ref/Keyboard.png)bin571 -> 571 bytes
-rw-r--r--src/settingsui/icons/ref/Laptop.png (renamed from src/qtdevicesettings/icons/ref/Laptop.png)bin753 -> 753 bytes
-rw-r--r--src/settingsui/icons/ref/Lock.png (renamed from src/qtdevicesettings/icons/ref/Lock.png)bin1043 -> 1043 bytes
-rw-r--r--src/settingsui/icons/ref/Microphone.png (renamed from src/qtdevicesettings/icons/ref/Microphone.png)bin1891 -> 1891 bytes
-rw-r--r--src/settingsui/icons/ref/MobilePhone.png (renamed from src/qtdevicesettings/icons/ref/MobilePhone.png)bin1034 -> 1034 bytes
-rw-r--r--src/settingsui/icons/ref/Mouse.png (renamed from src/qtdevicesettings/icons/ref/Mouse.png)bin1560 -> 1560 bytes
-rw-r--r--src/settingsui/icons/ref/Plus.png (renamed from src/qtdevicesettings/icons/ref/Plus.png)bin2888 -> 2888 bytes
-rw-r--r--src/settingsui/icons/ref/Power.png (renamed from src/qtdevicesettings/icons/ref/Power.png)bin2466 -> 2466 bytes
-rw-r--r--src/settingsui/icons/ref/Settings.png (renamed from src/qtdevicesettings/icons/ref/Settings.png)bin2630 -> 2630 bytes
-rw-r--r--src/settingsui/icons/ref/Tablet.png (renamed from src/qtdevicesettings/icons/ref/Tablet.png)bin892 -> 892 bytes
-rw-r--r--src/settingsui/icons/ref/Volume_down.png (renamed from src/qtdevicesettings/icons/ref/Volume_down.png)bin505 -> 505 bytes
-rw-r--r--src/settingsui/icons/ref/Volume_mute.png (renamed from src/qtdevicesettings/icons/ref/Volume_mute.png)bin1000 -> 1000 bytes
-rw-r--r--src/settingsui/icons/ref/Volume_up.png (renamed from src/qtdevicesettings/icons/ref/Volume_up.png)bin513 -> 513 bytes
-rw-r--r--src/settingsui/icons/ref/Wifi.png (renamed from src/qtdevicesettings/icons/ref/Wifi.png)bin2102 -> 2102 bytes
-rw-r--r--src/settingsui/icons/ref/Wifi1.png (renamed from src/qtdevicesettings/icons/ref/Wifi1.png)bin824 -> 824 bytes
-rw-r--r--src/settingsui/icons/ref/Wifi2.png (renamed from src/qtdevicesettings/icons/ref/Wifi2.png)bin987 -> 987 bytes
-rw-r--r--src/settingsui/icons/ref/Wifi3.png (renamed from src/qtdevicesettings/icons/ref/Wifi3.png)bin1195 -> 1195 bytes
-rw-r--r--src/settingsui/icons/ref/Wifi4.png (renamed from src/qtdevicesettings/icons/ref/Wifi4.png)bin2102 -> 2102 bytes
-rw-r--r--src/settingsui/icons/ref/WifiAnim.png (renamed from src/qtdevicesettings/icons/ref/WifiAnim.png)bin2830 -> 2830 bytes
-rw-r--r--src/settingsui/icons/ref/World.png (renamed from src/qtdevicesettings/icons/ref/World.png)bin4559 -> 4559 bytes
-rw-r--r--src/settingsui/icons/ref/Wrench.png (renamed from src/qtdevicesettings/icons/ref/Wrench.png)bin1677 -> 1677 bytes
-rw-r--r--src/settingsui/icons/ref/extra/Alert.png (renamed from src/qtdevicesettings/icons/ref/extra/Alert.png)bin1502 -> 1502 bytes
-rwxr-xr-xsrc/settingsui/icons/scripts/cimage.sh (renamed from src/qtdevicesettings/icons/scripts/cimage.sh)0
-rwxr-xr-xsrc/settingsui/icons/scripts/cimages.sh (renamed from src/qtdevicesettings/icons/scripts/cimages.sh)0
-rwxr-xr-xsrc/settingsui/icons/scripts/rimage.sh (renamed from src/qtdevicesettings/icons/scripts/rimage.sh)0
-rwxr-xr-xsrc/settingsui/icons/scripts/rimages.sh (renamed from src/qtdevicesettings/icons/scripts/rimages.sh)0
-rw-r--r--src/settingsui/locale/Language.qml (renamed from src/qtdevicesettings/localesettingsplugin/Language.qml)2
-rw-r--r--src/settingsui/locale/RegionSelect.qml (renamed from src/qtdevicesettings/localesettingsplugin/RegionSelect.qml)2
-rw-r--r--src/settingsui/main.cpp (renamed from src/qtdevicesettings/settingsui/main.cpp)0
-rw-r--r--src/settingsui/main.qml (renamed from src/qtdevicesettings/settingsui/main.qml)11
-rw-r--r--src/settingsui/network/EditWiredSettings.qml (renamed from src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/EditWiredSettings.qml)2
-rw-r--r--src/settingsui/network/IpAddressTextField.qml (renamed from src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/IpAddressTextField.qml)0
-rw-r--r--src/settingsui/network/NetworkDetails.qml (renamed from src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkDetails.qml)0
-rw-r--r--src/settingsui/network/NetworkSettings.qml (renamed from src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkSettings.qml)2
-rw-r--r--src/settingsui/network/WifiSelectorDelegate.qml (renamed from src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSelectorDelegate.qml)2
-rw-r--r--src/settingsui/network/WifiSettings.qml (renamed from src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSettings.qml)3
-rw-r--r--src/settingsui/network/WifiSignalMonitor.qml (renamed from src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSignalMonitor.qml)0
-rw-r--r--src/settingsui/network/WiredSettings.qml (renamed from src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WiredSettings.qml)2
-rw-r--r--src/settingsui/qml.qrc26
-rw-r--r--src/settingsui/settingsui.pro (renamed from src/qtdevicesettings/settingsui/settingsui.pro)0
-rw-r--r--src/settingsui/settingsview.xml (renamed from src/qtdevicesettings/settingsui/settingsview.xml)16
-rw-r--r--src/settingsui/timedate/AnalogClock.qml (renamed from src/qtdevicesettings/timedateplugin/AnalogClock.qml)2
-rw-r--r--src/settingsui/timedate/TimeDate.qml (renamed from src/qtdevicesettings/timedateplugin/TimeDate.qml)2
-rw-r--r--src/settingsui/timedate/TimezonesView.qml (renamed from src/qtdevicesettings/timedateplugin/TimezonesView.qml)2
-rw-r--r--src/src.pro9
-rw-r--r--src/timedatesettings/systemtime.cpp (renamed from src/qtdevicesettings/timedateplugin/systemtime.cpp)0
-rw-r--r--src/timedatesettings/systemtime.h (renamed from src/qtdevicesettings/timedateplugin/systemtime.h)2
-rw-r--r--src/timedatesettings/systemtime_p.h (renamed from src/qtdevicesettings/timedateplugin/systemtime_p.h)0
-rw-r--r--src/timedatesettings/timedated.xml (renamed from src/qtdevicesettings/timedateplugin/timedated.xml)0
-rw-r--r--src/timedatesettings/timedateplugin.pro (renamed from src/qtdevicesettings/timedateplugin/timedateplugin.pro)0
-rw-r--r--src/timedatesettings/timedatesettings.pro23
-rw-r--r--src/timedatesettings/timezonefiltermodel.cpp (renamed from src/qtdevicesettings/timedateplugin/timezonefiltermodel.cpp)0
-rw-r--r--src/timedatesettings/timezonefiltermodel.h (renamed from src/qtdevicesettings/timedateplugin/timezonefiltermodel.h)2
-rw-r--r--src/timedatesettings/timezonemodel.cpp (renamed from src/qtdevicesettings/timedateplugin/timezonemodel.cpp)1
-rw-r--r--src/timedatesettings/timezonemodel.h (renamed from src/qtdevicesettings/timedateplugin/timezonemodel.h)3
-rw-r--r--src/utils/b2qtdevice.cpp393
-rw-r--r--src/utils/b2qtdevice.h67
-rw-r--r--src/utils/utils.pro16
-rw-r--r--sync.profile7
228 files changed, 1192 insertions, 1208 deletions
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.cpp b/src/bluetoothsettings/bluetoothdevice.cpp
index 65a7422..65a7422 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.cpp
+++ b/src/bluetoothsettings/bluetoothdevice.cpp
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.h b/src/bluetoothsettings/bluetoothdevice.h
index 370b2bc..30bd3a4 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.h
+++ b/src/bluetoothsettings/bluetoothdevice.h
@@ -41,7 +41,7 @@
class DiscoveryModel;
-class BluetoothDevice : public QObject
+class Q_DECL_EXPORT BluetoothDevice : public QObject
{
Q_OBJECT
Q_PROPERTY(bool scanning READ scanning WRITE setScanning NOTIFY scanningChanged)
diff --git a/src/bluetoothsettings/bluetoothsettings.pro b/src/bluetoothsettings/bluetoothsettings.pro
new file mode 100644
index 0000000..cb98ccb
--- /dev/null
+++ b/src/bluetoothsettings/bluetoothsettings.pro
@@ -0,0 +1,19 @@
+load(qt_build_config)
+
+TARGET = QtBluetoothSettings
+VERSION = 1.0
+CONFIG += dll warn_on
+
+QT += core bluetooth
+
+MODULE = bluetoothsettings
+load(qt_module)
+
+include(bluez/bluez.pri)
+
+HEADERS += \
+ bluetoothdevice.h \
+ discoverymodel.h
+
+SOURCES += bluetoothdevice.cpp \
+ discoverymodel.cpp
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.cpp b/src/bluetoothsettings/bluez/bluetoothdevice_p.cpp
index ded84f2..ded84f2 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.cpp
+++ b/src/bluetoothsettings/bluez/bluetoothdevice_p.cpp
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.h b/src/bluetoothsettings/bluez/bluetoothdevice_p.h
index 0bd9599..1c28161 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.h
+++ b/src/bluetoothsettings/bluez/bluetoothdevice_p.h
@@ -37,7 +37,6 @@
#define BLUETOOTHDEVICE__P_H
#include <QObject>
-#include <bluetooth/bluetooth.h>
class OrgBluezDevice1Interface;
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluez.pri b/src/bluetoothsettings/bluez/bluez.pri
index f20be87..ea4929c 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluez.pri
+++ b/src/bluetoothsettings/bluez/bluez.pri
@@ -1,10 +1,4 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2015-11-03T13:52:45
-#
-#-------------------------------------------------
-
-QT += core dbus
+QT += core dbus
INCLUDEPATH += $${PWD}
INCLUDEPATH += $${PWD}/bluez
@@ -15,7 +9,7 @@ DBUS_INTERFACES = \
HEADERS += \
$$PWD/bluetoothdevice_p.h \
- $$PWD/dbusdatatypes.h
+ $$PWD/datatypes.h
SOURCES += \
$$PWD/bluetoothdevice_p.cpp
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/datatypes.h b/src/bluetoothsettings/bluez/datatypes.h
index b794c47..b794c47 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/datatypes.h
+++ b/src/bluetoothsettings/bluez/datatypes.h
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/device1.xml b/src/bluetoothsettings/bluez/device1.xml
index 5b16992..5b16992 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/device1.xml
+++ b/src/bluetoothsettings/bluez/device1.xml
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/objectmanager.xml b/src/bluetoothsettings/bluez/objectmanager.xml
index e52d6fe..e52d6fe 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/objectmanager.xml
+++ b/src/bluetoothsettings/bluez/objectmanager.xml
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.cpp b/src/bluetoothsettings/discoverymodel.cpp
index 36d3a2e..36d3a2e 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.cpp
+++ b/src/bluetoothsettings/discoverymodel.cpp
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.h b/src/bluetoothsettings/discoverymodel.h
index de30c4c..e939450 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.h
+++ b/src/bluetoothsettings/discoverymodel.h
@@ -42,7 +42,7 @@
#include <QBluetoothDeviceInfo>
#include <QBluetoothDeviceDiscoveryAgent>
-class BtDeviceItem : public QObject
+class Q_DECL_EXPORT BtDeviceItem : public QObject
{
Q_OBJECT
Q_ENUMS(DeviceType)
@@ -92,7 +92,7 @@ private:
DeviceType m_type;
};
-class DiscoveryModel : public QAbstractListModel
+class Q_DECL_EXPORT DiscoveryModel : public QAbstractListModel
{
Q_OBJECT
Q_ENUMS(DeviceType)
@@ -103,7 +103,6 @@ public:
int rowCount(const QModelIndex & parent = QModelIndex()) const;
QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
QHash<int, QByteArray> roleNames() const;
- Q_INVOKABLE QVariant itemFromRow(const int row) const;
void setConnected(const QString& aAddress, bool connected);
void scanDevices();
@@ -119,9 +118,6 @@ signals:
private slots:
void deviceDiscovered(const QBluetoothDeviceInfo &device);
- void canceled();
- void error(QBluetoothDeviceDiscoveryAgent::Error error);
- void finished();
private:
QList<BtDeviceItem*> m_items;
QHash<int, QByteArray> m_roleNames;
diff --git a/src/displaysettings/displaysettings.cpp b/src/displaysettings/displaysettings.cpp
new file mode 100644
index 0000000..8066993
--- /dev/null
+++ b/src/displaysettings/displaysettings.cpp
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Device Utilities module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "displaysettings.h"
+#include "displaysettings_p.h"
+
+DisplaySettings::DisplaySettings(QObject *parent)
+ : QObject(parent)
+ ,d_ptr(new DisplaySettingsPrivate(this))
+{
+}
+
+DisplaySettings::~DisplaySettings()
+{
+}
+
+
+/*!
+ * Sets the display brightness (i.e. the intensity of the backlight)
+ * to \a value. A value of 255 requests maximum brightness, while 0 requests
+ * minimum (typically, the backlight turned off).
+ *
+ * Returns true on success.
+ */
+bool DisplaySettings::setDisplayBrightness(int v)
+{
+ Q_D(DisplaySettings);
+ return d->setDisplayBrightness(v);
+}
+
+
+/*!
+ * Returns the current backlight intensity.
+ * \sa setDisplayBrightness
+ */
+int DisplaySettings::displayBrightness()
+{
+ Q_D(DisplaySettings);
+ return d->displayBrightness();
+}
+
+
+int DisplaySettings::physicalScreenSizeInch() const
+{
+ Q_D(const DisplaySettings);
+ return d->physicalScreenSizeInch();
+}
+
+void DisplaySettings::setPhysicalScreenSizeInch(int inches)
+{
+ Q_D(DisplaySettings);
+ d->setPhysicalScreenSizeInch(inches);
+}
+
+bool DisplaySettings::physicalScreenSizeOverride() const
+{
+ Q_D(const DisplaySettings);
+ return d->physicalScreenSizeOverride();
+}
+
+void DisplaySettings::setPhysicalScreenSizeOverride(bool enable)
+{
+ Q_D(DisplaySettings);
+ d->setPhysicalScreenSizeOverride(enable);
+}
diff --git a/src/displaysettings/displaysettings.h b/src/displaysettings/displaysettings.h
new file mode 100644
index 0000000..fc8fe74
--- /dev/null
+++ b/src/displaysettings/displaysettings.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Device Utilities module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef DISPLAYSETTINGS_H
+#define DISPLAYSETTINGS_H
+
+#include <qobject.h>
+
+class DisplaySettingsPrivate;
+
+class Q_DECL_EXPORT DisplaySettings : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(int displayBrightness READ displayBrightness WRITE setDisplayBrightness NOTIFY displayBrightnessChanged)
+ Q_PROPERTY(int physicalScreenSizeInch READ physicalScreenSizeInch WRITE setPhysicalScreenSizeInch NOTIFY physicalScreenSizeInchChanged)
+ Q_PROPERTY(bool physicalScreenSizeOverride READ physicalScreenSizeOverride WRITE setPhysicalScreenSizeOverride NOTIFY physicalScreenSizeOverrideChanged)
+
+public:
+ DisplaySettings(QObject *parent = 0);
+ ~DisplaySettings();
+
+ int displayBrightness();
+ int physicalScreenSizeInch() const;
+ bool physicalScreenSizeOverride() const;
+
+public Q_SLOTS:
+ bool setDisplayBrightness(int value);
+ void setPhysicalScreenSizeInch(int inches);
+ void setPhysicalScreenSizeOverride(bool enable);
+
+signals:
+ void displayBrightnessChanged(int newValue);
+ void physicalScreenSizeInchChanged(int newInches);
+ void physicalScreenSizeOverrideChanged(bool newValue);
+
+protected:
+ DisplaySettingsPrivate *d_ptr;
+
+ Q_DISABLE_COPY(DisplaySettings)
+ Q_DECLARE_PRIVATE(DisplaySettings)
+};
+
+#endif // DISPLAYSETTINGS_H
diff --git a/src/displaysettings/displaysettings.pro b/src/displaysettings/displaysettings.pro
new file mode 100644
index 0000000..c03168d
--- /dev/null
+++ b/src/displaysettings/displaysettings.pro
@@ -0,0 +1,17 @@
+load(qt_build_config)
+
+TARGET = QtDisplaySettings
+VERSION = 1.0
+CONFIG += dll warn_on
+
+QT = core
+
+MODULE = displaysettings
+load(qt_module)
+
+SOURCES += displaysettings.cpp \
+ displaysettings_p.cpp
+
+HEADERS += displaysettings.h \
+ displaysettings_p.h
+
diff --git a/src/displaysettings/displaysettings_p.cpp b/src/displaysettings/displaysettings_p.cpp
new file mode 100644
index 0000000..867531a
--- /dev/null
+++ b/src/displaysettings/displaysettings_p.cpp
@@ -0,0 +1,247 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Device Utilities module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtMath>
+#include <QDirIterator>
+#include "displaysettings_p.h"
+
+DisplaySettingsPrivate::DisplaySettingsPrivate(DisplaySettings *qq)
+ :q_ptr(qq)
+ ,m_brightness(255)
+ ,m_lightDevicesInitialized(false)
+ ,m_physScreenSize(new PhysicalScreenSize(qq))
+{
+
+}
+
+void DisplaySettingsPrivate::initLightDevices()
+{
+ if (m_lightDevicesInitialized)
+ return;
+ QDirIterator it(QStringLiteral("/sys/class/backlight"));
+ while (it.hasNext()) {
+ LightDevice ld;
+ ld.deviceFile = it.next() + QStringLiteral("/brightness");
+ QFile maxFile(it.filePath() + QStringLiteral("/max_brightness"));
+ if (!maxFile.open(QIODevice::ReadOnly))
+ continue;
+ bool ok = false;
+ ld.maxValue = maxFile.read(10).simplified().toUInt(&ok);
+ if (!ok || !ld.maxValue)
+ continue;
+ QFile valFile(ld.deviceFile);
+ if (!valFile.open(QIODevice::ReadOnly))
+ continue;
+ ok = false;
+ uint val = valFile.read(10).simplified().toUInt(&ok);
+ if (!ok)
+ continue;
+ // map max->max as that is a common case, otherwise choose a reasonable value
+ ld.value = (val == ld.maxValue) ? 255 : (val * 256)/(ld.maxValue+1);
+ ld.name = it.fileName();
+ m_lightDevices.append(ld);
+ }
+ if (!m_lightDevices.isEmpty())
+ m_brightness = m_lightDevices.at(0).value;
+ m_lightDevicesInitialized = true;
+}
+
+
+bool DisplaySettingsPrivate::setDisplayBrightness(int v)
+{
+ Q_Q(DisplaySettings);
+ quint8 value = qBound(0, v, 255);
+ initLightDevices();
+ for (int i = 0; i < m_lightDevices.size(); i++) {
+ LightDevice &ld = m_lightDevices[i];
+ QFile devFile(ld.deviceFile);
+ if (!devFile.open(QIODevice::WriteOnly))
+ continue;
+ // Maps only 0 to 0, since 0 often means "off"; other values are degrees of "on".
+ uint newVal = value ? 1 + ((value * ld.maxValue) / 256) : 0;
+ devFile.write(QByteArray::number(newVal));
+ ld.value = value;
+ }
+ m_brightness = value;
+ return true;
+}
+
+int DisplaySettingsPrivate::displayBrightness()
+{
+ initLightDevices();
+ return m_brightness;
+}
+
+int DisplaySettingsPrivate::physicalScreenSizeInch() const
+{
+ return m_physScreenSize->size();
+}
+
+void DisplaySettingsPrivate::setPhysicalScreenSizeInch(int inches)
+{
+ Q_Q(DisplaySettings);
+ if (m_physScreenSize->size() != inches) {
+ m_physScreenSize->setSize(inches);
+ }
+}
+
+bool DisplaySettingsPrivate::physicalScreenSizeOverride() const
+{
+ return m_physScreenSize->enabled();
+}
+
+void DisplaySettingsPrivate::setPhysicalScreenSizeOverride(bool enable)
+{
+ Q_Q(DisplaySettings);
+ if (m_physScreenSize->enabled() != enable) {
+ m_physScreenSize->setEnabled(enable);
+ emit q->physicalScreenSizeOverrideChanged(enable);
+ }
+}
+
+PhysicalScreenSize::PhysicalScreenSize(QObject *parent)
+ : QObject(parent)
+ ,physScreenSizeEnabled(false), physScreenSizeInch(7)
+{
+ physWriteTimer.setSingleShot(true);
+ physWriteTimer.setInterval(1000);
+ QObject::connect(&physWriteTimer, SIGNAL(timeout()), this, SLOT(onTimeout()));
+
+ read(QStringLiteral("/etc/appcontroller.conf"));
+ read(QStringLiteral("/var/lib/b2qt/appcontroller.conf.d/physical_screen_size.conf"));
+}
+
+PhysicalScreenSize::~PhysicalScreenSize()
+{
+
+}
+
+void PhysicalScreenSize::read(const QString &filename)
+{
+ QFile f(filename);
+ if (!f.open(QIODevice::ReadOnly | QIODevice::Text))
+ return;
+
+ int physScreenWidth = 154, physScreenHeight = 90;
+ int found = 0;
+ while (!f.atEnd()) {
+ QByteArray line = f.readLine().trimmed();
+ if (line.startsWith(QByteArrayLiteral("env="))) {
+ QByteArrayList values = line.split('=');
+ if (values.count() == 3) {
+ bool ok;
+ if (values[1] == QByteArrayLiteral("QT_QPA_EGLFS_PHYSICAL_WIDTH")) {
+ int val = values[2].toInt(&ok);
+ if (ok) {
+ ++found;
+ physScreenWidth = val;
+ }
+ } else if (values[1] == QByteArrayLiteral("QT_QPA_EGLFS_PHYSICAL_HEIGHT")) {
+ int val = values[2].toInt(&ok);
+ if (ok) {
+ ++found;
+ physScreenHeight = val;
+ }
+ }
+ }
+ }
+ }
+ if (found == 2)
+ physScreenSizeEnabled = true;
+
+ const qreal diagMM = qSqrt(physScreenWidth * physScreenWidth + physScreenHeight * physScreenHeight);
+ physScreenSizeInch = qRound(diagMM / 25.4);
+}
+
+void PhysicalScreenSize::onTimeout()
+{
+ write();
+}
+
+void PhysicalScreenSize::write(bool includePhysSize)
+{
+ QDir(QStringLiteral("/var/lib")).mkpath(QStringLiteral("b2qt/appcontroller.conf.d"));
+ write(QStringLiteral("/var/lib/b2qt/appcontroller.conf.d/physical_screen_size.conf"), includePhysSize);
+}
+
+void PhysicalScreenSize::write(const QString &filename, bool includePhysSize)
+{
+ QFile f(filename);
+
+ QByteArrayList lines;
+ if (f.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ while (!f.atEnd()) {
+ QByteArray line = f.readLine().trimmed();
+ if (!line.startsWith(QByteArrayLiteral("env=QT_QPA_EGLFS_PHYSICAL_WIDTH="))
+ && !line.startsWith(QByteArrayLiteral("env=QT_QPA_EGLFS_PHYSICAL_HEIGHT=")))
+ lines.append(line);
+ }
+ f.close();
+ }
+
+ if (!f.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text))
+ return;
+
+ const qreal diagMM = physScreenSizeInch * 25.4;
+ // Assume 16:9 aspect ratio
+ const int physScreenHeight = qRound(diagMM / 1.975);
+ const int physScreenWidth = qRound(physScreenHeight * 1.777);
+
+ foreach (const QByteArray &line, lines)
+ f.write(line + QByteArrayLiteral("\n"));
+
+ if (includePhysSize)
+ f.write(QByteArrayLiteral("env=QT_QPA_EGLFS_PHYSICAL_WIDTH=") + QByteArray::number(physScreenWidth)
+ + QByteArrayLiteral("\nenv=QT_QPA_EGLFS_PHYSICAL_HEIGHT=") + QByteArray::number(physScreenHeight)
+ + QByteArrayLiteral("\n"));
+}
+
+void PhysicalScreenSize::setSize(int inches)
+{
+ physScreenSizeInch = inches;
+ physWriteTimer.start();
+}
+
+bool PhysicalScreenSize::enabled() const
+{
+ return physScreenSizeEnabled;
+}
+
+void PhysicalScreenSize::setEnabled(bool enable)
+{
+ physScreenSizeEnabled = enable;
+ // Rewrite appcontroller.conf with or without the physical width/height lines.
+ write(enable);
+}
diff --git a/src/displaysettings/displaysettings_p.h b/src/displaysettings/displaysettings_p.h
new file mode 100644
index 0000000..149b9c7
--- /dev/null
+++ b/src/displaysettings/displaysettings_p.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Device Utilities module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef DISPLAYSETTINGSPRIVATE_H
+#define DISPLAYSETTINGSPRIVATE_H
+
+#include <QTimer>
+#include "displaysettings.h"
+
+class PhysicalScreenSize : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit PhysicalScreenSize(QObject *parent=0);
+ virtual ~PhysicalScreenSize();
+
+ void setSize(int inches);
+ int size() const { return physScreenSizeInch; }
+ bool enabled() const;
+ void setEnabled(bool enable);
+
+private slots:
+ void onTimeout();
+
+private:
+ void read(const QString &filename);
+ void write(bool includePhysSize = true);
+ void write(const QString &filename, bool includePhysSize = true);
+
+ bool physScreenSizeEnabled;
+ int physScreenSizeInch;
+ QTimer physWriteTimer;
+};
+
+class LightDevice
+{
+public:
+ QString name;
+ QString deviceFile;
+ quint8 value;
+ uint maxValue;
+};
+
+class DisplaySettingsPrivate
+{
+ Q_DECLARE_PUBLIC(DisplaySettings)
+public:
+ DisplaySettingsPrivate(DisplaySettings* qq);
+ int displayBrightness();
+ int physicalScreenSizeInch() const;
+ bool physicalScreenSizeOverride() const;
+
+ bool setDisplayBrightness(int value);
+ void setPhysicalScreenSizeInch(int inches);
+ void setPhysicalScreenSizeOverride(bool enable);
+private:
+ void initLightDevices();
+ DisplaySettings *q_ptr;
+ int m_brightness;
+ int m_screenSizeInch;
+ bool m_sizeOverride;
+ QList<LightDevice> m_lightDevices;
+ bool m_lightDevicesInitialized;
+ PhysicalScreenSize *m_physScreenSize;
+};
+
+#endif // DISPLAYSETTINGSPRIVATE_H
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothsettingsplugin.pro b/src/imports/bluetoothsettings/bluetoothsettings.pro
index 1ffc6c5..3475ffa 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothsettingsplugin.pro
+++ b/src/imports/bluetoothsettings/bluetoothsettings.pro
@@ -1,33 +1,17 @@
TEMPLATE = lib
CONFIG += plugin
-QT += qml bluetooth
+QT += qml bluetooth bluetoothsettings
uri = com.theqtcompany.settings.bluetooth
TARGET = btsettingsplugin
-include(bluez/bluez.pri)
-
-HEADERS = \
- bluetoothdevice.h \
- discoverymodel.h
-
-SOURCES += plugin.cpp \
- bluetoothdevice.cpp \
- discoverymodel.cpp
-
-
pluginfiles.files += \
qmldir \
+SOURCES += plugin.cpp
installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
target.path = $$installPath
pluginfiles.path += $$installPath
INSTALLS += target pluginfiles
-
-
-RESOURCES += \
- icons.qrc \
- qml.qrc
-
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/plugin.cpp b/src/imports/bluetoothsettings/plugin.cpp
index 24e9705..d0a25c3 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/plugin.cpp
+++ b/src/imports/bluetoothsettings/plugin.cpp
@@ -53,9 +53,6 @@ public:
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("com.theqtcompany.settings.bluetooth"));
qmlRegisterUncreatableType<BtDeviceItem>(uri, 1, 0, "BtDeviceItem", "Cannot be instantiated directly.");
- const QString prefix = "qrc:";
- qmlRegisterType(QUrl(prefix + "Bluetooth.qml"), uri, 1, 0, "Bluetooth");
- qmlRegisterType(QUrl(prefix + "Discovery.qml"), uri, 1, 0, "Discovery");
}
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/qmldir b/src/imports/bluetoothsettings/qmldir
index febebc2..f63b52f 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/qmldir
+++ b/src/imports/bluetoothsettings/qmldir
@@ -1,3 +1,2 @@
module com.theqtcompany.settings.bluetooth
-Bluetooth 1.0 Bluetooth.qml
plugin btsettingsplugin
diff --git a/src/imports/displaysettings/displaysettings.pro b/src/imports/displaysettings/displaysettings.pro
new file mode 100644
index 0000000..4c581f4
--- /dev/null
+++ b/src/imports/displaysettings/displaysettings.pro
@@ -0,0 +1,18 @@
+TEMPLATE = lib
+CONFIG += plugin
+QT += qml displaysettings
+
+uri = com.theqtcompany.settings.display
+
+TARGET = qmldisplaysettingsplugin
+
+SOURCES += plugin.cpp \
+
+pluginfiles.files += \
+ qmldir \
+
+installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
+
+target.path = $$installPath
+pluginfiles.path += $$installPath
+INSTALLS += target pluginfiles
diff --git a/src/qtdevicesettings/generalsettingsplugin/plugin.cpp b/src/imports/displaysettings/plugin.cpp
index c7c6f40..92c0171 100644
--- a/src/qtdevicesettings/generalsettingsplugin/plugin.cpp
+++ b/src/imports/displaysettings/plugin.cpp
@@ -36,7 +36,16 @@
#include <QtQml/QQmlExtensionPlugin>
#include <QtQml/qqml.h>
+#include <QQmlEngine>
#include <qcoreapplication.h>
+#include "displaysettings.h"
+
+template <typename T>
+QObject *instance(QQmlEngine *engine, QJSEngine *) {
+ T *t = new T(engine);
+ t->setObjectName(T::staticMetaObject.className());
+ return t;
+}
class GeneralSettingsQmlPlugin : public QQmlExtensionPlugin
{
@@ -47,6 +56,7 @@ public:
void registerTypes(const char *uri)
{
qmlRegisterType(QUrl("qrc:/Display.qml"), uri, 1, 0, "Display");
+ qmlRegisterSingletonType<DisplaySettings>(uri, 1, 0, "DisplaySettings", &instance<DisplaySettings>);
}
};
diff --git a/src/imports/displaysettings/qmldir b/src/imports/displaysettings/qmldir
new file mode 100644
index 0000000..4f8a3db
--- /dev/null
+++ b/src/imports/displaysettings/qmldir
@@ -0,0 +1,2 @@
+module com.theqtcompany.settings.display
+plugin qmldisplaysettingsplugin
diff --git a/src/imports/imports.pro b/src/imports/imports.pro
index 38f61c3..f34be18 100644
--- a/src/imports/imports.pro
+++ b/src/imports/imports.pro
@@ -1,2 +1,7 @@
TEMPLATE = subdirs
-SUBDIRS += utils
+SUBDIRS += networksettings \
+ bluetoothsettings \
+ localesettings \
+ timedatesettings \
+ localdevice \
+ displaysettings
diff --git a/src/imports/localdevice/localdevice.pro b/src/imports/localdevice/localdevice.pro
new file mode 100644
index 0000000..dfcbcf9
--- /dev/null
+++ b/src/imports/localdevice/localdevice.pro
@@ -0,0 +1,17 @@
+TEMPLATE = lib
+CONFIG += plugin
+TARGET = localdeviceplugin
+uri = com.theqtcompany.localdevice
+
+QT += qml localdevice
+
+pluginfiles.files += \
+ qmldir \
+
+SOURCES += plugin.cpp
+
+installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
+
+target.path = $$installPath
+pluginfiles.path += $$installPath
+INSTALLS += target pluginfiles
diff --git a/src/imports/localdevice/plugin.cpp b/src/imports/localdevice/plugin.cpp
new file mode 100644
index 0000000..b69d9b4
--- /dev/null
+++ b/src/imports/localdevice/plugin.cpp
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use the contact form at
+** http://www.qt.io
+**
+** This file is part of Qt Enterprise Embedded.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** the contact form at http://www.qt.io
+**
+****************************************************************************/
+#include <qlocaldevice.h>
+#include <QtQml>
+
+/*!
+ \qmlmodule com.theqtcompany.localdevice 1.0
+ \title Qt Local Device QML Module
+ \ingroup qtee-qmlmodules
+ \brief A collection of the local device related utility functions, accessible from QML.
+*/
+
+/*!
+ \page b2qt-addon-utils.html
+ \title Qt Local Device Module
+ \ingroup qtee-modules
+ \brief A collection of the local device realted utility functions, accessible from QML.
+
+ Provides utility functions for controlling an embedded
+ device, such as device shutdown/reboot.
+
+ Import the module as follows:
+
+ \badcode
+ import com.theqtcompany.localdevice 1.0
+ \endcode
+
+ This will give you access to the singleton QML type LocalDevice.
+
+ \note Some functions are currently only implemented for one of
+ the platforms.
+
+ \section1 QML Types
+
+ \annotatedlist utils-qmltypes
+*/
+
+/*!
+ \qmltype LocalDevice
+ \inqmlmodule com.theqtcompany.localdevice
+ \ingroup utils-qmltypes
+ \brief Singleton QML type providing access to utility functions.
+
+ LocalDevice QML type is the interface to various utility
+ functions.
+
+ There is no need to create an instance of this object. To use it,
+ simply import the \c {LocalDevice} module:
+
+ \qml
+ com.theqtcompany.localdevice
+
+ \endqml
+
+ \note Some functions are currently only implemented for one of
+ the platforms.
+*/
+
+/*!
+ \qmlmethod LocalDevice::reboot()
+
+ Reboots the system. Does not return.
+
+ \sa powerOff()
+*/
+
+/*!
+ \qmlmethod LocalDevice::powerOff()
+
+ Shuts down the system. Does not return.
+
+ \sa reboot()
+*/
+
+static QObject *module_api_factory(QQmlEngine *engine, QJSEngine *scriptEngine)
+{
+ Q_UNUSED(engine)
+ Q_UNUSED(scriptEngine)
+ QLocalDevice *api = new QLocalDevice();
+
+ return api;
+}
+
+class B2QtUtilsPlugin : public QQmlExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
+
+public:
+ B2QtUtilsPlugin()
+ {
+ }
+
+ void registerTypes(const char *uri)
+ {
+ Q_ASSERT(QLatin1String(uri) == "com.theqtcompany.localdevice");
+ qmlRegisterSingletonType<QLocalDevice>(uri, 1, 0, "LocalDevice", module_api_factory);
+ }
+};
+
+#include "plugin.moc"
diff --git a/src/imports/utils/plugins.qmltypes b/src/imports/localdevice/plugins.qmltypes
index 88acb66..88acb66 100644
--- a/src/imports/utils/plugins.qmltypes
+++ b/src/imports/localdevice/plugins.qmltypes
diff --git a/src/imports/localdevice/qmldir b/src/imports/localdevice/qmldir
new file mode 100644
index 0000000..ae1b1c5
--- /dev/null
+++ b/src/imports/localdevice/qmldir
@@ -0,0 +1,3 @@
+module com.theqtcompany.localdevice
+plugin localdeviceplugin
+typeinfo plugins.qmltypes
diff --git a/src/qtdevicesettings/localesettingsplugin/locale.xml b/src/imports/localesettings/locale.xml
index b722456..b722456 100644
--- a/src/qtdevicesettings/localesettingsplugin/locale.xml
+++ b/src/imports/localesettings/locale.xml
diff --git a/src/qtdevicesettings/generalsettingsplugin/generalsettingsplugin.pro b/src/imports/localesettings/localesettings.pro
index 884437f..891e4f8 100644
--- a/src/qtdevicesettings/generalsettingsplugin/generalsettingsplugin.pro
+++ b/src/imports/localesettings/localesettings.pro
@@ -1,11 +1,10 @@
TEMPLATE = lib
CONFIG += plugin
-QT += qml
+QT += qml localesettings
-uri = com.theqtcompany.settings.general
+uri = com.theqtcompany.settings.locale
-DESTDIR = imports/GeneralSettings
-TARGET = qmlgeneralsettingsplugin
+TARGET = localesettingsplugin
SOURCES += plugin.cpp
@@ -17,8 +16,3 @@ installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
target.path = $$installPath
pluginfiles.path += $$installPath
INSTALLS += target pluginfiles
-
-RESOURCES += \
- icons.qrc \
- qml.qrc
-
diff --git a/src/qtdevicesettings/localesettingsplugin/plugin.cpp b/src/imports/localesettings/plugin.cpp
index a050615..7edd2c5 100644
--- a/src/qtdevicesettings/localesettingsplugin/plugin.cpp
+++ b/src/imports/localesettings/plugin.cpp
@@ -40,9 +40,9 @@
#include <QQmlEngine>
#include <QQmlContext>
-#include "systemlocale.h"
-#include "localemodel.h"
-#include "localefiltermodel.h"
+#include <systemlocale.h>
+#include <localemodel.h>
+#include <localefiltermodel.h>
template <typename T>
QObject *instance(QQmlEngine *engine, QJSEngine *) {
diff --git a/src/qtdevicesettings/localesettingsplugin/qmldir b/src/imports/localesettings/qmldir
index e915482..3c59bb0 100644
--- a/src/qtdevicesettings/localesettingsplugin/qmldir
+++ b/src/imports/localesettings/qmldir
@@ -1,3 +1,2 @@
module com.theqtcompany.settings.locale
-Language 1.0 Language.qml
plugin localesettingsplugin
diff --git a/src/imports/networksettings/networksettings.pro b/src/imports/networksettings/networksettings.pro
new file mode 100644
index 0000000..45228c5
--- /dev/null
+++ b/src/imports/networksettings/networksettings.pro
@@ -0,0 +1,34 @@
+TEMPLATE = lib
+TARGET = networksettingsplugin
+QT += qml quick networksettings
+CONFIG += qt plugin
+
+uri = com.theqtcompany.settings.network
+
+SOURCES += \
+ plugin.cpp \
+
+HEADERS += \
+ plugin.h \
+
+DISTFILES = qmldir
+
+!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
+ copy_qmldir.target = $$OUT_PWD/qmldir
+ copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
+ copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
+ QMAKE_EXTRA_TARGETS += copy_qmldir
+ PRE_TARGETDEPS += $$copy_qmldir.target
+}
+
+qmldir.files = qmldir
+
+pluginfiles.files += \
+
+installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
+
+pluginfiles.path = $$installPath
+qmldir.path = $$installPath
+target.path = $$installPath
+INSTALLS += target qmldir pluginfiles
+
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.cpp b/src/imports/networksettings/plugin.cpp
index badb5ef..eeee147 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.cpp
+++ b/src/imports/networksettings/plugin.cpp
@@ -33,11 +33,11 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "networksettingsplugin_plugin.h"
-#include "qnetworksettings.h"
-#include "qnetworksettingsmanager.h"
-#include "qnetworksettingsservice.h"
-#include "qnetworksettingsuseragent.h"
+#include "plugin.h"
+#include <qnetworksettings.h>
+#include <qnetworksettingsmanager.h>
+#include <qnetworksettingsservice.h>
+#include <qnetworksettingsuseragent.h>
#include <qqml.h>
#include <QQmlEngine>
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.h b/src/imports/networksettings/plugin.h
index f47b964..f47b964 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.h
+++ b/src/imports/networksettings/plugin.h
diff --git a/src/qtdevicesettings/networksettingsplugin/qmldir b/src/imports/networksettings/qmldir
index 71f3726..7774745 100644
--- a/src/qtdevicesettings/networksettingsplugin/qmldir
+++ b/src/imports/networksettings/qmldir
@@ -1,4 +1,3 @@
module com.theqtcompany.settings.network
-NetworkSettings 1.0 NetworkSettings.qml
plugin networksettingsplugin
diff --git a/src/qtdevicesettings/timedateplugin/plugin.cpp b/src/imports/timedatesettings/plugin.cpp
index b092c2c..e55cddc 100644
--- a/src/qtdevicesettings/timedateplugin/plugin.cpp
+++ b/src/imports/timedatesettings/plugin.cpp
@@ -40,9 +40,9 @@
#include <QQmlEngine>
#include <QQmlContext>
-#include "systemtime.h"
-#include "timezonemodel.h"
-#include "timezonefiltermodel.h"
+#include <systemtime.h>
+#include <timezonemodel.h>
+#include <timezonefiltermodel.h>
template <typename T>
QObject *instance(QQmlEngine *engine, QJSEngine *) {
diff --git a/src/qtdevicesettings/timedateplugin/qmldir b/src/imports/timedatesettings/qmldir
index 2d7a8a6..3fc8fec 100644
--- a/src/qtdevicesettings/timedateplugin/qmldir
+++ b/src/imports/timedatesettings/qmldir
@@ -1,3 +1,2 @@
module com.theqtcompany.settings.timedate
-TimeDate 1.0 TimeDate.qml
plugin qmltimedatesettingsplugin
diff --git a/src/imports/timedatesettings/timedatesettings.pro b/src/imports/timedatesettings/timedatesettings.pro
new file mode 100644
index 0000000..ec86d4e
--- /dev/null
+++ b/src/imports/timedatesettings/timedatesettings.pro
@@ -0,0 +1,19 @@
+TEMPLATE = lib
+CONFIG += plugin
+QT += qml timedatesettings
+
+uri = com.theqtcompany.settings.timedate
+
+DESTDIR = imports/TimeDate
+TARGET = qmltimedatesettingsplugin
+
+SOURCES += plugin.cpp
+
+pluginfiles.files += qmldir
+
+installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
+
+target.path = $$installPath
+pluginfiles.path += $$installPath
+INSTALLS += target pluginfiles
+
diff --git a/src/imports/utils/plugin.cpp b/src/imports/utils/plugin.cpp
deleted file mode 100644
index a4f8810..0000000
--- a/src/imports/utils/plugin.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use the contact form at
-** http://www.qt.io
-**
-** This file is part of Qt Enterprise Embedded.
-**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** the contact form at http://www.qt.io
-**
-****************************************************************************/
-#include <b2qtdevice.h>
-#include <QtQml>
-
-/*!
- \qmlmodule B2Qt.Utils 1.0
- \title B2Qt Utils QML Module
- \ingroup qtee-qmlmodules
- \brief A collection of utility functions, accessible from QML.
-*/
-
-/*!
- \page b2qt-addon-utils.html
- \title B2Qt Utils Module
- \ingroup qtee-modules
- \brief A collection of utility functions, accessible from QML.
-
- Provides various utility functions for controlling an embedded
- device, such as display brightness, IP address and hostname, and
- device shutdown/reboot.
-
- Import the module as follows:
-
- \badcode
- import B2Qt.Utils 1.0
- \endcode
-
- This will give you access to the singleton QML type B2QtDevice.
-
- \note Some functions are currently only implemented for one of
- the platforms.
-
- \section1 QML Types
-
- \annotatedlist utils-qmltypes
-*/
-
-/*!
- \qmltype B2QtDevice
- \inqmlmodule B2Qt.Utils
- \ingroup utils-qmltypes
- \brief Singleton QML type providing access to utility functions.
-
- B2QtDevice QML type is the interface to various utility
- functions.
-
- There is no need to create an instance of this object. To use it,
- simply import the \c {B2Qt.Utils} module:
-
- \qml
- import B2Qt.Utils 1.0
-
- Text {
- text: qsTr("IP Address:") + B2QtDevice.ipAddress
- }
- \endqml
-
- \note Some functions are currently only implemented for one of
- the platforms.
-*/
-
-/*!
- \qmlmethod B2Qt.Utils::B2QtDevice::reboot()
-
- Reboots the system. Does not return.
-
- \sa powerOff()
-*/
-
-/*!
- \qmlmethod B2Qt.Utils::B2QtDevice::powerOff()
-
- Shuts down the system. Does not return.
-
- \sa reboot()
-*/
-
-/*!
- \qmlproperty int B2Qt.Utils::B2QtDevice::masterVolume
-
- This property holds the master volume of the device.
- The volume can range from \c 0 to \c 100 and is linear.
- Changing the master volume will affect all audio streams.
-
- \note Currently implemented only for \B2QA.
-*/
-
-/*!
- \qmlproperty int B2Qt.Utils::B2QtDevice::displayBrightness
- This property holds the display brightness (the intensity of the backlight).
- The value is in the range from \c 0 to \c 255, where 255 is the maximum
- brightness, and 0 is the minimum (typically, the backlight is turned off).
-
- \note Currently implemented only for \B2QA.
-*/
-
-/*!
- \qmlproperty string B2Qt.Utils::B2QtDevice::ipAddress
- \readonly
-
- This property holds the current IP address(es) of the device
- for all active network interfaces. If multiple IP addresses are defined,
- this property holds a comma-separated list. The localhost (loopback)
- IP addresses are omitted.
-
- \sa hostname
-*/
-
-/*!
- \qmlproperty string B2Qt.Utils::B2QtDevice::hostname
-
- This property holds the current hostname of the device.
-
- \sa ipAddress
-*/
-
-static QObject *module_api_factory(QQmlEngine *engine, QJSEngine *scriptEngine)
-{
- Q_UNUSED(engine)
- Q_UNUSED(scriptEngine)
- B2QtDevice *api = new B2QtDevice();
-
- return api;
-}
-
-class B2QtUtilsPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- B2QtUtilsPlugin()
- {
- }
-
- void registerTypes(const char *uri)
- {
- Q_ASSERT(QLatin1String(uri) == "B2Qt.Utils");
- qmlRegisterSingletonType<B2QtDevice>(uri, 1, 0, "B2QtDevice", module_api_factory);
- }
-};
-
-#include "plugin.moc"
diff --git a/src/imports/utils/qmldir b/src/imports/utils/qmldir
deleted file mode 100644
index e5e0b31..0000000
--- a/src/imports/utils/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-module B2Qt.Utils
-plugin b2qtutilsplugin
-typeinfo plugins.qmltypes
diff --git a/src/imports/utils/utils.pro b/src/imports/utils/utils.pro
deleted file mode 100644
index a580643..0000000
--- a/src/imports/utils/utils.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-CXX_MODULE = qml
-TARGET = b2qtutilsplugin
-TARGETPATH = B2Qt/Utils
-IMPORT_VERSION = 1.0
-
-QT += qml b2qtutils
-
-SOURCES += plugin.cpp
-
-load(qml_plugin)
diff --git a/src/localdevice/localdevice.pro b/src/localdevice/localdevice.pro
new file mode 100644
index 0000000..e6e5bc9
--- /dev/null
+++ b/src/localdevice/localdevice.pro
@@ -0,0 +1,16 @@
+load(qt_build_config)
+
+TARGET = QtLocalDevice
+VERSION = 1.0
+CONFIG += dll warn_on
+
+QT = core
+
+MODULE = localdevice
+load(qt_module)
+
+HEADERS += \
+ $$PWD/qlocaldevice.h
+
+SOURCES += \
+ $$PWD/qlocaldevice.cpp
diff --git a/src/localdevice/qlocaldevice.cpp b/src/localdevice/qlocaldevice.cpp
new file mode 100644
index 0000000..86893fd
--- /dev/null
+++ b/src/localdevice/qlocaldevice.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use the contact form at
+** http://www.qt.io
+**
+** This file is part of Qt Enterprise Embedded.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** the contact form at http://www.qt.io
+**
+****************************************************************************/
+#include "qlocaldevice.h"
+#include <unistd.h>
+#include <sys/reboot.h>
+
+
+QLocalDevice::QLocalDevice(QObject *parent)
+ : QObject(parent)
+{
+}
+
+QLocalDevice::~QLocalDevice()
+{
+}
+
+/*!
+ * Reboots the system. Does not return.
+ *
+ * \sa powerOff()
+ */
+void QLocalDevice::reboot()
+{
+ sync();
+ ::reboot(RB_AUTOBOOT);
+ qWarning("reboot returned");
+}
+
+
+/*!
+ * Shuts down the system. Does not return.
+ *
+ * \sa reboot()
+ */
+void QLocalDevice::powerOff()
+{
+ sync();
+ ::reboot(RB_POWER_OFF);
+ qWarning("powerOff returned");
+}
+
diff --git a/src/localdevice/qlocaldevice.h b/src/localdevice/qlocaldevice.h
new file mode 100644
index 0000000..cf289c8
--- /dev/null
+++ b/src/localdevice/qlocaldevice.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use the contact form at
+** http://www.qt.io
+**
+** This file is part of Qt Enterprise Embedded.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** the contact form at http://www.qt.io
+**
+****************************************************************************/
+#ifndef QLOCALDEVICE_H
+#define QLOCALDEVICE_H
+
+#include <qobject.h>
+
+class Q_DECL_EXPORT QLocalDevice : public QObject
+{
+ Q_OBJECT
+
+public:
+ QLocalDevice(QObject *parent = 0);
+ ~QLocalDevice();
+
+public Q_SLOTS:
+ void reboot();
+ void powerOff();
+};
+
+#endif // QLOCALDEVICE_H
diff --git a/src/localesettings/locale.xml b/src/localesettings/locale.xml
new file mode 100644
index 0000000..b722456
--- /dev/null
+++ b/src/localesettings/locale.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<node name="/Service" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node>
+ <interface name="org.freedesktop.locale1">
+ <property name="Locale" type="as" access="read"/>
+ <method name="SetLocale">
+ <arg name="locale" type="as" direction="in"/>
+ <arg name="user_interaction" type="b" direction="in"/>
+ </method>
+ </interface>
+</node>
+
diff --git a/src/qtdevicesettings/localesettingsplugin/localefiltermodel.cpp b/src/localesettings/localefiltermodel.cpp
index 027caba..027caba 100644
--- a/src/qtdevicesettings/localesettingsplugin/localefiltermodel.cpp
+++ b/src/localesettings/localefiltermodel.cpp
diff --git a/src/qtdevicesettings/localesettingsplugin/localefiltermodel.h b/src/localesettings/localefiltermodel.h
index f4dce1b..d63adb9 100644
--- a/src/qtdevicesettings/localesettingsplugin/localefiltermodel.h
+++ b/src/localesettings/localefiltermodel.h
@@ -38,7 +38,7 @@
#include <QSortFilterProxyModel>
-class LocaleFilterModel : public QSortFilterProxyModel
+class Q_DECL_EXPORT LocaleFilterModel : public QSortFilterProxyModel
{
Q_OBJECT
Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
diff --git a/src/qtdevicesettings/localesettingsplugin/localemodel.cpp b/src/localesettings/localemodel.cpp
index be24e02..40d5fc8 100644
--- a/src/qtdevicesettings/localesettingsplugin/localemodel.cpp
+++ b/src/localesettings/localemodel.cpp
@@ -35,7 +35,6 @@
****************************************************************************/
#include <QLocale>
-#include <QQmlPropertyMap>
#include <QFuture>
#include <QFutureWatcher>
#include <QThread>
diff --git a/src/qtdevicesettings/localesettingsplugin/localemodel.h b/src/localesettings/localemodel.h
index b83286e..6ed5844 100644
--- a/src/qtdevicesettings/localesettingsplugin/localemodel.h
+++ b/src/localesettings/localemodel.h
@@ -59,7 +59,7 @@ private:
QString m_code;
};
-class LocaleModel : public QAbstractListModel
+class Q_DECL_EXPORT LocaleModel : public QAbstractListModel
{
Q_OBJECT
@@ -70,7 +70,6 @@ public:
int rowCount(const QModelIndex & parent = QModelIndex()) const;
QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
QHash<int, QByteArray> roleNames() const;
- Q_INVOKABLE QVariant itemFromRow(const int row) const;
void sort(int column, Qt::SortOrder order=Qt::AscendingOrder);
static bool variantLessThan(const LocaleItem* v1, const LocaleItem* v2);
diff --git a/src/localesettings/localesettings.pro b/src/localesettings/localesettings.pro
new file mode 100644
index 0000000..808477d
--- /dev/null
+++ b/src/localesettings/localesettings.pro
@@ -0,0 +1,22 @@
+load(qt_build_config)
+
+TARGET = QtLocaleSettings
+VERSION = 1.0
+CONFIG += dll warn_on
+
+QT = core dbus
+
+MODULE = localesettings
+load(qt_module)
+
+DBUS_INTERFACES = locale.xml
+
+HEADERS = \
+ systemlocale.h \
+ systemlocale_p.h \
+ localemodel.h \
+ localefiltermodel.h
+SOURCES += systemlocale.cpp \
+ localemodel.cpp \
+ localefiltermodel.cpp
+
diff --git a/src/qtdevicesettings/localesettingsplugin/systemlocale.cpp b/src/localesettings/systemlocale.cpp
index 21a1105..21a1105 100644
--- a/src/qtdevicesettings/localesettingsplugin/systemlocale.cpp
+++ b/src/localesettings/systemlocale.cpp
diff --git a/src/qtdevicesettings/localesettingsplugin/systemlocale.h b/src/localesettings/systemlocale.h
index c02fdd3..9472e9c 100644
--- a/src/qtdevicesettings/localesettingsplugin/systemlocale.h
+++ b/src/localesettings/systemlocale.h
@@ -40,7 +40,7 @@
class SystemLocalePrivate;
-class SystemLocale : public QObject
+class Q_DECL_EXPORT SystemLocale : public QObject
{
Q_OBJECT
Q_PROPERTY(QString locale READ locale WRITE setLocale NOTIFY localeChanged)
diff --git a/src/qtdevicesettings/localesettingsplugin/systemlocale_p.h b/src/localesettings/systemlocale_p.h
index 417b958..417b958 100644
--- a/src/qtdevicesettings/localesettingsplugin/systemlocale_p.h
+++ b/src/localesettings/systemlocale_p.h
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman.pri b/src/networksettings/connman.pri
index 4e9e6b3..957f2f0 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman.pri
+++ b/src/networksettings/connman.pri
@@ -3,9 +3,9 @@ QT += core network dbus
INCLUDEPATH += $${PWD}/connman
DBUS_INTERFACES = \
- networksettings/connman/connman_manager.xml \
- networksettings/connman/connman_service.xml \
- networksettings/connman/connman_technology.xml
+ connman/connman_manager.xml \
+ connman/connman_service.xml \
+ connman/connman_technology.xml
SOURCES += \
$$PWD/connman/qnetworksettingsinterface_p.cpp \
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_manager.xml b/src/networksettings/connman/connman_manager.xml
index 5c52b27..5c52b27 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_manager.xml
+++ b/src/networksettings/connman/connman_manager.xml
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_service.xml b/src/networksettings/connman/connman_service.xml
index c41aca4..c41aca4 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_service.xml
+++ b/src/networksettings/connman/connman_service.xml
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_technology.xml b/src/networksettings/connman/connman_technology.xml
index 08d780f..08d780f 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_technology.xml
+++ b/src/networksettings/connman/connman_technology.xml
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connmancommon.cpp b/src/networksettings/connman/connmancommon.cpp
index 94a1fa1..94a1fa1 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connmancommon.cpp
+++ b/src/networksettings/connman/connmancommon.cpp
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connmancommon.h b/src/networksettings/connman/connmancommon.h
index dd3e7af..16850ea 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connmancommon.h
+++ b/src/networksettings/connman/connmancommon.h
@@ -41,21 +41,21 @@
#include <qnetworksettings.h>
#define AgentPath "/ConnmanAgent"
-#define PropertyState "State"
-#define PropertyName "Name"
-#define PropertyType "Type"
-#define PropertyConnected "Connected"
-#define PropertyPowered "Powered"
+#define PropertyState QStringLiteral("State")
+#define PropertyName QStringLiteral("Name")
+#define PropertyType QStringLiteral("Type")
+#define PropertyConnected QStringLiteral("Connected")
+#define PropertyPowered QStringLiteral("Powered")
-#define AttributeWifi "wifi"
-#define AttributeEthernet "ethernet"
-#define AttributeIdle "idle"
-#define AttributeFailure "failure"
-#define AttributeAssociation "association"
-#define AttributeConfiguration "configuration"
-#define AttributeReady "ready"
-#define AttributeDisconnect "disconnect"
-#define AttributeOneline "online"
+#define AttributeWifi QStringLiteral("wifi")
+#define AttributeEthernet QStringLiteral("ethernet")
+#define AttributeIdle QStringLiteral("idle")
+#define AttributeFailure QStringLiteral("failure")
+#define AttributeAssociation QStringLiteral("association")
+#define AttributeConfiguration QStringLiteral("configuration")
+#define AttributeReady QStringLiteral("ready")
+#define AttributeDisconnect QStringLiteral("disconnect")
+#define AttributeOneline QStringLiteral("online")
struct ConnmanMap {
QDBusObjectPath objectPath;
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsinterface_p.cpp b/src/networksettings/connman/qnetworksettingsinterface_p.cpp
index 9a034d0..dda05be 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsinterface_p.cpp
+++ b/src/networksettings/connman/qnetworksettingsinterface_p.cpp
@@ -47,7 +47,7 @@ QNetworkSettingsInterfacePrivate::QNetworkSettingsInterfacePrivate(QNetworkSetti
void QNetworkSettingsInterfacePrivate::initialize(const QString& path, const QVariantMap& properties)
{
- m_technology = new NetConnmanTechnologyInterface("net.connman", path,
+ m_technology = new NetConnmanTechnologyInterface(QStringLiteral("net.connman"), path,
QDBusConnection::systemBus(), this);
connect(m_technology, SIGNAL(PropertyChanged(QString,QDBusVariant)),
this, SLOT(updateProperty(QString,QDBusVariant)));
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsinterface_p.h b/src/networksettings/connman/qnetworksettingsinterface_p.h
index 6e1d5ca..6e1d5ca 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsinterface_p.h
+++ b/src/networksettings/connman/qnetworksettingsinterface_p.h
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsmanager_p.cpp b/src/networksettings/connman/qnetworksettingsmanager_p.cpp
index 8df7276..64b4341 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsmanager_p.cpp
+++ b/src/networksettings/connman/qnetworksettingsmanager_p.cpp
@@ -38,13 +38,16 @@
#include "moc_connman_manager_interface.cpp"
#include "qnetworksettingsinterface.h"
#include "qnetworksettingsinterface_p.h"
+#include "qnetworksettingsservicemodel.h"
QNetworkSettingsManagerPrivate::QNetworkSettingsManagerPrivate(QNetworkSettingsManager *parent)
:QObject(parent)
,q_ptr(parent)
{
- m_serviceFilter.setSourceModel(&m_serviceModel);
- m_manager = new NetConnmanManagerInterface("net.connman", "/",
+ m_serviceModel = new QNetworkSettingsServiceModel(this);
+ m_serviceFilter = new QNetworkSettingsServiceFilter(this);
+ m_serviceFilter->setSourceModel(m_serviceModel);
+ m_manager = new NetConnmanManagerInterface(QStringLiteral("net.connman"), QStringLiteral("/"),
QDBusConnection::systemBus(), this);
if (m_manager->isValid()) {
@@ -72,7 +75,7 @@ QNetworkSettingsManagerPrivate::QNetworkSettingsManagerPrivate(QNetworkSettingsM
void QNetworkSettingsManagerPrivate::requestInput(const QString& service, const QString& type)
{
Q_UNUSED(type);
- foreach (QNetworkSettingsService* servicePtr, m_serviceModel.getModel()) {
+ foreach (QNetworkSettingsService* servicePtr, m_serviceModel->getModel()) {
if (servicePtr->id() == service)
emit servicePtr->showCrendentialInput();
}
@@ -89,7 +92,7 @@ void QNetworkSettingsManagerPrivate::getServicesFinished(QDBusPendingCallWatcher
foreach (const ConnmanMap &object, reply.value()) {
const QString servicePath = object.objectPath.path();
QNetworkSettingsService *service = new QNetworkSettingsService(servicePath, this);
- m_serviceModel.append(service);
+ m_serviceModel->append(service);
//Update status property
QString n = qdbus_cast<QString>(object.propertyMap[PropertyName]);
@@ -136,7 +139,7 @@ void QNetworkSettingsManagerPrivate::getTechnologiesFinished(QDBusPendingCallWat
void QNetworkSettingsManagerPrivate::servicesChanged(ConnmanMapList changed, const QList<QDBusObjectPath> &removed)
{
foreach (QDBusObjectPath path, removed) {
- QList<QNetworkSettingsService*> serviceList = m_serviceModel.getModel();
+ QList<QNetworkSettingsService*> serviceList = m_serviceModel->getModel();
QMutableListIterator<QNetworkSettingsService*> i(serviceList);
while (i.hasNext()) {
if (i.next()->id() == path.path())
@@ -147,7 +150,7 @@ void QNetworkSettingsManagerPrivate::servicesChanged(ConnmanMapList changed, con
QStringList newServices;
foreach (ConnmanMap map, changed) {
bool found = false;
- foreach (QNetworkSettingsService* service, m_serviceModel.getModel()) {
+ foreach (QNetworkSettingsService* service, m_serviceModel->getModel()) {
if (service->id() == map.objectPath.path()) {
found =true;
break;
@@ -158,11 +161,11 @@ void QNetworkSettingsManagerPrivate::servicesChanged(ConnmanMapList changed, con
}
foreach (QString newService, newServices) {
QNetworkSettingsService *service = new QNetworkSettingsService(newService, this);
- m_serviceModel.append(service);
+ m_serviceModel->append(service);
}
}
void QNetworkSettingsManagerPrivate::setUserAgent(QNetworkSettingsUserAgent *agent)
{
-
+ Q_UNUSED(agent);
}
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsmanager_p.h b/src/networksettings/connman/qnetworksettingsmanager_p.h
index cadf63f..3176c98 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsmanager_p.h
+++ b/src/networksettings/connman/qnetworksettingsmanager_p.h
@@ -41,9 +41,10 @@
#include "connmancommon.h"
#include "qnetworksettingsmanager.h"
#include "qnetworksettingsinterfacemodel.h"
-#include "qnetworksettingsservicemodel.h"
class NetConnmanManagerInterface;
+class QNetworkSettingsServiceModel;
+class QNetworkSettingsServiceFilter;
class QNetworkSettingsManagerPrivate : public QObject
{
@@ -62,8 +63,8 @@ public slots:
protected:
QNetworkSettingsInterfaceModel m_interfaceModel;
- QNetworkSettingsServiceModel m_serviceModel;
- QNetworkSettingsServiceFilter m_serviceFilter;
+ QNetworkSettingsServiceModel *m_serviceModel;
+ QNetworkSettingsServiceFilter *m_serviceFilter;
private:
NetConnmanManagerInterface *m_manager;
};
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsservice_p.cpp b/src/networksettings/connman/qnetworksettingsservice_p.cpp
index 9e2e83c..b4e33a3 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsservice_p.cpp
+++ b/src/networksettings/connman/qnetworksettingsservice_p.cpp
@@ -37,42 +37,42 @@
#include "connman_service_interface.h"
#include "connmancommon.h"
-const QString PropertyIPv4("IPv4");
-const QString PropertyQNetworkSettingsIPv4("IPv4.Configuration");
-const QString PropertyIPv6("IPv6");
-const QString PropertyQNetworkSettingsIPv6("IPv6.Configuration");
-const QString PropertyNameservers("Nameservers");
-const QString PropertyNameserversConfig("Nameservers.Configuration");
-const QString PropertyDomains("Domains");
-const QString PropertyDomainsConfig("Domains.Configuration");
-const QString PropertyProxy("Proxy");
-const QString PropertyQNetworkSettingsProxy("Proxy.Configuration");
-const QString PropertyAddress("Address");
-const QString PropertyNetMask("Netmask");
-const QString PropertyGateway("Gateway");
-const QString PropertyPrefixLength("PrefixLength");
-const QString PropertyMethod("Method");
-const QString PropertyPrivacy("Privacy");
-const QString PropertyUrl("Url");
-const QString PropertyServers("Servers");
-const QString PropertyExcludes("Excludes");
-const QString PropertyStrength("Strength");
-const QString PropertySecurity("Security");
-
-const QString AttributeAuto("auto");
-const QString AttributeDhcp("dhcp");
-const QString AttributeManual("manual");
-const QString AttributeOff("off");
-const QString AttributeDisabled("disabled");
-const QString AttributeEnabled("enabled");
-const QString AttributePreferred("preferred");
-const QString AttributeDirect("direct");
-const QString AttributeNone("none");
-const QString AttributeWep("wep");
-const QString AttributePsk("psk");
-const QString AttributeIeee("ieee8021x");
-const QString AttributeWps("wps");
-const QString AttributeInvalidKey("invalid-key");
+const QString PropertyIPv4(QStringLiteral("IPv4"));
+const QString PropertyQNetworkSettingsIPv4(QStringLiteral("IPv4.Configuration"));
+const QString PropertyIPv6(QStringLiteral("IPv6"));
+const QString PropertyQNetworkSettingsIPv6(QStringLiteral("IPv6.Configuration"));
+const QString PropertyNameservers(QStringLiteral("Nameservers"));
+const QString PropertyNameserversConfig(QStringLiteral("Nameservers.Configuration"));
+const QString PropertyDomains(QStringLiteral("Domains"));
+const QString PropertyDomainsConfig(QStringLiteral("Domains.Configuration"));
+const QString PropertyProxy(QStringLiteral("Proxy"));
+const QString PropertyQNetworkSettingsProxy(QStringLiteral("Proxy.Configuration"));
+const QString PropertyAddress(QStringLiteral("Address"));
+const QString PropertyNetMask(QStringLiteral("Netmask"));
+const QString PropertyGateway(QStringLiteral("Gateway"));
+const QString PropertyPrefixLength(QStringLiteral("PrefixLength"));
+const QString PropertyMethod(QStringLiteral("Method"));
+const QString PropertyPrivacy(QStringLiteral("Privacy"));
+const QString PropertyUrl(QStringLiteral("Url"));
+const QString PropertyServers(QStringLiteral("Servers"));
+const QString PropertyExcludes(QStringLiteral("Excludes"));
+const QString PropertyStrength(QStringLiteral("Strength"));
+const QString PropertySecurity(QStringLiteral("Security"));
+
+const QString AttributeAuto(QStringLiteral("auto"));
+const QString AttributeDhcp(QStringLiteral("dhcp"));
+const QString AttributeManual(QStringLiteral("manual"));
+const QString AttributeOff(QStringLiteral("off"));
+const QString AttributeDisabled(QStringLiteral("disabled"));
+const QString AttributeEnabled(QStringLiteral("enabled"));
+const QString AttributePreferred(QStringLiteral("preferred"));
+const QString AttributeDirect(QStringLiteral("direct"));
+const QString AttributeNone(QStringLiteral("none"));
+const QString AttributeWep(QStringLiteral("wep"));
+const QString AttributePsk(QStringLiteral("psk"));
+const QString AttributeIeee(QStringLiteral("ieee8021x"));
+const QString AttributeWps(QStringLiteral("wps"));
+const QString AttributeInvalidKey(QStringLiteral("invalid-key"));
const QVariantMap &operator>>(const QVariantMap &argument, QNetworkSettingsIPv4 &obj)
{
@@ -249,7 +249,7 @@ QNetworkSettingsServicePrivate::QNetworkSettingsServicePrivate(const QString& id
qDBusRegisterMetaType<ConnmanMap>();
qDBusRegisterMetaType<ConnmanMapList>();
- m_service = new NetConnmanServiceInterface("net.connman", m_id,
+ m_service = new NetConnmanServiceInterface(QStringLiteral("net.connman"), m_id,
QDBusConnection::systemBus(), this);
connect(m_service, SIGNAL(PropertyChanged(QString,QDBusVariant)),
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsservice_p.h b/src/networksettings/connman/qnetworksettingsservice_p.h
index 39a04bd..39a04bd 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsservice_p.h
+++ b/src/networksettings/connman/qnetworksettingsservice_p.h
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsuseragent_p.cpp b/src/networksettings/connman/qnetworksettingsuseragent_p.cpp
index 3b10bed..514745e 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsuseragent_p.cpp
+++ b/src/networksettings/connman/qnetworksettingsuseragent_p.cpp
@@ -36,7 +36,7 @@
#include "qnetworksettingsuseragent_p.h"
#include "connmancommon.h"
-const QString PropertyPassphrase("Passphrase");
+const QString PropertyPassphrase(QStringLiteral("Passphrase"));
QNetworkSettingsUserAgentPrivate::QNetworkSettingsUserAgentPrivate(QNetworkSettingsUserAgent *parent)
:QDBusAbstractAdaptor(parent)
@@ -72,7 +72,7 @@ void QNetworkSettingsUserAgentPrivate::ReportError(const QDBusObjectPath &path,
void QNetworkSettingsUserAgentPrivate::registerAgent()
{
Q_Q(QNetworkSettingsUserAgent);
- QDBusConnection::systemBus().registerObject(AgentPath, q_ptr);
+ QDBusConnection::systemBus().registerObject(QStringLiteral(AgentPath), q);
}
QVariantMap QNetworkSettingsUserAgentPrivate::RequestInput(const QDBusObjectPath &path, const QVariantMap &params, const QDBusMessage &msg)
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsuseragent_p.h b/src/networksettings/connman/qnetworksettingsuseragent_p.h
index 92e1516..efde5b5 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/qnetworksettingsuseragent_p.h
+++ b/src/networksettings/connman/qnetworksettingsuseragent_p.h
@@ -49,7 +49,7 @@ class QStringList;
class QVariant;
QT_END_NAMESPACE
-const QString AgentPath("/ConnmanAgent");
+const QString AgentPath(QStringLiteral("/ConnmanAgent"));
class QNetworkSettingsUserAgentPrivate : public QDBusAbstractAdaptor
{
diff --git a/src/networksettings/networksettings.pro b/src/networksettings/networksettings.pro
new file mode 100644
index 0000000..9ae1bb3
--- /dev/null
+++ b/src/networksettings/networksettings.pro
@@ -0,0 +1,37 @@
+load(qt_build_config)
+
+TARGET = QtNetworkSettings
+VERSION = 1.0
+CONFIG += dll warn_on
+
+QT = core network
+
+MODULE = networksettings
+load(qt_module)
+
+wpasupplicant {
+ include(wpasupplicant.pri)
+}
+else {
+ include(connman.pri)
+}
+
+# Input
+SOURCES += \
+ qnetworksettingsinterfacemodel.cpp \
+ qnetworksettingsmanager.cpp \
+ qnetworksettingsaddressmodel.cpp \
+ qnetworksettingsservicemodel.cpp \
+ qnetworksettingsservice.cpp \
+ qnetworksettingsuseragent.cpp \
+ qnetworksettingsinterface.cpp \
+
+HEADERS += \
+ qnetworksettingsinterfacemodel.h \
+ qnetworksettings.h \
+ qnetworksettingsmanager.h \
+ qnetworksettingsaddressmodel.h \
+ qnetworksettingsservicemodel.h \
+ qnetworksettingsservice.h \
+ qnetworksettingsuseragent.h \
+ qnetworksettingsinterface.h \
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettings.h b/src/networksettings/qnetworksettings.h
index fdf677b..839d5a9 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettings.h
+++ b/src/networksettings/qnetworksettings.h
@@ -41,7 +41,7 @@
#include <QVariantMap>
#include "qnetworksettingsaddressmodel.h"
-class QNetworkSettingsState : public QObject
+class Q_DECL_EXPORT QNetworkSettingsState : public QObject
{
Q_OBJECT
Q_ENUMS(States)
@@ -78,7 +78,7 @@ private:
States m_state;
};
-class QNetworkSettingsType : public QObject
+class Q_DECL_EXPORT QNetworkSettingsType : public QObject
{
Q_OBJECT
Q_ENUMS(Types)
@@ -121,7 +121,7 @@ private:
Types m_type;
};
-class QNetworkSettingsIPv4 : public QObject
+class Q_DECL_EXPORT QNetworkSettingsIPv4 : public QObject
{
Q_OBJECT
Q_ENUMS(MethodType)
@@ -188,7 +188,7 @@ private:
};
-class QNetworkSettingsIPv6 : public QObject
+class Q_DECL_EXPORT QNetworkSettingsIPv6 : public QObject
{
Q_OBJECT
Q_ENUMS(MethodType PrivacyType)
@@ -267,7 +267,7 @@ private:
int m_prefixLength;
};
-class QNetworkSettingsProxy : public QObject
+class Q_DECL_EXPORT QNetworkSettingsProxy : public QObject
{
Q_OBJECT
Q_ENUMS(MethodType)
@@ -341,7 +341,7 @@ private:
MethodType m_method;
};
-class QNetworkSettingsWireless : public QObject
+class Q_DECL_EXPORT QNetworkSettingsWireless : public QObject
{
Q_OBJECT
Q_PROPERTY(int signalStrength READ signalStrength WRITE setSignalStrength NOTIFY signalStrengthChanged)
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsaddressmodel.cpp b/src/networksettings/qnetworksettingsaddressmodel.cpp
index b70278b..b70278b 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsaddressmodel.cpp
+++ b/src/networksettings/qnetworksettingsaddressmodel.cpp
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsaddressmodel.h b/src/networksettings/qnetworksettingsaddressmodel.h
index b7a1c2e..429443a 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsaddressmodel.h
+++ b/src/networksettings/qnetworksettingsaddressmodel.h
@@ -38,7 +38,7 @@
#include <QStringListModel>
-class QNetworkSettingsAddressModel : public QStringListModel
+class Q_DECL_EXPORT QNetworkSettingsAddressModel : public QStringListModel
{
Q_OBJECT
Q_PROPERTY(int count READ count NOTIFY countChanged)
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsinterface.cpp b/src/networksettings/qnetworksettingsinterface.cpp
index 893311a..893311a 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsinterface.cpp
+++ b/src/networksettings/qnetworksettingsinterface.cpp
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsinterface.h b/src/networksettings/qnetworksettingsinterface.h
index bce4848..cf52ae3 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsinterface.h
+++ b/src/networksettings/qnetworksettingsinterface.h
@@ -42,7 +42,7 @@
QT_FORWARD_DECLARE_CLASS(QNetworkSettingsInterfacePrivate)
-class QNetworkSettingsInterface : public QObject {
+class Q_DECL_EXPORT QNetworkSettingsInterface : public QObject {
Q_OBJECT
Q_PROPERTY(QString name READ name NOTIFY nameChanged)
Q_PROPERTY(QNetworkSettingsState::States state READ state NOTIFY stateChanged)
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsinterfacemodel.cpp b/src/networksettings/qnetworksettingsinterfacemodel.cpp
index a539756..b25787d 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsinterfacemodel.cpp
+++ b/src/networksettings/qnetworksettingsinterfacemodel.cpp
@@ -33,7 +33,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QQmlPropertyMap>
#include "qnetworksettingsinterfacemodel.h"
#include "qnetworksettingsinterface.h"
@@ -46,11 +45,6 @@ QNetworkSettingsInterfaceModel::QNetworkSettingsInterfaceModel(QObject *parent)
m_roleNames.insert(Name, "name");
}
-QNetworkSettingsInterfaceModel::~QNetworkSettingsInterfaceModel()
-{
-
-}
-
QHash<int, QByteArray> QNetworkSettingsInterfaceModel::roleNames() const
{
return m_roleNames;
@@ -83,7 +77,7 @@ QVariant QNetworkSettingsInterfaceModel::data(const QModelIndex & index, int rol
return item->state();
break;
default:
- return "";
+ return QStringLiteral("");
}
}
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsinterfacemodel.h b/src/networksettings/qnetworksettingsinterfacemodel.h
index 2105061..fb7be45 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsinterfacemodel.h
+++ b/src/networksettings/qnetworksettingsinterfacemodel.h
@@ -41,13 +41,12 @@
class QNetworkSettingsInterface;
-class QNetworkSettingsInterfaceModel : public QAbstractListModel
+class Q_DECL_EXPORT QNetworkSettingsInterfaceModel : public QAbstractListModel
{
Q_OBJECT
public:
explicit QNetworkSettingsInterfaceModel(QObject *parent=0);
- virtual ~QNetworkSettingsInterfaceModel();
// from QAbstractItemModel
int rowCount(const QModelIndex & parent = QModelIndex()) const;
QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsmanager.cpp b/src/networksettings/qnetworksettingsmanager.cpp
index 954d639..095d1a0 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsmanager.cpp
+++ b/src/networksettings/qnetworksettingsmanager.cpp
@@ -49,7 +49,7 @@ QNetworkSettingsManager::QNetworkSettingsManager(QObject *parent) :
QAbstractItemModel* QNetworkSettingsManager::services()
{
Q_D(QNetworkSettingsManager);
- return &d->m_serviceFilter;
+ return d->m_serviceFilter;
}
QAbstractItemModel* QNetworkSettingsManager::interfaces()
@@ -62,7 +62,7 @@ QNetworkSettingsService* QNetworkSettingsManager::getService(const QString& name
{
Q_D(QNetworkSettingsManager);
- foreach (QNetworkSettingsService* service, d->m_serviceModel.getModel()) {
+ foreach (QNetworkSettingsService* service, d->m_serviceModel->getModel()) {
if (service->name() == name && service->type() == type) {
return service;
}
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsmanager.h b/src/networksettings/qnetworksettingsmanager.h
index b0cb7fe..00980f4 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsmanager.h
+++ b/src/networksettings/qnetworksettingsmanager.h
@@ -38,14 +38,13 @@
#include "qnetworksettings.h"
#include <QObject>
-#include <QQmlListProperty>
#include <QStringListModel>
QT_FORWARD_DECLARE_CLASS(QNetworkSettingsManagerPrivate)
QT_FORWARD_DECLARE_CLASS(QNetworkSettingsService)
QT_FORWARD_DECLARE_CLASS(QNetworkSettingsUserAgent)
-class QNetworkSettingsManager : public QObject
+class Q_DECL_EXPORT QNetworkSettingsManager : public QObject
{
Q_OBJECT
Q_ENUMS(StateTypes NetworkTypeTypes)
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsservice.cpp b/src/networksettings/qnetworksettingsservice.cpp
index 8ade875..727c929 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsservice.cpp
+++ b/src/networksettings/qnetworksettingsservice.cpp
@@ -56,6 +56,11 @@ QString QNetworkSettingsService::name() const
return d->m_name;
}
+void QNetworkSettingsService::setAutoConnect(const bool autoconnect)
+{
+ Q_UNUSED(autoconnect);
+}
+
QNetworkSettingsState::States QNetworkSettingsService::state()
{
Q_D(QNetworkSettingsService);
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsservice.h b/src/networksettings/qnetworksettingsservice.h
index 96d4244..aa0be2c 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsservice.h
+++ b/src/networksettings/qnetworksettingsservice.h
@@ -41,7 +41,7 @@
QT_FORWARD_DECLARE_CLASS(QNetworkSettingsServicePrivate)
-class QNetworkSettingsService : public QObject
+class Q_DECL_EXPORT QNetworkSettingsService : public QObject
{
Q_OBJECT
Q_ENUMS(StateTypes)
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsservicemodel.cpp b/src/networksettings/qnetworksettingsservicemodel.cpp
index 6a80369..af84a3e 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsservicemodel.cpp
+++ b/src/networksettings/qnetworksettingsservicemodel.cpp
@@ -172,5 +172,6 @@ QVariant QNetworkSettingsServiceFilter::itemFromRow(const int row) const
return serviceItem;
}
}
- return QVariant::fromValue(QString(""));
+ return QVariant::fromValue(QStringLiteral(""));
}
+
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsservicemodel.h b/src/networksettings/qnetworksettingsservicemodel.h
index 50b0242..566018d 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsservicemodel.h
+++ b/src/networksettings/qnetworksettingsservicemodel.h
@@ -40,7 +40,7 @@
#include "qnetworksettings.h"
#include "qnetworksettingsservice.h"
-class QNetworkSettingsServiceModel : public QAbstractListModel
+class Q_DECL_EXPORT QNetworkSettingsServiceModel : public QAbstractListModel
{
Q_OBJECT
public:
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsuseragent.cpp b/src/networksettings/qnetworksettingsuseragent.cpp
index f1b0590..f1b0590 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsuseragent.cpp
+++ b/src/networksettings/qnetworksettingsuseragent.cpp
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsuseragent.h b/src/networksettings/qnetworksettingsuseragent.h
index be6dff3..c0e0b2f 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/qnetworksettingsuseragent.h
+++ b/src/networksettings/qnetworksettingsuseragent.h
@@ -40,7 +40,7 @@
QT_FORWARD_DECLARE_CLASS(QNetworkSettingsUserAgentPrivate)
-class QNetworkSettingsUserAgent : public QObject
+class Q_DECL_EXPORT QNetworkSettingsUserAgent : public QObject
{
Q_OBJECT
public:
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant.pri b/src/networksettings/wpasupplicant.pri
index db89315..db89315 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant.pri
+++ b/src/networksettings/wpasupplicant.pri
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsinterface_p.cpp b/src/networksettings/wpasupplicant/qnetworksettingsinterface_p.cpp
index 7370421..7370421 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsinterface_p.cpp
+++ b/src/networksettings/wpasupplicant/qnetworksettingsinterface_p.cpp
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsinterface_p.h b/src/networksettings/wpasupplicant/qnetworksettingsinterface_p.h
index d8964c3..d8964c3 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsinterface_p.h
+++ b/src/networksettings/wpasupplicant/qnetworksettingsinterface_p.h
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsmanager_p.cpp b/src/networksettings/wpasupplicant/qnetworksettingsmanager_p.cpp
index 17a1f2f..17a1f2f 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsmanager_p.cpp
+++ b/src/networksettings/wpasupplicant/qnetworksettingsmanager_p.cpp
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsmanager_p.h b/src/networksettings/wpasupplicant/qnetworksettingsmanager_p.h
index fa20fb4..fa20fb4 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsmanager_p.h
+++ b/src/networksettings/wpasupplicant/qnetworksettingsmanager_p.h
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsservice_p.cpp b/src/networksettings/wpasupplicant/qnetworksettingsservice_p.cpp
index b5d4545..b5d4545 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsservice_p.cpp
+++ b/src/networksettings/wpasupplicant/qnetworksettingsservice_p.cpp
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsservice_p.h b/src/networksettings/wpasupplicant/qnetworksettingsservice_p.h
index 12cc193..12cc193 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsservice_p.h
+++ b/src/networksettings/wpasupplicant/qnetworksettingsservice_p.h
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsuseragent_p.cpp b/src/networksettings/wpasupplicant/qnetworksettingsuseragent_p.cpp
index 4e636c0..4e636c0 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsuseragent_p.cpp
+++ b/src/networksettings/wpasupplicant/qnetworksettingsuseragent_p.cpp
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsuseragent_p.h b/src/networksettings/wpasupplicant/qnetworksettingsuseragent_p.h
index fc717dc..fc717dc 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qnetworksettingsuseragent_p.h
+++ b/src/networksettings/wpasupplicant/qnetworksettingsuseragent_p.h
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwificontroller.cpp b/src/networksettings/wpasupplicant/qwificontroller.cpp
index 8e6cfff..8e6cfff 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwificontroller.cpp
+++ b/src/networksettings/wpasupplicant/qwificontroller.cpp
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwificontroller_p.h b/src/networksettings/wpasupplicant/qwificontroller_p.h
index 902bc6e..902bc6e 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwificontroller_p.h
+++ b/src/networksettings/wpasupplicant/qwificontroller_p.h
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwifidevice.cpp b/src/networksettings/wpasupplicant/qwifidevice.cpp
index a6812e7..a6812e7 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwifidevice.cpp
+++ b/src/networksettings/wpasupplicant/qwifidevice.cpp
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwifidevice.h b/src/networksettings/wpasupplicant/qwifidevice.h
index 80b4891..80b4891 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwifidevice.h
+++ b/src/networksettings/wpasupplicant/qwifidevice.h
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwifisupplicant.cpp b/src/networksettings/wpasupplicant/qwifisupplicant.cpp
index 779475e..779475e 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwifisupplicant.cpp
+++ b/src/networksettings/wpasupplicant/qwifisupplicant.cpp
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwifisupplicant_p.h b/src/networksettings/wpasupplicant/qwifisupplicant_p.h
index 13855c0..13855c0 100644
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/wpasupplicant/qwifisupplicant_p.h
+++ b/src/networksettings/wpasupplicant/qwifisupplicant_p.h
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/icons.qrc b/src/qtdevicesettings/bluetoothsettingsplugin/icons.qrc
deleted file mode 100644
index a7c8d7e..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/icons.qrc
+++ /dev/null
@@ -1,16 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>../icons/Bluetooth_qt_1x.png</file>
- <file>../icons/Camcorder_qt_1x.png</file>
- <file>../icons/Camera_qt_1x.png</file>
- <file>../icons/Clock_qt_1x.png</file>
- <file>../icons/Headphones_qt_1x.png</file>
- <file>../icons/Heartbeat_qt_1x.png</file>
- <file>../icons/Keyboard_qt_1x.png</file>
- <file>../icons/Laptop_qt_1x.png</file>
- <file>../icons/Microphone_qt_1x.png</file>
- <file>../icons/MobilePhone_qt_1x.png</file>
- <file>../icons/Mouse_qt_1x.png</file>
- <file>../icons/Tablet_qt_1x.png</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/qml.qrc b/src/qtdevicesettings/bluetoothsettingsplugin/qml.qrc
deleted file mode 100644
index 1d36902..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/qml.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>Bluetooth.qml</file>
- <file>Discovery.qml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/generalsettingsplugin/Sound.qml b/src/qtdevicesettings/generalsettingsplugin/Sound.qml
deleted file mode 100644
index 7d854f4..0000000
--- a/src/qtdevicesettings/generalsettingsplugin/Sound.qml
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import B2Qt.Utils 1.0
-
-Item {
- id: root
- property string title: qsTr("Audio Settings")
-
- GroupBox {
- title: qsTr("Audio Settings")
- anchors.fill: parent
- anchors.margins: Math.round(40 * Flat.FlatStyle.scaleFactor)
- Layout.fillWidth: true
-
- Column {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
-
- RowLayout {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
-
- TextLabel {
- text: qsTr("Master volume: ")
- }
-
- Image {
- source: "../icons/Volume_down_qt_1x.png"
- }
-
- Slider {
- id: volumeSlider
- value: B2QtDevice.masterVolume
- Layout.fillWidth: true
- }
-
- Image {
- source: "../icons/Volume_up_qt_1x.png"
- }
- }
-
- Binding {
- target: B2QtDevice
- property: "masterVolume"
- value: volumeSlider.value
- }
- }
- }
-}
-
diff --git a/src/qtdevicesettings/generalsettingsplugin/icons.qrc b/src/qtdevicesettings/generalsettingsplugin/icons.qrc
deleted file mode 100644
index 540913c..0000000
--- a/src/qtdevicesettings/generalsettingsplugin/icons.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>../icons/Volume_down_qt_1x.png</file>
- <file>../icons/Volume_mute_qt_1x.png</file>
- <file>../icons/Volume_up_qt_1x.png</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/generalsettingsplugin/qml.qrc b/src/qtdevicesettings/generalsettingsplugin/qml.qrc
deleted file mode 100644
index 03083d5..0000000
--- a/src/qtdevicesettings/generalsettingsplugin/qml.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>Display.qml</file>
- <file>Sound.qml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/generalsettingsplugin/qmldir b/src/qtdevicesettings/generalsettingsplugin/qmldir
deleted file mode 100644
index 410dcca..0000000
--- a/src/qtdevicesettings/generalsettingsplugin/qmldir
+++ /dev/null
@@ -1,2 +0,0 @@
-module com.theqtcompany.settings.general
-plugin qmlgeneralsettingsplugin
diff --git a/src/qtdevicesettings/localesettingsplugin/icons.qrc b/src/qtdevicesettings/localesettingsplugin/icons.qrc
deleted file mode 100644
index af8a564..0000000
--- a/src/qtdevicesettings/localesettingsplugin/icons.qrc
+++ /dev/null
@@ -1,4 +0,0 @@
-<RCC>
- <qresource prefix="/">
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/localesettingsplugin/localesettingsplugin.pro b/src/qtdevicesettings/localesettingsplugin/localesettingsplugin.pro
deleted file mode 100644
index 8ff9157..0000000
--- a/src/qtdevicesettings/localesettingsplugin/localesettingsplugin.pro
+++ /dev/null
@@ -1,36 +0,0 @@
-TEMPLATE = lib
-CONFIG += plugin
-QT += qml dbus
-
-uri = com.theqtcompany.settings.locale
-
-DBUS_INTERFACES = locale.xml
-
-DESTDIR = imports/Locale
-TARGET = localesettingsplugin
-
-HEADERS = \
- systemlocale.h \
- systemlocale_p.h \
- localemodel.h \
- localefiltermodel.h
-SOURCES += plugin.cpp \
- systemlocale.cpp \
- localemodel.cpp \
- localefiltermodel.cpp
-
-pluginfiles.files += \
- qmldir \
- Language.qml \
- RegionSelect.qml
-
-installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
-
-target.path = $$installPath
-pluginfiles.path += $$installPath
-INSTALLS += target pluginfiles
-
-
-RESOURCES += \
- icons.qrc
-
diff --git a/src/qtdevicesettings/localesettingsplugin/qml.qrc b/src/qtdevicesettings/localesettingsplugin/qml.qrc
deleted file mode 100644
index 27fef3d..0000000
--- a/src/qtdevicesettings/localesettingsplugin/qml.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>Language.qml</file>
- <file>RegionSelect.qml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/networksettingsplugin/icons.qrc b/src/qtdevicesettings/networksettingsplugin/icons.qrc
deleted file mode 100644
index 4b07cca..0000000
--- a/src/qtdevicesettings/networksettingsplugin/icons.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>../icons/Wifi_lightgray_2x.png</file>
- <file>../icons/WifiAnim_black_2x.png</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettingsplugin.pro b/src/qtdevicesettings/networksettingsplugin/networksettingsplugin.pro
deleted file mode 100644
index 1fb23e6..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettingsplugin.pro
+++ /dev/null
@@ -1,74 +0,0 @@
-TEMPLATE = lib
-TARGET = networksettingsplugin
-QT += qml quick
-CONFIG += qt plugin
-
-uri = com.theqtcompany.settings.network
-
-wpasupplicant {
- include(networksettings/wpasupplicant.pri)
-}
-else {
- include(networksettings/connman.pri)
-}
-
-
-INCLUDEPATH += $${PWD}/networksettings
-
-# Input
-SOURCES += \
- networksettingsplugin_plugin.cpp \
- networksettings/qnetworksettingsinterfacemodel.cpp \
- networksettings/qnetworksettingsmanager.cpp \
- networksettings/qnetworksettingsaddressmodel.cpp \
- networksettings/qnetworksettingsservicemodel.cpp \
- networksettings/qnetworksettingsservice.cpp \
- networksettings/qnetworksettingsuseragent.cpp \
- networksettings/qnetworksettingsinterface.cpp \
-
-HEADERS += \
- networksettingsplugin_plugin.h \
- networksettings/qnetworksettingsinterfacemodel.h \
- networksettings/qnetworksettings.h \
- networksettings/qnetworksettingsmanager.h \
- networksettings/qnetworksettingsaddressmodel.h \
- networksettings/qnetworksettingsservicemodel.h \
- networksettings/qnetworksettingsservice.h \
- networksettings/qnetworksettingsuseragent.h \
- networksettings/qnetworksettingsinterface.h \
-
-DISTFILES = qmldir
-
-!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
- copy_qmldir.target = $$OUT_PWD/qmldir
- copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
- copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
- QMAKE_EXTRA_TARGETS += copy_qmldir
- PRE_TARGETDEPS += $$copy_qmldir.target
-}
-
-qmldir.files = qmldir
-
-pluginfiles.files += \
- imports/NetworkSettings/EditWiredSettings.qml \
- imports/NetworkSettings/NetworkDetails.qml \
- imports/NetworkSettings/WifiSettings.qml \
- imports/NetworkSettings/IpAddressTextField.qml \
- imports/NetworkSettings/NetworkSettings.qml \
- imports/NetworkSettings/WiredSettings.qml \
- imports/NetworkSettings/WifiSelectorDelegate.qml \
- imports/NetworkSettings/WifiSignalMonitor.qml \
- ../icons/WifiAnim_black_2x.png \
- ../icons/WifiAnim_qt_2x.png \
- ../icons/Wifi_lightgray_2x.png \
-
-installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
-
-pluginfiles.path = $$installPath
-qmldir.path = $$installPath
-target.path = $$installPath
-INSTALLS += target qmldir pluginfiles
-
-RESOURCES += \
- icons.qrc
-
diff --git a/src/qtdevicesettings/networksettingsplugin/qml.qrc b/src/qtdevicesettings/networksettingsplugin/qml.qrc
deleted file mode 100644
index 87c3639..0000000
--- a/src/qtdevicesettings/networksettingsplugin/qml.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/EditWiredSettings.qml</file>
- <file>qml/IpAddressTextField.qml</file>
- <file>qml/NetworkDetails.qml</file>
- <file>qml/NetworkSettings.qml</file>
- <file>qml/WifiSettings.qml</file>
- <file>qml/WiredSettings.qml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/qtdevicesettings.pro b/src/qtdevicesettings/qtdevicesettings.pro
deleted file mode 100644
index c49e6fb..0000000
--- a/src/qtdevicesettings/qtdevicesettings.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS += \
- settingscomponents \
- networksettingsplugin \
- generalsettingsplugin \
- timedateplugin \
- settingsui \
- localesettingsplugin \
- bluetoothsettingsplugin \
-
-CONFIG += ordered
diff --git a/src/qtdevicesettings/settingscomponents/icons.qrc b/src/qtdevicesettings/settingscomponents/icons.qrc
deleted file mode 100644
index d6ff9da..0000000
--- a/src/qtdevicesettings/settingscomponents/icons.qrc
+++ /dev/null
@@ -1,21 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>imports/Settings/Back.png</file>
- <file>imports/Settings/Chevron-left.png</file>
- <file>imports/Settings/Chevron-right.png</file>
- <file>imports/Settings/Circle-x.png</file>
- <file>imports/Settings/Cogs.png</file>
- <file>imports/Settings/Connections.png</file>
- <file>imports/Settings/Display.png</file>
- <file>imports/Settings/Lock.png</file>
- <file>imports/Settings/Plus.png</file>
- <file>imports/Settings/Settings.png</file>
- <file>imports/Settings/Wifi.png</file>
- <file>imports/Settings/World.png</file>
- <file>imports/Settings/Wrench.png</file>
- <file>imports/Settings/Chevron-left-med.png</file>
- <file>imports/Settings/Chevron-left-big.png</file>
- <file>imports/Settings/Settings-big.png</file>
- <file>imports/Settings/Connections-big.png</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/settingscomponents/imports/Settings/qmldir b/src/qtdevicesettings/settingscomponents/imports/Settings/qmldir
deleted file mode 100644
index 2810983..0000000
--- a/src/qtdevicesettings/settingscomponents/imports/Settings/qmldir
+++ /dev/null
@@ -1,5 +0,0 @@
-module com.theqtcompany.settings.common
-TextLabel 1.0 TextLabel.qml
-IconButton 1.0 IconButton.qml
-CustomCombobox 1.0 CustomCombobox.qml
-FlatStyledDropdownDelegate 1.0 FlatStyledDropdownDelegate.qml
diff --git a/src/qtdevicesettings/settingscomponents/settingscomponents.pro b/src/qtdevicesettings/settingscomponents/settingscomponents.pro
deleted file mode 100644
index 9d2567e..0000000
--- a/src/qtdevicesettings/settingscomponents/settingscomponents.pro
+++ /dev/null
@@ -1,26 +0,0 @@
-TEMPLATE = lib
-CONFIG += plugin
-QT += qml
-
-uri = com.theqtcompany.settings.common
-
-DESTDIR = imports/Settings
-TARGET = qmlsettingsplugin
-
-pluginfiles.files += \
- imports/Settings/qmldir \
- imports/Settings/TextLabel.qml \
- imports/Settings/IconButton.qml \
- imports/Settings/CustomCombobox.qml \
- imports/Settings/FlatStyledDropdownDelegate.qml
-
-installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
-
-target.path = $$installPath
-pluginfiles.path += $$installPath
-INSTALLS += target pluginfiles
-
-RESOURCES +=
-
-DISTFILES +=
-
diff --git a/src/qtdevicesettings/settingsui/icons.qrc b/src/qtdevicesettings/settingsui/icons.qrc
deleted file mode 100644
index 8656aa4..0000000
--- a/src/qtdevicesettings/settingsui/icons.qrc
+++ /dev/null
@@ -1,12 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>../icons/Chevron-left_black_1x.png</file>
- <file>../icons/Power_black_1x.png</file>
- <file>../icons/Display_qt_6x.png</file>
- <file>../icons/Clock_qt_6x.png</file>
- <file>../icons/Flag_qt_6x.png</file>
- <file>../icons/World_qt_6x.png</file>
- <file>../icons/Audio_qt_6x.png</file>
- <file>../icons/Bluetooth_qt_6x.png</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/settingsui/qml.qrc b/src/qtdevicesettings/settingsui/qml.qrc
deleted file mode 100644
index 7b1f07b..0000000
--- a/src/qtdevicesettings/settingsui/qml.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>settingsview.xml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/timedateplugin/icons.qrc b/src/qtdevicesettings/timedateplugin/icons.qrc
deleted file mode 100644
index af8a564..0000000
--- a/src/qtdevicesettings/timedateplugin/icons.qrc
+++ /dev/null
@@ -1,4 +0,0 @@
-<RCC>
- <qresource prefix="/">
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/timedateplugin/qml.qrc b/src/qtdevicesettings/timedateplugin/qml.qrc
deleted file mode 100644
index e04454d..0000000
--- a/src/qtdevicesettings/timedateplugin/qml.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>TimeDate.qml</file>
- <file>AnalogClock.qml</file>
- <file>TimezonesView.qml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/Bluetooth.qml b/src/settingsui/bluetooth/Bluetooth.qml
index 88a7d7c..d16bdb3 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/Bluetooth.qml
+++ b/src/settingsui/bluetooth/Bluetooth.qml
@@ -37,7 +37,7 @@ import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
+import "../common"
import com.theqtcompany.settings.bluetooth 1.0
Item {
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/Discovery.qml b/src/settingsui/bluetooth/Discovery.qml
index d40ccbe..a2dda84 100644
--- a/src/qtdevicesettings/bluetoothsettingsplugin/Discovery.qml
+++ b/src/settingsui/bluetooth/Discovery.qml
@@ -38,7 +38,7 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtBluetooth 5.2
import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
+import "../common"
import com.theqtcompany.settings.bluetooth 1.0
Item {
diff --git a/src/qtdevicesettings/settingscomponents/imports/Settings/CustomCombobox.qml b/src/settingsui/common/CustomCombobox.qml
index 37c7871..37c7871 100644
--- a/src/qtdevicesettings/settingscomponents/imports/Settings/CustomCombobox.qml
+++ b/src/settingsui/common/CustomCombobox.qml
diff --git a/src/qtdevicesettings/settingscomponents/imports/Settings/FlatStyledDropdownDelegate.qml b/src/settingsui/common/FlatStyledDropdownDelegate.qml
index c1bd24c..c1bd24c 100644
--- a/src/qtdevicesettings/settingscomponents/imports/Settings/FlatStyledDropdownDelegate.qml
+++ b/src/settingsui/common/FlatStyledDropdownDelegate.qml
diff --git a/src/qtdevicesettings/settingscomponents/imports/Settings/IconButton.qml b/src/settingsui/common/IconButton.qml
index 898e5e0..898e5e0 100644
--- a/src/qtdevicesettings/settingscomponents/imports/Settings/IconButton.qml
+++ b/src/settingsui/common/IconButton.qml
diff --git a/src/qtdevicesettings/settingscomponents/imports/Settings/TextLabel.qml b/src/settingsui/common/TextLabel.qml
index e9f5d12..e9f5d12 100644
--- a/src/qtdevicesettings/settingscomponents/imports/Settings/TextLabel.qml
+++ b/src/settingsui/common/TextLabel.qml
diff --git a/src/qtdevicesettings/settingsui/deployment.pri b/src/settingsui/deployment.pri
index 5441b63..5441b63 100644
--- a/src/qtdevicesettings/settingsui/deployment.pri
+++ b/src/settingsui/deployment.pri
diff --git a/src/qtdevicesettings/generalsettingsplugin/Display.qml b/src/settingsui/display/Display.qml
index 33bdba8..8d45746 100644
--- a/src/qtdevicesettings/generalsettingsplugin/Display.qml
+++ b/src/settingsui/display/Display.qml
@@ -37,9 +37,8 @@ import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import B2Qt.Utils 1.0
-import QtQuick.Enterprise.VirtualKeyboard.Settings 1.2
+import com.theqtcompany.settings.display 1.0
+import "../common"
Item {
id: root
@@ -63,13 +62,13 @@ Item {
Slider {
id: brightnessSlider
- value: B2QtDevice.displayBrightness
+ value: DisplaySettings.displayBrightness
Layout.fillWidth: true
}
}
Binding {
- target: B2QtDevice
+ target: DisplaySettings
property: "displayBrightness"
value: brightnessSlider.value
}
@@ -86,15 +85,15 @@ Item {
RadioButton {
text: qsTr("Default")
exclusiveGroup: exgroup
- checked: !B2QtDevice.physicalScreenSizeOverride
+ checked: !DisplaySettings.physicalScreenSizeOverride
}
RadioButton {
id: custom
text: qsTr("Custom")
exclusiveGroup: exgroup
- checked: B2QtDevice.physicalScreenSizeOverride
+ checked: DisplaySettings.physicalScreenSizeOverride
- onCheckedChanged: B2QtDevice.physicalScreenSizeOverride = checked
+ onCheckedChanged: DisplaySettings.physicalScreenSizeOverride = checked
}
GroupBox {
@@ -111,7 +110,7 @@ Item {
Slider {
id: sizeSlider
- value: B2QtDevice.physicalScreenSizeInch
+ value: DisplaySettings.physicalScreenSizeInch
Layout.fillWidth: true
stepSize: 1
minimumValue: 4
@@ -123,7 +122,7 @@ Item {
}
Binding {
- target: B2QtDevice
+ target: DisplaySettings
property: "physicalScreenSizeInch"
value: sizeSlider.value
}
diff --git a/src/settingsui/icons.qrc b/src/settingsui/icons.qrc
new file mode 100644
index 0000000..8099fbb
--- /dev/null
+++ b/src/settingsui/icons.qrc
@@ -0,0 +1,12 @@
+<RCC>
+ <qresource prefix="/">
+ <file>icons/Audio_qt_6x.png</file>
+ <file>icons/Chevron-left_black_1x.png</file>
+ <file>icons/Power_black_1x.png</file>
+ <file>icons/Display_qt_6x.png</file>
+ <file>icons/Clock_qt_6x.png</file>
+ <file>icons/Flag_qt_6x.png</file>
+ <file>icons/World_qt_6x.png</file>
+ <file>icons/Bluetooth_qt_6x.png</file>
+ </qresource>
+</RCC>
diff --git a/src/qtdevicesettings/icons/Alert_yellow_1x.png b/src/settingsui/icons/Alert_yellow_1x.png
index 2306ff6..2306ff6 100644
--- a/src/qtdevicesettings/icons/Alert_yellow_1x.png
+++ b/src/settingsui/icons/Alert_yellow_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Audio_qt_6x.png b/src/settingsui/icons/Audio_qt_6x.png
index 8251129..8251129 100644
--- a/src/qtdevicesettings/icons/Audio_qt_6x.png
+++ b/src/settingsui/icons/Audio_qt_6x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Bluetooth_qt_1x.png b/src/settingsui/icons/Bluetooth_qt_1x.png
index af6968d..af6968d 100644
--- a/src/qtdevicesettings/icons/Bluetooth_qt_1x.png
+++ b/src/settingsui/icons/Bluetooth_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Bluetooth_qt_6x.png b/src/settingsui/icons/Bluetooth_qt_6x.png
index 55e4fb1..55e4fb1 100644
--- a/src/qtdevicesettings/icons/Bluetooth_qt_6x.png
+++ b/src/settingsui/icons/Bluetooth_qt_6x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Camcorder_qt_1x.png b/src/settingsui/icons/Camcorder_qt_1x.png
index 7ffb2c8..7ffb2c8 100644
--- a/src/qtdevicesettings/icons/Camcorder_qt_1x.png
+++ b/src/settingsui/icons/Camcorder_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Camera_qt_1x.png b/src/settingsui/icons/Camera_qt_1x.png
index b84e53a..b84e53a 100644
--- a/src/qtdevicesettings/icons/Camera_qt_1x.png
+++ b/src/settingsui/icons/Camera_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Chevron-left_black_1x.png b/src/settingsui/icons/Chevron-left_black_1x.png
index 225176b..225176b 100644
--- a/src/qtdevicesettings/icons/Chevron-left_black_1x.png
+++ b/src/settingsui/icons/Chevron-left_black_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Clock_qt_1x.png b/src/settingsui/icons/Clock_qt_1x.png
index ee58f95..ee58f95 100644
--- a/src/qtdevicesettings/icons/Clock_qt_1x.png
+++ b/src/settingsui/icons/Clock_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Clock_qt_6x.png b/src/settingsui/icons/Clock_qt_6x.png
index aba8b60..aba8b60 100644
--- a/src/qtdevicesettings/icons/Clock_qt_6x.png
+++ b/src/settingsui/icons/Clock_qt_6x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Display_qt_6x.png b/src/settingsui/icons/Display_qt_6x.png
index e45c45c..e45c45c 100644
--- a/src/qtdevicesettings/icons/Display_qt_6x.png
+++ b/src/settingsui/icons/Display_qt_6x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Flag_qt_6x.png b/src/settingsui/icons/Flag_qt_6x.png
index f549ebd..f549ebd 100644
--- a/src/qtdevicesettings/icons/Flag_qt_6x.png
+++ b/src/settingsui/icons/Flag_qt_6x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Headphones_qt_1x.png b/src/settingsui/icons/Headphones_qt_1x.png
index 82b04e7..82b04e7 100644
--- a/src/qtdevicesettings/icons/Headphones_qt_1x.png
+++ b/src/settingsui/icons/Headphones_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Heartbeat_qt_1x.png b/src/settingsui/icons/Heartbeat_qt_1x.png
index 16a94bc..16a94bc 100644
--- a/src/qtdevicesettings/icons/Heartbeat_qt_1x.png
+++ b/src/settingsui/icons/Heartbeat_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Keyboard_qt_1x.png b/src/settingsui/icons/Keyboard_qt_1x.png
index cc6417d..cc6417d 100644
--- a/src/qtdevicesettings/icons/Keyboard_qt_1x.png
+++ b/src/settingsui/icons/Keyboard_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Laptop_qt_1x.png b/src/settingsui/icons/Laptop_qt_1x.png
index 2924015..2924015 100644
--- a/src/qtdevicesettings/icons/Laptop_qt_1x.png
+++ b/src/settingsui/icons/Laptop_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Microphone_qt_1x.png b/src/settingsui/icons/Microphone_qt_1x.png
index f76a963..f76a963 100644
--- a/src/qtdevicesettings/icons/Microphone_qt_1x.png
+++ b/src/settingsui/icons/Microphone_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/MobilePhone_qt_1x.png b/src/settingsui/icons/MobilePhone_qt_1x.png
index 363d667..363d667 100644
--- a/src/qtdevicesettings/icons/MobilePhone_qt_1x.png
+++ b/src/settingsui/icons/MobilePhone_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Mouse_qt_1x.png b/src/settingsui/icons/Mouse_qt_1x.png
index 24d057d..24d057d 100644
--- a/src/qtdevicesettings/icons/Mouse_qt_1x.png
+++ b/src/settingsui/icons/Mouse_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Power_black_1x.png b/src/settingsui/icons/Power_black_1x.png
index cca0fe8..cca0fe8 100644
--- a/src/qtdevicesettings/icons/Power_black_1x.png
+++ b/src/settingsui/icons/Power_black_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Tablet_qt_1x.png b/src/settingsui/icons/Tablet_qt_1x.png
index e218184..e218184 100644
--- a/src/qtdevicesettings/icons/Tablet_qt_1x.png
+++ b/src/settingsui/icons/Tablet_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Volume_down_qt_1x.png b/src/settingsui/icons/Volume_down_qt_1x.png
index 2068819..2068819 100644
--- a/src/qtdevicesettings/icons/Volume_down_qt_1x.png
+++ b/src/settingsui/icons/Volume_down_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Volume_mute_qt_1x.png b/src/settingsui/icons/Volume_mute_qt_1x.png
index 1a41927..1a41927 100644
--- a/src/qtdevicesettings/icons/Volume_mute_qt_1x.png
+++ b/src/settingsui/icons/Volume_mute_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Volume_up_qt_1x.png b/src/settingsui/icons/Volume_up_qt_1x.png
index 45a8b61..45a8b61 100644
--- a/src/qtdevicesettings/icons/Volume_up_qt_1x.png
+++ b/src/settingsui/icons/Volume_up_qt_1x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/WifiAnim_black_2x.png b/src/settingsui/icons/WifiAnim_black_2x.png
index 76c850d..76c850d 100644
--- a/src/qtdevicesettings/icons/WifiAnim_black_2x.png
+++ b/src/settingsui/icons/WifiAnim_black_2x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/Wifi_lightgray_2x.png b/src/settingsui/icons/Wifi_lightgray_2x.png
index 3e6183a..3e6183a 100644
--- a/src/qtdevicesettings/icons/Wifi_lightgray_2x.png
+++ b/src/settingsui/icons/Wifi_lightgray_2x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/World_qt_6x.png b/src/settingsui/icons/World_qt_6x.png
index 9024031..9024031 100644
--- a/src/qtdevicesettings/icons/World_qt_6x.png
+++ b/src/settingsui/icons/World_qt_6x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/generate_icons.sh b/src/settingsui/icons/generate_icons.sh
index 55867b8..55867b8 100755
--- a/src/qtdevicesettings/icons/generate_icons.sh
+++ b/src/settingsui/icons/generate_icons.sh
diff --git a/src/qtdevicesettings/icons/ref/Audio.png b/src/settingsui/icons/ref/Audio.png
index 8434f0a..8434f0a 100644
--- a/src/qtdevicesettings/icons/ref/Audio.png
+++ b/src/settingsui/icons/ref/Audio.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Back.png b/src/settingsui/icons/ref/Back.png
index 9029fd0..9029fd0 100644
--- a/src/qtdevicesettings/icons/ref/Back.png
+++ b/src/settingsui/icons/ref/Back.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Bluetooth.png b/src/settingsui/icons/ref/Bluetooth.png
index e7c80a9..e7c80a9 100644
--- a/src/qtdevicesettings/icons/ref/Bluetooth.png
+++ b/src/settingsui/icons/ref/Bluetooth.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Camcorder.png b/src/settingsui/icons/ref/Camcorder.png
index 8c317a2..8c317a2 100644
--- a/src/qtdevicesettings/icons/ref/Camcorder.png
+++ b/src/settingsui/icons/ref/Camcorder.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Camera.png b/src/settingsui/icons/ref/Camera.png
index c71ab25..c71ab25 100644
--- a/src/qtdevicesettings/icons/ref/Camera.png
+++ b/src/settingsui/icons/ref/Camera.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Chevron-left.png b/src/settingsui/icons/ref/Chevron-left.png
index 95006f4..95006f4 100644
--- a/src/qtdevicesettings/icons/ref/Chevron-left.png
+++ b/src/settingsui/icons/ref/Chevron-left.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Chevron-right.png b/src/settingsui/icons/ref/Chevron-right.png
index 2860e9a..2860e9a 100644
--- a/src/qtdevicesettings/icons/ref/Chevron-right.png
+++ b/src/settingsui/icons/ref/Chevron-right.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Circle-x.png b/src/settingsui/icons/ref/Circle-x.png
index 2bbfa97..2bbfa97 100644
--- a/src/qtdevicesettings/icons/ref/Circle-x.png
+++ b/src/settingsui/icons/ref/Circle-x.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Clock.png b/src/settingsui/icons/ref/Clock.png
index 1dae63e..1dae63e 100644
--- a/src/qtdevicesettings/icons/ref/Clock.png
+++ b/src/settingsui/icons/ref/Clock.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Cogs.png b/src/settingsui/icons/ref/Cogs.png
index feaae50..feaae50 100644
--- a/src/qtdevicesettings/icons/ref/Cogs.png
+++ b/src/settingsui/icons/ref/Cogs.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Connections.png b/src/settingsui/icons/ref/Connections.png
index b042d3c..b042d3c 100644
--- a/src/qtdevicesettings/icons/ref/Connections.png
+++ b/src/settingsui/icons/ref/Connections.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Display.png b/src/settingsui/icons/ref/Display.png
index cf1251a..cf1251a 100644
--- a/src/qtdevicesettings/icons/ref/Display.png
+++ b/src/settingsui/icons/ref/Display.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Flag.png b/src/settingsui/icons/ref/Flag.png
index 485ed48..485ed48 100644
--- a/src/qtdevicesettings/icons/ref/Flag.png
+++ b/src/settingsui/icons/ref/Flag.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Headphones.png b/src/settingsui/icons/ref/Headphones.png
index 9e5c483..9e5c483 100644
--- a/src/qtdevicesettings/icons/ref/Headphones.png
+++ b/src/settingsui/icons/ref/Headphones.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Heartbeat.png b/src/settingsui/icons/ref/Heartbeat.png
index 168135e..168135e 100644
--- a/src/qtdevicesettings/icons/ref/Heartbeat.png
+++ b/src/settingsui/icons/ref/Heartbeat.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Keyboard.png b/src/settingsui/icons/ref/Keyboard.png
index c814e8e..c814e8e 100644
--- a/src/qtdevicesettings/icons/ref/Keyboard.png
+++ b/src/settingsui/icons/ref/Keyboard.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Laptop.png b/src/settingsui/icons/ref/Laptop.png
index 465bb54..465bb54 100644
--- a/src/qtdevicesettings/icons/ref/Laptop.png
+++ b/src/settingsui/icons/ref/Laptop.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Lock.png b/src/settingsui/icons/ref/Lock.png
index 6afb6ac..6afb6ac 100644
--- a/src/qtdevicesettings/icons/ref/Lock.png
+++ b/src/settingsui/icons/ref/Lock.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Microphone.png b/src/settingsui/icons/ref/Microphone.png
index 63cb500..63cb500 100644
--- a/src/qtdevicesettings/icons/ref/Microphone.png
+++ b/src/settingsui/icons/ref/Microphone.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/MobilePhone.png b/src/settingsui/icons/ref/MobilePhone.png
index b186c09..b186c09 100644
--- a/src/qtdevicesettings/icons/ref/MobilePhone.png
+++ b/src/settingsui/icons/ref/MobilePhone.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Mouse.png b/src/settingsui/icons/ref/Mouse.png
index 146305b..146305b 100644
--- a/src/qtdevicesettings/icons/ref/Mouse.png
+++ b/src/settingsui/icons/ref/Mouse.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Plus.png b/src/settingsui/icons/ref/Plus.png
index 391fe94..391fe94 100644
--- a/src/qtdevicesettings/icons/ref/Plus.png
+++ b/src/settingsui/icons/ref/Plus.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Power.png b/src/settingsui/icons/ref/Power.png
index b54a084..b54a084 100644
--- a/src/qtdevicesettings/icons/ref/Power.png
+++ b/src/settingsui/icons/ref/Power.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Settings.png b/src/settingsui/icons/ref/Settings.png
index d8b255c..d8b255c 100644
--- a/src/qtdevicesettings/icons/ref/Settings.png
+++ b/src/settingsui/icons/ref/Settings.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Tablet.png b/src/settingsui/icons/ref/Tablet.png
index 71b0065..71b0065 100644
--- a/src/qtdevicesettings/icons/ref/Tablet.png
+++ b/src/settingsui/icons/ref/Tablet.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Volume_down.png b/src/settingsui/icons/ref/Volume_down.png
index 0773b1d..0773b1d 100644
--- a/src/qtdevicesettings/icons/ref/Volume_down.png
+++ b/src/settingsui/icons/ref/Volume_down.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Volume_mute.png b/src/settingsui/icons/ref/Volume_mute.png
index 36ab384..36ab384 100644
--- a/src/qtdevicesettings/icons/ref/Volume_mute.png
+++ b/src/settingsui/icons/ref/Volume_mute.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Volume_up.png b/src/settingsui/icons/ref/Volume_up.png
index 61eebbd..61eebbd 100644
--- a/src/qtdevicesettings/icons/ref/Volume_up.png
+++ b/src/settingsui/icons/ref/Volume_up.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Wifi.png b/src/settingsui/icons/ref/Wifi.png
index 5d1e0d9..5d1e0d9 100644
--- a/src/qtdevicesettings/icons/ref/Wifi.png
+++ b/src/settingsui/icons/ref/Wifi.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Wifi1.png b/src/settingsui/icons/ref/Wifi1.png
index f1b1489..f1b1489 100644
--- a/src/qtdevicesettings/icons/ref/Wifi1.png
+++ b/src/settingsui/icons/ref/Wifi1.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Wifi2.png b/src/settingsui/icons/ref/Wifi2.png
index a22b472..a22b472 100644
--- a/src/qtdevicesettings/icons/ref/Wifi2.png
+++ b/src/settingsui/icons/ref/Wifi2.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Wifi3.png b/src/settingsui/icons/ref/Wifi3.png
index 76d412b..76d412b 100644
--- a/src/qtdevicesettings/icons/ref/Wifi3.png
+++ b/src/settingsui/icons/ref/Wifi3.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Wifi4.png b/src/settingsui/icons/ref/Wifi4.png
index 5d1e0d9..5d1e0d9 100644
--- a/src/qtdevicesettings/icons/ref/Wifi4.png
+++ b/src/settingsui/icons/ref/Wifi4.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/WifiAnim.png b/src/settingsui/icons/ref/WifiAnim.png
index 0694f63..0694f63 100644
--- a/src/qtdevicesettings/icons/ref/WifiAnim.png
+++ b/src/settingsui/icons/ref/WifiAnim.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/World.png b/src/settingsui/icons/ref/World.png
index cf6eaf0..cf6eaf0 100644
--- a/src/qtdevicesettings/icons/ref/World.png
+++ b/src/settingsui/icons/ref/World.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Wrench.png b/src/settingsui/icons/ref/Wrench.png
index 5b6e1c6..5b6e1c6 100644
--- a/src/qtdevicesettings/icons/ref/Wrench.png
+++ b/src/settingsui/icons/ref/Wrench.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/extra/Alert.png b/src/settingsui/icons/ref/extra/Alert.png
index 80914fc..80914fc 100644
--- a/src/qtdevicesettings/icons/ref/extra/Alert.png
+++ b/src/settingsui/icons/ref/extra/Alert.png
Binary files differ
diff --git a/src/qtdevicesettings/icons/scripts/cimage.sh b/src/settingsui/icons/scripts/cimage.sh
index ae73622..ae73622 100755
--- a/src/qtdevicesettings/icons/scripts/cimage.sh
+++ b/src/settingsui/icons/scripts/cimage.sh
diff --git a/src/qtdevicesettings/icons/scripts/cimages.sh b/src/settingsui/icons/scripts/cimages.sh
index 94ac1cd..94ac1cd 100755
--- a/src/qtdevicesettings/icons/scripts/cimages.sh
+++ b/src/settingsui/icons/scripts/cimages.sh
diff --git a/src/qtdevicesettings/icons/scripts/rimage.sh b/src/settingsui/icons/scripts/rimage.sh
index d98088f..d98088f 100755
--- a/src/qtdevicesettings/icons/scripts/rimage.sh
+++ b/src/settingsui/icons/scripts/rimage.sh
diff --git a/src/qtdevicesettings/icons/scripts/rimages.sh b/src/settingsui/icons/scripts/rimages.sh
index 7b76da8..7b76da8 100755
--- a/src/qtdevicesettings/icons/scripts/rimages.sh
+++ b/src/settingsui/icons/scripts/rimages.sh
diff --git a/src/qtdevicesettings/localesettingsplugin/Language.qml b/src/settingsui/locale/Language.qml
index e630b00..6e4e3ad 100644
--- a/src/qtdevicesettings/localesettingsplugin/Language.qml
+++ b/src/settingsui/locale/Language.qml
@@ -37,7 +37,7 @@ import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
+import "../common"
import com.theqtcompany.settings.locale 1.0
Item {
diff --git a/src/qtdevicesettings/localesettingsplugin/RegionSelect.qml b/src/settingsui/locale/RegionSelect.qml
index 9247630..2d13afe 100644
--- a/src/qtdevicesettings/localesettingsplugin/RegionSelect.qml
+++ b/src/settingsui/locale/RegionSelect.qml
@@ -37,7 +37,7 @@ import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
+import "../common"
import com.theqtcompany.settings.locale 1.0
Item {
diff --git a/src/qtdevicesettings/settingsui/main.cpp b/src/settingsui/main.cpp
index b345225..b345225 100644
--- a/src/qtdevicesettings/settingsui/main.cpp
+++ b/src/settingsui/main.cpp
diff --git a/src/qtdevicesettings/settingsui/main.qml b/src/settingsui/main.qml
index 4c8080a..7d0d864 100644
--- a/src/qtdevicesettings/settingsui/main.qml
+++ b/src/settingsui/main.qml
@@ -31,7 +31,8 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles.Flat 1.0 as Flat
import QtQuick.XmlListModel 2.0
-import com.theqtcompany.settings.common 1.0
+import "common"
+import com.theqtcompany.localdevice 1.0
ApplicationWindow {
id: root
@@ -89,12 +90,12 @@ ApplicationWindow {
MenuItem {
text: qsTr("Reboot")
- onTriggered: B2QtDevice.reboot()
+ onTriggered: LocalDevice.reboot()
}
MenuItem {
text: qsTr("Shutdown")
- onTriggered: B2QtDevice.powerOff()
+ onTriggered: LocalDevice.powerOff()
}
}
@@ -116,7 +117,7 @@ ApplicationWindow {
query: "/xml/settings/item"
XmlRole { name: "title"; query: "title/string()"}
XmlRole { name: "icon"; query: "icon/string()"}
- XmlRole { name: "plugin"; query: "plugin/string()"}
+ XmlRole { name: "path"; query: "path/string()"}
XmlRole { name: "view"; query: "view/string()"}
}
@@ -158,7 +159,7 @@ ApplicationWindow {
}
onClicked: {
- var url = 'import ' + plugin + '; ' + view + ' {}';
+ var url = 'import "' + path + '"; ' + view + ' {}';
stackView.push({item: Qt.createQmlObject(url,stackView)});
titlebar.title = title
}
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/EditWiredSettings.qml b/src/settingsui/network/EditWiredSettings.qml
index c678c67..1249e46 100644
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/EditWiredSettings.qml
+++ b/src/settingsui/network/EditWiredSettings.qml
@@ -37,7 +37,7 @@ import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
+import "../common"
import com.theqtcompany.settings.network 1.0
Item {
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/IpAddressTextField.qml b/src/settingsui/network/IpAddressTextField.qml
index 102d458..102d458 100644
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/IpAddressTextField.qml
+++ b/src/settingsui/network/IpAddressTextField.qml
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkDetails.qml b/src/settingsui/network/NetworkDetails.qml
index 3e71be0..3e71be0 100644
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkDetails.qml
+++ b/src/settingsui/network/NetworkDetails.qml
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkSettings.qml b/src/settingsui/network/NetworkSettings.qml
index dcda5e0..2eed812 100644
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkSettings.qml
+++ b/src/settingsui/network/NetworkSettings.qml
@@ -37,7 +37,7 @@ import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
+import "../common"
import com.theqtcompany.settings.network 1.0
Item {
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSelectorDelegate.qml b/src/settingsui/network/WifiSelectorDelegate.qml
index bc39ebd..72216a6 100644
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSelectorDelegate.qml
+++ b/src/settingsui/network/WifiSelectorDelegate.qml
@@ -36,7 +36,7 @@
import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
-import com.theqtcompany.settings.common 1.0
+import "../common"
import com.theqtcompany.settings.network 1.0
import QtQuick.Controls.Styles.Flat 1.0 as Flat
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSettings.qml b/src/settingsui/network/WifiSettings.qml
index e7c2bda..352ec3c 100644
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSettings.qml
+++ b/src/settingsui/network/WifiSettings.qml
@@ -37,7 +37,7 @@ import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
+import "../common"
import com.theqtcompany.settings.network 1.0
Item {
@@ -169,7 +169,6 @@ Item {
visible: selectedInterface.state === NetworkSettingsState.Online ||
selectedInterface.state === NetworkSettingsState.Ready
onClicked: {
- console.log("disconnect");
NetworkSettingsManager.services.itemFromRow(networkSelection.selectedIndex).disconnectService();
networkSelection.selectedIndex = -1;
}
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSignalMonitor.qml b/src/settingsui/network/WifiSignalMonitor.qml
index 35d9e53..35d9e53 100644
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSignalMonitor.qml
+++ b/src/settingsui/network/WifiSignalMonitor.qml
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WiredSettings.qml b/src/settingsui/network/WiredSettings.qml
index 4c07baa..aad97fe 100644
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WiredSettings.qml
+++ b/src/settingsui/network/WiredSettings.qml
@@ -37,7 +37,7 @@ import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
+import "../common"
import com.theqtcompany.settings.network 1.0
Item {
diff --git a/src/settingsui/qml.qrc b/src/settingsui/qml.qrc
new file mode 100644
index 0000000..5ed5504
--- /dev/null
+++ b/src/settingsui/qml.qrc
@@ -0,0 +1,26 @@
+<RCC>
+ <qresource prefix="/">
+ <file>main.qml</file>
+ <file>settingsview.xml</file>
+ <file>common/CustomCombobox.qml</file>
+ <file>common/FlatStyledDropdownDelegate.qml</file>
+ <file>common/IconButton.qml</file>
+ <file>common/TextLabel.qml</file>
+ <file>network/EditWiredSettings.qml</file>
+ <file>network/IpAddressTextField.qml</file>
+ <file>network/NetworkDetails.qml</file>
+ <file>network/NetworkSettings.qml</file>
+ <file>network/WifiSelectorDelegate.qml</file>
+ <file>network/WifiSettings.qml</file>
+ <file>network/WifiSignalMonitor.qml</file>
+ <file>network/WiredSettings.qml</file>
+ <file>bluetooth/Bluetooth.qml</file>
+ <file>bluetooth/Discovery.qml</file>
+ <file>display/Display.qml</file>
+ <file>locale/RegionSelect.qml</file>
+ <file>locale/Language.qml</file>
+ <file>timedate/AnalogClock.qml</file>
+ <file>timedate/TimeDate.qml</file>
+ <file>timedate/TimezonesView.qml</file>
+ </qresource>
+</RCC>
diff --git a/src/qtdevicesettings/settingsui/settingsui.pro b/src/settingsui/settingsui.pro
index 026d911..026d911 100644
--- a/src/qtdevicesettings/settingsui/settingsui.pro
+++ b/src/settingsui/settingsui.pro
diff --git a/src/qtdevicesettings/settingsui/settingsview.xml b/src/settingsui/settingsview.xml
index b2cfc51..4f3b52e 100644
--- a/src/qtdevicesettings/settingsui/settingsview.xml
+++ b/src/settingsui/settingsview.xml
@@ -3,38 +3,32 @@
<settings>
<item>
<title>Network</title>
- <plugin>com.theqtcompany.settings.network 1.0</plugin>
<view>NetworkSettings</view>
+ <path>network</path>
<icon>../icons/World_qt_6x.png</icon>
</item>
<item>
<title>Display</title>
- <plugin>com.theqtcompany.settings.general 1.0</plugin>
<view>Display</view>
+ <path>display</path>
<icon>../icons/Display_qt_6x.png</icon>
</item>
<item>
- <title>Audio</title>
- <plugin>com.theqtcompany.settings.general 1.0</plugin>
- <view>Sound</view>
- <icon>../icons/Audio_qt_6x.png</icon>
- </item>
- <item>
<title>Date and Time</title>
- <plugin>com.theqtcompany.settings.timedate 1.0</plugin>
<view>TimeDate</view>
+ <path>timedate</path>
<icon>../icons/Clock_qt_6x.png</icon>
</item>
<item>
<title>Language</title>
- <plugin>com.theqtcompany.settings.locale 1.0</plugin>
<view>Language</view>
+ <path>locale</path>
<icon>../icons/Flag_qt_6x.png</icon>
</item>
<item>
<title>Bluetooth</title>
- <plugin>com.theqtcompany.settings.bluetooth 1.0</plugin>
<view>Bluetooth</view>
+ <path>bluetooth</path>
<icon>../icons/Bluetooth_qt_6x.png</icon>
</item>
</settings>
diff --git a/src/qtdevicesettings/timedateplugin/AnalogClock.qml b/src/settingsui/timedate/AnalogClock.qml
index 2b89401..9f871ed 100644
--- a/src/qtdevicesettings/timedateplugin/AnalogClock.qml
+++ b/src/settingsui/timedate/AnalogClock.qml
@@ -34,7 +34,7 @@
**
****************************************************************************/
import QtQuick 2.5
-import com.theqtcompany.settings.common 1.0
+import "../common"
import com.theqtcompany.settings.timedate 1.0
Item {
diff --git a/src/qtdevicesettings/timedateplugin/TimeDate.qml b/src/settingsui/timedate/TimeDate.qml
index 6731805..439e4ac 100644
--- a/src/qtdevicesettings/timedateplugin/TimeDate.qml
+++ b/src/settingsui/timedate/TimeDate.qml
@@ -37,7 +37,7 @@ import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
+import "../common"
import com.theqtcompany.settings.timedate 1.0
Item {
diff --git a/src/qtdevicesettings/timedateplugin/TimezonesView.qml b/src/settingsui/timedate/TimezonesView.qml
index 458d611..4e09350 100644
--- a/src/qtdevicesettings/timedateplugin/TimezonesView.qml
+++ b/src/settingsui/timedate/TimezonesView.qml
@@ -37,7 +37,7 @@ import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
+import "../common"
import com.theqtcompany.settings.timedate 1.0
diff --git a/src/src.pro b/src/src.pro
index d9d67ad..1cbf0ed 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -1,7 +1,12 @@
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += \
- utils \
- qtdevicesettings \
+ networksettings \
+ bluetoothsettings \
+ localesettings \
+ displaysettings \
+ timedatesettings \
+ localdevice \
+ settingsui \
imports \
doc
diff --git a/src/qtdevicesettings/timedateplugin/systemtime.cpp b/src/timedatesettings/systemtime.cpp
index c84b036..c84b036 100644
--- a/src/qtdevicesettings/timedateplugin/systemtime.cpp
+++ b/src/timedatesettings/systemtime.cpp
diff --git a/src/qtdevicesettings/timedateplugin/systemtime.h b/src/timedatesettings/systemtime.h
index 092712c..2f61ab5 100644
--- a/src/qtdevicesettings/timedateplugin/systemtime.h
+++ b/src/timedatesettings/systemtime.h
@@ -41,7 +41,7 @@
class SystemTimePrivate;
-class SystemTime : public QObject
+class Q_DECL_EXPORT SystemTime : public QObject
{
Q_OBJECT
Q_PROPERTY(QString timeZone READ timeZone WRITE setTimeZone NOTIFY timeZoneChanged)
diff --git a/src/qtdevicesettings/timedateplugin/systemtime_p.h b/src/timedatesettings/systemtime_p.h
index 5ee6eef..5ee6eef 100644
--- a/src/qtdevicesettings/timedateplugin/systemtime_p.h
+++ b/src/timedatesettings/systemtime_p.h
diff --git a/src/qtdevicesettings/timedateplugin/timedated.xml b/src/timedatesettings/timedated.xml
index 95bafb8..95bafb8 100644
--- a/src/qtdevicesettings/timedateplugin/timedated.xml
+++ b/src/timedatesettings/timedated.xml
diff --git a/src/qtdevicesettings/timedateplugin/timedateplugin.pro b/src/timedatesettings/timedateplugin.pro
index d82529d..d82529d 100644
--- a/src/qtdevicesettings/timedateplugin/timedateplugin.pro
+++ b/src/timedatesettings/timedateplugin.pro
diff --git a/src/timedatesettings/timedatesettings.pro b/src/timedatesettings/timedatesettings.pro
new file mode 100644
index 0000000..6f3f4e9
--- /dev/null
+++ b/src/timedatesettings/timedatesettings.pro
@@ -0,0 +1,23 @@
+load(qt_build_config)
+
+TARGET = QtTimeDateSettings
+VERSION = 1.0
+CONFIG += dll warn_on
+
+QT = core dbus
+
+MODULE = timedatesettings
+load(qt_module)
+
+DBUS_INTERFACES = timedated.xml
+
+SOURCES += systemtime.cpp \
+ timezonemodel.cpp \
+ timezonefiltermodel.cpp
+
+HEADERS += \
+ systemtime.h \
+ systemtime_p.h \
+ timezonemodel.h \
+ timezonefiltermodel.h
+
diff --git a/src/qtdevicesettings/timedateplugin/timezonefiltermodel.cpp b/src/timedatesettings/timezonefiltermodel.cpp
index 3d1c0a4..3d1c0a4 100644
--- a/src/qtdevicesettings/timedateplugin/timezonefiltermodel.cpp
+++ b/src/timedatesettings/timezonefiltermodel.cpp
diff --git a/src/qtdevicesettings/timedateplugin/timezonefiltermodel.h b/src/timedatesettings/timezonefiltermodel.h
index dd9009f..62c65c9 100644
--- a/src/qtdevicesettings/timedateplugin/timezonefiltermodel.h
+++ b/src/timedatesettings/timezonefiltermodel.h
@@ -38,7 +38,7 @@
#include <QSortFilterProxyModel>
-class TimezoneFilterModel : public QSortFilterProxyModel
+class Q_DECL_EXPORT TimezoneFilterModel : public QSortFilterProxyModel
{
Q_OBJECT
Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
diff --git a/src/qtdevicesettings/timedateplugin/timezonemodel.cpp b/src/timedatesettings/timezonemodel.cpp
index b6cf27b..2a8d0ed 100644
--- a/src/qtdevicesettings/timedateplugin/timezonemodel.cpp
+++ b/src/timedatesettings/timezonemodel.cpp
@@ -35,7 +35,6 @@
****************************************************************************/
#include <QLocale>
-#include <QQmlPropertyMap>
#include <QFuture>
#include <QThread>
#include <QtConcurrent/QtConcurrentRun>
diff --git a/src/qtdevicesettings/timedateplugin/timezonemodel.h b/src/timedatesettings/timezonemodel.h
index af86c75..7404954 100644
--- a/src/qtdevicesettings/timedateplugin/timezonemodel.h
+++ b/src/timedatesettings/timezonemodel.h
@@ -57,7 +57,7 @@ private:
QString m_id;
};
-class TimezoneModel : public QAbstractListModel
+class Q_DECL_EXPORT TimezoneModel : public QAbstractListModel
{
Q_OBJECT
@@ -68,7 +68,6 @@ public:
int rowCount(const QModelIndex & parent = QModelIndex()) const;
QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
QHash<int, QByteArray> roleNames() const;
- Q_INVOKABLE QVariant itemFromRow(const int row) const;
enum Roles {
Name = Qt::UserRole + 1,
diff --git a/src/utils/b2qtdevice.cpp b/src/utils/b2qtdevice.cpp
deleted file mode 100644
index 85006f8..0000000
--- a/src/utils/b2qtdevice.cpp
+++ /dev/null
@@ -1,393 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use the contact form at
-** http://www.qt.io
-**
-** This file is part of Qt Enterprise Embedded.
-**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** the contact form at http://www.qt.io
-**
-****************************************************************************/
-#include "b2qtdevice.h"
-#include <unistd.h>
-#include <QDebug>
-#include <math.h>
-#include <sys/reboot.h>
-#include <QNetworkInterface>
-#include <QHostInfo>
-#include <QFile>
-#include <QDirIterator>
-#include <QTimer>
-#include <QtCore/qmath.h>
-
-// When we can't query directly, at least remember what we have set it to
-static quint8 knownBrightness = 255;
-
-B2QtDevice::B2QtDevice(QObject *parent)
- : QObject(parent)
-{
-}
-
-B2QtDevice::~B2QtDevice()
-{
-}
-
-/*!
- * Reboots the system. Does not return.
- *
- * \sa powerOff()
- */
-void B2QtDevice::reboot()
-{
- sync();
- ::reboot(RB_AUTOBOOT);
- qWarning("reboot returned");
-}
-
-
-/*!
- * Shuts down the system. Does not return.
- *
- * \sa reboot()
- */
-void B2QtDevice::powerOff()
-{
- sync();
- ::reboot(RB_POWER_OFF);
- qWarning("powerOff returned");
-}
-
-
-class LightDevice
-{
-public:
- QString name;
- QString deviceFile;
- quint8 value;
- uint maxValue;
-};
-
-static QList<LightDevice> lightDevices;
-static bool lightDevicesInitialized = false;
-
-static void initLightDevices()
-{
- if (lightDevicesInitialized)
- return;
- QDirIterator it(QStringLiteral("/sys/class/backlight"));
- while (it.hasNext()) {
- LightDevice ld;
- ld.deviceFile = it.next() + QStringLiteral("/brightness");
- QFile maxFile(it.filePath() + QStringLiteral("/max_brightness"));
- if (!maxFile.open(QIODevice::ReadOnly))
- continue;
- bool ok = false;
- ld.maxValue = maxFile.read(10).simplified().toUInt(&ok);
- if (!ok || !ld.maxValue)
- continue;
- QFile valFile(ld.deviceFile);
- if (!valFile.open(QIODevice::ReadOnly))
- continue;
- ok = false;
- uint val = valFile.read(10).simplified().toUInt(&ok);
- if (!ok)
- continue;
- // map max->max as that is a common case, otherwise choose a reasonable value
- ld.value = (val == ld.maxValue) ? 255 : (val * 256)/(ld.maxValue+1);
- ld.name = it.fileName();
- lightDevices.append(ld);
- }
- if (!lightDevices.isEmpty())
- knownBrightness = lightDevices.at(0).value;
- lightDevicesInitialized = true;
-}
-
-/*!
- * Sets the display brightness (i.e. the intensity of the backlight)
- * to \a value. A value of 255 requests maximum brightness, while 0 requests
- * minimum (typically, the backlight turned off).
- *
- * Returns true on success.
- */
-bool B2QtDevice::setDisplayBrightness(int v)
-{
- quint8 value = qBound(0, v, 255);
- initLightDevices();
- for (int i = 0; i < lightDevices.size(); i++) {
- LightDevice &ld = lightDevices[i];
- QFile devFile(ld.deviceFile);
- if (!devFile.open(QIODevice::WriteOnly))
- continue;
- // Maps only 0 to 0, since 0 often means "off"; other values are degrees of "on".
- uint newVal = value ? 1 + ((value * ld.maxValue) / 256) : 0;
- devFile.write(QByteArray::number(newVal));
- ld.value = value;
- }
- knownBrightness = value;
- return true;
-}
-
-
-/*!
- * Returns the current backlight intensity.
- * \sa setDisplayBrightness
- */
-int B2QtDevice::displayBrightness() const
-{
- initLightDevices();
- return knownBrightness;
-}
-
-
-/*!
- * Gets the current IP address(es) of the device
- */
-QString B2QtDevice::getIPAddress() const
-{
- QStringList addresses;
- foreach (const QNetworkInterface &interface, QNetworkInterface::allInterfaces()) {
- QNetworkInterface::InterfaceFlags flags = interface.flags();
- if (flags.testFlag(QNetworkInterface::IsRunning) && !flags.testFlag(QNetworkInterface::IsLoopBack)) {
- foreach (const QNetworkAddressEntry &entry, interface.addressEntries())
- addresses.append(entry.ip().toString().split('%').first());
- }
- }
- return addresses.join(QStringLiteral(", "));
-}
-
-
-/*!
- * Gets the current hostname of the device
- */
-QString B2QtDevice::hostname() const
-{
- QString name;
- name = QHostInfo::localHostName();
- return name;
-}
-
-
-/*!
- * Sets new hostname for the device
- */
-bool B2QtDevice::setHostname(const QString &name)
-{
- QByteArray lname = name.toLocal8Bit();
- if (::sethostname(lname.constData(), lname.length())) {
- qWarning("Could not set system hostname");
- return false;
- }
- // Also store it for next boot:
- QFile file(QStringLiteral("/etc/hostname"));
- if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
- qWarning("Could not write to /etc/hostname");
- return false;
- }
- file.write(lname.append('\n'));
- file.close();
-
- emit hostnameChanged(name);
- return true;
-}
-
-
-/*!
- * Sets the master volume to \a volume.
- * The volume can range from 0 to 100 and is linear.
- */
-void B2QtDevice::setMasterVolume(int volume)
-{
- Q_UNUSED(volume)
-}
-
-
-/*!
- * Returns the current master volume.
- * The volume can range from 0 to 100 and is linear.
- */
-int B2QtDevice::masterVolume() const
-{
- return 0;
-}
-
-
-/*!
- * Initializes the audio subsystem, setting the volume to max.
- * This is done during system startup, so there is normally no need to call this function from applications.
- */
-void B2QtDevice::initAudio()
-{
-}
-
-
-class PhysicalScreenSize : public QObject
-{
- Q_OBJECT
-
-public:
- PhysicalScreenSize();
-
- void setSize(int inches);
- int size() const { return physScreenSizeInch; }
- bool enabled() const;
- void setEnabled(bool enable);
-
-private slots:
- void onTimeout();
-
-private:
- void read(const QString &filename);
- void write(bool includePhysSize = true);
- void write(const QString &filename, bool includePhysSize = true);
-
- bool physScreenSizeEnabled;
- int physScreenSizeInch;
- QTimer physWriteTimer;
-};
-
-Q_GLOBAL_STATIC(PhysicalScreenSize, physScreenSize)
-
-PhysicalScreenSize::PhysicalScreenSize()
- : physScreenSizeEnabled(false), physScreenSizeInch(7)
-{
- physWriteTimer.setSingleShot(true);
- physWriteTimer.setInterval(1000);
- QObject::connect(&physWriteTimer, SIGNAL(timeout()), this, SLOT(onTimeout()));
-
- read(QStringLiteral("/etc/appcontroller.conf"));
- read(QStringLiteral("/var/lib/b2qt/appcontroller.conf.d/physical_screen_size.conf"));
-}
-
-void PhysicalScreenSize::read(const QString &filename)
-{
- QFile f(filename);
- if (!f.open(QIODevice::ReadOnly | QIODevice::Text))
- return;
-
- int physScreenWidth = 154, physScreenHeight = 90;
- int found = 0;
- while (!f.atEnd()) {
- QByteArray line = f.readLine().trimmed();
- if (line.startsWith(QByteArrayLiteral("env="))) {
- QByteArrayList values = line.split('=');
- if (values.count() == 3) {
- bool ok;
- if (values[1] == QByteArrayLiteral("QT_QPA_EGLFS_PHYSICAL_WIDTH")) {
- int val = values[2].toInt(&ok);
- if (ok) {
- ++found;
- physScreenWidth = val;
- }
- } else if (values[1] == QByteArrayLiteral("QT_QPA_EGLFS_PHYSICAL_HEIGHT")) {
- int val = values[2].toInt(&ok);
- if (ok) {
- ++found;
- physScreenHeight = val;
- }
- }
- }
- }
- }
- if (found == 2)
- physScreenSizeEnabled = true;
-
- const qreal diagMM = qSqrt(physScreenWidth * physScreenWidth + physScreenHeight * physScreenHeight);
- physScreenSizeInch = qRound(diagMM / 25.4);
-}
-
-void PhysicalScreenSize::onTimeout()
-{
- write();
-}
-
-void PhysicalScreenSize::write(bool includePhysSize)
-{
- QDir(QStringLiteral("/var/lib")).mkpath(QStringLiteral("b2qt/appcontroller.conf.d"));
- write(QStringLiteral("/var/lib/b2qt/appcontroller.conf.d/physical_screen_size.conf"), includePhysSize);
-}
-
-void PhysicalScreenSize::write(const QString &filename, bool includePhysSize)
-{
- QFile f(filename);
-
- QByteArrayList lines;
- if (f.open(QIODevice::ReadOnly | QIODevice::Text)) {
- while (!f.atEnd()) {
- QByteArray line = f.readLine().trimmed();
- if (!line.startsWith(QByteArrayLiteral("env=QT_QPA_EGLFS_PHYSICAL_WIDTH="))
- && !line.startsWith(QByteArrayLiteral("env=QT_QPA_EGLFS_PHYSICAL_HEIGHT=")))
- lines.append(line);
- }
- f.close();
- }
-
- if (!f.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text))
- return;
-
- const qreal diagMM = physScreenSizeInch * 25.4;
- // Assume 16:9 aspect ratio
- const int physScreenHeight = qRound(diagMM / 1.975);
- const int physScreenWidth = qRound(physScreenHeight * 1.777);
-
- foreach (const QByteArray &line, lines)
- f.write(line + QByteArrayLiteral("\n"));
-
- if (includePhysSize)
- f.write(QByteArrayLiteral("env=QT_QPA_EGLFS_PHYSICAL_WIDTH=") + QByteArray::number(physScreenWidth)
- + QByteArrayLiteral("\nenv=QT_QPA_EGLFS_PHYSICAL_HEIGHT=") + QByteArray::number(physScreenHeight)
- + QByteArrayLiteral("\n"));
-}
-
-void PhysicalScreenSize::setSize(int inches)
-{
- physScreenSizeInch = inches;
- physWriteTimer.start();
-}
-
-bool PhysicalScreenSize::enabled() const
-{
- return physScreenSizeEnabled;
-}
-
-void PhysicalScreenSize::setEnabled(bool enable)
-{
- physScreenSizeEnabled = enable;
- // Rewrite appcontroller.conf with or without the physical width/height lines.
- write(enable);
-}
-
-int B2QtDevice::physicalScreenSizeInch() const
-{
- return physScreenSize()->size();
-}
-
-void B2QtDevice::setPhysicalScreenSizeInch(int inches)
-{
- if (physScreenSize()->size() != inches) {
- physScreenSize()->setSize(inches);
- emit physicalScreenSizeInchChanged(inches);
- }
-}
-
-bool B2QtDevice::physicalScreenSizeOverride() const
-{
- return physScreenSize()->enabled();
-}
-
-void B2QtDevice::setPhysicalScreenSizeOverride(bool enable)
-{
- if (physScreenSize()->enabled() != enable) {
- physScreenSize()->setEnabled(enable);
- emit physicalScreenSizeOverrideChanged(enable);
- }
-}
-
-#include "b2qtdevice.moc"
diff --git a/src/utils/b2qtdevice.h b/src/utils/b2qtdevice.h
deleted file mode 100644
index 288f62d..0000000
--- a/src/utils/b2qtdevice.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use the contact form at
-** http://www.qt.io
-**
-** This file is part of Qt Enterprise Embedded.
-**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** the contact form at http://www.qt.io
-**
-****************************************************************************/
-#ifndef B2QTDEVICE_H
-#define B2QTDEVICE_H
-
-#include <qobject.h>
-
-class Q_DECL_EXPORT B2QtDevice : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(int displayBrightness READ displayBrightness WRITE setDisplayBrightness NOTIFY displayBrightnessChanged)
- Q_PROPERTY(QString hostname READ hostname WRITE setHostname NOTIFY hostnameChanged)
- Q_PROPERTY(QString ipAddress READ getIPAddress NOTIFY ipAddressChanged)
- Q_PROPERTY(int masterVolume READ masterVolume WRITE setMasterVolume NOTIFY masterVolumeChanged)
- Q_PROPERTY(int physicalScreenSizeInch READ physicalScreenSizeInch WRITE setPhysicalScreenSizeInch NOTIFY physicalScreenSizeInchChanged)
- Q_PROPERTY(bool physicalScreenSizeOverride READ physicalScreenSizeOverride WRITE setPhysicalScreenSizeOverride NOTIFY physicalScreenSizeOverrideChanged)
-
-public:
- B2QtDevice(QObject *parent = 0);
- ~B2QtDevice();
-
- int displayBrightness() const;
- QString hostname() const;
- QString getIPAddress() const;
- int masterVolume() const;
- int physicalScreenSizeInch() const;
- bool physicalScreenSizeOverride() const;
-
- void initAudio();
-
-public Q_SLOTS:
- void reboot();
- void powerOff();
-
- bool setDisplayBrightness(int value);
- bool setHostname(const QString &name);
- void setMasterVolume(int volume);
- void setPhysicalScreenSizeInch(int inches);
- void setPhysicalScreenSizeOverride(bool enable);
-
-signals:
- void displayBrightnessChanged(int newValue);
- void hostnameChanged(const QString &newName);
- void ipAddressChanged(const QString &newAddress);
- void masterVolumeChanged(int newVolume);
- void physicalScreenSizeInchChanged(int newInches);
- void physicalScreenSizeOverrideChanged(bool newValue);
-};
-
-#endif // B2QTDEVICE_H
diff --git a/src/utils/utils.pro b/src/utils/utils.pro
deleted file mode 100644
index a9f6041..0000000
--- a/src/utils/utils.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-load(qt_build_config)
-
-TARGET = B2QtUtils
-VERSION = 1.0
-CONFIG += dll warn_on
-
-QT = core network
-
-MODULE = b2qtutils
-load(qt_module)
-
-HEADERS += \
- $$PWD/b2qtdevice.h
-
-SOURCES += \
- $$PWD/b2qtdevice.cpp
diff --git a/sync.profile b/sync.profile
index ede245e..9e75dde 100644
--- a/sync.profile
+++ b/sync.profile
@@ -1,5 +1,10 @@
%modules = ( # path to module name map
- "B2QtUtils" => "$basedir/src/utils"
+ "QtNetworkSettings" => "$basedir/src/networksettings",
+ "QtBluetoothSettings" => "$basedir/src/bluetoothsettings",
+ "QtLocaleSettings" => "$basedir/src/localesettings",
+ "QtTimeDateSettings" => "$basedir/src/timedatesettings",
+ "QtDisplaySettings" => "$basedir/src/displaysettings",
+ "QtLocalDevice" => "$basedir/src/localdevice"
);
%moduleheaders = ( # restrict the module headers to those found in relative path
);