Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
ab9e64b8
Commit
ab9e64b8
authored
Nov 14, 2019
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
dad65237
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
104 additions
and
71 deletions
+104
-71
MissionCommandTree.cc
src/MissionManager/MissionCommandTree.cc
+3
-2
MissionCommandTree.h
src/MissionManager/MissionCommandTree.h
+2
-1
MissionController.cc
src/MissionManager/MissionController.cc
+28
-13
MissionController.h
src/MissionManager/MissionController.h
+33
-30
SimpleMissionItem.cc
src/MissionManager/SimpleMissionItem.cc
+1
-0
MissionItemEditor.qml
src/PlanView/MissionItemEditor.qml
+3
-2
PlanView.qml
src/PlanView/PlanView.qml
+27
-19
MissionCommandDialog.qml
src/QmlControls/MissionCommandDialog.qml
+5
-4
ToolStrip.qml
src/QmlControls/ToolStrip.qml
+2
-0
No files found.
src/MissionManager/MissionCommandTree.cc
View file @
ab9e64b8
...
@@ -219,7 +219,7 @@ const MissionCommandUIInfo* MissionCommandTree::getUIInfo(Vehicle* vehicle, MAV_
...
@@ -219,7 +219,7 @@ const MissionCommandUIInfo* MissionCommandTree::getUIInfo(Vehicle* vehicle, MAV_
}
}
}
}
QVariantList
MissionCommandTree
::
getCommandsForCategory
(
Vehicle
*
vehicle
,
const
QString
&
category
)
QVariantList
MissionCommandTree
::
getCommandsForCategory
(
Vehicle
*
vehicle
,
const
QString
&
category
,
bool
showFlyThroughCommands
)
{
{
MAV_AUTOPILOT
baseFirmwareType
;
MAV_AUTOPILOT
baseFirmwareType
;
MAV_TYPE
baseVehicleType
;
MAV_TYPE
baseVehicleType
;
...
@@ -237,7 +237,8 @@ QVariantList MissionCommandTree::getCommandsForCategory(Vehicle* vehicle, const
...
@@ -237,7 +237,8 @@ QVariantList MissionCommandTree::getCommandsForCategory(Vehicle* vehicle, const
for
(
MAV_CMD
command
:
commandMap
.
keys
())
{
for
(
MAV_CMD
command
:
commandMap
.
keys
())
{
if
(
supportedCommands
.
contains
(
command
))
{
if
(
supportedCommands
.
contains
(
command
))
{
MissionCommandUIInfo
*
uiInfo
=
commandMap
[
command
];
MissionCommandUIInfo
*
uiInfo
=
commandMap
[
command
];
if
(
uiInfo
->
category
()
==
category
||
category
==
_allCommandsCategory
)
{
if
((
uiInfo
->
category
()
==
category
||
category
==
_allCommandsCategory
)
&&
(
showFlyThroughCommands
||
!
uiInfo
->
specifiesCoordinate
()
||
uiInfo
->
isStandaloneCoordinate
()))
{
list
.
append
(
QVariant
::
fromValue
(
uiInfo
));
list
.
append
(
QVariant
::
fromValue
(
uiInfo
));
}
}
}
}
...
...
src/MissionManager/MissionCommandTree.h
View file @
ab9e64b8
...
@@ -62,7 +62,8 @@ public:
...
@@ -62,7 +62,8 @@ public:
const
MissionCommandUIInfo
*
getUIInfo
(
Vehicle
*
vehicle
,
MAV_CMD
command
);
const
MissionCommandUIInfo
*
getUIInfo
(
Vehicle
*
vehicle
,
MAV_CMD
command
);
Q_INVOKABLE
QVariantList
getCommandsForCategory
(
Vehicle
*
vehicle
,
const
QString
&
category
);
/// @param showFlyThroughCommands - true: al commands shows, false: filter out commands which the vehicle flies through (specifiedCoordinate=true, standaloneCoordinate=false)
Q_INVOKABLE
QVariantList
getCommandsForCategory
(
Vehicle
*
vehicle
,
const
QString
&
category
,
bool
showFlyThroughCommands
);
// Overrides from QGCTool
// Overrides from QGCTool
virtual
void
setToolbox
(
QGCToolbox
*
toolbox
);
virtual
void
setToolbox
(
QGCToolbox
*
toolbox
);
...
...
src/MissionManager/MissionController.cc
View file @
ab9e64b8
...
@@ -2183,12 +2183,14 @@ void MissionController::setCurrentPlanViewIndex(int sequenceNumber, bool force)
...
@@ -2183,12 +2183,14 @@ void MissionController::setCurrentPlanViewIndex(int sequenceNumber, bool force)
if
(
_visualItems
&&
(
force
||
sequenceNumber
!=
_currentPlanViewIndex
))
{
if
(
_visualItems
&&
(
force
||
sequenceNumber
!=
_currentPlanViewIndex
))
{
bool
foundLand
=
false
;
bool
foundLand
=
false
;
int
takeoffIndex
=
-
1
;
int
takeoffIndex
=
-
1
;
int
landIndex
=
-
1
;
_splitSegment
=
nullptr
;
_splitSegment
=
nullptr
;
_currentPlanViewItem
=
nullptr
;
_currentPlanViewItem
=
nullptr
;
_currentPlanViewIndex
=
-
1
;
_currentPlanViewIndex
=
-
1
;
_isInsertTakeoffValid
=
true
;
_isInsertTakeoffValid
=
true
;
_isInsertLandValid
=
true
;
_isInsertLandValid
=
true
;
_flyThroughCommandsAllowed
=
true
;
for
(
int
i
=
0
;
i
<
_visualItems
->
count
();
i
++
)
{
for
(
int
i
=
0
;
i
<
_visualItems
->
count
();
i
++
)
{
VisualMissionItem
*
pVI
=
qobject_cast
<
VisualMissionItem
*>
(
_visualItems
->
get
(
i
));
VisualMissionItem
*
pVI
=
qobject_cast
<
VisualMissionItem
*>
(
_visualItems
->
get
(
i
));
...
@@ -2214,6 +2216,7 @@ void MissionController::setCurrentPlanViewIndex(int sequenceNumber, bool force)
...
@@ -2214,6 +2216,7 @@ void MissionController::setCurrentPlanViewIndex(int sequenceNumber, bool force)
case
MAV_CMD_DO_LAND_START
:
case
MAV_CMD_DO_LAND_START
:
case
MAV_CMD_NAV_RETURN_TO_LAUNCH
:
case
MAV_CMD_NAV_RETURN_TO_LAUNCH
:
foundLand
=
true
;
foundLand
=
true
;
landIndex
=
i
;
break
;
break
;
default:
default:
break
;
break
;
...
@@ -2222,6 +2225,7 @@ void MissionController::setCurrentPlanViewIndex(int sequenceNumber, bool force)
...
@@ -2222,6 +2225,7 @@ void MissionController::setCurrentPlanViewIndex(int sequenceNumber, bool force)
FixedWingLandingComplexItem
*
fwLanding
=
qobject_cast
<
FixedWingLandingComplexItem
*>
(
pVI
);
FixedWingLandingComplexItem
*
fwLanding
=
qobject_cast
<
FixedWingLandingComplexItem
*>
(
pVI
);
if
(
fwLanding
)
{
if
(
fwLanding
)
{
foundLand
=
true
;
foundLand
=
true
;
landIndex
=
i
;
}
}
}
}
}
}
...
@@ -2248,13 +2252,23 @@ void MissionController::setCurrentPlanViewIndex(int sequenceNumber, bool force)
...
@@ -2248,13 +2252,23 @@ void MissionController::setCurrentPlanViewIndex(int sequenceNumber, bool force)
}
}
}
}
if
(
takeoffIndex
!=
-
1
&&
sequenceNumber
<=
takeoffIndex
)
{
if
(
takeoffIndex
!=
-
1
)
{
// Takeoff item was found which means mission starts from ground.
// Takeoff item was found which means mission starts from ground
if
(
sequenceNumber
<
takeoffIndex
)
{
// Land is only valid after the takeoff item.
// Land is only valid after the takeoff item.
_isInsertLandValid
=
false
;
_isInsertLandValid
=
false
;
}
else
if
(
foundLand
)
{
// Fly through commands are not allowed prior to the takeoff command
// Can't have to land sequences
_flyThroughCommandsAllowed
=
false
;
}
}
if
(
foundLand
)
{
// Can't have more than one land sequence
_isInsertLandValid
=
false
;
_isInsertLandValid
=
false
;
if
(
sequenceNumber
>=
landIndex
)
{
// Can't have fly through commands after a land item
_flyThroughCommandsAllowed
=
false
;
}
}
}
emit
currentPlanViewIndexChanged
();
emit
currentPlanViewIndexChanged
();
...
@@ -2262,6 +2276,7 @@ void MissionController::setCurrentPlanViewIndex(int sequenceNumber, bool force)
...
@@ -2262,6 +2276,7 @@ void MissionController::setCurrentPlanViewIndex(int sequenceNumber, bool force)
emit
splitSegmentChanged
();
emit
splitSegmentChanged
();
emit
isInsertTakeoffValidChanged
();
emit
isInsertTakeoffValidChanged
();
emit
isInsertLandValidChanged
();
emit
isInsertLandValidChanged
();
emit
flyThroughCommandsAllowedChanged
();
}
}
}
}
...
...
src/MissionManager/MissionController.h
View file @
ab9e64b8
...
@@ -92,8 +92,9 @@ public:
...
@@ -92,8 +92,9 @@ public:
Q_PROPERTY
(
QString
surveyComplexItemName
READ
surveyComplexItemName
CONSTANT
)
Q_PROPERTY
(
QString
surveyComplexItemName
READ
surveyComplexItemName
CONSTANT
)
Q_PROPERTY
(
QString
corridorScanComplexItemName
READ
corridorScanComplexItemName
CONSTANT
)
Q_PROPERTY
(
QString
corridorScanComplexItemName
READ
corridorScanComplexItemName
CONSTANT
)
Q_PROPERTY
(
QString
structureScanComplexItemName
READ
structureScanComplexItemName
CONSTANT
)
Q_PROPERTY
(
QString
structureScanComplexItemName
READ
structureScanComplexItemName
CONSTANT
)
Q_PROPERTY
(
bool
isInsertTakeoffValid
MEMBER
_isInsertTakeoffValid
NOTIFY
isInsertTakeoffValidChanged
)
///< true: Takeoff tool should be enabled
Q_PROPERTY
(
bool
isInsertTakeoffValid
MEMBER
_isInsertTakeoffValid
NOTIFY
isInsertTakeoffValidChanged
)
Q_PROPERTY
(
bool
isInsertLandValid
MEMBER
_isInsertLandValid
NOTIFY
isInsertLandValidChanged
)
///< true: Land tool should be enabled
Q_PROPERTY
(
bool
isInsertLandValid
MEMBER
_isInsertLandValid
NOTIFY
isInsertLandValidChanged
)
Q_PROPERTY
(
bool
flyThroughCommandsAllowed
MEMBER
_flyThroughCommandsAllowed
NOTIFY
flyThroughCommandsAllowedChanged
)
Q_INVOKABLE
void
removeMissionItem
(
int
index
);
Q_INVOKABLE
void
removeMissionItem
(
int
index
);
...
@@ -254,6 +255,7 @@ signals:
...
@@ -254,6 +255,7 @@ signals:
void
missionItemCountChanged
(
int
missionItemCount
);
void
missionItemCountChanged
(
int
missionItemCount
);
void
isInsertTakeoffValidChanged
(
void
);
void
isInsertTakeoffValidChanged
(
void
);
void
isInsertLandValidChanged
(
void
);
void
isInsertLandValidChanged
(
void
);
void
flyThroughCommandsAllowedChanged
(
void
);
private
slots
:
private
slots
:
void
_newMissionItemsAvailableFromVehicle
(
bool
removeAllRequested
);
void
_newMissionItemsAvailableFromVehicle
(
bool
removeAllRequested
);
...
@@ -332,6 +334,7 @@ private:
...
@@ -332,6 +334,7 @@ private:
CoordinateVector
*
_splitSegment
;
CoordinateVector
*
_splitSegment
;
bool
_isInsertTakeoffValid
=
true
;
bool
_isInsertTakeoffValid
=
true
;
bool
_isInsertLandValid
=
true
;
bool
_isInsertLandValid
=
true
;
bool
_flyThroughCommandsAllowed
=
true
;
static
const
char
*
_settingsGroup
;
static
const
char
*
_settingsGroup
;
...
...
src/MissionManager/SimpleMissionItem.cc
View file @
ab9e64b8
...
@@ -399,6 +399,7 @@ QString SimpleMissionItem::abbreviation() const
...
@@ -399,6 +399,7 @@ QString SimpleMissionItem::abbreviation() const
case
MAV_CMD_NAV_VTOL_LAND
:
case
MAV_CMD_NAV_VTOL_LAND
:
return
tr
(
"VTOL Land"
);
return
tr
(
"VTOL Land"
);
case
MAV_CMD_DO_SET_ROI
:
case
MAV_CMD_DO_SET_ROI
:
case
MAV_CMD_DO_SET_ROI_LOCATION
:
return
tr
(
"ROI"
);
return
tr
(
"ROI"
);
default:
default:
return
QString
();
return
QString
();
...
...
src/PlanView/MissionItemEditor.qml
View file @
ab9e64b8
...
@@ -242,6 +242,7 @@ Rectangle {
...
@@ -242,6 +242,7 @@ Rectangle {
MissionCommandDialog
{
MissionCommandDialog
{
missionItem
:
_root
.
missionItem
missionItem
:
_root
.
missionItem
map
:
_root
.
map
map
:
_root
.
map
flyThroughCommandsAllowed
:
_missionController
.
flyThroughCommandsAllowed
}
}
}
}
...
...
src/PlanView/PlanView.qml
View file @
ab9e64b8
...
@@ -304,10 +304,8 @@ Item {
...
@@ -304,10 +304,8 @@ Item {
/// @param coordinate Location to insert item
/// @param coordinate Location to insert item
/// @param index Insert item at this index
/// @param index Insert item at this index
function
insertROIMissionItem
(
coordinate
,
index
)
{
function
insertROIMissionItem
(
coordinate
,
index
)
{
var
sequenceNumber
=
_missionController
.
insertROIMissionItem
(
coordinate
,
index
)
_missionController
.
insertROIMissionItem
(
coordinate
,
index
,
true
/* makeCurrentItem */
)
_missionController
.
setCurrentPlanViewIndex
(
sequenceNumber
,
true
)
_addROIOnClick
=
false
_addROIOnClick
=
false
toolStrip
.
lastClickedButton
.
checked
=
false
}
}
function
selectNextNotReady
()
{
function
selectNextNotReady
()
{
...
@@ -491,6 +489,7 @@ Item {
...
@@ -491,6 +489,7 @@ Item {
_addROIOnClick
=
false
_addROIOnClick
=
false
insertROIMissionItem
(
coordinate
,
_missionController
.
visualItems
.
count
)
insertROIMissionItem
(
coordinate
,
_missionController
.
visualItems
.
count
)
}
}
break
break
case
_layerRallyPoints
:
case
_layerRallyPoints
:
if
(
_rallyPointController
.
supported
&&
_addWaypointOnClick
)
{
if
(
_rallyPointController
.
supported
&&
_addWaypointOnClick
)
{
...
@@ -632,7 +631,8 @@ Item {
...
@@ -632,7 +631,8 @@ Item {
readonly
property
int
landButtonIndex
:
6
readonly
property
int
landButtonIndex
:
6
readonly
property
int
centerButtonIndex
:
7
readonly
property
int
centerButtonIndex
:
7
property
bool
_isRally
:
_editingLayer
==
_layerRallyPoints
property
bool
_isRallyLayer
:
_editingLayer
==
_layerRallyPoints
property
bool
_isMissionLayer
:
_editingLayer
==
_layerMission
model
:
[
model
:
[
{
{
...
@@ -654,13 +654,13 @@ Item {
...
@@ -654,13 +654,13 @@ Item {
name
:
qsTr
(
"
Takeoff
"
),
name
:
qsTr
(
"
Takeoff
"
),
iconSource
:
"
/res/takeoff.svg
"
,
iconSource
:
"
/res/takeoff.svg
"
,
buttonEnabled
:
_missionController
.
isInsertTakeoffValid
,
buttonEnabled
:
_missionController
.
isInsertTakeoffValid
,
buttonVisible
:
_
editingLayer
==
_layerMission
buttonVisible
:
_
isMissionLayer
},
},
{
{
name
:
_editingLayer
==
_layerRallyPoints
?
qsTr
(
"
Rally Point
"
)
:
qsTr
(
"
Waypoint
"
),
name
:
_editingLayer
==
_layerRallyPoints
?
qsTr
(
"
Rally Point
"
)
:
qsTr
(
"
Waypoint
"
),
iconSource
:
"
/qmlimages/MapAddMission.svg
"
,
iconSource
:
"
/qmlimages/MapAddMission.svg
"
,
buttonEnabled
:
true
,
buttonEnabled
:
_isRallyLayer
?
true
:
_missionController
.
flyThroughCommandsAllowed
,
buttonVisible
:
true
,
buttonVisible
:
_isRallyLayer
||
_isMissionLayer
,
toggle
:
true
,
toggle
:
true
,
checked
:
_addWaypointOnClick
checked
:
_addWaypointOnClick
},
},
...
@@ -668,21 +668,21 @@ Item {
...
@@ -668,21 +668,21 @@ Item {
name
:
qsTr
(
"
ROI
"
),
name
:
qsTr
(
"
ROI
"
),
iconSource
:
"
/qmlimages/MapAddMission.svg
"
,
iconSource
:
"
/qmlimages/MapAddMission.svg
"
,
buttonEnabled
:
true
,
buttonEnabled
:
true
,
buttonVisible
:
!
_isRally
&&
_waypointsOnlyMode
,
buttonVisible
:
_isMissionLayer
,
toggle
:
true
toggle
:
true
},
},
{
{
name
:
_singleComplexItem
?
_missionController
.
complexMissionItemNames
[
0
]
:
qsTr
(
"
Pattern
"
),
name
:
_singleComplexItem
?
_missionController
.
complexMissionItemNames
[
0
]
:
qsTr
(
"
Pattern
"
),
iconSource
:
"
/qmlimages/MapDrawShape.svg
"
,
iconSource
:
"
/qmlimages/MapDrawShape.svg
"
,
buttonEnabled
:
true
,
buttonEnabled
:
_missionController
.
flyThroughCommandsAllowed
,
buttonVisible
:
!
_isRally
,
buttonVisible
:
_isMissionLayer
,
dropPanelComponent
:
_singleComplexItem
?
undefined
:
patternDropPanel
dropPanelComponent
:
_singleComplexItem
?
undefined
:
patternDropPanel
},
},
{
{
name
:
_planMasterController
.
controllerVehicle
.
fixedWing
?
qsTr
(
"
Land
"
)
:
qsTr
(
"
Return
"
),
name
:
_planMasterController
.
controllerVehicle
.
fixedWing
?
qsTr
(
"
Land
"
)
:
qsTr
(
"
Return
"
),
iconSource
:
"
/res/rtl.svg
"
,
iconSource
:
"
/res/rtl.svg
"
,
buttonEnabled
:
_missionController
.
isInsertLandValid
,
buttonEnabled
:
_missionController
.
isInsertLandValid
,
buttonVisible
:
_
editingLayer
==
_layerMission
buttonVisible
:
_
isMissionLayer
},
},
{
{
name
:
qsTr
(
"
Center
"
),
name
:
qsTr
(
"
Center
"
),
...
@@ -693,39 +693,49 @@ Item {
...
@@ -693,39 +693,49 @@ Item {
}
}
]
]
function
allAddClickBoolsOff
()
{
_addROIOnClick
=
false
_addWaypointOnClick
=
false
}
onClicked
:
{
onClicked
:
{
switch
(
index
)
{
switch
(
index
)
{
case
flyButtonIndex
:
case
flyButtonIndex
:
mainWindow
.
showFlyView
()
mainWindow
.
showFlyView
()
break
break
case
takeoffButtonIndex
:
case
takeoffButtonIndex
:
allAddClickBoolsOff
()
_missionController
.
insertTakeoffItem
(
mapCenter
(),
_missionController
.
currentMissionIndex
,
true
/* makeCurrentItem */
)
_missionController
.
insertTakeoffItem
(
mapCenter
(),
_missionController
.
currentMissionIndex
,
true
/* makeCurrentItem */
)
break
break
case
waypointButtonIndex
:
case
waypointButtonIndex
:
if
(
_addWaypointOnClick
)
{
if
(
_addWaypointOnClick
)
{
//-- Toggle it off
allAddClickBoolsOff
()
_addWaypointOnClick
=
false
_addROIOnClick
=
false
setChecked
(
index
,
false
)
setChecked
(
index
,
false
)
}
else
{
}
else
{
allAddClickBoolsOff
()
_addWaypointOnClick
=
checked
_addWaypointOnClick
=
checked
_addROIOnClick
=
false
}
}
break
break
case
roiButtonIndex
:
case
roiButtonIndex
:
allAddClickBoolsOff
()
_addROIOnClick
=
checked
_addROIOnClick
=
checked
_addWaypointOnClick
=
false
break
break
case
patternButtonIndex
:
case
patternButtonIndex
:
allAddClickBoolsOff
()
if
(
_singleComplexItem
)
{
if
(
_singleComplexItem
)
{
addComplexItem
(
_missionController
.
complexMissionItemNames
[
0
])
addComplexItem
(
_missionController
.
complexMissionItemNames
[
0
])
}
}
break
break
case
landButtonIndex
:
case
landButtonIndex
:
allAddClickBoolsOff
()
_missionController
.
insertLandItem
(
mapCenter
(),
_missionController
.
currentMissionIndex
,
true
/* makeCurrentItem */
)
_missionController
.
insertLandItem
(
mapCenter
(),
_missionController
.
currentMissionIndex
,
true
/* makeCurrentItem */
)
break
break
}
}
}
}
onDropped
:
{
allAddClickBoolsOff
()
}
}
}
//-----------------------------------------------------------
//-----------------------------------------------------------
...
@@ -1257,8 +1267,6 @@ Item {
...
@@ -1257,8 +1267,6 @@ Item {
}
}
}
}
}
}
}
}
}
}
}
}
src/QmlControls/MissionCommandDialog.qml
View file @
ab9e64b8
...
@@ -21,6 +21,7 @@ QGCViewDialog {
...
@@ -21,6 +21,7 @@ QGCViewDialog {
property
var
missionItem
property
var
missionItem
property
var
map
property
var
map
property
bool
flyThroughCommandsAllowed
property
var
_vehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
_vehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
...
@@ -40,7 +41,7 @@ QGCViewDialog {
...
@@ -40,7 +41,7 @@ QGCViewDialog {
model
:
QGroundControl
.
missionCommandTree
.
categoriesForVehicle
(
_vehicle
)
model
:
QGroundControl
.
missionCommandTree
.
categoriesForVehicle
(
_vehicle
)
function
categorySelected
(
category
)
{
function
categorySelected
(
category
)
{
commandList
.
model
=
QGroundControl
.
missionCommandTree
.
getCommandsForCategory
(
_vehicle
,
category
)
commandList
.
model
=
QGroundControl
.
missionCommandTree
.
getCommandsForCategory
(
_vehicle
,
category
,
flyThroughCommandsAllowed
)
}
}
Component.onCompleted
:
{
Component.onCompleted
:
{
...
...
src/QmlControls/ToolStrip.qml
View file @
ab9e64b8
...
@@ -36,6 +36,7 @@ Rectangle {
...
@@ -36,6 +36,7 @@ Rectangle {
property
real
_idealWidth
:
(
ScreenTools
.
isMobile
?
ScreenTools
.
minTouchPixels
:
ScreenTools
.
defaultFontPixelWidth
*
8
)
+
toolStripColumn
.
anchors
.
margins
*
2
property
real
_idealWidth
:
(
ScreenTools
.
isMobile
?
ScreenTools
.
minTouchPixels
:
ScreenTools
.
defaultFontPixelWidth
*
8
)
+
toolStripColumn
.
anchors
.
margins
*
2
signal
clicked
(
int
index
,
bool
checked
)
signal
clicked
(
int
index
,
bool
checked
)
signal
dropped
(
int
index
)
function
setChecked
(
idx
,
check
)
{
function
setChecked
(
idx
,
check
)
{
repeater
.
itemAt
(
idx
).
checked
=
check
repeater
.
itemAt
(
idx
).
checked
=
check
...
@@ -88,6 +89,7 @@ Rectangle {
...
@@ -88,6 +89,7 @@ Rectangle {
}
else
if
(
checked
)
{
}
else
if
(
checked
)
{
var
panelEdgeTopPoint
=
mapToItem
(
_root
,
width
,
0
)
var
panelEdgeTopPoint
=
mapToItem
(
_root
,
width
,
0
)
dropPanel
.
show
(
panelEdgeTopPoint
,
height
,
modelData
.
dropPanelComponent
)
dropPanel
.
show
(
panelEdgeTopPoint
,
height
,
modelData
.
dropPanelComponent
)
_root
.
dropped
(
index
)
}
}
if
(
_root
&&
buttonTemplate
)
if
(
_root
&&
buttonTemplate
)
_root
.
lastClickedButton
=
buttonTemplate
_root
.
lastClickedButton
=
buttonTemplate
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment