Skip to content

Commit e6ffdf9

Browse files
ldanzingerJamesMBallard
authored andcommitted
merge v.next to master for 100.5 (#321)
* Updated UserCredentials Dialog to deal with QuickControls2 and scale factor changes. * Removed uneeded whitespace. * Host now displayed on newline. * UserCredentials Dialog now versioned to retain old functionality. * Ldanzinger/controls cleanup (#308) * Update Callout.qml Removing unused import * Update PopupView.qml removing superfluous import * Update PopupViewBase.qml removing superfluous import * SslHandshakeView dialog now uses QuickControls 2. Made (#307) * SslHandshakeView now uses QuickControls 2. Made tweak to UserCredentialsView so renders correctly in QtQuick Preview rendering. * Update SslHandshakeView.qml Removed unneeded whitespace. * James/v.next/100.5 version update (#306) * Version update pass 1. * More version updates. * Clarification on toolkit version compatibility. * Updates for recent changes. * Upgraded toolkit to 100.5 * Fixed syntax error in qmldir. Reduced the versioning of the CppApi sections as was causing issues. Swapped filenames of PopStackView/PopupStackView102 as wrong one was edited. * Removed accidental copy of TimeSlider file. * Fixed older authentication view using newer controls due to hard coding of file paths within the authentication view source. * Updated suffixes 101, 102, 103 to 1001, 1002, 1003. * Ldanzinger/controls2 upgrade (#310) * updating import versions * updating imports and changing banner to take in a color instead of a static image. This will enabled Qt Quick Controls 2 users to set Materials.PrimaryColor or other methods to customize the look and feel of the dialog * Update UserCredentialsView.qml * We don't need the full include here. Bringing in <QtQml> also brings in qendian.h which has compile errors with Qt 5.12.0 using gcc 4.8.x series compilers. * Parse webview title in onTitleChanged signal handler * James/android output folder (#313) * Add a new arm64 output folder. * Tighten the logic. * adding missing qrc files (#314) * updating controls to have a default color (#315) * add override, change Q_DECL_OVERRIDE by override, fix indentation (#316) * Make this a struct. (#317) * Make this a struct. That's what it really is. Also, move destructor logic to cpp file and declare an explicit copy constructor as defaulted. * Remove extra line. * Stackview now more robust. Push/pop logic was confusing. All we want is a transition. We now use the replace function to get this effect. * Made swap function. Fixed transition bug. Created a swap function to reduce repetition of swapping the popup buffers. Resolved a transition bug where rapid clicking forward/backwards would leave the popup stack in an invalid state. * Fixed missing semicolon. * Fixed issue where show may be called to reset the stackview but state is not correctly reset in all cases.
1 parent 63349bc commit e6ffdf9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+6940
-622
lines changed

Examples/CalloutExample.qml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
* limitations under the License.
1515
******************************************************************************/
1616

17-
import QtQuick 2.3
18-
import QtQuick.Controls 1.2
19-
import QtPositioning 5.3
20-
import QtSensors 5.3
21-
import Esri.ArcGISRuntime 100.4
17+
import QtQuick 2.11
18+
import QtQuick.Controls 2.4
19+
import QtPositioning 5.8
20+
import QtSensors 5.9
21+
import Esri.ArcGISRuntime 100.5
2222
import Esri.ArcGISExtras 1.1
23-
import Esri.ArcGISRuntime.Toolkit.Controls 100.4
23+
import Esri.ArcGISRuntime.Toolkit.Controls 100.5
2424

2525
Rectangle {
2626
width: 800
@@ -41,7 +41,7 @@ Rectangle {
4141
FeatureLayer {
4242
id: featureLayer
4343
ServiceFeatureTable {
44-
url: "http://holistic30.esri.com:6080/arcgis/rest/services/DamageInspection6/FeatureServer/0"
44+
url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/FeatureServer/0"
4545
}
4646
}
4747

Examples/Examples.qml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* limitations under the License.
1515
******************************************************************************/
1616

17-
import QtQuick 2.0
18-
import QtQuick.Controls 1.1
17+
import QtQuick 2.11
18+
import QtQuick.Controls 2.4
1919
import QtGraphicalEffects 1.0
20-
import Esri.ArcGISRuntime 100.4
20+
import Esri.ArcGISRuntime 100.5
2121

2222
Rectangle {
2323
width: 640

Examples/PopupExample.qml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
* limitations under the License.
1515
******************************************************************************/
1616

17-
import QtQuick 2.6
18-
import QtQuick.Controls 1.5
19-
import QtPositioning 5.3
20-
import QtSensors 5.3
17+
import QtQuick 2.11
18+
import QtQuick.Controls 2.4
19+
import QtPositioning 5.8
20+
import QtSensors 5.9
2121
import QtQuick.Dialogs 1.2
22-
import Esri.ArcGISRuntime 100.4
22+
import Esri.ArcGISRuntime 100.5
2323
import Esri.ArcGISExtras 1.1
24-
import Esri.ArcGISRuntime.Toolkit.Controls 100.4
24+
import Esri.ArcGISRuntime.Toolkit.Controls 100.5
2525

2626
Rectangle {
2727
id: root

Import/Esri/ArcGISRuntime/Toolkit/Controls/Callout.qml

Lines changed: 40 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
******************************************************************************/
16-
17-
import QtQuick 2.4
18-
import QtQuick.Window 2.2
19-
import QtQuick.Layouts 1.1
20-
import QtQuick.Controls 1.4
21-
import QtQuick.Controls.Styles 1.4
22-
import QtQuick.Window 2.0
16+
17+
import QtQuick 2.11
18+
import QtQuick.Window 2.11
19+
import QtQuick.Layouts 1.3
2320
import "LeaderPosition.js" as Enums
2421

2522
/*!
@@ -44,7 +41,7 @@ import "LeaderPosition.js" as Enums
4441
Item {
4542
id: root
4643
x: 0
47-
y: 0
44+
y: 0
4845

4946
/*========================================
5047
Configurable properties
@@ -102,7 +99,7 @@ Item {
10299
103100
The default width is \c 2.
104101
*/
105-
property int borderWidth: 2 * displayScaleFactor
102+
property int borderWidth: 2
106103

107104
/*!
108105
\brief The background color of the Callout.
@@ -130,35 +127,35 @@ Item {
130127
131128
The default value is \c 5.
132129
*/
133-
property int cornerRadius: 5 * displayScaleFactor
130+
property int cornerRadius: 5
134131

135132
/*!
136133
\brief The height of the leader line in the Callout.
137134
138135
The default leader height is \c 10.
139136
*/
140-
property int leaderHeight: 10 * displayScaleFactor
137+
property int leaderHeight: 10
141138

142139
/*!
143140
\brief The width of the leader line in the Callout.
144141
145142
The default leader width is \c 20.
146143
*/
147-
property int leaderWidth: 20 * displayScaleFactor
144+
property int leaderWidth: 20
148145

149146
/*!
150147
\brief The x offset of the placement of the Callout.
151148
152149
The default is \c 0.
153150
*/
154-
property int screenOffsetX: 0 * displayScaleFactor
151+
property int screenOffsetX: 0
155152

156153
/*!
157154
\brief The y offset of the placement of the Callout.
158155
159156
The default is \c 0.
160157
*/
161-
property int screenOffsetY: 0 * displayScaleFactor
158+
property int screenOffsetY: 0
162159

163160
/*!
164161
\brief The type of accessory button to be displayed in the Callout.
@@ -204,18 +201,16 @@ Item {
204201
/*!
205202
\brief The maximum width of the Callout if autoAdjustWidth is true.
206203
*/
207-
property real maxWidth: 300 * displayScaleFactor
204+
property real maxWidth: 300
208205

209206
/*!
210207
\brief The width of the Callout if autoAdjustWidth is false.
211208
*/
212-
property real calloutWidth: 300 * displayScaleFactor
209+
property real calloutWidth: 300
213210

214211
// internal properties
215212
/*! \internal */
216-
property int padding: 3 * displayScaleFactor
217-
/*! \internal */
218-
property real displayScaleFactor: (Screen.logicalPixelDensity * 25.4) / (Qt.platform.os === "windows" || Qt.platform.os === "linux" ? 96 : 72)
213+
property int padding: 3
219214
/*! \internal */
220215
property real anchorPointx: 0
221216
/*! \internal */
@@ -227,19 +222,19 @@ Item {
227222
/*! \internal */
228223
property bool calloutVisible
229224
/*! \internal */
230-
property real calloutMaxHeight: 45 * displayScaleFactor
225+
property real calloutMaxHeight: 45
231226
/*! \internal */
232-
property real calloutMinWidth: 95 * displayScaleFactor
227+
property real calloutMinWidth: 95
233228
/*! \internal */
234229
property real calloutMinHeight: calloutMaxHeight
235230
/*! \internal */
236231
property real rectWidth: 0
237232
/*! \internal */
238233
property real rectHeight: 0
239234
/*! \internal */
240-
property real edgeBuffer: 10 * displayScaleFactor
235+
property real edgeBuffer: 10
241236
/*! \internal */
242-
property real calloutFramePadding: (2 * internalCornerRadius) * displayScaleFactor
237+
property real calloutFramePadding: (2 * internalCornerRadius)
243238
/*! \internal */
244239
property string platform: Qt.platform.os
245240
/*! \internal */
@@ -251,11 +246,11 @@ Item {
251246
/*! \internal */
252247
property real imageWidth: rectWidth / 4
253248
/*! \internal */
254-
property real titleWidth: Math.max(0, rectWidth - 95 * displayScaleFactor)
249+
property real titleWidth: Math.max(0, rectWidth - 95)
255250
/*! \internal */
256-
property real detailWidth: Math.max(0, rectWidth - 95 * displayScaleFactor)
251+
property real detailWidth: Math.max(0, rectWidth - 95)
257252
/*! \internal */
258-
property real cornerOffset: 15 * displayScaleFactor
253+
property real cornerOffset: 15
259254
/*! \internal */
260255
property bool debug: false
261256
/*! \internal */
@@ -364,8 +359,8 @@ Item {
364359

365360
Rectangle {
366361
id: calloutFrame
367-
width: (rectWidth + 2 * leaderWidth + edgeBuffer) * displayScaleFactor
368-
height: (rectHeight + 2 * leaderHeight + edgeBuffer) * displayScaleFactor
362+
width: (rectWidth + 2 * leaderWidth + edgeBuffer)
363+
height: (rectHeight + 2 * leaderHeight + edgeBuffer)
369364
visible: false
370365
z: 100
371366
clip: true
@@ -377,7 +372,7 @@ Item {
377372

378373
property bool createPathAndPaint: false
379374

380-
antialiasing: true
375+
antialiasing: true
381376

382377
// work around for Qt bug with Canvas on iOS.
383378
// Rendering to Frame buffer object causes weirdness with size.
@@ -390,7 +385,7 @@ Item {
390385
renderStrategy: Canvas.Cooperative
391386

392387
// handler to override for drawing
393-
onPaint: {
388+
onPaint: {
394389
screenCoordinates.x = borderWidth;
395390
screenCoordinates.y = borderWidth;
396391
drawCalloutFrame();
@@ -409,14 +404,14 @@ Item {
409404
left: parent.left
410405
top: parent.top
411406
}
412-
height: 45 * displayScaleFactor
407+
height: 45
413408
columns: 3
414409
rows: 2
415-
columnSpacing: 7 * displayScaleFactor
410+
columnSpacing: 7
416411

417412
Rectangle {
418413
id: imageRect
419-
width: 40 * displayScaleFactor
414+
width: 40
420415
height: width
421416
color: "transparent"
422417
Layout.rowSpan: 2
@@ -438,26 +433,26 @@ Item {
438433
renderType: Text.NativeRendering
439434
color: titleTextColor
440435
font {
441-
pixelSize: 11 * displayScaleFactor
436+
pixelSize: 11
442437
family: "sanserif"
443438
}
444439
clip: true
445440
elide: Text.ElideRight
446441
Layout.alignment: Qt.AlignVCenter
447-
Layout.maximumWidth: !autoAdjustWidth ? titleWidth : Math.max(0, adjustedMaxWidth - 90 * displayScaleFactor) // resets to implicit width if non-autoAdjust
442+
Layout.maximumWidth: !autoAdjustWidth ? titleWidth : Math.max(0, adjustedMaxWidth - 90) // resets to implicit width if non-autoAdjust
448443
}
449444

450445
Rectangle {
451446
id: accessoryButton
452-
width: 40 * displayScaleFactor
447+
width: 40
453448
height: width
454449
color: "transparent"
455450
Layout.rowSpan: 2
456451

457452
Image {
458453
id: accessoryButtonImage
459454
anchors.fill: parent
460-
width: 40 * displayScaleFactor
455+
width: 40
461456
height: width
462457
fillMode: Image.PreserveAspectFit
463458
visible: !accessoryButtonHidden
@@ -477,13 +472,13 @@ Item {
477472
renderType: Text.NativeRendering
478473
color: detailTextColor
479474
font {
480-
pixelSize: 10 * displayScaleFactor
475+
pixelSize: 10
481476
family: "sanserif"
482477
}
483478
wrapMode: Text.NoWrap
484479
elide: Text.ElideRight
485480
Layout.alignment: Qt.AlignVCenter
486-
Layout.maximumWidth: !autoAdjustWidth ? detailWidth : Math.max(0, adjustedMaxWidth - 90 * displayScaleFactor) // resets to implicit width if non-autoAdjust
481+
Layout.maximumWidth: !autoAdjustWidth ? detailWidth : Math.max(0, adjustedMaxWidth - 90) // resets to implicit width if non-autoAdjust
487482
}
488483
}
489484
}
@@ -523,7 +518,7 @@ Item {
523518

524519
ctx.beginPath();
525520

526-
if (adjustedLeaderPosition === Enums.LeaderPosition.UpperLeft) {
521+
if (adjustedLeaderPosition === Enums.LeaderPosition.UpperLeft) {
527522
ctx.moveTo(screenCoordinates.x + leaderWidth + cornerOffset, screenCoordinates.y);
528523
} else {
529524
ctx.moveTo(screenCoordinates.x + internalCornerRadius, screenCoordinates.y);
@@ -632,16 +627,16 @@ Item {
632627
if (leaderPosition === Enums.LeaderPosition.Automatic) {
633628

634629
// Move leader vertically if vertical position isn't optimal
635-
if (calloutFrame.y - edgeBuffer < 0 + mapViewInsets.top * displayScaleFactor) {
630+
if (calloutFrame.y - edgeBuffer < 0 + mapViewInsets.top) {
636631
// Top edge of callout is above top edge of map
637632
refresh = moveLeader(Enums.LeaderMoveDirection.Up, mousex, mousey);
638633
}
639634

640635
// Move leader horizontally if horizontal position isn't optimal
641-
if (calloutFrame.x - edgeBuffer < 0 + mapViewInsets.left * displayScaleFactor) {
636+
if (calloutFrame.x - edgeBuffer < 0 + mapViewInsets.left) {
642637
// Left edge of callout is left of left edge of map
643638
refresh = moveLeader(Enums.LeaderMoveDirection.Left, mousex, mousey);
644-
} else if (calloutFrame.x + rectWidth + edgeBuffer > root.parent.width - mapViewInsets.right * displayScaleFactor) {
639+
} else if (calloutFrame.x + rectWidth + edgeBuffer > root.parent.width - mapViewInsets.right) {
645640
// Right edge of callout is right of right edge of map
646641
refresh = moveLeader(Enums.LeaderMoveDirection.Right, mousex, mousey);
647642
}
@@ -664,13 +659,13 @@ Item {
664659

665660
// Callout is 'narrow' if it's less than half the width of the MapView
666661
var narrowCallout = true;
667-
if (calloutFrame.width > (mapViewWidth + (mapViewInsets.left + mapViewInsets.right) * displayScaleFactor) / 2) {
662+
if (calloutFrame.width > (mapViewWidth + (mapViewInsets.left + mapViewInsets.right)) / 2) {
668663
narrowCallout = false;
669664
}
670665

671666
// Callout is 'short' if it's less than half the height of the MapView
672667
var shortCallout = true;
673-
if (calloutFrame.height > (mapViewHeight + (mapViewInsets.top + mapViewInsets.bottom) * displayScaleFactor) / 2) {
668+
if (calloutFrame.height > (mapViewHeight + (mapViewInsets.top + mapViewInsets.bottom)) / 2) {
674669
shortCallout = false;
675670
}
676671

@@ -910,7 +905,6 @@ Item {
910905
console.log("maxWidth = ", maxWidth);
911906
console.log("calloutWidth = ", calloutWidth);
912907
console.log("adjustedMaxWidth = ", adjustedMaxWidth);
913-
console.log("displayScaleFactor = ", displayScaleFactor);
914908
}
915909
}
916910

0 commit comments

Comments
 (0)