mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 17:50:19 +02:00
Qt: added lvpHideSelection feature to TQtWSCustomListView
git-svn-id: trunk@21462 -
This commit is contained in:
parent
4f6c0f0f22
commit
bb3984fa0a
@ -1282,9 +1282,12 @@ const
|
|||||||
begin
|
begin
|
||||||
if not WSCheckHandleAllocated(ALV, 'SetProperty')
|
if not WSCheckHandleAllocated(ALV, 'SetProperty')
|
||||||
then Exit;
|
then Exit;
|
||||||
|
|
||||||
case AProp of
|
case AProp of
|
||||||
lvpMultiSelect: TQtTreeWidget(ALV.Handle).setSelectionMode(BoolToSelectionMode[AIsSet]);
|
lvpMultiSelect:
|
||||||
|
begin
|
||||||
|
if (TQtTreeWidget(ALV.Handle).getSelectionMode <> QAbstractItemViewNoSelection) then
|
||||||
|
TQtTreeWidget(ALV.Handle).setSelectionMode(BoolToSelectionMode[AIsSet]);
|
||||||
|
end;
|
||||||
lvpShowColumnHeaders: TQtTreeWidget(ALV.Handle).setHeaderVisible(AIsSet);
|
lvpShowColumnHeaders: TQtTreeWidget(ALV.Handle).setHeaderVisible(AIsSet);
|
||||||
lvpReadOnly: TQtTreeWidget(ALV.Handle).setEditTriggers(BoolToEditTriggers[AIsSet]);
|
lvpReadOnly: TQtTreeWidget(ALV.Handle).setEditTriggers(BoolToEditTriggers[AIsSet]);
|
||||||
lvpRowSelect:
|
lvpRowSelect:
|
||||||
@ -1293,6 +1296,15 @@ begin
|
|||||||
TQtTreeWidget(ALV.Handle).setSelectionBehavior(BoolToSelectionBehavior[AIsSet]);
|
TQtTreeWidget(ALV.Handle).setSelectionBehavior(BoolToSelectionBehavior[AIsSet]);
|
||||||
end;
|
end;
|
||||||
lvpWrapText: TQtTreeWidget(ALV.Handle).setWordWrap(AIsSet);
|
lvpWrapText: TQtTreeWidget(ALV.Handle).setWordWrap(AIsSet);
|
||||||
|
lvpHideSelection:
|
||||||
|
begin
|
||||||
|
if AIsSet then
|
||||||
|
begin
|
||||||
|
TQtTreeWidget(ALV.Handle).clearSelection;
|
||||||
|
TQtTreeWidget(ALV.Handle).setSelectionMode(QAbstractItemViewNoSelection);
|
||||||
|
end else
|
||||||
|
TQtTreeWidget(ALV.Handle).setSelectionMode(BoolToSelectionMode[ALV.MultiSelect]);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1303,7 +1315,6 @@ var
|
|||||||
begin
|
begin
|
||||||
if not WSCheckHandleAllocated(ALV, 'SetProperties')
|
if not WSCheckHandleAllocated(ALV, 'SetProperties')
|
||||||
then Exit;
|
then Exit;
|
||||||
|
|
||||||
for i := Low(TListViewProperty) to High(TListViewProperty) do
|
for i := Low(TListViewProperty) to High(TListViewProperty) do
|
||||||
SetProperty(ALV, i, i in AProps);
|
SetProperty(ALV, i, i in AProps);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user