mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-21 22:48:49 +02:00
Qt: fix setvisible/getvisible for menu items
git-svn-id: trunk@11923 -
This commit is contained in:
parent
de35bfb0d6
commit
ed062327ae
@ -114,7 +114,7 @@ type
|
|||||||
function getEnabled: Boolean;
|
function getEnabled: Boolean;
|
||||||
function getFrameGeometry: TRect;
|
function getFrameGeometry: TRect;
|
||||||
function getGeometry: TRect; virtual;
|
function getGeometry: TRect; virtual;
|
||||||
function getVisible: Boolean;
|
function getVisible: Boolean; virtual;
|
||||||
function getClientBounds: TRect; virtual;
|
function getClientBounds: TRect; virtual;
|
||||||
procedure grabMouse;
|
procedure grabMouse;
|
||||||
function hasFocus: Boolean;
|
function hasFocus: Boolean;
|
||||||
@ -694,6 +694,7 @@ type
|
|||||||
function actionHandle: QActionH;
|
function actionHandle: QActionH;
|
||||||
function addMenu(title: PWideString): TQtMenu;
|
function addMenu(title: PWideString): TQtMenu;
|
||||||
function addSeparator: TQtMenu;
|
function addSeparator: TQtMenu;
|
||||||
|
function getVisible: Boolean; override;
|
||||||
procedure setChecked(p1: Boolean);
|
procedure setChecked(p1: Boolean);
|
||||||
procedure setCheckable(p1: Boolean);
|
procedure setCheckable(p1: Boolean);
|
||||||
procedure setHasSubmenu(AValue: Boolean);
|
procedure setHasSubmenu(AValue: Boolean);
|
||||||
@ -702,6 +703,7 @@ type
|
|||||||
procedure setSeparator(AValue: Boolean);
|
procedure setSeparator(AValue: Boolean);
|
||||||
procedure setShortcut(AShortcut: TShortcut);
|
procedure setShortcut(AShortcut: TShortcut);
|
||||||
procedure setText(AText: PWideString);
|
procedure setText(AText: PWideString);
|
||||||
|
procedure setVisible(visible: Boolean); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TQtMenuBar }
|
{ TQtMenuBar }
|
||||||
@ -5399,11 +5401,21 @@ begin
|
|||||||
Result.setSeparator(True);
|
Result.setSeparator(True);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TQtMenu.getVisible: Boolean;
|
||||||
|
begin
|
||||||
|
Result := QAction_isVisible(ActionHandle);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TQtMenu.setText(AText: PWideString);
|
procedure TQtMenu.setText(AText: PWideString);
|
||||||
begin
|
begin
|
||||||
QAction_setText(ActionHandle, AText);
|
QAction_setText(ActionHandle, AText);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TQtMenu.setVisible(visible: Boolean);
|
||||||
|
begin
|
||||||
|
QAction_setVisible(ActionHandle, visible);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TQtMenu.setChecked(p1: Boolean);
|
procedure TQtMenu.setChecked(p1: Boolean);
|
||||||
begin
|
begin
|
||||||
if p1 then setCheckable(True)
|
if p1 then setCheckable(True)
|
||||||
|
Loading…
Reference in New Issue
Block a user