mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 16:09:41 +02:00
Qt:
- update bindings to 1.49 - complete SpinEdit - fix problem with open form contains TWsCustomEdit descendants git-svn-id: trunk@12014 -
This commit is contained in:
parent
4d18147648
commit
6890ddcf11
@ -1,6 +1,6 @@
|
|||||||
unit qt4;
|
unit qt4;
|
||||||
|
|
||||||
{ Version : 1.48 }
|
{ Version : 1.49 }
|
||||||
|
|
||||||
{$ifdef fpc}
|
{$ifdef fpc}
|
||||||
{$mode delphi}
|
{$mode delphi}
|
||||||
@ -266,6 +266,7 @@ QObjectH = class(TObject) end;
|
|||||||
QScrollBarH = class(QAbstractSliderH) end;
|
QScrollBarH = class(QAbstractSliderH) end;
|
||||||
QSliderH = class(QAbstractSliderH) end;
|
QSliderH = class(QAbstractSliderH) end;
|
||||||
QAbstractSpinBoxH = class(QWidgetH) end;
|
QAbstractSpinBoxH = class(QWidgetH) end;
|
||||||
|
QLCLAbstractSpinBoxH = class(QAbstractSpinBoxH) end;
|
||||||
QDoubleSpinBoxH = class(QAbstractSpinBoxH) end;
|
QDoubleSpinBoxH = class(QAbstractSpinBoxH) end;
|
||||||
QSpinBoxH = class(QAbstractSpinBoxH) end;
|
QSpinBoxH = class(QAbstractSpinBoxH) end;
|
||||||
QCalendarWidgetH = class(QWidgetH) end;
|
QCalendarWidgetH = class(QWidgetH) end;
|
||||||
@ -869,6 +870,7 @@ const
|
|||||||
QtWA_Moved = 43 { $2b };
|
QtWA_Moved = 43 { $2b };
|
||||||
QtWA_PendingUpdate = 44 { $2c };
|
QtWA_PendingUpdate = 44 { $2c };
|
||||||
QtWA_InvalidSize = 45 { $2d };
|
QtWA_InvalidSize = 45 { $2d };
|
||||||
|
QtWA_MacBrushedMetal = 46 { $2e };
|
||||||
QtWA_MacMetalStyle = 46 { $2e };
|
QtWA_MacMetalStyle = 46 { $2e };
|
||||||
QtWA_CustomWhatsThis = 47 { $2f };
|
QtWA_CustomWhatsThis = 47 { $2f };
|
||||||
QtWA_LayoutOnEntireRect = 48 { $30 };
|
QtWA_LayoutOnEntireRect = 48 { $30 };
|
||||||
@ -910,7 +912,18 @@ const
|
|||||||
QtWA_AlwaysShowToolTips = 84 { $54 };
|
QtWA_AlwaysShowToolTips = 84 { $54 };
|
||||||
QtWA_MacOpaqueSizeGrip = 85 { $55 };
|
QtWA_MacOpaqueSizeGrip = 85 { $55 };
|
||||||
QtWA_SetStyle = 86 { $56 };
|
QtWA_SetStyle = 86 { $56 };
|
||||||
QtWA_AttributeCount = 87 { $57 };
|
QtWA_SetLocale = 87 { $57 };
|
||||||
|
QtWA_MacShowFocusRect = 88 { $58 };
|
||||||
|
QtWA_MacNormalSize = 89 { $59 };
|
||||||
|
QtWA_MacSmallSize = 90 { $5a };
|
||||||
|
QtWA_MacMiniSize = 91 { $5b };
|
||||||
|
QtWA_LayoutUsesWidgetRect = 92 { $5c };
|
||||||
|
QtWA_StyledBackground = 93 { $5d };
|
||||||
|
QtWA_MSWindowsUseDirect3D = 94 { $5e };
|
||||||
|
QtWA_CanHostQMdiSubWindowTitleBar = 95 { $5f };
|
||||||
|
QtWA_MacAlwaysShowToolWindow = 96 { $60 };
|
||||||
|
QtWA_StyleSheet = 97 { $61 };
|
||||||
|
QtWA_AttributeCount = 98 { $62 };
|
||||||
|
|
||||||
type
|
type
|
||||||
QtKey = cardinal; // Qt::Key (4)
|
QtKey = cardinal; // Qt::Key (4)
|
||||||
@ -1311,6 +1324,14 @@ const
|
|||||||
QtTextEditorInteraction = 19 { $13 };
|
QtTextEditorInteraction = 19 { $13 };
|
||||||
QtTextBrowserInteraction = 13 { $d };
|
QtTextBrowserInteraction = 13 { $d };
|
||||||
|
|
||||||
|
type
|
||||||
|
QtEventPriority = cardinal; // Qt::EventPriority (4)
|
||||||
|
|
||||||
|
const
|
||||||
|
QtHighEventPriority = 1 { $1 };
|
||||||
|
QtNormalEventPriority = 0 { $0 };
|
||||||
|
QtLowEventPriority = 4294967295 { $ffffffff };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function QObject_create(parent: QObjectH = nil): QObjectH; cdecl; external QtIntf name 'QObject_create';
|
function QObject_create(parent: QObjectH = nil): QObjectH; cdecl; external QtIntf name 'QObject_create';
|
||||||
@ -1476,6 +1497,147 @@ type
|
|||||||
QEventUser = 1000,
|
QEventUser = 1000,
|
||||||
QEventMaxUser = 65535 );
|
QEventMaxUser = 65535 );
|
||||||
|
|
||||||
|
type
|
||||||
|
QEventType = cardinal; // QEvent::Type (4)
|
||||||
|
|
||||||
|
const
|
||||||
|
QEventNone = 0 { $0 };
|
||||||
|
QEventTimer = 1 { $1 };
|
||||||
|
QEventMouseButtonPress = 2 { $2 };
|
||||||
|
QEventMouseButtonRelease = 3 { $3 };
|
||||||
|
QEventMouseButtonDblClick = 4 { $4 };
|
||||||
|
QEventMouseMove = 5 { $5 };
|
||||||
|
QEventKeyPress = 6 { $6 };
|
||||||
|
QEventKeyRelease = 7 { $7 };
|
||||||
|
QEventFocusIn = 8 { $8 };
|
||||||
|
QEventFocusOut = 9 { $9 };
|
||||||
|
QEventEnter = 10 { $a };
|
||||||
|
QEventLeave = 11 { $b };
|
||||||
|
QEventPaint = 12 { $c };
|
||||||
|
QEventMove = 13 { $d };
|
||||||
|
QEventResize = 14 { $e };
|
||||||
|
QEventCreate = 15 { $f };
|
||||||
|
QEventDestroy = 16 { $10 };
|
||||||
|
QEventShow = 17 { $11 };
|
||||||
|
QEventHide = 18 { $12 };
|
||||||
|
QEventClose = 19 { $13 };
|
||||||
|
QEventQuit = 20 { $14 };
|
||||||
|
QEventParentChange = 21 { $15 };
|
||||||
|
QEventParentAboutToChange = 131 { $83 };
|
||||||
|
QEventThreadChange = 22 { $16 };
|
||||||
|
QEventWindowActivate = 24 { $18 };
|
||||||
|
QEventWindowDeactivate = 25 { $19 };
|
||||||
|
QEventShowToParent = 26 { $1a };
|
||||||
|
QEventHideToParent = 27 { $1b };
|
||||||
|
QEventWheel = 31 { $1f };
|
||||||
|
QEventWindowTitleChange = 33 { $21 };
|
||||||
|
QEventWindowIconChange = 34 { $22 };
|
||||||
|
QEventApplicationWindowIconChange = 35 { $23 };
|
||||||
|
QEventApplicationFontChange = 36 { $24 };
|
||||||
|
QEventApplicationLayoutDirectionChange = 37 { $25 };
|
||||||
|
QEventApplicationPaletteChange = 38 { $26 };
|
||||||
|
QEventPaletteChange = 39 { $27 };
|
||||||
|
QEventClipboard = 40 { $28 };
|
||||||
|
QEventSpeech = 42 { $2a };
|
||||||
|
QEventMetaCall = 43 { $2b };
|
||||||
|
QEventSockAct = 50 { $32 };
|
||||||
|
QEventWinEventAct = 132 { $84 };
|
||||||
|
QEventDeferredDelete = 52 { $34 };
|
||||||
|
QEventDragEnter = 60 { $3c };
|
||||||
|
QEventDragMove = 61 { $3d };
|
||||||
|
QEventDragLeave = 62 { $3e };
|
||||||
|
QEventDrop = 63 { $3f };
|
||||||
|
QEventDragResponse = 64 { $40 };
|
||||||
|
QEventChildAdded = 68 { $44 };
|
||||||
|
QEventChildPolished = 69 { $45 };
|
||||||
|
QEventChildRemoved = 71 { $47 };
|
||||||
|
QEventShowWindowRequest = 73 { $49 };
|
||||||
|
QEventPolishRequest = 74 { $4a };
|
||||||
|
QEventPolish = 75 { $4b };
|
||||||
|
QEventLayoutRequest = 76 { $4c };
|
||||||
|
QEventUpdateRequest = 77 { $4d };
|
||||||
|
QEventUpdateLater = 78 { $4e };
|
||||||
|
QEventEmbeddingControl = 79 { $4f };
|
||||||
|
QEventActivateControl = 80 { $50 };
|
||||||
|
QEventDeactivateControl = 81 { $51 };
|
||||||
|
QEventContextMenu = 82 { $52 };
|
||||||
|
QEventInputMethod = 83 { $53 };
|
||||||
|
QEventAccessibilityPrepare = 86 { $56 };
|
||||||
|
QEventTabletMove = 87 { $57 };
|
||||||
|
QEventLocaleChange = 88 { $58 };
|
||||||
|
QEventLanguageChange = 89 { $59 };
|
||||||
|
QEventLayoutDirectionChange = 90 { $5a };
|
||||||
|
QEventStyle = 91 { $5b };
|
||||||
|
QEventTabletPress = 92 { $5c };
|
||||||
|
QEventTabletRelease = 93 { $5d };
|
||||||
|
QEventOkRequest = 94 { $5e };
|
||||||
|
QEventHelpRequest = 95 { $5f };
|
||||||
|
QEventIconDrag = 96 { $60 };
|
||||||
|
QEventFontChange = 97 { $61 };
|
||||||
|
QEventEnabledChange = 98 { $62 };
|
||||||
|
QEventActivationChange = 99 { $63 };
|
||||||
|
QEventStyleChange = 100 { $64 };
|
||||||
|
QEventIconTextChange = 101 { $65 };
|
||||||
|
QEventModifiedChange = 102 { $66 };
|
||||||
|
QEventMouseTrackingChange = 109 { $6d };
|
||||||
|
QEventWindowBlocked = 103 { $67 };
|
||||||
|
QEventWindowUnblocked = 104 { $68 };
|
||||||
|
QEventWindowStateChange = 105 { $69 };
|
||||||
|
QEventToolTip = 110 { $6e };
|
||||||
|
QEventWhatsThis = 111 { $6f };
|
||||||
|
QEventStatusTip = 112 { $70 };
|
||||||
|
QEventActionChanged = 113 { $71 };
|
||||||
|
QEventActionAdded = 114 { $72 };
|
||||||
|
QEventActionRemoved = 115 { $73 };
|
||||||
|
QEventFileOpen = 116 { $74 };
|
||||||
|
QEventShortcut = 117 { $75 };
|
||||||
|
QEventShortcutOverride = 51 { $33 };
|
||||||
|
QEventWhatsThisClicked = 118 { $76 };
|
||||||
|
QEventToolBarChange = 120 { $78 };
|
||||||
|
QEventApplicationActivate = 121 { $79 };
|
||||||
|
QEventApplicationActivated = 121 { $79 };
|
||||||
|
QEventApplicationDeactivate = 122 { $7a };
|
||||||
|
QEventApplicationDeactivated = 122 { $7a };
|
||||||
|
QEventQueryWhatsThis = 123 { $7b };
|
||||||
|
QEventEnterWhatsThisMode = 124 { $7c };
|
||||||
|
QEventLeaveWhatsThisMode = 125 { $7d };
|
||||||
|
QEventZOrderChange = 126 { $7e };
|
||||||
|
QEventHoverEnter = 127 { $7f };
|
||||||
|
QEventHoverLeave = 128 { $80 };
|
||||||
|
QEventHoverMove = 129 { $81 };
|
||||||
|
QEventAccessibilityHelp = 119 { $77 };
|
||||||
|
QEventAccessibilityDescription = 130 { $82 };
|
||||||
|
QEventAcceptDropsChange = 152 { $98 };
|
||||||
|
QEventMenubarUpdated = 153 { $99 };
|
||||||
|
QEventZeroTimerEvent = 154 { $9a };
|
||||||
|
QEventGraphicsSceneMouseMove = 155 { $9b };
|
||||||
|
QEventGraphicsSceneMousePress = 156 { $9c };
|
||||||
|
QEventGraphicsSceneMouseRelease = 157 { $9d };
|
||||||
|
QEventGraphicsSceneMouseDoubleClick = 158 { $9e };
|
||||||
|
QEventGraphicsSceneContextMenu = 159 { $9f };
|
||||||
|
QEventGraphicsSceneHoverEnter = 160 { $a0 };
|
||||||
|
QEventGraphicsSceneHoverMove = 161 { $a1 };
|
||||||
|
QEventGraphicsSceneHoverLeave = 162 { $a2 };
|
||||||
|
QEventGraphicsSceneHelp = 163 { $a3 };
|
||||||
|
QEventGraphicsSceneDragEnter = 164 { $a4 };
|
||||||
|
QEventGraphicsSceneDragMove = 165 { $a5 };
|
||||||
|
QEventGraphicsSceneDragLeave = 166 { $a6 };
|
||||||
|
QEventGraphicsSceneDrop = 167 { $a7 };
|
||||||
|
QEventGraphicsSceneWheel = 168 { $a8 };
|
||||||
|
QEventKeyboardLayoutChange = 169 { $a9 };
|
||||||
|
QEventDynamicPropertyChange = 170 { $aa };
|
||||||
|
QEventTabletEnterProximity = 171 { $ab };
|
||||||
|
QEventTabletLeaveProximity = 172 { $ac };
|
||||||
|
QEventNonClientAreaMouseMove = 173 { $ad };
|
||||||
|
QEventNonClientAreaMouseButtonPress = 174 { $ae };
|
||||||
|
QEventNonClientAreaMouseButtonRelease = 175 { $af };
|
||||||
|
QEventNonClientAreaMouseButtonDblClick = 176 { $b0 };
|
||||||
|
QEventMacSizeChange = 177 { $b1 };
|
||||||
|
QEventContentsRectChange = 178 { $b2 };
|
||||||
|
QEventUser = 1000 { $3e8 };
|
||||||
|
QEventMaxUser = 65535 { $ffff };
|
||||||
|
|
||||||
|
|
||||||
function QEvent_create(_type: QEventType): QEventH; cdecl; external QtIntf name 'QEvent_create';
|
function QEvent_create(_type: QEventType): QEventH; cdecl; external QtIntf name 'QEvent_create';
|
||||||
procedure QEvent_destroy(handle: QEventH); cdecl; external QtIntf name 'QEvent_destroy';
|
procedure QEvent_destroy(handle: QEventH); cdecl; external QtIntf name 'QEvent_destroy';
|
||||||
function QEvent_type(handle: QEventH): QEventType; cdecl; external QtIntf name 'QEvent_type';
|
function QEvent_type(handle: QEventH): QEventType; cdecl; external QtIntf name 'QEvent_type';
|
||||||
@ -1658,7 +1820,8 @@ const
|
|||||||
QVariantTextLength = 78 { $4e };
|
QVariantTextLength = 78 { $4e };
|
||||||
QVariantTextFormat = 79 { $4f };
|
QVariantTextFormat = 79 { $4f };
|
||||||
QVariantMatrix = 80 { $50 };
|
QVariantMatrix = 80 { $50 };
|
||||||
QVariantLastGuiType = 80 { $50 };
|
QVariantTransform = 81 { $51 };
|
||||||
|
QVariantLastGuiType = 81 { $51 };
|
||||||
QVariantUserType = 127 { $7f };
|
QVariantUserType = 127 { $7f };
|
||||||
QVariantLastType = 4294967295 { $ffffffff };
|
QVariantLastType = 4294967295 { $ffffffff };
|
||||||
|
|
||||||
@ -2400,6 +2563,7 @@ const
|
|||||||
QLocaleNauruLanguage = 83 { $53 };
|
QLocaleNauruLanguage = 83 { $53 };
|
||||||
QLocaleNepali = 84 { $54 };
|
QLocaleNepali = 84 { $54 };
|
||||||
QLocaleNorwegian = 85 { $55 };
|
QLocaleNorwegian = 85 { $55 };
|
||||||
|
QLocaleNorwegianBokmal = 85 { $55 };
|
||||||
QLocaleOccitan = 86 { $56 };
|
QLocaleOccitan = 86 { $56 };
|
||||||
QLocaleOriya = 87 { $57 };
|
QLocaleOriya = 87 { $57 };
|
||||||
QLocalePashto = 88 { $58 };
|
QLocalePashto = 88 { $58 };
|
||||||
@ -2455,12 +2619,33 @@ const
|
|||||||
QLocaleYoruba = 138 { $8a };
|
QLocaleYoruba = 138 { $8a };
|
||||||
QLocaleZhuang = 139 { $8b };
|
QLocaleZhuang = 139 { $8b };
|
||||||
QLocaleZulu = 140 { $8c };
|
QLocaleZulu = 140 { $8c };
|
||||||
|
QLocaleNorwegianNynorsk = 141 { $8d };
|
||||||
QLocaleNynorsk = 141 { $8d };
|
QLocaleNynorsk = 141 { $8d };
|
||||||
QLocaleBosnian = 142 { $8e };
|
QLocaleBosnian = 142 { $8e };
|
||||||
QLocaleDivehi = 143 { $8f };
|
QLocaleDivehi = 143 { $8f };
|
||||||
QLocaleManx = 144 { $90 };
|
QLocaleManx = 144 { $90 };
|
||||||
QLocaleCornish = 145 { $91 };
|
QLocaleCornish = 145 { $91 };
|
||||||
QLocaleLastLanguage = 145 { $91 };
|
QLocaleAkan = 146 { $92 };
|
||||||
|
QLocaleKonkani = 147 { $93 };
|
||||||
|
QLocaleGa = 148 { $94 };
|
||||||
|
QLocaleIgbo = 149 { $95 };
|
||||||
|
QLocaleKamba = 150 { $96 };
|
||||||
|
QLocaleSyriac = 151 { $97 };
|
||||||
|
QLocaleBlin = 152 { $98 };
|
||||||
|
QLocaleGeez = 153 { $99 };
|
||||||
|
QLocaleKoro = 154 { $9a };
|
||||||
|
QLocaleSidamo = 155 { $9b };
|
||||||
|
QLocaleAtsam = 156 { $9c };
|
||||||
|
QLocaleTigre = 157 { $9d };
|
||||||
|
QLocaleJju = 158 { $9e };
|
||||||
|
QLocaleFriulian = 159 { $9f };
|
||||||
|
QLocaleVenda = 160 { $a0 };
|
||||||
|
QLocaleEwe = 161 { $a1 };
|
||||||
|
QLocaleWalamo = 162 { $a2 };
|
||||||
|
QLocaleHawaiian = 163 { $a3 };
|
||||||
|
QLocaleTyap = 164 { $a4 };
|
||||||
|
QLocaleChewa = 165 { $a5 };
|
||||||
|
QLocaleLastLanguage = 165 { $a5 };
|
||||||
|
|
||||||
type
|
type
|
||||||
QLocaleCountry = cardinal; // QLocale::Country (4)
|
QLocaleCountry = cardinal; // QLocale::Country (4)
|
||||||
@ -6100,6 +6285,8 @@ type
|
|||||||
QAbstractSpinBox_editingFinished_Event = procedure () of object cdecl;
|
QAbstractSpinBox_editingFinished_Event = procedure () of object cdecl;
|
||||||
|
|
||||||
|
|
||||||
|
function QLCLAbstractSpinBox_lineEditHandle(protectedhandle: QAbstractSpinBoxH): QLineEditH; cdecl; external QtIntf name 'QLCLAbstractSpinBox_lineEditHandle';
|
||||||
|
|
||||||
function QSpinBox_create(parent: QWidgetH = nil): QSpinBoxH; cdecl; external QtIntf name 'QSpinBox_create';
|
function QSpinBox_create(parent: QWidgetH = nil): QSpinBoxH; cdecl; external QtIntf name 'QSpinBox_create';
|
||||||
procedure QSpinBox_destroy(handle: QSpinBoxH); cdecl; external QtIntf name 'QSpinBox_destroy';
|
procedure QSpinBox_destroy(handle: QSpinBoxH); cdecl; external QtIntf name 'QSpinBox_destroy';
|
||||||
function QSpinBox_value(handle: QSpinBoxH): Integer; cdecl; external QtIntf name 'QSpinBox_value';
|
function QSpinBox_value(handle: QSpinBoxH): Integer; cdecl; external QtIntf name 'QSpinBox_value';
|
||||||
@ -8156,6 +8343,100 @@ type
|
|||||||
QStyleSP_ArrowForward,
|
QStyleSP_ArrowForward,
|
||||||
QStyleSP_CustomBase = $f0000000 );
|
QStyleSP_CustomBase = $f0000000 );
|
||||||
|
|
||||||
|
type
|
||||||
|
QStylePixelMetric = cardinal; // QStyle::PixelMetric (4)
|
||||||
|
|
||||||
|
const
|
||||||
|
QStylePM_ButtonMargin = 0 { $0 };
|
||||||
|
QStylePM_ButtonDefaultIndicator = 1 { $1 };
|
||||||
|
QStylePM_MenuButtonIndicator = 2 { $2 };
|
||||||
|
QStylePM_ButtonShiftHorizontal = 3 { $3 };
|
||||||
|
QStylePM_ButtonShiftVertical = 4 { $4 };
|
||||||
|
QStylePM_DefaultFrameWidth = 5 { $5 };
|
||||||
|
QStylePM_SpinBoxFrameWidth = 6 { $6 };
|
||||||
|
QStylePM_ComboBoxFrameWidth = 7 { $7 };
|
||||||
|
QStylePM_MaximumDragDistance = 8 { $8 };
|
||||||
|
QStylePM_ScrollBarExtent = 9 { $9 };
|
||||||
|
QStylePM_ScrollBarSliderMin = 10 { $a };
|
||||||
|
QStylePM_SliderThickness = 11 { $b };
|
||||||
|
QStylePM_SliderControlThickness = 12 { $c };
|
||||||
|
QStylePM_SliderLength = 13 { $d };
|
||||||
|
QStylePM_SliderTickmarkOffset = 14 { $e };
|
||||||
|
QStylePM_SliderSpaceAvailable = 15 { $f };
|
||||||
|
QStylePM_DockWidgetSeparatorExtent = 16 { $10 };
|
||||||
|
QStylePM_DockWidgetHandleExtent = 17 { $11 };
|
||||||
|
QStylePM_DockWidgetFrameWidth = 18 { $12 };
|
||||||
|
QStylePM_TabBarTabOverlap = 19 { $13 };
|
||||||
|
QStylePM_TabBarTabHSpace = 20 { $14 };
|
||||||
|
QStylePM_TabBarTabVSpace = 21 { $15 };
|
||||||
|
QStylePM_TabBarBaseHeight = 22 { $16 };
|
||||||
|
QStylePM_TabBarBaseOverlap = 23 { $17 };
|
||||||
|
QStylePM_ProgressBarChunkWidth = 24 { $18 };
|
||||||
|
QStylePM_SplitterWidth = 25 { $19 };
|
||||||
|
QStylePM_TitleBarHeight = 26 { $1a };
|
||||||
|
QStylePM_MenuScrollerHeight = 27 { $1b };
|
||||||
|
QStylePM_MenuHMargin = 28 { $1c };
|
||||||
|
QStylePM_MenuVMargin = 29 { $1d };
|
||||||
|
QStylePM_MenuPanelWidth = 30 { $1e };
|
||||||
|
QStylePM_MenuTearoffHeight = 31 { $1f };
|
||||||
|
QStylePM_MenuDesktopFrameWidth = 32 { $20 };
|
||||||
|
QStylePM_MenuBarPanelWidth = 33 { $21 };
|
||||||
|
QStylePM_MenuBarItemSpacing = 34 { $22 };
|
||||||
|
QStylePM_MenuBarVMargin = 35 { $23 };
|
||||||
|
QStylePM_MenuBarHMargin = 36 { $24 };
|
||||||
|
QStylePM_IndicatorWidth = 37 { $25 };
|
||||||
|
QStylePM_IndicatorHeight = 38 { $26 };
|
||||||
|
QStylePM_ExclusiveIndicatorWidth = 39 { $27 };
|
||||||
|
QStylePM_ExclusiveIndicatorHeight = 40 { $28 };
|
||||||
|
QStylePM_CheckListButtonSize = 41 { $29 };
|
||||||
|
QStylePM_CheckListControllerSize = 42 { $2a };
|
||||||
|
QStylePM_DialogButtonsSeparator = 43 { $2b };
|
||||||
|
QStylePM_DialogButtonsButtonWidth = 44 { $2c };
|
||||||
|
QStylePM_DialogButtonsButtonHeight = 45 { $2d };
|
||||||
|
QStylePM_MdiSubWindowFrameWidth = 46 { $2e };
|
||||||
|
QStylePM_MDIFrameWidth = 46 { $2e };
|
||||||
|
QStylePM_MdiSubWindowMinimizedWidth = 47 { $2f };
|
||||||
|
QStylePM_MDIMinimizedWidth = 47 { $2f };
|
||||||
|
QStylePM_HeaderMargin = 48 { $30 };
|
||||||
|
QStylePM_HeaderMarkSize = 49 { $31 };
|
||||||
|
QStylePM_HeaderGripMargin = 50 { $32 };
|
||||||
|
QStylePM_TabBarTabShiftHorizontal = 51 { $33 };
|
||||||
|
QStylePM_TabBarTabShiftVertical = 52 { $34 };
|
||||||
|
QStylePM_TabBarScrollButtonWidth = 53 { $35 };
|
||||||
|
QStylePM_ToolBarFrameWidth = 54 { $36 };
|
||||||
|
QStylePM_ToolBarHandleExtent = 55 { $37 };
|
||||||
|
QStylePM_ToolBarItemSpacing = 56 { $38 };
|
||||||
|
QStylePM_ToolBarItemMargin = 57 { $39 };
|
||||||
|
QStylePM_ToolBarSeparatorExtent = 58 { $3a };
|
||||||
|
QStylePM_ToolBarExtensionExtent = 59 { $3b };
|
||||||
|
QStylePM_SpinBoxSliderHeight = 60 { $3c };
|
||||||
|
QStylePM_DefaultTopLevelMargin = 61 { $3d };
|
||||||
|
QStylePM_DefaultChildMargin = 62 { $3e };
|
||||||
|
QStylePM_DefaultLayoutSpacing = 63 { $3f };
|
||||||
|
QStylePM_ToolBarIconSize = 64 { $40 };
|
||||||
|
QStylePM_ListViewIconSize = 65 { $41 };
|
||||||
|
QStylePM_IconViewIconSize = 66 { $42 };
|
||||||
|
QStylePM_SmallIconSize = 67 { $43 };
|
||||||
|
QStylePM_LargeIconSize = 68 { $44 };
|
||||||
|
QStylePM_FocusFrameVMargin = 69 { $45 };
|
||||||
|
QStylePM_FocusFrameHMargin = 70 { $46 };
|
||||||
|
QStylePM_ToolTipLabelFrameWidth = 71 { $47 };
|
||||||
|
QStylePM_CheckBoxLabelSpacing = 72 { $48 };
|
||||||
|
QStylePM_TabBarIconSize = 73 { $49 };
|
||||||
|
QStylePM_SizeGripSize = 74 { $4a };
|
||||||
|
QStylePM_DockWidgetTitleMargin = 75 { $4b };
|
||||||
|
QStylePM_MessageBoxIconSize = 76 { $4c };
|
||||||
|
QStylePM_ButtonIconSize = 77 { $4d };
|
||||||
|
QStylePM_DockWidgetTitleBarButtonMargin = 78 { $4e };
|
||||||
|
QStylePM_RadioButtonLabelSpacing = 79 { $4f };
|
||||||
|
QStylePM_LayoutLeftMargin = 80 { $50 };
|
||||||
|
QStylePM_LayoutTopMargin = 81 { $51 };
|
||||||
|
QStylePM_LayoutRightMargin = 82 { $52 };
|
||||||
|
QStylePM_LayoutBottomMargin = 83 { $53 };
|
||||||
|
QStylePM_LayoutHorizontalSpacing = 84 { $54 };
|
||||||
|
QStylePM_LayoutVerticalSpacing = 85 { $55 };
|
||||||
|
QStylePM_CustomBase = 4026531840 { $f0000000 };
|
||||||
|
|
||||||
type
|
type
|
||||||
QStyleStyleHint = cardinal; // QStyle::StyleHint (4)
|
QStyleStyleHint = cardinal; // QStyle::StyleHint (4)
|
||||||
|
|
||||||
@ -8238,6 +8519,11 @@ const
|
|||||||
QStyleSH_MessageBox_CenterButtons = 74 { $4a };
|
QStyleSH_MessageBox_CenterButtons = 74 { $4a };
|
||||||
QStyleSH_Menu_SelectionWrap = 75 { $4b };
|
QStyleSH_Menu_SelectionWrap = 75 { $4b };
|
||||||
QStyleSH_ItemView_MovementWithoutUpdatingSelection = 76 { $4c };
|
QStyleSH_ItemView_MovementWithoutUpdatingSelection = 76 { $4c };
|
||||||
|
QStyleSH_ToolTip_Mask = 77 { $4d };
|
||||||
|
QStyleSH_FocusFrame_AboveWidget = 78 { $4e };
|
||||||
|
QStyleSH_TextControl_FocusIndicatorTextCharFormat = 79 { $4f };
|
||||||
|
QStyleSH_WizardStyle = 80 { $50 };
|
||||||
|
QStyleSH_ItemView_ArrowKeysNavigateIntoChildren = 81 { $51 };
|
||||||
QStyleSH_CustomBase = 4026531840 { $f0000000 };
|
QStyleSH_CustomBase = 4026531840 { $f0000000 };
|
||||||
|
|
||||||
|
|
||||||
@ -8695,6 +8981,18 @@ type
|
|||||||
const
|
const
|
||||||
QStyleOptionToolButtonType = 983043 { $f0003 };
|
QStyleOptionToolButtonType = 983043 { $f0003 };
|
||||||
|
|
||||||
|
type
|
||||||
|
QStyleOptionToolButtonToolButtonFeature = cardinal; // QStyleOptionToolButton::ToolButtonFeature (4)
|
||||||
|
QStyleOptionToolButtonToolButtonFeatures = QStyleOptionToolButtonToolButtonFeature; // QFlags<>
|
||||||
|
|
||||||
|
const
|
||||||
|
QStyleOptionToolButtonNone = 0 { $0 };
|
||||||
|
QStyleOptionToolButtonArrow = 1 { $1 };
|
||||||
|
QStyleOptionToolButtonMenu = 4 { $4 };
|
||||||
|
QStyleOptionToolButtonMenuButtonPopup = 4 { $4 };
|
||||||
|
QStyleOptionToolButtonPopupDelay = 8 { $8 };
|
||||||
|
QStyleOptionToolButtonHasMenu = 16 { $10 };
|
||||||
|
|
||||||
type
|
type
|
||||||
QStyleOptionComboBoxStyleOptionType = cardinal; // QStyleOptionComboBox::StyleOptionType (4)
|
QStyleOptionComboBoxStyleOptionType = cardinal; // QStyleOptionComboBox::StyleOptionType (4)
|
||||||
|
|
||||||
@ -8737,6 +9035,12 @@ type
|
|||||||
const
|
const
|
||||||
QStyleHintReturnMaskType = 61441 { $f001 };
|
QStyleHintReturnMaskType = 61441 { $f001 };
|
||||||
|
|
||||||
|
type
|
||||||
|
QStyleHintReturnVariantStyleOptionType = cardinal; // QStyleHintReturnVariant::StyleOptionType (4)
|
||||||
|
|
||||||
|
const
|
||||||
|
QStyleHintReturnVariantType = 61442 { $f002 };
|
||||||
|
|
||||||
|
|
||||||
function QStyleOption_version(handle : QStyleOptionH) : Integer; cdecl; external QtIntf name 'QStyleOption_version';
|
function QStyleOption_version(handle : QStyleOptionH) : Integer; cdecl; external QtIntf name 'QStyleOption_version';
|
||||||
procedure QStyleOption_setVersion(handle : QStyleOptionH; version : Integer); cdecl; external QtIntf name 'QStyleOption_setVersion';
|
procedure QStyleOption_setVersion(handle : QStyleOptionH; version : Integer); cdecl; external QtIntf name 'QStyleOption_setVersion';
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -426,10 +426,13 @@ type
|
|||||||
protected
|
protected
|
||||||
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
||||||
public
|
public
|
||||||
|
FSelStart: Integer;
|
||||||
|
FSelLength: Integer;
|
||||||
function getMaxLength: Integer;
|
function getMaxLength: Integer;
|
||||||
function getSelectedText: WideString;
|
function getSelectedText: WideString;
|
||||||
function getSelectionStart: Integer;
|
function getSelectionStart: Integer;
|
||||||
function getText: WideString;
|
function getText: WideString;
|
||||||
|
function hasSelectedText: Boolean;
|
||||||
procedure setColor(const Value: PQColor); override;
|
procedure setColor(const Value: PQColor); override;
|
||||||
procedure setEchoMode(const AMode: QLineEditEchoMode);
|
procedure setEchoMode(const AMode: QLineEditEchoMode);
|
||||||
procedure setInputMask(const AMask: WideString);
|
procedure setInputMask(const AMask: WideString);
|
||||||
@ -512,6 +515,9 @@ type
|
|||||||
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
||||||
public
|
public
|
||||||
FList: TStrings;
|
FList: TStrings;
|
||||||
|
// used by WS class to store values if no selection
|
||||||
|
FSelStart: Integer;
|
||||||
|
FSelLength: Integer;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure SetColor(const Value: PQColor); override;
|
procedure SetColor(const Value: PQColor); override;
|
||||||
function currentIndex: Integer;
|
function currentIndex: Integer;
|
||||||
@ -548,6 +554,10 @@ type
|
|||||||
protected
|
protected
|
||||||
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
||||||
public
|
public
|
||||||
|
// used by WS class to store values if no selection
|
||||||
|
FSelStart: Integer;
|
||||||
|
FSelLength: Integer;
|
||||||
|
|
||||||
function getValue: single; virtual; abstract;
|
function getValue: single; virtual; abstract;
|
||||||
function getReadOnly: Boolean;
|
function getReadOnly: Boolean;
|
||||||
procedure setMinimum(const v: single); virtual; abstract;
|
procedure setMinimum(const v: single); virtual; abstract;
|
||||||
@ -2510,11 +2520,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtWidget.CreateWidget(const Params: TCreateParams): QWidgetH;
|
function TQtWidget.CreateWidget(const Params: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).Widget;
|
Widget := QWidget_create();
|
||||||
Widget := QWidget_create(Parent);
|
|
||||||
Result := Widget;
|
Result := Widget;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2696,7 +2703,6 @@ end;
|
|||||||
function TQtPushButton.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtPushButton.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
var
|
||||||
Str: WideString;
|
Str: WideString;
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
@ -2704,8 +2710,7 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
Str := UTF8Decode(LCLObject.Caption);
|
Str := UTF8Decode(LCLObject.Caption);
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QPushButton_create(@Str);
|
||||||
Result := QPushButton_create(@Str, Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -3049,8 +3054,6 @@ end;
|
|||||||
{ TQtStaticText }
|
{ TQtStaticText }
|
||||||
|
|
||||||
function TQtStaticText.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtStaticText.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
@ -3246,15 +3249,13 @@ end;
|
|||||||
|
|
||||||
function TQtGroupBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtGroupBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
var
|
||||||
Parent: QWidgetH;
|
|
||||||
Layout: QBoxLayoutH;
|
Layout: QBoxLayoutH;
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtGroupBox.Create ');
|
WriteLn('TQtGroupBox.Create ');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QGroupBox_create();
|
||||||
Result := QGroupBox_create(Parent);
|
|
||||||
FCentralWidget := QWidget_create(Result, 0);
|
FCentralWidget := QWidget_create(Result, 0);
|
||||||
Layout := QVBoxLayout_create(Result);
|
Layout := QVBoxLayout_create(Result);
|
||||||
QLayout_addWidget(Layout, FCentralWidget);
|
QLayout_addWidget(Layout, FCentralWidget);
|
||||||
@ -3287,15 +3288,12 @@ end;
|
|||||||
{ TQtFrame }
|
{ TQtFrame }
|
||||||
|
|
||||||
function TQtFrame.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtFrame.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtFrame.Create');
|
WriteLn('TQtFrame.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QFrame_create();
|
||||||
Result := QFrame_create(Parent);
|
|
||||||
QWidget_setAutoFillBackground(Result, True);
|
QWidget_setAutoFillBackground(Result, True);
|
||||||
QWidget_setAttribute(Result, QtWA_NoMousePropagation);
|
QWidget_setAttribute(Result, QtWA_NoMousePropagation);
|
||||||
end;
|
end;
|
||||||
@ -3354,22 +3352,16 @@ end;
|
|||||||
Returns: Nothing
|
Returns: Nothing
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TQtArrow.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
function TQtArrow.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtArrow.Create');
|
WriteLn('TQtArrow.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QFrame_create();
|
||||||
Result := QFrame_create(Parent);
|
|
||||||
QWidget_setAttribute(Result, QtWA_NoMousePropagation);
|
QWidget_setAttribute(Result, QtWA_NoMousePropagation);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtAbstractSlider.CreateWidget(const AParams: TCreateParams
|
function TQtAbstractSlider.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
): QWidgetH;
|
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
@ -3379,8 +3371,7 @@ begin
|
|||||||
FSliderPressed := False;
|
FSliderPressed := False;
|
||||||
FSliderReleased:= False;
|
FSliderReleased:= False;
|
||||||
|
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QAbstractSlider_create();
|
||||||
Result := QAbstractSlider_create(Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TQtAbstractSlider.AttachEvents;
|
procedure TQtAbstractSlider.AttachEvents;
|
||||||
@ -3652,15 +3643,12 @@ end;
|
|||||||
{ TQtScrollBar }
|
{ TQtScrollBar }
|
||||||
|
|
||||||
function TQtScrollBar.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtScrollBar.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtScrollBar.Create');
|
WriteLn('TQtScrollBar.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QScrollBar_create();
|
||||||
Result := QScrollBar_create(Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TQtScrollBar.AttachEvents;
|
procedure TQtScrollBar.AttachEvents;
|
||||||
@ -3687,43 +3675,34 @@ end;
|
|||||||
{ TQtToolBar }
|
{ TQtToolBar }
|
||||||
|
|
||||||
function TQtToolBar.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
function TQtToolBar.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtToolBar.Create');
|
WriteLn('TQtToolBar.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QToolBar_create();
|
||||||
Result := QToolBar_create(Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TQtToolButton }
|
{ TQtToolButton }
|
||||||
|
|
||||||
function TQtToolButton.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
function TQtToolButton.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtToolButton.Create');
|
WriteLn('TQtToolButton.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QToolButton_create();
|
||||||
Result := QToolButton_create(Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TQtTrackBar }
|
{ TQtTrackBar }
|
||||||
|
|
||||||
function TQtTrackBar.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtTrackBar.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtTrackBar.Create');
|
WriteLn('TQtTrackBar.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QSlider_create();
|
||||||
Result := QSlider_create(Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -3827,16 +3806,14 @@ end;
|
|||||||
|
|
||||||
function TQtLineEdit.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtLineEdit.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
var
|
||||||
Parent: QWidgetH;
|
|
||||||
Str: WideString;
|
Str: WideString;
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtLineEdit.Create');
|
WriteLn('TQtLineEdit.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
|
||||||
Str := UTF8Decode((LCLObject as TCustomEdit).Text);
|
Str := UTF8Decode((LCLObject as TCustomEdit).Text);
|
||||||
Result := QLineEdit_create(@Str, Parent);
|
Result := QLineEdit_create(@Str);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtLineEdit.getMaxLength: Integer;
|
function TQtLineEdit.getMaxLength: Integer;
|
||||||
@ -3859,6 +3836,11 @@ begin
|
|||||||
QLineEdit_text(QLineEditH(Widget), @Result);
|
QLineEdit_text(QLineEditH(Widget), @Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TQtLineEdit.hasSelectedText: Boolean;
|
||||||
|
begin
|
||||||
|
Result := QLineEdit_hasSelectedText(QLineEditH(Widget));
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TQtLineEdit.AttachEvents;
|
procedure TQtLineEdit.AttachEvents;
|
||||||
var
|
var
|
||||||
Method: TMethod;
|
Method: TMethod;
|
||||||
@ -3948,6 +3930,8 @@ end;
|
|||||||
|
|
||||||
procedure TQtLineEdit.setSelection(const AStart, ALength: Integer);
|
procedure TQtLineEdit.setSelection(const AStart, ALength: Integer);
|
||||||
begin
|
begin
|
||||||
|
FSelStart := AStart;
|
||||||
|
FSelLength := ALength;
|
||||||
if AStart >= 0 then
|
if AStart >= 0 then
|
||||||
QLineEdit_setSelection(QLineEditH(Widget), AStart, ALength);
|
QLineEdit_setSelection(QLineEditH(Widget), AStart, ALength);
|
||||||
end;
|
end;
|
||||||
@ -3976,8 +3960,6 @@ end;
|
|||||||
{ TQtTextEdit }
|
{ TQtTextEdit }
|
||||||
|
|
||||||
function TQtTextEdit.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtTextEdit.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
@ -4133,15 +4115,12 @@ end;
|
|||||||
{ TQtTabWidget }
|
{ TQtTabWidget }
|
||||||
|
|
||||||
function TQtTabWidget.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtTabWidget.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtTabWidget.Create');
|
WriteLn('TQtTabWidget.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QTabWidget_create();
|
||||||
Result := QTabWidget_create(Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TQtTabWidget.AttachEvents;
|
procedure TQtTabWidget.AttachEvents;
|
||||||
@ -4274,15 +4253,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtComboBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtComboBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtComboBox.Create');
|
WriteLn('TQtComboBox.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QComboBox_create();
|
||||||
Result := QComboBox_create(Parent);
|
|
||||||
FLineEdit := nil;
|
FLineEdit := nil;
|
||||||
FOwnerDrawn := False;
|
FOwnerDrawn := False;
|
||||||
end;
|
end;
|
||||||
@ -4479,20 +4455,18 @@ end;
|
|||||||
|
|
||||||
function TQtAbstractSpinBox.GetLineEdit: QLineEditH;
|
function TQtAbstractSpinBox.GetLineEdit: QLineEditH;
|
||||||
begin
|
begin
|
||||||
// :( bindings has no QAbstractSpinBox_lineEdit(...)
|
if FLineEdit = nil then
|
||||||
Result := nil;
|
FLineEdit := QLCLAbstractSpinBox_lineEditHandle(QAbstractSpinBoxH(Widget));
|
||||||
|
Result := FLineEdit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtAbstractSpinBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtAbstractSpinBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtAbstractSpinBox.Create');
|
WriteLn('TQtAbstractSpinBox.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QAbstractSpinBox_create();
|
||||||
Result := QAbstractSpinBox_create(Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtAbstractSpinBox.getReadOnly: Boolean;
|
function TQtAbstractSpinBox.getReadOnly: Boolean;
|
||||||
@ -4551,15 +4525,12 @@ end;
|
|||||||
{ TQtFloatSpinBox }
|
{ TQtFloatSpinBox }
|
||||||
|
|
||||||
function TQtFloatSpinBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtFloatSpinBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtFloatSpinBox.Create');
|
WriteLn('TQtFloatSpinBox.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QDoubleSpinBox_create();
|
||||||
Result := QDoubleSpinBox_create(Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtFloatSpinBox.getValue: single;
|
function TQtFloatSpinBox.getValue: single;
|
||||||
@ -4620,15 +4591,12 @@ end;
|
|||||||
{ TQtSpinBox }
|
{ TQtSpinBox }
|
||||||
|
|
||||||
function TQtSpinBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtSpinBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtSpinBox.Create');
|
WriteLn('TQtSpinBox.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QSpinBox_create();
|
||||||
Result := QSpinBox_create(Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtSpinBox.getValue: single;
|
function TQtSpinBox.getValue: single;
|
||||||
@ -4683,7 +4651,6 @@ end;
|
|||||||
|
|
||||||
function TQtListWidget.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtListWidget.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
var
|
||||||
Parent: QWidgetH;
|
|
||||||
Text: WideString;
|
Text: WideString;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
@ -4691,8 +4658,7 @@ begin
|
|||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQListWidget.Create');
|
WriteLn('TQListWidget.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QListWidget_create();
|
||||||
Result := QListWidget_create(Parent);
|
|
||||||
|
|
||||||
// Sets the initial items
|
// Sets the initial items
|
||||||
for I := 0 to TCustomListBox(LCLObject).Items.Count - 1 do
|
for I := 0 to TCustomListBox(LCLObject).Items.Count - 1 do
|
||||||
@ -4907,15 +4873,12 @@ end;
|
|||||||
Returns: Widget (QHeaderViewH)
|
Returns: Widget (QHeaderViewH)
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TQtHeaderView.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
function TQtHeaderView.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtHeaderView.Create');
|
WriteLn('TQtHeaderView.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QHeaderView_create(QtHorizontal);
|
||||||
Result := QHeaderView_create(QtHorizontal, Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TQtHeaderView.AttachEvents;
|
procedure TQtHeaderView.AttachEvents;
|
||||||
@ -4969,15 +4932,12 @@ end;
|
|||||||
Returns: Widget (QTreeViewH)
|
Returns: Widget (QTreeViewH)
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TQtTreeView.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
function TQtTreeView.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtTreeView.Create');
|
WriteLn('TQtTreeView.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QTreeView_create();
|
||||||
Result := QTreeView_create(Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TQtTreeWidget }
|
{ TQtTreeWidget }
|
||||||
@ -4988,15 +4948,12 @@ end;
|
|||||||
Returns: Widget (QTreeWidgetH)
|
Returns: Widget (QTreeWidgetH)
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TQtTreeWidget.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
function TQtTreeWidget.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtTreeWidget.Create');
|
WriteLn('TQtTreeWidget.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QTreeWidget_create();
|
||||||
Result := QTreeWidget_create(Parent);
|
|
||||||
|
|
||||||
Header := TQtHeaderView.Create(LCLObject, AParams);
|
Header := TQtHeaderView.Create(LCLObject, AParams);
|
||||||
Header.AttachEvents;
|
Header.AttachEvents;
|
||||||
@ -5592,15 +5549,12 @@ end;
|
|||||||
{ TQtProgressBar }
|
{ TQtProgressBar }
|
||||||
|
|
||||||
function TQtProgressBar.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtProgressBar.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQProgressBar.Create');
|
WriteLn('TQProgressBar.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QProgressBar_create();
|
||||||
Result := QProgressBar_create(Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TQtProgressBar.AttachEvents;
|
procedure TQtProgressBar.AttachEvents;
|
||||||
@ -5667,8 +5621,6 @@ end;
|
|||||||
{ TQtStatusBar }
|
{ TQtStatusBar }
|
||||||
|
|
||||||
function TQtStatusBar.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtStatusBar.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
@ -5676,8 +5628,7 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
SetLength(APanels, 0);
|
SetLength(APanels, 0);
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QStatusBar_create();
|
||||||
Result := QStatusBar_create(Parent);
|
|
||||||
|
|
||||||
{TODO: this should be made in initializeWND?
|
{TODO: this should be made in initializeWND?
|
||||||
if (LCLObject as TStatusBar).SimplePanel then
|
if (LCLObject as TStatusBar).SimplePanel then
|
||||||
@ -5713,16 +5664,13 @@ end;
|
|||||||
Returns: Nothing
|
Returns: Nothing
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TQtAbstractScrollArea.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
function TQtAbstractScrollArea.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtAbstractScrollArea.Create');
|
WriteLn('TQtAbstractScrollArea.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
FViewPortWidget := NiL;
|
FViewPortWidget := NiL;
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QScrollArea_create();
|
||||||
Result := QScrollArea_create(Parent);
|
|
||||||
QWidget_setAttribute(Result, QtWA_NoMousePropagation);
|
QWidget_setAttribute(Result, QtWA_NoMousePropagation);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -5973,15 +5921,12 @@ end;
|
|||||||
Returns: Nothing
|
Returns: Nothing
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TQtCalendar.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
function TQtCalendar.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||||
var
|
|
||||||
Parent: QWidgetH;
|
|
||||||
begin
|
begin
|
||||||
// Creates the widget
|
// Creates the widget
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
WriteLn('TQtCalendar.Create');
|
WriteLn('TQtCalendar.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
Result := QCalendarWidget_create();
|
||||||
Result := QCalendarWidget_create(Parent);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TQtCalendar.AttachEvents;
|
procedure TQtCalendar.AttachEvents;
|
||||||
|
@ -58,7 +58,7 @@ type
|
|||||||
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
|
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
|
||||||
class function GetValue(const ACustomFloatSpinEdit: TCustomFloatSpinEdit): single; override;
|
class function GetValue(const ACustomFloatSpinEdit: TCustomFloatSpinEdit): single; override;
|
||||||
|
|
||||||
class procedure SetCharCase(const ACustomEdit: TCustomEdit; NewCase: TEditCharCase); override;
|
class procedure SetEchoMode(const ACustomEdit: TCustomEdit; NewMode: TEchoMode); override;
|
||||||
class procedure SetReadOnly(const ACustomEdit: TCustomEdit; NewReadOnly: boolean); override;
|
class procedure SetReadOnly(const ACustomEdit: TCustomEdit; NewReadOnly: boolean); override;
|
||||||
class procedure SetSelLength(const ACustomEdit: TCustomEdit; NewLength: integer); override;
|
class procedure SetSelLength(const ACustomEdit: TCustomEdit; NewLength: integer); override;
|
||||||
class procedure SetSelStart(const ACustomEdit: TCustomEdit; NewStart: integer); override;
|
class procedure SetSelStart(const ACustomEdit: TCustomEdit; NewStart: integer); override;
|
||||||
@ -128,10 +128,17 @@ begin
|
|||||||
Result := TQtAbstractSpinBox(ACustomFloatSpinEdit.Handle).getValue;
|
Result := TQtAbstractSpinBox(ACustomFloatSpinEdit.Handle).getValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TQtWSCustomFloatSpinEdit.SetCharCase(
|
class procedure TQtWSCustomFloatSpinEdit.SetEchoMode(
|
||||||
const ACustomEdit: TCustomEdit; NewCase: TEditCharCase);
|
const ACustomEdit: TCustomEdit; NewMode: TEchoMode);
|
||||||
|
var
|
||||||
|
LineEdit: QLineEditH;
|
||||||
begin
|
begin
|
||||||
{$note implement}
|
if not WSCheckHandleAllocated(ACustomEdit, 'SetEchoMode') then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
LineEdit := TQtAbstractSpinBox(ACustomEdit.Handle).LineEdit;
|
||||||
|
if (LineEdit <> nil) then
|
||||||
|
QLineEdit_setEchoMode(LineEdit, QLineEditEchoMode(Ord(NewMode)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TQtWSCustomFloatSpinEdit.UpdateControl(const ACustomFloatSpinEdit: TCustomFloatSpinEdit);
|
class procedure TQtWSCustomFloatSpinEdit.UpdateControl(const ACustomFloatSpinEdit: TCustomFloatSpinEdit);
|
||||||
@ -151,28 +158,57 @@ end;
|
|||||||
|
|
||||||
class function TQtWSCustomFloatSpinEdit.GetSelStart(
|
class function TQtWSCustomFloatSpinEdit.GetSelStart(
|
||||||
const ACustomEdit: TCustomEdit): integer;
|
const ACustomEdit: TCustomEdit): integer;
|
||||||
|
var
|
||||||
|
LineEdit: QLineEditH;
|
||||||
begin
|
begin
|
||||||
{$note implement}
|
LineEdit := TQtAbstractSpinBox(ACustomEdit.Handle).LineEdit;
|
||||||
Result := 0;
|
if (LineEdit <> nil) and QLineEdit_hasSelectedText(LineEdit) then
|
||||||
|
Result := QLineEdit_selectionStart(LineEdit)
|
||||||
|
else
|
||||||
|
Result := TQtAbstractSpinBox(ACustomEdit.Handle).FSelStart;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TQtWSCustomFloatSpinEdit.GetSelLength(
|
class function TQtWSCustomFloatSpinEdit.GetSelLength(
|
||||||
const ACustomEdit: TCustomEdit): integer;
|
const ACustomEdit: TCustomEdit): integer;
|
||||||
|
var
|
||||||
|
LineEdit: QLineEditH;
|
||||||
|
W: WideString;
|
||||||
begin
|
begin
|
||||||
{$note implement}
|
LineEdit := TQtAbstractSpinBox(ACustomEdit.Handle).LineEdit;
|
||||||
Result := 0;
|
if (LineEdit <> nil) and QLineEdit_hasSelectedText(LineEdit) then
|
||||||
|
begin
|
||||||
|
QLineEdit_selectedText(LineEdit, @W);
|
||||||
|
Result := Length(W);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := TQtAbstractSpinBox(ACustomEdit.Handle).FSelLength;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TQtWSCustomFloatSpinEdit.GetText(const AWinControl: TWinControl; var AText: String): Boolean;
|
class function TQtWSCustomFloatSpinEdit.GetText(const AWinControl: TWinControl; var AText: String): Boolean;
|
||||||
|
var
|
||||||
|
LineEdit: QLineEditH;
|
||||||
|
W: WideString;
|
||||||
begin
|
begin
|
||||||
{$note implement}
|
LineEdit := TQtAbstractSpinBox(AWinControl.Handle).LineEdit;
|
||||||
Result := True;
|
Result := LineEdit <> nil;
|
||||||
|
if Result then
|
||||||
|
begin
|
||||||
|
QLineEdit_text(LineEdit, @W);
|
||||||
|
AText := W;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
AText := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TQtWSCustomFloatSpinEdit.SetText(const AWinControl: TWinControl; const AText: string);
|
class procedure TQtWSCustomFloatSpinEdit.SetText(const AWinControl: TWinControl; const AText: string);
|
||||||
|
var
|
||||||
|
LineEdit: QLineEditH;
|
||||||
|
W: WideString;
|
||||||
begin
|
begin
|
||||||
// perhaps QSpinBox_setSuffix() goes here one day (if we get LCL support)
|
LineEdit := TQtAbstractSpinBox(AWinControl.Handle).LineEdit;
|
||||||
{$note implement}
|
W := AText;
|
||||||
|
if (LineEdit <> nil) then
|
||||||
|
QLineEdit_setText(LineEdit, @W)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TQtWSCustomFloatSpinEdit.SetReadOnly(const ACustomEdit: TCustomEdit; NewReadOnly: boolean);
|
class procedure TQtWSCustomFloatSpinEdit.SetReadOnly(const ACustomEdit: TCustomEdit; NewReadOnly: boolean);
|
||||||
@ -182,14 +218,32 @@ end;
|
|||||||
|
|
||||||
class procedure TQtWSCustomFloatSpinEdit.SetSelLength(
|
class procedure TQtWSCustomFloatSpinEdit.SetSelLength(
|
||||||
const ACustomEdit: TCustomEdit; NewLength: integer);
|
const ACustomEdit: TCustomEdit; NewLength: integer);
|
||||||
|
var
|
||||||
|
LineEdit: QLineEditH;
|
||||||
|
AStart: Integer;
|
||||||
begin
|
begin
|
||||||
{$note implement}
|
TQtAbstractSpinBox(ACustomEdit.Handle).FSelLength := NewLength;
|
||||||
|
LineEdit := TQtAbstractSpinBox(ACustomEdit.Handle).LineEdit;
|
||||||
|
if LineEdit <> nil then
|
||||||
|
begin
|
||||||
|
AStart := GetSelStart(ACustomEdit);
|
||||||
|
QLineEdit_setSelection(LineEdit, AStart, NewLength);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TQtWSCustomFloatSpinEdit.SetSelStart(
|
class procedure TQtWSCustomFloatSpinEdit.SetSelStart(
|
||||||
const ACustomEdit: TCustomEdit; NewStart: integer);
|
const ACustomEdit: TCustomEdit; NewStart: integer);
|
||||||
|
var
|
||||||
|
LineEdit: QLineEditH;
|
||||||
|
ALength: Integer;
|
||||||
begin
|
begin
|
||||||
{$note implement}
|
TQtAbstractSpinBox(ACustomEdit.Handle).FSelStart := NewStart;
|
||||||
|
LineEdit := TQtAbstractSpinBox(ACustomEdit.Handle).LineEdit;
|
||||||
|
if LineEdit <> nil then
|
||||||
|
begin
|
||||||
|
ALength := GetSelLength(ACustomEdit);
|
||||||
|
QLineEdit_setSelection(LineEdit, NewStart, ALength);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -188,6 +188,7 @@ type
|
|||||||
class procedure SetWantTabs(const ACustomMemo: TCustomMemo; const NewWantTabs: boolean); override;
|
class procedure SetWantTabs(const ACustomMemo: TCustomMemo; const NewWantTabs: boolean); override;
|
||||||
class procedure SetWordWrap(const ACustomMemo: TCustomMemo; const NewWordWrap: boolean); override;
|
class procedure SetWordWrap(const ACustomMemo: TCustomMemo; const NewWordWrap: boolean); override;
|
||||||
public
|
public
|
||||||
|
class procedure SetEchoMode(const ACustomEdit: TCustomEdit; NewMode: TEchoMode); override;
|
||||||
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
|
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
|
||||||
class procedure SetText(const AWinControl: TWinControl; const AText: string); override;
|
class procedure SetText(const AWinControl: TWinControl; const AText: string); override;
|
||||||
class function GetSelStart(const ACustomEdit: TCustomEdit): integer; override;
|
class function GetSelStart(const ACustomEdit: TCustomEdit): integer; override;
|
||||||
@ -767,6 +768,12 @@ begin
|
|||||||
TQtTextEdit(ACustomMemo.Handle).setLineWrapMode(WordWrapMap[NewWordWrap]);
|
TQtTextEdit(ACustomMemo.Handle).setLineWrapMode(WordWrapMap[NewWordWrap]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TQtWSCustomMemo.SetEchoMode(const ACustomEdit: TCustomEdit;
|
||||||
|
NewMode: TEchoMode);
|
||||||
|
begin
|
||||||
|
{$note implement}
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TQtWSCustomMemo.GetText
|
Method: TQtWSCustomMemo.GetText
|
||||||
Params:
|
Params:
|
||||||
@ -868,6 +875,9 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
class procedure TQtWSCustomEdit.SetEchoMode(const ACustomEdit: TCustomEdit; NewMode: TEchoMode);
|
class procedure TQtWSCustomEdit.SetEchoMode(const ACustomEdit: TCustomEdit; NewMode: TEchoMode);
|
||||||
begin
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ACustomEdit, 'SetEchoMode') then
|
||||||
|
Exit;
|
||||||
|
|
||||||
TQtLineEdit(ACustomEdit.Handle).setEchoMode(QLineEditEchoMode(Ord(NewMode)));
|
TQtLineEdit(ACustomEdit.Handle).setEchoMode(QLineEditEchoMode(Ord(NewMode)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -909,16 +919,29 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
class function TQtWSCustomEdit.GetSelStart(const ACustomEdit: TCustomEdit): integer;
|
class function TQtWSCustomEdit.GetSelStart(const ACustomEdit: TCustomEdit): integer;
|
||||||
|
var
|
||||||
|
LineEdit: TQtLineEdit;
|
||||||
begin
|
begin
|
||||||
Result := TQtLineEdit(ACustomEdit.Handle).getSelectionStart;
|
LineEdit := TQtLineEdit(ACustomEdit.Handle);
|
||||||
|
if LineEdit.hasSelectedText then
|
||||||
|
Result := LineEdit.getSelectionStart
|
||||||
|
else
|
||||||
|
Result := LineEdit.FSelStart;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TQtWSCustomEdit.GetSelLength(const ACustomEdit: TCustomEdit): integer;
|
class function TQtWSCustomEdit.GetSelLength(const ACustomEdit: TCustomEdit): integer;
|
||||||
var
|
var
|
||||||
|
LineEdit: TQtLineEdit;
|
||||||
W: WideString;
|
W: WideString;
|
||||||
begin
|
begin
|
||||||
W := TQtLineEdit(ACustomEdit.Handle).getSelectedText;
|
LineEdit := TQtLineEdit(ACustomEdit.Handle);
|
||||||
Result := Length(W);
|
if LineEdit.hasSelectedText then
|
||||||
|
begin
|
||||||
|
W := TQtLineEdit(ACustomEdit.Handle).getSelectedText;
|
||||||
|
Result := Length(W);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := LineEdit.FSelLength;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TQtWSCustomEdit.SetSelStart(const ACustomEdit: TCustomEdit;
|
class procedure TQtWSCustomEdit.SetSelStart(const ACustomEdit: TCustomEdit;
|
||||||
@ -1398,7 +1421,7 @@ begin
|
|||||||
if (LineEdit <> nil) and QLineEdit_hasSelectedText(LineEdit) then
|
if (LineEdit <> nil) and QLineEdit_hasSelectedText(LineEdit) then
|
||||||
Result := QLineEdit_selectionStart(LineEdit)
|
Result := QLineEdit_selectionStart(LineEdit)
|
||||||
else
|
else
|
||||||
Result := 0;
|
Result := TQtComboBox(ACustomComboBox.Handle).FSelStart;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TQtWSCustomComboBox.GetSelLength(
|
class function TQtWSCustomComboBox.GetSelLength(
|
||||||
@ -1414,7 +1437,7 @@ begin
|
|||||||
Result := Length(W);
|
Result := Length(W);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Result := 0;
|
Result := TQtComboBox(ACustomComboBox.Handle).FSelLength;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -1462,6 +1485,7 @@ var
|
|||||||
LineEdit: QLineEditH;
|
LineEdit: QLineEditH;
|
||||||
ALength: Integer;
|
ALength: Integer;
|
||||||
begin
|
begin
|
||||||
|
TQtComboBox(ACustomComboBox.Handle).FSelStart := NewStart;
|
||||||
LineEdit := TQtComboBox(ACustomComboBox.Handle).LineEdit;
|
LineEdit := TQtComboBox(ACustomComboBox.Handle).LineEdit;
|
||||||
if LineEdit <> nil then
|
if LineEdit <> nil then
|
||||||
begin
|
begin
|
||||||
@ -1476,6 +1500,7 @@ var
|
|||||||
LineEdit: QLineEditH;
|
LineEdit: QLineEditH;
|
||||||
AStart: Integer;
|
AStart: Integer;
|
||||||
begin
|
begin
|
||||||
|
TQtComboBox(ACustomComboBox.Handle).FSelLength := NewLength;
|
||||||
LineEdit := TQtComboBox(ACustomComboBox.Handle).LineEdit;
|
LineEdit := TQtComboBox(ACustomComboBox.Handle).LineEdit;
|
||||||
if LineEdit <> nil then
|
if LineEdit <> nil then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user