mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 05:13:09 +02:00
Qt: implemented GetTabRect()
git-svn-id: trunk@22513 -
This commit is contained in:
parent
e633753632
commit
9512d19c8f
@ -648,6 +648,7 @@ type
|
||||
public
|
||||
procedure AttachEvents; override;
|
||||
procedure DetachEvents; override;
|
||||
function GetTabRect(const AIndex: integer): TRect;
|
||||
procedure SignalTabBarCurrentChanged(Index: Integer); cdecl;
|
||||
function SlotTabBarMouse(Sender: QObjectH; Event: QEventH): Boolean; cdecl;
|
||||
function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl; override;
|
||||
@ -5628,6 +5629,11 @@ begin
|
||||
inherited DetachEvents;
|
||||
end;
|
||||
|
||||
function TQtTabBar.GetTabRect(const AIndex: integer): TRect;
|
||||
begin
|
||||
QTabBar_tabRect(QTabBarH(Widget), @Result, AIndex);
|
||||
end;
|
||||
|
||||
procedure TQtTabBar.SignalTabBarCurrentChanged(Index: Integer); cdecl;
|
||||
var
|
||||
Msg: TLMNotify;
|
||||
|
@ -67,6 +67,7 @@ type
|
||||
class function GetCapabilities: TNoteBookCapabilities; override;
|
||||
class function GetDesignInteractive(const AWinControl: TWinControl; AClientPos: TPoint): Boolean; override;
|
||||
class function GetTabIndexAtPos(const ANotebook: TCustomNotebook; const AClientPos: TPoint): integer; override;
|
||||
class function GetTabRect(const ANotebook: TCustomNotebook; const AIndex: Integer): TRect; override;
|
||||
class procedure SetPageIndex(const ANotebook: TCustomNotebook; const AIndex: integer); override;
|
||||
class procedure SetTabCaption(const ANotebook: TCustomNotebook; const AChild: TCustomPage; const AText: string); override;
|
||||
class procedure SetTabPosition(const ANotebook: TCustomNotebook; const ATabPosition: TTabPosition); override;
|
||||
@ -380,6 +381,19 @@ begin
|
||||
Result := TabWidget.tabAt(AClientPos);
|
||||
end;
|
||||
|
||||
class function TQtWSCustomNotebook.GetTabRect(const ANotebook: TCustomNotebook;
|
||||
const AIndex: Integer): TRect;
|
||||
var
|
||||
TabWidget: TQtTabWidget;
|
||||
R: TRect;
|
||||
begin
|
||||
Result := Rect(-1, -1, -1, -1);
|
||||
if not WSCheckHandleAllocated(ANotebook, 'GetTabRect') then
|
||||
Exit;
|
||||
TabWidget := TQtTabWidget(ANotebook.Handle);
|
||||
Result := TabWidget.TabBar.GetTabRect(AIndex);
|
||||
end;
|
||||
|
||||
class procedure TQtWSCustomNotebook.SetPageIndex(
|
||||
const ANotebook: TCustomNotebook; const AIndex: integer);
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user