summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Fedoskin <afedoskin3@gmail.com>2016-08-14 22:13:24 (GMT)
committerArtem Fedoskin <afedoskin3@gmail.com>2016-08-14 22:13:24 (GMT)
commita39c596a104c85e5168e7fefe4241fd13489b8ce (patch)
tree63a26ef12d2f10475e43d9caeabe61c5332174b5
parent4904947670972930e8ec302badba67cfbde6efdd (diff)
Added support for projection systems and color schemes. Deleted Kirigami from the project. Moved UI to QtQuickControls 2.0 and Qt 5.7. Added support for simulation time and setting the date/time. Started to work on details dialog
-rw-r--r--CMakeLists.txt11
-rw-r--r--apk/AndroidManifest.xml2
-rw-r--r--kstars/CMakeLists.txt94
-rw-r--r--kstars/fitsviewer/fitsview.cpp2
-rw-r--r--kstars/fitsviewer/fitsview.h2
-rw-r--r--kstars/indi/indilistener.cpp34
-rw-r--r--kstars/kstars.kcfg4
-rw-r--r--kstars/kstarsdata.h2
-rw-r--r--kstars/kstarslite.cpp246
-rw-r--r--kstars/kstarslite.h107
-rw-r--r--kstars/kstarslite/dialogs/detaildialoglite.cpp254
-rw-r--r--kstars/kstarslite/dialogs/detaildialoglite.h85
-rw-r--r--kstars/kstarslite/dialogs/finddialoglite.cpp3
-rw-r--r--kstars/kstarslite/dialogs/finddialoglite.h8
-rw-r--r--kstars/kstarslite/kirigami-lib/CMakeLists.txt124
-rw-r--r--kstars/kstarslite/kirigami-lib/KF5KirigamiConfig.cmake.in11
-rw-r--r--kstars/kstarslite/kirigami-lib/KF5KirigamiMacros.cmake85
-rw-r--r--kstars/kstarslite/kirigami-lib/LICENSE.GPL-2339
-rw-r--r--kstars/kstarslite/kirigami-lib/LICENSE.LGPL-2481
-rw-r--r--kstars/kstarslite/kirigami-lib/LICENSE.LGPL-2.1502
-rw-r--r--kstars/kstarslite/kirigami-lib/Mainpage.dox161
-rw-r--r--kstars/kstarslite/kirigami-lib/README.md27
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/CMakeLists.txt5
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/android/AndroidManifest.xml64
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/android/CMakeLists.txt14
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/android/kirigami.svgzbin2926 -> 0 bytes
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/android/main.cpp21
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/android/res/drawable-xxxhdpi/icon.pngbin7430 -> 0 bytes
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/android/res/drawable-xxxhdpi/kirigami_splash.9.pngbin25055 -> 0 bytes
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/android/res/drawable/icon.pngbin7430 -> 0 bytes
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/android/res/drawable/kirigami_splash.9.pngbin13479 -> 0 bytes
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/android/res/drawable/splash.xml12
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/android/res/values/apptheme.xml6
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/android/resources.qrc18
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/DesktopExampleApp.qml130
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/ExampleApp.qml141
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/MainPage.qml136
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/banner.jpgbin146016 -> 0 bytes
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/ButtonGallery.qml220
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/CheckBoxGallery.qml110
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/ListViewGallery.qml54
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/MultipleColumnsGallery.qml110
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/NonScrollableGallery.qml57
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/ProgressBarGallery.qml131
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/RadioButtonGallery.qml108
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/SliderGallery.qml111
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/SwitchGallery.qml76
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/TextFieldGallery.qml68
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/gallery/metadata.desktop18
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/simpleexamples/AbstractApplicationWindow.qml166
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/simpleexamples/FixedSidebar.qml53
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/simpleexamples/MultipleColumnsGallery.qml88
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/simpleexamples/SplitDrawer.qml60
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/simpleexamples/TabBarHeader.qml53
-rw-r--r--kstars/kstarslite/kirigami-lib/examples/simpleexamples/minimal.qml69
-rw-r--r--kstars/kstarslite/kirigami-lib/kirigami.pri12
-rw-r--r--kstars/kstarslite/kirigami-lib/kirigami.pro28
-rw-r--r--kstars/kstarslite/kirigami-lib/kirigami.qrc47
-rw-r--r--kstars/kstarslite/kirigami-lib/metainfo.yaml12
-rw-r--r--kstars/kstarslite/kirigami-lib/src/CMakeLists.txt37
-rw-r--r--kstars/kstarslite/kirigami-lib/src/Messages.sh4
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/AbstractApplicationHeader.qml54
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/AbstractApplicationWindow.qml283
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/AbstractListItem.qml35
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/Action.qml57
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/ApplicationHeader.qml37
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/ApplicationWindow.qml175
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/BasicListItem.qml66
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/ContextDrawer.qml153
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/GlobalDrawer.qml373
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/Heading.qml82
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/Icon.qml50
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/Label.qml59
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/OverlayDrawer.qml133
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/OverlaySheet.qml106
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/Page.qml280
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/ScrollablePage.qml145
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/SplitDrawer.qml45
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/SwipeListItem.qml57
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/Theme.qml54
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/ToolBarApplicationHeader.qml204
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/private/ActionButton.qml399
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/private/CornerShadow.qml72
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/private/DefaultListItemBackground.qml53
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/private/EdgeShadow.qml58
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/private/PageActionPropertyGroup.qml29
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/private/RefreshableScrollView.qml295
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/qmldir7
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/templates/AbstractApplicationHeader.qml188
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/templates/AbstractListItem.qml165
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/templates/ApplicationHeader.qml230
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/templates/OverlayDrawer.qml459
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/templates/OverlaySheet.qml278
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/templates/SplitDrawer.qml268
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/templates/SwipeListItem.qml387
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/templates/private/AbstractDrawer.qml51
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/templates/private/BackButton.qml41
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/templates/private/ContextIcon.qml70
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/templates/private/MenuIcon.qml69
-rw-r--r--kstars/kstarslite/kirigami-lib/src/controls/templates/private/PageRow.qml511
-rw-r--r--kstars/kstarslite/kirigami-lib/src/kirigamiplugin.cpp92
-rw-r--r--kstars/kstarslite/kirigami-lib/src/kirigamiplugin.h101
-rw-r--r--kstars/kstarslite/kirigami-lib/src/qmldir23
-rw-r--r--kstars/kstarslite/kirigami-lib/src/styles/Desktop/AbstractApplicationHeader.qml54
-rw-r--r--kstars/kstarslite/kirigami-lib/src/styles/Desktop/AbstractListItem.qml30
-rw-r--r--kstars/kstarslite/kirigami-lib/src/styles/Desktop/ApplicationWindow.qml30
-rw-r--r--kstars/kstarslite/kirigami-lib/src/styles/Desktop/Icon.qml56
-rw-r--r--kstars/kstarslite/kirigami-lib/src/styles/Desktop/OverlayDrawer.qml129
-rw-r--r--kstars/kstarslite/kirigami-lib/src/styles/Desktop/SwipeListItem.qml30
-rw-r--r--kstars/kstarslite/kirigami-lib/src/styles/Desktop/Theme.qml62
-rw-r--r--kstars/kstarslite/kirigami-lib/src/styles/Desktop/Units.qml101
-rw-r--r--kstars/kstarslite/kirigami-lib/src/styles/Plasma/Icon.qml33
-rw-r--r--kstars/kstarslite/kirigami-lib/src/styles/Plasma/Theme.qml45
-rw-r--r--kstars/kstarslite/kirigami-lib/src/styles/Plasma/Units.qml102
-rw-r--r--kstars/kstarslite/qml/CMakeLists.txt17
-rw-r--r--kstars/kstarslite/qml/constants/Constants.qml17
-rw-r--r--kstars/kstarslite/qml/dialogs/FindDialog.qml151
-rw-r--r--kstars/kstarslite/qml/indi/CMakeLists.txt1
-rw-r--r--kstars/kstarslite/qml/indi/DevicePanel.qml118
-rw-r--r--kstars/kstarslite/qml/indi/INDIControlPanel.qml87
-rw-r--r--kstars/kstarslite/qml/indi/ImagePreview.qml62
-rw-r--r--kstars/kstarslite/qml/indi/modules/KSButtonSwitch.qml4
-rw-r--r--kstars/kstarslite/qml/indi/modules/KSButtonsSwitchRow.qml6
-rw-r--r--kstars/kstarslite/qml/indi/modules/KSCheckBox.qml4
-rw-r--r--kstars/kstarslite/qml/indi/modules/KSComboBox.qml4
-rw-r--r--kstars/kstarslite/qml/indi/modules/KSINDIText.qml10
-rw-r--r--kstars/kstarslite/qml/indi/modules/KSINDITextField.qml7
-rw-r--r--kstars/kstarslite/qml/indi/modules/KSLed.qml8
-rw-r--r--kstars/kstarslite/qml/indi/modules/KSTab.qml36
-rw-r--r--kstars/kstarslite/qml/indi/modules/Led.qml2
-rw-r--r--kstars/kstarslite/qml/indi/modules/MotionControl.qml6
-rw-r--r--kstars/kstarslite/qml/indi/modules/Property.qml7
-rw-r--r--kstars/kstarslite/qml/main.qml597
-rw-r--r--kstars/kstarslite/qml/modules/BottomMenu.qml335
-rw-r--r--kstars/kstarslite/qml/modules/ContextDrawerMenu.qml2
-rw-r--r--kstars/kstarslite/qml/modules/KSListView.qml133
-rw-r--r--kstars/kstarslite/qml/modules/KSPage.qml172
-rw-r--r--kstars/kstarslite/qml/modules/KSScrollablePage.qml2
-rw-r--r--kstars/kstarslite/qml/modules/KSTab.qml35
-rw-r--r--kstars/kstarslite/qml/modules/ObjectDetails.qml122
-rw-r--r--kstars/kstarslite/qml/modules/SkyMapLiteWrapper.qml81
-rw-r--r--kstars/kstarslite/qml/modules/Splash.qml5
-rw-r--r--kstars/kstarslite/qml/modules/TelescopeControlMenu.qml23
-rw-r--r--kstars/kstarslite/qml/modules/TimePage.qml569
-rw-r--r--kstars/kstarslite/qml/modules/TopMenu.qml314
-rw-r--r--kstars/kstarslite/qml/modules/helpers/BottomMenuButton.qml49
-rw-r--r--kstars/kstarslite/qml/modules/helpers/DetailsItem.qml27
-rw-r--r--kstars/kstarslite/qml/modules/helpers/KSMenuItem.qml16
-rw-r--r--kstars/kstarslite/qml/modules/helpers/PassiveNotification.qml (renamed from kstars/kstarslite/kirigami-lib/src/controls/templates/private/PassiveNotification.qml)30
-rw-r--r--kstars/kstarslite/qml/modules/helpers/TimeSpinBox.qml244
-rw-r--r--kstars/kstarslite/qml/modules/helpers/TopMenuButton.qml59
-rw-r--r--kstars/kstarslite/qml/modules/helpers/Units.qml (renamed from kstars/kstarslite/kirigami-lib/src/controls/Units.qml)7
-rw-r--r--kstars/kstarslite/qml/modules/images/CMakeLists.txt3
-rw-r--r--kstars/kstarslite/qml/modules/images/SkyMap-port.pngbin144202 -> 0 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/SkyMap.pngbin158891 -> 0 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/backl.pngbin288 -> 0 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/CMakeLists.txt3
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/arrow.png (renamed from kstars/kstarslite/qml/modules/images/hdpi/arrow_down.png)bin2021 -> 2021 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/arrow_up.pngbin1855 -> 0 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/icons/CMakeLists.txt5
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/icons/appointment-new.pngbin0 -> 1232 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/icons/compass.pngbin2552 -> 1621 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/icons/constellationart.pngbin0 -> 3295 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/icons/games-config-custom.pngbin641 -> 538 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/icons/satellites.pngbin0 -> 2352 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/icons/sc-actions-kstars_hgrid.pngbin0 -> 2028 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/icons/supernovae.pngbin0 -> 4645 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/CMakeLists.txt3
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/arrow.png (renamed from kstars/kstarslite/qml/modules/images/mdpi/arrow_down.png)bin1488 -> 1488 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/arrow_up.pngbin1399 -> 0 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/icons/CMakeLists.txt5
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/icons/appointment-new.pngbin0 -> 819 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/icons/compass.pngbin1621 -> 998 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/icons/constellationart.pngbin0 -> 1745 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/icons/games-config-custom.pngbin538 -> 437 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/icons/satellites.pngbin0 -> 1309 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/icons/sc-actions-kstars_hgrid.pngbin0 -> 1392 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/icons/supernovae.pngbin0 -> 2383 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/CMakeLists.txt3
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/arrow.png (renamed from kstars/kstarslite/qml/modules/images/ldpi/arrow_down.png)bin1488 -> 1488 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/arrow_up.pngbin1399 -> 0 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/icons/CMakeLists.txt5
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/icons/appointment-new.pngbin0 -> 819 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/icons/compass.pngbin1621 -> 998 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/icons/constellationart.pngbin0 -> 1745 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/icons/games-config-custom.pngbin538 -> 437 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/icons/satellites.pngbin0 -> 1309 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/icons/sc-actions-kstars_hgrid.pngbin0 -> 1392 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/icons/supernovae.pngbin0 -> 2383 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/qrc.txt13
-rw-r--r--kstars/kstarslite/qml/modules/images/shadow.pngbin588 -> 0 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/svg/Others/appointment-new.svg102
l---------[-rw-r--r--]kstars/kstarslite/qml/modules/images/svg/Others/arrow-down.svg264
l---------[-rw-r--r--]kstars/kstarslite/qml/modules/images/svg/Others/arrow-right.svg77
l---------[-rw-r--r--]kstars/kstarslite/qml/modules/images/svg/Others/arrow-up.svg240
-rw-r--r--kstars/kstarslite/qml/modules/images/svg/Others/compass.svg (renamed from kstars/kstarslite/qml/modules/images/svg/compass.svg)0
l---------kstars/kstarslite/qml/modules/images/svg/Others/games-config-custom.svg1
-rw-r--r--kstars/kstarslite/qml/modules/images/svg/Others/satellites.pngbin0 -> 2887 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/svg/Others/supernovae.pngbin0 -> 4062 bytes
l---------[-rw-r--r--]kstars/kstarslite/qml/modules/images/svg/Others/system-search.svg72
-rwxr-xr-x[-rw-r--r--]kstars/kstarslite/qml/modules/images/svg/bash.sh4
-rw-r--r--kstars/kstarslite/qml/modules/images/svg/constellationart.pngbin0 -> 1836 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/svg/games-config-custom.svg64
-rw-r--r--kstars/kstarslite/qml/modules/images/svg/newpics/qrc.txt4
-rw-r--r--kstars/kstarslite/qml/modules/images/svg/sc-actions-kstars_hgrid.svg216
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/CMakeLists.txt3
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/arrow.png (renamed from kstars/kstarslite/qml/modules/images/xhdpi/arrow_down.png)bin2462 -> 2462 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/arrow_up.pngbin2491 -> 0 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/icons/CMakeLists.txt5
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/icons/appointment-new.pngbin0 -> 1845 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/icons/compass.pngbin3509 -> 2273 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/icons/constellationart.pngbin0 -> 4500 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/icons/games-config-custom.pngbin674 -> 596 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/icons/satellites.pngbin0 -> 2962 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/icons/sc-actions-kstars_hgrid.pngbin0 -> 2594 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/icons/supernovae.pngbin0 -> 6774 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/CMakeLists.txt3
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/arrow.png (renamed from kstars/kstarslite/qml/modules/images/xxhdpi/arrow_down.png)bin4666 -> 4666 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/arrow_up.pngbin4615 -> 0 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/icons/CMakeLists.txt5
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/icons/appointment-new.pngbin0 -> 2652 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/icons/compass.pngbin5308 -> 3509 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/icons/constellationart.pngbin0 -> 8029 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/icons/games-config-custom.pngbin863 -> 674 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/icons/satellites.pngbin0 -> 5996 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/icons/sc-actions-kstars_hgrid.pngbin0 -> 3789 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/icons/supernovae.pngbin0 -> 13938 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/CMakeLists.txt3
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/arrow.png (renamed from kstars/kstarslite/qml/modules/images/xxxhdpi/arrow_down.png)bin6689 -> 6689 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/arrow_up.pngbin6768 -> 0 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/icons/CMakeLists.txt6
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/icons/appointment-new.pngbin0 -> 3648 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/icons/compass.pngbin7151 -> 4668 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/icons/constellationart.pngbin0 -> 10969 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/icons/games-config-custom.pngbin958 -> 779 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/icons/satellites.pngbin0 -> 8247 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/icons/sc-actions-kstars_hgrid.pngbin0 -> 5147 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/icons/supernovae.pngbin0 -> 20603 bytes
-rw-r--r--kstars/kstarslite/qml/modules/popups/ColorSchemePopup.qml40
-rw-r--r--kstars/kstarslite/qml/modules/popups/ObjectPopup.qml45
-rw-r--r--kstars/kstarslite/qml/modules/popups/ProjectionsPopup.qml44
-rw-r--r--kstars/kstarslite/skyitems/asteroidsitem.cpp2
-rw-r--r--kstars/kstarslite/skyitems/constellationartitem.cpp37
-rw-r--r--kstars/kstarslite/skyitems/constellationartitem.h12
-rw-r--r--kstars/kstarslite/skyitems/constellationnamesitem.cpp2
-rw-r--r--kstars/kstarslite/skyitems/deepskyitem.cpp23
-rw-r--r--kstars/kstarslite/skyitems/deepskyitem.h6
-rw-r--r--kstars/kstarslite/skyitems/deepstaritem.cpp2
-rw-r--r--kstars/kstarslite/skyitems/lines/eclipticitem.cpp3
-rw-r--r--kstars/kstarslite/skyitems/lines/equatoritem.cpp2
-rw-r--r--kstars/kstarslite/skyitems/lines/linesitem.cpp11
-rw-r--r--kstars/kstarslite/skyitems/lines/linesitem.h8
-rw-r--r--kstars/kstarslite/skyitems/lines/milkywayitem.cpp6
-rw-r--r--kstars/kstarslite/skyitems/planetsitem.cpp10
-rw-r--r--kstars/kstarslite/skyitems/planetsitem.h12
-rw-r--r--kstars/kstarslite/skyitems/rootnode.cpp39
-rw-r--r--kstars/kstarslite/skyitems/rootnode.h15
-rw-r--r--kstars/kstarslite/skyitems/skynodes/deepskynode.cpp11
-rw-r--r--kstars/kstarslite/skyitems/skynodes/deepskynode.h7
-rw-r--r--kstars/kstarslite/skyitems/skynodes/dsosymbolnode.cpp8
-rw-r--r--kstars/kstarslite/skyitems/skynodes/dsosymbolnode.h1
-rw-r--r--kstars/kstarslite/skyitems/skynodes/horizonnode.cpp2
-rw-r--r--kstars/kstarslite/skyitems/skynodes/labelnode.cpp67
-rw-r--r--kstars/kstarslite/skyitems/skynodes/labelnode.h4
-rw-r--r--kstars/kstarslite/skyitems/skynodes/nodes/ellipsenode.cpp5
-rw-r--r--kstars/kstarslite/skyitems/skynodes/nodes/ellipsenode.h7
-rw-r--r--kstars/kstarslite/skyitems/skynodes/nodes/linenode.cpp10
-rw-r--r--kstars/kstarslite/skyitems/skynodes/nodes/pointnode.cpp15
-rw-r--r--kstars/kstarslite/skyitems/skynodes/nodes/pointnode.h2
-rw-r--r--kstars/kstarslite/skyitems/skynodes/planetmoonsnode.cpp12
-rw-r--r--kstars/kstarslite/skyitems/skynodes/planetmoonsnode.h8
-rw-r--r--kstars/kstarslite/skyitems/skynodes/planetnode.cpp7
-rw-r--r--kstars/kstarslite/skyitems/skynodes/planetnode.h6
-rw-r--r--kstars/kstarslite/skyitems/skynodes/pointsourcenode.cpp25
-rw-r--r--kstars/kstarslite/skyitems/skynodes/pointsourcenode.h35
-rw-r--r--kstars/kstarslite/skyitems/skynodes/satellitenode.cpp2
-rw-r--r--kstars/kstarslite/skyitems/skynodes/skynode.h2
-rw-r--r--kstars/kstarslite/skyitems/skynodes/skypolygonnode.cpp2
-rw-r--r--kstars/kstarslite/skyitems/skynodes/supernovanode.cpp2
-rw-r--r--kstars/kstarslite/skyitems/skyopacitynode.cpp2
-rw-r--r--kstars/kstarslite/skyitems/staritem.cpp10
-rw-r--r--kstars/kstarslite/skyitems/supernovaeitem.cpp1
-rw-r--r--kstars/kstarslite/skyitems/telescopesymbolsitem.cpp5
-rw-r--r--kstars/kstarslite/skyitems/typedeflite.h1
-rw-r--r--kstars/kstarslite/skyobjectlite.cpp5
-rw-r--r--kstars/kstarslite/skyobjectlite.h20
-rw-r--r--kstars/kstarsliteinit.cpp8
-rw-r--r--kstars/main.cpp48
-rw-r--r--kstars/projections/azimuthalequidistantprojector.cpp2
-rw-r--r--kstars/projections/equirectangularprojector.cpp2
-rw-r--r--kstars/projections/gnomonicprojector.cpp2
-rw-r--r--kstars/projections/lambertprojector.cpp1
-rw-r--r--kstars/projections/orthographicprojector.cpp2
-rw-r--r--kstars/projections/projector.cpp8
-rw-r--r--kstars/projections/projector.h2
-rw-r--r--kstars/projections/stereographicprojector.cpp2
-rw-r--r--kstars/skycomponents/asteroidscomponent.cpp2
-rw-r--r--kstars/skycomponents/cometscomponent.cpp2
-rw-r--r--kstars/skycomponents/planetmoonscomponent.h2
-rw-r--r--kstars/skycomponents/skycomponent.h2
-rw-r--r--kstars/skycomponents/skylabeler.cpp3
-rw-r--r--kstars/skycomponents/skymesh.cpp3
-rw-r--r--kstars/skycomponents/supernovaecomponent.cpp2
-rw-r--r--kstars/skymaplite.cpp62
-rw-r--r--kstars/skymaplite.h42
-rw-r--r--kstars/skymapliteevents.cpp32
-rw-r--r--kstars/time/simclock.cpp7
-rw-r--r--kstars/time/simclock.h5
308 files changed, 3819 insertions, 13292 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21b5bc3..ed2b685 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,12 @@ if(BUILD_KSTARS_LITE)
endif(BUILD_KSTARS_LITE)
# minimal requirements
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
-set (QT_MIN_VERSION "5.4.0")
+
+if(BUILD_KSTARS_LITE)
+ set (QT_MIN_VERSION "5.7.0") #QtQuickControls 2 is available only in the Qt 5.7.0
+else()
+ set (QT_MIN_VERSION "5.4.0")
+endif()
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -27,7 +32,7 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})
if(BUILD_KSTARS_LITE)
- find_package(Qt5 5.4 REQUIRED COMPONENTS Gui Qml Quick Xml Sql Network Sensors)
+ find_package(Qt5 5.7 REQUIRED COMPONENTS Gui Qml Quick QuickControls2 Xml Svg Sql Network Sensors)
else()
find_package(Qt5 5.4 REQUIRED COMPONENTS Gui Qml Quick Xml Sql Svg Network PrintSupport)
endif()
@@ -79,7 +84,7 @@ add_definitions(${EIGEN_DEFINITIONS})
include_directories(${EIGEN3_INCLUDE_DIR})
if(BUILD_KSTARS_LITE)
- find_package(CFitsio REQUIRED)
+ find_package(CFitsio) #REQUIRED)
else()
find_package(CFitsio)
endif()
diff --git a/apk/AndroidManifest.xml b/apk/AndroidManifest.xml
index 2ba5bfb..3e97ad0 100644
--- a/apk/AndroidManifest.xml
+++ b/apk/AndroidManifest.xml
@@ -41,5 +41,5 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
- <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19"/>
+ <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16"/>
</manifest>
diff --git a/kstars/CMakeLists.txt b/kstars/CMakeLists.txt
index 483658e..44bb546 100644
--- a/kstars/CMakeLists.txt
+++ b/kstars/CMakeLists.txt
@@ -42,17 +42,19 @@ endif(BUILD_KSTARS_LITE)
add_definitions( -DSOURCE_DIR=\"${kstars_SOURCE_DIR}\" )
if(BUILD_KSTARS_LITE)
- set (fits_SRCS
- fitsviewer/fitsdatalite.cpp
- fitsviewer/fitsviewlite.cpp
- fitsviewer/bayer.c
- )
- if(ANDROID)
- include_directories(${kstars_SOURCE_DIR}/android_lib/include)
- else()
- #if it is not Android we need only CFITSIO
- include_directories(${CFITSIO_INCLUDE_DIR})
- endif()
+ if(INDI_FOUND)
+ set (fits_SRCS
+ fitsviewer/fitsdatalite.cpp
+ fitsviewer/fitsviewlite.cpp
+ fitsviewer/bayer.c
+ )
+ if(ANDROID)
+ include_directories(${kstars_SOURCE_DIR}/android_lib/include)
+ else()
+ #if it is not Android we need only CFITSIO
+ include_directories(${CFITSIO_INCLUDE_DIR})
+ endif()
+ endif(INDI_FOUND)
else(BUILD_KSTARS_LITE)
if (CFITSIO_FOUND)
set (fits_SRCS
@@ -80,39 +82,7 @@ if(BUILD_KSTARS_LITE)
set (indi_SRCS
indi/clientmanagerlite.cpp
indi/inditelescopelite.cpp
- #indi/drivermanager.cpp
- #indi/servermanager.cpp
- #indi/clientmanager.cpp
- #indi/guimanager.cpp
- #indi/driverinfo.cpp
- #indi/deviceinfo.cpp
- #indi/indidevice.cpp
- #indi/indigroup.cpp
- #indi/indiproperty.cpp
- #indi/indielement.cpp
- #indi/indistd.cpp
- #indi/indilistener.cpp
- #indi/inditelescope.cpp
- #indi/indiccd.cpp
- #indi/indifocuser.cpp
- #indi/indifilter.cpp
- #indi/indidome.cpp
- #indi/indiweather.cpp
- #indi/indicap.cpp
- #indi/indilightbox.cpp
- #indi/indidbus.cpp
- #indi/opsindi.cpp
- #indi/telescopewizardprocess.cpp
- #indi/streamwg.cpp
- )
- set(indiui_SRCS
- indi/drivermanager.ui
- #indi/opsindi.ui
- #indi/indihostconf.ui
- #indi/streamform.ui
- #indi/telescopewizard.ui
)
- include_directories(${INDI_INCLUDE_DIR})
elseif(BUILD_KSTARS_LITE)
set (indi_SRCS
indi/drivermanager.cpp
@@ -140,6 +110,7 @@ elseif(BUILD_KSTARS_LITE)
indi/telescopewizardprocess.cpp
indi/streamwg.cpp
)
+
set(indiui_SRCS
indi/drivermanager.ui
indi/opsindi.ui
@@ -197,6 +168,7 @@ elseif(BUILD_KSTARS_LITE)
endif(CFITSIO_FOUND)
endif(BUILD_KSTARS_LITE)
+include_directories(${INDI_INCLUDE_DIR})
endif (INDI_FOUND)
if(NOT BUILD_KSTARS_LITE)
@@ -611,6 +583,7 @@ if(BUILD_KSTARS_LITE)
#ImageProvider
kstarslite/imageprovider.cpp
#Dialogs
+ kstarslite/dialogs/detaildialoglite.cpp
kstarslite/dialogs/finddialoglite.cpp
kstarslite/dialogs/skyobjectlistmodel.cpp
#RootNode
@@ -682,14 +655,28 @@ if(BUILD_KSTARS_LITE)
set(kstarsliteqml_SRCS
kstarslite/qml/main.qml
kstarslite/qml/constants/Constants.qml
+ kstarslite/qml/modules/SkyMapLiteWrapper.qml
kstarslite/qml/modules/BottomMenu.qml
kstarslite/qml/modules/KSPage.qml
+ kstarslite/qml/modules/KSListView.qml
kstarslite/qml/modules/KSScrollablePage.qml
kstarslite/qml/modules/TopMenu.qml
kstarslite/qml/modules/helpers/TopMenuButton.qml
+ kstarslite/qml/modules/helpers/BottomMenuButton.qml
kstarslite/qml/modules/Splash.qml
kstarslite/qml/modules/ContextDrawerMenu.qml
- kstarslite/qml/modules/TelescopeControlMenu.qml
+ kstarslite/qml/modules/helpers/TimeSpinBox.qml
+ kstarslite/qml/modules/TimePage.qml
+ kstarslite/qml/modules/ObjectDetails.qml
+ kstarslite/qml/modules/KSTab.qml
+ #Popups
+ kstarslite/qml/modules/popups/ProjectionsPopup.qml
+ kstarslite/qml/modules/popups/ColorSchemePopup.qml
+ kstarslite/qml/modules/popups/ObjectPopup.qml
+ #Helpers
+ kstarslite/qml/modules/helpers/PassiveNotification.qml
+ kstarslite/qml/modules/helpers/KSMenuItem.qml
+ kstarslite/qml/modules/helpers/DetailsItem.qml
#Dialogs
kstarslite/qml/dialogs/FindDialog.qml
#INDI
@@ -700,7 +687,6 @@ if(BUILD_KSTARS_LITE)
kstarslite/qml/indi/modules/Led.qml
kstarslite/qml/indi/modules/KSLed.qml
kstarslite/qml/indi/modules/Property.qml
- kstarslite/qml/indi/modules/KSTab.qml
kstarslite/qml/indi/modules/KSComboBox.qml
kstarslite/qml/indi/modules/KSButtonSwitch.qml
kstarslite/qml/indi/modules/KSCheckBox.qml
@@ -709,7 +695,6 @@ if(BUILD_KSTARS_LITE)
kstarslite/qml/indi/modules/KSButtonsSwitchRow.qml
)
add_subdirectory(kstarslite/qml)
- add_subdirectory(kstarslite/kirigami-lib)
if(ANDROID)
add_subdirectory(kstarslite/res)
endif()
@@ -836,13 +821,16 @@ if(BUILD_KSTARS_LITE)
Qt5::Qml
Qt5::Quick
Qt5::Sensors
+ Qt5::QuickControls2
${ZLIB_LIBRARIES}
)
- if(ANDROID)
- add_library(RAWExtractor SHARED IMPORTED)
- set_property(TARGET RAWExtractor PROPERTY IMPORTED_LOCATION ${kstars_SOURCE_DIR}/android_lib/libRAWExtractor.so)
- target_link_libraries(KStarsLib RAWExtractor)
- endif(ANDROID)
+ if(INDI_FOUND)
+ if(ANDROID)
+ add_library(RAWExtractor SHARED IMPORTED)
+ set_property(TARGET RAWExtractor PROPERTY IMPORTED_LOCATION ${kstars_SOURCE_DIR}/android_lib/libRAWExtractor.so)
+ target_link_libraries(KStarsLib RAWExtractor)
+ endif(ANDROID)
+ endif(INDI_FOUND)
else(BUILD_KSTARS_LITE)
target_link_libraries(KStarsLib
LibKSDataHandlers
@@ -853,7 +841,6 @@ else(BUILD_KSTARS_LITE)
KF5::KIOFileWidgets
KF5::WidgetsAddons
KF5::Plotting
- #KF5::IconThemes
Qt5::Gui
Qt5::PrintSupport
Qt5::Sql
@@ -867,10 +854,11 @@ endif(BUILD_KSTARS_LITE)
if(NOT WIN32)
target_link_libraries(KStarsLib m)
endif(NOT WIN32)
+
if (CFITSIO_FOUND)
target_link_libraries(KStarsLib ${CFITSIO_LIBRARIES})
-
endif(CFITSIO_FOUND)
+
if(INDI_FOUND)
add_definitions(-DINDI_FOUND)
if(BUILD_KSTARS_LITE)
diff --git a/kstars/fitsviewer/fitsview.cpp b/kstars/fitsviewer/fitsview.cpp
index 8585d60..e3e9f6e 100644
--- a/kstars/fitsviewer/fitsview.cpp
+++ b/kstars/fitsviewer/fitsview.cpp
@@ -50,7 +50,7 @@
#include "Options.h"
#ifdef HAVE_INDI
-#include <basedevice.h>
+#include "basedevice.h"
#include "indi/indilistener.h"
#include "indi/indistd.h"
#include "indi/driverinfo.h"
diff --git a/kstars/fitsviewer/fitsview.h b/kstars/fitsviewer/fitsview.h
index b7ef7e2..19ce830 100644
--- a/kstars/fitsviewer/fitsview.h
+++ b/kstars/fitsviewer/fitsview.h
@@ -144,7 +144,7 @@ private:
void calculateMaxPixel(double min, double max);
void initDisplayImage();
- //FITSLabel *image_frame;
+ FITSLabel *image_frame;
FITSData *image_data;
int image_width, image_height;
diff --git a/kstars/indi/indilistener.cpp b/kstars/indi/indilistener.cpp
index 40f45a6..8f0c6d4 100644
--- a/kstars/indi/indilistener.cpp
+++ b/kstars/indi/indilistener.cpp
@@ -38,11 +38,11 @@
/* INDI standard property used across all clients to enable interoperability. */
const char * indi_std[NINDI_STD] =
- {"CONNECTION", "DEVICE_PORT", "TIME_UTC", "TIME_LST", "GEOGRAPHIC_COORD", "EQUATORIAL_COORD",
- "EQUATORIAL_EOD_COORD", "EQUATORIAL_EOD_COORD_REQUEST", "HORIZONTAL_COORD", "TELESCOPE_ABORT_MOTION", "ON_COORD_SET",
- "SOLAR_SYSTEM", "TELESCOPE_MOTION_NS", "TELESCOPE_MOTION_WE", "TELESCOPE_PARK", "DOME_PARK", "GPS_REFRESH", "WEATHER_STATUS", "CCD_EXPOSURE",
- "CCD_TEMPERATURE", "CCD_FRAME", "CCD_FRAME_TYPE", "CCD_BINNING", "CCD_INFO", "CCD_VIDEO_STREAM",
- "RAW_STREAM", "IMAGE_STREAM", "FOCUS_SPEED", "FOCUS_MOTION", "FOCUS_TIMER", "FILTER_SLOT", "WATCHDOG_HEARTBEAT", "CAP_PARK", "FLAT_LIGHT_CONTROL", "FLAT_LIGHT_INTENSITY"};
+{"CONNECTION", "DEVICE_PORT", "TIME_UTC", "TIME_LST", "GEOGRAPHIC_COORD", "EQUATORIAL_COORD",
+ "EQUATORIAL_EOD_COORD", "EQUATORIAL_EOD_COORD_REQUEST", "HORIZONTAL_COORD", "TELESCOPE_ABORT_MOTION", "ON_COORD_SET",
+ "SOLAR_SYSTEM", "TELESCOPE_MOTION_NS", "TELESCOPE_MOTION_WE", "TELESCOPE_PARK", "DOME_PARK", "GPS_REFRESH", "WEATHER_STATUS", "CCD_EXPOSURE",
+ "CCD_TEMPERATURE", "CCD_FRAME", "CCD_FRAME_TYPE", "CCD_BINNING", "CCD_INFO", "CCD_VIDEO_STREAM",
+ "RAW_STREAM", "IMAGE_STREAM", "FOCUS_SPEED", "FOCUS_MOTION", "FOCUS_TIMER", "FILTER_SLOT", "WATCHDOG_HEARTBEAT", "CAP_PARK", "FLAT_LIGHT_CONTROL", "FLAT_LIGHT_INTENSITY"};
INDIListener * INDIListener::_INDIListener = NULL;
@@ -72,7 +72,7 @@ ISD::GDInterface * INDIListener::getDevice(const QString &name)
{
foreach(ISD::GDInterface *gi, devices)
if (!strcmp(gi->getDeviceName(), name.toLatin1().constData()))
- return gi;
+ return gi;
return NULL;
}
@@ -87,7 +87,7 @@ void INDIListener::addClient(ClientManager *cm)
connect(cm, SIGNAL(newINDIDevice(DeviceInfo*)), this, SLOT(processDevice(DeviceInfo*)));
connect(cm, SIGNAL(removeINDIDevice(DeviceInfo*)), this, SLOT(removeDevice(DeviceInfo*)), Qt::DirectConnection);
- connect(cm, SIGNAL(newINDIProperty(INDI::Property*)), this, SLOT(registerProperty(INDI::Property*)));
+ connect(cm, SIGNAL(newINDIProperty(INDI::Property*)), this, SLOT(registerProperty(INDI::Property*)));
connect(cm, SIGNAL(removeINDIProperty(INDI::Property*)), this, SLOT(removeProperty(INDI::Property*)));
connect(cm, SIGNAL(newINDISwitch(ISwitchVectorProperty*)), this, SLOT(processSwitch(ISwitchVectorProperty*)));
@@ -118,7 +118,7 @@ void INDIListener::removeClient(ClientManager *cm)
if (hostSource)
return;
}
- else
+ else
++it;
}
@@ -184,7 +184,7 @@ void INDIListener::registerProperty(INDI::Property *prop)
gd = new ISD::Telescope(gd);
devices.append(gd);
emit newTelescope(gd);
- }
+ }
else if (gd->getType() == KSTARS_UNKNOWN && (!strcmp(prop->getName(), "CCD_EXPOSURE")))
{
devices.removeOne(gd);
@@ -210,10 +210,10 @@ void INDIListener::registerProperty(INDI::Property *prop)
{
devices.removeOne(gd);
gd = new ISD::Focuser(gd);
- devices.append(gd);
- }
+ devices.append(gd);
+ }
- emit newFocuser(gd);
+ emit newFocuser(gd);
}
else if (!strcmp(prop->getName(), "DOME_MOTION"))
@@ -225,7 +225,7 @@ void INDIListener::registerProperty(INDI::Property *prop)
devices.append(gd);
}
- emit newDome(gd);
+ emit newDome(gd);
}
else if (!strcmp(prop->getName(), "WEATHER_STATUS"))
{
@@ -236,7 +236,7 @@ void INDIListener::registerProperty(INDI::Property *prop)
devices.append(gd);
}
- emit newWeather(gd);
+ emit newWeather(gd);
}
else if (!strcmp(prop->getName(), "CAP_PARK"))
{
@@ -247,11 +247,11 @@ void INDIListener::registerProperty(INDI::Property *prop)
devices.append(gd);
}
- emit newDustCap(gd);
+ emit newDustCap(gd);
}
else if (!strcmp(prop->getName(), "FLAT_LIGHT_CONTROL"))
{
- #if (INDI_VERSION_MAJOR >= 1 && INDI_VERSION_MINOR >= 2)
+#if (INDI_VERSION_MAJOR >= 1 && INDI_VERSION_MINOR >= 2)
// If light box part of dust cap
if (gd->getType() == KSTARS_UNKNOWN)
{
@@ -273,7 +273,7 @@ void INDIListener::registerProperty(INDI::Property *prop)
emit newLightBox(gd);
}
}
- #endif
+#endif
}
if (!strcmp(prop->getName(), "TELESCOPE_TIMED_GUIDE_WE"))
diff --git a/kstars/kstars.kcfg b/kstars/kstars.kcfg
index 7744eb8..1bd59e1 100644
--- a/kstars/kstars.kcfg
+++ b/kstars/kstars.kcfg
@@ -642,8 +642,8 @@
<entry name="ZoomFactor" type="Double">
<label>Zoom Factor, in pixels per radian</label>
<whatsthis>The zoom level, measured in pixels per radian.</whatsthis>
- <default>1000.</default>
- <min>200.</min><max>5000000.</max>
+ <default>100.</default>
+ <min>100.</min><max>5000000.</max>
</entry>
<entry name="MagLimitAsteroid" type="Double">
<label>Faint limit for asteroids</label>
diff --git a/kstars/kstarsdata.h b/kstars/kstarsdata.h
index 00a835c..d2f2c2b 100644
--- a/kstars/kstarsdata.h
+++ b/kstars/kstarsdata.h
@@ -161,7 +161,7 @@ public:
CatalogDB *catalogdb() { return &m_catalogdb; }
/** @return pointer to the simulation Clock object */
- SimClock *clock() { return &Clock; }
+ Q_INVOKABLE SimClock *clock() { return &Clock; }
/** @return pointer to the local sidereal time: a dms object */
dms *lst() { return &LST; }
diff --git a/kstars/kstarslite.cpp b/kstars/kstarslite.cpp
index a834010..934d805 100644
--- a/kstars/kstarslite.cpp
+++ b/kstars/kstarslite.cpp
@@ -18,17 +18,24 @@
#include "skymaplite.h"
#include "kstarsdata.h"
#include <QQmlContext>
-#include <QApplication>
+#include <QGuiApplication>
#include <QQuickWindow>
+#include <QQuickStyle>
#include <QSurfaceFormat>
-#include "indi/clientmanagerlite.h"
#include "kstarslite/imageprovider.h"
#include "klocalizedcontext.h"
+#include "ksplanetbase.h"
+#include <QScreen>
+
+#ifdef INDI_FOUND
+#include "indi/clientmanagerlite.h"
+#endif
#include "kspaths.h"
//Dialog
#include "kstarslite/dialogs/finddialoglite.h"
+#include "kstarslite/dialogs/detaildialoglite.h"
#include "Options.h"
#include "ksutils.h"
@@ -61,23 +68,25 @@ KStarsLite::KStarsLite( bool doSplash, bool startClock, const QString &startDate
m_Engine.rootContext()->setContextProperty("KStarsLite", this);
m_Engine.rootContext()->setContextProperty("KStarsData", m_KStarsData);
m_Engine.rootContext()->setContextProperty("Options", Options::self());
+ m_Engine.rootContext()->setContextProperty("SimClock", m_KStarsData->clock());
m_Engine.rootContext()->setContextObject(new KLocalizedContext(this));
+ qmlRegisterUncreatableType<Projector>("KStarsLiteEnums", 1, 0, "Projection", "Provides Projection enum");
+ qmlRegisterUncreatableType<KStarsLite>("KStarsLiteEnums", 1, 0, "ObjectsToToggle", "Enum for togglint the visibility of sky objects");
//Dialogs
m_findDialogLite = new FindDialogLite;
+ m_detailDialogLite = new DetailDialogLite;
m_Engine.rootContext()->setContextProperty("FindDialogLite", m_findDialogLite);
+ m_Engine.rootContext()->setContextProperty("DetailDialogLite", m_detailDialogLite);
//Set Geographic Location from Options
m_KStarsData->setLocationFromOptions();
- /*SkyMapLite has to be loaded before KStarsData is initialized because SkyComponents derived classes
- have to add SkyItems to the SkyMapLite*/
- m_SkyMapLite = SkyMapLite::createInstance();
+ //Set style - default is Material
+ QQuickStyle::setStyle("Material");
- m_Engine.rootContext()->setContextProperty("SkyMapLite", m_SkyMapLite);
- m_imgProvider = new ImageProvider;
- m_Engine.addImageProvider(QLatin1String("images"), m_imgProvider);
- //qmlRegisterType<SkyPoint>("skymaplite",1,0,"SkyMapLite");
+ //qmlRegisterType<SkyPoint>("skymaplite",1,0,"SkyMapLite");
+ //qmlRegisterType<KStarsDateTime>("KStarsLite",1,0,"KStarsDateTime");
#ifdef Q_OS_ANDROID
QString main = KSPaths::locate(QStandardPaths::AppDataLocation, "kstarslite/qml/main.qml");
@@ -92,7 +101,16 @@ KStarsLite::KStarsLite( bool doSplash, bool startClock, const QString &startDate
m_RootObject = m_Engine.rootObjects()[0];
QQuickItem *skyMapLiteWrapper = m_RootObject->findChild<QQuickItem*>("skyMapLiteWrapper");
- m_SkyMapLite->setParentItem(skyMapLiteWrapper);
+
+ /*SkyMapLite has to be loaded before KStarsData is initialized because SkyComponents derived classes
+ have to add SkyItems to the SkyMapLite*/
+ m_SkyMapLite = SkyMapLite::createInstance(skyMapLiteWrapper);
+
+ m_detailDialogLite->initialize();
+
+ m_Engine.rootContext()->setContextProperty("SkyMapLite", m_SkyMapLite);
+ m_imgProvider = new ImageProvider;
+ m_Engine.addImageProvider(QLatin1String("images"), m_imgProvider);
// Whenever the wrapper's(parent) dimensions changed, change SkyMapLite too
connect(skyMapLiteWrapper, &QQuickItem::widthChanged, m_SkyMapLite, &SkyMapLite::resizeItem);
@@ -101,11 +119,11 @@ KStarsLite::KStarsLite( bool doSplash, bool startClock, const QString &startDate
m_SkyMapLite->resizeItem(); /* Set initial size pf SkyMapLite. Without it on Android SkyMapLite is
not displayed until screen orientation is not changed */
- //QQuickWindow *mainWindow = m_RootObject->findChild<QQuickWindow*>("mainWindow");
+ //QQuickWindow *mainWindow = m_RootObject->findChild<QQuickWindow*>("window");
QQuickWindow *mainWindow = static_cast<QQuickWindow *>(m_Engine.rootObjects()[0]);
QSurfaceFormat format = mainWindow->format();
- format.setSamples(4);
+ format.setSamples(16);
format.setSwapBehavior(QSurfaceFormat::TripleBuffer);
mainWindow->setFormat(format);
@@ -142,7 +160,7 @@ KStarsLite::KStarsLite( bool doSplash, bool startClock, const QString &startDate
DarkPalette.setColor( QPalette::Inactive, QPalette::Text, QColor( 238, 0, 0 ) );
DarkPalette.setColor( QPalette::Inactive, QPalette::Base, QColor( 30, 10, 10 ) );
//store original color scheme
- OriginalPalette = QApplication::palette();
+ OriginalPalette = QGuiApplication::palette();
if( !m_KStarsData->initialize() ) return;
datainitFinished();
@@ -153,6 +171,34 @@ KStarsLite::KStarsLite( bool doSplash, bool startClock, const QString &startDate
#endif
}
+void KStarsLite::slotTrack() {
+ if ( Options::isTracking() ) {
+ Options::setIsTracking( false );
+ /*actionCollection()->action("track_object")->setText( i18n( "Engage &Tracking" ) );
+ actionCollection()->action("track_object")->setIcon( QIcon::fromTheme("document-decrypt") );
+
+ KSPlanetBase* planet = dynamic_cast<KSPlanetBase*>( map()->focusObject() );
+ if( planet && data()->temporaryTrail ) {
+ planet->clearTrail();
+ data()->temporaryTrail = false;
+ }*/ // No trail support yet
+
+ map()->setClickedObject( NULL );
+ map()->setFocusObject( NULL );//no longer tracking focusObject
+ map()->setFocusPoint( NULL );
+ } else {
+ map()->setClickedPoint( map()->focus() );
+ map()->setClickedObject( NULL );
+ map()->setFocusObject( NULL );//no longer tracking focusObject
+ map()->setFocusPoint( map()->clickedPoint() );
+ Options::setIsTracking( true );
+ /*actionCollection()->action("track_object")->setText( i18n( "Stop &Tracking" ) );
+ actionCollection()->action("track_object")->setIcon( QIcon::fromTheme("document-encrypt") );*/
+ }
+
+ map()->forceUpdate();
+}
+
KStarsLite *KStarsLite::createInstance( bool doSplash, bool clockrunning, const QString &startDateString) {
delete pinstance;
// pinstance is set directly in constructor.
@@ -231,17 +277,185 @@ void KStarsLite::loadColorScheme( const QString &name ) {
//set the application colors for the Night Vision scheme
if ( Options::darkAppColors() == false && filename == "night.colors" ) {
Options::setDarkAppColors( true );
- OriginalPalette = QApplication::palette();
- QApplication::setPalette( DarkPalette );
+ OriginalPalette = QGuiApplication::palette();
+ QGuiApplication::setPalette( DarkPalette );
}
if ( Options::darkAppColors() && filename != "night.colors" ) {
Options::setDarkAppColors( false );
- QApplication::setPalette( OriginalPalette );
+ QGuiApplication::setPalette( OriginalPalette );
}
Options::setColorSchemeFile( name );
+ //Reinitialize stars textures
+ map()->initStarImages();
+
map()->forceUpdate();
}
}
+
+void KStarsLite::slotSetTime() {
+ //QPointer<TimeDialog> timedialog = new TimeDialog( data()->lt(), data()->geo(), this );
+
+ /*if ( timedialog->exec() == QDialog::Accepted ) {
+ data()->changeDateTime( data()->geo()->LTtoUT( timedialog->selectedDateTime() ) );
+
+ if ( Options::useAltAz() ) {
+ if ( map()->focusObject() ) {
+ map()->focusObject()->EquatorialToHorizontal( data()->lst(), data()->geo()->lat() );
+ map()->setFocus( map()->focusObject() );
+ } else
+ map()->focus()->HorizontalToEquatorial( data()->lst(), data()->geo()->lat() );
+ }
+
+ map()->forceUpdateNow();
+
+ //If focusObject has a Planet Trail, clear it and start anew.
+ KSPlanetBase* planet = dynamic_cast<KSPlanetBase*>( map()->focusObject() );
+ if( planet && planet->hasTrail() ) {
+ planet->clearTrail();
+ planet->addToTrail();
+ }
+ }*/
+ //delete timedialog;
+}
+
+void KStarsLite::slotToggleTimer() {
+ if ( data()->clock()->isActive() ) {
+ data()->clock()->stop();
+ updateTime();
+ } else {
+ if ( fabs( data()->clock()->scale() ) > Options::slewTimeScale() )
+ data()->clock()->setManualMode( true );
+ data()->clock()->start();
+ if ( data()->clock()->isManualMode() )
+ map()->forceUpdate();
+ }
+
+ // Update clock state in options
+ Options::setRunClock( data()->clock()->isActive() );
+}
+
+void KStarsLite::slotStepForward() {
+ if ( data()->clock()->isActive() )
+ data()->clock()->stop();
+ data()->clock()->manualTick( true );
+ map()->forceUpdate();
+}
+
+void KStarsLite::slotStepBackward() {
+ if ( data()->clock()->isActive() )
+ data()->clock()->stop();
+ data()->clock()->setClockScale( -1.0 * data()->clock()->scale() ); //temporarily need negative time step
+ data()->clock()->manualTick( true );
+ data()->clock()->setClockScale( -1.0 * data()->clock()->scale() ); //reset original sign of time step
+ map()->forceUpdate();
+}
+
+void KStarsLite::applyConfig(bool doApplyFocus) {
+ Q_UNUSED(doApplyFocus);
+ //color scheme
+ m_KStarsData->colorScheme()->loadFromConfig();
+ QGuiApplication::setPalette( Options::darkAppColors() ? DarkPalette : OriginalPalette );
+}
+
+void KStarsLite::setProjection(uint proj) {
+ Options::setProjection(proj);
+ //We update SkyMapLite 2 times because of the bug in Projector::updateClipPoly()
+ SkyMapLite::Instance()->forceUpdate();
+ SkyMapLite::Instance()->forceUpdate();
+}
+
+QColor KStarsLite::getColor(QString schemeColor) {
+ return KStarsData::Instance()->colorScheme()->colorNamed(schemeColor);
+}
+
+void KStarsLite::toggleObjects(ObjectsToToggle toToggle, bool toggle) {
+ switch(toToggle) {
+ case ObjectsToToggle::Stars:
+ Options::setShowStars(toggle);
+ break;
+ case ObjectsToToggle::DeepSky:
+ Options::setShowDeepSky(toggle);
+ break;
+ case ObjectsToToggle::Planets:
+ Options::setShowSolarSystem(toggle);
+ break;
+ case ObjectsToToggle::CLines:
+ Options::setShowCLines(toggle);
+ break;
+ case ObjectsToToggle::CBounds:
+ Options::setShowCBounds(toggle);
+ break;
+ case ObjectsToToggle::ConstellationArt:
+ Options::setShowConstellationArt(toggle);
+ break;
+ case ObjectsToToggle::MilkyWay:
+ Options::setShowMilkyWay(toggle);
+ break;
+ case ObjectsToToggle::CNames:
+ Options::setShowCNames(toggle);
+ break;
+ case ObjectsToToggle::EquatorialGrid:
+ Options::setShowEquatorialGrid(toggle);
+ break;
+ case ObjectsToToggle::HorizontalGrid:
+ Options::setShowHorizontalGrid(toggle);
+ break;
+ case ObjectsToToggle::Ground:
+ Options::setShowGround(toggle);
+ break;
+ case ObjectsToToggle::Flags:
+ Options::setShowFlags(toggle);
+ break;
+ case ObjectsToToggle::Satellites:
+ Options::setShowSatellites(toggle);
+ break;
+ case ObjectsToToggle::Supernovae:
+ Options::setShowSupernovae(toggle);
+ break;
+ };
+
+ // update time for all objects because they might be not initialized
+ // it's needed when using horizontal coordinates
+ data()->setFullTimeUpdate();
+ updateTime();
+
+ map()->forceUpdate();
+}
+
+bool KStarsLite::isToggled(ObjectsToToggle toToggle) {
+ switch(toToggle) {
+ case ObjectsToToggle::Stars:
+ return Options::showStars();
+ case ObjectsToToggle::DeepSky:
+ return Options::showDeepSky();
+ case ObjectsToToggle::Planets:
+ return Options::showSolarSystem();
+ case ObjectsToToggle::CLines:
+ return Options::showCLines();
+ case ObjectsToToggle::CBounds:
+ return Options::showCBounds();
+ case ObjectsToToggle::ConstellationArt:
+ return Options::showConstellationArt();
+ case ObjectsToToggle::MilkyWay:
+ return Options::showMilkyWay();
+ case ObjectsToToggle::CNames:
+ return Options::showCNames();
+ case ObjectsToToggle::EquatorialGrid:
+ return Options::showEquatorialGrid();
+ case ObjectsToToggle::HorizontalGrid:
+ return Options::showHorizontalGrid();
+ case ObjectsToToggle::Ground:
+ return Options::showGround();
+ case ObjectsToToggle::Flags:
+ return Options::showFlags();
+ case ObjectsToToggle::Satellites:
+ return Options::showSatellites();
+ case ObjectsToToggle::Supernovae:
+ return Options::showSupernovae();
+ default:
+ return false;
+ };
+}
diff --git a/kstars/kstarslite.h b/kstars/kstarslite.h
index e441340..60db35f 100644
--- a/kstars/kstarslite.h
+++ b/kstars/kstarslite.h
@@ -22,6 +22,9 @@
#include <QtQml/QQmlApplicationEngine>
#include <QPalette>
+//Needed for Projection enum
+#include "projections/projector.h"
+
// forward declaration is enough. We only need pointers
class KStarsData;
class SkyMapLite;
@@ -30,6 +33,7 @@ class GeoLocation;
class ImageProvider;
class FindDialogLite;
+class DetailDialogLite;
#ifdef INDI_FOUND
class ClientManagerLite;
@@ -58,9 +62,9 @@ private:
* @param startDateString date (in string representation) to start running from.
*/
explicit KStarsLite( bool doSplash, bool startClockRunning = true, const QString &startDateString = QString() );
-
+
static KStarsLite *pinstance; // Pointer to an instance of KStarsLite
-
+
public:
/**
* @short Create an instance of this class. Destroy any previous instance
@@ -71,80 +75,135 @@ public:
* @return a pointer to the instance
*/
static KStarsLite *createInstance( bool doSplash, bool clockrunning = true, const QString &startDateString = QString() );
-
+
/** @return a pointer to the instance of this class */
inline static KStarsLite *Instance() { return pinstance; }
-
+
/** Destructor. Does nothing yet*/
virtual ~KStarsLite();
-
+
/** @return pointer to SkyMapLite object which draws SkyMap. */
inline SkyMapLite* map() const { return m_SkyMapLite; }
-
+
/** @return pointer to KStarsData object which contains application data. */
inline KStarsData* data() const { return m_KStarsData; }
-
+
inline ImageProvider *imageProvider() const { return m_imgProvider; }
-
+
inline QQmlApplicationEngine *qmlEngine() { return &m_Engine; }
-
+
/** @short used from QML to update positions of sky objects and update SkyMapLite */
Q_INVOKABLE void fullUpdate();
- #ifdef INDI_FOUND
+ void applyConfig( bool doApplyFocus = true );
+
+#ifdef INDI_FOUND
/** @return pointer to KStarsData object which handles connection to INDI server. */
inline ClientManagerLite *clientManagerLite() const { return m_clientManager; }
- #endif
+#endif
+
+ /** @defgroup kconfigwrappers QML wrappers around KConfig
+ * @{
+ */
+
+ enum ObjectsToToggle { Stars,
+ DeepSky,
+ Planets,
+ CLines,
+ CBounds,
+ ConstellationArt,
+ MilkyWay,
+ CNames,
+ EquatorialGrid,
+ HorizontalGrid,
+ Ground,
+ Flags,
+ Satellites,
+ Supernovae
+ };
+ Q_ENUMS(ObjectsToToggle)
+ /**
+ * @short setProjection calls Options::setProjection(proj) and updates SkyMapLite
+ */
+ //Having projection as uint is not good but it will go away once KConfig is fixed
+ Q_INVOKABLE void setProjection(uint proj);
+
+ Q_INVOKABLE QColor getColor(QString schemeColor);
+
+ Q_INVOKABLE void toggleObjects(ObjectsToToggle toToggle, bool toggle);
+
+ Q_INVOKABLE bool isToggled(ObjectsToToggle toToggle);
+
+ /** @} */ // end of kconfigwrappers group
+
signals:
/** Sent when KStarsData finishes loading data */
void dataLoadFinished();
-
+
/** Makes splash (Splash.qml) visible on startup */
void showSplash();
-
+
+ /** Emitted whenever TimeSpinBox in QML changes the scale **/
+ void scaleChanged(float);
+
public Q_SLOTS:
/**
* Update time-dependent data and (possibly) repaint the sky map.
* @param automaticDSTchange change DST status automatically?
*/
void updateTime( const bool automaticDSTchange = true );
-
+
/** Write current settings to config file. Used to save config file upon exit
*/
void writeConfig();
-
+
/** Load a color scheme.
* @param name the name of the color scheme to load (e.g., "Moonless Night")
*/
void loadColorScheme( const QString &name );
-
+
+ /** action slot: open a dialog for setting the time and date */
+ void slotSetTime();
+
+ /** action slot: toggle whether kstars clock is running or not */
+ void slotToggleTimer();
+
+ /** action slot: advance one step forward in time */
+ void slotStepForward();
+
+ /** action slot: advance one step backward in time */
+ void slotStepBackward();
+
+ void slotTrack();
+
private slots:
/** finish setting up after the KStarsData has finished
*/
void datainitFinished();
-
+
/** Save data to config file before exiting.*/
void slotAboutToQuit();
-
+
private:
/** Initialize focus position */
void initFocus();
-
-
+
+
QQmlApplicationEngine m_Engine;
SkyMapLite *m_SkyMapLite;
QPalette OriginalPalette, DarkPalette;
-
+
QObject *m_RootObject;
//QQuickItem *m_SkyMapLiteWrapper;
bool StartClockRunning;
-
+
KStarsData *m_KStarsData;
ImageProvider *m_imgProvider;
-
+
//Dialogs
FindDialogLite *m_findDialogLite;
-
+ DetailDialogLite *m_detailDialogLite;
+
#ifdef INDI_FOUND
ClientManagerLite *m_clientManager;
#endif
diff --git a/kstars/kstarslite/dialogs/detaildialoglite.cpp b/kstars/kstarslite/dialogs/detaildialoglite.cpp
new file mode 100644
index 0000000..ceb90f7
--- /dev/null
+++ b/kstars/kstarslite/dialogs/detaildialoglite.cpp
@@ -0,0 +1,254 @@
+/***************************************************************************
+ finddialoglite.cpp - K Desktop Planetarium
+ -------------------
+ begin : Wed Jul 29 2016
+ copyright : (C) 2016 by Artem Fedoskin
+ email : afedoskin3@gmail.com
+ ***************************************************************************/
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "detaildialoglite.h"
+#include "skymaplite.h"
+#include "kstarslite/skyobjectlite.h"
+#include "ksutils.h"
+#include "ksplanetbase.h"
+#include "ksmoon.h"
+#include "supernova.h"
+
+#include "skymapcomposite.h"
+#include "constellationboundarylines.h"
+
+DetailDialogLite::DetailDialogLite( )
+{
+
+}
+
+void DetailDialogLite::initialize() {
+ connect(SkyMapLite::Instance(), SIGNAL(objectLiteChanged()), this, SLOT(createGeneralTab()));
+}
+
+void DetailDialogLite::createGeneralTab() {
+ SkyObject *selectedObject = SkyMapLite::Instance()->getClickedObjectLite()->getObject();
+
+ // Stuff that should be visible only for specific types of objects
+ setProperty("illumination", "");// Only shown for the moon
+ setProperty("BVindex",""); // Only shown for stars
+ setupThumbnail();
+
+ //Fill in the data fields
+ //Contents depend on type of object
+ QString objecttyp, str;
+
+ switch (selectedObject->type()) {
+ case SkyObject::STAR: {
+ StarObject* s = (StarObject*) selectedObject;
+
+ if (s->getHDIndex()) {
+ setProperty("name",(QString("%1, HD %2").arg(s->longname()).arg(s->getHDIndex())));
+ } else {
+ setProperty("name",s->longname());
+ }
+
+ objecttyp = s->sptype() + ' ' + i18n("star");
+ setProperty("magnitude",i18nc("number in magnitudes", "%1 mag",
+ QLocale().toString(s->mag(), 'f', 2))); //show to hundredth place
+
+ if(s->getBVIndex() < 30.) {
+ setProperty("BVindex",QString::number(s->getBVIndex() , 'f', 2));
+ }
+
+ //distance
+ if (s->distance() > 2000. || s->distance() < 0.) { // parallax < 0.5 mas
+ setProperty("distance",(QString(i18nc("larger than 2000 parsecs", "> 2000 pc"))));
+ } else if (s->distance() > 50.) { //show to nearest integer
+ setProperty("distance",(i18nc("number in parsecs", "%1 pc",
+ QLocale().toString( s->distance(), 'f', 0))));
+ } else if (s->distance() > 10.0) { //show to tenths place
+ setProperty("distance",(i18nc("number in parsecs", "%1 pc",
+ QLocale().toString( s->distance(), 'f', 1))));
+ } else { //show to hundredths place
+ setProperty("distance",(i18nc("number in parsecs", "%1 pc",
+ QLocale().toString(s->distance(), 'f', 2 ))));
+ }
+
+ //Note multiplicity/variablility in angular size label
+ setProperty("angSize",QString());
+ if (s->isMultiple() && s->isVariable()) {
+ QString multiple = QString(i18nc( "the star is a multiple star", "multiple" ) + ',');
+ setProperty("angSize", QString(multiple + "\n" + (i18nc( "the star is a variable star", "variable" ))));
+ } else if (s->isMultiple()) {
+ setProperty("angSize",i18nc("the star is a multiple star", "multiple"));
+ } else if (s->isVariable()) {
+ setProperty("angSize",(i18nc("the star is a variable star", "variable")));
+ }
+
+ break; //end of stars case
+ }
+ case SkyObject::ASTEROID: //[fall through to planets]
+ case SkyObject::COMET: //[fall through to planets]
+ case SkyObject::MOON: //[fall through to planets]
+ case SkyObject::PLANET: {
+ KSPlanetBase* ps = (KSPlanetBase*) selectedObject;
+
+ setProperty("name",ps->longname());
+
+ //Type is "G5 star" for Sun
+ if (ps->name() == "Sun") {
+ objecttyp = i18n("G5 star");
+ } else if (ps->name() == "Moon") {
+ objecttyp = ps->translatedName();
+ } else if (ps->name() == i18n("Pluto") || ps->name() == "Ceres" || ps->name() == "Eris") { // TODO: Check if Ceres / Eris have translations and i18n() them
+ objecttyp = i18n("Dwarf planet");
+ } else {
+ objecttyp = ps->typeName();
+ }
+
+ //The moon displays illumination fraction and updateMag is called to calculate moon's current magnitude
+ if (selectedObject->name() == "Moon") {
+ setProperty("illumination",(QString("%1 %").arg(QLocale().toString(((KSMoon*)selectedObject)->illum()*100., 'f', 0))));
+ ((KSMoon *)selectedObject)->updateMag();
+ }
+
+ // JM: Shouldn't we use the calculated magnitude? Disabling the following
+ /*
+ if(selectedObject->type() == SkyObject::COMET){
+ Data->Magnitude->setText(i18nc("number in magnitudes", "%1 mag",
+ QLocale().toString( ((KSComet *)selectedObject)->getTotalMagnitudeParameter(), 'f', 2))); //show to hundredth place
+
+ }
+ else{*/
+ setProperty("magnitude",(i18nc("number in magnitudes", "%1 mag",
+ QLocale().toString(ps->mag(), 'f', 2)))); //show to hundredth place
+ //}
+
+ //Distance from Earth. The moon requires a unit conversion
+ if (ps->name() == "Moon") {
+ setProperty("distance",(i18nc("distance in kilometers", "%1 km",
+ QLocale().toString(ps->rearth()*AU_KM, 'f', 2))));
+ } else {
+ setProperty("distance",(i18nc("distance in Astronomical Units", "%1 AU",
+ QLocale().toString( ps->rearth(), 'f', 3))));
+ }
+
+ //Angular size; moon and sun in arcmin, others in arcsec
+ if (ps->angSize()) {
+ if (ps->name() == "Sun" || ps->name() == "Moon") {
+ setProperty("angSize",(i18nc("angular size in arcminutes", "%1 arcmin",
+ QLocale().toString(ps->angSize(), 'f', 1)))); // Needn't be a plural form because sun / moon will never contract to 1 arcminute
+ } else {
+ setProperty("angSize",i18nc("angular size in arcseconds","%1 arcsec",
+ QLocale().toString( ps->angSize()*60.0 , 'f', 1)));
+ }
+ } else {
+ setProperty("angSize", "--" );
+ }
+
+ break; //end of planets/comets/asteroids case
+ }
+ case SkyObject::SUPERNOVA: {
+ Supernova* sup=(Supernova*) selectedObject;
+
+ objecttyp = i18n("Supernova");
+ setProperty("name",sup->name());
+ setProperty("magnitude",(i18nc("number in magnitudes", "%1 mag",
+ QLocale().toString(sup->mag(), 'f', 2))));
+ setProperty("distance", "---");
+ break;
+ }
+ default: { //deep-sky objects
+ DeepSkyObject* dso = (DeepSkyObject*) selectedObject;
+
+ //Show all names recorded for the object
+ QStringList nameList;
+ if (!dso->longname().isEmpty() && dso->longname() != dso->name()) {
+ nameList.append(dso->translatedLongName());
+ nameList.append(dso->translatedName());
+ } else {
+ nameList.append(dso->translatedName());
+ }
+
+ if (!dso->translatedName2().isEmpty()) {
+ nameList.append(dso->translatedName2());
+ }
+
+ if (dso->ugc() != 0) {
+ nameList.append(QString("UGC %1").arg(dso->ugc()));
+ }
+
+ if (dso->pgc() != 0) {
+ nameList.append(QString("PGC %1").arg(dso->pgc()));
+ }
+
+ setProperty("name",nameList.join(","));
+
+ objecttyp = dso->typeName();
+
+ if (dso->type() == SkyObject::RADIO_SOURCE)
+ {
+ //ta->MagLabel->setText(i18nc("integrated flux at a frequency", "Flux(%1):", dso->customCatalog()->fluxFrequency()));
+ //Data->Magnitude->setText(i18nc("integrated flux value", "%1 %2",
+ // QLocale().toString(dso->flux(), 'f', 1), dso->customCatalog()->fluxUnit())); //show to tenths place
+ } else if (dso->mag() > 90.0) {
+ setProperty("magnitude", "--");
+ } else {
+ setProperty("magnitude",i18nc("number in magnitudes", "%1 mag",
+ QLocale().toString( dso->mag(), 'f', 1))); //show to tenths place
+ }
+
+ //No distances at this point...
+ setProperty("distance", "--");
+
+ //Only show decimal place for small angular sizes
+ if (dso->a() > 10.0) {
+ setProperty("angSize", i18nc("angular size in arcminutes", "%1 arcmin",
+ QLocale().toString(dso->a(), 'f', 0)));
+ } else if (dso->a()) {
+ setProperty("angSize",i18nc("angular size in arcminutes", "%1 arcmin",
+ QLocale().toString( dso->a(), 'f', 1 )));
+ } else {
+ setProperty("angSize", "--");
+ }
+
+ break;
+ }
+ }
+
+ //Common to all types:
+ QString cname = KStarsData::Instance()->skyComposite()->constellationBoundary()->constellationName(selectedObject);
+ if (selectedObject->type() != SkyObject::CONSTELLATION) {
+ cname = i18nc("%1 type of sky object (planet, asteroid etc), %2 name of a constellation", "%1 in %2", objecttyp, cname);
+ }
+ setProperty("typeInConstellation", cname);
+}
+
+void DetailDialogLite::setupThumbnail() {
+ SkyObject *selectedObject = SkyMapLite::Instance()->getClickedObjectLite()->getObject();
+ //No image if object is a star
+ if ( selectedObject->type() == SkyObject::STAR ||
+ selectedObject->type() == SkyObject::CATALOG_STAR ) {
+ /*Thumbnail->scaled( Data->Image->width(), Data->Image->height() );
+ Thumbnail->fill( Data->DataFrame->palette().color( QPalette::Window ) );
+ Data->Image->setPixmap( *Thumbnail );*/
+ setProperty("thumbnail", "");
+ return;
+ }
+
+ //Try to load the object's image from disk
+ //If no image found, load "no image" image
+ QFile file;
+ QString fname = "thumb-" + selectedObject->name().toLower().remove( ' ' ) + ".png";
+ if ( KSUtils::openDataFile( file, fname ) ) {
+ file.close();
+ setProperty("thumbnail", file.fileName());
+ } else {
+ setProperty("thumbnail", "");
+ }
+}
+
diff --git a/kstars/kstarslite/dialogs/detaildialoglite.h b/kstars/kstarslite/dialogs/detaildialoglite.h
new file mode 100644
index 0000000..32fb2ae
--- /dev/null
+++ b/kstars/kstarslite/dialogs/detaildialoglite.h
@@ -0,0 +1,85 @@
+/***************************************************************************
+ detaildialoglite.h - K Desktop Planetarium
+ -------------------
+ begin : Aug Jul 13 2016
+ copyright : (C) 2016 by Artem Fedoskin
+ email : afedoskin3@gmail.com
+ ***************************************************************************/
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DETAILDIALOGLITE_H_
+#define DETAILDIALOGLITE_H_
+
+#include "skyobjects/skyobject.h"
+#include <QImage>
+
+class QTimer;
+class QStringListModel;
+class QSortFilterProxyModel;
+class SkyObjectListModel;
+
+/** @class DetalDialogLite
+ * A backend of details dialog declared in QML.
+ *
+ * @short Backend for Object details dialog in QML
+ * @author Artem Fedoskin, Jason Harris, Jasem Mutlaq
+ * @version 1.0
+ */
+class DetailDialogLite : public QObject {
+ Q_OBJECT
+ //General
+ Q_PROPERTY(QString name MEMBER m_name NOTIFY nameChanged )
+ //Q_PROPERTY(QString otherName MEMBER m_otherName NOTIFY otherNameChanged)
+ Q_PROPERTY(QString magnitude MEMBER m_magnitude NOTIFY magnitudeChanged)
+ Q_PROPERTY(QString distance MEMBER m_distance NOTIFY distanceChanged)
+ Q_PROPERTY(QString BVindex MEMBER m_BVindex NOTIFY BVindexChanged)
+ //Q_PROPERTY(QString angSizeLabel MEMBER m_angSizeLabel NOTIFY angSizeLabelChanged)
+ Q_PROPERTY(QString angSize MEMBER m_angSize NOTIFY angSizeChanged)
+ Q_PROPERTY(QString illumination MEMBER m_illumination NOTIFY illuminationChanged)
+ Q_PROPERTY(QString typeInConstellation MEMBER m_typeInConstellation NOTIFY typeInConstellationChanged)
+ Q_PROPERTY(QString thumbnail MEMBER m_thumbnail NOTIFY thumbnailChanged)
+public:
+ explicit DetailDialogLite();
+ /**
+ * @short initialize connects SkyMapLite's signals to proper slots
+ */
+ void initialize();
+
+ void setupThumbnail();
+
+public slots:
+ void createGeneralTab();
+signals:
+ void nameChanged(QString);
+ //void otherNameChanged(QString);
+ void magnitudeChanged(QString);
+ void distanceChanged(QString);
+ void BVindexChanged(QString);
+ void angSizeChanged(QString);
+ //void angSizeLabelChanged(QString);
+ void illuminationChanged(QString);
+ void typeInConstellationChanged(QString);
+ void thumbnailChanged(QString);
+
+private:
+ //General
+ QString m_name;
+ //QString m_otherName;
+ QString m_magnitude;
+ QString m_distance;
+ QString m_BVindex;
+ QString m_angSize;
+ //QString m_angSizeLabel;
+ QString m_illumination;
+ QString m_typeInConstellation;
+ QString m_thumbnail;
+};
+
+#endif
diff --git a/kstars/kstarslite/dialogs/finddialoglite.cpp b/kstars/kstarslite/dialogs/finddialoglite.cpp
index adc467b..3ee5402 100644
--- a/kstars/kstarslite/dialogs/finddialoglite.cpp
+++ b/kstars/kstarslite/dialogs/finddialoglite.cpp
@@ -22,6 +22,7 @@
#include "skycomponents/starcomponent.h"
#include "skycomponents/skymapcomposite.h"
#include "skymaplite.h"
+#include "kstarslite.h"
#include "solarsystemcomposite.h"
@@ -166,8 +167,6 @@ void FindDialogLite::filterByType(uint typeIndex) {
fModel->setSkyObjectsList( data->skyComposite()->objectLists( SkyObject::SATELLITE ) );
break;
}
-
- qDebug() << data->skyComposite()->objectLists( SkyObject::SUPERNOVA ) ;
}
void FindDialogLite::filterList(QString searchQuery) {
diff --git a/kstars/kstarslite/dialogs/finddialoglite.h b/kstars/kstarslite/dialogs/finddialoglite.h
index 9b0a215..f3109af 100644
--- a/kstars/kstarslite/dialogs/finddialoglite.h
+++ b/kstars/kstarslite/dialogs/finddialoglite.h
@@ -28,7 +28,7 @@ class QSortFilterProxyModel;
class SkyObjectListModel;
/** @class FindDialogLite
- * A backend of dialog decleared in QML.
+ * A backend of dialog declared in QML.
*
* @short Backend for Find Object Dialog in QML
* @author Artem Fedoskin, Jason Harris
@@ -38,9 +38,6 @@ class FindDialogLite : public QObject {
Q_OBJECT
Q_PROPERTY(QStringList filterModel READ getFilterModel NOTIFY filterModelChanged)
public:
- /**Constructor. Creates all widgets and packs them in QLayouts. Connects
- * Signals and Slots. Runs initObjectList().
- */
explicit FindDialogLite();
/** Destructor */
@@ -72,9 +69,6 @@ public slots:
void slotOk();
private slots:
- /** Set the selected item to the first item in the list */
- //void initSelection();
-
void enqueueSearch();
void slotDetails();
diff --git a/kstars/kstarslite/kirigami-lib/CMakeLists.txt b/kstars/kstarslite/kirigami-lib/CMakeLists.txt
deleted file mode 100644
index fbe3a42..0000000
--- a/kstars/kstarslite/kirigami-lib/CMakeLists.txt
+++ /dev/null
@@ -1,124 +0,0 @@
-project(kirigami)
-
-cmake_minimum_required(VERSION 2.8.12)
-set(KF5_MIN_VERSION "5.18.0")
-set(QT_MIN_VERSION "5.5.0")
-
-################# Disallow in-source build #################
-
-if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
- message(FATAL_ERROR "kirigami requires an out of source build. Please create a separate build directory and run 'cmake path_to_kirigami [options]' there.")
-endif()
-
-option(PLASMA_ENABLED "Build and install The Plasma style" ON)
-option(DESKTOP_ENABLED "Build and install The Desktop style" ON)
-option(STATIC_LIBRARY "Build as a static library" OFF)
-option(BUILD_EXAMPLES "Build and install examples" OFF)
-
-# Make CPack available to easy generate binary packages
-include(CPack)
-include(FeatureSummary)
-
-IF(STATIC_LIBRARY)
- set(CMAKE_AUTOMOC ON)
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
- ADD_DEFINITIONS(-DKIRIGAMI_BUILD_TYPE_STATIC)
- find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Svg)
- set (QT_MIN_VERSION "5.5.0")
- if(UNIX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++0x")
- endif()
- add_subdirectory(src)
-
-ELSE(STATIC_LIBRARY)
-
-
-################# set KDE specific information #################
-
-find_package(ECM 0.0.8 REQUIRED NO_MODULE)
-
-# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
-
-include(ECMSetupVersion)
-include(ECMGenerateHeaders)
-include(ECMPackageConfigHelpers)
-include(KDEInstallDirs)
-include(KDECMakeSettings)
-include(KDECompilerSettings NO_POLICY_SCOPE)
-
-set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Kirigami")
-
-ecm_configure_package_config_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/KF5KirigamiConfig.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/KF5KirigamiConfig.cmake"
- INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
- PATH_VARS KF5_INCLUDE_INSTALL_DIR CMAKE_INSTALL_PREFIX
-)
-
-install(FILES
- "${CMAKE_CURRENT_BINARY_DIR}/KF5KirigamiConfig.cmake"
- "${CMAKE_CURRENT_BINARY_DIR}/KF5KirigamiConfigVersion.cmake"
- "${CMAKE_CURRENT_SOURCE_DIR}/KF5KirigamiMacros.cmake"
- DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
- COMPONENT Devel
-)
-
-
-set(KF5_VERSION "5.22.0")
-ecm_setup_version(${KF5_VERSION}
- VARIABLE_PREFIX KIRIGAMI
- VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kirigami_version.h"
- PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5KirigamiConfigVersion.cmake"
- SOVERSION 5)
-
-find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Svg)
-
-if(PLASMA_ENABLED)
-# treat plasma as an optinal dep: full functionality is expected with only Qt
-find_package(KF5Plasma ${KF5_MIN_VERSION})
-set_package_properties(KF5Plasma PROPERTIES DESCRIPTION "Plasma framework"
- TYPE OPTIONAL
- PURPOSE "Optional Look and feel integration with Plasma Mobile."
- )
-endif()
-
-if(DESKTOP_ENABLED)
-find_package(KF5Declarative ${KF5_MIN_VERSION})
-set_package_properties(KF5Declarative PROPERTIES DESCRIPTION "KDeclarative framework"
- TYPE OPTIONAL
- PURPOSE "Optional Look and feel integration with desktop colors and icons."
- )
-endif()
-
-if(KF5Plasma_FOUND AND THEME STREQUAL "Plasma")
- set(PLASMA_ENABLED 1)
-endif()
-
-if(KF5Declarative_FOUND AND THEME STREQUAL "System")
- set(DESKTOP_ENABLED 1)
-endif()
-
-################# Enable C++11 features for clang and gcc #################
-
-if(UNIX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++0x")
-endif()
-
-################# now find all used packages #################
-
-set (QT_MIN_VERSION "5.5.0")
-
-find_package(PkgConfig)
-#########################################################################
-
-add_subdirectory(src)
-#TODO: conditional
-if (BUILD_EXAMPLES)
- add_subdirectory(examples)
-endif()
-
-ENDIF(STATIC_LIBRARY)
-
-feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
-
diff --git a/kstars/kstarslite/kirigami-lib/KF5KirigamiConfig.cmake.in b/kstars/kstarslite/kirigami-lib/KF5KirigamiConfig.cmake.in
deleted file mode 100644
index d774dfa..0000000
--- a/kstars/kstarslite/kirigami-lib/KF5KirigamiConfig.cmake.in
+++ /dev/null
@@ -1,11 +0,0 @@
-@PACKAGE_INIT@
-
-# Any changes in this ".cmake" file will be overwritten by CMake, the source is the ".cmake.in" file.
-
-#include("${CMAKE_CURRENT_LIST_DIR}/KF5KirigamiTargets.cmake")
-
-set(Kirigami_INSTALL_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
-
-#set(Kirigami_LIBRARIES KF5::Kirigami)
-
-include("${CMAKE_CURRENT_LIST_DIR}/KF5KirigamiMacros.cmake")
diff --git a/kstars/kstarslite/kirigami-lib/KF5KirigamiMacros.cmake b/kstars/kstarslite/kirigami-lib/KF5KirigamiMacros.cmake
deleted file mode 100644
index 175db95..0000000
--- a/kstars/kstarslite/kirigami-lib/KF5KirigamiMacros.cmake
+++ /dev/null
@@ -1,85 +0,0 @@
-
-include(CMakeParseArguments)
-include(ExternalProject)
-find_package(Git)
-
-
-function(kirigami_package_breeze_icons)
- set(_multiValueArgs ICONS)
- cmake_parse_arguments(ARG "" "" "${_multiValueArgs}" ${ARGN} )
-
- if(NOT ARG_ICONS)
- message(FATAL_ERROR "No ICONS argument given to kirigami_package_breeze_icons")
- endif()
-
- #include icons used by Kirigami components themselves
- set(ARG_ICONS ${ARG_ICONS} go-next go-previous handle-left handle-right)
-
- function(_find_breeze_icon icon varName)
- #HACKY
- SET(path "")
- file(GLOB_RECURSE path ${_BREEZEICONS_DIR}/icons/*/48/${icon}.svg )
-
- #seach in other sizes as well
- if (NOT EXISTS ${path})
- file(GLOB_RECURSE path ${_BREEZEICONS_DIR}/icons/*/32/${icon}.svg )
- if (NOT EXISTS ${path})
- file(GLOB_RECURSE path ${_BREEZEICONS_DIR}/icons/*/24/${icon}.svg )
- if (NOT EXISTS ${path})
- file(GLOB_RECURSE path ${_BREEZEICONS_DIR}/icons/*/22/${icon}.svg )
- endif()
- endif()
- endif()
- if (NOT EXISTS ${path})
- return()
- endif()
-
- get_filename_component(path "${path}" REALPATH)
-
- SET(${varName} ${path} PARENT_SCOPE)
- endfunction()
-
- if (BREEZEICONS_DIR AND NOT EXISTS ${BREEZEICONS_DIR})
- message(FATAL_ERROR "BREEZEICONS_DIR variable does not point to existing dir: \"${BREEZEICONS_DIR}\"")
- endif()
-
- set(_BREEZEICONS_DIR "${BREEZEICONS_DIR}")
-
- #FIXME: this is a terrible hack
- if(NOT _BREEZEICONS_DIR)
- set(_BREEZEICONS_DIR "${CMAKE_BINARY_DIR}/breeze-icons/src/breeze-icons")
-
- # replacement for ExternalProject_Add not yet working
- # first time config?
- if (NOT EXISTS ${_BREEZEICONS_DIR})
- execute_process(COMMAND ${GIT_EXECUTABLE} clone --depth 1 git://anongit.kde.org/breeze-icons.git ${_BREEZEICONS_DIR})
- endif()
-
- # external projects are only pulled at make time, not configure time
- # so this is too late to work with the _find_breeze_icon() method
- # _find_breeze_icon() would need to be turned into a target/command
- if (FALSE)
- ExternalProject_Add(
- breeze-icons
- PREFIX breeze-icons
- GIT_REPOSITORY git://anongit.kde.org/breeze-icons.git
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- INSTALL_COMMAND ""
- LOG_DOWNLOAD ON
- )
- endif()
- endif()
-
- message (STATUS "Found external breeze icons:")
- foreach(_iconName ${ARG_ICONS})
- set(_iconPath "")
- _find_breeze_icon(${_iconName} _iconPath)
- message (STATUS ${_iconPath})
- if (EXISTS ${_iconPath})
- install(FILES ${_iconPath} DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami/icons/ RENAME ${_iconName}.svg)
- endif()
-
- endforeach()
-endfunction()
-
diff --git a/kstars/kstarslite/kirigami-lib/LICENSE.GPL-2 b/kstars/kstarslite/kirigami-lib/LICENSE.GPL-2
deleted file mode 100644
index d159169..0000000
--- a/kstars/kstarslite/kirigami-lib/LICENSE.GPL-2
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/kstars/kstarslite/kirigami-lib/LICENSE.LGPL-2 b/kstars/kstarslite/kirigami-lib/LICENSE.LGPL-2
deleted file mode 100644
index 5bc8fb2..0000000
--- a/kstars/kstarslite/kirigami-lib/LICENSE.LGPL-2
+++ /dev/null
@@ -1,481 +0,0 @@
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/kstars/kstarslite/kirigami-lib/LICENSE.LGPL-2.1 b/kstars/kstarslite/kirigami-lib/LICENSE.LGPL-2.1
deleted file mode 100644
index 4362b49..0000000
--- a/kstars/kstarslite/kirigami-lib/LICENSE.LGPL-2.1
+++ /dev/null
@@ -1,502 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/kstars/kstarslite/kirigami-lib/Mainpage.dox b/kstars/kstarslite/kirigami-lib/Mainpage.dox
deleted file mode 100644
index b9b1420..0000000
--- a/kstars/kstarslite/kirigami-lib/Mainpage.dox
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- This file is part of Kirigami
- Copyright (C) 2016 Marco Martin <mart@kde.org>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) version 3, or any
- later version accepted by the membership of KDE e.V. (or its
- successor approved by the membership of KDE e.V.), which shall
- act as a proxy defined in Section 6 of version 3 of the license.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-/** \mainpage kirigami
-
-
-\section overview Introduction
-Kirigami is a set of QtQuick components at the moment targeted for mobile use (in the future desktop as well) targeting both Plasma Mobile and Android. It’s not a whole set of components, all the “Primitive” ones like buttons and textboxes are a job for QtQuickControls (soon QtQuickContrls2) but it’s a set of high level components to make as easy as possible making applications that look gorgeous on mobile devices that follow the Visual Design Group UI guidelines.
-The target of those components is anybody that wants to do an application using QtQuick as its main UI, especially if targeting a mobile platform, without adding many dependencies. They work both in Plasma Mobile and Android.
-It will eventually become a Tier-1 KDE Framework.
-
-\section components Main Components
-- \link org::kde::kirigami::ApplicationWindow ApplicationWindow \endlink
-- \link org::kde::kirigami::Action Action \endlink
-- \link org::kde::kirigami::GlobalDrawer GlobalDrawer \endlink
-- \link org::kde::kirigami::ContextDrawer ContextDrawer \endlink
-- \link org::kde::kirigami::OverlayDrawer OverlayDrawer \endlink
-- \link org::kde::kirigami::Page Page \endlink
-- \link org::kde::kirigami::ScrollablePage ScrollablePage \endlink
-- \link org::kde::kirigami::OverlaySheet OverlaySheet \endlink
-- \link org::kde::kirigami::Theme Theme \endlink
-- \link org::kde::kirigami::Units Units \endlink
-- \link org::kde::kirigami::Icon Icon \endlink
-- \link org::kde::kirigami::BasicListItem BasicListItem \endlink
-- \link org::kde::kirigami::AbstractApplicationHeader AbstractApplicationHeader \endlink
-- \link org::kde::kirigami::AbstractApplicationWindow AbstractApplicationWindow \endlink
-- \link org::kde::kirigami::AbstractListItem AbstractListItem \endlink
-- \link org::kde::kirigami::ApplicationHeader ApplicationHeader \endlink
-- \link org::kde::kirigami::BasicListItem BasicListItem \endlink
-- \link org::kde::kirigami::SwipeListItem SwipeListItem \endlink
-- \link org::kde::kirigami::Heading Heading \endlink
-- \link org::kde::kirigami::Label Label \endlink
-- \link org::kde::kirigami::SplitDrawer SplitDrawer \endlink
-
-
-\section example Minimal Example
-
-@code
-import QtQuick 2.1
-import org.kde.kirigami 1.0 as Kirigami
-
-Kirigami.ApplicationWindow {
- id: root
-
- globalDrawer: Kirigami.GlobalDrawer {
- title: "Hello App"
- titleIcon: "applications-graphics"
-
- actions: [
- Kirigami.Action {
- text: "View"
- iconName: "view-list-icons"
- Kirigami.Action {
- text: "action 1"
- }
- Kirigami.Action {
- text: "action 2"
- }
- Kirigami.Action {
- text: "action 3"
- }
- },
- Kirigami.Action {
- text: "action 3"
- },
- Kirigami.Action {
- text: "action 4"
- }
- ]
- }
- contextDrawer: Kirigami.ContextDrawer {
- id: contextDrawer
- }
-
- pageStack.initialPage: mainPageComponent
-
- Component {
- id: mainPageComponent
- Kirigami.ScrollablePage {
- title: "Hello"
- actions {
- main: Action {
- iconName: sheet.opened ? "dialog-cancel" : "document-edit"
- onTriggered: {
- print("Action button in buttons page clicked");
- sheet.opened = !sheet.opened
- }
- }
- left: Action {
- iconName: "go-previous"
- onTriggered: {
- print("Left action triggered")
- }
- }
- right: Action {
- iconName: "go-next"
- onTriggered: {
- print("Right action triggered")
- }
- }
- contextualActions: [
- Action {
- text:"Action for buttons"
- iconName: "bookmarks"
- onTriggered: print("Action 1 clicked")
- },
- Action {
- text:"Action 2"
- iconName: "folder"
- enabled: false
- },
- Action {
- text: "Action for Sheet"
- visible: sheet.opened
- }
- ]
- }
- //Page contents...
- }
- }
-}
-@endcode
-
-@authors
-Marco Martin \<notmart@gmail.com\><br>
-Sebastian Kuegler \<sebas@kde.org\><br>
-Aleix Pol Gonzalez \<aleixpol@kde.org\><br>
-Dirk Hohndel \<dirk@hohndel.org\><br>
-
-@maintainers
-Marco Martin \<notmart@gmail.com\>
-
-@licenses
-@lgpl
-
-*/
-
-
-// DOXYGEN_SET_RECURSIVE = YES
-// DOXYGEN_SET_EXCLUDE_PATTERNS += *_p.h */private/* */examples/*
-// DOXYGEN_SET_PROJECT_NAME = Kirigami
-// vim:ts=4:sw=4:expandtab:filetype=doxygen
diff --git a/kstars/kstarslite/kirigami-lib/README.md b/kstars/kstarslite/kirigami-lib/README.md
deleted file mode 100644
index b9cb8db..0000000
--- a/kstars/kstarslite/kirigami-lib/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Kirigami
-
-Build on Android:
-```
-mkdir build
-cd build
-
-cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/share/ECM/toolchain/Android.cmake -DQTANDROID_EXPORTED_TARGET=kirigamigallery -DANDROID_APK_DIR=../examples/android/ -DCMAKE_PREFIX_PATH=/path/to/Qt-Android/5.5/android_armv7/ -DCMAKE_INSTALL_PREFIX=/path/to/dummy/install/prefix -DBUILD_EXAMPLES=ON
-```
-
-You need a `-DCMAKE_INSTALL_PREFIX` to somewhere in your home, but using an absolute path
-
-If you have a local checkout of the breeze-icons repo, you can avoid the cloning of the build dir
-by passing also `-DBREEZEICONS_DIR=/path/to/existing/sources/of/breeze-icons`
-
-```
-make
-make install
-make create-apk-kirigamigallery
-```
-
-`kirigamigallery_build_apk/bin/QtApp-debug.apk` will be generated
-
-to directly install on a phone:
-```
-adb install ./kirigamigallery_build_apk//bin/QtApp-debug.apk
-```
diff --git a/kstars/kstarslite/kirigami-lib/examples/CMakeLists.txt b/kstars/kstarslite/kirigami-lib/examples/CMakeLists.txt
deleted file mode 100644
index 87ec57a..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-
-add_subdirectory(android)
-
-install(DIRECTORY gallery/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/kpackage/genericqml/org.kde.kirigami.gallery)
-install(FILES gallery/metadata.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} RENAME org.kde.kirigami.gallery.desktop)
diff --git a/kstars/kstarslite/kirigami-lib/examples/android/AndroidManifest.xml b/kstars/kstarslite/kirigami-lib/examples/android/AndroidManifest.xml
deleted file mode 100644
index 2bde153..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/android/AndroidManifest.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<manifest package="org.kde.kirigamigallery" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.2" android:versionCode="3" android:installLocation="auto">
- <application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Kirigami Gallery" android:icon="@drawable/icon">
- <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation"
- android:name="org.qtproject.qt5.android.bindings.QtActivity"
- android:label="Kirigami Gallery"
- android:theme="@style/AppTheme"
- android:screenOrientation="unspecified"
- android:windowSoftInputMode="adjustResize"
- android:launchMode="singleTop">
- <intent-filter>
- <action android:name="android.intent.action.MAIN"/>
- <category android:name="android.intent.category.LAUNCHER"/>
- </intent-filter>
- <meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
- <meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
- <meta-data android:name="android.app.repository" android:value="default"/>
- <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
- <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
- <!-- Deploy Qt libs as part of package -->
- <meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/>
- <meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
- <meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/>
- <!-- Run with local libs -->
- <meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/>
- <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
- <meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/>
- <meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/>
- <meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/>
- <!-- Messages maps -->
- <meta-data android:value="@string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/>
- <meta-data android:value="@string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/>
- <meta-data android:value="@string/fatal_error_msg" android:name="android.app.fatal_error_msg"/>
- <!-- Messages maps -->
-
- <!-- Splash screen -->
- <meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/splash"/>
- <!-- Splash screen -->
-
- <!-- Background running -->
- <!-- Warning: changing this value to true may cause unexpected crashes if the
- application still try to draw after
- "applicationStateChanged(Qt::ApplicationSuspended)"
- signal is sent! -->
- <meta-data android:name="android.app.background_running" android:value="false"/>
- <!-- Background running -->
-
- <!-- auto screen scale factor -->
- <meta-data android:name="android.app.auto_screen_scale_factor" android:value="false"/>
- <!-- auto screen scale factor -->
- </activity>
- </application>
- <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
- <supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
-
- <!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
- Remove the comment if you do not require these default permissions. -->
- <!-- %%INSERT_PERMISSIONS -->
-
- <!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
- Remove the comment if you do not require these default features. -->
- <!-- %%INSERT_FEATURES -->
-
-</manifest>
diff --git a/kstars/kstarslite/kirigami-lib/examples/android/CMakeLists.txt b/kstars/kstarslite/kirigami-lib/examples/android/CMakeLists.txt
deleted file mode 100644
index 3fe9d90..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/android/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-
-set(kirigamigallery_SRCS
- main.cpp
- )
-
-qt5_add_resources(RESOURCES resources.qrc)
-
-add_executable(kirigamigallery ${kirigamigallery_SRCS} ${RESOURCES})
-target_link_libraries(kirigamigallery Qt5::Core Qt5::Qml Qt5::Quick Qt5::Svg)
-
-install(TARGETS kirigamigallery ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
-
-include(${CMAKE_SOURCE_DIR}/KF5KirigamiMacros.cmake)
-kirigami_package_breeze_icons(ICONS applications-graphics view-list-icons folder-sync view-list-details configure document-edit dialog-cancel document-decrypt mail-reply-sender bookmarks folder)
diff --git a/kstars/kstarslite/kirigami-lib/examples/android/kirigami.svgz b/kstars/kstarslite/kirigami-lib/examples/android/kirigami.svgz
deleted file mode 100644
index 5b94808..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/android/kirigami.svgz
+++ /dev/null
Binary files differ
diff --git a/kstars/kstarslite/kirigami-lib/examples/android/main.cpp b/kstars/kstarslite/kirigami-lib/examples/android/main.cpp
deleted file mode 100644
index 76d5eaf..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/android/main.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-#include <QGuiApplication>
-#include <QQmlApplicationEngine>
-#include <QtQml>
-#include <QUrl>
-
-Q_DECL_EXPORT int main(int argc, char *argv[])
-{
- QGuiApplication app(argc, argv);
-
- qputenv("QML_IMPORT_TRACE", "1");
- QQmlApplicationEngine engine;
-
- engine.load(QUrl(QStringLiteral("qrc:///contents/ui/ExampleApp.qml")));
- if (engine.rootObjects().isEmpty()) {
- return -1;
- }
-
- return app.exec();
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/android/res/drawable-xxxhdpi/icon.png b/kstars/kstarslite/kirigami-lib/examples/android/res/drawable-xxxhdpi/icon.png
deleted file mode 100644
index f53c007..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/android/res/drawable-xxxhdpi/icon.png
+++ /dev/null
Binary files differ
diff --git a/kstars/kstarslite/kirigami-lib/examples/android/res/drawable-xxxhdpi/kirigami_splash.9.png b/kstars/kstarslite/kirigami-lib/examples/android/res/drawable-xxxhdpi/kirigami_splash.9.png
deleted file mode 100644
index 925702a..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/android/res/drawable-xxxhdpi/kirigami_splash.9.png
+++ /dev/null
Binary files differ
diff --git a/kstars/kstarslite/kirigami-lib/examples/android/res/drawable/icon.png b/kstars/kstarslite/kirigami-lib/examples/android/res/drawable/icon.png
deleted file mode 100644
index f53c007..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/android/res/drawable/icon.png
+++ /dev/null
Binary files differ
diff --git a/kstars/kstarslite/kirigami-lib/examples/android/res/drawable/kirigami_splash.9.png b/kstars/kstarslite/kirigami-lib/examples/android/res/drawable/kirigami_splash.9.png
deleted file mode 100644
index a4c3471..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/android/res/drawable/kirigami_splash.9.png
+++ /dev/null
Binary files differ
diff --git a/kstars/kstarslite/kirigami-lib/examples/android/res/drawable/splash.xml b/kstars/kstarslite/kirigami-lib/examples/android/res/drawable/splash.xml
deleted file mode 100644
index a6f4ba9..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/android/res/drawable/splash.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item>
- <shape android:shape="rectangle" >
- <solid android:color="#FF2196F3"/>
- </shape>
- </item>
- <item>
- <bitmap android:src="@drawable/kirigami_splash"
- android:gravity="center"/>
- </item>
-</layer-list>
diff --git a/kstars/kstarslite/kirigami-lib/examples/android/res/values/apptheme.xml b/kstars/kstarslite/kirigami-lib/examples/android/res/values/apptheme.xml
deleted file mode 100644
index d8c3d7a..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/android/res/values/apptheme.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <style name="AppTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
- <item name="android:windowBackground">@drawable/kirigami_splash</item>
- </style>
-</resources>
diff --git a/kstars/kstarslite/kirigami-lib/examples/android/resources.qrc b/kstars/kstarslite/kirigami-lib/examples/android/resources.qrc
deleted file mode 100644
index 4646eff..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/android/resources.qrc
+++ /dev/null
@@ -1,18 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file alias="contents/ui/MainPage.qml">../gallery/contents/ui/MainPage.qml</file>
- <file alias="contents/ui/banner.jpg">../gallery/contents/ui/banner.jpg</file>
- <file alias="contents/ui/gallery/NonScrollableGallery.qml">../gallery/contents/ui/gallery/NonScrollableGallery.qml</file>
- <file alias="contents/ui/gallery/RadioButtonGallery.qml">../gallery/contents/ui/gallery/RadioButtonGallery.qml</file>
- <file alias="contents/ui/gallery/ButtonGallery.qml">../gallery/contents/ui/gallery/ButtonGallery.qml</file>
- <file alias="contents/ui/gallery/ProgressBarGallery.qml">../gallery/contents/ui/gallery/ProgressBarGallery.qml</file>
- <file alias="contents/ui/gallery/CheckBoxGallery.qml">../gallery/contents/ui/gallery/CheckBoxGallery.qml</file>
- <file alias="contents/ui/gallery/SliderGallery.qml">../gallery/contents/ui/gallery/SliderGallery.qml</file>
- <file alias="contents/ui/gallery/MultipleColumnsGallery.qml">../gallery/contents/ui/gallery/MultipleColumnsGallery.qml</file>
- <file alias="contents/ui/gallery/ListViewGallery.qml">../gallery/contents/ui/gallery/ListViewGallery.qml</file>
- <file alias="contents/ui/gallery/SwitchGallery.qml">../gallery/contents/ui/gallery/SwitchGallery.qml</file>
- <file alias="contents/ui/gallery/TextFieldGallery.qml">../gallery/contents/ui/gallery/TextFieldGallery.qml</file>
- <file alias="contents/ui/ExampleApp.qml">../gallery/contents/ui/ExampleApp.qml</file>
- <file alias="metadata.desktop">../gallery/metadata.desktop</file>
- </qresource>
-</RCC>
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/DesktopExampleApp.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/DesktopExampleApp.qml
deleted file mode 100644
index cdb7f6f..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/DesktopExampleApp.qml
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Controls 1.4 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0 as Kirigami
-import "gallery"
-
-Kirigami.ApplicationWindow {
- id: root
-
- header: Kirigami.ToolBarApplicationHeader {}
-
- globalDrawer: Kirigami.GlobalDrawer {
- title: "Widget gallery"
- titleIcon: "applications-graphics"
- bannerImageSource: "banner.jpg"
-
- actions: [
- Kirigami.Action {
- text: "Submenu 1"
- iconName: "view-list-icons"
- Kirigami.Action {
- text: "Action 1"
- onTriggered: showPassiveNotification(text + " clicked")
- }
- Kirigami.Action {
- text: "Action 2"
- onTriggered: showPassiveNotification(text + " clicked")
- }
- Kirigami.Action {
- text: "Action 3"
- onTriggered: showPassiveNotification(text + " clicked")
- }
- },
- Kirigami.Action {
- text: "Submenu 2"
- iconName: "folder-sync"
- Kirigami.Action {
- text: "Action 4"
- onTriggered: showPassiveNotification(text + " clicked")
- }
- Kirigami.Action {
- text: "Action 5"
- onTriggered: showPassiveNotification(text + " clicked")
- }
- },
- Kirigami.Action {
- text: "Checkable"
- iconName: "view-list-details"
- checkable: true
- checked: false
- onTriggered: {
- showPassiveNotification("Action checked: " + checked)
- }
- },
- Kirigami.Action {
- text: "Open A Page"
- iconName: "configure"
- checkable: true
- //Need to do this, otherwise it breaks the bindings
- property bool current: pageStack.currentItem ? pageStack.currentItem.objectName == "settingsPage" : false
- onCurrentChanged: {
- checked = current;
- }
- onTriggered: {
- pageStack.push(settingsComponent);
- }
- }
- ]
-
- Controls.CheckBox {
- checked: true
- text: "Option 1"
- }
- Controls.CheckBox {
- text: "Option 2"
- }
- Controls.CheckBox {
- text: "Option 3"
- }
- Controls.Slider {
- Layout.fillWidth: true
- value: 0.5
- }
- }
-
- pageStack.initialPage: mainPageComponent
-
- Component {
- id: settingsComponent
- Kirigami.Page {
- title: "Settings"
- objectName: "settingsPage"
- Rectangle {
- anchors.fill: parent
- Controls.Button {
- anchors.centerIn: parent
- iconName: "go-previous"
- text: "Remove Page"
- onClicked: applicationWindow().pageStack.pop();
- }
- }
- }
- }
-
- //Main app content
- Component {
- id: mainPageComponent
- MainPage {}
- }
-
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/ExampleApp.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/ExampleApp.qml
deleted file mode 100644
index e52f320..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/ExampleApp.qml
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Controls 1.4 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0 as Kirigami
-import "gallery"
-
-Kirigami.ApplicationWindow {
- id: root
-
- //header: Kirigami.ToolBarApplicationHeader {}
-
- globalDrawer: Kirigami.GlobalDrawer {
- title: "Widget gallery"
- titleIcon: "applications-graphics"
- bannerImageSource: "banner.jpg"
-
- topContent: Controls.TextField {
- anchors {
- left: parent.left
- right: parent.right
- }
- placeholderText: "Search..."
- }
-
- actions: [
- Kirigami.Action {
- text: "Submenu 1"
- iconName: "view-list-icons"
- Kirigami.Action {
- text: "Action 1"
- onTriggered: showPassiveNotification(text + " clicked")
- }
- Kirigami.Action {
- text: "Action 2"
- onTriggered: showPassiveNotification(text + " clicked")
- }
- Kirigami.Action {
- text: "Action 3"
- onTriggered: showPassiveNotification(text + " clicked")
- }
- },
- Kirigami.Action {
- text: "Submenu 2"
- iconName: "folder-sync"
- Kirigami.Action {
- text: "Action 4"
- onTriggered: showPassiveNotification(text + " clicked")
- }
- Kirigami.Action {
- text: "Action 5"
- onTriggered: showPassiveNotification(text + " clicked")
- }
- },
- Kirigami.Action {
- text: "Checkable"
- iconName: "view-list-details"
- checkable: true
- checked: false
- onTriggered: {
- showPassiveNotification("Action checked: " + checked)
- }
- },
- Kirigami.Action {
- text: "Open A Page"
- iconName: "configure"
- checkable: true
- //Need to do this, otherwise it breaks the bindings
- property bool current: pageStack.currentItem ? pageStack.currentItem.objectName == "settingsPage" : false
- onCurrentChanged: {
- checked = current;
- }
- onTriggered: {
- pageStack.push(settingsComponent);
- }
- }
- ]
-
- Controls.CheckBox {
- checked: true
- text: "Option 1"
- }
- Controls.CheckBox {
- text: "Option 2"
- }
- Controls.CheckBox {
- text: "Option 3"
- }
- Controls.Slider {
- Layout.fillWidth: true
- value: 0.5
- }
- }
- contextDrawer: Kirigami.ContextDrawer {
- id: contextDrawer
- }
-
- pageStack.initialPage: mainPageComponent
-
- Component {
- id: settingsComponent
- Kirigami.Page {
- title: "Settings"
- objectName: "settingsPage"
- Rectangle {
- anchors.fill: parent
- Controls.Button {
- anchors.centerIn: parent
- iconName: "go-previous"
- text: "Remove Page"
- onClicked: applicationWindow().pageStack.pop();
- }
- }
- }
- }
-
- //Main app content
- Component {
- id: mainPageComponent
- MainPage {}
- }
-
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/MainPage.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/MainPage.qml
deleted file mode 100644
index 520c518..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/MainPage.qml
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Controls 1.4 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0 as Kirigami
-
-Kirigami.ScrollablePage {
- id: pageRoot
-
- implicitWidth: Kirigami.Units.gridUnit * 20
- background: Rectangle {
- color: Kirigami.Theme.viewBackgroundColor
- }
-
- title: "Gallery"
-
- //flickable: mainListView
- actions {
- contextualActions: [
- Kirigami.Action {
- text:"Action 1"
- iconName: "document-decrypt"
- onTriggered: showPassiveNotification("Action 1 clicked")
- },
- Kirigami.Action {
- id: shareAction
- visible: checkableAction.checked
- text:"Action 2"
- iconName: "document-share"
- onTriggered: showPassiveNotification("Action 2 clicked")
- },
- Kirigami.Action {
- id: checkableAction
- text:"Checkabke"
- checkable: true
- iconName: "dashboard-show"
- onCheckedChanged: showPassiveNotification("Checked: " + checked)
- }
- ]
- }
-
- ListView {
- id: mainListView
-
- model: ListModel {
- ListElement {
- text: "Button"
- component: "Button"
- }
- ListElement {
- text: "CheckBox"
- component: "CheckBox"
- }
- ListElement {
- text: "Radio Button"
- component: "RadioButton"
- }
- ListElement {
- text: "Progress Bar"
- component: "ProgressBar"
- }
- ListElement {
- text: "Slider"
- component: "Slider"
- }
- ListElement {
- text: "Switch"
- component: "Switch"
- }
- ListElement {
- text: "Text Field"
- component: "TextField"
- }
- ListElement {
- text: "Multiple Columns"
- component: "MultipleColumns"
- }
- ListElement {
- text: "List View"
- component: "ListView"
- }
- ListElement {
- text: "Non Scrollable Page"
- component: "NonScrollable"
- }
- }
- delegate: Kirigami.SwipeListItem {
- id: listItem
- Kirigami.Label {
- height: Math.max(implicitHeight, Kirigami.Units.iconSizes.smallMedium)
- anchors.verticalCenter: parent.verticalCenter
- x: y
- text: model.text
- color: listItem.checked || (listItem.pressed && !listItem.checked && !listItem.sectionDelegate) ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.viewTextColor
- }
-
- property Item ownPage
- onClicked: {
- if (!model.component) {
- return;
- }
- root.pageStack.pop(pageRoot);
- ownPage = root.pageStack.push(Qt.resolvedUrl("gallery/" + model.component + "Gallery.qml"));
- }
- checked: ownPage && root.pageStack.lastItem == ownPage
- actions: [
- Kirigami.Action {
- iconName: "document-decrypt"
- onTriggered: showPassiveNotification(model.text + " Action 1 clicked")
- },
- Kirigami.Action {
- iconName: "mail-reply-sender"
- onTriggered: showPassiveNotification(model.text + " Action 2 clicked")
- }]
- }
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/banner.jpg b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/banner.jpg
deleted file mode 100644
index cf08971..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/banner.jpg
+++ /dev/null
Binary files differ
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/ButtonGallery.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/ButtonGallery.qml
deleted file mode 100644
index 8f148ab..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/ButtonGallery.qml
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.2 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-ScrollablePage {
- id: page
- Layout.fillWidth: true
- //implicitWidth: Units.gridUnit * (Math.floor(Math.random() * 35) + 10)
-
- title: "Buttons"
-
- actions {
- main: Action {
- iconName: sheet.opened ? "dialog-cancel" : "document-edit"
- text: "Main Action Text"
- checked: sheet.opened
- checkable: true
- onCheckedChanged: sheet.opened = checked;
- }
- left: Action {
- iconName: "go-previous"
- text: "Left Action Text"
- onTriggered: {
- showPassiveNotification("Left action triggered")
- }
- }
- right: Action {
- iconName: "go-next"
- text: "Right Action Text"
- onTriggered: {
- showPassiveNotification("Right action triggered")
- }
- }
- contextualActions: [
- Action {
- text:"Action for buttons"
- iconName: "bookmarks"
- onTriggered: showPassiveNotification("Action 1 clicked")
- },
- Action {
- text:"Disabled Action"
- iconName: "folder"
- enabled: false
- },
- Action {
- text: "Action for Sheet"
- visible: sheet.opened
- }
- ]
- }
-
-
- //Close the drawer with the back button
- onBackRequested: {
- if (bottomDrawer.opened) {
- event.accepted = true;
- bottomDrawer.close();
- }
- if (sheet.opened) {
- event.accepted = true;
- sheet.close();
- }
- }
-
- OverlayDrawer {
- id: bottomDrawer
- anchors.fill: parent
- edge: Qt.BottomEdge
- contentItem: Item {
- implicitHeight: childrenRect.height + Units.gridUnit
- ColumnLayout {
- anchors.centerIn: parent
- Controls.Button {
- text: "Button1"
- onClicked: showPassiveNotification("Button 1 clicked")
- }
- Controls.Button {
- text: "Button2"
- onClicked: showPassiveNotification("Button 2 clicked")
- }
- Item {
- Layout.minimumHeight: Units.gridUnit * 4
- }
- }
- }
- }
-
- OverlaySheet {
- id: sheet
- ColumnLayout {
- Label {
- Layout.fillWidth: true
- wrapMode: Text.WordWrap
- text: "
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id risus id augue euismod accumsan. Nunc vestibulum placerat bibendum. Morbi commodo auctor varius. Donec molestie euismod ultrices. Sed facilisis augue nec eros auctor, vitae mattis quam rhoncus. Nam ut erat diam. Curabitur iaculis accumsan magna, eget fermentum massa scelerisque eu. Cras elementum erat non erat euismod accumsan. Vestibulum ac mi sed dui finibus pulvinar. Vivamus dictum, leo sed lobortis porttitor, nisl magna faucibus orci, sit amet euismod arcu elit eget est. Duis et vehicula nibh. In arcu sapien, laoreet sit amet porttitor non, rhoncus vel magna. Suspendisse imperdiet consectetur est nec ornare. Pellentesque bibendum sapien at erat efficitur vehicula. Morbi sed porta nibh. Vestibulum ut urna ut dolor sagittis mattis."
- }
-
- Controls.TextField {
- Layout.alignment: Qt.AlignHCenter
- }
-
- Label {
- Layout.fillWidth: true
- wrapMode: Text.WordWrap
- text: "
- Morbi dictum, sapien at maximus pulvinar, sapien metus condimentum magna, quis lobortis nisi dui mollis turpis. Aliquam sit amet scelerisque dui. In sit amet tellus placerat, condimentum enim sed, hendrerit quam. Integer dapibus lobortis finibus. Suspendisse faucibus eros vitae ante posuere blandit. Nullam volutpat quam id diam hendrerit aliquam. Donec non sem at diam posuere convallis. Vivamus ut congue quam. Ut dictum fermentum sapien, eu ultricies est ornare ut.
-
- Nullam fringilla a libero vehicula faucibus. Donec euismod sodales nulla, in vehicula lectus posuere a. Donec nisi nulla, pulvinar eu porttitor vitae, varius eget ante. Nam rutrum eleifend elit, quis facilisis leo sodales vitae. Aenean accumsan a nulla at sagittis. Integer placerat tristique magna, vitae iaculis ante cursus sit amet. Sed facilisis mollis turpis nec tristique. Etiam quis feugiat odio. Vivamus sagittis at purus nec aliquam.
-
- Morbi neque dolor, elementum ac fermentum ac, auctor ut erat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus non nibh sit amet quam luctus congue. Donec in eros varius, porta metus sed, sagittis lacus. Mauris dapibus lorem nisi, non eleifend massa tristique egestas. Curabitur nec blandit urna. Mauris rhoncus libero felis, commodo viverra ante consectetur vel. Donec dictum tincidunt orci, quis tristique urna. Quisque egestas, dui ac mollis dictum, purus velit elementum est, at pellentesque erat est fermentum purus. Nulla a quam tellus. Vestibulum a congue ligula. Quisque feugiat nulla et tortor sodales viverra. Maecenas dolor leo, elementum sed urna vel, posuere hendrerit metus. Mauris pellentesque, mi non luctus aliquam, leo nulla varius arcu, vel pulvinar enim enim nec nisl.
-
- Etiam sapien leo, venenatis eget justo at, pellentesque mollis tellus. Fusce consequat ullamcorper vulputate. Duis tellus nisi, dictum ut augue non, elementum congue ligula. Fusce in vehicula arcu. Nulla facilisi. Quisque a convallis sapien. Aenean pellentesque convallis egestas. Phasellus rhoncus, nulla in tempor maximus, arcu ex venenatis diam, sit amet egestas mi dolor non ante. "
- }
- Controls.Button {
- text: "Close"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: sheet.close()
- }
- }
- }
- ColumnLayout {
- width: page.width
- spacing: Units.smallSpacing
-
- Controls.Button {
- text: "Open Bottom drawer"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: bottomDrawer.open()
- }
- Controls.Button {
- text: "Open Sheet"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: sheet.open()
- }
- Controls.Button {
- text: "Toggle Action Button"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: mainAction.visible = !mainAction.visible;
- }
- Controls.Button {
- text: "Show Passive Notification"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: showPassiveNotification("This is a passive message", 3000);
- }
- Controls.Button {
- text: "Passive Notification Action"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: showPassiveNotification("This is a passive message", "long", "Action", function() {showPassiveNotification("Passive notification action clicked")});
- }
- Controls.ToolButton {
- text: "Toggle controls"
- checkable: true
- checked: true
- anchors.horizontalCenter: parent.horizontalCenter
- onCheckedChanged: applicationWindow().controlsVisible = checked
- }
- Controls.Button {
- text: "Disabled Button"
- enabled: false
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: showPassiveNotification("clicked")
- }
- Controls.ToolButton {
- text: "Tool Button"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: showPassiveNotification(text + " clicked")
- }
- Controls.ToolButton {
- text: "Tool Button non flat"
- property bool flat: false
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: showPassiveNotification(text + " clicked")
- }
- Controls.ToolButton {
- iconName: "go-previous"
- property bool flat: false
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: showPassiveNotification("Button clicked")
- }
- Row {
- spacing: 0
- anchors.horizontalCenter: parent.horizontalCenter
- Controls.ToolButton {
- iconName: "edit-cut"
- property bool flat: false
- onClicked: showPassiveNotification("Cut clicked")
- }
- Controls.ToolButton {
- iconName: "edit-copy"
- property bool flat: false
- onClicked: showPassiveNotification("Copy clicked")
- }
- Controls.ToolButton {
- iconName: "edit-paste"
- property bool flat: false
- onClicked: showPassiveNotification("Paste clicked")
- }
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/CheckBoxGallery.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/CheckBoxGallery.qml
deleted file mode 100644
index 8ac50c6..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/CheckBoxGallery.qml
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.2 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-ScrollablePage {
- id: page
- actions {
- main: Action {
- iconName: sheet.opened ? "dialog-cancel" : "document-edit"
- text: "Main Action Text"
- checked: sheet.opened
- checkable: true
- onCheckedChanged: sheet.opened = checked;
- }
- contextualActions: [
- Controls.Action {
- text:"Action 1"
- onTriggered: showPassiveNotification("Action 1 clicked")
- },
- Controls.Action {
- text:"Action 2"
- onTriggered: showPassiveNotification("Action 2 clicked")
- }
- ]
- }
-
- Layout.fillWidth: true
- title: "Checkboxes"
-
- OverlaySheet {
- id: sheet
- Label {
- property int implicitWidth: Units.gridUnit * 45
- wrapMode: Text.WordWrap
- text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id risus id augue euismod accumsan. Nunc vestibulum placerat bibendum. Morbi commodo auctor varius. Donec molestie euismod ultrices. Sed facilisis augue nec eros auctor, vitae mattis quam rhoncus. Nam ut erat diam. Curabitur iaculis accumsan magna, eget fermentum massa scelerisque eu. Cras elementum erat non erat euismod accumsan. Vestibulum ac mi sed dui finibus pulvinar. Vivamus dictum, leo sed lobortis porttitor, nisl magna faucibus orci, sit amet euismod arcu elit eget est. Duis et vehicula nibh. In arcu sapien, laoreet sit amet porttitor non, rhoncus vel magna. Suspendisse imperdiet consectetur est nec ornare. Pellentesque bibendum sapien at erat efficitur vehicula. Morbi sed porta nibh. Vestibulum ut urna ut dolor sagittis mattis."
- }
- }
-
- ColumnLayout {
- //This OverlaySheet is put in the "wrong place", but will be automatically reparented
- // to "page"
-
- Item {
- Layout.fillWidth: true
- Layout.minimumHeight: units.gridUnit * 10
- GridLayout {
- anchors.centerIn: parent
- columns: 3
- rows: 3
- rowSpacing: Units.smallSpacing
-
- Item {
- width: 1
- height: 1
- }
- Label {
- text: "Normal"
- }
- Label {
- text: "Disabled"
- enabled: false
- }
- Label {
- text: "On"
- }
- Controls.CheckBox {
- text: "On"
- checked: true
- }
- Controls.CheckBox {
- text: "On"
- checked: true
- enabled: false
- }
- Label {
- text: "Off"
- }
- Controls.CheckBox {
- text: "Off"
- checked: false
- }
- Controls.CheckBox {
- text: "Off"
- checked: false
- enabled: false
- }
- }
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/ListViewGallery.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/ListViewGallery.qml
deleted file mode 100644
index d605cb9..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/ListViewGallery.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.2 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-ScrollablePage {
- id: page
- Layout.fillWidth: true
- title: "Long List view"
-
- supportsRefreshing: true
- onRefreshingChanged: {
- if (refreshing) {
- refreshRequestTimer.running = true;
- } else {
- showPassiveNotification("Example refreshing completed")
- }
- }
-
- background: Rectangle {
- color: Theme.viewBackgroundColor
- }
-
- ListView {
- Timer {
- id: refreshRequestTimer
- interval: 3000
- onTriggered: page.refreshing = false
- }
- model: 200
- delegate: BasicListItem {
- label: "Item " + modelData
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/MultipleColumnsGallery.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/MultipleColumnsGallery.qml
deleted file mode 100644
index 47ec5f6..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/MultipleColumnsGallery.qml
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.2 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-ScrollablePage {
- id: page
- Layout.fillWidth: true
- //implicitWidth: Units.gridUnit * (Math.floor(Math.random() * 35) + 8)
-
- title: "Multiple Columns"
-
- actions {
- main: Action {
- iconName: "document-edit"
- text: "Main Action Text"
- onTriggered: {
- showPassiveNotification("Action button in buttons page clicked");
- }
- }
- left: Action {
- iconName: "go-previous"
- text: "Left Action Text"
- onTriggered: {
- showPassiveNotification("Left action triggered")
- }
- }
- right: Action {
- iconName: "go-next"
- text: "Right Action Text"
- onTriggered: {
- showPassiveNotification("Right action triggered")
- }
- }
- contextualActions: [
- Action {
- text:"Action 1"
- iconName: "bookmarks"
- onTriggered: showPassiveNotification("Action 1 clicked")
- },
- Action {
- text:"Action 2"
- iconName: "folder"
- enabled: false
- onTriggered: showPassiveNotification("Action 2 clicked")
- }
- ]
- }
-
- ColumnLayout {
- width: page.width
- spacing: Units.smallSpacing
-
- Label {
- Layout.fillWidth: true
- wrapMode: Text.WordWrap
- text: "This page is used to test multiple columns: you can push and pop an arbitrary number of pages, each new page will have a random implicit width between 8 and 35 grid units.\nIf you enlarge the window enough, you can test how the application behaves with multiple columns."
- }
- Item {
- Layout.minimumWidth: Units.gridUnit *2
- Layout.minimumHeight: Layout.minimumWidth
- }
- Label {
- anchors.horizontalCenter: parent.horizontalCenter
- text: "Page implicitWidth: " + page.implicitWidth
- }
- Controls.Button {
- text: "Push Another Page"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: pageStack.push(Qt.resolvedUrl("MultipleColumnsGallery.qml"));
- }
- Controls.Button {
- text: "Pop A Page"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: pageStack.pop();
- }
- RowLayout {
- anchors.horizontalCenter: parent.horizontalCenter
- Controls.TextField {
- id: edit
- text: page.title
- }
- Controls.Button {
- text: "Rename Page"
- onClicked: page.title = edit.text;
- }
- }
- }
-
-
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/NonScrollableGallery.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/NonScrollableGallery.qml
deleted file mode 100644
index ed6ddab..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/NonScrollableGallery.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.2 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-Page {
- id: page
- Layout.fillWidth: true
- title: "Simple Page"
-
- actions {
- main: Action {
- iconName: sheet.opened ? "dialog-cancel" : "document-edit"
- text: "Main Action Text"
- checked: sheet.opened
- checkable: true
- onCheckedChanged: sheet.opened = checked;
- }
- }
-
- Rectangle {
- anchors.fill: parent
- color: "red"
- Label {
- anchors.centerIn: parent
- text: "Rectangle with automatic margins"
- }
- }
-
- OverlaySheet {
- id: sheet
- Label {
- property int implicitWidth: Units.gridUnit * 30
- wrapMode: Text.WordWrap
- text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id risus id augue euismod accumsan. Nunc vestibulum placerat bibendum. Morbi commodo auctor varius. Donec molestie euismod ultrices. Sed facilisis augue nec eros auctor, vitae mattis quam rhoncus. Nam ut erat diam. Curabitur iaculis accumsan magna, eget fermentum massa scelerisque eu. Cras elementum erat non erat euismod accumsan. Vestibulum ac mi sed dui finibus pulvinar. Vivamus dictum, leo sed lobortis porttitor, nisl magna faucibus orci, sit amet euismod arcu elit eget est. Duis et vehicula nibh. In arcu sapien, laoreet sit amet porttitor non, rhoncus vel magna. Suspendisse imperdiet consectetur est nec ornare. Pellentesque bibendum sapien at erat efficitur vehicula. Morbi sed porta nibh. Vestibulum ut urna ut dolor sagittis mattis."
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/ProgressBarGallery.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/ProgressBarGallery.qml
deleted file mode 100644
index 3b76999..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/ProgressBarGallery.qml
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.2 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-ScrollablePage {
- id: page
- Layout.fillWidth: true
-
- title: "Progress Indicators"
-
- actions {
- main: Action {
- iconName: "document-edit"
- text: "Main Action Text"
- onTriggered: {
- showPassiveNotification("Main action triggered");
- }
- }
- right: Action {
- iconName: "folder-sync"
- text: "Right Action Text"
- onTriggered: {
- showPassiveNotification("Right action triggered")
- }
- }
- }
-
- ColumnLayout {
- width: page.width
- Timer {
- id: timer
- property int value: 0
- interval: 80
- repeat: true
- running: true
- onTriggered: {
- value = (value + 1) % 100
- }
- }
-
- GridLayout {
- anchors.centerIn: parent
- rowSpacing: Units.largeSpacing
- columns: 2
- width: parent.width - units.gridUnit*2
-
- Label {
- text: "Determinate:"
- Layout.alignment: Qt.AlignRight
- }
- Controls.ProgressBar {
- minimumValue: 0
- maximumValue: 100
- value: timer.value
- Layout.maximumWidth: units.gridUnit * 10
- }
- Label {
- text: "Indeterminate:"
- Layout.alignment: Qt.AlignRight
- }
- Controls.ProgressBar {
- minimumValue: 0
- maximumValue: 100
- indeterminate: true
- Layout.maximumWidth: units.gridUnit * 10
- }
- Label {
- text: "Busy indicator:"
- Layout.alignment: Qt.AlignRight
- }
- Controls.BusyIndicator {
-
- }
- Label {
- text: "Inactive indicator:"
- Layout.alignment: Qt.AlignRight
- }
- Controls.BusyIndicator {
- running: false
- }
- Label {
- text: "Custom size:"
- Layout.alignment: Qt.AlignRight
- }
- Controls.BusyIndicator {
- Layout.minimumWidth: Units.iconSizes.enormous
- Layout.minimumHeight: width
- }
- Label {
- text: "Vertical:"
- Layout.alignment: Qt.AlignRight
- }
- RowLayout {
- Controls.ProgressBar {
- Layout.minimumWidth: Units.gridUnit * 2
- Layout.maximumHeight: Units.gridUnit * 8
- minimumValue: 0
- maximumValue: 100
- value: timer.value
- orientation: Qt.Vertical
- }
- Controls.ProgressBar {
- Layout.minimumWidth: Units.gridUnit * 2
- Layout.maximumHeight: Units.gridUnit * 8
- indeterminate: true
- orientation: Qt.Vertical
- }
- }
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/RadioButtonGallery.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/RadioButtonGallery.qml
deleted file mode 100644
index c44e903..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/RadioButtonGallery.qml
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.2 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-ScrollablePage {
- id: page
- Layout.fillWidth: true
-
- title: "Radio buttons"
- actions {
- main: Action {
- iconName: "document-edit"
- text: "Main Action Text"
- onTriggered: {
- showPassiveNotification("Action button in buttons page clicked");
- }
- }
- left: Action {
- iconName: "folder-sync"
- text: "Left Action Text"
- onTriggered: {
- showPassiveNotification("Left action triggered")
- }
- }
- }
-
-
- ColumnLayout {
- width: page.width
- Controls.ExclusiveGroup {
- id: radioGroup
- }
- Controls.ExclusiveGroup {
- id: radioGroup2
- }
-
- Item {
- Layout.fillWidth: true
- Layout.minimumHeight: units.gridUnit * 10
- GridLayout {
- anchors.centerIn: parent
- columns: 3
- rows: 3
- rowSpacing: Units.smallSpacing
-
- Item {
- width: 1
- height: 1
- }
- Label {
- text: "Normal"
- }
- Label {
- text: "Disabled"
- enabled: false
- }
- Label {
- text: "On"
- }
- Controls.RadioButton {
- text: "On"
- checked: true
- exclusiveGroup: radioGroup
- }
- Controls.RadioButton {
- text: "On"
- checked: true
- enabled: false
- exclusiveGroup: radioGroup2
- }
- Label {
- text: "Off"
- }
- Controls.RadioButton {
- text: "Off"
- checked: false
- exclusiveGroup: radioGroup
- }
- Controls.RadioButton {
- text: "Off"
- checked: false
- enabled: false
- exclusiveGroup: radioGroup2
- }
- }
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/SliderGallery.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/SliderGallery.qml
deleted file mode 100644
index 08100ca..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/SliderGallery.qml
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.2 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-ScrollablePage {
- id: page
- Layout.fillWidth: true
-
- title: "Sliders"
-
- actions {
- left: Action {
- iconName: "folder-sync"
- text: "Left Action Text"
- onTriggered: {
- showPassiveNotification("Left action triggered")
- }
- }
- right: Action {
- iconName: "configure"
- text: "Right Action Text"
- onTriggered: {
- showPassiveNotification("Right action triggered")
- }
- }
- }
-
- ColumnLayout {
- width: page.width
-
- Item {
- Layout.fillWidth: true
- Layout.minimumHeight: Units.gridUnit * 20
- ColumnLayout {
- anchors.centerIn: parent
- spacing: Units.smallSpacing
-
- Label {
- text: "Normal:"
- }
- Controls.Slider {
- Layout.minimumWidth: Units.gridUnit * 15
- value: 2
- maximumValue: 5.0
- }
- Label {
- text: "Disabled:"
- }
- Controls.Slider {
- enabled: false
- Layout.minimumWidth: Units.gridUnit * 15
- value: 2
- maximumValue: 5.0
- }
- Label {
- text: "Thickmarks:"
- }
- Controls.Slider {
- Layout.minimumWidth: Units.gridUnit * 15
- tickmarksEnabled: true
- maximumValue: 5.0
- stepSize: 1.0
- value: 3
- }
- Label {
- text: "Vertical:"
- }
- RowLayout {
- Layout.alignment: Qt.AlignHCenter
- Controls.Slider {
- Layout.minimumWidth: 2
- Layout.minimumHeight: Units.gridUnit * 10
- value: 2
- maximumValue: 5.0
- orientation: Qt.Vertical
- }
- Controls.Slider {
- Layout.minimumWidth: 2
- Layout.minimumHeight: Units.gridUnit * 10
- value: 3
- tickmarksEnabled: true
- maximumValue: 5.0
- stepSize: 1.0
- orientation: Qt.Vertical
- }
- }
- }
- }
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/SwitchGallery.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/SwitchGallery.qml
deleted file mode 100644
index f44b32d..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/SwitchGallery.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.2 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-ScrollablePage {
- id: page
- Layout.fillWidth: true
- title: "Switches"
-
- ColumnLayout {
- width: page.width
-
- Item {
- Layout.fillWidth: true
- Layout.minimumHeight: units.gridUnit * 10
- GridLayout {
- anchors.centerIn: parent
- columns: 3
- rows: 3
- rowSpacing: Units.smallSpacing
-
- Item {
- width: 1
- height: 1
- }
- Label {
- text: "Normal"
- }
- Label {
- text: "Disabled"
- enabled: false
- }
- Label {
- text: "On"
- }
- Controls.Switch {
- checked: true
- }
- Controls.Switch {
- checked: true
- enabled: false
- }
- Label {
- text: "Off"
- }
- Controls.Switch {
- checked: false
- }
- Controls.Switch {
- checked: false
- enabled: false
- }
- }
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/TextFieldGallery.qml b/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/TextFieldGallery.qml
deleted file mode 100644
index d069918..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/contents/ui/gallery/TextFieldGallery.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.2 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-ScrollablePage {
- id: page
- Layout.fillWidth: true
- implicitWidth: applicationWindow().width
- title: "Text fields"
-
- ColumnLayout {
- objectName: "pollo"
- width: page.width
- spacing: Units.smallSpacing
-
- Label {
- text: "Placeholder text:"
- }
- Controls.TextField {
- placeholderText: "Search..."
- Layout.alignment: Qt.AlignHCenter
- }
- Label {
- text: "Disabled field:"
- }
- Controls.TextField {
- text: "Disabled"
- enabled: false
- Layout.alignment: Qt.AlignHCenter
- }
- Label {
- text: "Password:"
- }
- Controls.TextField {
- echoMode: TextInput.Password
- Layout.alignment: Qt.AlignHCenter
- }
- Label {
- text: "Text area:"
- }
- Controls.TextArea {
- Layout.fillWidth: true
- text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu nisl ac nibh malesuada pretium ut sit amet libero. Nulla libero arcu, pharetra a dignissim nec, iaculis sit amet metus. Suspendisse quis justo efficitur, pharetra dui maximus, aliquam dolor. Vestibulum vel imperdiet turpis. Mauris ut leo mauris. Praesent ut libero sollicitudin, tincidunt nisi a, efficitur erat. Curabitur lacinia leo et tempor aliquam."
- Layout.minimumWidth: Units.gridUnit * 12
- Layout.minimumHeight: Units.gridUnit * 12
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/gallery/metadata.desktop b/kstars/kstarslite/kirigami-lib/examples/gallery/metadata.desktop
deleted file mode 100644
index 4a96e36..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/gallery/metadata.desktop
+++ /dev/null
@@ -1,18 +0,0 @@
-[Desktop Entry]
-Name=Kirigami Gallery
-
-Encoding=UTF-8
-Type=Application
-Exec=kpackagelauncherqml -a org.kde.kirigami.gallery
-Icon=preferences-desktop-theme
-X-KDE-ParentApp=
-X-KDE-PluginInfo-Author=Marco Martin
-X-KDE-PluginInfo-Email=mart@kde.org
-X-KDE-PluginInfo-Name=org.kde.kirigami.gallery
-X-KDE-PluginInfo-Version=1.0
-X-KDE-PluginInfo-Website=http://kde.org
-X-KDE-PluginInfo-Category=Graphics
-X-KDE-PluginInfo-Depends=
-X-KDE-PluginInfo-License=GPL
-X-KDE-PluginInfo-EnabledByDefault=true
-X-Plasma-MainScript=ui/ExampleApp.qml
diff --git a/kstars/kstarslite/kirigami-lib/examples/simpleexamples/AbstractApplicationWindow.qml b/kstars/kstarslite/kirigami-lib/examples/simpleexamples/AbstractApplicationWindow.qml
deleted file mode 100644
index c27a614..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/simpleexamples/AbstractApplicationWindow.qml
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Controls 1.4 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0 as Kirigami
-
-Kirigami.AbstractApplicationWindow {
- id: root
- width: 500
- height: 800
- visible: true
-
- globalDrawer: Kirigami.GlobalDrawer {
- title: "Widget gallery"
- titleIcon: "applications-graphics"
-
- actions: [
- Kirigami.Action {
- text: "View"
- iconName: "view-list-icons"
- Kirigami.Action {
- text: "action 1"
- }
- Kirigami.Action {
- text: "action 2"
- }
- Kirigami.Action {
- text: "action 3"
- }
- },
- Kirigami.Action {
- text: "Sync"
- iconName: "folder-sync"
- Kirigami.Action {
- text: "action 4"
- }
- Kirigami.Action {
- text: "action 5"
- }
- },
- Kirigami.Action {
- text: "Checkable"
- iconName: "view-list-details"
- checkable: true
- checked: false
- onTriggered: {
- print("Action checked:" + checked)
- }
- },
- Kirigami.Action {
- text: "Settings"
- iconName: "configure"
- checkable: true
- //Need to do this, otherwise it breaks the bindings
- property bool current: pageStack.currentItem ? pageStack.currentItem.objectName == "settingsPage" : false
- onCurrentChanged: {
- checked = current;
- }
- onTriggered: {
- pageStack.push(settingsComponent);
- }
- }
- ]
-
- Controls.CheckBox {
- checked: true
- text: "Option 1"
- }
- Controls.CheckBox {
- text: "Option 2"
- }
- Controls.CheckBox {
- text: "Option 3"
- }
- Controls.Slider {
- Layout.fillWidth: true
- value: 0.5
- }
- }
- contextDrawer: Kirigami.ContextDrawer {
- id: contextDrawer
- }
-
- header: Kirigami.ApplicationHeader {}
-
- pageStack: Controls.StackView {
- anchors.fill: parent
- property int currentIndex: 0
- focus: true
- onCurrentIndexChanged: {
- if (depth > currentIndex+1) {
- pop(get(currentIndex));
- }
- }
- onDepthChanged: {
- currentIndex = depth-1;
- }
- initialItem: mainPageComponent
-
- Keys.onReleased: {
- if (event.key == Qt.Key_Back ||
- (event.key === Qt.Key_Left && (event.modifiers & Qt.AltModifier))) {
- event.accepted = true;
- if (root.contextDrawer && root.contextDrawer.opened) {
- root.contextDrawer.close();
- } else if (root.globalDrawer && root.globalDrawer.opened) {
- root.globalDrawer.close();
- } else {
- var backEvent = {accepted: false}
- if (root.pageStack.currentIndex >= 1) {
- root.pageStack.currentItem.backRequested(backEvent);
- if (!backEvent.accepted) {
- if (root.pageStack.depth > 1) {
- root.pageStack.currentIndex = Math.max(0, root.pageStack.currentIndex - 1);
- backEvent.accepted = true;
- } else {
- Qt.quit();
- }
- }
- }
-
- if (!backEvent.accepted) {
- Qt.quit();
- }
- }
- }
- }
- }
-
-
- Component {
- id: settingsComponent
- Kirigami.Page {
- title: "Settings"
- objectName: "settingsPage"
- Rectangle {
- anchors.fill: parent
- }
- }
- }
-
- //Main app content
- Component {
- id: mainPageComponent
- MultipleColumnsGallery {}
- }
-
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/simpleexamples/FixedSidebar.qml b/kstars/kstarslite/kirigami-lib/examples/simpleexamples/FixedSidebar.qml
deleted file mode 100644
index 74bbc69..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/simpleexamples/FixedSidebar.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Controls 1.4 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0 as Kirigami
-
-Kirigami.ApplicationWindow {
- id: root
- width: Kirigami.Units.gridUnit * 60
- height: Kirigami.Units.gridUnit * 40
-
-
- pageStack.initialPage: mainPageComponent
- globalDrawer: Kirigami.OverlayDrawer {
- opened: true
- modal: false
- contentItem: Item {
- implicitWidth: Kirigami.Units.gridUnit * 10
-
- Kirigami.Label {
- text: "This is a sidebar"
- width: parent.width - Kirigami.Units.smallSpacing * 2
- wrapMode: Text.WordWrap
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
- }
- }
-
- //Main app content
- Component {
- id: mainPageComponent
- MultipleColumnsGallery {}
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/simpleexamples/MultipleColumnsGallery.qml b/kstars/kstarslite/kirigami-lib/examples/simpleexamples/MultipleColumnsGallery.qml
deleted file mode 100644
index 965f9f3..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/simpleexamples/MultipleColumnsGallery.qml
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.2 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-ScrollablePage {
- id: page
- Layout.fillWidth: true
- implicitWidth: Units.gridUnit * (Math.floor(Math.random() * 35) + 8)
-
- title: "Multiple Columns"
-
- actions {
- contextualActions: [
- Action {
- text:"Action for buttons"
- iconName: "bookmarks"
- onTriggered: print("Action 1 clicked")
- },
- Action {
- text:"Action 2"
- iconName: "folder"
- enabled: false
- }
- ]
- }
-
- ColumnLayout {
- width: page.width
- spacing: Units.smallSpacing
-
- Label {
- Layout.fillWidth: true
- wrapMode: Text.WordWrap
- text: "This page is used to test multiple columns: you can push and pop an arbitrary number of pages, each new page will have a random implicit width between 8 and 35 grid units.\nIf you enlarge the window enough, you can test how the application behaves with multiple columns."
- }
- Item {
- Layout.minimumWidth: Units.gridUnit *2
- Layout.minimumHeight: Layout.minimumWidth
- }
- Label {
- anchors.horizontalCenter: parent.horizontalCenter
- text: "Page implicitWidth: " + page.implicitWidth
- }
- Controls.Button {
- text: "Push Another Page"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: pageStack.push(Qt.resolvedUrl("MultipleColumnsGallery.qml"));
- }
- Controls.Button {
- text: "Pop A Page"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: pageStack.pop();
- }
- RowLayout {
- anchors.horizontalCenter: parent.horizontalCenter
- Controls.TextField {
- id: edit
- text: page.title
- }
- Controls.Button {
- text: "Rename Page"
- onClicked: page.title = edit.text;
- }
- }
- }
-
-
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/simpleexamples/SplitDrawer.qml b/kstars/kstarslite/kirigami-lib/examples/simpleexamples/SplitDrawer.qml
deleted file mode 100644
index 7dae1bd..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/simpleexamples/SplitDrawer.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Controls 1.4 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0 as Kirigami
-
-Kirigami.ApplicationWindow {
- id: root
- width: Kirigami.Units.gridUnit * 60
- height: Kirigami.Units.gridUnit * 40
-
-
- pageStack.initialPage: mainPageComponent
- globalDrawer: Kirigami.SplitDrawer {
- id: drawer
- opened: true
- //modal: false
- contentItem: Column {
- //implicitWidth: Kirigami.Units.gridUnit * 10
-
- Kirigami.Label {
- anchors.horizontalCenter: parent.horizontalCenter
- text: "This is a sidebar"
- width: parent.width - Kirigami.Units.smallSpacing * 2
- wrapMode: Text.WordWrap
- }
- Controls.Button {
- anchors.horizontalCenter: parent.horizontalCenter
- text: "Modal Drawer"
- checkable: true
- checked: true
- onCheckedChanged: drawer.modal = checked
- }
- }
- }
-
- //Main app content
- Component {
- id: mainPageComponent
- MultipleColumnsGallery {}
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/simpleexamples/TabBarHeader.qml b/kstars/kstarslite/kirigami-lib/examples/simpleexamples/TabBarHeader.qml
deleted file mode 100644
index b6652cf..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/simpleexamples/TabBarHeader.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Controls 1.4 as Controls
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0 as Kirigami
-
-Kirigami.ApplicationWindow {
- id: root
- width: 500
- height: 800
- visible: true
-
-
- header: Kirigami.ApplicationHeader {
- separatorStyle: "TabBar"
- }
-
-
-
- pageStack.initialPage: mainPageComponent
-
-
- Component.onCompleted: {
- pageStack.push(mainPageComponent);
- pageStack.push(mainPageComponent);
- pageStack.currentIndex = 0;
- }
-
- //Main app content
- Component {
- id: mainPageComponent
- MultipleColumnsGallery {}
- }
-
-}
diff --git a/kstars/kstarslite/kirigami-lib/examples/simpleexamples/minimal.qml b/kstars/kstarslite/kirigami-lib/examples/simpleexamples/minimal.qml
deleted file mode 100644
index dee1290..0000000
--- a/kstars/kstarslite/kirigami-lib/examples/simpleexamples/minimal.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import org.kde.kirigami 1.0 as Kirigami
-
-Kirigami.ApplicationWindow {
- id: root
-
- globalDrawer: Kirigami.GlobalDrawer {
- title: "Hello App"
- titleIcon: "applications-graphics"
-
- actions: [
- Kirigami.Action {
- text: "View"
- iconName: "view-list-icons"
- Kirigami.Action {
- text: "action 1"
- }
- Kirigami.Action {
- text: "action 2"
- }
- Kirigami.Action {
- text: "action 3"
- }
- },
- Kirigami.Action {
- text: "action 3"
- },
- Kirigami.Action {
- text: "action 4"
- }
- ]
- }
- contextDrawer: Kirigami.ContextDrawer {
- id: contextDrawer
- }
-
- pageStack.initialPage: mainPageComponent
-
- Component {
- id: mainPageComponent
- Kirigami.ScrollablePage {
- title: "Hello"
- Rectangle {
- anchors.fill: parent
- }
- }
- }
-
-
-}
diff --git a/kstars/kstarslite/kirigami-lib/kirigami.pri b/kstars/kstarslite/kirigami-lib/kirigami.pri
deleted file mode 100644
index fc88c4c..0000000
--- a/kstars/kstarslite/kirigami-lib/kirigami.pri
+++ /dev/null
@@ -1,12 +0,0 @@
-
-QT += qml quick gui svg
-HEADERS += $$PWD/src/kirigamiplugin.h
-SOURCES += $$PWD/src/kirigamiplugin.cpp
-INCLUDEPATH += $$PWD/src
-DEFINES += KIRIGAMI_BUILD_TYPE_STATIC
-
-API_VER=1.0
-
-RESOURCES += $$PWD/kirigami.qrc
-
-#QML_IMPORT_PATH += $$PWD
diff --git a/kstars/kstarslite/kirigami-lib/kirigami.pro b/kstars/kstarslite/kirigami-lib/kirigami.pro
deleted file mode 100644
index 6181287..0000000
--- a/kstars/kstarslite/kirigami-lib/kirigami.pro
+++ /dev/null
@@ -1,28 +0,0 @@
-TEMPLATE = lib
-CONFIG += plugin
-
-QT += qml quick gui svg
-HEADERS += $$PWD/src/kirigamiplugin.h
-SOURCES += $$PWD/src/kirigamiplugin.cpp
-
-API_VER=1.0
-
-TARGET = $$qtLibraryTarget(org/kde/kirigamiplugin)
-
-importPath = $$[QT_INSTALL_QML]/org/kde/kirigami
-target.path = $${importPath}
-
-controls.path = $${importPath}
-controls.files += $$PWD/src/controls/*
-
-#For now ignore Desktop and Plasma stuff in qmake
-#styles.path = $${importPath}/styles
-#styles.files += $$PWD/src/styles/*
-
-INSTALLS += target controls
-
-
-
-
-
-
diff --git a/kstars/kstarslite/kirigami-lib/kirigami.qrc b/kstars/kstarslite/kirigami-lib/kirigami.qrc
deleted file mode 100644
index d59205c..0000000
--- a/kstars/kstarslite/kirigami-lib/kirigami.qrc
+++ /dev/null
@@ -1,47 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file alias="AbstractApplicationWindow.qml">src/controls/AbstractApplicationWindow.qml</file>
- <file alias="ContextDrawer.qml">src/controls/ContextDrawer.qml</file>
- <file alias="Action.qml">src/controls/Action.qml</file>
- <file alias="Page.qml">src/controls/Page.qml</file>
- <file alias="AbstractListItem.qml">src/controls/AbstractListItem.qml</file>
- <file alias="SplitDrawer.qml">src/controls/SplitDrawer.qml</file>
- <file alias="Theme.qml">src/controls/Theme.qml</file>
- <file alias="private/RefreshableScrollView.qml">src/controls/private/RefreshableScrollView.qml</file>
- <file alias="private/CornerShadow.qml">src/controls/private/CornerShadow.qml</file>
- <file alias="private/ActionButton.qml">src/controls/private/ActionButton.qml</file>
- <file alias="private/DefaultListItemBackground.qml">src/controls/private/DefaultListItemBackground.qml</file>
- <file alias="private/EdgeShadow.qml">src/controls/private/EdgeShadow.qml</file>
- <file alias="private/PageActionPropertyGroup.qml">src/controls/private/PageActionPropertyGroup.qml</file>
- <file alias="OverlayDrawer.qml">src/controls/OverlayDrawer.qml</file>
- <file alias="OverlaySheet.qml">src/controls/OverlaySheet.qml</file>
- <file alias="GlobalDrawer.qml">src/controls/GlobalDrawer.qml</file>
- <file alias="templates/AbstractListItem.qml">src/controls/templates/AbstractListItem.qml</file>
- <file alias="templates/SplitDrawer.qml">src/controls/templates/SplitDrawer.qml</file>
- <file alias="templates/private/MenuIcon.qml">src/controls/templates/private/MenuIcon.qml</file>
- <file alias="templates/private/PassiveNotification.qml">src/controls/templates/private/PassiveNotification.qml</file>
- <file alias="templates/private/PageRow.qml">src/controls/templates/private/PageRow.qml</file>
- <file alias="templates/private/ContextIcon.qml">src/controls/templates/private/ContextIcon.qml</file>
- <file alias="templates/private/AbstractDrawer.qml">src/controls/templates/private/AbstractDrawer.qml</file>
- <file alias="templates/private/BackButton.qml">src/controls/templates/private/BackButton.qml</file>
- <file alias="templates/OverlayDrawer.qml">src/controls/templates/OverlayDrawer.qml</file>
- <file alias="templates/OverlaySheet.qml">src/controls/templates/OverlaySheet.qml</file>
- <file alias="templates/SwipeListItem.qml">src/controls/templates/SwipeListItem.qml</file>
- <file alias="templates/ApplicationHeader.qml">src/controls/templates/ApplicationHeader.qml</file>
- <file alias="templates/AbstractApplicationHeader.qml">src/controls/templates/AbstractApplicationHeader.qml</file>
- <file alias="Units.qml">src/controls/Units.qml</file>
- <file alias="SwipeListItem.qml">src/controls/SwipeListItem.qml</file>
- <file alias="ApplicationWindow.qml">src/controls/ApplicationWindow.qml</file>
- <file alias="ApplicationHeader.qml">src/controls/ApplicationHeader.qml</file>
- <file alias="Heading.qml">src/controls/Heading.qml</file>
- <file alias="ScrollablePage.qml">src/controls/ScrollablePage.qml</file>
- <file alias="Icon.qml">src/controls/Icon.qml</file>
- <file alias="Label.qml">src/controls/Label.qml</file>
- <file alias="BasicListItem.qml">src/controls/BasicListItem.qml</file>
- <file alias="AbstractApplicationHeader.qml">src/controls/AbstractApplicationHeader.qml</file>
- <file alias="styles/Plasma/Theme.qml">src/styles/Plasma/Theme.qml</file>
- <file alias="styles/Plasma/Units.qml">src/styles/Plasma/Units.qml</file>
- <file alias="styles/Plasma/Icon.qml">src/styles/Plasma/Icon.qml</file>
-
- </qresource>
-</RCC>
diff --git a/kstars/kstarslite/kirigami-lib/metainfo.yaml b/kstars/kstarslite/kirigami-lib/metainfo.yaml
deleted file mode 100644
index 7b21e6a..0000000
--- a/kstars/kstarslite/kirigami-lib/metainfo.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-maintainer: mart
-description: QtQuick plugins to build user interfaces based on the KDE UX guidelines
-tier: 2
-type: functional
-platforms:
- - name: All
-portingAid: false
-deprecated: false
-release: false
-libraries:
- - cmake: KF5::Kirigami
-cmakename: KF5Kirigami
diff --git a/kstars/kstarslite/kirigami-lib/src/CMakeLists.txt b/kstars/kstarslite/kirigami-lib/src/CMakeLists.txt
deleted file mode 100644
index e177f84..0000000
--- a/kstars/kstarslite/kirigami-lib/src/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-project(kirigami)
-
-set(kirigami_SRCS
- kirigamiplugin.cpp
- )
-
-IF(STATIC_LIBRARY)
-
-
-qt5_add_resources(kirigami_SRCS ${CMAKE_SOURCE_DIR}/kirigami.qrc)
-add_library(kirigamiplugin STATIC ${kirigami_SRCS} ${RESOURCES})
-target_link_libraries(kirigamiplugin Qt5::Core Qt5::Qml Qt5::Quick)
-
-ELSE(STATIC_LIBRARY)
-
-add_library(kirigamiplugin SHARED ${kirigami_SRCS})
-target_link_libraries(kirigamiplugin Qt5::Core Qt5::Qml Qt5::Quick)
-
-install(TARGETS kirigamiplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami)
-
-install(DIRECTORY controls/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami)
-
-if (PLASMA_ENABLED)
- install(DIRECTORY styles/Plasma DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami/styles)
-endif()
-if (DESKTOP_ENABLED)
- install(DIRECTORY styles/Desktop DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami/styles)
-endif()
-
-install(FILES ${platformspecific} DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami)
-
-include(ECMGeneratePriFile)
-ecm_generate_pri_file(BASE_NAME Kirigami LIB_NAME KF5Kirigami DEPS "core qml quick svg" FILENAME_VAR PRI_FILENAME )
-install(FILES ${PRI_FILENAME}
- DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
-
-ENDIF(STATIC_LIBRARY)
diff --git a/kstars/kstarslite/kirigami-lib/src/Messages.sh b/kstars/kstarslite/kirigami-lib/src/Messages.sh
deleted file mode 100644
index 075e296..0000000
--- a/kstars/kstarslite/kirigami-lib/src/Messages.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /usr/bin/env bash
-$XGETTEXT `find . -name \*.qml` -L Java -o $podir/libkirigamiplugin.pot
-rm -f rc.cpp
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/AbstractApplicationHeader.qml b/kstars/kstarslite/kirigami-lib/src/controls/AbstractApplicationHeader.qml
deleted file mode 100644
index 6d26857..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/AbstractApplicationHeader.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.5
-import org.kde.kirigami 1.0
-
-import "private"
-import "templates" as T
-
-
-/**
- * An item that can be used as a title for the application.
- * Scrolling the main page will make it taller or shorter (trough the point of going away)
- * It's a behavior similar to the typical mobile web browser adressbar
- * the minimum, preferred and maximum heights of the item can be controlled with
- * * minimumHeight: default is 0, i.e. hidden
- * * preferredHeight: default is Units.gridUnit * 1.6
- * * maximumHeight: default is Units.gridUnit * 3
- *
- * To achieve a titlebar that stays completely fixed just set the 3 sizes as the same
- */
-T.AbstractApplicationHeader {
- id: root
-
- background: Rectangle {
- color: Theme.highlightColor
- EdgeShadow {
- id: shadow
- edge: Qt.TopEdge
- anchors {
- right: parent.right
- left: parent.left
- top: parent.bottom
- }
- }
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/AbstractApplicationWindow.qml b/kstars/kstarslite/kirigami-lib/src/controls/AbstractApplicationWindow.qml
deleted file mode 100644
index 5396b88..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/AbstractApplicationWindow.qml
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.5
-import QtQuick.Controls 1.3 as Controls
-import "templates/private"
-import org.kde.kirigami 1.0
-import QtGraphicalEffects 1.0
-
-/**
- * A window that provides some basic features needed for all apps
- * Use this class only if you need a custom content for your application,
- * different from the Page Row behavior recomended by the HIG and provided
- * by ApplicationWindow.
- * It is recomended to use ApplicationWindow instead
- * @see ApplicationWindow
- *
- * It's usually used as a root QML component for the application.
- * It provides support for a central page stack, side drawers and
- * a top ApplicationHeader, as well as basic support for the
- * Android back button
- *
- * Example usage:
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- *
- * Kirigami.ApplicationWindow {
- * [...]
- * globalDrawer: Kirigami.GlobalDrawer {
- * actions: [
- * Kirigami.Action {
- * text: "View"
- * iconName: "view-list-icons"
- * Kirigami.Action {
- * text: "action 1"
- * }
- * Kirigami.Action {
- * text: "action 2"
- * }
- * Kirigami.Action {
- * text: "action 3"
- * }
- * },
- * Kirigami.Action {
- * text: "Sync"
- * iconName: "folder-sync"
- * }
- * ]
- * }
- *
- * contextDrawer: Kirigami.ContextDrawer {
- * id: contextDrawer
- * }
- *
- * pageStack: PageStack {
- * ...
- * }
- * [...]
- * }
- * @endcode
- *
- * @inherit QtQuick.Controls.ApplicationWindow
- */
-Controls.ApplicationWindow {
- id: root
-
- /**
- * pageStack: StackView
- * Readonly.
- * The stack used to allocate the pages and to manage the transitions
- * between them.
- * Put a container here, such as QQuickControls PageStack
- */
- property Item pageStack
-
- /**
- * Shows a little passive notification at the bottom of the app window
- * lasting for few seconds, with an optional action button.
- *
- * @param message The text message to be shown to the user.
- * @param timeout How long to show the message:
- * possible values: "short", "long" or the number of milliseconds
- * @param actionText Text in the action button, if any.
- * @param callBack A JavaScript function that will be executed when the
- * user clicks the button.
- */
- function showPassiveNotification(message, timeout, actionText, callBack) {
- if (!internal.__passiveNotification) {
- var component = Qt.createComponent("templates/private/PassiveNotification.qml");
- internal.__passiveNotification = component.createObject(contentItem.parent);
- }
-
- internal.__passiveNotification.showNotification(message, timeout, actionText, callBack);
- }
-
- /**
- * Hide the passive notification, if any is shown
- */
- function hidePassiveNotification() {
- if(internal.__passiveNotification) {
- internal.__passiveNotification.hideNotification();
- }
- }
-
-
- /**
- * @returns a pointer to this application window
- * can be used anywhere in the application.
- */
- function applicationWindow() {
- return root;
- }
-
- /**
- * header: ApplicationHeader
- * An item that can be used as a title for the application.
- * Scrolling the main page will make it taller or shorter (trough the point of going away)
- * It's a behavior similar to the typical mobile web browser adressbar
- * the minimum, preferred and maximum heights of the item can be controlled with
- * * Layout.minimumHeight: default is 0, i.e. hidden
- * * Layout.preferredHeight: default is Units.gridUnit * 1.6
- * * Layout.maximumHeight: default is Units.gridUnit * 3
- *
- * To achieve a titlebar that stays completely fixed just set the 3 sizes as the same
- * //FIXME: this should become an actual ApplicationHeader
- */
- property var header: undefined
-
- /**
- * controlsVisible: bool
- * This property controls wether the standard chrome of the app, such
- * as the Action button, the drawer handles and the application
- * header should be visible or not.
- */
- property bool controlsVisible: true
-
- /**
- * globalDrawer: AbstractDrawer
- * The drawer for global actions, that will be opened by sliding from the
- * left screen edge or by dragging the ActionButton to the right.
- * It is recommended to use the GlobalDrawer class here
- */
- property AbstractDrawer globalDrawer
-
- /**
- * wideScreen: bool
- * If true the application is considered to be in "widescreen" mode, such as on desktops or horizontal tablets.
- * Different styles can have an own logic for deciding this
- */
- property bool wideScreen: width >= Units.gridUnit * 60
-
- /**
- * contextDrawer: AbstractDrawer
- * The drawer for context-dependednt actions, that will be opened by sliding from the
- * right screen edge or by dragging the ActionButton to the left.
- * It is recommended to use the ContextDrawer class here.
- * The contents of the context drawer should depend from what page is
- * loaded in the main pageStack
- *
- * Example usage:
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- *
- * Kirigami.ApplicationWindow {
- * [...]
- * contextDrawer: Kirigami.ContextDrawer {
- * id: contextDrawer
- * }
- * [...]
- * }
- * @endcode
- *
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- *
- * Kirigami.Page {
- * [...]
- * contextualActions: [
- * Kirigami.Action {
- * iconName: "edit"
- * text: "Action text"
- * onTriggered: {
- * // do stuff
- * }
- * },
- * Kirigami.Action {
- * iconName: "edit"
- * text: "Action text"
- * onTriggered: {
- * // do stuff
- * }
- * }
- * ]
- * [...]
- * }
- * @endcode
- *
- * When this page will be the current one, the context drawer will visualize
- * contextualActions defined as property in that page.
- */
- property AbstractDrawer contextDrawer
-
- /**
- * reachableMode: bool
- * When true the application is in reachable mode for single hand use.
- * the whole content of the application is moved down the screen to be
- * reachable with the thumb. if wideScreen is true, tis property has
- * no effect.
- */
- property bool reachableMode: false
-
- MouseArea {
- parent: contentItem.parent
- z: -1
- anchors.fill: parent
- onClicked: root.reachableMode = false;
- Rectangle {
- anchors.fill: parent
- color: Qt.rgba(0, 0, 0, 0.3)
- opacity: 0.15
- }
- }
-
- contentItem.anchors.topMargin: root.wideScreen && header && controlsVisible ? header.height : 0
- contentItem.anchors.leftMargin: root.globalDrawer && (root.globalDrawer.modal === false) ? root.globalDrawer.contentItem.width * root.globalDrawer.position : 0
- contentItem.anchors.rightMargin: root.contextDrawer && root.contextDrawer.modal === false ? root.contextDrawer.contentItem.width * root.contextDrawer.position : 0
- contentItem.transform: Translate {
- Behavior on y {
- NumberAnimation {
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
- }
- y: root.reachableMode && !root.wideScreen ? root.height/2 : 0
- x: root.globalDrawer && root.globalDrawer.modal === true && root.globalDrawer.toString().indexOf("SplitDrawer") === 0 ? root.globalDrawer.contentItem.width * root.globalDrawer.position : 0
- }
- //Don't want overscroll in landscape mode
- onWidthChanged: {
- if (width > height) {
- root.reachableMode = false;
- }
- }
-
- Binding {
- when: globalDrawer !== undefined
- target: globalDrawer
- property: "parent"
- value: contentItem.parent
- }
- Binding {
- when: contextDrawer !== undefined
- target: contextDrawer
- property: "parent"
- value: contentItem.parent
- }
- onPageStackChanged: pageStack.parent = contentItem;
-
- width: Units.gridUnit * 30
- height: Units.gridUnit * 45
- visible: true
-
-
- QtObject {
- id: internal
- property Item __passiveNotification
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/AbstractListItem.qml b/kstars/kstarslite/kirigami-lib/src/controls/AbstractListItem.qml
deleted file mode 100644
index 8f907d1..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/AbstractListItem.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <notmart@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
- */
-
-import QtQuick 2.1
-import "private"
-import "templates" as T
-
-/**
- * An item delegate for the primitive ListView component.
- *
- * It's intended to make all listviews look coherent.
- *
- * @inherit QtQuick.Item
- */
-T.AbstractListItem {
- id: listItem
-
- background: DefaultListItemBackground {}
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/Action.qml b/kstars/kstarslite/kirigami-lib/src/controls/Action.qml
deleted file mode 100644
index fc89932..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/Action.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Controls 1.3 as Controls
-
-/**
- * An item that represents an abstract Action
- *
- * @inherit Controls.Action
- */
-Controls.Action {
- id: root
-
- /**
- * visible: bool
- * True (default) when the graphic representation of the action
- * is supposed to be visible.
- * It's up to the action representation to honor this property.
- */
- property bool visible: true
-
- /**
- * children: list<Action>
- * A list of children actions.
- * Useful for tree-like menus
- * @code
- * Action {
- * text: "Tools"
- * Action {
- * text: "Action1"
- * }
- * Action {
- * text: "Action2"
- * }
- * }
- * @endcode
- */
- default property alias children: root.__children
- property list<QtObject> __children
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/ApplicationHeader.qml b/kstars/kstarslite/kirigami-lib/src/controls/ApplicationHeader.qml
deleted file mode 100644
index a46085c..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/ApplicationHeader.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.5
-import "templates" as T
-
-
-/**
- * An item that can be used as a title for the application.
- * Scrolling the main page will make it taller or shorter (trough the point of going away)
- * It's a behavior similar to the typical mobile web browser adressbar
- * the minimum, preferred and maximum heights of the item can be controlled with
- * * minimumHeight: default is 0, i.e. hidden
- * * preferredHeight: default is Units.gridUnit * 1.6
- * * maximumHeight: default is Units.gridUnit * 3
- *
- * To achieve a titlebar that stays completely fixed just set the 3 sizes as the same
- */
-T.ApplicationHeader {
- id: header
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/ApplicationWindow.qml b/kstars/kstarslite/kirigami-lib/src/controls/ApplicationWindow.qml
deleted file mode 100644
index 5060214..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/ApplicationWindow.qml
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.5
-import QtQuick.Controls.Private 1.0
-import "templates/private"
-import org.kde.kirigami 1.0 as Kirigami
-import QtGraphicalEffects 1.0
-
-/**
- * A window that provides some basic features needed for all apps
- *
- * It's usually used as a root QML component for the application.
- * It's based around the PageRow component, the application will be
- * about pages adding and removal.
- * For most of the usages, this class should be used instead
- * of AbstractApplicationWidnow
- * @see AbstractApplicationWidnow
- *
- * Example usage:
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- *
- * Kirigami.ApplicationWindow {
- * [...]
- * globalDrawer: Kirigami.GlobalDrawer {
- * actions: [
- * Kirigami.Action {
- * text: "View"
- * iconName: "view-list-icons"
- * Kirigami.Action {
- * text: "action 1"
- * }
- * Kirigami.Action {
- * text: "action 2"
- * }
- * Kirigami.Action {
- * text: "action 3"
- * }
- * },
- * Kirigami.Action {
- * text: "Sync"
- * iconName: "folder-sync"
- * }
- * ]
- * }
- *
- * contextDrawer: Kirigami.ContextDrawer {
- * id: contextDrawer
- * }
- *
- * pageStack.initialPage: Kirigami.Page {
- * mainAction: Kirigami.Action {
- * iconName: "edit"
- * onTriggered: {
- * // do stuff
- * }
- * }
- * contextualActions: [
- * Kirigami.Action {
- * iconName: "edit"
- * text: "Action text"
- * onTriggered: {
- * // do stuff
- * }
- * },
- * Kirigami.Action {
- * iconName: "edit"
- * text: "Action text"
- * onTriggered: {
- * // do stuff
- * }
- * }
- * ]
- * [...]
- * }
- * [...]
- * }
- * @endcode
- *
-*/
-AbstractApplicationWindow {
- id: root
-
- /**
- * pageStack: StackView
- * Readonly.
- * The stack used to allocate the pages and to manage the transitions
- * between them.
- * It's using a PageRow, while having the same API as PageStack,
- * it positions the pages as adjacent columns, with as many columns
- * as can fit in the screen. An handheld device would usually have a single
- * fullscreen column, a tablet device would have many tiled columns.
- */
- property alias pageStack: __pageStack
-
- //redefines here as here we can know a pointer to PageRow
- wideScreen: width >= applicationWindow().pageStack.defaultColumnWidth*2
-
- PageRow {
- id: __pageStack
- anchors {
- fill: parent
- //HACK: workaround a bug in android iOS keyboard management
- bottomMargin: ((Qt.platform.os == "android" || Qt.platform.os == "ios") || !Qt.inputMethod.visible) ? 0 : Qt.inputMethod.keyboardRectangle.height
- onBottomMarginChanged: {
- if (bottomMargin > 0) {
- root.reachableMode = false;
- }
- }
- }
- //FIXME
- onCurrentIndexChanged: root.reachableMode = false;
-
- function goBack() {
- if (root.contextDrawer && root.contextDrawer.opened && root.contextDrawer.modal) {
- root.contextDrawer.close();
- } else if (root.globalDrawer && root.globalDrawer.opened && root.globalDrawer.modal) {
- root.globalDrawer.close();
- } else {
- var backEvent = {accepted: false}
- if (root.pageStack.currentIndex >= 1) {
- root.pageStack.currentItem.backRequested(backEvent);
- if (!backEvent.accepted) {
- if (root.pageStack.depth > 1) {
- root.pageStack.currentIndex = Math.max(0, root.pageStack.currentIndex - 1);
- backEvent.accepted = true;
- }
- }
- }
-
- if (Settings.isMobile && !backEvent.accepted) {
- Qt.quit();
- }
- }
- }
- Keys.onReleased: {
- if (event.key == Qt.Key_Back ||
- (event.key === Qt.Key_Left && (event.modifiers & Qt.AltModifier))) {
- event.accepted = true;
- goBack();
- }
- }
-
- Rectangle {
- z: -1
- anchors.fill: parent
- color: Kirigami.Theme.backgroundColor
- }
- focus: true
- }
-
- Component.onCompleted: {
- if (root.header === undefined) {
- var component = Qt.createComponent(Qt.resolvedUrl("./ApplicationHeader.qml"));
- root.header = component.createObject(root.contentItem.parent);
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/BasicListItem.qml b/kstars/kstarslite/kirigami-lib/src/controls/BasicListItem.qml
deleted file mode 100644
index 9ed39cc..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/BasicListItem.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2010 Marco Martin <notmart@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-/**
- * An item delegate for the primitive ListView component.
- *
- * It's intended to make all listviews look coherent.
- * It has a default icon and a label
- *
- * @inherit AbstractListItem
- */
-AbstractListItem {
- id: listItem
-
- /**
- * string: bool
- * A single text label the list item will contain
- */
- property string label
-
- /**
- * icon: var
- * A single icon that will be displayed in the list item. The icon can
- * be either a QIcon, a string name of a fdo compatible name,
- * or any url accepted by the Image element.
- */
- property var icon
-
- RowLayout {
- anchors {
- left: parent.left
- verticalCenter: parent.verticalCenter
- }
- Icon {
- Layout.minimumHeight: Units.iconSizes.smallMedium
- Layout.maximumHeight: Layout.minimumHeight
- Layout.minimumWidth: height
- source: listItem.icon
- selected: listItem.checked || listItem.pressed
- }
- Label {
- text: listItem.label
- color: listItem.checked || listItem.pressed ? Theme.highlightedTextColor : Theme.viewTextColor
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/ContextDrawer.qml b/kstars/kstarslite/kirigami-lib/src/controls/ContextDrawer.qml
deleted file mode 100644
index 31d1496..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/ContextDrawer.qml
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Layouts 1.2
-import QtQuick.Controls 1.0 as QtControls
-import org.kde.kirigami 1.0
-
-/**
- * A drawer specialization that will show a list of actions that are
- * specific of the current page shown by the application
- *
- * Example usage:
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- *
- * Kirigami.ApplicationWindow {
- * [...]
- * contextDrawer: Kirigami.ContextDrawer {
- * id: contextDrawer
- * }
- * [...]
- * }
- * @endcode
- *
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- *
- * Kirigami.Page {
- * [...]
- * contextualActions: [
- * Kirigami.Action {
- * iconName: "edit"
- * text: "Action text"
- * onTriggered: {
- * // do stuff
- * }
- * },
- * Kirigami.Action {
- * iconName: "edit"
- * text: "Action text"
- * onTriggered: {
- * // do stuff
- * }
- * }
- * ]
- * [...]
- * }
- * @endcode
- *
- * @inherit AbstractDrawer
- */
-OverlayDrawer {
- id: root
-
- /**
- * title: string
- * A title for the action list that will be shown to the user when opens the drawer
- */
- property string title: typeof i18n !== "undefined" ? i18n("Actions") : "Actions"
-
- /**
- * actions: list<Action>
- * This can be any type of object that a ListView can accept as model.
- * It expects items compatible with either QAction or Kirigami Action
- */
- property var actions: pageStack.currentItem ? pageStack.currentItem.contextualActions : null
- enabled: menu.count > 0
- edge: Qt.RightEdge
-
- handleVisible: applicationWindow == undefined || applicationWindow().wideScreen == true ? false : applicationWindow().controlsVisible
-
- Connections {
- target: pageStack
- onCurrentItemChanged: {
- actions = pageStack.currentItem.contextualActions
- }
- }
-
- contentItem: QtControls.ScrollView {
- implicitWidth: Units.gridUnit * 20
- ListView {
- id: menu
- interactive: contentHeight > height
- model: {
- if (typeof root.actions == "undefined") {
- return null;
- }
- if (root.actions.length == 0) {
- return null;
- } else {
- return root.actions[0].text !== undefined &&
- root.actions[0].trigger !== undefined ?
- root.actions :
- root.actions[0];
- }
- }
- topMargin: menu.height - menu.contentHeight
- header: Item {
- height: heading.height
- width: menu.width
- Heading {
- id: heading
- anchors {
- left: parent.left
- right: parent.right
- margins: Units.largeSpacing
- }
- elide: Text.ElideRight
- level: 2
- text: root.title
- }
- }
- delegate: BasicListItem {
- checked: modelData.checked
- icon: modelData.iconName
- supportsMouseEvents: true
- separatorVisible: index < menu.count-1
- label: model ? model.text : modelData.text
- enabled: model ? model.enabled : modelData.enabled
- visible: model ? model.visible : modelData.visible
- opacity: enabled ? 1.0 : 0.6
- onClicked: {
- if (modelData && modelData.trigger !== undefined) {
- modelData.trigger();
- // assume the model is a list of QAction or Action
- } else if (menu.model.length > index) {
- menu.model[index].trigger();
- } else {
- console.warning("Don't know how to trigger the action")
- }
- root.opened = false;
- }
- }
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/GlobalDrawer.qml b/kstars/kstarslite/kirigami-lib/src/controls/GlobalDrawer.qml
deleted file mode 100644
index 3e9b234..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/GlobalDrawer.qml
+++ /dev/null
@@ -1,373 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Controls 1.4 as Controls
-import QtQuick.Layouts 1.2
-import QtGraphicalEffects 1.0
-import org.kde.kirigami 1.0
-
-import "private"
-
-/**
- * A drawer specialization intended for the global actions of the application
- * valid regardless of the application state (think about the menubar
- * of a desktop application).
- *
- * Example usage:
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- *
- * Kirigami.ApplicationWindow {
- * [...]
- * globalDrawer: Kirigami.GlobalDrawer {
- * actions: [
- * Kirigami.Action {
- * text: "View"
- * iconName: "view-list-icons"
- * Kirigami.Action {
- * text: "action 1"
- * }
- * Kirigami.Action {
- * text: "action 2"
- * }
- * Kirigami.Action {
- * text: "action 3"
- * }
- * },
- * Kirigami.Action {
- * text: "Sync"
- * iconName: "folder-sync"
- * }
- * ]
- * }
- * [...]
- * }
- * @endcode
- *
- * @inherit AbstractDrawer
- */
-OverlayDrawer {
- id: root
- edge: Qt.LeftEdge
-
- /**
- * title: string
- * A title to be displayed on top of the drawer
- */
- property alias title: heading.text
-
- /**
- * icon: var
- * An icon to be displayed alongside the title.
- * It can be a QIcon, a fdo-compatible icon name, or any url understood by Image
- */
- property alias titleIcon: headingIcon.source
-
- /**
- * bannerImageSource: string
- * An image to be used as background for the title and icon for
- * a decorative purpose.
- * It accepts any url format supported by Image
- */
- property alias bannerImageSource: bannerImage.source
-
- /**
- * actions: list<Action>
- * The list of actions can be nested having a tree structure.
- * A tree depth bigger than 2 is discouraged.
- *
- * Example usage:
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- *
- * Kirigami.ApplicationWindow {
- * [...]
- * globalDrawer: Kirigami.GlobalDrawer {
- * actions: [
- * Kirigami.Action {
- * text: "View"
- * iconName: "view-list-icons"
- * Kirigami.Action {
- * text: "action 1"
- * }
- * Kirigami.Action {
- * text: "action 2"
- * }
- * Kirigami.Action {
- * text: "action 3"
- * }
- * },
- * Kirigami.Action {
- * text: "Sync"
- * iconName: "folder-sync"
- * }
- * ]
- * }
- * [...]
- * }
- * @endcode
- */
- property list<QtObject> actions
-
-
- /**
- * content: list<Item> default property
- * Any random Item can be instantiated inside the drawer and
- * will be displayed underneath the actions list.
- *
- * Example usage:
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- *
- * Kirigami.ApplicationWindow {
- * [...]
- * globalDrawer: Kirigami.GlobalDrawer {
- * actions: [...]
- * Button {
- * text: "Button"
- * onClicked: //do stuff
- * }
- * }
- * [...]
- * }
- * @endcode
- */
- default property alias content: mainContent.data
-
- /**
- * content: list<Item> default property
- * Items that will be instantiated inside the drawer and
- * will be displayed on top of the actions list.
- *
- * Example usage:
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- *
- * Kirigami.ApplicationWindow {
- * [...]
- * globalDrawer: Kirigami.GlobalDrawer {
- * actions: [...]
- * topContent: [Button {
- * text: "Button"
- * onClicked: //do stuff
- * }]
- * }
- * [...]
- * }
- * @endcode
- */
- property alias topContent: topContent.data
-
- contentItem: Controls.ScrollView {
- id: scrollView
- anchors.fill: parent
- implicitWidth: Math.min (Math.max(Units.gridUnit * 12, title.width), root.parent.width * 0.8)
- horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
- Flickable {
- id: mainFlickable
- contentWidth: width
- contentHeight: mainColumn.Layout.minimumHeight
- ColumnLayout {
- id: mainColumn
- width: mainFlickable.width
- spacing: 0
- height: Math.max(root.height, Layout.minimumHeight)
-
- Image {
- id: bannerImage
- Layout.fillWidth: true
-
- Layout.preferredWidth: title.implicitWidth
- Layout.preferredHeight: bannerImageSource != "" ? Math.max(title.implicitHeight, Math.floor(width / (sourceSize.width/sourceSize.height))) : title.implicitHeight
- Layout.minimumHeight: Math.max(headingIcon.height, heading.height) + Units.smallSpacing * 2
-
- fillMode: Image.PreserveAspectCrop
- asynchronous: true
-
- anchors {
- left: parent.left
- right: parent.right
- top: parent.top
- }
-
- EdgeShadow {
- edge: Qt.BottomEdge
- visible: bannerImageSource != ""
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.top
- }
- }
- LinearGradient {
- anchors {
- left: parent.left
- right: parent.right
- top: parent.top
- }
- visible: bannerImageSource != ""
- height: title.height * 1.3
- start: Qt.point(0, 0)
- end: Qt.point(0, height)
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: Qt.rgba(0, 0, 0, 0.8)
- }
- GradientStop {
- position: 1.0
- color: "transparent"
- }
- }
- }
-
- RowLayout {
- id: title
- anchors {
- left: parent.left
- top: parent.top
- margins: Units.smallSpacing * 2
- }
- Icon {
- id: headingIcon
- Layout.minimumWidth: Units.iconSizes.large
- Layout.minimumHeight: width
- }
- Heading {
- id: heading
- level: 1
- color: bannerImageSource != "" ? "white" : Theme.textColor
- }
- Item {
- height: 1
- Layout.minimumWidth: heading.height
- }
- }
- }
-
- ColumnLayout {
- id: topContent
- spacing: 0
- Layout.alignment: Qt.AlignHCenter
- Layout.minimumWidth: parent.width - Units.smallSpacing*2
- Layout.maximumWidth: Layout.minimumWidth
- Layout.preferredHeight: Layout.minimumHeight + Units.smallSpacing*2
- Layout.fillWidth: false
- Layout.fillHeight: true
- visible: children.length > 0 && childrenRect.height > 0
- }
-
- Rectangle {
- color: Theme.textColor
- opacity: 0.2
- Layout.fillWidth: true
- Layout.minimumHeight: Math.floor(Units.devicePixelRatio)
- visible: actions.length > 0
- }
-
- Controls.StackView {
- id: stackView
- Layout.fillWidth: true
- Layout.minimumHeight: currentItem ? currentItem.implicitHeight : 0
- Layout.maximumHeight: Layout.minimumHeight
- initialItem: menuComponent
- }
- Item {
- Layout.fillWidth: true
- Layout.fillHeight: true
- Layout.minimumHeight: Units.smallSpacing
- }
-
- ColumnLayout {
- id: mainContent
- Layout.alignment: Qt.AlignHCenter
- Layout.minimumWidth: parent.width - Units.smallSpacing*2
- Layout.maximumWidth: Layout.minimumWidth
- Layout.fillWidth: false
- Layout.fillHeight: true
- visible: children.length > 0
- }
- Item {
- Layout.minimumWidth: Units.smallSpacing
- Layout.minimumHeight: Units.smallSpacing
- }
-
- Component {
- id: menuComponent
- ColumnLayout {
- id: optionMenu
- spacing: 0
- property alias model: actionsRepeater.model
-
- property int level: 0
- Layout.maximumHeight: Layout.minimumHeight
-
-
- Repeater {
- id: actionsRepeater
- model: actions
- delegate: BasicListItem {
- id: listItem
- supportsMouseEvents: true
- checked: modelData.checked
- icon: modelData.iconName
- label: modelData.text
- visible: model ? model.visible || model.visible===undefined : modelData.visible
- enabled: model ? model.enabled : modelData.enabled
- opacity: enabled ? 1.0 : 0.3
- Icon {
- anchors {
- verticalCenter: parent.verticalCenter
- right: parent.right
- }
- height: Units.iconSizes.smallMedium
- selected: listItem.checked || listItem.pressed
- width: height
- source: "go-next"
- visible: modelData.children!==undefined && modelData.children.length > 0
- }
-
- onClicked: {
- if (modelData.children!==undefined && modelData.children.length > 0) {
- stackView.push(menuComponent, {"model": modelData.children, "level": level + 1});
- } else {
- modelData.trigger();
- stackView.pop(stackView.initialItem);
- if (root.modal) {
- root.opened = false;
- }
- }
- }
- }
- }
- BasicListItem {
- visible: level > 0
- supportsMouseEvents: true
- icon: "go-previous"
- label: typeof i18n !== "undefined" ? i18n("Back") : "Back"
- onClicked: stackView.pop()
- }
- }
- }
- }
- }
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/Heading.qml b/kstars/kstarslite/kirigami-lib/src/controls/Heading.qml
deleted file mode 100644
index be51fe0..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/Heading.qml
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-* Copyright 2012 by Sebastian Kügler <sebas@kde.org>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU Library General Public License as
-* published by the Free Software Foundation; either version 2, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Library General Public License for more details
-*
-* You should have received a copy of the GNU Library General Public
-* License along with this program; if not, write to the
-* Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
-*/
-
-import QtQuick 2.0
-import org.kde.kirigami 1.0
-
-/**
- * A heading label used for subsections of texts.
- *
- * The characteristics of the text will be automatically set according to the
- * plasma Theme. Use this components for section titles or headings in your UI,
- * for example page or section titles.
- *
- * Example usage:
- *
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- * [...]
- * Column {
- * Kirigami.Heading {
- * text: "Apples in the sunlight"
- * level: 2
- * }
- * [...]
- * }
- * @endcode
- *
- * The most important property is "text", which applies to the text property of
- * Label. See PlasmaComponents Label and primitive QML Text element API for
- * additional properties, methods and signals.
- */
-Label {
- id: heading
-
- /**
- * level: int
- * The level determines how big the section header is display, values
- * between 1 (big) and 5 (small) are accepted
- */
- property int level: 1
-
- /**
- * step: int
- * adjust the point size in between a level and another.
- */
- property int step: 2
-
- height: Math.round(paintedHeight * 1.2)
- font.pointSize: headerPointSize(level)
- font.weight: Font.Light
- wrapMode: Text.WordWrap
- opacity: 0.8
-
- function headerPointSize(l) {
- var n = Theme.defaultFont.pointSize;
- var s;
- if (l > 4) {
- s = n
- } else if (l < 2) {
- s = n + (5*step)
- } else {
- s = n + ((5-level)*2)
- }
- return s;
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/Icon.qml b/kstars/kstarslite/kirigami-lib/src/controls/Icon.qml
deleted file mode 100644
index bb2634c..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/Icon.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-import org.kde.kirigami 1.0
-
-Item {
- id: root
- property string source
- property alias smooth: image.smooth
- property bool active: false
- property bool valid: image.status == Image.Ready
- property bool selected: false
-
- implicitWidth: image.source != "" ? Units.iconSizes.smallMedium : 0
- implicitHeight: image.source != "" ? Units.iconSizes.smallMedium : 0
-
- Image {
- id: image
- anchors.fill: parent
- source: root.source != "" ? (root.source.indexOf(".") === -1 ? "./icons/" + root.source + ".svg" : root.source) : root.source
- sourceSize.width: root.width
- sourceSize.height: root.height
- }
- ColorOverlay {
-
- anchors.fill: parent
- source: image
- color: Theme.highlightedTextColor
- cached: true
- visible: root.selected && root.valid
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/Label.qml b/kstars/kstarslite/kirigami-lib/src/controls/Label.qml
deleted file mode 100644
index d0a3974..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/Label.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-* Copyright (C) 2011 by Marco Martin <mart@kde.org>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU Library General Public License as
-* published by the Free Software Foundation; either version 2, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Library General Public License for more details
-*
-* You should have received a copy of the GNU Library General Public
-* License along with this program; if not, write to the
-* Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
-*/
-
-import QtQuick 2.1
-import org.kde.kirigami 1.0
-
-/**
- * This is a label which uses the plasma Theme.
- *
- * The characteristics of the text will be automatically set according to the
- * plasma Theme. If you need a more customized text item use the Text component
- * from QtQuick.
- *
- * You can use all elements of the QML Text component, in particular the "text"
- * property to define the label text.
- *
- * @inherit QtQuick.Text
- */
-Text {
- id: root
-
- height: Math.round(Math.max(paintedHeight, Units.gridUnit * 1.6))
- verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter
-
- activeFocusOnTab: false
- renderType: Text.NativeRendering
-
- font.capitalization: Theme.defaultFont.capitalization
- font.family: Theme.defaultFont.family
- font.italic: Theme.defaultFont.italic
- font.letterSpacing: Theme.defaultFont.letterSpacing
- font.pointSize: Theme.defaultFont.pointSize
- font.strikeout: Theme.defaultFont.strikeout
- font.underline: Theme.defaultFont.underline
- font.weight: Theme.defaultFont.weight
- font.wordSpacing: Theme.defaultFont.wordSpacing
- color: Theme.textColor
-
- opacity: enabled? 1 : 0.6
-
- Accessible.role: Accessible.StaticText
- Accessible.name: text
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/OverlayDrawer.qml b/kstars/kstarslite/kirigami-lib/src/controls/OverlayDrawer.qml
deleted file mode 100644
index 1b7376e..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/OverlayDrawer.qml
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtGraphicalEffects 1.0
-import org.kde.kirigami 1.0
-
-import "private"
-import "templates" as T
-
-/**
- * Overlay Drawers are used to expose additional UI elements needed for
- * small secondary tasks for which the main UI elements are not needed.
- * For example in Okular Active, an Overlay Drawer is used to display
- * thumbnails of all pages within a document along with a search field.
- * This is used for the distinct task of navigating to another page.
- *
- */
-T.OverlayDrawer {
- id: root
-
-//BEGIN Properties
- background: Rectangle {
- color: Theme.viewBackgroundColor
-
- Item {
- id: drawerHandle
- z: -1
-
- anchors {
- right: root.edge == Qt.LeftEdge ? undefined : parent.left
- left: root.edge == Qt.RightEdge ? undefined : parent.right
- bottom: parent.bottom
- }
- visible: root.enabled && (root.edge == Qt.LeftEdge || root.edge == Qt.RightEdge)
- width: Units.iconSizes.medium + Units.smallSpacing * 2
- height: width
- opacity: root.handleVisible ? 1 : 0
- Behavior on opacity {
- NumberAnimation {
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
- }
- transform: Translate {
- id: translateTransform
- x: root.handleVisible ? 0 : (root.edge == Qt.LeftEdge ? -drawerHandle.width : drawerHandle.width)
- Behavior on x {
- NumberAnimation {
- duration: Units.longDuration
- easing.type: !root.handleVisible ? Easing.OutQuad : Easing.InQuad
- }
- }
- }
- Item {
- opacity: 0.3 + root.position
- anchors {
- fill:parent
- margins: -Units.gridUnit
- }
- layer.enabled: true
- Rectangle {
- id: shadowRect
- anchors.fill: handleGraphics
- color: "black"
- }
- FastBlur {
- z: -1
- anchors.fill: shadowRect
- source: shadowRect
- radius: Units.gridUnit
- transparentBorder: true
- }
- Rectangle {
- id: handleGraphics
- color: Theme.viewBackgroundColor
- anchors {
- fill:parent
- margins: Units.gridUnit
- }
- }
- }
-
- Loader {
- anchors.centerIn: parent
- width: height
- height: Units.iconSizes.smallMedium
- source: root.edge == Qt.LeftEdge ? Qt.resolvedUrl("templates/private/MenuIcon.qml") : (root.edge == Qt.RightEdge ? Qt.resolvedUrl("templates/private/ContextIcon.qml") : "")
- onItemChanged: {
- if(item) {
- item.morph = Qt.binding(function(){return root.position})
- }
- }
- }
- }
-
- EdgeShadow {
- z: -2
- edge: root.edge
- anchors {
- right: root.edge == Qt.RightEdge ? parent.left : (root.edge == Qt.LeftEdge ? undefined : parent.right)
- left: root.edge == Qt.LeftEdge ? parent.right : (root.edge == Qt.RightEdge ? undefined : parent.left)
- top: root.edge == Qt.TopEdge ? parent.bottom : (root.edge == Qt.BottomEdge ? undefined : parent.top)
- bottom: root.edge == Qt.BottomEdge ? parent.top : (root.edge == Qt.TopEdge ? undefined : parent.bottom)
- }
-
- opacity: root.position == 0 ? 0 : 1
-
- Behavior on opacity {
- NumberAnimation {
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
- }
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/OverlaySheet.qml b/kstars/kstarslite/kirigami-lib/src/controls/OverlaySheet.qml
deleted file mode 100644
index 8faab2e..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/OverlaySheet.qml
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-* Copyright (C) 2016 by Marco Martin <mart@kde.org>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU Library General Public License as
-* published by the Free Software Foundation; either version 2, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Library General Public License for more details
-*
-* You should have received a copy of the GNU Library General Public
-* License along with this program; if not, write to the
-* Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
-*/
-
-import QtQuick 2.5
-import org.kde.kirigami 1.0
-import "private"
-import "templates" as T
-
-/**
- * An overlay sheet that covers the current Page content.
- * Its contents can be scrolled up or down, scrolling all the way up or
- * all the way down, dismisses it.
- * Use this for big, modal dialogs or information display, that can't be
- * logically done as a new separate Page, even if potentially
- * are taller than the screen space.
- */
-T.OverlaySheet {
- id: root
-
- background: Item {
- anchors.fill: parent
- //Why not a shadow or rectangularglow?
- //on some android devices they break badly when the OverlaySheet is bigger than
- //the screen
- CornerShadow {
- corner: Qt.BottomRightCorner
- anchors {
- right: parent.left
- bottom: parent.top
- }
- }
- CornerShadow {
- corner: Qt.BottomLeftCorner
- anchors {
- left: parent.right
- bottom: parent.top
- }
- }
- CornerShadow {
- corner: Qt.TopRightCorner
- anchors {
- right: parent.left
- top: parent.bottom
- }
- }
- CornerShadow {
- corner: Qt.TopLeftCorner
- anchors {
- left: parent.right
- top: parent.bottom
- }
- }
- EdgeShadow {
- edge: Qt.BottomEdge
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.top
- }
- }
- EdgeShadow {
- edge: Qt.TopEdge
- anchors {
- left: parent.left
- right: parent.right
- top: parent.bottom
- }
- }
- EdgeShadow {
- edge: Qt.LeftEdge
- anchors {
- top: parent.top
- bottom: parent.bottom
- left: parent.right
- }
- }
- EdgeShadow {
- edge: Qt.RightEdge
- anchors {
- top: parent.top
- bottom: parent.bottom
- right: parent.left
- }
- }
- Rectangle {
- anchors.fill: parent
- color: Theme.viewBackgroundColor
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/Page.qml b/kstars/kstarslite/kirigami-lib/src/controls/Page.qml
deleted file mode 100644
index e2f838b..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/Page.qml
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-import "private"
-
-/**
- * Page is a container for all the app pages: everything pushed to the
- * ApplicationWindow stackView should be a Page instabnce (or a subclass,
- * such as ScrollablePage)
- * @see ScrollablePage
- */
-Item {
- id: root
-
- /**
- * title: string
- * Title for the page
- */
- property string title
-
- /**
- * leftPadding: int
- * default contents padding at left
- */
- property int leftPadding: Units.gridUnit
-
- /**
- * topPadding: int
- * default contents padding at top
- */
- property int topPadding: Units.gridUnit
-
- /**
- * rightPadding: int
- * default contents padding at right
- */
- property int rightPadding: Units.gridUnit
-
- /**
- * bottomPadding: int
- * default contents padding at bottom
- */
- property int bottomPadding: Units.gridUnit
-
- /**
- * contentData: Item
- * The main items contained in this Page
- */
- default property alias contentData: container.data
-
- /**
- * flickable: Flickable
- * if the central element of the page is a Flickable
- * (ListView and Gridview as well) you can set it there.
- * normally, you wouldn't need to do that, but just use the
- * ScrollablePage element instead
- * @see ScrollablePage
- * Use this if your flickable has some non standard properties, such as not covering the whole Page
- */
- property Flickable flickable
-
- /**
- * actions.contextualActions: list<QtObject>
- * Defines the contextual actions for the page:
- * an easy way to assign actions in the right sliding panel
- *
- * Example usage:
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- *
- * Kirigami.ApplicationWindow {
- * [...]
- * contextDrawer: Kirigami.ContextDrawer {
- * id: contextDrawer
- * }
- * [...]
- * }
- * @endcode
- *
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- *
- * Kirigami.Page {
- * [...]
- * actions.contextualActions: [
- * Kirigami.Action {
- * iconName: "edit"
- * text: "Action text"
- * onTriggered: {
- * // do stuff
- * }
- * },
- * Kirigami.Action {
- * iconName: "edit"
- * text: "Action text"
- * onTriggered: {
- * // do stuff
- * }
- * }
- * ]
- * [...]
- * }
- * @endcode
- */
- //TODO: remove
- property alias contextualActions: actionsGroup.contextualActions
-
- /**
- * actions.main: Action
- * An optional single action for the action button.
- * it can be a Kirigami.Action or a QAction
- *
- * Example usage:
- *
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- * Kirigami.Page {
- * actions.main: Kirigami.Action {
- * iconName: "edit"
- * onTriggered: {
- * // do stuff
- * }
- * }
- * }
- * @endcode
- */
- //TODO: remove
- property alias mainAction: actionsGroup.main
-
- /**
- * actions.left: Action
- * An optional extra action at the left of the main action button.
- * it can be a Kirigami.Action or a QAction
- *
- * Example usage:
- *
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- * Kirigami.Page {
- * actions.left: Kirigami.Action {
- * iconName: "edit"
- * onTriggered: {
- * // do stuff
- * }
- * }
- * }
- * @endcode
- */
- //TODO: remove
- property alias leftAction: actionsGroup.left
-
- /**
- * actions.right: Action
- * An optional extra action at the right of the main action button.
- * it can be a Kirigami.Action or a QAction
- *
- * Example usage:
- *
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- * Kirigami.Page {
- * actions.right: Kirigami.Action {
- * iconName: "edit"
- * onTriggered: {
- * // do stuff
- * }
- * }
- * }
- * @endcode
- */
- //TODO: remove
- property alias rightAction: actionsGroup.right
-
- /**
- * Actions properties are grouped.
- *
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- * Kirigami.Page {
- * actions {
- * main: Kirigami.Action {...}
- * left: Kirigami.Action {...}
- * right: Kirigami.Action {...}
- * contextualActions: [
- * Kirigami.Action {...},
- * Kirigami.Action {...}
- * ]
- * }
- * }
- * @endcode
- */
- readonly property alias actions: actionsGroup
-
- PageActionPropertyGroup {
- id: actionsGroup
- }
-
- /**
- * background: Item
- * This property holds the background item.
- * Note: If the background item has no explicit size specified,
- * it automatically follows the control's size.
- * In most cases, there is no need to specify width or
- * height for a background item.
- */
- property Item background
-
- onBackgroundChanged: {
- background.z = -1;
- background.parent = root;
- background.anchors.fill = root;
- }
-
- /**
- * emitted When the application requests a Back action
- * For instance a global "back" shortcut or the Android
- * Back button has been pressed.
- * The page can manage the back event by itself,
- * and if it set event.accepted = true, it will stop the main
- * application to manage the back event.
- */
- signal backRequested(var event);
-
- Item {
- id: container
- onChildrenChanged: {
- //NOTE: make sure OverlaySheets are directly under the root
- //so they are over all the contents and don't have margins
- //TODO: OverlayDrawers as well?
- //search for an OverlaySheet, unfortunately have to blind test properties
- //as there is no way to get the classname from qml objects
- for (var i = children.length -1; i >= 0; --i) {
- var child = children[i];
- if (child.toString().indexOf("OverlaySheet") === 0) {
- child.parent = root;
- }
- }
- }
- anchors {
- fill: parent
- leftMargin: leftPadding
- topMargin: topPadding + (applicationWindow === undefined || applicationWindow().wideScreen ? 0 : applicationWindow().header.height)
- rightMargin: rightPadding
- bottomMargin: bottomPadding
- }
- }
-
- Loader {
- z: 9999
- parent: root
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- }
- height: item ? item.height : 0
- source: applicationWindow().header && applicationWindow().header.toString().indexOf("ToolBarApplicationHeader") !== 0 ? Qt.resolvedUrl("./private/ActionButton.qml") : ""
- }
-
- Layout.fillWidth: true
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/ScrollablePage.qml b/kstars/kstarslite/kirigami-lib/src/controls/ScrollablePage.qml
deleted file mode 100644
index 9d036b9..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/ScrollablePage.qml
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-import "private"
-
-/**
- * ScrollablePage is a container for all the app pages: everything pushed to the
- * ApplicationWindow stackView should be a Page or ScrollablePage instabnce.
- * This Page subclass is for content that has to be scrolled around, such as
- * bigger content than the screen that would normally go in a Flickable
- * or a ListView.
- * Scrolling and scrolling indicators will be automatically managed
- *
- *
- * @code
- * ScrollablePage {
- * id: root
- * //The rectangle will automatically bescrollable
- * Rectangle {
- * width: root.width
- * height: 99999
- * }
- * }
- * @endcode
- *
- * @code
- * ScrollablePage {
- * id: root
- *
- * //support for the popular "pull down to refresh" behavior in mobile apps
- * supportsRefreshing: true
- *
- * //The ListView will automatically receive proper scroll indicators
- * ListView {
- * model: myModel
- * delegate: BasicListItem { ... }
- * }
- * }
- * @endcode
- *
- * @inherit Page
- */
-Page {
- id: root
-
- /**
- * refreshing: bool
- * If true the list is asking for refresh and will show a loading spinner.
- * it will automatically be set to true when the user pulls down enough the list.
- * This signals the application logic to start its refresh procedure.
- * The application itself will have to set back this property to false when done.
- */
- property alias refreshing: scrollView.refreshing
-
- /**
- * supportsRefreshing: bool
- * If true the list supports the "pull down to refresh" behavior.
- * default is false.
- */
- property alias supportsRefreshing: scrollView.supportsRefreshing
-
- /**
- * flickable: Flickable
- * The main Flickable item of this page
- */
- property alias flickable: scrollView.flickableItem
-
- /**
- * The main content Item of this page.
- * In the case of a ListView or GridView, both contentItem and flickable
- * will be a pointer to the ListView (or GridView)
- */
- default property alias contentItem: scrollView.contentItem
-
- /**
- * leftPadding: int
- * default contents padding at left
- */
- property alias leftPadding: scrollView.leftPadding
-
- /**
- * topPadding: int
- * default contents padding at top
- */
- property alias topPadding: scrollView.topPadding
-
- /**
- * rightPadding: int
- * default contents padding at right
- */
- property alias rightPadding: scrollView.rightPadding
-
- /**
- * bottomPadding: int
- * default contents padding at bottom
- */
- property alias bottomPadding: scrollView.bottomPadding
-
- children: [
- RefreshableScrollView {
- id: scrollView
- topPadding: (applicationWindow() && applicationWindow().header ? applicationWindow().header.preferredHeight : 0) + (contentItem == flickable ? 0 : Units.gridUnit)
- leftPadding: contentItem == flickable ? 0 : Units.gridUnit
- rightPadding: contentItem == flickable ? 0 : Units.gridUnit
- bottomPadding: contentItem == flickable ? 0 : Units.gridUnit
- anchors {
- fill: parent
- }
- },
-
- Item {
- id: overlay
- anchors.fill: parent
- property Item oldContentItem
- }
- ]
-
- //HACK to get the contentItem as the last one, all the other eventual items as an overlay
- //no idea if is the way the user expects
- onContentItemChanged: {
- if (overlay.oldContentItem) {
- overlay.oldContentItem.parent = overlay
- }
- overlay.oldContentItem = root.contentItem
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/SplitDrawer.qml b/kstars/kstarslite/kirigami-lib/src/controls/SplitDrawer.qml
deleted file mode 100644
index 12067a0..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/SplitDrawer.qml
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import "private"
-import "templates" as T
-
-/**
- * Split Drawers are used to expose additional UI elements which are optional
- * and can be used in conjunction with the main UI elements.
- * For example the Resource Browser uses a Split Drawer to select
- * different kinds of filters for the main view.
- */
-T.SplitDrawer {
- id: root
-
- background: Item {
- EdgeShadow {
- edge: Qt.RightEdge
- anchors {
- right: parent.left
- top: parent.top
- bottom: parent.bottom
- rightMargin: -1
- }
- }
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/SwipeListItem.qml b/kstars/kstarslite/kirigami-lib/src/controls/SwipeListItem.qml
deleted file mode 100644
index 632537a..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/SwipeListItem.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2010 Marco Martin <notmart@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
- */
-
-import QtQuick 2.5
-import "private"
-import "templates" as T
-
-/**
- * An item delegate Intended to support extra actions obtainable
- * by uncovering them by dragging away the item with the handle
- * This acts as a container for normal list items.
- * Any subclass of AbstractListItem can be assigned as the contentItem property.
- * @code
- * ListView {
- * model: myModel
- * delegate: SwipeListItem {
- * Label {
- * text: model.text
- * }
- * actions: [
- * Action {
- * iconName: "document-decrypt"
- * onTriggered: print("Action 1 clicked")
- * },
- * Action {
- * iconName: model.action2Icon
- * onTriggered: //do something
- * }
- * ]
- * }
- *
- * }
- * @endcode
- *
- * @inherit QtQuick.Item
- */
-T.SwipeListItem {
- id: root
-
- background: DefaultListItemBackground {}
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/Theme.qml b/kstars/kstarslite/kirigami-lib/src/controls/Theme.qml
deleted file mode 100644
index 8012cda..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/Theme.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.4
-
-pragma Singleton
-
-
-QtObject {
- id: theme
-
- property color textColor: "#31363b"
- property color disabledTextColor: "#9931363b"
-
- property color highlightColor: "#2196F3"
- property color highlightedTextColor: "#eff0fa"
- property color backgroundColor: "#eff0f1"
- property color linkColor: "#2196F3"
- property color visitedLinkColor: "#2196F3"
-
- property color buttonTextColor: "#31363b"
- property color buttonBackgroundColor: "#eff0f1"
- property color buttonHoverColor: "#2196F3"
- property color buttonFocusColor: "#2196F3"
-
- property color viewTextColor: "#31363b"
- property color viewBackgroundColor: "#fcfcfc"
- property color viewHoverColor: "#2196F3"
- property color viewFocusColor: "#2196F3"
-
- property font defaultFont: fontMetrics.font
-
- property list<QtObject> children: [
- TextMetrics {
- id: fontMetrics
- }
- ]
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/ToolBarApplicationHeader.qml b/kstars/kstarslite/kirigami-lib/src/controls/ToolBarApplicationHeader.qml
deleted file mode 100644
index 21968e5..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/ToolBarApplicationHeader.qml
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.5
-import QtQuick.Controls 1.3 as Controls
-import QtQuick.Layouts 1.2
-import QtQuick.Controls.Private 1.0
-import "private"
-import org.kde.kirigami 1.0
-
-
-/**
- *
- */
-ApplicationHeader {
- id: header
-
- preferredHeight: 34//spacer.height
- maximumHeight: preferredHeight
-
- Controls.ToolButton {
- id: spacer
- iconName: "go-previous"
- visible: false
- }
-
- //FIXME: needs a property difinition to have its own type in qml
- property string _internal: ""
-
- pageDelegate: Item {
- id: delegateItem
- readonly property Page page: applicationWindow().pageStack.get(modelData)
- property ListView view: ListView.view
- readonly property bool current: __appWindow.pageStack.currentIndex == index
- property Row layout
-
- width: {
- //more columns shown?
- if (__appWindow.wideScreen) {
- if (modelData == 0 && view.x > 0) {
- return page.width - Math.max(0, view.x - __appWindow.contentItem.x);
- } else {
- return page.width;
- }
- } else {
- return Math.min(view.width, delegateRoot.implicitWidth + Units.smallSpacing);
- }
- }
- height: view.height
-
- Component.onCompleted: {
- layout = toolbarComponent.createObject(delegateItem)
- }
- Component {
- id: toolbarComponent
- Row {
- id: layout
- x: __appWindow.wideScreen ? (Math.min(delegateItem.width - width, Math.max(0, delegateItem.view.contentX - delegateItem.x))) : 0
-
- Rectangle {
- anchors.verticalCenter: parent.verticalCenter
- color: Theme.textColor
- opacity: 0.3
- width: Units.devicePixelRatio
- height: parent.height * 0.6
- }
- Controls.ToolButton {
- anchors.verticalCenter: parent.verticalCenter
- iconName: page && page.actions && page.actions.main ? page.actions.main.iconName : ""
- text: page && page.actions && page.actions.main ? page.actions.main.text : ""
- tooltip: page && page.actions && page.actions.main ? page.actions.main.text : ""
- checkable: page && page.actions && page.actions.main && page.actions.main.checkable
- checked: page && page.actions && page.actions.main && page.actions.main.checked
- enabled: page && page.actions && page.actions.main && page.actions.main.enabled
- opacity: enabled ? 1 : 0.4
- visible: page && page.actions && page.actions.main && page.actions.main.visible
- onClicked: page.actions.main.trigger();
- }
- Controls.ToolButton {
- anchors.verticalCenter: parent.verticalCenter
- iconName: page && page.actions && page.actions.left ? page.actions.left.iconName : ""
- text: page && page.actions && page.actions.left ? page.actions.left.text : ""
- tooltip: page && page.actions && page.actions.left ? page.actions.left.text : ""
- checkable: page && page.actions && page.actions.left && page.actions.left.checkable
- checked: page && page.actions && page.actions.left && page.actions.left.checked
- enabled: page && page.actions && page.actions.left && page.actions.left.enabled
- opacity: enabled ? 1 : 0.4
- visible: page && page.actions && page.actions.left && page.actions.left && page.actions.left.visible
- onClicked: page.actions.left.trigger();
- }
- Controls.ToolButton {
- anchors.verticalCenter: parent.verticalCenter
- iconName: page && page.actions && page.actions.right ? page.actions.right.iconName : ""
- text: page && page.actions && page.actions.right ? page.actions.right.text : ""
- tooltip: page && page.actions && page.actions.right ? page.actions.right.text : ""
- checkable: page && page.actions && page.actions.right && page.actions.right.checkable
- checked: page && page.actions && page.actions.right && page.actions.right.checked
- enabled: page && page.actions && page.actions.right && page.actions.right.enabled
- opacity: enabled ? 1 : 0.4
- visible: page && page.actions && page.actions.right && page.actions.right && page.actions.right.visible
- onClicked: page.actions.right.trigger();
- }
- Rectangle {
- anchors.verticalCenter: parent.verticalCenter
- color: Theme.textColor
- opacity: 0.3
- width: Units.devicePixelRatio
- height: parent.height * 0.6
- }
- Repeater {
- id: repeater
- model: page && page.actions.contextualActions ? page.actions.contextualActions : null
- delegate: Controls.ToolButton {
- anchors.verticalCenter: parent.verticalCenter
- iconName: modelData.iconName
- text: modelData.text
- tooltip: modelData.text
- checkable: modelData.checkable
- checked: modelData.checked
- enabled: modelData.enabled
- opacity: enabled ? 1 : 0.4
- visible: modelData.visible && x+layout.x+width*2 < delegateItem.width
- onClicked: modelData.trigger();
- }
- }
- }
- }
- Heading {
- x: __appWindow.wideScreen ? (Math.min(delegateItem.width - width, Math.max(0, delegateItem.view.contentX - delegateItem.x))) : 0
- anchors.verticalCenter: parent.verticalCenter
- visible: layout.width <= 0
- opacity: delegateItem.current ? 1 : 0.4
- color: Theme.textColor
- elide: Text.ElideRight
- text: page ? page.title : ""
- font.pixelSize: parent.height / 1.6
- }
- Controls.ToolButton {
- id: moreButton
- anchors {
- right: parent.right
- verticalCenter: parent.verticalCenter
- }
-
- //TODO: we need a kebab icon
- iconName: "application-menu"
- visible: menu.visibleChildren > 0
- onClicked: page.actions.main
-
- menu: Controls.Menu {
- id: menu
-
- property int visibleChildren: 0
- Instantiator {
- model: page && page.actions.contextualActions ? page.actions.contextualActions : null
- delegate: Controls.MenuItem {
- text: modelData ? modelData.text : ""
- iconName: modelData.iconName
- shortcut: modelData.shortcut
- onTriggered: modelData.trigger();
- //skip the 3 buttons and 2 separators
- visible: !layout.children[index+5].visible && modelData.visible
- enabled: modelData.enabled
- onVisibleChanged: {
- if (visible) {
- menu.visibleChildren++;
- } else {
- menu.visibleChildren = Math.max(0, menu.visibleChildren-1);
- }
- }
- }
- onObjectAdded: {
- menu.insertItem(index, object);
- if (object.visible) {
- menu.visibleChildren++;
- }
- }
- onObjectRemoved: {
- menu.removeItem(object);
- if (object.visible) {
- menu.visibleChildren = Math.max(0, menu.visibleChildren-1);
- }
- }
- }
- }
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/private/ActionButton.qml b/kstars/kstarslite/kirigami-lib/src/controls/private/ActionButton.qml
deleted file mode 100644
index ec2c9f5..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/private/ActionButton.qml
+++ /dev/null
@@ -1,399 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Layouts 1.2
-import QtGraphicalEffects 1.0
-import org.kde.kirigami 1.0
-
-import "../templates/private"
-
-Item {
- id: root
- anchors {
- left: parent.left
- right: parent.right
- bottom:parent.bottom
- }
- //smallSpacing for the shadow
- height: button.height + Units.smallSpacing
- clip: true
-
- //either Action or QAction should work here
- property QtObject action: pageStack.currentItem ? pageStack.currentItem.mainAction : null
- property QtObject leftAction: pageStack.currentItem ? pageStack.currentItem.leftAction : null
- property QtObject rightAction: pageStack.currentItem ? pageStack.currentItem.rightAction : null
-
- onWidthChanged: button.x = root.width/2 - button.width/2
-
- transform: Translate {
- id: translateTransform
- }
-
- Item {
- id: button
-
- anchors {
- bottom: parent.bottom
- bottomMargin: Units.smallSpacing
- }
- implicitWidth: implicitHeight + Units.iconSizes.smallMedium*3
- implicitHeight: Units.iconSizes.large + Units.largeSpacing
-
-
- onXChanged: {
- if (mouseArea.pressed || edgeMouseArea.pressed || fakeContextMenuButton.pressed) {
- if (globalDrawer && globalDrawer.enabled && globalDrawer.modal) {
- globalDrawer.position = Math.min(1, Math.max(0, (x - root.width/2 + button.width/2)/globalDrawer.contentItem.width + mouseArea.drawerShowAdjust));
- }
- if (contextDrawer && contextDrawer.enabled && contextDrawer.modal) {
- contextDrawer.position = Math.min(1, Math.max(0, (root.width/2 - button.width/2 - x)/contextDrawer.contentItem.width + mouseArea.drawerShowAdjust));
- }
- }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
-
- visible: action != null || leftAction != null || rightAction != null
- property bool internalVisibility: (applicationWindow === undefined || (applicationWindow().controlsVisible && applicationWindow().height > root.height*2)) && (root.action === null || root.action.visible === undefined || root.action.visible)
- preventStealing: true
- onInternalVisibilityChanged: {
- showAnimation.running = false;
- if (internalVisibility) {
- showAnimation.to = 0;
- } else {
- showAnimation.to = button.height;
- }
- showAnimation.running = true;
- }
-
- drag {
- target: button
- //filterChildren: true
- axis: Drag.XAxis
- minimumX: contextDrawer && contextDrawer.enabled && contextDrawer.modal ? 0 : root.width/2 - button.width/2
- maximumX: globalDrawer && globalDrawer.enabled && globalDrawer.modal ? root.width : root.width/2 - button.width/2
- }
-
- property var downTimestamp;
- property int startX
- property int startMouseY
- property real drawerShowAdjust
- property bool buttonPressedUnderMouse: false
- property bool leftButtonPressedUnderMouse: false
- property bool rightButtonPressedUnderMouse: false
-
- onPressed: {
- //search if we have a page to set to current
- if (applicationWindow !== undefined && applicationWindow().pageStack.currentIndex !== undefined) {
- //search the button parent's parent, that is the page parent
- //this will make the context drawer open for the proper page
- applicationWindow().pageStack.currentIndex = root.parent.parent.parent.level;
- }
- downTimestamp = (new Date()).getTime();
- startX = button.x + button.width/2;
- startMouseY = mouse.y;
- drawerShowAdjust = 0;
- buttonPressedUnderMouse = mouse.x > buttonGraphics.x && mouse.x < buttonGraphics.x + buttonGraphics.width;
- leftButtonPressedUnderMouse = !buttonPressedUnderMouse && leftAction && mouse.x < buttonGraphics.x;
- rightButtonPressedUnderMouse = !buttonPressedUnderMouse && rightAction && mouse.x > buttonGraphics.x + buttonGraphics.width;
- }
- onReleased: {
- //pixel/second
- var x = button.x + button.width/2;
- var speed = ((x - startX) / ((new Date()).getTime() - downTimestamp) * 1000);
- drawerShowAdjust = 0;
-
- //project where it would be a full second in the future
- if (globalDrawer && globalDrawer.modal && x + speed > Math.min(root.width/4*3, root.width/2 + globalDrawer.contentItem.width/2)) {
- globalDrawer.open();
- contextDrawer.close();
- } else if (contextDrawer && x + speed < Math.max(root.width/4, root.width/2 - contextDrawer.contentItem.width/2)) {
- if (contextDrawer && contextDrawer.modal) {
- contextDrawer.open();
- }
- if (globalDrawer && globalDrawer.modal) {
- globalDrawer.close();
- }
- } else {
- if (globalDrawer && globalDrawer.modal) {
- globalDrawer.close();
- }
- if (contextDrawer && contextDrawer.modal) {
- contextDrawer.close();
- }
- }
- //Don't rely on native onClicked, but fake it here:
- //Qt.startDragDistance is not adapted to devices dpi in case
- //of Android, so consider the button "clicked" when:
- //*the button has been dragged less than a gridunit
- //*the finger is still on the button
- if (Math.abs((button.x + button.width/2) - startX) < Units.gridUnit &&
- mouse.y > 0) {
- var action;
- if (buttonPressedUnderMouse) {
- action = root.action;
- } else if (leftButtonPressedUnderMouse) {
- action = root.leftAction;
- } else if (rightButtonPressedUnderMouse) {
- action = root.rightAction;
- }
-
- if (!action) {
- return;
- }
-
- //if an action has been assigned, trigger it
- if (action && action.trigger) {
- action.trigger();
- }
- }
- }
-
- onPositionChanged: {
- drawerShowAdjust = Math.min(0.3, Math.max(0, (startMouseY - mouse.y)/(Units.gridUnit*15)));
- button.xChanged();
- }
- onPressAndHold: {
- var action;
- if (buttonPressedUnderMouse) {
- action = root.action;
- } else if (leftButtonPressedUnderMouse) {
- action = root.leftAction;
- } else if (rightButtonPressedUnderMouse) {
- action = root.rightAction;
- }
-
- if (!action) {
- return;
- }
-
- //if an action has been assigned, show a message like a tooltip
- if (action && action.text) {
- showPassiveNotification(action.text);
- }
- }
- Connections {
- target: globalDrawer
- onPositionChanged: {
- if ( globalDrawer && globalDrawer.modal && !mouseArea.pressed && !edgeMouseArea.pressed && !fakeContextMenuButton.pressed) {
- button.x = globalDrawer.contentItem.width * globalDrawer.position + root.width/2 - button.width/2;
- }
- }
- }
- Connections {
- target: contextDrawer
- onPositionChanged: {
- if (contextDrawer && contextDrawer.modal && !mouseArea.pressed && !edgeMouseArea.pressed && !fakeContextMenuButton.pressed) {
- button.x = root.width/2 - button.width/2 - contextDrawer.contentItem.width * contextDrawer.position;
- }
- }
- }
-
- NumberAnimation {
- id: showAnimation
- target: translateTransform
- properties: "y"
- duration: Units.longDuration
- easing.type: mouseArea.internalVisibility == true ? Easing.InQuad : Easing.OutQuad
- }
- Item {
- id: background
- anchors {
- fill: parent
- }
-
- Rectangle {
- id: buttonGraphics
- radius: width/2
- anchors.centerIn: parent
- height: parent.height - Units.smallSpacing*2
- width: height
- visible: root.action
- readonly property bool pressed: root.action && ((mouseArea.buttonPressedUnderMouse && mouseArea.pressed) || root.action.checked)
- color: pressed ? Theme.highlightColor : Theme.backgroundColor
-
- Icon {
- id: icon
- source: root.action && root.action.iconName ? root.action.iconName : ""
- selected: buttonGraphics.pressed
- anchors {
- fill: parent
- margins: Units.smallSpacing
- }
- }
- Behavior on color {
- ColorAnimation {
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
- }
- Behavior on x {
- NumberAnimation {
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
- }
- }
- //left button
- Rectangle {
- id: leftButtonGraphics
- z: -1
- anchors {
- left: parent.left
- verticalCenter: parent.verticalCenter
- }
- radius: Units.smallSpacing
- height: buttonGraphics.height * 0.7
- width: height + (root.action ? Units.iconSizes.smallMedium : 0)
- visible: root.leftAction
-
- readonly property bool pressed: root.leftAction && ((mouseArea.leftButtonPressedUnderMouse && mouseArea.pressed) || root.leftAction.checked)
- color: pressed ? Theme.highlightColor : Theme.backgroundColor
- Icon {
- source: root.leftAction && root.leftAction.iconName ? root.leftAction.iconName : ""
- width: height
- selected: leftButtonGraphics.pressed
- anchors {
- left: parent.left
- top: parent.top
- bottom: parent.bottom
- margins: Units.smallSpacing
- }
- }
- }
- //right button
- Rectangle {
- id: rightButtonGraphics
- z: -1
- anchors {
- right: parent.right
- verticalCenter: parent.verticalCenter
- }
- radius: Units.smallSpacing
- height: buttonGraphics.height * 0.7
- width: height + (root.action ? Units.iconSizes.smallMedium : 0)
- visible: root.rightAction
- readonly property bool pressed: root.rightAction && ((mouseArea.rightButtonPressedUnderMouse && mouseArea.pressed) || root.rightAction.checked)
- color: pressed ? Theme.highlightColor : Theme.backgroundColor
- Icon {
- source: root.rightAction && root.rightAction.iconName ? root.rightAction.iconName : ""
- width: height
- selected: rightButtonGraphics.pressed
- anchors {
- right: parent.right
- top: parent.top
- bottom: parent.bottom
- margins: Units.smallSpacing
- }
- }
- }
- }
-
- DropShadow {
- anchors.fill: background
- horizontalOffset: 0
- verticalOffset: Units.smallSpacing/3
- radius: Units.gridUnit / 3.5
- samples: 16
- color: Qt.rgba(0, 0, 0, 0.5)
- source: background
- }
- }
- }
-
- MouseArea {
- id: fakeContextMenuButton
- anchors {
- right: edgeMouseArea.right
- bottom: edgeMouseArea.bottom
- margins: -1
- }
- drag {
- target: button
- //filterChildren: true
- axis: Drag.XAxis
- minimumX: contextDrawer && contextDrawer.enabled && contextDrawer.modal ? 0 : root.width/2 - button.width/2
- maximumX: globalDrawer && globalDrawer.enabled && globalDrawer.modal ? root.width : root.width/2 - button.width/2
- }
- visible: root.parent.parent.actions.contextualActions.length > 0 && (applicationWindow === undefined || applicationWindow().wideScreen)
-
- width: Units.iconSizes.medium
- height: width
-
- Rectangle {
- color: Theme.viewBackgroundColor
- opacity: parent.pressed ? 1 : 0.3
- anchors.fill: parent
- }
-
- ContextIcon {
- anchors.centerIn: parent
- width: height
- height: Units.iconSizes.smallMedium - Units.smallSpacing * 2
- }
-
- onPressed: mouseArea.onPressed(mouse)
- onReleased: {
- var pos = root.mapFromItem(fakeContextMenuButton, mouse.x, mouse.y);
- if (pos.x < root.width/2 || (mouse.x > 0 && mouse.x < width)) {
- contextDrawer.open();
- } else {
- contextDrawer.close();
- }
- if (globalDrawer.position > 0.5) {
- globalDrawer.open();
- } else {
- globalDrawer.close();
- }
- }
- layer.enabled: true
- layer.effect: DropShadow {
- horizontalOffset: 0
- verticalOffset: 0
- radius: Units.gridUnit
- samples: 32
- color: Qt.rgba(0, 0, 0, 0.5)
- }
- }
-
- MouseArea {
- id: edgeMouseArea
- z:99
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- }
- drag {
- target: button
- //filterChildren: true
- axis: Drag.XAxis
- minimumX: contextDrawer && contextDrawer.enabled && contextDrawer.modal ? 0 : root.width/2 - button.width/2
- maximumX: globalDrawer && globalDrawer.enabled && globalDrawer.modal ? root.width : root.width/2 - button.width/2
- }
- height: Units.smallSpacing * 3
-
- onPressed: mouseArea.onPressed(mouse)
- onPositionChanged: mouseArea.positionChanged(mouse)
- onReleased: mouseArea.released(mouse)
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/private/CornerShadow.qml b/kstars/kstarslite/kirigami-lib/src/controls/private/CornerShadow.qml
deleted file mode 100644
index 7ebc7f6..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/private/CornerShadow.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtGraphicalEffects 1.0
-import org.kde.kirigami 1.0
-
-RadialGradient {
- id: shadow
- /**
- * corner: enumeration
- * This property holds the corner of the shadow that will determine
- * the direction of the gradient.
- * The acceptable values are:
- * Qt.TopLeftCorner, TopRightCorner, BottomLeftCorner, BottomRightCorner
- */
- property int corner: Qt.TopRightCorner
-
- width: Units.gridUnit/2
- height: Units.gridUnit/2
-
- horizontalOffset: {
- switch (corner) {
- case Qt.TopLeftCorner:
- case Qt.BottomLeftCorner:
- return -width/2;
- default:
- return width/2;
- }
- }
- verticalOffset: {
- switch (corner) {
- case Qt.TopLeftCorner:
- case Qt.TopRightCorner:
- return -width/2;
- default:
- return width/2;
- }
- }
-
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: Qt.rgba(0, 0, 0, 0.2)
- }
- GradientStop {
- position: 0.3
- color: Qt.rgba(0, 0, 0, 0.1)
- }
- GradientStop {
- position: 1.0
- color: "transparent"
- }
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/private/DefaultListItemBackground.qml b/kstars/kstarslite/kirigami-lib/src/controls/private/DefaultListItemBackground.qml
deleted file mode 100644
index 4f0b5b9..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/private/DefaultListItemBackground.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import org.kde.kirigami 1.0
-import QtQuick.Controls 1.0 as Controls
-import QtQuick.Controls.Private 1.0
-
-Rectangle {
- color: listItem.checked || (listItem.pressed && !listItem.checked && !listItem.sectionDelegate) ? Theme.highlightColor : Theme.viewBackgroundColor
-
- visible: listItem.ListView.view ? listItem.ListView.view.highlight === null : true
- Rectangle {
- anchors.fill: parent
- visible: !Settings.isMobile
- color: Theme.highlightColor
- opacity: listItem.containsMouse && !listItem.pressed ? 0.2 : 0
- Behavior on opacity { NumberAnimation { duration: Units.longDuration } }
- }
- Behavior on color {
- ColorAnimation { duration: Units.longDuration }
- }
-
- Rectangle {
- id: separator
- color: Theme.textColor
- opacity: 0.2
- visible: listItem.separatorVisible
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- }
- height: Math.ceil(Units.smallSpacing / 5);
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/private/EdgeShadow.qml b/kstars/kstarslite/kirigami-lib/src/controls/private/EdgeShadow.qml
deleted file mode 100644
index 8f4052b..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/private/EdgeShadow.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtGraphicalEffects 1.0
-import org.kde.kirigami 1.0
-
-LinearGradient {
- id: shadow
- /**
- * edge: enumeration
- * This property holds the edge of the shadow that will determine
- * the direction of the gradient.
- * The acceptable values are:
- * Qt.TopEdge: The top edge of the content item.
- * Qt.LeftEdge: The left edge of the content item (default).
- * Qt.RightEdge: The right edge of the content item.
- * Qt.BottomEdge: The bottom edge of the content item.
- */
- property int edge: Qt.LeftEdge
-
- width: Units.gridUnit/2
- height: Units.gridUnit/2
-
- start: Qt.point((edge != Qt.RightEdge ? 0 : width), (edge != Qt.BottomEdge ? 0 : height))
- end: Qt.point((edge != Qt.LeftEdge ? 0 : width), (edge != Qt.TopEdge ? 0 : height))
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: Qt.rgba(0, 0, 0, 0.2)
- }
- GradientStop {
- position: 0.3
- color: Qt.rgba(0, 0, 0, 0.1)
- }
- GradientStop {
- position: 1.0
- color: "transparent"
- }
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/private/PageActionPropertyGroup.qml b/kstars/kstarslite/kirigami-lib/src/controls/private/PageActionPropertyGroup.qml
deleted file mode 100644
index 2ee0adf..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/private/PageActionPropertyGroup.qml
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQml 2.1
-
-QtObject {
- id: actionsGroup
- property QtObject main
- property QtObject left
- property QtObject right
- property list<QtObject> contextualActions
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/private/RefreshableScrollView.qml b/kstars/kstarslite/kirigami-lib/src/controls/private/RefreshableScrollView.qml
deleted file mode 100644
index ba2b029..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/private/RefreshableScrollView.qml
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.5
-import QtQuick.Controls 1.3 as Controls
-import QtGraphicalEffects 1.0
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-
-/**
- * RefreshableScrollView is a scroll view for any Flickable that supports the
- * "scroll down to refresh" behavior, and also allows the contents of the
- * flickable to have more top margins in order to make possible to scroll down the list
- * to reach it with the thumb while using the phone with a single hand.
- *
- * Example usage:
- *
- * @code
- * import org.kde.kirigami 1.0 as Kirigami
- * [...]
- *
- * Kirigami.RefreshableScrollView {
- * id: view
- * supportsRefreshing: true
- * onRefreshingChanged: {
- * if (refreshing) {
- * myModel.refresh();
- * }
- * }
- * ListView {
- * //NOTE: MyModel doesn't come from the components,
- * //it's purely an example on how it can be used together
- * //some application logic that can update the list model
- * //and signals when it's done.
- * model: MyModel {
- * onRefreshDone: view.refreshing = false;
- * }
- * delegate: BasicListItem {}
- * }
- * }
- * [...]
- *
- * @endcode
- *
- * @inherit QtQuick.Controls.Scrollview
- */
-Controls.ScrollView {
- id: root
-
- /**
- * type: bool
- * If true the list is asking for refresh and will show a loading spinner.
- * it will automatically be set to true when the user pulls down enough the list.
- * This signals the application logic to start its refresh procedure.
- * The application itself will have to set back this property to false when done.
- */
- property bool refreshing: false
-
- /**
- * type: bool
- * If true the list supports the "pull down to refresh" behavior.
- */
- property bool supportsRefreshing: false
-
- /**
- * leftPadding: int
- * default contents padding at left
- */
- property int leftPadding: Units.gridUnit
-
- /**
- * topPadding: int
- * default contents padding at top
- */
- property int topPadding: Units.gridUnit
-
- /**
- * rightPadding: int
- * default contents padding at right
- */
- property int rightPadding: Units.gridUnit
-
- /**
- * bottomPadding: int
- * default contents padding at bottom
- */
- property int bottomPadding: Units.gridUnit
-
-
- frameVisible: false
-
- children: [
- Item {
- id: busyIndicatorFrame
- z: 99
- y: -root.flickableItem.contentY-height
- width: root.flickableItem.width
- height: busyIndicator.height + Units.gridUnit * 2
- Controls.BusyIndicator {
- id: busyIndicator
- anchors.centerIn: parent
- running: root.refreshing
- visible: root.refreshing
- //Android busywidget QQC seems to be broken at custom sizes
- }
- Rectangle {
- id: spinnerProgress
- anchors {
- fill: busyIndicator
- margins: Math.ceil(Units.smallSpacing/2)
- }
- radius: width
- visible: supportsRefreshing && !refreshing && progress > 0
- color: "transparent"
- opacity: 0.8
- border.color: Theme.viewBackgroundColor
- border.width: Math.ceil(Units.smallSpacing/4)
- property real progress: supportsRefreshing && !refreshing ? (parent.y/busyIndicatorFrame.height) : 0
-
- }
- ConicalGradient {
- source: spinnerProgress
- visible: spinnerProgress.visible
- anchors.fill: spinnerProgress
- gradient: Gradient {
- GradientStop { position: 0.00; color: Theme.highlightColor }
- GradientStop { position: spinnerProgress.progress; color: Theme.highlightColor }
- GradientStop { position: spinnerProgress.progress + 0.01; color: "transparent" }
- GradientStop { position: 1.00; color: "transparent" }
- }
- }
-
- Rectangle {
- color: Theme.textColor
- opacity: 0.2
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- }
- //only show in ListViews
- visible: root.flickableItem == root.contentItem
- height: Math.ceil(Units.smallSpacing / 5);
- }
- onYChanged: {
- if (y > busyIndicatorFrame.height*1.5 + topPadding && applicationWindow() && root.flickableItem.atYBeginning && applicationWindow().pageStack.anchors.bottomMargin == 0 && root.width < root.height) {
- applicationWindow().reachableMode = true;
- overshootResetTimer.restart();
- canOvershootBackTimer.restart();
- }
-
- if (!supportsRefreshing) {
- return;
- }
- if (!root.refreshing && y > busyIndicatorFrame.height/2 + topPadding) {
- root.refreshing = true;
- }
- }
- Timer {
- id: overshootResetTimer
- interval: 8000
- onTriggered: {
- applicationWindow().reachableMode = false;
- }
- }
- //HACK?
- Timer {
- id: canOvershootBackTimer
- interval: 800
- }
- Connections {
- target: root.flickableItem
- onMovementEnded: {
- if (!canOvershootBackTimer.running &&
- applicationWindow().reachableMode) {
- applicationWindow().reachableMode = false;
- }
- }
- }
- Binding {
- target: root.flickableItem
- property: "topMargin"
- value: applicationWindow().wideScreen ? 0 : Math.max(root.topPadding + (root.refreshing ? busyIndicatorFrame.height : 0), applicationWindow().header.height)
- }
-
- Binding {
- target: root.flickableItem
- property: "flickableDirection"
- value: Flickable.VerticalFlick
- }
-
- Binding {
- target: root.flickableItem
- property: "bottomMargin"
- value: Units.gridUnit * 5
- }
-
- Binding {
- target: root.contentItem
- property: "width"
- value: root.flickableItem.width
- }
-
- //FIXME: this shouldn't exist
- Timer {
- id: resetTimer
- interval: 100
- onTriggered: {
- if (applicationWindow() && applicationWindow().header && !applicationWindow().wideScreen) {
- flickableItem.contentY = -applicationWindow().header.preferredHeight;
- }
-
- if (root.contentItem == root.flickableItem) {
- flickableItem.anchors.leftMargin = 0;
- flickableItem.anchors.topMargin = 0;
- flickableItem.anchors.rightMargin = 0;
- flickableItem.anchors.bottomMargin = 0;
- } else {
- flickableItem.anchors.leftMargin = leftPadding;
- flickableItem.anchors.topMargin = topPadding;
- flickableItem.anchors.rightMargin = rightPadding;
- flickableItem.anchors.bottomMargin = bottomPadding;
- }
- }
- }
- }
- ]
-
- onHeightChanged: {
- if (!applicationWindow() || !applicationWindow().activeFocusItem) {
- return;
- }
-
- //NOTE: there is no function to know if an item is descended from another,
- //so we have to walk the parent hyerarchy by hand
- var isDescendent = false;
- var candidate = applicationWindow().activeFocusItem.parent;
- while (candidate) {
- if (candidate == root) {
- isDescendent = true;
- break;
- }
- candidate = candidate.parent;
- }
- if (!isDescendent) {
- return;
- }
-
- var cursorY = 0;
- if (applicationWindow().activeFocusItem.cursorPosition !== undefined) {
- cursorY = applicationWindow().activeFocusItem.positionToRectangle(applicationWindow().activeFocusItem.cursorPosition).y;
- }
-
- var pos = applicationWindow().activeFocusItem.mapToItem(root.contentItem, 0, cursorY);
-
- //focused item alreqady visible? add some margin for the space of the action buttons
- if (pos.y >= root.flickableItem.contentY && pos.y <= root.flickableItem.contentY + root.flickableItem.height - Units.gridUnit * 8) {
- return;
- }
- root.flickableItem.contentY = pos.y;
- }
-
- onLeftPaddingChanged: {
- if (root.contentItem == root.flickableItem) {
- flickableItem.anchors.leftMargin = 0;
- flickableItem.anchors.topMargin = 0;
- flickableItem.anchors.rightMargin = 0;
- flickableItem.anchors.bottomMargin = 0;
- } else {
- flickableItem.anchors.leftMargin = leftPadding;
- flickableItem.anchors.topMargin = topPadding;
- flickableItem.anchors.rightMargin = rightPadding;
- flickableItem.anchors.bottomMargin = bottomPadding;
- }
- }
-
- onFlickableItemChanged: resetTimer.restart()
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/qmldir b/kstars/kstarslite/kirigami-lib/src/controls/qmldir
deleted file mode 100644
index 46d452e..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/qmldir
+++ /dev/null
@@ -1,7 +0,0 @@
-module org.kde.kirigami
-plugin kirigamiplugin
-classname KirigamiPlugin
-depends QtQuick.Controls 1.4
-depends QtQuick.Controls.Private 1.0
-designersupported
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/templates/AbstractApplicationHeader.qml b/kstars/kstarslite/kirigami-lib/src/controls/templates/AbstractApplicationHeader.qml
deleted file mode 100644
index 6b4aa5e..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/templates/AbstractApplicationHeader.qml
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.5
-import QtQuick.Layouts 1.2
-import "private"
-import org.kde.kirigami 1.0
-
-
-/**
- * An item that can be used as a title for the application.
- * Scrolling the main page will make it taller or shorter (trough the point of going away)
- * It's a behavior similar to the typical mobile web browser adressbar
- * the minimum, preferred and maximum heights of the item can be controlled with
- * * minimumHeight: default is 0, i.e. hidden
- * * preferredHeight: default is Units.gridUnit * 1.6
- * * preferredHeight: default is Units.gridUnit * 3
- *
- * To achieve a titlebar that stays completely fixed just set the 3 sizes as the same
- */
-Item {
- id: root
- z: 90
- property int minimumHeight: 0
- property int preferredHeight: Units.gridUnit * 2
- property int maximumHeight: Units.gridUnit * 3
- default property alias contentItem: mainItem.data
-
- parent: __appWindow.contentItem.parent
- //FIXME: remove
- property QtObject __appWindow: applicationWindow();
-
- anchors {
- top: parent.top
- left: parent.left
- right: parent.right
- }
- height: preferredHeight
-
- /**
- * background: Item
- * This property holds the background item.
- * Note: the background will be automatically sized as the whole control
- */
- property Item background
-
- onBackgroundChanged: {
- background.z = -1;
- background.parent = root;
- background.anchors.fill = root;
- }
-
- Behavior on height {
- enabled: __appWindow.pageStack.currentItem && __appWindow.pageStack.currentItem.flickable && !__appWindow.pageStack.currentItem.flickable.moving
- NumberAnimation {
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
- }
-
- opacity: height > 0 && -translateTransform.y <= height ? 1 : 0
- Behavior on opacity {
- OpacityAnimator {
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
- }
-
- Connections {
- target: __appWindow
- onWideScreenChanged: {
- if (wideScreen) {
- height = preferredHeight;
- } else {
- height = preferredHeight;
- }
- }
- onHeightChanged: root.height = preferredHeight;
- onReachableModeChanged: root.height = __appWindow.reachableMode && !__appWindow.wideScreen ? maximumHeight : preferredHeight;
- }
-
- transform: Translate {
- id: translateTransform
- y: {
- if (__appWindow === undefined) {
- return 0;
- }
- if (__appWindow.reachableMode && !__appWindow.wideScreen) {
- return __appWindow.height/2;
- } else if (!__appWindow.controlsVisible) {
- return -headerItem.height - Units.smallSpacing;
- } else {
- return 0;
- }
- }
- Behavior on y {
- NumberAnimation {
- duration: Units.longDuration
- easing.type: translateTransform.y < 0 ? Easing.OutQuad : Easing.InQuad
- }
- }
- }
-
- Item {
- id: headerItem
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- }
-
- height: parent.preferredHeight
-
- Connections {
- id: headerSlideConnection
- target: __appWindow.pageStack.currentItem ? __appWindow.pageStack.currentItem.flickable : null
- property int oldContentY
- onContentYChanged: {
- if (!__appWindow.pageStack.currentItem) {
- return;
- }
- if (__appWindow.pageStack.currentItem.flickable.atYBeginning ||
- __appWindow.pageStack.currentItem.flickable.atYEnd) {
- return;
- }
-
- if (__appWindow.wideScreen) {
- root.height = root.preferredHeight;
- } else if (__appWindow.reachableMode && !__appWindow.wideScreen) {
- root.height = root.maximumHeight;
- } else {
- root.height = Math.min(root.preferredHeight,
- Math.max(root.minimumHeight,
- root.height + oldContentY - __appWindow.pageStack.currentItem.flickable.contentY));
- oldContentY = __appWindow.pageStack.currentItem.flickable.contentY;
- }
- }
- onMovementEnded: {
- if (root.height > root.preferredHeight) {
- //if don't change the position if more then preferredSize is shown
- } else if (root.height > root.preferredHeight/2 ) {
- root.height = root.preferredHeight;
- } else {
- root.height = 0;
- }
- }
- }
- Connections {
- target: __appWindow.pageStack
- onCurrentItemChanged: {
- if (!__appWindow.pageStack.currentItem) {
- return;
- }
- if (__appWindow.pageStack.currentItem.flickable) {
- headerSlideConnection.oldContentY = __appWindow.pageStack.currentItem.flickable.contentY;
- } else {
- headerSlideConnection.oldContentY = 0;
- }
- root.height = root.preferredHeight;
- }
- }
-
- Item {
- id: mainItem
- anchors {
- fill: parent
- topMargin: applicationWindow().reachable ? 0 : Math.min(headerItem.height - root.height, headerItem.height - root.preferredHeight)
- }
- }
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/templates/AbstractListItem.qml b/kstars/kstarslite/kirigami-lib/src/controls/templates/AbstractListItem.qml
deleted file mode 100644
index 9583dc5..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/templates/AbstractListItem.qml
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright 2010 Marco Martin <notmart@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Layouts 1.0
-import QtQuick.Controls 1.0 as Controls
-import QtQuick.Controls.Private 1.0
-import org.kde.kirigami 1.0
-
-/**
- * An item delegate for the primitive ListView component.
- *
- * It's intended to make all listviews look coherent.
- *
- * @inherit QtQuick.Item
- */
-Rectangle {
- id: listItem
-
- /**
- * contentItem: Item
- * This property holds the visual content item.
- *
- * Note: The content item is automatically resized inside the
- * padding of the control.
- */
- default property Item contentItem
-
- /**
- * supportsMouseEvents: bool
- * Holds if the item emits signals related to mouse interaction.
- *TODO: remove
- * The default value is false.
- */
- property alias supportsMouseEvents: itemMouse.enabled
-
- /**
- * clicked: signal
- * This signal is emitted when there is a click.
- *
- * This is disabled by default, set enabled to true to use it.
- * @see enabled
- */
- signal clicked
-
-
- /**
- * pressAndHold: signal
- * The user pressed the item with the mouse and didn't release it for a
- * certain amount of time.
- *
- * This is disabled by default, set enabled to true to use it.
- * @see enabled
- */
- signal pressAndHold
-
- /**
- * checked: bool
- * If true makes the list item look as checked or pressed. It has to be set
- * from the code, it won't change by itself.
- */
- property bool checked: false
-
- /**
- * pressed: bool
- * True when the user is pressing the mouse over the list item and
- * supportsMouseEvents is set to true
- */
- property alias pressed: itemMouse.pressed
-
- /**
- * containsMouse: bool
- * True when the user hover the mouse over the list item
- * NOTE: on mobile touch devices this will be true only when pressed is also true
- */
- property alias containsMouse: itemMouse.containsMouse
-
- /**
- * sectionDelegate: bool
- * If true the item will be a delegate for a section, so will look like a
- * "title" for the items under it.
- */
- property bool sectionDelegate: false
-
- /**
- * separatorVisible: bool
- * True if the separator between items is visible
- * default: true
- */
- property bool separatorVisible: true
-
- /**
- * background: Item
- * This property holds the background item.
- *
- * Note: If the background item has no explicit size specified,
- * it automatically follows the control's size.
- * In most cases, there is no need to specify width or
- * height for a background item.
- */
- property Item background
-
- implicitWidth: contentItem ? contentItem.childrenRect.width : 0
-
- implicitHeight: contentItem.height + Units.smallSpacing * 5
-
- width: parent ? parent.width : implicitWidth
- Layout.fillWidth: true
-
- opacity: enabled ? 1 : 0.6
-
- height: visible ? implicitHeight : 0
-
- onContentItemChanged: {
- contentItem.parent = paddingItem;
- }
-
- Component.onCompleted: {
- if (background) {
- background.parent = itemMouse;
- background.anchors.fill = itemMouse;
- }
- }
-
- MouseArea {
- id: itemMouse
- anchors.fill: parent
- enabled: true
- hoverEnabled: !Settings.isMobile
-
- onClicked: listItem.clicked()
- onPressAndHold: listItem.pressAndHold()
-
- Item {
- id: paddingItem
- z: 2
- anchors {
- fill: parent
- margins: Units.smallSpacing
- }
- }
- }
-
- onBackgroundChanged: {
- background.parent = itemMouse
- }
-
- Accessible.role: Accessible.ListItem
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/templates/ApplicationHeader.qml b/kstars/kstarslite/kirigami-lib/src/controls/templates/ApplicationHeader.qml
deleted file mode 100644
index b239b87..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/templates/ApplicationHeader.qml
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.5
-import QtQuick.Layouts 1.2
-import QtQuick.Controls.Private 1.0
-import "private"
-import org.kde.kirigami 1.0
-
-
-/**
- * An item that can be used as a title for the application.
- * Scrolling the main page will make it taller or shorter (trough the point of going away)
- * It's a behavior similar to the typical mobile web browser adressbar
- * the minimum, preferred and maximum heights of the item can be controlled with
- * * minimumHeight: default is 0, i.e. hidden
- * * preferredHeight: default is Units.gridUnit * 1.6
- * * maximumHeight: default is Units.gridUnit * 3
- *
- * To achieve a titlebar that stays completely fixed just set the 3 sizes as the same
- */
-AbstractApplicationHeader {
- id: header
-
- /**
- * separatorStyle: string
- * The way the separator between pages should be drawn in the header.
- * Allowed values are:
- * * Breadcrumb: the pages are hyerarchical and the separator will look like a >
- * * TabBar: the pages are intended to behave like tabbar pages
- * and the separator will look limke a dot.
- *
- * When the heaer is in wide screen mode, no separator will be drawn.
- */
- property string separatorStyle: "Breadcrumb"
-
- property alias pageDelegate: titleList.delegate
-
- Rectangle {
- anchors {
- right: titleList.left
- verticalCenter: parent.verticalCenter
- }
- visible: titleList.x > 0 && !titleList.atXBeginning
- height: parent.height * 0.7
- color: Theme.highlightedTextColor
- width: Math.ceil(Units.smallSpacing / 6)
- opacity: 0.4
- }
-
- ListView {
- id: titleList
- //uses this to have less strings comparisons
- property bool isTabBar: header.separatorStyle == "TabBar"
- Component.onCompleted: {
- //only iOS and desktop systems put the back button on top left corner
- if (!titleList.isTabBar && (!Settings.isMobile || Qt.platform.os == "ios")) {
- var component = Qt.createComponent(Qt.resolvedUrl("private/BackButton.qml"));
- titleList.backButton = component.createObject(titleList.parent);
- }
- }
- property Item backButton
- clip: true
- anchors {
- fill: parent
- leftMargin: Math.max ((backButton ? backButton.width : Units.smallSpacing*2), __appWindow.contentItem.x)
- }
- cacheBuffer: width ? Math.max(0, width * count) : 0
- displayMarginBeginning: __appWindow.pageStack.width * count
- orientation: ListView.Horizontal
- boundsBehavior: Flickable.StopAtBounds
- model: __appWindow.pageStack.depth
- spacing: 0
- currentIndex: __appWindow.pageStack && __appWindow.pageStack.currentIndex !== undefined ? __appWindow.pageStack.currentIndex : 0
-
- function gotoIndex(idx) {
- //don't actually scroll in widescreen mode
- if (__appWindow.wideScreen) {
- return;
- }
- listScrollAnim.running = false
- var pos = titleList.contentX;
- var destPos;
- titleList.positionViewAtIndex(idx, ListView.Center);
- destPos = titleList.contentX;
- listScrollAnim.from = pos;
- listScrollAnim.to = destPos;
- listScrollAnim.running = true;
- }
-
- NumberAnimation {
- id: listScrollAnim
- target: titleList
- property: "contentX"
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
-
- onCurrentIndexChanged: gotoIndex(currentIndex);
- onModelChanged: gotoIndex(currentIndex);
- onContentWidthChanged: gotoIndex(currentIndex);
-
- onContentXChanged: {
- if (__appWindow.wideScreen && !__appWindow.pageStack.contentItem.moving) {
- //__appWindow.pageStack.contentItem.contentX = titleList.contentX
- }
- }
- onHeightChanged: {
- titleList.returnToBounds()
- }
- onMovementEnded: {
- if (__appWindow.wideScreen) {
- __appWindow.pageStack.contentItem.movementEnded();
- }
- }
-
- NumberAnimation {
- id: scrollTopAnimation
- target: __appWindow.pageStack.currentItem && __appWindow.pageStack.currentItem.flickable ? __appWindow.pageStack.currentItem.flickable : null
- property: "contentY"
- to: 0
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
-
- delegate: MouseArea {
- id: delegate
- readonly property Page page: __appWindow.pageStack.get(modelData)
- //NOTE: why not use ListViewCurrentIndex? because listview itself resets
- //currentIndex in some situations (since here we are using an int as a model,
- //even more often) so the property binding gets broken
- readonly property bool current: __appWindow.pageStack.currentIndex == index
-
- width: {
- //more columns shown?
- if (__appWindow.wideScreen && page) {
- if (modelData == 0 && titleList.backButton) {
- return page.width - Math.max(0, titleList.backButton.width - __appWindow.contentItem.x);
- } else {
- return page.width;
- }
- } else {
- return Math.min(titleList.width, delegateRoot.implicitWidth + Units.smallSpacing);
- }
- }
- height: titleList.height
- onClicked: {
- if (__appWindow.pageStack.currentIndex == modelData) {
- //scroll up if current otherwise make current
- if (!__appWindow.pageStack.currentItem.flickable) {
- return;
- }
- if (__appWindow.pageStack.currentItem.flickable.contentY > -__appWindow.header.height) {
- scrollTopAnimation.to = -__appWindow.pageStack.currentItem.flickable.topMargin;
- scrollTopAnimation.running = true;
- }
-
- } else {
- __appWindow.pageStack.currentIndex = modelData;
- }
- }
-
- Row {
- id: delegateRoot
- x: Units.smallSpacing + __appWindow.wideScreen ? (Math.min(delegate.width - width, Math.max(0, titleList.contentX - delegate.x))) : 0
- height: parent.height
-
- spacing: Units.smallSpacing
-
- Icon {
- //in tabbar mode this is just a spacer
- visible: (titleList.isTabBar || modelData > 0) && !__appWindow.wideScreen && opacity > 0
- height: title.height
- width: height
- selected: header.background && header.background.color && header.background.color == Theme.highlightColor
- source: titleList.isTabBar ? "" : "go-next"
- }
-
- Heading {
- id: title
- width:Math.min(titleList.width, implicitWidth)
- anchors.verticalCenter: parent.verticalCenter
- opacity: delegate.current ? 1 : 0.4
- //Scaling animate NativeRendering is too slow
- renderType: Text.QtRendering
- color: header.background && header.background.color && header.background.color == Theme.highlightColor ? Theme.highlightedTextColor : Theme.textColor
- elide: Text.ElideRight
- text: page.title
- font.pixelSize: titleList.height / 1.6
- height: parent.height
- Rectangle {
- anchors {
- bottom: parent.bottom
- left: parent.left
- right: parent.right
- }
- height: Units.smallSpacing
- color: title.color
- opacity: 0.6
- visible: titleList.isTabBar && delegate.current
- }
- }
- }
- }
- Connections {
- target: __appWindow.wideScreen ? __appWindow.pageStack.contentItem : null
- onContentXChanged: {
- if (!titleList.contentItem.moving) {
- titleList.contentX = __appWindow.pageStack.contentItem.contentX - __appWindow.pageStack.contentItem.originX + titleList.originX;
- }
- }
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/templates/OverlayDrawer.qml b/kstars/kstarslite/kirigami-lib/src/controls/templates/OverlayDrawer.qml
deleted file mode 100644
index 12279ae..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/templates/OverlayDrawer.qml
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
- * Copyright 2012 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import org.kde.kirigami 1.0
-import "private"
-
-/**
- * Overlay Drawers are used to expose additional UI elements needed for
- * small secondary tasks for which the main UI elements are not needed.
- * For example in Okular Active, an Overlay Drawer is used to display
- * thumbnails of all pages within a document along with a search field.
- * This is used for the distinct task of navigating to another page.
- *
- */
-AbstractDrawer {
- id: root
-
- z: modal ? (opened ? 100 : 99 ): 98
-
-//BEGIN Properties
- /**
- * page: Item
- * It's the default property. it's the main content of the drawer page,
- * the part that is always shown
- */
- default property alias page: mainPage.data
-
- /**
- * contentItem: Item
- * It's the part that can be pulled in and out, will act as a sidebar.
- */
- property Item contentItem
-
- /**
- * background: Item
- * This property holds the background item.
- * Note: the background will be automatically sized as the whole control
- */
- property Item background
-
- /**
- * opened: bool
- * If true the drawer is open showing the contents of the "drawer"
- * component.
- */
- property alias opened: mainFlickable.open
-
- /**
- * edge: enumeration
- * This property holds the edge of the content item at which the drawer
- * will open from.
- * The acceptable values are:
- * Qt.TopEdge: The top edge of the content item.
- * Qt.LeftEdge: The left edge of the content item (default).
- * Qt.RightEdge: The right edge of the content item.
- * Qt.BottomEdge: The bottom edge of the content item.
- */
- property int edge: Qt.LeftEdge
-
- /**
- * position: real
- * This property holds the position of the drawer relative to its
- * final destination. That is, the position will be 0 when the
- * drawer is fully closed, and 1 when fully open.
- */
- property real position: 0
-
- /**
- * handleVisible: bool
- * If true, a little handle will be visible to make opening the drawer easier
- * Currently supported only on left and right drawers
- */
- property bool handleVisible: typeof(applicationWindow)===typeof(Function) && applicationWindow() ? applicationWindow().controlsVisible : true
-
- /**
- * modal: bool
- * If true the drawer will be an overlay of the main content,
- * obscuring it and blocking input.
- * If false, the drawer will look like a sidebar, with the main content
- * application still usable.
- * It is recomended to use modal on mobile devices and not modal on desktop
- * devices.
- * Default is true
- */
- //property bool modal: true
-//END Properties
-
-
-//BEGIN Methods
- /**
- * open: function
- * This method opens the drawer, animating the movement if a
- * valid animation has been set.
- */
- function open () {
- mainAnim.to = 0;
- switch (root.edge) {
- case Qt.RightEdge:
- mainAnim.to = drawerPage.width;
- break;
- case Qt.BottomEdge:
- mainAnim.to = drawerPage.height;
- break;
- case Qt.LeftEdge:
- case Qt.TopEdge:
- default:
- mainAnim.to = 0;
- break;
- }
- mainAnim.running = true;
- mainFlickable.open = true;
- }
-
- /**
- * close: function
- * This method closes the drawer, animating the movement if a
- * valid animation has been set.
- */
- function close () {
- switch (root.edge) {
- case Qt.RightEdge:
- case Qt.BottomEdge:
- mainAnim.to = 0;
- break;
- case Qt.LeftEdge:
- mainAnim.to = drawerPage.width;
- break;
- case Qt.TopEdge:
- mainAnim.to = drawerPage.height;
- break;
- }
- mainAnim.running = true;
- mainFlickable.open = false;
- }
-
- /**
- * clicked: signal
- * This signal is emitted when the drawer is clicked.
- */
-//END Methods
-
-//BEGIN Signal handlers
- onBackgroundChanged: {
- background.z = 1;
- background.parent = mainItem;
- background.anchors.fill = drawerPage;
- }
-
- onPositionChanged: {
- if (!mainFlickable.loopCheck) {
- mainFlickable.loopCheck = true;
- if (!mainFlickable.flicking && !mainFlickable.dragging && !mainAnim.running) {
- switch (root.edge) {
- case Qt.RightEdge:
- mainFlickable.contentX = drawerPage.width * position;
- break;
- case Qt.LeftEdge:
- mainFlickable.contentX = drawerPage.width * (1-position);
- break;
- case Qt.BottomEdge:
- mainFlickable.contentY = drawerPage.height * position;
- break;
- }
- }
- mainFlickable.loopCheck = false;
- }
- }
- onContentItemChanged: {
- contentItem.parent = drawerPage
- contentItem.anchors.fill = drawerPage
- }
-//END Signal handlers
-
- Item {
- id: mainPage
- anchors.fill: parent
- onChildrenChanged: mainPage.children[0].anchors.fill = mainPage
- }
-
- Rectangle {
- anchors.fill: parent
- color: "black"
- opacity: 0.6 * mainFlickable.internalPosition
- visible: root.modal
- }
-
-
- //NOTE: it's a PropertyAnimation instead of a NumberAnimation because
- //NumberAnimation doesn't have NOTIFY signal on to property
- PropertyAnimation {
- id: mainAnim
- target: mainFlickable
- properties: (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) ? "contentX" : "contentY"
- duration: Units.longDuration
- easing.type: mainAnim.to > 0 ? Easing.InQuad : Easing.OutQuad
- }
-
- MouseArea {
- id: edgeMouse
- anchors {
- right: root.edge == Qt.LeftEdge ? undefined : parent.right
- left: root.edge == Qt.RightEdge ? undefined : parent.left
- top: root.edge == Qt.BottomEdge ? undefined : parent.top
- bottom: root.edge == Qt.TopEdge ? undefined : parent.bottom
- }
- z: 99
- width: Units.smallSpacing * 3
- height: Units.smallSpacing * 3
- property int startMouseX
- property real oldMouseX
- property int startMouseY
- property real oldMouseY
- property bool startDragging: false
-
- function managePress(mouse) {
- if (drawerPage.children.length == 0) {
- mouse.accepted = false;
- return;
- }
-
- speedSampler.restart();
- mouse.accepted = true;
- oldMouseX = startMouseX = mouse.x;
- oldMouseY = startMouseY = mouse.y;
- startDragging = false;
- }
- onPressed: {
- managePress(mouse)
- }
-
- onPositionChanged: {
- if (!root.contentItem) {
- mouse.accepted = false;
- return;
- }
-
- if (Math.abs(mouse.x - startMouseX) > root.width / 5 ||
- Math.abs(mouse.y - startMouseY) > root.height / 5) {
- startDragging = true;
- }
- if (startDragging) {
- switch (root.edge) {
- case Qt.RightEdge:
- mainFlickable.contentX = Math.min(mainItem.width - root.width, mainFlickable.contentX + oldMouseX - mouse.x);
- break;
- case Qt.LeftEdge:
- mainFlickable.contentX = Math.max(0, mainFlickable.contentX + oldMouseX - mouse.x);
- break;
- case Qt.BottomEdge:
- mainFlickable.contentY = Math.min(mainItem.height - root.height, mainFlickable.contentY + oldMouseY - mouse.y);
- break;
- case Qt.TopEdge:
- mainFlickable.contentY = Math.max(0, mainFlickable.contentY + oldMouseY - mouse.y);
- break;
- }
- }
- oldMouseX = mouse.x;
- oldMouseY = mouse.y;
- }
- onReleased: {
- if (!startDragging) {
- return;
- }
- speedSampler.running = false;
- if (speedSampler.speed != 0) {
- if (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) {
- mainFlickable.flick(speedSampler.speed, 0);
- } else {
- mainFlickable.flick(0, speedSampler.speed);
- }
- } else {
- if (mainFlickable.internalPosition > 0.5) {
- root.open();
- } else {
- root.close();
- }
- }
- }
- }
-
- MouseArea {
- id: handleMouseArea
- z:999
- anchors {
- right: root.edge == Qt.LeftEdge ? undefined : parent.right
- left: root.edge == Qt.RightEdge ? undefined : parent.left
- bottom: parent.bottom
- leftMargin: root.opened ? drawerPage.width : 0
- rightMargin: root.opened ? drawerPage.width : 0
- }
- visible: root.handleVisible && (root.edge == Qt.LeftEdge || root.edge == Qt.RightEdge)
- width: Units.iconSizes.medium
- height: width
- onPressed: edgeMouse.managePress(mouse);
- onPositionChanged: edgeMouse.positionChanged(mouse);
- onReleased: edgeMouse.released(mouse);
- onClicked: root.opened ? root.close() : root.open();
- }
-
- Timer {
- id: speedSampler
- interval: 100
- repeat: true
- property real speed
- property real oldContentX
- property real oldContentY
- onTriggered: {
- if (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) {
- speed = (mainFlickable.contentX - oldContentX) * 10;
- oldContentX = mainFlickable.contentX;
- } else {
- speed = (mainFlickable.contentY - oldContentY) * 10;
- oldContentY = mainFlickable.contentY;
- }
- }
- onRunningChanged: {
- if (running) {
- speed = 0;
- oldContentX = mainFlickable.contentX;
- oldContentY = mainFlickable.contentY;
- } else {
- if (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) {
- speed = (oldContentX - mainFlickable.contentX) * 10;
- } else {
- speed = (oldContentY - mainFlickable.contentY) * 10;
- }
- }
- }
- }
-
- MouseArea {
- id: mainMouseArea
- anchors.fill: parent
- drag.filterChildren: true
- onClicked: {
- if ((root.edge == Qt.LeftEdge && mouse.x < drawerPage.width) ||
- (root.edge == Qt.RightEdge && mouse.x > drawerPage.x - mainFlickable.contentX) ||
- (root.edge == Qt.TopEdge && mouse.y < drawerPage.height) ||
- (root.edge == Qt.BottomEdge && mouse.y > drawerPage.y - mainFlickable.contentY)) {
- return;
- }
- root.clicked();
- root.close();
- }
- enabled: (root.edge == Qt.LeftEdge && !mainFlickable.atXEnd) ||
- (root.edge == Qt.RightEdge && !mainFlickable.atXBeginning) ||
- (root.edge == Qt.TopEdge && !mainFlickable.atYEnd) ||
- (root.edge == Qt.BottomEdge && !mainFlickable.atYBeginning) ||
- mainFlickable.moving
-
- Flickable {
- id: mainFlickable
- property bool open
- anchors.fill: parent
- interactive: root.modal
- onOpenChanged: {
- if (open) {
- root.open();
- Qt.inputMethod.hide();
- } else {
- root.close();
- }
- }
- enabled: parent.enabled
- flickableDirection: root.edge == Qt.LeftEdge || root.edge == Qt.RightEdge ? Flickable.HorizontalFlick : Flickable.VerticalFlick
- contentWidth: mainItem.width
- contentHeight: mainItem.height
- boundsBehavior: Flickable.StopAtBounds
- readonly property real internalPosition: {
- switch (root.edge) {
- case Qt.RightEdge:
- return mainFlickable.contentX/drawerPage.width;
- case Qt.LeftEdge:
- return 1 - (mainFlickable.contentX/drawerPage.width);
- case Qt.BottomEdge:
- return mainFlickable.contentY/drawerPage.height;
- case Qt.TopEdge:
- return 1 - (mainFlickable.contentY/drawerPage.height);
- }
- }
- property bool loopCheck: false
- onInternalPositionChanged: {
- if (!loopCheck) {
- loopCheck = true;
- root.position = internalPosition;
- loopCheck = false;
- }
- }
-
- onFlickingChanged: {
- if (!flicking) {
- if (internalPosition > 0.5) {
- root.open();
- } else {
- root.close();
- }
- }
- }
- onMovingChanged: {
- if (!moving) {
- flickingChanged();
- }
- }
-
- Item {
- id: mainItem
- width: root.width + ((root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) ? drawerPage.width : 0)
- height: root.height + ((root.edge == Qt.TopEdge || root.edge == Qt.BottomEdge) ? drawerPage.height : 0)
- onWidthChanged: {
- if (root.edge == Qt.LeftEdge) {
- if (root.opened) {
- mainFlickable.contentX = 0;
- } else {
- mainFlickable.contentX = drawerPage.width;
- }
- }
- }
- onHeightChanged: {
- if (root.edge == Qt.TopEdge) {
- mainFlickable.contentY = drawerPage.Height;
- }
- }
-
-
- Item {
- id: drawerPage
- z: 3
- anchors {
- left: root.edge != Qt.RightEdge ? parent.left : undefined
- right: root.edge != Qt.LeftEdge ? parent.right : undefined
- top: root.edge != Qt.BottomEdge ? parent.top : undefined
- bottom: root.edge != Qt.TopEdge ? parent.bottom : undefined
- }
-
- clip: true
- width: root.contentItem ? Math.min(root.contentItem.implicitWidth, root.width * 0.7) : 0
- height: root.contentItem ? Math.min(root.contentItem.implicitHeight, root.height * 0.7) : 0
- }
- }
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/templates/OverlaySheet.qml b/kstars/kstarslite/kirigami-lib/src/controls/templates/OverlaySheet.qml
deleted file mode 100644
index 4570540..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/templates/OverlaySheet.qml
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
-* Copyright (C) 2016 by Marco Martin <mart@kde.org>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU Library General Public License as
-* published by the Free Software Foundation; either version 2, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Library General Public License for more details
-*
-* You should have received a copy of the GNU Library General Public
-* License along with this program; if not, write to the
-* Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
-*/
-
-import QtQuick 2.5
-import QtQuick.Controls 1.3 as Controls
-import org.kde.kirigami 1.0
-import QtGraphicalEffects 1.0
-import "private"
-
-/**
- * An overlay sheet that covers the current Page content.
- * Its contents can be scrolled up or down, scrolling all the way up or
- * all the way down, dismisses it.
- * Use this for big, modal dialogs or information display, that can't be
- * logically done as a new separate Page, even if potentially
- * are taller than the screen space.
- */
-Item {
- id: root
-
- z: 999
-
- anchors.fill: parent
- visible: false
-
- /**
- * contentItem: Item
- * This property holds the visual content item.
- *
- * Note: The content item is automatically resized inside the
- * padding of the control.
- */
- default property Item contentItem
-
- /**
- * opened: bool
- * If true the sheet is open showing the contents of the OverlaySheet
- * component.
- */
- property bool opened
-
- /**
- * leftPadding: int
- * default contents padding at left
- */
- property int leftPadding: Units.gridUnit
-
- /**
- * topPadding: int
- * default contents padding at top
- */
- property int topPadding: Units.gridUnit
-
- /**
- * rightPadding: int
- * default contents padding at right
- */
- property int rightPadding: Units.gridUnit
-
- /**
- * bottomPadding: int
- * default contents padding at bottom
- */
- property int bottomPadding: Units.gridUnit
-
- /**
- * background: Item
- * This property holds the background item.
- *
- * Note: If the background item has no explicit size specified,
- * it automatically follows the control's size.
- * In most cases, there is no need to specify width or
- * height for a background item.
- */
- property Item background
-
-
- function open() {
- root.visible = true;
- openAnimation.from = -root.height;
- openAnimation.to = openAnimation.topOpenPosition;
- openAnimation.running = true;
- root.opened = true;
- }
-
- function close() {
- if (mainFlickable.contentY < 0) {
- closeAnimation.to = -height;
- } else {
- closeAnimation.to = flickableContents.height;
- }
- closeAnimation.running = true;
- }
-
- Rectangle {
- anchors.fill: parent
- color: Theme.textColor
- opacity: 0.6 * Math.min(
- (Math.min(mainFlickable.contentY + mainFlickable.height, mainFlickable.height) / mainFlickable.height),
- (2 + (mainFlickable.contentHeight - mainFlickable.contentY - mainFlickable.topMargin - mainFlickable.bottomMargin)/mainFlickable.height))
- }
-
-
- Component.onCompleted: {
- mainFlickable.interactive = true;
- }
- onBackgroundChanged: {
- background.parent = flickableContents;
- background.z = -1;
- }
- onContentItemChanged: {
- contentItem.parent = contentItemParent;
- contentItem.anchors.left = contentItemParent.left;
- contentItem.anchors.right = contentItemParent.right;
- }
- onOpenedChanged: {
- if (opened) {
- open();
- } else {
- close();
- Qt.inputMethod.hide();
- }
- }
- onHeightChanged: {
- var focusItem;
-
- if (typeof applicationWindow !== "undefined") {
- focusItem = applicationWindow().activeFocusItem;
- //fallback: hope activeFocusItem is in context
- } else {
- focusItem = activeFocusItem;
- }
-
- if (!activeFocusItem) {
- return;
- }
-
- //NOTE: there is no function to know if an item is descended from another,
- //so we have to walk the parent hyerarchy by hand
- var isDescendent = false;
- var candidate = focusItem.parent;
- while (candidate) {
- if (candidate == root) {
- isDescendent = true;
- break;
- }
- candidate = candidate.parent;
- }
- if (!isDescendent) {
- return;
- }
-
- var cursorY = 0;
- if (focusItem.cursorPosition !== undefined) {
- cursorY = focusItem.positionToRectangle(focusItem.cursorPosition).y;
- }
-
-
- var pos = focusItem.mapToItem(flickableContents, 0, cursorY - Units.gridUnit*3);
- //focused item alreqady visible? add some margin for the space of the action buttons
- if (pos.y >= mainFlickable.contentY && pos.y <= mainFlickable.contentY + mainFlickable.height - Units.gridUnit * 8) {
- return;
- }
- mainFlickable.contentY = pos.y;
- }
-
-
- NumberAnimation {
- id: openAnimation
- property int topOpenPosition: Math.min(-root.height*0.15, flickableContents.height - root.height + Units.gridUnit * 5)
- property int bottomOpenPosition: (flickableContents.height - root.height) + (Units.gridUnit * 5)
- target: mainFlickable
- properties: "contentY"
- from: -root.height
- to: topOpenPosition
- duration: Units.longDuration
- easing.type: Easing.OutQuad
- }
-
- SequentialAnimation {
- id: closeAnimation
- property int to: -root.height
- NumberAnimation {
- target: mainFlickable
- properties: "contentY"
- to: closeAnimation.to
- duration: Units.longDuration
- easing.type: Easing.InQuad
- }
- ScriptAction {
- script: root.visible = root.opened = false;
- }
- }
-
- MouseArea {
- anchors.fill: parent
- z: 2
- drag.filterChildren: true
-
- onClicked: {
- var pos = mapToItem(flickableContents, mouse.x, mouse.y);
- if (!flickableContents.contains(pos)) {
- root.close();
- }
- }
-
- Controls.ScrollView {
- id: scrollView
- anchors.fill: parent
- Flickable {
- id: mainFlickable
- topMargin: height
- contentWidth: width
- contentHeight: flickableContents.height;
- flickableDirection: Flickable.VerticalFlick
- Item {
- width: mainFlickable.width
- height: flickableContents.height
- Item {
- id: flickableContents
- anchors.horizontalCenter: parent.horizontalCenter
- width: root.contentItem.implicitWidth <= 0 ? root.width : Math.max(root.width/2, Math.min(root.width, root.contentItem.implicitWidth))
- height: contentItem.height + topPadding + bottomPadding + Units.iconSizes.medium + Units.gridUnit
- Item {
- id: contentItemParent
- anchors {
- fill: parent
- leftMargin: leftPadding
- topMargin: topPadding
- rightMargin: rightPadding
- bottomMargin: bottomPadding
- }
- }
- }
- }
- bottomMargin: height
- onMovementEnded: {
- //close
- if ((root.height + mainFlickable.contentY) < root.height/2) {
- closeAnimation.to = -root.height;
- closeAnimation.running = true;
- } else if ((root.height*0.6 + mainFlickable.contentY) > flickableContents.height) {
- closeAnimation.to = flickableContents.height
- closeAnimation.running = true;
-
- //reset to the default opened position
- } else if (mainFlickable.contentY < openAnimation.topOpenPosition) {
- openAnimation.from = mainFlickable.contentY;
- openAnimation.to = openAnimation.topOpenPosition;
- openAnimation.running = true;
- //reset to the default "bottom" opened position
- } else if (mainFlickable.contentY > openAnimation.bottomOpenPosition) {
- openAnimation.from = mainFlickable.contentY;
- openAnimation.to = openAnimation.bottomOpenPosition;
- openAnimation.running = true;
- }
- }
- onFlickEnded: movementEnded();
- }
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/templates/SplitDrawer.qml b/kstars/kstarslite/kirigami-lib/src/controls/templates/SplitDrawer.qml
deleted file mode 100644
index 6eb089d..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/templates/SplitDrawer.qml
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright 2012 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import org.kde.kirigami 1.0
-import "private"
-
-/**
- * Split Drawers are used to expose additional UI elements which are optional
- * and can be used in conjunction with the main UI elements.
- * For example the Resource Browser uses a Split Drawer to select
- * different kinds of filters for the main view.
- */
-AbstractDrawer {
- id: root
- z:0
-
- visible: true
-
- /**
- * page: Item
- * It's the default property. it's the main content of the drawer page,
- * the part that is always shown
- */
- default property alias page: mainPage.data
-
- /**
- * contentItem: Item
- * It's the part that can be pulled in and out, will act as a sidebar.
- */
- property Item contentItem
-
- /**
- * opened: bool
- * If true the drawer is open showing the contents of the "drawer"
- * component.
- */
- property alias opened: sidebar.open
-
- /**
- * position: real
- * This property holds the position of the drawer relative to its
- * final destination. That is, the position will be 0 when the
- * drawer is fully closed, and 1 when fully open.
- */
- property real position: 0
-
- /**
- * modal: bool
- * If true the drawer will be an overlay of the main content,
- * obscuring it and blocking input.
- * If false, the drawer will look like a sidebar, with the main content
- * application still usable.
- * It is recomended to use modal on mobile devices and not modal on desktop
- * devices.
- * Default is true
- */
- //property bool modal: true
-
- /**
- * background: Item
- * This property holds the background item.
- *
- * Note: If the background item has no explicit size specified,
- * it automatically follows the control's size.
- * In most cases, there is no need to specify width or
- * height for a background item.
- */
- property Item background
-
- onBackgroundChanged: {
- background.parent = browserFrame;
- background.anchors.fill = browserFrame;
- background.z = -1;
- }
-
- Component.onCompleted: {
- mainPage.width = browserFrame.width
- contentItem.parent = drawerPage
- }
-
- onPositionChanged: {
- if (!browserFrame.loopCheck) {
- browserFrame.loopCheck = true;
- browserFrame.x = position * drawerPage.width;
- browserFrame.loopCheck = false;
- }
- }
- onContentItemChanged: contentItem.parent = drawerPage
- MouseArea {
- id: mouseEventListener
- z: 200
- drag.filterChildren: true
- //drag.target: browserFrame
- property int startMouseX
- property int oldMouseX
- property int startBrowserFrameX
- property bool toggle: false
- property string startState
- enabled: root.modal
-
- anchors.fill: parent
-
- onPressed: {
- if (drawerPage.children.length == 0 || (browserFrame.state == "Closed" && mouse.x > Units.gridUnit) ||
- mouse.x < browserFrame.x) {
- mouse.accepted = false;
- return;
- }
-
- toggle = true;
- startBrowserFrameX = browserFrame.x;
- oldMouseX = startMouseX = mouse.x;
- startState = browserFrame.state;
- browserFrame.state = "Dragging";
- browserFrame.x = startBrowserFrameX;
- }
-
- onPositionChanged: {
- browserFrame.x = Math.max(0, browserFrame.x + mouse.x - oldMouseX);
- oldMouseX = mouse.x;
- if (Math.abs(mouse.x - startMouseX) > Units.gridUnit * 2) {
- toggle = false;
- }
- }
-
- onReleased: {
- if (toggle) {
- browserFrame.state = startState == "Open" ? "Closed" : "Open"
- } else if (browserFrame.x < drawerPage.width / 2) {
- browserFrame.state = "Closed";
- } else {
- browserFrame.state = "Open";
- }
- }
- onClicked: root.clicked()
- }
-
- Item {
- id: browserFrame
- z: 100
- state: sidebar.open ? "Open" : "Closed"
- onStateChanged: sidebar.open = (state != "Closed")
- readonly property real position: Math.abs(x) / drawerPage.width
- property bool loopCheck: false
- onPositionChanged: {
- if (!loopCheck) {
- loopCheck = true;
- root.position = position;
- loopCheck = false;
- }
- }
-
- anchors {
- top: parent.top
- bottom: parent.bottom
- }
- width: root.width;
-
- Item {
- id: mainPage
- onChildrenChanged: mainPage.children[0].anchors.fill = mainPage
-
- anchors.fill: parent
- }
-
- Rectangle {
- anchors.fill: parent
- color: "black"
- opacity: Math.min(0.4, 0.4 * (browserFrame.x / drawerPage.width))
- visible: root.modal
- }
-
- states: [
- State {
- name: "Open"
- PropertyChanges {
- target: browserFrame
- x: drawerPage.width
- }
-
- },
- State {
- name: "Dragging"
- PropertyChanges {
- target: browserFrame
- x: mouseEventListener.startBrowserFrameX
- }
- },
- State {
- name: "Closed"
- PropertyChanges {
- target: browserFrame
- x: 0
- }
- }
- ]
-
- transitions: [
- Transition {
- //Exclude Dragging
- to: "Open,Closed,Hidden"
- NumberAnimation {
- properties: "x"
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
- }
- ]
- }
-
-
- Item {
- id: sidebar
-
- property bool open: false
- onOpenChanged: {
- if (drawerPage.children.length == 0) {
- return;
- }
-
- if (open) {
- browserFrame.state = "Open";
- } else {
- browserFrame.state = "Closed";
- }
- }
-
- width: browserFrame.x
- clip: true
-
- anchors {
- left: parent.left
- top: parent.top
- bottom: parent.bottom
- }
-
- Item {
- id: drawerPage
- width: Math.min(root.width/4*3, Math.max(root.contentItem ? root.contentItem.implicitWidth : 0, root.width/4))
- anchors {
- top: parent.top
- bottom: parent.bottom
- left: parent.left
- topMargin: (applicationWindow !== undefined && applicationWindow().header) && modal ? applicationWindow().header.height : 0
- }
- clip: false
- onChildrenChanged: drawerPage.children[0].anchors.fill = drawerPage
- }
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/templates/SwipeListItem.qml b/kstars/kstarslite/kirigami-lib/src/controls/templates/SwipeListItem.qml
deleted file mode 100644
index a263c44..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/templates/SwipeListItem.qml
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Copyright 2010 Marco Martin <notmart@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
- */
-
-import QtQuick 2.5
-import QtQuick.Layouts 1.2
-import QtQuick.Controls 1.0 as Controls
-import QtQuick.Controls.Private 1.0
-import org.kde.kirigami 1.0
-import "../private"
-
-/**
- * An item delegate Intended to support extra actions obtainable
- * by uncovering them by dragging away the item with the handle
- * This acts as a container for normal list items.
- * Any subclass of AbstractListItem can be assigned as the contentItem property.
- * @code
- * ListView {
- * model: myModel
- * delegate: SwipeListItem {
- * Label {
- * text: model.text
- * }
- * actions: [
- * Action {
- * iconName: "document-decrypt"
- * onTriggered: print("Action 1 clicked")
- * },
- * Action {
- * iconName: model.action2Icon
- * onTriggered: //do something
- * }
- * ]
- * }
- *
- * }
- * @endcode
- *
- * @inherit QtQuick.Item
- */
-Item {
- id: listItem
-
-//BEGIN properties
- /**
- * contentItem: Item
- * This property holds the visual content item.
- *
- * Note: The content item is automatically resized inside the
- * padding of the control.
- */
- default property Item contentItem
-
- /**
- * supportsMouseEvents: bool
- * Holds if the item emits signals related to mouse interaction.
- *TODO: remove
- * The default value is false.
- */
- property alias supportsMouseEvents: itemMouse.enabled
-
- /**
- * clicked: signal
- * This signal is emitted when there is a click.
- *
- * This is disabled by default, set enabled to true to use it.
- * @see enabled
- */
- signal clicked
-
-
- /**
- * pressAndHold: signal
- * The user pressed the item with the mouse and didn't release it for a
- * certain amount of time.
- *
- * This is disabled by default, set enabled to true to use it.
- * @see enabled
- */
- signal pressAndHold
-
- /**
- * checked: bool
- * If true makes the list item look as checked or pressed. It has to be set
- * from the code, it won't change by itself.
- */
- property bool checked: false
-
- /**
- * pressed: bool
- * True when the user is pressing the mouse over the list item and
- * supportsMouseEvents is set to true
- */
- property alias pressed: itemMouse.pressed
-
- /**
- * containsMouse: bool
- * True when the user hover the mouse over the list item
- * NOTE: on mobile touch devices this will be true only when pressed is also true
- */
- property alias containsMouse: itemMouse.containsMouse
-
- /**
- * sectionDelegate: bool
- * If true the item will be a delegate for a section, so will look like a
- * "title" for the items under it.
- */
- property bool sectionDelegate: false
-
- /**
- * separatorVisible: bool
- * True if the separator between items is visible
- * default: true
- */
- property bool separatorVisible: true
-
- /**
- * actions: list<Action>
- * Defines the actions for the list item: at most 4 buttons will
- * contain the actions for the item, that can be revealed by
- * sliding away the list item.
- */
- property list<Action> actions
-
-
- /**
- * position: real
- * This property holds the position of the dragged list item relative to its
- * final destination (just like the Drawer). That is, the position
- * will be 0 when the list item is fully closed, and 1 when fully open.
- */
- property real position: 0
-
- /**
- * background: Item
- * This property holds the background item.
- *
- * Note: If the background item has no explicit size specified,
- * it automatically follows the control's size.
- * In most cases, there is no need to specify width or
- * height for a background item.
- */
- property Item background
-
- Item {
- id: behindItem
- parent: listItem
- anchors {
- fill: parent
- leftMargin: height
- }
- Rectangle {
- id: shadowHolder
- color: Theme.backgroundColor
- anchors.fill: parent
- }
- EdgeShadow {
- edge: Qt.TopEdge
- anchors {
- right: parent.right
- left: parent.left
- top: parent.top
- }
- }
- EdgeShadow {
- edge: Qt.LeftEdge
- x: behindItem.width - (behindItem.width * listItem.position)
- anchors {
- top: parent.top
- bottom: parent.bottom
- }
- }
- }
-
- implicitWidth: parent ? parent.width : contentItem.width + paddingItem.anchors.margins * 2
- implicitHeight: contentItem.height + Units.smallSpacing * 5
-//END properties
-
-//BEGIN signal handlers
- onBackgroundChanged: {
- background.parent = itemMouse;
- background.anchors.fill = itemMouse;
- background.z = 0;
- }
-
- onContentItemChanged: {
- contentItem.parent = paddingItem
- contentItem.z = 0;
- }
-
- Component.onCompleted: {
-
- if (background) {
- background.parent = itemMouse;
- background.z = 0;
- }
-
- contentItem.parent = itemMouse
- contentItem.z = 1;
- }
-
- onPositionChanged: {
- if (!mainFlickable.loopCheck && !handleMouse.pressed && !mainFlickable.flicking &&
- !mainFlickable.dragging && !positionAnimation.running) {
- mainFlickable.contentX = (listItem.width-listItem.height) * mainFlickable.internalPosition;
- }
- }
-//END signal handlers
-
-//BEGIN UI implementation
- RowLayout {
- id: actionsLayout
- z: 1
- anchors {
- right: parent.right
- verticalCenter: parent.verticalCenter
- rightMargin: y
- }
- height: Math.min( parent.height / 1.5, Units.iconSizes.medium)
- property bool exclusive: false
- property Item checkedButton
- spacing: Units.largeSpacing
- Repeater {
- model: {
- if (listItem.actions.length == 0) {
- return null;
- } else {
- return listItem.actions[0].text !== undefined &&
- listItem.actions[0].trigger !== undefined ?
- listItem.actions :
- listItem.actions[0];
- }
- }
- delegate: Icon {
- Layout.fillHeight: true
- Layout.minimumWidth: height
- source: modelData.iconName
- MouseArea {
- anchors {
- fill: parent
- margins: -Units.smallSpacing
- }
- onClicked: {
- if (modelData && modelData.trigger !== undefined) {
- modelData.trigger();
- // assume the model is a list of QAction or Action
- } else if (toolbar.model.length > index) {
- toolbar.model[index].trigger();
- } else {
- console.log("Don't know how to trigger the action")
- }
- positionAnimation.to = 0;
- positionAnimation.running = true;
- }
- }
- }
- }
- }
-
- PropertyAnimation {
- id: positionAnimation
- target: mainFlickable
- properties: "contentX"
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
-
- Flickable {
- id: mainFlickable
- z: 2
- interactive: false
- boundsBehavior: Flickable.StopAtBounds
- anchors.fill: parent
- contentWidth: mainItem.width
- contentHeight: height
- onFlickEnded: {
- if (contentX > width / 2) {
- positionAnimation.to = width - height;
- } else {
- positionAnimation.to = 0;
- }
- positionAnimation.running = true;
- }
- readonly property real internalPosition: (mainFlickable.contentX/(listItem.width-listItem.height));
- property bool loopCheck: false
- onInternalPositionChanged: {
- if (!loopCheck) {
- loopCheck = true;
- listItem.position = internalPosition;
- loopCheck = false;
- }
- }
-
- Item {
- id: mainItem
- width: (mainFlickable.width * 2) - height
- height: mainFlickable.height
- MouseArea {
- id: itemMouse
- anchors {
- left: parent.left
- top: parent.top
- bottom: parent.bottom
- }
- hoverEnabled: !Settings.isMobile
- width: mainFlickable.width
- onClicked: listItem.clicked()
- onPressAndHold: listItem.pressAndHold()
-
- Item {
- id: paddingItem
- anchors {
- fill: parent
- margins: Units.smallSpacing
- }
- }
- }
-
- MouseArea {
- id: handleMouse
- anchors {
- left: itemMouse.right
- top: parent.top
- bottom: parent.bottom
- leftMargin: -height
- }
- preventStealing: true
- width: mainFlickable.width - actionsLayout.width
- property var downTimestamp;
- property int startX
- property int startMouseX
-
- onClicked: {
- if (Math.abs(startX - mainFlickable.contentX) > Units.gridUnit ||
- Math.abs(startMouseX - mouse.x) > Units.gridUnit) {
- return;
- }
- if (mainFlickable.contentX > mainFlickable.width / 2) {
- positionAnimation.to = 0;
- } else {
- positionAnimation.to = mainFlickable.width - mainFlickable.height;
- }
- positionAnimation.running = true;
- }
- onPressed: {
- downTimestamp = (new Date()).getTime();
- startX = mainFlickable.contentX;
- startMouseX = mouse.x;
- }
- onPositionChanged: {
- mainFlickable.contentX = Math.max(0, Math.min(mainFlickable.width - height, mainFlickable.contentX + (startMouseX - mouse.x)))
- }
- onReleased: {
- var speed = ((startX - mainFlickable.contentX) / ((new Date()).getTime() - downTimestamp) * 1000);
- mainFlickable.flick(speed, 0);
- }
- Icon {
- id: handleIcon
- anchors.verticalCenter: parent.verticalCenter
- selected: listItem.checked || (listItem.pressed && !listItem.checked && !listItem.sectionDelegate)
- width: Units.iconSizes.smallMedium
- height: width
- x: y
- source: (mainFlickable.contentX > mainFlickable.width / 2) ? "handle-right" : "handle-left"
- }
- }
- }
- }
-//END UI implementation
-
- Accessible.role: Accessible.ListItem
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/templates/private/AbstractDrawer.qml b/kstars/kstarslite/kirigami-lib/src/controls/templates/private/AbstractDrawer.qml
deleted file mode 100644
index e80d0d8..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/templates/private/AbstractDrawer.qml
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtGraphicalEffects 1.0
-import org.kde.kirigami 1.0
-
-//TODO: This will become a QQC2 Drawer
-//providing just a dummy api for now
-Item {
- id: root
- anchors {
- fill: parent
- topMargin: !modal && applicationWindow !== undefined && applicationWindow().header && applicationWindow().controlsVisible ? applicationWindow().header.height : 0
- }
- z: 9999
-
- default property alias page: mainPage.data
- property Item contentItem
- property bool opened
- property int edge: Qt.LeftEdge
- property real position: 0
- property bool modal: true
-
- function open () { }
- function close () { }
- signal clicked
-
- Item {
- id: mainPage
- anchors.fill: parent
- onChildrenChanged: mainPage.children[0].anchors.fill = mainPage
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/templates/private/BackButton.qml b/kstars/kstarslite/kirigami-lib/src/controls/templates/private/BackButton.qml
deleted file mode 100644
index f401773..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/templates/private/BackButton.qml
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Controls 1.0 as Controls
-import QtQuick.Controls.Private 1.0
-import org.kde.kirigami 1.0
-
-MouseArea {
- anchors {
- left: parent.left
- top: parent.top
- bottom: parent.bottom
- }
- opacity: !Settings.isMobile &&__appWindow.pageStack.currentIndex < 1 ? 0.4 : 1
- width: height
- z: 99
- onClicked: applicationWindow().pageStack.goBack();
-
- Icon {
- anchors.fill: parent
- selected: header.background && header.background.color && header.background.color == Theme.highlightColor
- source: "go-previous"
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/templates/private/ContextIcon.qml b/kstars/kstarslite/kirigami-lib/src/controls/templates/private/ContextIcon.qml
deleted file mode 100644
index 915a55e..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/templates/private/ContextIcon.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Layouts 1.2
-import QtGraphicalEffects 1.0
-import org.kde.kirigami 1.0
-
-Item {
- id: canvas
- width: height
- height: Units.iconSizes.smallMedium
- property real morph: 0
- property color color: Theme.textColor
- opacity: 0.8
- layer.enabled: true
-
- Rectangle {
- anchors {
- horizontalCenter: parent.horizontalCenter
- top: parent.top
- leftMargin: canvas.width/4 * morph
- }
- antialiasing: true
- transformOrigin: Item.Left
- width: (1 - morph) * height + morph * ((parent.width / Math.sqrt(2)) - height/2)
- height: Math.round(Units.smallSpacing / 2)
- color: canvas.color
- rotation: 45 * morph
- }
-
- Rectangle {
- anchors.centerIn: parent
- width: height * (1 - morph)
- height: Math.round(Units.smallSpacing / 2)
- color: canvas.color
- }
-
-
- Rectangle {
- anchors {
- horizontalCenter: parent.horizontalCenter
- bottom: parent.bottom
- leftMargin: canvas.width/4 * morph
- }
- antialiasing: true
- transformOrigin: Item.Left
- width: (1 - morph) * height + morph * ((parent.width / Math.sqrt(2)) - height/2)
- height: Math.round(Units.smallSpacing / 2)
- color: canvas.color
- rotation: -45 * morph
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/templates/private/MenuIcon.qml b/kstars/kstarslite/kirigami-lib/src/controls/templates/private/MenuIcon.qml
deleted file mode 100644
index 159d403..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/templates/private/MenuIcon.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import QtQuick.Layouts 1.2
-import QtGraphicalEffects 1.0
-import org.kde.kirigami 1.0
-
-Item {
- id: canvas
- width: height
- height: Units.iconSizes.smallMedium
- property real morph: 0
- property color color: Theme.textColor
- opacity: 0.8
- layer.enabled: true
-
- Rectangle {
- anchors {
- right: parent.right
- top: parent.top
- rightMargin: canvas.width/4 * morph
- }
- antialiasing: true
- transformOrigin: Item.Right
- width: (1 - morph) * parent.width + morph * ((parent.width / Math.sqrt(2)) - height/2)
- height: Math.round(Units.smallSpacing / 2)
- color: canvas.color
- rotation: -45 * morph
- }
-
- Rectangle {
- anchors.centerIn: parent
- width: parent.width - parent.width * morph
- height: Math.round(Units.smallSpacing / 2)
- color: canvas.color
- }
-
- Rectangle {
- anchors {
- right: parent.right
- bottom: parent.bottom
- rightMargin: canvas.width/4 * morph
- }
- antialiasing: true
- transformOrigin: Item.Right
- width: (1 - morph) * parent.width + morph * ((parent.width / Math.sqrt(2)) - height/2)
- height: Math.round(Units.smallSpacing / 2)
- color: canvas.color
- rotation: 45 * morph
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/controls/templates/private/PageRow.qml b/kstars/kstarslite/kirigami-lib/src/controls/templates/private/PageRow.qml
deleted file mode 100644
index 0c50468..0000000
--- a/kstars/kstarslite/kirigami-lib/src/controls/templates/private/PageRow.qml
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.5
-import QtQuick.Layouts 1.2
-import org.kde.kirigami 1.0
-
-Item {
- id: root
-
-//BEGIN PROPERTIES
- /**
- * This property holds the number of items currently pushed onto the view
- */
- readonly property alias depth: pagesLogic.count
-
- /**
- * The last Page in the Row
- */
- readonly property Item lastItem: pagesLogic.count ? pagesLogic.get(pagesLogic.count - 1).page : null
-
- /**
- * The currently visible Item
- */
- readonly property Item currentItem: mainFlickable.currentItem
-
- /**
- * the index of the currently visible Item
- */
- property alias currentIndex: mainFlickable.currentIndex
-
- /**
- * The initial item when this PageRow is created
- */
- property variant initialPage
-
- /**
- * The main flickable of this Row
- */
- property alias contentItem: mainFlickable
-
- /**
- * The default width for a column
- * default is wide enough for 30 grid units.
- * Pages can override it with their Layout.fillWidth,
- * implicitWidth Layout.minimumWidth etc.
- */
- property int defaultColumnWidth: Units.gridUnit * 20
-
- /**
- * interactive: bool
- * If true it will be possible to go back/forward by dragging the
- * content themselves with a gesture.
- * Otherwise the only way to go back will be programmatically
- * default: true
- */
- property alias interactive: mainFlickable.interactive
-
-//END PROPERTIES
-
-//BEGIN FUNCTIONS
- /**
- * Pushes a page on the stack.
- * The page can be defined as a component, item or string.
- * If an item is used then the page will get re-parented.
- * If a string is used then it is interpreted as a url that is used to load a page
- * component.
- *
- * @param page The page can also be given as an array of pages.
- * In this case all those pages will
- * be pushed onto the stack. The items in the stack can be components, items or
- * strings just like for single pages.
- * Additionally an object can be used, which specifies a page and an optional
- * properties property.
- * This can be used to push multiple pages while still giving each of
- * them properties.
- * When an array is used the transition animation will only be to the last page.
- *
- * @param properties The properties argument is optional and allows defining a
- * map of properties to set on the page.
- * @return The new created page
- */
- function push(page, properties) {
- pop(currentItem);
-
- // figure out if more than one page is being pushed
- var pages;
- if (page instanceof Array) {
- pages = page;
- page = pages.pop();
- if (page.createObject === undefined && page.parent === undefined && typeof page != "string") {
- properties = properties || page.properties;
- page = page.page;
- }
- }
-
- // push any extra defined pages onto the stack
- if (pages) {
- var i;
- for (i = 0; i < pages.length; i++) {
- var tPage = pages[i];
- var tProps;
- if (tPage.createObject === undefined && tPage.parent === undefined && typeof tPage != "string") {
- tProps = tPage.properties;
- tPage = tPage.page;
- }
-
- var container = pagesLogic.initPage(tPage, tProps);
- pagesLogic.append(container);
- }
- }
-
- // initialize the page
- var container = pagesLogic.initPage(page, properties);
- pagesLogic.append(container);
- container.visible = container.page.visible = true;
-
- mainFlickable.currentIndex = container.level;
- return container.page
- }
-
- /**
- * Pops a page off the stack.
- * @param page If page is specified then the stack is unwound to that page,
- * to unwind to the first page specify
- * page as null.
- * @return The page instance that was popped off the stack.
- */
- function pop(page) {
- if (depth == 0) {
- return;
- }
-
- var oldPage = pagesLogic.get(pagesLogic.count-1).page;
- if (page !== undefined) {
- // an unwind target has been specified - pop until we find it
- while (page != oldPage && pagesLogic.count > 1) {
- pagesLogic.remove(oldPage.parent.level);
-
- oldPage = pagesLogic.get(pagesLogic.count-1).page;
- }
- } else {
- pagesLogic.remove(pagesLogic.count-1);
- }
- }
-
- /**
- * Replaces a page on the stack.
- * @param page The page can also be given as an array of pages.
- * In this case all those pages will
- * be pushed onto the stack. The items in the stack can be components, items or
- * strings just like for single pages.
- * Additionally an object can be used, which specifies a page and an optional
- * properties property.
- * This can be used to push multiple pages while still giving each of
- * them properties.
- * When an array is used the transition animation will only be to the last page.
- * @param properties The properties argument is optional and allows defining a
- * map of properties to set on the page.
- * @see push() for details.
- */
- function replace(page, properties) {
- if (currentIndex>=1)
- pop(pagesLogic.get(currentIndex-1).page);
- else if (currentIndex==0)
- pop();
- else
- console.warn("There's no page to replace");
- return push(page, properties);
- }
-
- /**
- * Clears the page stack.
- * Destroy (or reparent) all the pages contained.
- */
- function clear() {
- return pagesLogic.clear();
- }
-
- function get(idx) {
- return pagesLogic.get(idx).page;
- }
-
-//END FUNCTIONS
-
- QtObject {
- id: pagesLogic
-
- readonly property int count: mainLayout.children.length
- property var componentCache
-
- property int roundedDefaultColumnWidth: Math.floor(root.width/root.defaultColumnWidth) > 0 ? root.width/Math.floor(root.width/root.defaultColumnWidth) : root.width
-
- //NOTE:seems to only work if the array is defined in a declarative way,
- //the Object in an imperative way, espacially on Android
- Component.onCompleted: {
- componentCache = {};
- }
-
- //TODO: remove?
- function get(id) {
- return mainLayout.children[id];
- }
-
- function append(item) {
- //FIXME: seems that for one loop the x of the item would continue to be 0
- item.x = item.level * roundedDefaultColumnWidth;
- item.parent = mainLayout;
- }
-
- function clear () {
- while (mainLayout.children.length > 0) {
- remove(0);
- }
- }
-
- function remove(id) {
- if (id < 0 || id >= count) {
- print("Tried to remove an invalid page index:" + id);
- return;
- }
-
- var item = mainLayout.children[id];
- if (item.owner) {
- item.page.parent = item.owner;
- }
- //FIXME: why reparent ing is necessary?
- //is destroy just an async deleteLater() that isn't executed immediately or it actually leaks?
- item.parent = root;
- item.destroy();
- }
-
- function initPage(page, properties) {
- var container = containerComponent.createObject(mainLayout, {
- "level": pagesLogic.count,
- "page": page
- });
-
- var pageComp;
- if (page.createObject) {
- // page defined as component
- pageComp = page;
- } else if (typeof page == "string") {
- // page defined as string (a url)
- pageComp = pagesLogic.componentCache[page];
- if (!pageComp) {
- pageComp = pagesLogic.componentCache[page] = Qt.createComponent(page);
- }
- }
- if (pageComp) {
- if (pageComp.status == Component.Error) {
- throw new Error("Error while loading page: " + pageComp.errorString());
- } else {
- // instantiate page from component
- page = pageComp.createObject(container.pageParent, properties || {});
- }
- } else {
- // copy properties to the page
- for (var prop in properties) {
- if (properties.hasOwnProperty(prop)) {
- page[prop] = properties[prop];
- }
- }
- }
-
- container.page = page;
- if (page.parent == null || page.parent == container.pageParent) {
- container.owner = null;
- } else {
- container.owner = page.parent;
- }
-
- // the page has to be reparented
- if (page.parent != container) {
- page.parent = container;
- }
-
- return container;
- }
- }
-
- NumberAnimation {
- id: scrollAnim
- target: mainFlickable
- property: "contentX"
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
-
- Flickable {
- id: mainFlickable
- anchors.fill: parent
- boundsBehavior: Flickable.StopAtBounds
- contentWidth: mainLayout.childrenRect.width
- contentHeight: height
- readonly property Item currentItem: {
- var idx = Math.min(currentIndex, pagesLogic.count-1)
- return idx>=0 ? pagesLogic.get(idx).page : null
- }
- //clip only when the app has a sidebar
- clip: root.x > 0
-
- property int currentIndex: 0
- property int firstVisibleLevel: Math.round (contentX / pagesLogic.roundedDefaultColumnWidth)
-
- flickDeceleration: Units.gridUnit * 50
- onCurrentItemChanged: {
- var itemX = pagesLogic.roundedDefaultColumnWidth * currentIndex;
-
- if (itemX >= contentX && mainFlickable.currentItem && itemX + mainFlickable.currentItem.width <= contentX + mainFlickable.width) {
- return;
- }
-
- //this catches 0 and NaN (sometimes at startup width can oddly be nan
- if (!mainFlickable.width) {
- return;
- }
- scrollAnim.running = false;
- scrollAnim.from = contentX;
- if (itemX < contentX || !mainFlickable.currentItem) {
- scrollAnim.to = Math.max(0, Math.min(itemX, mainFlickable.contentWidth - mainFlickable.width));
- } else {
- scrollAnim.to = Math.max(0, Math.min(itemX - mainFlickable.width + mainFlickable.currentItem.width, mainFlickable.contentWidth - mainFlickable.width));
- }
- scrollAnim.running = true;
- }
- onMovementEnded: {
- if (mainLayout.childrenRect.width == 0) {
- return;
- }
-
- scrollAnim.running = false;
- scrollAnim.from = contentX;
- scrollAnim.to = pagesLogic.roundedDefaultColumnWidth * firstVisibleLevel
- scrollAnim.running = true;
-
- var mappedCurrentItemPos = currentItem.mapToItem(mainFlickable, 0, 0);
-
- //is the current item out of view?
- if (mappedCurrentItemPos.x < 0) {
- currentIndex = firstVisibleLevel;
- } else if (mappedCurrentItemPos.x + currentItem.width > mainFlickable.width) {
- currentIndex = Math.min(root.depth-1, firstVisibleLevel + Math.floor(mainFlickable.width/pagesLogic.roundedDefaultColumnWidth)-1);
- }
- }
- onFlickEnded: movementEnded();
-
- Row {
- id: mainLayout
- add: Transition {
- NumberAnimation {
- property: "y"
- from: mainFlickable.height
- to: 0
- duration: Units.shortDuration
- easing.type: Easing.InOutQuad
- }
- }
- onWidthChanged: {
- //current item in view
- if (children[mainFlickable.currentIndex].x >= mainFlickable.contentX &&
- children[mainFlickable.currentIndex].x + children[mainFlickable.currentIndex].width <= mainFlickable.contentX + mainFlickable.width) {
- mainFlickable.contentX = pagesLogic.roundedDefaultColumnWidth * mainFlickable.firstVisibleLevel;
- } else {
- mainFlickable.contentX = Math.max(0, Math.min(width - mainFlickable.width, mainFlickable.currentIndex * pagesLogic.roundedDefaultColumnWidth));
- }
-
- }
- //onChildrenChanged: mainFlickable.contentX = pagesLogic.roundedDefaultColumnWidth * mainFlickable.firstVisibleLevel
- }
- }
-
- Rectangle {
- height: Units.smallSpacing
- width: root.width * root.width/mainLayout.width
- anchors.bottom: parent.bottom
- color: Theme.textColor
- opacity: 0
- x: root.width * mainFlickable.visibleArea.xPosition
- onXChanged: {
- opacity = 0.3
- scrollIndicatorTimer.restart();
- }
- Behavior on opacity {
- OpacityAnimator {
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
- }
- Timer {
- id: scrollIndicatorTimer
- interval: Units.longDuration * 4
- onTriggered: parent.opacity = 0;
- }
- }
-
- Component {
- id: containerComponent
-
- MouseArea {
- id: container
- height: mainFlickable.height
- width: root.width
- state: pendingState
- property string pendingState: root.width < root.defaultColumnWidth*2 ? "vertical" : (container.level >= pagesLogic.count - 1 ? "last" : "middle");
-
- //HACK
- onPendingStateChanged: {
- stateTimer.restart();
- }
- Timer {
- id: stateTimer
- interval: 150
- onTriggered: container.state = container.pendingState
- }
-
- property int level
-
- property int hint: page && page.implicitWidth ? page.implicitWidth : root.defaultColumnWidth
- property int roundedHint: Math.floor(root.width/hint) > 0 ? root.width/Math.floor(root.width/hint) : root.width
-
- property Item page
- property Item owner
- onPageChanged: {
- page.parent = container;
- page.anchors.fill = container;
- }
- drag.filterChildren: true
- onClicked: root.currentIndex = level;
- onFocusChanged: {
- if (focus) {
- root.currentIndex = level;
- }
- }
-
- Rectangle {
- z: 999
- anchors {
- top: parent.top
- bottom: parent.bottom
- right: parent.right
- }
- width: Math.ceil(Units.smallSpacing / 5)
- color: Theme.textColor
- opacity: 0.3
- visible: container.level < root.depth-1
- }
- states: [
- State {
- name: "vertical"
- PropertyChanges {
- target: container
- width: root.width
- }
- },
- State {
- name: "last"
- PropertyChanges {
- target: container
- width: Math.max(roundedHint, root.width - (container.level == 0 ? 0 : pagesLogic.get(container.level-1).width))
- }
- },
- State {
- name: "middle"
- PropertyChanges {
- target: container
- width: pagesLogic.roundedDefaultColumnWidth
- }
- }
- ]
- transitions: [
- Transition {
- from: "last,middle"
- to: "middle,last"
- SequentialAnimation {
- NumberAnimation {
- property: "width"
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
- ScriptAction {
- script: mainFlickable.currentItemChanged();
- }
- }
- }
- ]
- }
- }
-
- Component.onCompleted: {
- if (initialPage) {
- push(initialPage, null)
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/kirigamiplugin.cpp b/kstars/kstarslite/kirigami-lib/src/kirigamiplugin.cpp
deleted file mode 100644
index 77e34b6..0000000
--- a/kstars/kstarslite/kirigami-lib/src/kirigamiplugin.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 2009 by Alan Alpert <alan.alpert@nokia.com>
- * Copyright 2010 by Ménard Alexis <menard@kde.org>
- * Copyright 2010 by Marco Martin <mart@kde.org>
-
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "kirigamiplugin.h"
-
-#include <QQmlEngine>
-#include <QQmlContext>
-#include <QQuickItem>
-
-QUrl KirigamiPlugin::componentPath(const QString &fileName) const
-{
- QString candidate;
- QString candidatePath;
-
- foreach (const QString &style, m_stylesFallbackChain) {
- candidate = QStringLiteral("styles/") + style + QLatin1Char('/') + fileName;
- if (QFile::exists(resolveFilePath(candidate))) {
- return QUrl(resolveFileUrl(candidate));
- }
- }
- return QUrl(resolveFileUrl(fileName));
-}
-
-
-void KirigamiPlugin::registerTypes(const char *uri)
-{
-#ifdef KIRIGAMI_BUILD_TYPE_STATIC
- Q_INIT_RESOURCE(kirigami);
-#endif
-
- Q_ASSERT(uri == QLatin1String("org.kde.kirigami"));
- const QString style = QString::fromLatin1(qgetenv("QT_QUICK_CONTROLS_STYLE"));
-
-#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS)
- if (style.isEmpty() && QFile::exists(resolveFilePath(QStringLiteral("/styles/Desktop")))) {
- m_stylesFallbackChain.prepend(QStringLiteral("Desktop"));
- }
-#endif
-
- if (!style.isEmpty() && QFile::exists(resolveFilePath(QStringLiteral("/styles/") + style))) {
- m_stylesFallbackChain.prepend(style);
- }
- //At this point the fallback chain will be selected->Desktop->Fallback
-
-
- //TODO: in this plugin it will end up something similar to
- //PlasmaCore's ColorScope?
-
- qmlRegisterSingletonType(componentPath(QStringLiteral("Theme.qml")), uri, 1, 0, "Theme");
- qmlRegisterSingletonType(componentPath(QStringLiteral("Units.qml")), uri, 1, 0, "Units");
-
- qmlRegisterType(componentPath(QStringLiteral("Action.qml")), uri, 1, 0, "Action");
- qmlRegisterType(componentPath(QStringLiteral("AbstractApplicationHeader.qml")), uri, 1, 0, "AbstractApplicationHeader");
- qmlRegisterType(componentPath(QStringLiteral("AbstractApplicationWindow.qml")), uri, 1, 0, "AbstractApplicationWindow");
- qmlRegisterType(componentPath(QStringLiteral("AbstractListItem.qml")), uri, 1, 0, "AbstractListItem");
- qmlRegisterType(componentPath(QStringLiteral("ApplicationHeader.qml")), uri, 1, 0, "ApplicationHeader");
- qmlRegisterType(componentPath(QStringLiteral("ToolBarApplicationHeader.qml")), uri, 1, 0, "ToolBarApplicationHeader");
- qmlRegisterType(componentPath(QStringLiteral("ApplicationWindow.qml")), uri, 1, 0, "ApplicationWindow");
- qmlRegisterType(componentPath(QStringLiteral("BasicListItem.qml")), uri, 1, 0, "BasicListItem");
- qmlRegisterType(componentPath(QStringLiteral("OverlayDrawer.qml")), uri, 1, 0, "OverlayDrawer");
- qmlRegisterType(componentPath(QStringLiteral("ContextDrawer.qml")), uri, 1, 0, "ContextDrawer");
- qmlRegisterType(componentPath(QStringLiteral("GlobalDrawer.qml")), uri, 1, 0, "GlobalDrawer");
- qmlRegisterType(componentPath(QStringLiteral("Heading.qml")), uri, 1, 0, "Heading");
- qmlRegisterType(componentPath(QStringLiteral("Icon.qml")), uri, 1, 0, "Icon");
- qmlRegisterType(componentPath(QStringLiteral("Label.qml")), uri, 1, 0, "Label");
- qmlRegisterType(componentPath(QStringLiteral("OverlaySheet.qml")), uri, 1, 0, "OverlaySheet");
- qmlRegisterType(componentPath(QStringLiteral("Page.qml")), uri, 1, 0, "Page");
- qmlRegisterType(componentPath(QStringLiteral("ScrollablePage.qml")), uri, 1, 0, "ScrollablePage");
- qmlRegisterType(componentPath(QStringLiteral("SplitDrawer.qml")), uri, 1, 0, "SplitDrawer");
- qmlRegisterType(componentPath(QStringLiteral("SwipeListItem.qml")), uri, 1, 0, "SwipeListItem");
-}
-
-#include "moc_kirigamiplugin.cpp"
-
diff --git a/kstars/kstarslite/kirigami-lib/src/kirigamiplugin.h b/kstars/kstarslite/kirigami-lib/src/kirigamiplugin.h
deleted file mode 100644
index d59e855..0000000
--- a/kstars/kstarslite/kirigami-lib/src/kirigamiplugin.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2009 by Alan Alpert <alan.alpert@nokia.com>
- * Copyright 2010 by Ménard Alexis <menard@kde.org>
- * Copyright 2010 by Marco Martin <mart@kde.org>
-
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef MOBILECOMPONENTSPLUGIN_H
-#define MOBILECOMPONENTSPLUGIN_H
-
-#ifdef KIRIGAMI_BUILD_TYPE_STATIC
-#include <QObject>
-#include <QString>
-#include <QUrl>
-#else
-#include <QQmlEngine>
-#include <QQmlExtensionPlugin>
-#include <QUrl>
-#endif
-
-
-#ifdef KIRIGAMI_BUILD_TYPE_STATIC
-
-class KirigamiPlugin : public QObject
-{
-public:
- static KirigamiPlugin& getInstance()
- {
- static KirigamiPlugin instance;
- return instance;
- }
- KirigamiPlugin(KirigamiPlugin const&) = delete;
- void operator=(KirigamiPlugin const&) = delete;
- void registerTypes(const char *uri);
- static void registerTypes()
- {
- getInstance().registerTypes("org.kde.kirigami");
- }
-
-private:
- KirigamiPlugin() {}
- QString componentPath(const QString &fileName) const;
- QString resolveFilePath(const QString &path) const
- {
- return QLatin1Char(':') + path;
- }
- QString resolveFileUrl(const QString &filePath) const
- {
- if (filePath.startsWith(QLatin1Char(':'))) {
- return QStringLiteral("qrc:") + filePath.right(filePath.length() - 1);
- }
- return QStringLiteral("qrc:/") + filePath;
- }
- QStringList m_stylesFallbackChain;
-};
-
-#else
-
-class KirigamiPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- void registerTypes(const char *uri);
-
-private:
- QUrl componentPath(const QString &fileName) const;
- QString resolveFilePath(const QString &path) const
- {
- #ifdef Q_OS_WIN
- // On Windows, the leading slash does not make sense, so let's snip that off
- return baseUrl().path().mid(1) + QLatin1Char('/') + path;
- #else
- return baseUrl().path() + QLatin1Char('/') + path;
- #endif
- }
- QString resolveFileUrl(const QString &filePath) const
- {
- return QStringLiteral("file://") + baseUrl().path() + QLatin1Char('/') + filePath;
- }
- QStringList m_stylesFallbackChain;
-};
-
-#endif
-
-#endif
diff --git a/kstars/kstarslite/kirigami-lib/src/qmldir b/kstars/kstarslite/kirigami-lib/src/qmldir
deleted file mode 100644
index 94282a0..0000000
--- a/kstars/kstarslite/kirigami-lib/src/qmldir
+++ /dev/null
@@ -1,23 +0,0 @@
-module org.kde.kirigami
-
-AbstractApplicationHeader 1.0 templates/AbstractApplicationHeader.qml
-AbstractApplicationWindow 1.0 templates/AbstractApplicationWindow.qml
-AbstractListItem 1.0 templates/AbstractListItem.qml
-Action 1.0 templates/Action.qml
-ApplicationHeader 1.0 templates/ApplicationHeader.qml
-ApplicationWindow 1.0 templates/ApplicationWindow.qml
-OverlayDrawer 1.0 templates/OverlayDrawer.qml
-OverlaySheet 1.0 templates/OverlaySheet.qml
-Page 1.0 templates/Page.qml
-SplitDrawer 1.0 templates/SplitDrawer.qml
-SwipeListItem 1.0 templates/SwipeListItem.qml
-
-BasicListItem 1.0 controls/BasicListItem.qml
-ContextDrawer 1.0 controls/ContextDrawer.qml
-GlobalDrawer 1.0 controls/GlobalDrawer.qml
-Heading 1.0 controls/Heading.qml
-Icon 1.0 controls/Icon.qml
-Label 1.0 controls/Label.qml
-ScrollablePage 1.0 controls/ScrollablePage.qml
-Theme 1.0 controls/Theme.qml
-Units 1.0 controls/Units.qml
diff --git a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/AbstractApplicationHeader.qml b/kstars/kstarslite/kirigami-lib/src/styles/Desktop/AbstractApplicationHeader.qml
deleted file mode 100644
index f9527af..0000000
--- a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/AbstractApplicationHeader.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.5
-import org.kde.kirigami 1.0
-
-import "../../templates" as T
-
-
-/**
- * An item that can be used as a title for the application.
- * Scrolling the main page will make it taller or shorter (trough the point of going away)
- * It's a behavior similar to the typical mobile web browser adressbar
- * the minimum, preferred and maximum heights of the item can be controlled with
- * * minimumHeight: default is 0, i.e. hidden
- * * preferredHeight: default is Units.gridUnit * 1.6
- * * maximumHeight: default is Units.gridUnit * 3
- *
- * To achieve a titlebar that stays completely fixed just set the 3 sizes as the same
- */
-T.AbstractApplicationHeader {
- id: root
-
- background: Rectangle {
- color: Theme.backgroundColor
- Rectangle {
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- }
- color: Theme.textColor
- opacity: 0.3
- height: Math.ceil(Units.smallSpacing / 5)
- }
- }
-}
-
diff --git a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/AbstractListItem.qml b/kstars/kstarslite/kirigami-lib/src/styles/Desktop/AbstractListItem.qml
deleted file mode 100644
index c001841..0000000
--- a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/AbstractListItem.qml
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <notmart@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
- */
-
-import QtQuick 2.1
-import org.kde.kirigami 1.0
-import "../../private"
-import "../../templates" as T
-
-T.AbstractListItem {
- id: listItem
-
- background: DefaultListItemBackground {}
- implicitHeight: listItem.contentItem.height + Units.smallSpacing*4
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/ApplicationWindow.qml b/kstars/kstarslite/kirigami-lib/src/styles/Desktop/ApplicationWindow.qml
deleted file mode 100644
index 2580ed7..0000000
--- a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/ApplicationWindow.qml
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import org.kde.kirigami 1.0
-import "../../" as Base
-
-
-Base.ApplicationWindow {
- id: root
- width: Units.gridUnit * 55
- height: Units.gridUnit * 40
- wideScreen: true
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/Icon.qml b/kstars/kstarslite/kirigami-lib/src/styles/Desktop/Icon.qml
deleted file mode 100644
index 4467ea5..0000000
--- a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/Icon.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-import org.kde.kirigami 1.0
-import org.kde.kquickcontrolsaddons 2.0
-
-Item {
- id: root
- property alias source: icon.icon
- property alias smooth: icon.smooth
- property bool active: false
- property bool valid: true
- property bool selected: false
- onSelectedChanged: {
- if (selected) {
- icon.state = QIconItem.SelectedState;
- active = false;
- } else if (icon.state == QIconItem.SelectedState) {
- icon.state = QIconItem.DefaultState;
- }
- }
- onActiveChanged: {
- if (active) {
- icon.state = QIconItem.ActiveState;
- selected = false;
- } else if (icon.state == QIconItem.ActiveState) {
- icon.state = QIconItem.DefaultState;
- }
- }
-
- implicitWidth: icon.icon != "" ? Units.iconSizes.smallMedium : 0
- implicitHeight: icon.icon != "" ? Units.iconSizes.smallMedium : 0
-
- QIconItem {
- id: icon
- anchors.fill: parent
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/OverlayDrawer.qml b/kstars/kstarslite/kirigami-lib/src/styles/Desktop/OverlayDrawer.qml
deleted file mode 100644
index 8b16f1e..0000000
--- a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/OverlayDrawer.qml
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.1
-import org.kde.kirigami 1.0
-
-import "../../templates" as T
-
-/**
- * Overlay Drawers are used to expose additional UI elements needed for
- * small secondary tasks for which the main UI elements are not needed.
- * For example in Okular Active, an Overlay Drawer is used to display
- * thumbnails of all pages within a document along with a search field.
- * This is used for the distinct task of navigating to another page.
- *
- */
-T.OverlayDrawer {
- id: root
-
-//BEGIN Properties
- background: Rectangle {
- color: Theme.viewBackgroundColor
- property Item handleBackground: Item {
-
- }
-
- Item {
- id: drawerHandle
- z: -1
-
- anchors {
- right: root.edge == Qt.LeftEdge ? undefined : parent.left
- left: root.edge == Qt.RightEdge ? undefined : parent.right
- bottom: parent.bottom
- }
- visible: root.enabled && (root.edge == Qt.LeftEdge || root.edge == Qt.RightEdge)
- width: Units.iconSizes.medium
- height: width
- opacity: root.handleVisible ? 1 : 0
- Behavior on opacity {
- NumberAnimation {
- duration: Units.longDuration
- easing.type: Easing.InOutQuad
- }
- }
- transform: Translate {
- id: translateTransform
- x: root.handleVisible ? 0 : (root.edge == Qt.LeftEdge ? -drawerHandle.width : drawerHandle.width)
- Behavior on x {
- NumberAnimation {
- duration: Units.longDuration
- easing.type: !root.handleVisible ? Easing.OutQuad : Easing.InQuad
- }
- }
- }
- Rectangle {
- id: handleGraphics
- color: Theme.viewBackgroundColor
- opacity: 0.3 + root.position
- anchors.fill: parent
- }
-
- Loader {
- anchors.centerIn: handleGraphics
- width: height
- height: Units.iconSizes.smallMedium - Units.smallSpacing * 2
- source: root.edge == Qt.LeftEdge ? Qt.resolvedUrl("../../templates/private/MenuIcon.qml") : (root.edge == Qt.RightEdge ? Qt.resolvedUrl("../../templates/private/ContextIcon.qml") : "")
- onItemChanged: {
- if(item) {
- item.morph = Qt.binding(function(){return root.position})
- }
- }
- }
- Rectangle {
- anchors {
- left: parent.left
- right: parent.right
- top: parent.top
- }
- color: Theme.textColor
- opacity: 0.3
- height: Math.ceil(Units.smallSpacing / 5)
- }
- Rectangle {
- anchors {
- left: root.edge == Qt.LeftEdge ? parent.right : undefined
- right: root.edge == Qt.RightEdge ? parent.left : undefined
- top: parent.top
- bottom: parent.bottom
- }
- color: Theme.textColor
- opacity: 0.3
- width: Math.ceil(Units.smallSpacing / 5)
- }
- }
-
- Rectangle {
- z: -2
- anchors {
- left: parent.right
- top: parent.top
- bottom: parent.bottom
- }
- color: Theme.textColor
- opacity: root.position == 0 ? 0 : 0.3
- width: Math.ceil(Units.smallSpacing / 5)
- }
- }
-
- //default to a sidebar in desktop mode
- modal: edge == Qt.TopEdge || edge == Qt.BottomEdge
- opened: true
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/SwipeListItem.qml b/kstars/kstarslite/kirigami-lib/src/styles/Desktop/SwipeListItem.qml
deleted file mode 100644
index 276a9f4..0000000
--- a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/SwipeListItem.qml
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2016 Marco Martin <notmart@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
- */
-
-import QtQuick 2.5
-import org.kde.kirigami 1.0
-import "../../private"
-import "../../templates" as T
-
-T.SwipeListItem {
- id: root
-
- background: DefaultListItemBackground {}
- implicitHeight: contentItem.height + Units.smallSpacing*4
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/Theme.qml b/kstars/kstarslite/kirigami-lib/src/styles/Desktop/Theme.qml
deleted file mode 100644
index 8a848a8..0000000
--- a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/Theme.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.4
-
-pragma Singleton
-
-
-QtObject {
- id: theme
-
- property color textColor: palette.windowText
- property color disabledTextColor: disabledPalette.windowText
-
- property color highlightColor: palette.highlight
- property color highlightedTextColor: palette.highlightedText
- property color backgroundColor: palette.window
- property color linkColor: "#2196F3"
- property color visitedLinkColor: "#2196F3"
-
- property color buttonTextColor: palette.buttonText
- property color buttonBackgroundColor: palette.button
- property color buttonHoverColor: palette.highlight
- property color buttonFocusColor: palette.highlight
-
- property color viewTextColor: palette.text
- property color viewBackgroundColor: palette.base
- property color viewHoverColor: palette.highlight
- property color viewFocusColor: palette.highlight
-
- property font defaultFont: fontMetrics.font
-
- property list<QtObject> children: [
- TextMetrics {
- id: fontMetrics
- },
- SystemPalette {
- id: palette
- colorGroup: SystemPalette.Active
- },
- SystemPalette {
- id: disabledPalette
- colorGroup: SystemPalette.Disabled
- }
- ]
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/Units.qml b/kstars/kstarslite/kirigami-lib/src/styles/Desktop/Units.qml
deleted file mode 100644
index f42b040..0000000
--- a/kstars/kstarslite/kirigami-lib/src/styles/Desktop/Units.qml
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.4
-import QtQuick.Window 2.2
-
-pragma Singleton
-
-
-QtObject {
- id: units
-
- /**
- * The fundamental unit of space that should be used for sizes, expressed in pixels.
- * Given the screen has an accurate DPI settings, it corresponds to a width of
- * the capital letter M
- */
- property int gridUnit: fontMetrics.height
-
- /**
- * units.iconSizes provides access to platform-dependent icon sizing
- *
- * The icon sizes provided are normalized for different DPI, so icons
- * will scale depending on the DPI.
- *
- * Icon sizes from KIconLoader, adjusted to devicePixelRatio:
- * * small
- * * smallMedium
- * * medium
- * * large
- * * huge
- * * enormous
- *
- * Not devicePixelRation-adjusted::
- * * desktop
- */
- property QtObject iconSizes: QtObject {
- property int small: 16 * devicePixelRatio
- property int smallMedium: 22 * devicePixelRatio
- property int medium: 32 * devicePixelRatio
- property int large: 48 * devicePixelRatio
- property int huge: 64 * devicePixelRatio
- property int enormous: 128 * devicePixelRatio
- }
-
- /**
- * units.smallSpacing is the amount of spacing that should be used around smaller UI elements,
- * for example as spacing in Columns. Internally, this size depends on the size of
- * the default font as rendered on the screen, so it takes user-configured font size and DPI
- * into account.
- */
- property int smallSpacing: gridUnit/4
-
- /**
- * units.largeSpacing is the amount of spacing that should be used inside bigger UI elements,
- * for example between an icon and the corresponding text. Internally, this size depends on
- * the size of the default font as rendered on the screen, so it takes user-configured font
- * size and DPI into account.
- */
- property int largeSpacing: gridUnit
-
- /**
- * The ratio between physical and device-independent pixels. This value does not depend on the \
- * size of the configured font. If you want to take font sizes into account when scaling elements,
- * use theme.mSize(theme.defaultFont), units.smallSpacing and units.largeSpacing.
- * The devicePixelRatio follows the definition of "device independent pixel" by Microsoft.
- */
- property real devicePixelRatio: Math.floor(fontMetrics.font.pixelSize / fontMetrics.font.pointSize)
-
- /**
- * units.longDuration should be used for longer, screen-covering animations, for opening and
- * closing of dialogs and other "not too small" animations
- */
- property int longDuration: 250
-
- /**
- * units.shortDuration should be used for short animations, such as accentuating a UI event,
- * hover events, etc..
- */
- property int shortDuration: 150
-
- property variant fontMetrics: TextMetrics {
- text: "M"
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/styles/Plasma/Icon.qml b/kstars/kstarslite/kirigami-lib/src/styles/Plasma/Icon.qml
deleted file mode 100644
index 4a4f46e..0000000
--- a/kstars/kstarslite/kirigami-lib/src/styles/Plasma/Icon.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-import QtQuick 2.0
-import org.kde.plasma.core 2.0 as PlasmaCore
-
-
-PlasmaCore.IconItem {
- property bool selected: false
- onSelectedChanged: {
- if (selected) {
- status = PlasmaCore.Svg.Selected;
- } else {
- status = PlasmaCore.Svg.Normal;
- }
- }
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/styles/Plasma/Theme.qml b/kstars/kstarslite/kirigami-lib/src/styles/Plasma/Theme.qml
deleted file mode 100644
index ccd354b..0000000
--- a/kstars/kstarslite/kirigami-lib/src/styles/Plasma/Theme.qml
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-pragma Singleton
-
-import QtQuick 2.0
-import org.kde.plasma.core 2.0 as PlasmaCore
-
-QtObject {
- property color textColor: theme.textColor
- property color disabledTextColor: Qt.rgba(palette.windowText.r, palette.windowText.g, palette.windowText.b, 0.6)
-
- property color highlightColor: theme.highlightColor
- property color highlightedTextColor: theme.highlightedTextColor
- property color backgroundColor: theme.backgroundColor
- property color linkColor: theme.linkColor
-
- property color buttonTextColor: theme.buttonTextColor
- property color buttonBackgroundColor: theme.buttonBackgroundColor
- property color buttonHoverColor: theme.buttonHoverColor
- property color buttonFocusColor: theme.buttonFocusColor
-
- property color viewTextColor: theme.viewTextColor
- property color viewBackgroundColor: theme.viewBackgroundColor
- property color viewHoverColor: theme.viewHoverColor
- property color viewFocusColor: theme.viewFocusColor
-
- property variant defaultFont: theme.defaultFont
-}
diff --git a/kstars/kstarslite/kirigami-lib/src/styles/Plasma/Units.qml b/kstars/kstarslite/kirigami-lib/src/styles/Plasma/Units.qml
deleted file mode 100644
index 34ec6bc..0000000
--- a/kstars/kstarslite/kirigami-lib/src/styles/Plasma/Units.qml
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 2015 Marco Martin <mart@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-pragma Singleton
-
-import QtQuick 2.4
-import org.kde.plasma.core 2.0 as PlasmaCore
-
-
-QtObject {
- /**
- * The fundamental unit of space that should be used for sizes, expressed in pixels.
- * Given the screen has an accurate DPI settings, it corresponds to a width of
- * the capital letter M
- */
- property int gridUnit: units.gridUnit
-
- /**
- * units.iconSizes provides access to platform-dependent icon sizing
- *
- * The icon sizes provided are normalized for different DPI, so icons
- * will scale depending on the DPI.
- *
- * Icon sizes from KIconLoader, adjusted to devicePixelRatio:
- * * small
- * * smallMedium
- * * medium
- * * large
- * * huge
- * * enormous
- *
- * Not devicePixelRation-adjusted::
- * * desktop
- */
- property QtObject iconSizes: QtObject {
- property int small: units.iconSizes.small
- property int smallMedium: units.iconSizes.smallMedium
- property int medium: units.iconSizes.medium
- property int large: units.iconSizes.large
- property int huge: units.iconSizes.huge
- property int enormous: units.iconSizes.enormous
- }
-
- /**
- * units.smallSpacing is the amount of spacing that should be used around smaller UI elements,
- * for example as spacing in Columns. Internally, this size depends on the size of
- * the default font as rendered on the screen, so it takes user-configured font size and DPI
- * into account.
- */
- property int smallSpacing: units.smallSpacing
-
- /**
- * units.largeSpacing is the amount of spacing that should be used inside bigger UI elements,
- * for example between an icon and the corresponding text. Internally, this size depends on
- * the size of the default font as rendered on the screen, so it takes user-configured font
- * size and DPI into account.
- */
- property int largeSpacing: units.largeSpacing
-
- /**
- * The ratio between physical and device-independent pixels. This value does not depend on the \
- * size of the configured font. If you want to take font sizes into account when scaling elements,
- * use theme.mSize(theme.defaultFont), units.smallSpacing and units.largeSpacing.
- * The devicePixelRatio follows the definition of "device independent pixel" by Microsoft.
- */
- property real devicePixelRatio: units.devicePixelRatio
-
- /**
- * units.longDuration should be used for longer, screen-covering animations, for opening and
- * closing of dialogs and other "not too small" animations
- */
- property int longDuration: units.longDuration
-
- /**
- * units.shortDuration should be used for short animations, such as accentuating a UI event,
- * hover events, etc..
- */
- property int shortDuration: units.shortDuration
-
- /**
- * metrics used by the default font
- */
- property variant fontMetrics: TextMetrics {
- text: "M"
- }
-}
diff --git a/kstars/kstarslite/qml/CMakeLists.txt b/kstars/kstarslite/qml/CMakeLists.txt
index d65e014..f01ac80 100644
--- a/kstars/kstarslite/qml/CMakeLists.txt
+++ b/kstars/kstarslite/qml/CMakeLists.txt
@@ -10,15 +10,30 @@ install( FILES modules/BottomMenu.qml
modules/Splash.qml
modules/TopMenu.qml
modules/KSPage.qml
+ modules/KSTab.qml
+ modules/KSListView.qml
modules/KSScrollablePage.qml
modules/ContextDrawerMenu.qml
- modules/TelescopeControlMenu.qml
+ modules/SkyMapLiteWrapper.qml
+ modules/ObjectDetails.qml
+ modules/TimePage.qml
DESTINATION ${KDE_INSTALL_DATADIR}/kstars/kstarslite/qml/modules )
install( FILES dialogs/FindDialog.qml
DESTINATION ${KDE_INSTALL_DATADIR}/kstars/kstarslite/qml/dialogs )
+install( FILES modules/popups/ColorSchemePopup.qml
+ modules/popups/ObjectPopup.qml
+ modules/popups/ProjectionsPopup.qml
+ DESTINATION ${KDE_INSTALL_DATADIR}/kstars/kstarslite/qml/modules/popups)
+
install( FILES modules/helpers/TopMenuButton.qml
+ modules/helpers/BottomMenuButton.qml
+ modules/helpers/TimeSpinBox.qml
+ modules/helpers/PassiveNotification.qml
+ modules/helpers/Units.qml
+ modules/helpers/DetailsItem.qml
+ modules/helpers/KSMenuItem.qml
DESTINATION ${KDE_INSTALL_DATADIR}/kstars/kstarslite/qml/modules/helpers )
add_subdirectory(modules/images)
diff --git a/kstars/kstarslite/qml/constants/Constants.qml b/kstars/kstarslite/qml/constants/Constants.qml
index 1317b95..7e845ed 100644
--- a/kstars/kstarslite/qml/constants/Constants.qml
+++ b/kstars/kstarslite/qml/constants/Constants.qml
@@ -1,28 +1,29 @@
pragma Singleton
-import QtQuick 2.0
-import QtQuick.Window 2.0
+import QtQuick 2.7
+import QtQuick.Window 2.2
QtObject {
property double dpi: Screen.pixelDensity * 25.4
property double dpmm: Screen.pixelDensity
property double dp: dpi < 160 ? 1 : dpi/160
+ property double pixelRatio: Screen.devicePixelRatio
property string density: {
- if(dpi <= 120) {
+ if(dpi * pixelRatio <= 120) {
return "ldpi"
}
- else if(dpi <=160) {
+ else if(dpi * pixelRatio <=160) {
return "mdpi"
}
- else if(dpi <= 240) {
+ else if(dpi * pixelRatio <= 240) {
return "hdpi"
}
- else if(dpi <= 320) {
+ else if(dpi * pixelRatio <= 320) {
return "xhdpi"
}
- else if(dpi <= 480) {
+ else if(dpi * pixelRatio <= 480) {
return "xxhdpi"
}
- else if(dpi <=640) {
+ else if(dpi * pixelRatio <=640) {
return "xxxhdpi"
}
}
diff --git a/kstars/kstarslite/qml/dialogs/FindDialog.qml b/kstars/kstarslite/qml/dialogs/FindDialog.qml
index c1a8fdc..5164c2d 100644
--- a/kstars/kstarslite/qml/dialogs/FindDialog.qml
+++ b/kstars/kstarslite/qml/dialogs/FindDialog.qml
@@ -1,32 +1,15 @@
-import QtQuick 2.4
+import QtQuick 2.6
import QtQuick.Window 2.2
import QtQuick.Layouts 1.1
-import QtQuick.Dialogs 1.2
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Universal 2.0
import "../constants" 1.0
import "../modules"
-import QtQuick.Controls 1.4 as Controls
-import org.kde.kirigami 1.0 as Kirigami
-/*AbstractDialog {
- id: findDialog
- default property alias data: defaultContentItem.data
- onVisibilityChanged: if (visible && contentItem) contentItem.forceActiveFocus()
-
- Rectangle {
- id: content
- property real minimumHeight: 320 * num.dp
- property real minimumWidth: 360 * num.dp
-
- color: sysPalette.window
-
- ColumnLayout {
- id: defaultContentItem
- Layout.fillWidth: true
- Layout.fillHeight: true
- }*/
KSPage {
contentItem: findColumn
- title: "Find Object"
+ title: "Find an Object"
onVisibleChanged: {
if(visible) {
typeChoose.currentIndex = 0
@@ -47,11 +30,10 @@ KSPage {
left: parent.left
right: parent.right
}
- Controls.Label {
+ Label {
text: xi18n("Filter by name: ")
- color: num.sysPalette.text
}
- Controls.TextField {
+ TextField {
id: searchQuery
Layout.fillWidth: true
onTextChanged: {
@@ -65,7 +47,7 @@ KSPage {
left: parent.left
right: parent.right
}
- Controls.Label {
+ Label {
text: "Filter by type: "
}
@@ -75,14 +57,14 @@ KSPage {
Layout.fillWidth: true
}
- Controls.ComboBox {
+ ComboBox {
id: typeChoose
model: FindDialogLite.filterModel
Layout.fillWidth: true
//Init list with objects when they are loaded
Connections {
- target: mainWindow
+ target: window
onLoadedChanged: {
if(loaded) {
FindDialogLite.filterByType(typeChoose.currentIndex)
@@ -96,118 +78,23 @@ KSPage {
}
}
- Controls.ScrollView {
+ KSListView {
+ model: SortModel
+ textRole: "name"
+
Layout.fillWidth: true
Layout.fillHeight: true
- ListView {
- id: list
- clip: true
-
- model: SortModel
-
- delegate: Rectangle {
- id: delRect
- Layout.fillWidth: true
- width: parent.width
- height: objName.height + 30 * num.dp
-
- border {
- color: "#becad5"
- width: 1 * num.dp
- }
-
- Behavior on color {
- ColorAnimation { duration: 200 }
- }
-
- states: [
- State {
- name: "hovered"
- PropertyChanges {
- target: delRect
- color: "#d0e8fa"
- }
- PropertyChanges {
- target: objName
- color: Kirigami.Theme.viewTextColor
- }
- },
- State {
- name: "selected"
- PropertyChanges {
- target: delRect
- color: Kirigami.Theme.highlightColor
- }
- PropertyChanges {
- target: objName
- color: Kirigami.Theme.highlightedTextColor
- }
- },
- State {
- name: "default"
- PropertyChanges {
- target: delRect
- color: "white"
- }
- PropertyChanges {
- target: objName
- color: "black"
- }
- }
- ]
-
- MouseArea {
- id: delMouseArea
- anchors.fill: parent
- hoverEnabled: true
-
- function hoveredColor() {
- if(pressed) {
- delRect.state = "selected"
- } else {
- if(containsMouse) {
- delRect.state = "hovered"
- } else {
- delRect.state = "default"
- }
- }
- }
-
- onContainsMouseChanged: {
- hoveredColor()
- }
-
- onPressedChanged: {
- hoveredColor()
- }
-
- onClicked: {
- initPage.showPage()
- FindDialogLite.selectObject(model.index)
- }
- }
-
- Text {
- id: objName
- text: model.name
- anchors {
- verticalCenter: parent.verticalCenter
- left: parent.left
- leftMargin: 20 * num.dp
- }
- Behavior on color {
- ColorAnimation { duration: 200 }
- }
- }
- }
+ onClicked: {
+ stackView.replace(null, initPage)
+ FindDialogLite.selectObject(model.index)
}
}
- Controls.Button {
+ Button {
text: "Cancel"
onClicked: {
- goBack()
+ stackView.pop()
}
anchors {
diff --git a/kstars/kstarslite/qml/indi/CMakeLists.txt b/kstars/kstarslite/qml/indi/CMakeLists.txt
index ac928c1..63be0f2 100644
--- a/kstars/kstarslite/qml/indi/CMakeLists.txt
+++ b/kstars/kstarslite/qml/indi/CMakeLists.txt
@@ -7,7 +7,6 @@ install( FILES INDIControlPanel.qml
install( FILES modules/MotionControl.qml
modules/Led.qml
modules/Property.qml
- modules/KSTab.qml
modules/KSLed.qml
modules/KSButtonSwitch.qml
modules/KSButtonsSwitchRow.qml
diff --git a/kstars/kstarslite/qml/indi/DevicePanel.qml b/kstars/kstarslite/qml/indi/DevicePanel.qml
index f0e3163..e11224b 100644
--- a/kstars/kstarslite/qml/indi/DevicePanel.qml
+++ b/kstars/kstarslite/qml/indi/DevicePanel.qml
@@ -1,108 +1,120 @@
-import QtQuick 2.4
+import QtQuick 2.6
import QtQuick.Window 2.2
import "../modules"
import "../constants" 1.0
import QtQuick.Layouts 1.2
+import QtQuick.Controls 2.0
import QtQuick.Controls 1.4
-import org.kde.kirigami 1.0 as Kirigami
-Item {
- id: devicesPanel
- anchors {
- fill: parent
- margins: 0
- }
- function showPage(backtoInit) {
- devicesPage.showPage(backtoInit)
+KSPage {
+ id: devicesPage
+ title: devicesPage.deviceName + " - " + tabBar.currentItem.text
+
+ onTitleChanged: {
+ console.log(title)
}
property string deviceName
property ImagePreview imagePreview: null
- KSPage {
- id: devicesPage
- contentItem: deviceTabView
- title: devicesPanel.deviceName + " - " + deviceTabView.currentTabTitle
+ ColumnLayout {
+ anchors.fill: parent
+
+ TabBar {
+ id: tabBar
+ Layout.fillWidth: true
+ }
- TabView {
- id: deviceTabView
- currentIndex: 0
+ SwipeView {
+ id: deviceSwipeView
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ currentIndex: tabBar.currentIndex
+ clip: true
property var groups: []
property var properties: []
property var tabs: []
- property string currentTabTitle: ""
onCurrentIndexChanged: {
- currentTabTitle = getTab(currentIndex).title
- }
-
- Component.onCompleted: {
- if(Qt.platform.os != "android") {
- anchors.topMargin = 10 * num.dp
- anchors.leftMargin = 5 * num.dp
- anchors.rightMargin = 5 * num.dp
- }
- anchors.bottomMargin = 5 * num.dp
- anchors.bottom = parent.bottom
+ tabBar.currentIndex = currentIndex
}
Connections {
target: ClientManagerLite
onNewINDIProperty: {
- if(deviceTabView.currentTabTitle == "") deviceTabView.currentTabTitle = groupName
- if(devicesPanel.deviceName === deviceName) {
- if(deviceTabView.groups.indexOf(groupName) == -1) {
- deviceTabView.groups.push(groupName)
- var newTabComp = Qt.createComponent("modules/KSTab.qml");
- var newTab = newTabComp.createObject(deviceTabView)
+ if(devicesPage.deviceName === deviceName) {
+ if(deviceSwipeView.groups.indexOf(groupName) == -1) {
+ deviceSwipeView.groups.push(groupName)
+ var newTabComp = Qt.createComponent("../modules/KSTab.qml");
+ var newTab = newTabComp.createObject(deviceSwipeView)
newTab.title = groupName
- deviceTabView.tabs.push(newTab)
+ var columnForTab = Qt.createQmlObject('import QtQuick 2.7
+ import QtQuick.Layouts 1.3
+ Column {
+ spacing: 5
+ }', newTab.flickableItem)
+
+ newTab.rootItem = columnForTab
+
+ var tabButton = Qt.createQmlObject('import QtQuick 2.7;
+ import QtQuick.Controls 2.0
+ TabButton {}',
+ tabBar);
+ tabButton.text = groupName
+ if(tabBar.count == 1) {
+ //Without notifying about adding first item to tabBar title of devicesPage won't be updated
+ tabBar.currentItemChanged()
+ }
+
+ deviceSwipeView.tabs.push(newTab)
if(groupName == "Motion Control") {
var component = Qt.createComponent("modules/MotionControl.qml");
var motionControl = component.createObject(newTab)
motionControl.deviceName = deviceName
}
}
+
if(groupName != "Motion Control") {
- for(var i = 0; i < deviceTabView.count; ++i) {
- var tab = deviceTabView.getTab(i)
+ for(var i = 0; i < deviceSwipeView.tabs.length; ++i) {
+ var tab = deviceSwipeView.tabs[i]
if(tab.title === groupName) {
var propComp = Qt.createComponent("modules/Property.qml");
- var property = propComp.createObject(tab.columnItem)
+ var property = propComp.createObject(tab.rootItem)
property.propName = propName
property.label = label
property.deviceName = deviceName
property.parentTab = tab
- if(propName == "CCD_EXPOSURE" && devicesPanel.imagePreview == null) {
+ if(propName == "CCD_EXPOSURE" && devicesPage.imagePreview == null) {
var imgPreviewComp = Qt.createComponent("ImagePreview.qml");
- devicesPanel.imagePreview = imgPreviewComp.createObject(devicesPanel)
- devicesPanel.imagePreview.deviceName = devicesPanel.deviceName
+ devicesPage.imagePreview = imgPreviewComp.createObject(window)
+ devicesPage.imagePreview.deviceName = devicesPage.deviceName
}
}
}
}
}
}
+
onRemoveINDIProperty: {
- for(var i = 0; i < deviceTabView.tabs.length; ++i) {
- var tab = deviceTabView.tabs[i]
+ for(var i = 0; i < deviceSwipeView.tabs.length; ++i) {
+ var tab = deviceSwipeView.tabs[i]
if(tab.title === groupName && groupName != "Motion Control") {
- var columnItem = deviceTabView.tabs[i].columnItem
- for(var c = 0; c < columnItem.children.length; ++c) {
- if(columnItem.children[c].propName === propName) {
- columnItem.children[c].destroy()
+ var contentItem = deviceSwipeView.tabs[i].rootItem
+ for(var c = 0; c < contentItem.children.length; ++c) {
+ if(contentItem.children[c].propName === propName) {
+ contentItem.children[c].destroy()
}
}
- if(columnItem.children.length == 0) {
- var groups = deviceTabView.groups
+ if(contentItem.children.length == 0) {
+ var groups = deviceSwipeView.groups
groups.splice(groups.indexOf(groupName), 1)
tab.destroy()
}
- /*if(propName == "CCD_EXPOSURE" && devicesPanel.imagePreview != null) {
- imgPreview.destroy()
- }*/
+ /*if(propName == "CCD_EXPOSURE" && devicesPage.imagePreview != null) {
+ imgPreview.destroy()
+ }*/
}
}
}
diff --git a/kstars/kstarslite/qml/indi/INDIControlPanel.qml b/kstars/kstarslite/qml/indi/INDIControlPanel.qml
index c34070d..3751ad9 100644
--- a/kstars/kstarslite/qml/indi/INDIControlPanel.qml
+++ b/kstars/kstarslite/qml/indi/INDIControlPanel.qml
@@ -1,15 +1,14 @@
-import QtQuick 2.4
+import QtQuick 2.6
import QtQuick.Window 2.2
+import QtQuick.Controls 2.0
+import QtQuick.Layouts 1.2
import "../modules"
import "../constants" 1.0
-import QtQuick.Layouts 1.2
-import QtQuick.Controls 1.4 as Controls
-import org.kde.kirigami 1.0 as Kirigami
KSPage {
id: indiPage
- title: "INDI Control Panel"
objectName: "indiControlPanel"
+ title: "INDI Control Panel"
property bool connected: ClientManagerLite.connected
@@ -17,24 +16,16 @@ KSPage {
if(Qt.platform.os != "android") {
ClientManagerLite.setHost("localhost", parseInt(7624))
}
- var i = 100
- while(i--) {
- console.log(ClientManagerLite.lastUsedServer())
- }
}
- /*onHeightChanged: {
- devicesPage.height = indiPage.height - devicesPage.y
- }*/
-
onConnectedChanged: {
if(!indiPage.connected) {
for(var i = 0; i < devicesModel.count; ++i) {
devicesModel.get(i).panel.destroy()
+ stackView.pop(indiPage)
}
devicesModel.clear()
- showPage(initPage)
- showPassiveNotification("Disconnected from the server")
+ notification.showNotification("Disconnected from the server")
}
}
contentItem: cPanelColumn
@@ -50,9 +41,8 @@ KSPage {
right: parent.right
}
- Kirigami.Label {
+ Label {
text: xi18n("INDI Host")
- color: num.sysPalette.text
}
RowLayout {
@@ -61,42 +51,43 @@ KSPage {
right: parent.right
}
- Controls.TextField {
+ TextField {
id:ipHost
placeholderText: xi18n("IP")
Layout.alignment: Qt.AlignHCenter
- implicitWidth: parent.width*0.8
+ Layout.maximumWidth: parent.width*0.8
+ Layout.fillWidth: true
text: ClientManagerLite.lastUsedServer()
}
- Controls.TextField {
+ TextField {
id:portHost
placeholderText: xi18n("Port")
Layout.alignment: Qt.AlignHCenter
- implicitWidth: parent.width*0.2
+ Layout.maximumWidth: parent.width*0.2
+ Layout.fillWidth: true
text: ClientManagerLite.lastUsedPort()
}
}
}
- Kirigami.Label {
+ Label {
id: connectedTo
visible: indiPage.connected
- color: num.sysPalette.text
text: xi18n("Connected to ") + ClientManagerLite.connectedHost
}
- Controls.Button {
+ Button {
text: indiPage.connected ? xi18n("Disconnect") : xi18n("Connect ")
onClicked: {
if(!indiPage.connected) {
if(ClientManagerLite.setHost(ipHost.text, parseInt(portHost.text))) {
- showPassiveNotification(xi18n("Successfully connected to the server"))
+ notification.showNotification(xi18n("Successfully connected to the server"))
ClientManagerLite.setLastUsedServer(ipHost.text)
ClientManagerLite.setLastUsedPort(portHost.text)
} else {
- showPassiveNotification(xi18n("Couldn't connect to the server"))
+ notification.showNotification(xi18n("Couldn't connect to the server"))
}
} else {
ClientManagerLite.disconnectHost()
@@ -116,10 +107,9 @@ KSPage {
color: "gray"
}
- Kirigami.Label {
+ Label {
id: devicesLabel
text: xi18n("Available Devices")
- color: num.sysPalette.text
}
ListModel {
@@ -130,7 +120,7 @@ KSPage {
target: ClientManagerLite
onNewINDIDevice: {
var component = Qt.createComponent(Qt.resolvedUrl("./DevicePanel.qml"));
- var devicePanel = component.createObject(pagesWindow);
+ var devicePanel = component.createObject(window);
devicePanel.deviceName = deviceName
devicesModel.append({ name: deviceName, panel: devicePanel })
}
@@ -143,42 +133,21 @@ KSPage {
}
}
onNewINDIMessage: {
- showPassiveNotification(message)
+ notification.showNotification(message)
}
}
}
- }
-
- Kirigami.ScrollablePage {
- id:devicesPage
- anchors {
- top: cPanelColumn.bottom
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- topMargin: 5 * num.dp
- leftMargin: 25 * num.dp
- rightMargin: 25 * num.dp
- bottomMargin: 25 * num.dp
- }
-
- leftPadding: 0
- rightPadding: 0
- topPadding: 0
- bottomPadding: 0
- visible: connected
-
- ListView {
- id: list
+ KSListView {
+ id: devicesPage
+ Layout.fillHeight: true
+ Layout.fillWidth: true
model: devicesModel
- delegate: Kirigami.BasicListItem {
- label: model.name
- enabled: true
- onClicked: {
- model.panel.showPage(false)
- }
+ textRole: "name"
+
+ onClicked: {
+ stackView.push(devicesModel.get(currentIndex).panel)
}
}
}
diff --git a/kstars/kstarslite/qml/indi/ImagePreview.qml b/kstars/kstarslite/qml/indi/ImagePreview.qml
index bd22e57..3c494f9 100644
--- a/kstars/kstarslite/qml/indi/ImagePreview.qml
+++ b/kstars/kstarslite/qml/indi/ImagePreview.qml
@@ -1,10 +1,9 @@
-import QtQuick 2.4
+import QtQuick 2.6
import QtQuick.Window 2.2
import "../modules"
import "../constants" 1.0
import QtQuick.Layouts 1.2
-import QtQuick.Controls 1.4 as Controls
-import org.kde.kirigami 1.0 as Kirigami
+import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2 as Dialogs
KSPage {
@@ -24,13 +23,13 @@ KSPage {
anchors {
top: parent.top
left: parent.left
- margins: 10 * num.dp
+ // margins: 10 * num.dp
}
Layout.fillWidth: true
spacing: 5 * num.dp
- Controls.Button {
+ Button {
text: "Save As"
onClicked: {
@@ -54,39 +53,42 @@ KSPage {
}
}
- }
+ Connections {
+ target: ClientManagerLite
- Connections {
- target: ClientManagerLite
- onNewINDIBLOBImage: {
- if(imagePreview.deviceName == deviceName) {
- image.source = "image://images/ccdPreview"
- imagePreview.showPage()
+ onNewINDIBLOBImage: {
+ if(imagePreview.deviceName == deviceName) {
+ image.source = "image://images/ccdPreview"
+ stackView.push(imagePreview)
+ }
}
- }
- onCreateINDIButton: {
- if(imagePreview.deviceName == deviceName) {
- if(propName == "UPLOAD_MODE") {
- if(imagePreview.buttonRow == null) {
- var buttonRowComp = Qt.createComponent("modules/KSButtonsSwitchRow.qml");
- imagePreview.buttonRow = buttonRowComp.createObject(saveButtons)
- imagePreview.buttonRow.deviceName = deviceName
- imagePreview.buttonRow.propName = propName
- imagePreview.buttonRow.exclusive = exclusive
+
+ onCreateINDIButton: {
+ if(imagePreview.deviceName == deviceName) {
+ if(propName == "UPLOAD_MODE") {
+ if(imagePreview.buttonRow == null) {
+ var buttonRowComp = Qt.createComponent("modules/KSButtonsSwitchRow.qml");
+ imagePreview.buttonRow = buttonRowComp.createObject(saveButtons)
+ imagePreview.buttonRow.deviceName = deviceName
+ imagePreview.buttonRow.propName = propName
+ imagePreview.buttonRow.exclusive = exclusive
+ }
+ imagePreview.buttonRow.addButton(propText, switchName, checked, enabled)
}
- imagePreview.buttonRow.addButton(propText, switchName, checked, enabled)
}
}
- }
- onRemoveINDIProperty: {
- if(imagePreview.deviceName == deviceName) {
- if(propName == "UPLOAD_MODE") {
- if(imagePreview.buttonRow != null) {
- imagePreview.buttonRow.destroy()
- imagePreview.buttonRow = null
+
+ onRemoveINDIProperty: {
+ if(imagePreview.deviceName == deviceName) {
+ if(propName == "UPLOAD_MODE") {
+ if(imagePreview.buttonRow != null) {
+ imagePreview.buttonRow.destroy()
+ imagePreview.buttonRow = null
+ }
}
}
}
}
+
}
}
diff --git a/kstars/kstarslite/qml/indi/modules/KSButtonSwitch.qml b/kstars/kstarslite/qml/indi/modules/KSButtonSwitch.qml
index 96f4c54..895e93b 100644
--- a/kstars/kstarslite/qml/indi/modules/KSButtonSwitch.qml
+++ b/kstars/kstarslite/qml/indi/modules/KSButtonSwitch.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.4
-import QtQuick.Controls 1.4
+import QtQuick 2.6
+import QtQuick.Controls 2.0
Button {
property string switchName: ""
diff --git a/kstars/kstarslite/qml/indi/modules/KSButtonsSwitchRow.qml b/kstars/kstarslite/qml/indi/modules/KSButtonsSwitchRow.qml
index b95511d..77033fb 100644
--- a/kstars/kstarslite/qml/indi/modules/KSButtonsSwitchRow.qml
+++ b/kstars/kstarslite/qml/indi/modules/KSButtonsSwitchRow.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.4
+import QtQuick 2.6
import QtQuick.Controls 1.4
import QtQuick.Window 2.2
import "../../constants" 1.0
@@ -10,8 +10,8 @@ Flow {
property string propName: ""
property string deviceName: ""
property bool exclusive: false
- //Layout.fillWidth: true
- spacing: 5 * num.dp
+ Layout.fillWidth: true
+ spacing: 10 * num.dp
Connections {
target: ClientManagerLite
diff --git a/kstars/kstarslite/qml/indi/modules/KSCheckBox.qml b/kstars/kstarslite/qml/indi/modules/KSCheckBox.qml
index c5b3b71..2f9d5a8 100644
--- a/kstars/kstarslite/qml/indi/modules/KSCheckBox.qml
+++ b/kstars/kstarslite/qml/indi/modules/KSCheckBox.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.4
-import QtQuick.Controls 1.4
+import QtQuick 2.6
+import QtQuick.Controls 2.0
CheckBox {
property string switchName: ""
diff --git a/kstars/kstarslite/qml/indi/modules/KSComboBox.qml b/kstars/kstarslite/qml/indi/modules/KSComboBox.qml
index d14f612..82f059a 100644
--- a/kstars/kstarslite/qml/indi/modules/KSComboBox.qml
+++ b/kstars/kstarslite/qml/indi/modules/KSComboBox.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.4
-import QtQuick.Controls 1.4
+import QtQuick 2.6
+import QtQuick.Controls 2.0
ComboBox {
id: comboBox
diff --git a/kstars/kstarslite/qml/indi/modules/KSINDIText.qml b/kstars/kstarslite/qml/indi/modules/KSINDIText.qml
index 3ef0fd2..162b439 100644
--- a/kstars/kstarslite/qml/indi/modules/KSINDIText.qml
+++ b/kstars/kstarslite/qml/indi/modules/KSINDIText.qml
@@ -1,7 +1,7 @@
-import QtQuick 2.4
+import QtQuick 2.6
+import QtQuick.Controls 2.0
import QtQuick.Layouts 1.2
import "../../constants" 1.0
-import org.kde.kirigami 1.0 as Kirigami
Column {
id: columnTextProp
@@ -10,9 +10,8 @@ Column {
spacing: 5 * num.dp
property string propLabel: ""
- Kirigami.Label {
+ Label {
text: propLabel
- color: num.sysPalette.text
}
Rectangle {
@@ -33,11 +32,10 @@ Column {
textItem.textField.text = propText
textItem.isNumber = isNumber
} else {
- textItem = Qt.createQmlObject('import QtQuick 2.4
+ textItem = Qt.createQmlObject('import QtQuick 2.6
import QtQuick.Layouts 1.2
import "../../constants" 1.0
Text {
- color: num.sysPalette.text
}', this)
textItem.text = propText
}
diff --git a/kstars/kstarslite/qml/indi/modules/KSINDITextField.qml b/kstars/kstarslite/qml/indi/modules/KSINDITextField.qml
index 6b854d1..d482d3d 100644
--- a/kstars/kstarslite/qml/indi/modules/KSINDITextField.qml
+++ b/kstars/kstarslite/qml/indi/modules/KSINDITextField.qml
@@ -1,11 +1,10 @@
-import QtQuick 2.4
+import QtQuick 2.6
import QtQuick.Layouts 1.2
import "../../constants" 1.0
-import org.kde.kirigami 1.0 as Kirigami
-import QtQuick 2.4
+import QtQuick 2.6
import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
+import QtQuick.Controls 2.0
Flow {
id: textRow
diff --git a/kstars/kstarslite/qml/indi/modules/KSLed.qml b/kstars/kstarslite/qml/indi/modules/KSLed.qml
index a719e49..924f8ad 100644
--- a/kstars/kstarslite/qml/indi/modules/KSLed.qml
+++ b/kstars/kstarslite/qml/indi/modules/KSLed.qml
@@ -1,7 +1,6 @@
-import QtQuick 2.4
+import QtQuick 2.6
import QtQuick.Layouts 1.2
-import QtQuick.Controls 1.4
-import org.kde.kirigami 1.0 as Kirigami
+import QtQuick.Controls 2.0
import "../../constants" 1.0
import "../../modules"
@@ -46,9 +45,8 @@ Row {
anchors.verticalCenter: parent.verticalCenter
}
- Kirigami.Label {
+ Label {
text: ledRow.label
anchors.verticalCenter: parent.verticalCenter
- color: num.sysPalette.text
}
}
diff --git a/kstars/kstarslite/qml/indi/modules/KSTab.qml b/kstars/kstarslite/qml/indi/modules/KSTab.qml
deleted file mode 100644
index ae95d76..0000000
--- a/kstars/kstarslite/qml/indi/modules/KSTab.qml
+++ /dev/null
@@ -1,36 +0,0 @@
-import QtQuick 2.4
-import QtQuick.Layouts 1.2
-import QtQuick.Controls 1.4
-import org.kde.kirigami 1.0 as Kirigami
-import "../../constants" 1.0
-import "../../modules"
-
-Tab {
- id: tab
- anchors {
- fill: parent
- leftMargin: 5 * num.dp
- rightMargin: 5 * num.dp
- }
- active: true
-
- property Item columnItem
-
- ScrollView {
- anchors.fill: parent
- horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
-
- Component.onCompleted: {
- contentItem: column
- flickableItem.flickableDirection = Flickable.VerticalFlick
- }
-
- Column {
- id: column
-
- Component.onCompleted: {
- tab.columnItem = this
- }
- }
- }
-}
diff --git a/kstars/kstarslite/qml/indi/modules/Led.qml b/kstars/kstarslite/qml/indi/modules/Led.qml
index c3d51f1..daeeedf 100644
--- a/kstars/kstarslite/qml/indi/modules/Led.qml
+++ b/kstars/kstarslite/qml/indi/modules/Led.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.4
+import QtQuick 2.6
import "../../constants" 1.0
Image {
diff --git a/kstars/kstarslite/qml/indi/modules/MotionControl.qml b/kstars/kstarslite/qml/indi/modules/MotionControl.qml
index 65270bd..845e608 100644
--- a/kstars/kstarslite/qml/indi/modules/MotionControl.qml
+++ b/kstars/kstarslite/qml/indi/modules/MotionControl.qml
@@ -1,8 +1,7 @@
-import QtQuick 2.4
+import QtQuick 2.6
import QtQuick.Window 2.2
import QtQuick.Layouts 1.2
-import QtQuick.Controls 1.4
-import org.kde.kirigami 1.0 as Kirigami
+import QtQuick.Controls 2.0
import TelescopeLiteEnums 1.0
import "../../constants" 1.0
@@ -269,7 +268,6 @@ ColumnLayout {
height: parent.height * 0.15
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
- color: num.sysPalette.text
text: xi18n("Slewing speed control")
}
diff --git a/kstars/kstarslite/qml/indi/modules/Property.qml b/kstars/kstarslite/qml/indi/modules/Property.qml
index 24d0c7a..64cfe75 100644
--- a/kstars/kstarslite/qml/indi/modules/Property.qml
+++ b/kstars/kstarslite/qml/indi/modules/Property.qml
@@ -1,16 +1,15 @@
-import QtQuick 2.4
+import QtQuick 2.6
import QtQuick.Window 2.2
import QtQuick.Layouts 1.2
-import QtQuick.Controls 1.4
+import QtQuick.Controls 2.0
import "../../constants"
-import org.kde.kirigami 1.0 as Kirigami
import TelescopeLiteEnums 1.0
ColumnLayout {
id: columnProp
Layout.fillHeight: true
- width: parentTab.width// : parent.width
+ width: parentTab == null ? 0 : parentTab.width
property string deviceName: ""
property string propName: ""
diff --git a/kstars/kstarslite/qml/main.qml b/kstars/kstarslite/qml/main.qml
index 58f8bb8..7c25ea9 100644
--- a/kstars/kstarslite/qml/main.qml
+++ b/kstars/kstarslite/qml/main.qml
@@ -1,435 +1,334 @@
-import QtQuick 2.4
-import QtQuick.Window 2.2
+import QtQuick 2.7
+
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Universal 2.0
+
+import QtQuick.Window 2.2 as Window
import QtQuick.Layouts 1.1
import "modules"
-import "indi"
-import "constants" 1.0
+import "modules/helpers"
+import "modules/popups"
import "dialogs"
-import QtQuick.Controls 1.4 as Controls
-import org.kde.kirigami 1.0 as Kirigami
-import QtSensors 5.0
-import QtGraphicalEffects 1.0
+import "constants" 1.0
+import "indi"
-Kirigami.ApplicationWindow {
- id: mainWindow
- width: Screen.desktopAvailableWidth
- height: Screen.desktopAvailableHeight
- property double shadowBgOpacity
- property int drawersOrder: 2
- property int bgOrder: 1
- property int skyMapOrder: 0
- property int topMenuOrder: 0
- objectName: "mainWindow"
+ApplicationWindow {
+ id: window
+ objectName: "window"
+ width: Window.Screen.desktopAvailableWidth
+ height: Window.Screen.desktopAvailableHeight
+ visible: true
+ property bool isPortrait: width < height ? true: false
+ property bool isSkyMapVisible: stackView.currentItem == initPage
- property Item initPage: initPage
+ //Application properties
+ property bool loaded: false
- pageStack.initialPage: null
+ header: ToolBar {
+ id: toolBar
+ Material.foreground: "white"
+ height: stackView.currentItem != initPage ? backButton.height: 0
+ visible: stackView.currentItem != initPage
- property var contextActions: []
+ Behavior on height {
+ NumberAnimation {
+ duration: 200
+ easing.type: Easing.InOutQuad
+ }
+ }
- property var telescopes: []
+ RowLayout {
+ spacing: 20
+ height: titleLabel.height
+ Layout.fillWidth: true
- //pageStack.currentIndex: initPage
+ ToolButton {
+ id: backButton
+ contentItem: Image {
+ fillMode: Image.Pad
+ horizontalAlignment: Image.AlignHCenter
+ verticalAlignment: Image.AlignVCenter
+ source: "modules/images/back.png"
+ sourceSize.height: titleLabel.height
+ }
+ onClicked: {
+ if(stackView.depth != 1) stackView.pop()
+ }
+ }
+
+ Label {
+ id: titleLabel
+ text: stackView.currentItem.title
+ font.pixelSize: 20
+ elide: Label.ElideRight
+ //horizontalAlignment: Qt.AlignHCenter
+ verticalAlignment: Qt.AlignVCenter
+ Layout.fillWidth: true
+ }
- property Item currentPage: initPage
+ ToolButton {
+ /*contentItem: Image {
+ fillMode: Image.Pad
+ horizontalAlignment: Image.AlignHCenter
+ verticalAlignment: Image.AlignVCenter
+ //source: "qrc:/images/menu.png"
+ }*/
+ onClicked: optionsMenu.open()
- controlsVisible: false
+ Menu {
+ id: optionsMenu
+ x: parent.width - width
+ transformOrigin: Menu.TopRight
- header: Kirigami.ApplicationHeader {
- visible: false
+ MenuItem {
+ text: "Settings"
+ onTriggered: settingsPopup.open()
+ }
+ MenuItem {
+ text: "About"
+ onTriggered: aboutDialog.open()
+ }
+ }
+ }
+ }
}
- property bool loaded: false
-
Splash {
z:1
anchors.fill:parent
onTimeout: {
loaded = true
- controlsVisible = true
}
}
- contentItem.anchors.topMargin: 0
- wideScreen: true
-
- Item {
- id: pagesWindow
+ StackView {
+ visible: loaded
+ id: stackView
anchors.fill: parent
+ initialItem: initPage
}
- globalDrawer: Kirigami.GlobalDrawer {
- bannerImageSource: "modules/images/kstars.png"
- visible: loaded
- actions: [
- Kirigami.Action {
- text: "Sky Map"
-
- onTriggered: {
- initPage.showPage(true)
- globalDrawer.close()
- }
- },
- Kirigami.Action {
- text: "INDI Control Panel"
-
- onTriggered: {
- //mainWindow.currentPage = initPage
- indiControlPanel.showPage(true)
- globalDrawer.close()
- }
- },
- Kirigami.Action {
- text: "Find Object"
-
- onTriggered: {
- findDialog.showPage(true)
- globalDrawer.close()
- }
- }
- ]
-
- Kirigami.Label {
- text: "Magnitude Limit"
- }
-
- Controls.Slider {
- Layout.fillWidth: true
+ PassiveNotification {
+ id: notification
+ }
- maximumValue: 5.75954
- minimumValue: 1.18778
- value: SkyMapLite.magLim
- onValueChanged: {
- SkyMapLite.magLim = value
- }
- }
+ Units {
+ id: units
}
+ //Pages
FindDialog {
id: findDialog
}
- //Background shadow
-
- /*function showBgShadow() {
- shadowBg.state = "visible"
+ INDIControlPanel {
+ id: indiControlPanel
}
- function hideBgShadow() {
- shadowBg.state = "hidden"
+ ObjectDetails {
+ id: objectDetails
}
- Item {
- id: shadowBg
- state: "hidden"
- anchors.fill: parent
- z: bgOrder
+ Page {
+ id: initPage
+ title: "Sky Map"
Rectangle {
- id: shadowRect
anchors.fill: parent
- color: "black"
- }
-
- FastBlur {
- anchors.fill: shadowRect
- source: shadowRect
- radius: Units.gridUnit
- transparentBorder: true
+ color: "black" //Color scheme
}
+ }
- states: [
- State {
- name: "visible"
- PropertyChanges {
- target: shadowBg
- opacity: 0.3
- }
- },
- State {
- name: "hidden"
- PropertyChanges {
- target: shadowBg
- opacity: 0
- }
- }]
+ SkyMapLiteWrapper {
+ /*The reason SkyMapLite is a not a child of initPage is that it can't handle properly change of
+ opacity. Each time we go from / to initPage this component is made invisible / visible and
+ skyMapLiteWrapper is anchored to fill null / parent*/
+ id: skyMapLite
+ }
- Behavior on opacity {
- NumberAnimation { duration: 200 }
- }
- }*/
+ //Popups
+ TimePage {
+ id: timePage
+ }
- contextDrawer: Kirigami.ContextDrawer {
- id: contextDrawer
- property Item contextMenu
-
- actions: initPage.actions.contextualActions
-
- onOpenedChanged: {
- if(opened) {
- //If no telescopes are connected then we disable actions in context drawer
- var areTelescopesLoaded = false
- if(ClientManagerLite.connected) {
- for(var i = 0; i < mainWindow.telescopes.length; ++i) {
- if(mainWindow.telescopes[i].isConnected()) {
- areTelescopesLoaded = true
- }
- }
- }
- initPage.telescopeLoaded = areTelescopesLoaded
- }
- }
+ ColorSchemePopup {
+ id: colorSchemePopup
+ x: (window.width - width)/2
+ y: (window.height - height)/2
+ }
- Component.onCompleted: {
- var contDrawMenuComp = Qt.createComponent("modules/ContextDrawerMenu.qml");
- contextMenu = contDrawMenuComp.createObject(contentItem)
- }
+ ProjectionsPopup {
+ id: projPopup
+ x: (window.width - width)/2
+ y: (window.height - height)/2
}
- INDIControlPanel {
- id: indiControlPanel
+ ObjectPopup {
+ id: objPopup
+ x: (window.width - width)/2
+ y: (window.height - height)/2
}
- KSPage {
- id: initPage
- title: "Main Screen"
- visible:true
+ Drawer {
+ id: globalDrawer
+ width: Math.min(window.width, window.height) / 4 * 2
+ height: window.height
+ //Disable drawer while loading
+ dragMargin: loaded ? Qt.styleHints.startDragDistance : -Qt.styleHints.startDragDistance
- TapSensor {
- onReadingChanged: {
- console.log(reading.doubleTap)
- }
+ onOpened: {
+ contextDrawer.close()
}
- onVisibleChanged: {
- if(visible) {
- SkyMapLite.update() //Update SkyMapLite once user opened initPage
+ Image {
+ id: drawerBanner
+ source: "modules/images/kstars.png"
+ fillMode: Image.PreserveAspectFit
+
+ anchors {
+ left: parent.left
+ top: parent.top
+ right: parent.right
}
}
- property bool isClickedObject: false
- property bool telescopeLoaded: false
-
- Connections {
- target: SkyMapLite
- onObjectChanged: {
- contextDrawer.title = ClickedObject.translatedName
- contextDrawer.open()
- initPage.isClickedObject = true
- }
- onPositionChanged: {
- contextDrawer.title = "Point"
- contextDrawer.open()
- initPage.isClickedObject = false
+ ListView {
+ id: pagesList
+ currentIndex: -1
+ anchors {
+ left: parent.left
+ top: drawerBanner.bottom
+ right: parent.right
+ bottom: parent.bottom
}
- }
- Connections {
- target: ClientManagerLite
- /*onDeviceConnected: {
- var isConnected = false
- for(var i = 0; i < telescopes.length; ++i) {
- if(telescopes[i].isConnected()) {
- isConnected = true
+ delegate: ItemDelegate {
+ Rectangle {
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ bottom: parent.bottom
}
+ width: parent.width - 10
+ color: "#E8E8E8"
+ height: 1
}
- initPage.telescopeLoaded = Connected
- }*/
- onTelescopeAdded: {
- telescopes.push(newTelescope)
- initPage.telescopeLoaded = true
- }
- }
- actions {
- contextualActions: [
- Kirigami.Action {
- enabled: initPage.telescopeLoaded
- text: "Slew to object"
- onTriggered: {
- for(var i = 0; i < telescopes.length; ++i) {
- if(telescopes[i].isConnected()) {
- if(initPage.isClickedObject) {
- telescopes[i].slew(ClickedObject)
- } else {
- telescopes[i].slew(ClickedPoint)
- }
- }
- }
- }
- },
- Kirigami.Action {
- enabled: initPage.telescopeLoaded
- text: "Sync"
- onTriggered: {
- for(var i = 0; i < telescopes.length; ++i) {
- if(telescopes[i].isConnected()) {
- if(initPage.isClickedObject) {
- telescopes[i].sync(ClickedObject)
- } else {
- telescopes[i].sync(ClickedPoint)
- }
+ width: parent.width
+ text: model.objID.title
+ highlighted: ListView.isCurrentItem
+ onClicked: {
+ if (pagesList.currentIndex != index) {
+ pagesList.currentIndex = index
+
+ if(stackView.currentItem != model.objID) {
+ if(model.objID != initPage) {
+ //skyMapLiteWrapper.visible = false
+ stackView.replace(null, [initPage, model.objID])
+ } else {
+ stackView.replace(null, initPage)
+ //skyMapLiteWrapper.visible = true
}
}
+ globalDrawer.close()
+ pagesList.currentIndex = -1
}
}
- ]
- }
-
- Splash {
- z:1
- anchors.fill:parent
- onTimeout: {
- loaded = true
- mainWindow.controlsVisible = true
}
- }
- /*content is made Rectangle to allow z-index ordering
- (for some reason it doesn't work with plain Item)*/
- Item {
- id: content
- anchors.fill: parent
- visible: loaded
+ property ListModel drawerModel : ListModel {
+ //Trick to enable storing of object ids
+ Component.onCompleted: {
+ append({objID: initPage});
+ append({objID: indiControlPanel});
+ append({objID: findDialog});
+ }
+ }
- Rectangle {
- id: skyMapLiteWrapper
- clip: true
- objectName: "skyMapLiteWrapper"
- anchors.fill: parent
- color: "black"
+ model: drawerModel
- Rectangle {
- id: tapCircle
- z: 1
- width: 20 * num.dp
- height: width
- color: "grey"
- radius: width*0.5
- opacity: 0
-
- Connections {
- target: SkyMapLite
- onPosClicked: {
- tapCircle.x = pos.x - tapCircle.width * 0.5
- tapCircle.y = pos.y - tapCircle.height * 0.5
- tapAnimation.start()
- }
- }
+ ScrollIndicator.vertical: ScrollIndicator { }
+ }
+ }
- SequentialAnimation on opacity {
- id: tapAnimation
- OpacityAnimator { from: 0; to: 0.8; duration: 100 }
- OpacityAnimator { from: 0.8; to: 0; duration: 400 }
- }
- }
+ Drawer {
+ id: contextDrawer
+ width: Math.min(window.width, window.height) / 4 * 2
+ height: window.height
+ //Disable drawer while loading and if SkyMapLite is not visible
+ dragMargin: isSkyMapVisible && loaded ? Qt.styleHints.startDragDistance : -Qt.styleHints.startDragDistance
+ onOpened: {
+ globalDrawer.close()
+ }
- /*MouseArea {
- z: 1
- anchors.fill: parent
- propagateComposedEvents: true
- onClicked: {
- tapCircle.x = mouseX - tapCircle.width/2
- tapCircle.y = mouseY - tapCircle.height/2
- mouse.accepted = false
- }
- }*/
+ Label {
+ id: contextTitle
+ anchors {
+ top: parent.top
+ left: parent.left
+ margins: 10
}
- MouseArea {
- property int posY
- anchors {
- left: parent.left
- right: parent.right
- top: parent.top
- }
- height: parent.height * 0.10
+ font.pointSize: 14
+ text: stackView.currentItem.title
+ }
- onPressed: {
- posY = mouseY
- }
+ ListView {
+ id: contextList
+ currentIndex: -1
+ anchors {
+ left: parent.left
+ top: contextTitle.bottom
+ right: parent.right
+ bottom: parent.bottom
+ topMargin: 15
+ }
+ model: drawerModel
- onPositionChanged: {
- var ratio = 0.05
- var delta = mouseY - posY
- if (delta > parent.height * ratio) {
- if(topMenu.state != "open") topMenu.state = "open"
- } else if (delta < - (parent.height * ratio)) {
- if(topMenu.state != "") topMenu.state = ""
+ delegate: ItemDelegate {
+ Rectangle {
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ bottom: parent.bottom
}
-
+ width: parent.width - 10
+ color: "#E8E8E8"
+ height: 1
}
- TopMenu {
- z: topMenuOrder
- id: topMenu
- anchors.horizontalCenter: parent.horizontalCenter
- Connections {
- target: mainWindow
-
- function setOrientation() {
- if (width < topMenu.width) {
- topMenu.state = "portrait"
- }
- else topMenu.state = "landscape"
- }
-
- Component.onCompleted: {
- setOrientation()
- }
- onWidthChanged: {
- setOrientation()
- }
+ width: parent.width
+ text: model.title
+ highlighted: ListView.isCurrentItem
+ onClicked: {
+ if(model.type == "popup") {
+ objID.open()
}
+ contextDrawer.close()
+ contextList.currentIndex = -1
}
}
- MouseArea {
- property int posY
- anchors {
- bottom: parent.bottom
- horizontalCenter: parent.horizontalCenter
- }
- width: bottomMenu.width
- height: parent.height *0.10
-
- onPressed: {
- posY = mouseY
+ property ListModel drawerModel : ListModel {
+ //Trick to enable storing of object ids
+ Component.onCompleted: {
+ append({title: "Projection systems", objID: projPopup, type: "popup"});
+ append({title: "Color Schemes", objID: colorSchemePopup, type: "popup"});
}
+ }
- onPositionChanged: {
- var ratio = 0.05
- var delta = mouseY - posY
- if (delta < parent.height * ratio) {
- if(bottomMenu.state != "open") bottomMenu.state = "open"
- } else if (delta > - (parent.height * ratio)) {
- if(bottomMenu.state != "") bottomMenu.state = ""
- }
-
- }
- BottomMenu {
- z: topMenuOrder
- id: bottomMenu
-
- anchors.horizontalCenter: parent.horizontalCenter
- Connections {
- target: mainWindow
-
- function setOrientation() {
- if (width < topMenu.width) {
- bottomMenu.state = "portrait"
- }
- else bottomMenu.state = "landscape"
- }
-
- Component.onCompleted: {
- setOrientation()
- }
+ ScrollIndicator.vertical: ScrollIndicator { }
+ }
+ edge: Qt.RightEdge
+ }
- onWidthChanged: {
- setOrientation()
- }
- }
+ //Handle back button
+ Connections {
+ target: window
+ onClosing: {
+ if (Qt.platform.os == "android") {
+ if(stackView.depth > 1) {
+ close.accepted = false;
+ stackView.pop()
}
}
}
diff --git a/kstars/kstarslite/qml/modules/BottomMenu.qml b/kstars/kstarslite/qml/modules/BottomMenu.qml
index 3519523..48a12b9 100644
--- a/kstars/kstarslite/qml/modules/BottomMenu.qml
+++ b/kstars/kstarslite/qml/modules/BottomMenu.qml
@@ -1,206 +1,253 @@
-import QtQuick 2.0
+import QtQuick 2.7
import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles 1.4
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Universal 2.0
+
+import QtQuick.Window 2.2
import "../constants" 1.0
import "helpers"
ColumnLayout {
id: bottomMenu
- property int padding: num.dp * 10
- property int minY: - menuRect.height
- property int maxY: -menuRect.radius
+ property int padding: 10
+ property double openOffset: bottomMenu.height - bottomBar.background.radius //Hide bottom round corners
+ property double closedOffset: arrowUp.height + padding
- anchors{
- bottom: parent.bottom
- bottomMargin: minY
- }
+ property bool isWindowWidthSmall: window.width < menuGrid.maxWidth
+
+ state: "closed"
+ spacing: padding
+
+ x: (parent.width - width)/2
+
+ Layout.fillHeight: true
states: [
State {
name: "open"
PropertyChanges {
target: bottomMenu
- anchors.bottomMargin: maxY
- }
- PropertyChanges {
- target: arrowUp
- state:""
+ y: parent.height - openOffset
}
},
State {
- name: ""
+ name: "closed"
PropertyChanges {
target: bottomMenu
- y: minY
- }
- PropertyChanges {
- target: arrowUp
- state:"visible"
+ y: parent.height - closedOffset
}
}
]
- Behavior on anchors.bottomMargin {
- PropertyAnimation {
- duration: 500
+ transitions: [
+ Transition {
+ from: "closed"; to: "open"
+ PropertyAnimation { target: bottomMenu
+ properties: "y"; duration: 300 }
+ },
+ Transition {
+ from: "open"; to: "closed"
+ PropertyAnimation { target: bottomMenu
+ properties: "y"; duration: 300 }
}
- }
+ ]
+
+ Item {
+ width: arrowUp.sourceSize.width/num.pixelRatio
+ height: arrowUp.sourceSize.height/num.pixelRatio
+ anchors.horizontalCenter: parent.horizontalCenter
- Image {
+ Image {
id: arrowUp
anchors {
- bottom: menuRect.top
- horizontalCenter: menuRect.horizontalCenter
- bottomMargin: num.dp * 10
+ fill: parent
+ horizontalCenter: parent.horizontalCenter
}
- source: num.imagesPath + "arrow_up.png"
+ state: "open"
+ source: num.imagesPath + "arrow.png"
+ rotation: bottomMenu.state == "closed" ? 180 : 0
+ mirror: true // Make sure that arrows in both menus look symmetric
- Component.onCompleted: {
- state = "visible"
- }
+ //transform: Rotation { axis { x: 1; y: 0; z: 0 } angle: 90 }
+ //rotation: 180
MouseArea {
anchors.fill: parent
onPressed: {
- bottomMenu.state = bottomMenu.state == "open" ? "" : "open"
+ bottomMenu.state = bottomMenu.state == "closed" ? "open" : "closed"
}
}
- states: [
- State {
- name:"visible"
- PropertyChanges {
- target: arrowUp
- opacity: 1
- visible: true
- }
- },
- State {
- name:""
- PropertyChanges {
- target: arrowUp
- opacity: 0
- visible: false
+ Behavior on rotation {
+ RotationAnimation {
+ duration: 200; direction: RotationAnimation.Counterclockwise
+ }
+ }
+ }
+ }
+
+ Pane {
+ id: bottomBar
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ background: Rectangle {
+ id: menuRect
+ color: num.sysPalette.dark
+ border {
+ width: 1
+ color: num.sysPalette.light
+ }
+ radius: 10
+ }
+
+ GridLayout {
+ id: menuGrid
+ property double maxWidth: {width} // We make menuGrid smaller when window width is less than this value
+
+ onWidthChanged: {
+ if(width > maxWidth) maxWidth = width
+ }
+
+ anchors {
+ bottom: parent.bottom
+ bottomMargin: menuRect.radius/2 // Center vertically menuGrid in background rectangle
+ }
+ rows: isWindowWidthSmall ? 2 : 1
+ flow: isWindowWidthSmall ? GridLayout.TopToBottom : GridLayout.LeftToRight
+
+ Layout.fillWidth: true
+
+ RowLayout {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ anchors {
+ left: parent.left
+ right: parent.right
+ }
+
+ BottomMenuButton {
+ id: goBackwards
+ iconSrc: num.iconpath + "media-skip-backward.png"
+ onClicked: {
+ KStarsLite.slotStepBackward()
}
}
- ]
-
- transitions: [
- Transition {
- from: "visible"
- to: ""
-
- SequentialAnimation {
- NumberAnimation {
- target: arrowUp
- property: "opacity"
- duration: 300
+
+ BottomMenuButton {
+ id: