mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 18:20:34 +02:00
+ Implemented multiselection in TFileDialogs
* Fixed some compiler warnings, removed some unused variables. git-svn-id: trunk@11536 -
This commit is contained in:
parent
0d3a0d3d89
commit
7439c8df1e
@ -1082,8 +1082,6 @@ end;
|
||||
message, you won<EFBFBD>t be able to show a form twice.
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TQtWidget.SlotClose; cdecl;
|
||||
var
|
||||
Msg: TLMessage;
|
||||
begin
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtWidget.SlotClose');
|
||||
@ -3840,7 +3838,6 @@ end;
|
||||
function TQtComboBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
Str: WideString;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
@ -4542,7 +4539,7 @@ begin
|
||||
NMLV.iItem := QTreeWidget_indexOfTopLevelItem(QTreeWidgetH(Widget), Item);
|
||||
|
||||
NMLV.iSubItem := Column;
|
||||
NMLV.uNewState := NM_KEYDOWN;
|
||||
NMLV.uNewState := UINT(NM_KEYDOWN);
|
||||
NMLV.uChanged := LVIS_SELECTED;
|
||||
|
||||
Msg.NMHdr := @NMLV.hdr;
|
||||
@ -4574,7 +4571,7 @@ begin
|
||||
NMLV.iItem := QTreeWidget_indexOfTopLevelItem(QTreeWidgetH(Widget), Item);
|
||||
|
||||
NMLV.iSubItem := Column;
|
||||
NMLV.uNewState := NM_CLICK;
|
||||
NMLV.uNewState := UINT(NM_CLICK);
|
||||
NMLV.uChanged := LVIS_SELECTED;
|
||||
QTreeWidget_visualItemRect(QTreeWidgetH(Widget), @R, Item);
|
||||
|
||||
@ -4610,7 +4607,7 @@ begin
|
||||
NMLV.iItem := QTreeWidget_indexOfTopLevelItem(QTreeWidgetH(Widget), Item);
|
||||
|
||||
NMLV.iSubItem := Column;
|
||||
NMLV.uNewState := NM_DBLCLK;
|
||||
NMLV.uNewState := UINT(NM_DBLCLK);
|
||||
NMLV.uChanged := LVIS_SELECTED;
|
||||
// LVIF_STATE;
|
||||
|
||||
@ -5317,6 +5314,7 @@ begin
|
||||
if FViewPortWidget <> niL then
|
||||
exit;
|
||||
|
||||
FillChar(AParams, SizeOf(AParams), #0);
|
||||
FViewPortWidget := TQtWidget.Create(LCLObject, AParams);
|
||||
FViewPortWidget.AttachEvents;
|
||||
|
||||
|
@ -269,9 +269,22 @@ begin
|
||||
begin
|
||||
if ofAllowMultiSelect in TOpenDialog(ACommonDialog).Options then
|
||||
begin
|
||||
QFileDialog_getOpenFileNames(ReturnList, Parent, @Caption, @Dir, @Filter, @selectedFilter, options)
|
||||
ReturnList := QStringList_create;
|
||||
try
|
||||
|
||||
QFileDialog_getOpenFileNames(ReturnList, Parent, @Caption, @Dir, @Filter, @selectedFilter, options);
|
||||
|
||||
// TODO: Convert ReturnList into a WideString and then into a utf-8 string and return that
|
||||
for i := 0 to QStringList_size(ReturnList) - 1 do
|
||||
begin
|
||||
QStringList_at(ReturnList, @ReturnText, i);
|
||||
FileDialog.Files.Add(UTF8Encode(ReturnText));
|
||||
end;
|
||||
|
||||
ReturnText := FileDialog.Files.Text;
|
||||
|
||||
finally
|
||||
QStringList_destroy(ReturnList);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
@ -433,7 +433,7 @@ begin
|
||||
QtGroupBox.BoxLayout := QGridLayout_create(QtGroupBox.Widget);
|
||||
|
||||
QWidget_setLayout(QtGroupBox.Widget, QtGroupBox.BoxLayout);
|
||||
QtGroupBox.ButtonGroup := TQtButtonGroup.Create(QObjectH(QtGroupBox.BoxLayout));
|
||||
QtGroupBox.ButtonGroup := TQtButtonGroup.Create(QtGroupBox.Widget);
|
||||
|
||||
{QGridLayout don't know anything about TCustomRadioGroup Col count so initialize cols }
|
||||
for i := 0 to TCustomRadioGroup(AWinControl).Columns - 1 do
|
||||
@ -534,7 +534,7 @@ begin
|
||||
|
||||
QtGroupBox.BoxLayout := QGridLayout_create(QtGroupBox.Widget);
|
||||
QWidget_setLayout(QtGroupBox.Widget, QtGroupBox.BoxLayout);
|
||||
QtGroupBox.ButtonGroup := TQtButtonGroup.Create(QObjectH(QtGroupBox.BoxLayout));
|
||||
QtGroupBox.ButtonGroup := TQtButtonGroup.Create(QtGroupBox.Widget);
|
||||
|
||||
{QGridLayout don't know anything about TCustomCheckGroup Col count so initialize cols }
|
||||
for i := 0 to TCustomCheckGroup(AWinControl).Columns - 1 do
|
||||
|
@ -22,7 +22,7 @@
|
||||
}
|
||||
unit QtWSSpin;
|
||||
|
||||
{$mode delphi}{$H+}
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
@ -166,6 +166,7 @@ end;
|
||||
class function TQtWSCustomFloatSpinEdit.GetText(const AWinControl: TWinControl; var AText: String): Boolean;
|
||||
begin
|
||||
{$note implement}
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
class procedure TQtWSCustomFloatSpinEdit.SetText(const AWinControl: TWinControl; const AText: string);
|
||||
|
@ -1539,9 +1539,6 @@ end;
|
||||
class function TQtWSToggleBox.CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle;
|
||||
var
|
||||
QtToggleBox: TQtPushButton;
|
||||
ATextWidth: Integer;
|
||||
FM: QFontMetricsH;
|
||||
Str: WideString;
|
||||
begin
|
||||
|
||||
QtToggleBox := TQtPushButton.Create(AWinControl, AParams);
|
||||
|
Loading…
Reference in New Issue
Block a user