mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 17:59:22 +02:00
Qt: TQtWidget properties reorderd alphabeticaly, added StyleSheet property.
git-svn-id: trunk@21979 -
This commit is contained in:
parent
c74e94a5cc
commit
da3c455007
@ -98,12 +98,14 @@ type
|
|||||||
|
|
||||||
function GetPalette: TQtWidgetPalette;
|
function GetPalette: TQtWidgetPalette;
|
||||||
function GetProps(const AnIndex: String): pointer;
|
function GetProps(const AnIndex: String): pointer;
|
||||||
|
function GetStyleSheet: WideString;
|
||||||
function GetWidget: QWidgetH;
|
function GetWidget: QWidgetH;
|
||||||
function LCLKeyToQtKey(AKey: Word): Integer;
|
function LCLKeyToQtKey(AKey: Word): Integer;
|
||||||
function QtButtonsToLCLButtons(AButtons: QTMouseButton): PtrInt;
|
function QtButtonsToLCLButtons(AButtons: QTMouseButton): PtrInt;
|
||||||
function QtKeyModifiersToKeyState(AModifiers: QtKeyboardModifiers): PtrInt;
|
function QtKeyModifiersToKeyState(AModifiers: QtKeyboardModifiers): PtrInt;
|
||||||
function QtKeyToLCLKey(AKey: Integer; AText: WideString): Word;
|
function QtKeyToLCLKey(AKey: Integer; AText: WideString): Word;
|
||||||
procedure SetProps(const AnIndex: String; const AValue: pointer);
|
procedure SetProps(const AnIndex: String; const AValue: pointer);
|
||||||
|
procedure SetStyleSheet(const AValue: WideString);
|
||||||
procedure SetWidget(const AValue: QWidgetH);
|
procedure SetWidget(const AValue: QWidgetH);
|
||||||
function ShiftStateToQtModifiers(Shift: TShiftState): QtModifier;
|
function ShiftStateToQtModifiers(Shift: TShiftState): QtModifier;
|
||||||
protected
|
protected
|
||||||
@ -236,15 +238,16 @@ type
|
|||||||
function windowModality: QtWindowModality;
|
function windowModality: QtWindowModality;
|
||||||
|
|
||||||
property Context: HDC read GetContext;
|
property Context: HDC read GetContext;
|
||||||
property KeysToEat: TByteSet read FKeysToEat write FKeysToEat;
|
|
||||||
property Palette: TQtWidgetPalette read GetPalette;
|
|
||||||
property Props[AnIndex:String]:pointer read GetProps write SetProps;
|
|
||||||
property PaintData: TPaintData read FPaintData write FPaintData;
|
|
||||||
property Widget: QWidgetH read GetWidget write SetWidget;
|
|
||||||
property HasCaret: Boolean read FHasCaret write SetHasCaret;
|
property HasCaret: Boolean read FHasCaret write SetHasCaret;
|
||||||
property HasPaint: Boolean read FHasPaint write FHasPaint;
|
property HasPaint: Boolean read FHasPaint write FHasPaint;
|
||||||
property WidgetColorRole: QPaletteColorRole read FWidgetColorRole write FWidgetColorRole;
|
property KeysToEat: TByteSet read FKeysToEat write FKeysToEat;
|
||||||
|
property StyleSheet: WideString read GetStyleSheet write SetStyleSheet;
|
||||||
|
property PaintData: TPaintData read FPaintData write FPaintData;
|
||||||
|
property Palette: TQtWidgetPalette read GetPalette;
|
||||||
|
property Props[AnIndex:String]:pointer read GetProps write SetProps;
|
||||||
property TextColorRole: QPaletteColorRole read FTextColorRole write FTextColorRole;
|
property TextColorRole: QPaletteColorRole read FTextColorRole write FTextColorRole;
|
||||||
|
property Widget: QWidgetH read GetWidget write SetWidget;
|
||||||
|
property WidgetColorRole: QPaletteColorRole read FWidgetColorRole write FWidgetColorRole;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TQtAbstractSlider , inherited by TQtScrollBar, TQtTrackBar }
|
{ TQtAbstractSlider , inherited by TQtScrollBar, TQtTrackBar }
|
||||||
@ -3788,6 +3791,14 @@ begin
|
|||||||
result := nil;
|
result := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TQtWidget.GetStyleSheet: WideString;
|
||||||
|
var
|
||||||
|
WStr: WideString;
|
||||||
|
begin
|
||||||
|
QWidget_styleSheet(Widget, @WStr);
|
||||||
|
Result := UTF16ToUTF8(WStr);
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Function: TQtWidget.GetPalette
|
Function: TQtWidget.GetPalette
|
||||||
Params: Nothing
|
Params: Nothing
|
||||||
@ -3853,6 +3864,14 @@ begin
|
|||||||
Fprops.Objects[i] := TObject(AValue);
|
Fprops.Objects[i] := TObject(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TQtWidget.SetStyleSheet(const AValue: WideString);
|
||||||
|
var
|
||||||
|
WStr: WideString;
|
||||||
|
begin
|
||||||
|
WStr := GetUTF8String(AValue);
|
||||||
|
QWidget_setStyleSheet(Widget, @WStr);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TQtWidget.SetWidget(const AValue: QWidgetH);
|
procedure TQtWidget.SetWidget(const AValue: QWidgetH);
|
||||||
begin
|
begin
|
||||||
TheObject := AValue;
|
TheObject := AValue;
|
||||||
|
Loading…
Reference in New Issue
Block a user