mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 13:10:53 +02:00
LCL: lcltype: added LVN_ODCACHEHINT,LVN_ODSTATECHANGED and LVN_ODFINDITEM to start proper implementation of TCustomListView.OwnerData
git-svn-id: trunk@35260 -
This commit is contained in:
parent
951fdc2310
commit
41db03219e
@ -10190,6 +10190,7 @@ var
|
|||||||
v: QVariantH;
|
v: QVariantH;
|
||||||
WStr: WideString;
|
WStr: WideString;
|
||||||
DataStr: WideString;
|
DataStr: WideString;
|
||||||
|
ASelected: Boolean;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
{do not set items during design time}
|
{do not set items during design time}
|
||||||
@ -10241,6 +10242,8 @@ begin
|
|||||||
DataStr := '';
|
DataStr := '';
|
||||||
QVariant_destroy(v);
|
QVariant_destroy(v);
|
||||||
|
|
||||||
|
ASelected := TListView(LCLObject).Items[TopItem].Selected;
|
||||||
|
|
||||||
if (DataStr <> WStr) then
|
if (DataStr <> WStr) then
|
||||||
begin
|
begin
|
||||||
v := QVariant_create(PWideString(@WStr));
|
v := QVariant_create(PWideString(@WStr));
|
||||||
@ -10250,6 +10253,9 @@ begin
|
|||||||
QVariant_destroy(v);
|
QVariant_destroy(v);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
if QListWidgetItem_isSelected(Item) <> ASelected then
|
||||||
|
QListWidgetItem_setSelected(Item, ASelected);
|
||||||
|
|
||||||
end else
|
end else
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -11532,6 +11538,7 @@ var
|
|||||||
itemChild: QTreeWidgetItemH;
|
itemChild: QTreeWidgetItemH;
|
||||||
v: QVariantH;
|
v: QVariantH;
|
||||||
WStr: WideString;
|
WStr: WideString;
|
||||||
|
ASelected: Boolean;
|
||||||
begin
|
begin
|
||||||
{do not set items during design time}
|
{do not set items during design time}
|
||||||
if csDesigning in LCLObject.ComponentState then
|
if csDesigning in LCLObject.ComponentState then
|
||||||
@ -11569,6 +11576,7 @@ begin
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
WStr := GetUTF8String(TListView(LCLObject).Items[TopItem].Caption);
|
WStr := GetUTF8String(TListView(LCLObject).Items[TopItem].Caption);
|
||||||
|
ASelected := TListView(LCLObject).Items[TopItem].Selected;
|
||||||
|
|
||||||
v := QVariant_create(PWideString(@WStr));
|
v := QVariant_create(PWideString(@WStr));
|
||||||
try
|
try
|
||||||
@ -11601,6 +11609,8 @@ begin
|
|||||||
QVariant_destroy(v);
|
QVariant_destroy(v);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
if QTreeWidgetItem_isSelected(Item) <> ASelected then
|
||||||
|
QTreeWidgetItem_setSelected(Item, ASelected);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
inc(i, RowHeight);
|
inc(i, RowHeight);
|
||||||
|
@ -2911,6 +2911,9 @@ const
|
|||||||
LVN_COLUMNCLICK = LVN_FIRST-8;
|
LVN_COLUMNCLICK = LVN_FIRST-8;
|
||||||
LVN_BEGINDRAG = LVN_FIRST-9;
|
LVN_BEGINDRAG = LVN_FIRST-9;
|
||||||
LVN_BEGINRDRAG = LVN_FIRST-11;
|
LVN_BEGINRDRAG = LVN_FIRST-11;
|
||||||
|
LVN_ODCACHEHINT = LVN_FIRST-13;
|
||||||
|
LVN_ODSTATECHANGED = LVN_FIRST-15;
|
||||||
|
LVN_ODFINDITEM = LVN_FIRST-79;
|
||||||
|
|
||||||
const
|
const
|
||||||
LVIF_TEXT = $0001;
|
LVIF_TEXT = $0001;
|
||||||
|
Loading…
Reference in New Issue
Block a user