mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 09:56:12 +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;
|
||||
|
||||
{ Version : 1.48 }
|
||||
{ Version : 1.49 }
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}
|
||||
@ -266,6 +266,7 @@ QObjectH = class(TObject) end;
|
||||
QScrollBarH = class(QAbstractSliderH) end;
|
||||
QSliderH = class(QAbstractSliderH) end;
|
||||
QAbstractSpinBoxH = class(QWidgetH) end;
|
||||
QLCLAbstractSpinBoxH = class(QAbstractSpinBoxH) end;
|
||||
QDoubleSpinBoxH = class(QAbstractSpinBoxH) end;
|
||||
QSpinBoxH = class(QAbstractSpinBoxH) end;
|
||||
QCalendarWidgetH = class(QWidgetH) end;
|
||||
@ -869,6 +870,7 @@ const
|
||||
QtWA_Moved = 43 { $2b };
|
||||
QtWA_PendingUpdate = 44 { $2c };
|
||||
QtWA_InvalidSize = 45 { $2d };
|
||||
QtWA_MacBrushedMetal = 46 { $2e };
|
||||
QtWA_MacMetalStyle = 46 { $2e };
|
||||
QtWA_CustomWhatsThis = 47 { $2f };
|
||||
QtWA_LayoutOnEntireRect = 48 { $30 };
|
||||
@ -910,7 +912,18 @@ const
|
||||
QtWA_AlwaysShowToolTips = 84 { $54 };
|
||||
QtWA_MacOpaqueSizeGrip = 85 { $55 };
|
||||
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
|
||||
QtKey = cardinal; // Qt::Key (4)
|
||||
@ -1311,6 +1324,14 @@ const
|
||||
QtTextEditorInteraction = 19 { $13 };
|
||||
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';
|
||||
@ -1476,6 +1497,147 @@ type
|
||||
QEventUser = 1000,
|
||||
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';
|
||||
procedure QEvent_destroy(handle: QEventH); cdecl; external QtIntf name 'QEvent_destroy';
|
||||
function QEvent_type(handle: QEventH): QEventType; cdecl; external QtIntf name 'QEvent_type';
|
||||
@ -1658,7 +1820,8 @@ const
|
||||
QVariantTextLength = 78 { $4e };
|
||||
QVariantTextFormat = 79 { $4f };
|
||||
QVariantMatrix = 80 { $50 };
|
||||
QVariantLastGuiType = 80 { $50 };
|
||||
QVariantTransform = 81 { $51 };
|
||||
QVariantLastGuiType = 81 { $51 };
|
||||
QVariantUserType = 127 { $7f };
|
||||
QVariantLastType = 4294967295 { $ffffffff };
|
||||
|
||||
@ -2400,6 +2563,7 @@ const
|
||||
QLocaleNauruLanguage = 83 { $53 };
|
||||
QLocaleNepali = 84 { $54 };
|
||||
QLocaleNorwegian = 85 { $55 };
|
||||
QLocaleNorwegianBokmal = 85 { $55 };
|
||||
QLocaleOccitan = 86 { $56 };
|
||||
QLocaleOriya = 87 { $57 };
|
||||
QLocalePashto = 88 { $58 };
|
||||
@ -2455,12 +2619,33 @@ const
|
||||
QLocaleYoruba = 138 { $8a };
|
||||
QLocaleZhuang = 139 { $8b };
|
||||
QLocaleZulu = 140 { $8c };
|
||||
QLocaleNorwegianNynorsk = 141 { $8d };
|
||||
QLocaleNynorsk = 141 { $8d };
|
||||
QLocaleBosnian = 142 { $8e };
|
||||
QLocaleDivehi = 143 { $8f };
|
||||
QLocaleManx = 144 { $90 };
|
||||
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
|
||||
QLocaleCountry = cardinal; // QLocale::Country (4)
|
||||
@ -6100,6 +6285,8 @@ type
|
||||
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';
|
||||
procedure QSpinBox_destroy(handle: QSpinBoxH); cdecl; external QtIntf name 'QSpinBox_destroy';
|
||||
function QSpinBox_value(handle: QSpinBoxH): Integer; cdecl; external QtIntf name 'QSpinBox_value';
|
||||
@ -8156,6 +8343,100 @@ type
|
||||
QStyleSP_ArrowForward,
|
||||
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
|
||||
QStyleStyleHint = cardinal; // QStyle::StyleHint (4)
|
||||
|
||||
@ -8238,6 +8519,11 @@ const
|
||||
QStyleSH_MessageBox_CenterButtons = 74 { $4a };
|
||||
QStyleSH_Menu_SelectionWrap = 75 { $4b };
|
||||
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 };
|
||||
|
||||
|
||||
@ -8695,6 +8981,18 @@ type
|
||||
const
|
||||
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
|
||||
QStyleOptionComboBoxStyleOptionType = cardinal; // QStyleOptionComboBox::StyleOptionType (4)
|
||||
|
||||
@ -8737,6 +9035,12 @@ type
|
||||
const
|
||||
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';
|
||||
procedure QStyleOption_setVersion(handle : QStyleOptionH; version : Integer); cdecl; external QtIntf name 'QStyleOption_setVersion';
|
||||
|
@ -1,6 +1,6 @@
|
||||
unit qt43;
|
||||
|
||||
{ Version : 1.48 }
|
||||
{ Version : 1.49 }
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}
|
||||
@ -269,6 +269,7 @@ QObjectH = class(TObject) end;
|
||||
QScrollBarH = class(QAbstractSliderH) end;
|
||||
QSliderH = class(QAbstractSliderH) end;
|
||||
QAbstractSpinBoxH = class(QWidgetH) end;
|
||||
QLCLAbstractSpinBoxH = class(QAbstractSpinBoxH) end;
|
||||
QDoubleSpinBoxH = class(QAbstractSpinBoxH) end;
|
||||
QSpinBoxH = class(QAbstractSpinBoxH) end;
|
||||
QCalendarWidgetH = class(QWidgetH) end;
|
||||
@ -6405,6 +6406,8 @@ type
|
||||
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';
|
||||
procedure QSpinBox_destroy(handle: QSpinBoxH); cdecl; external QtIntf name 'QSpinBox_destroy';
|
||||
function QSpinBox_value(handle: QSpinBoxH): Integer; cdecl; external QtIntf name 'QSpinBox_value';
|
||||
|
@ -426,10 +426,13 @@ type
|
||||
protected
|
||||
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
||||
public
|
||||
FSelStart: Integer;
|
||||
FSelLength: Integer;
|
||||
function getMaxLength: Integer;
|
||||
function getSelectedText: WideString;
|
||||
function getSelectionStart: Integer;
|
||||
function getText: WideString;
|
||||
function hasSelectedText: Boolean;
|
||||
procedure setColor(const Value: PQColor); override;
|
||||
procedure setEchoMode(const AMode: QLineEditEchoMode);
|
||||
procedure setInputMask(const AMask: WideString);
|
||||
@ -512,6 +515,9 @@ type
|
||||
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
||||
public
|
||||
FList: TStrings;
|
||||
// used by WS class to store values if no selection
|
||||
FSelStart: Integer;
|
||||
FSelLength: Integer;
|
||||
destructor Destroy; override;
|
||||
procedure SetColor(const Value: PQColor); override;
|
||||
function currentIndex: Integer;
|
||||
@ -548,6 +554,10 @@ type
|
||||
protected
|
||||
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
||||
public
|
||||
// used by WS class to store values if no selection
|
||||
FSelStart: Integer;
|
||||
FSelLength: Integer;
|
||||
|
||||
function getValue: single; virtual; abstract;
|
||||
function getReadOnly: Boolean;
|
||||
procedure setMinimum(const v: single); virtual; abstract;
|
||||
@ -2510,11 +2520,8 @@ begin
|
||||
end;
|
||||
|
||||
function TQtWidget.CreateWidget(const Params: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).Widget;
|
||||
Widget := QWidget_create(Parent);
|
||||
Widget := QWidget_create();
|
||||
Result := Widget;
|
||||
end;
|
||||
|
||||
@ -2696,7 +2703,6 @@ end;
|
||||
function TQtPushButton.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Str: WideString;
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
@ -2704,8 +2710,7 @@ begin
|
||||
{$endif}
|
||||
|
||||
Str := UTF8Decode(LCLObject.Caption);
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QPushButton_create(@Str, Parent);
|
||||
Result := QPushButton_create(@Str);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -3049,8 +3054,6 @@ end;
|
||||
{ TQtStaticText }
|
||||
|
||||
function TQtStaticText.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
@ -3246,15 +3249,13 @@ end;
|
||||
|
||||
function TQtGroupBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
Layout: QBoxLayoutH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtGroupBox.Create ');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QGroupBox_create(Parent);
|
||||
Result := QGroupBox_create();
|
||||
FCentralWidget := QWidget_create(Result, 0);
|
||||
Layout := QVBoxLayout_create(Result);
|
||||
QLayout_addWidget(Layout, FCentralWidget);
|
||||
@ -3287,15 +3288,12 @@ end;
|
||||
{ TQtFrame }
|
||||
|
||||
function TQtFrame.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtFrame.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QFrame_create(Parent);
|
||||
Result := QFrame_create();
|
||||
QWidget_setAutoFillBackground(Result, True);
|
||||
QWidget_setAttribute(Result, QtWA_NoMousePropagation);
|
||||
end;
|
||||
@ -3354,22 +3352,16 @@ end;
|
||||
Returns: Nothing
|
||||
------------------------------------------------------------------------------}
|
||||
function TQtArrow.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtArrow.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QFrame_create(Parent);
|
||||
Result := QFrame_create();
|
||||
QWidget_setAttribute(Result, QtWA_NoMousePropagation);
|
||||
end;
|
||||
|
||||
function TQtAbstractSlider.CreateWidget(const AParams: TCreateParams
|
||||
): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
function TQtAbstractSlider.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
@ -3379,8 +3371,7 @@ begin
|
||||
FSliderPressed := False;
|
||||
FSliderReleased:= False;
|
||||
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QAbstractSlider_create(Parent);
|
||||
Result := QAbstractSlider_create();
|
||||
end;
|
||||
|
||||
procedure TQtAbstractSlider.AttachEvents;
|
||||
@ -3652,15 +3643,12 @@ end;
|
||||
{ TQtScrollBar }
|
||||
|
||||
function TQtScrollBar.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtScrollBar.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QScrollBar_create(Parent);
|
||||
Result := QScrollBar_create();
|
||||
end;
|
||||
|
||||
procedure TQtScrollBar.AttachEvents;
|
||||
@ -3687,43 +3675,34 @@ end;
|
||||
{ TQtToolBar }
|
||||
|
||||
function TQtToolBar.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtToolBar.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QToolBar_create(Parent);
|
||||
Result := QToolBar_create();
|
||||
end;
|
||||
|
||||
{ TQtToolButton }
|
||||
|
||||
function TQtToolButton.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtToolButton.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QToolButton_create(Parent);
|
||||
Result := QToolButton_create();
|
||||
end;
|
||||
|
||||
{ TQtTrackBar }
|
||||
|
||||
function TQtTrackBar.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtTrackBar.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QSlider_create(Parent);
|
||||
Result := QSlider_create();
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -3827,16 +3806,14 @@ end;
|
||||
|
||||
function TQtLineEdit.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
Str: WideString;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtLineEdit.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Str := UTF8Decode((LCLObject as TCustomEdit).Text);
|
||||
Result := QLineEdit_create(@Str, Parent);
|
||||
Result := QLineEdit_create(@Str);
|
||||
end;
|
||||
|
||||
function TQtLineEdit.getMaxLength: Integer;
|
||||
@ -3859,6 +3836,11 @@ begin
|
||||
QLineEdit_text(QLineEditH(Widget), @Result);
|
||||
end;
|
||||
|
||||
function TQtLineEdit.hasSelectedText: Boolean;
|
||||
begin
|
||||
Result := QLineEdit_hasSelectedText(QLineEditH(Widget));
|
||||
end;
|
||||
|
||||
procedure TQtLineEdit.AttachEvents;
|
||||
var
|
||||
Method: TMethod;
|
||||
@ -3948,6 +3930,8 @@ end;
|
||||
|
||||
procedure TQtLineEdit.setSelection(const AStart, ALength: Integer);
|
||||
begin
|
||||
FSelStart := AStart;
|
||||
FSelLength := ALength;
|
||||
if AStart >= 0 then
|
||||
QLineEdit_setSelection(QLineEditH(Widget), AStart, ALength);
|
||||
end;
|
||||
@ -3976,8 +3960,6 @@ end;
|
||||
{ TQtTextEdit }
|
||||
|
||||
function TQtTextEdit.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
@ -4133,15 +4115,12 @@ end;
|
||||
{ TQtTabWidget }
|
||||
|
||||
function TQtTabWidget.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtTabWidget.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QTabWidget_create(Parent);
|
||||
Result := QTabWidget_create();
|
||||
end;
|
||||
|
||||
procedure TQtTabWidget.AttachEvents;
|
||||
@ -4274,15 +4253,12 @@ begin
|
||||
end;
|
||||
|
||||
function TQtComboBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtComboBox.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QComboBox_create(Parent);
|
||||
Result := QComboBox_create();
|
||||
FLineEdit := nil;
|
||||
FOwnerDrawn := False;
|
||||
end;
|
||||
@ -4479,20 +4455,18 @@ end;
|
||||
|
||||
function TQtAbstractSpinBox.GetLineEdit: QLineEditH;
|
||||
begin
|
||||
// :( bindings has no QAbstractSpinBox_lineEdit(...)
|
||||
Result := nil;
|
||||
if FLineEdit = nil then
|
||||
FLineEdit := QLCLAbstractSpinBox_lineEditHandle(QAbstractSpinBoxH(Widget));
|
||||
Result := FLineEdit;
|
||||
end;
|
||||
|
||||
function TQtAbstractSpinBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtAbstractSpinBox.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QAbstractSpinBox_create(Parent);
|
||||
Result := QAbstractSpinBox_create();
|
||||
end;
|
||||
|
||||
function TQtAbstractSpinBox.getReadOnly: Boolean;
|
||||
@ -4551,15 +4525,12 @@ end;
|
||||
{ TQtFloatSpinBox }
|
||||
|
||||
function TQtFloatSpinBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtFloatSpinBox.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QDoubleSpinBox_create(Parent);
|
||||
Result := QDoubleSpinBox_create();
|
||||
end;
|
||||
|
||||
function TQtFloatSpinBox.getValue: single;
|
||||
@ -4620,15 +4591,12 @@ end;
|
||||
{ TQtSpinBox }
|
||||
|
||||
function TQtSpinBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtSpinBox.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QSpinBox_create(Parent);
|
||||
Result := QSpinBox_create();
|
||||
end;
|
||||
|
||||
function TQtSpinBox.getValue: single;
|
||||
@ -4683,7 +4651,6 @@ end;
|
||||
|
||||
function TQtListWidget.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
Text: WideString;
|
||||
i: Integer;
|
||||
begin
|
||||
@ -4691,8 +4658,7 @@ begin
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQListWidget.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QListWidget_create(Parent);
|
||||
Result := QListWidget_create();
|
||||
|
||||
// Sets the initial items
|
||||
for I := 0 to TCustomListBox(LCLObject).Items.Count - 1 do
|
||||
@ -4907,15 +4873,12 @@ end;
|
||||
Returns: Widget (QHeaderViewH)
|
||||
------------------------------------------------------------------------------}
|
||||
function TQtHeaderView.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtHeaderView.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QHeaderView_create(QtHorizontal, Parent);
|
||||
Result := QHeaderView_create(QtHorizontal);
|
||||
end;
|
||||
|
||||
procedure TQtHeaderView.AttachEvents;
|
||||
@ -4969,15 +4932,12 @@ end;
|
||||
Returns: Widget (QTreeViewH)
|
||||
------------------------------------------------------------------------------}
|
||||
function TQtTreeView.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtTreeView.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QTreeView_create(Parent);
|
||||
Result := QTreeView_create();
|
||||
end;
|
||||
|
||||
{ TQtTreeWidget }
|
||||
@ -4988,15 +4948,12 @@ end;
|
||||
Returns: Widget (QTreeWidgetH)
|
||||
------------------------------------------------------------------------------}
|
||||
function TQtTreeWidget.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtTreeWidget.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QTreeWidget_create(Parent);
|
||||
Result := QTreeWidget_create();
|
||||
|
||||
Header := TQtHeaderView.Create(LCLObject, AParams);
|
||||
Header.AttachEvents;
|
||||
@ -5592,15 +5549,12 @@ end;
|
||||
{ TQtProgressBar }
|
||||
|
||||
function TQtProgressBar.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQProgressBar.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QProgressBar_create(Parent);
|
||||
Result := QProgressBar_create();
|
||||
end;
|
||||
|
||||
procedure TQtProgressBar.AttachEvents;
|
||||
@ -5667,8 +5621,6 @@ end;
|
||||
{ TQtStatusBar }
|
||||
|
||||
function TQtStatusBar.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
@ -5676,8 +5628,7 @@ begin
|
||||
{$endif}
|
||||
|
||||
SetLength(APanels, 0);
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QStatusBar_create(Parent);
|
||||
Result := QStatusBar_create();
|
||||
|
||||
{TODO: this should be made in initializeWND?
|
||||
if (LCLObject as TStatusBar).SimplePanel then
|
||||
@ -5713,16 +5664,13 @@ end;
|
||||
Returns: Nothing
|
||||
------------------------------------------------------------------------------}
|
||||
function TQtAbstractScrollArea.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtAbstractScrollArea.Create');
|
||||
{$endif}
|
||||
FViewPortWidget := NiL;
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QScrollArea_create(Parent);
|
||||
Result := QScrollArea_create();
|
||||
QWidget_setAttribute(Result, QtWA_NoMousePropagation);
|
||||
end;
|
||||
|
||||
@ -5973,15 +5921,12 @@ end;
|
||||
Returns: Nothing
|
||||
------------------------------------------------------------------------------}
|
||||
function TQtCalendar.CreateWidget(const AParams: TCreateParams):QWidgetH;
|
||||
var
|
||||
Parent: QWidgetH;
|
||||
begin
|
||||
// Creates the widget
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtCalendar.Create');
|
||||
{$endif}
|
||||
Parent := TQtWidget(LCLObject.Parent.Handle).GetContainerWidget;
|
||||
Result := QCalendarWidget_create(Parent);
|
||||
Result := QCalendarWidget_create();
|
||||
end;
|
||||
|
||||
procedure TQtCalendar.AttachEvents;
|
||||
|
@ -58,7 +58,7 @@ type
|
||||
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; 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 SetSelLength(const ACustomEdit: TCustomEdit; NewLength: integer); override;
|
||||
class procedure SetSelStart(const ACustomEdit: TCustomEdit; NewStart: integer); override;
|
||||
@ -128,10 +128,17 @@ begin
|
||||
Result := TQtAbstractSpinBox(ACustomFloatSpinEdit.Handle).getValue;
|
||||
end;
|
||||
|
||||
class procedure TQtWSCustomFloatSpinEdit.SetCharCase(
|
||||
const ACustomEdit: TCustomEdit; NewCase: TEditCharCase);
|
||||
class procedure TQtWSCustomFloatSpinEdit.SetEchoMode(
|
||||
const ACustomEdit: TCustomEdit; NewMode: TEchoMode);
|
||||
var
|
||||
LineEdit: QLineEditH;
|
||||
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;
|
||||
|
||||
class procedure TQtWSCustomFloatSpinEdit.UpdateControl(const ACustomFloatSpinEdit: TCustomFloatSpinEdit);
|
||||
@ -151,28 +158,57 @@ end;
|
||||
|
||||
class function TQtWSCustomFloatSpinEdit.GetSelStart(
|
||||
const ACustomEdit: TCustomEdit): integer;
|
||||
var
|
||||
LineEdit: QLineEditH;
|
||||
begin
|
||||
{$note implement}
|
||||
Result := 0;
|
||||
LineEdit := TQtAbstractSpinBox(ACustomEdit.Handle).LineEdit;
|
||||
if (LineEdit <> nil) and QLineEdit_hasSelectedText(LineEdit) then
|
||||
Result := QLineEdit_selectionStart(LineEdit)
|
||||
else
|
||||
Result := TQtAbstractSpinBox(ACustomEdit.Handle).FSelStart;
|
||||
end;
|
||||
|
||||
class function TQtWSCustomFloatSpinEdit.GetSelLength(
|
||||
const ACustomEdit: TCustomEdit): integer;
|
||||
var
|
||||
LineEdit: QLineEditH;
|
||||
W: WideString;
|
||||
begin
|
||||
{$note implement}
|
||||
Result := 0;
|
||||
LineEdit := TQtAbstractSpinBox(ACustomEdit.Handle).LineEdit;
|
||||
if (LineEdit <> nil) and QLineEdit_hasSelectedText(LineEdit) then
|
||||
begin
|
||||
QLineEdit_selectedText(LineEdit, @W);
|
||||
Result := Length(W);
|
||||
end
|
||||
else
|
||||
Result := TQtAbstractSpinBox(ACustomEdit.Handle).FSelLength;
|
||||
end;
|
||||
|
||||
class function TQtWSCustomFloatSpinEdit.GetText(const AWinControl: TWinControl; var AText: String): Boolean;
|
||||
var
|
||||
LineEdit: QLineEditH;
|
||||
W: WideString;
|
||||
begin
|
||||
{$note implement}
|
||||
Result := True;
|
||||
LineEdit := TQtAbstractSpinBox(AWinControl.Handle).LineEdit;
|
||||
Result := LineEdit <> nil;
|
||||
if Result then
|
||||
begin
|
||||
QLineEdit_text(LineEdit, @W);
|
||||
AText := W;
|
||||
end
|
||||
else
|
||||
AText := '';
|
||||
end;
|
||||
|
||||
class procedure TQtWSCustomFloatSpinEdit.SetText(const AWinControl: TWinControl; const AText: string);
|
||||
var
|
||||
LineEdit: QLineEditH;
|
||||
W: WideString;
|
||||
begin
|
||||
// perhaps QSpinBox_setSuffix() goes here one day (if we get LCL support)
|
||||
{$note implement}
|
||||
LineEdit := TQtAbstractSpinBox(AWinControl.Handle).LineEdit;
|
||||
W := AText;
|
||||
if (LineEdit <> nil) then
|
||||
QLineEdit_setText(LineEdit, @W)
|
||||
end;
|
||||
|
||||
class procedure TQtWSCustomFloatSpinEdit.SetReadOnly(const ACustomEdit: TCustomEdit; NewReadOnly: boolean);
|
||||
@ -182,14 +218,32 @@ end;
|
||||
|
||||
class procedure TQtWSCustomFloatSpinEdit.SetSelLength(
|
||||
const ACustomEdit: TCustomEdit; NewLength: integer);
|
||||
var
|
||||
LineEdit: QLineEditH;
|
||||
AStart: Integer;
|
||||
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;
|
||||
|
||||
class procedure TQtWSCustomFloatSpinEdit.SetSelStart(
|
||||
const ACustomEdit: TCustomEdit; NewStart: integer);
|
||||
var
|
||||
LineEdit: QLineEditH;
|
||||
ALength: Integer;
|
||||
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;
|
||||
|
||||
|
||||
|
@ -188,6 +188,7 @@ type
|
||||
class procedure SetWantTabs(const ACustomMemo: TCustomMemo; const NewWantTabs: boolean); override;
|
||||
class procedure SetWordWrap(const ACustomMemo: TCustomMemo; const NewWordWrap: boolean); override;
|
||||
public
|
||||
class procedure SetEchoMode(const ACustomEdit: TCustomEdit; NewMode: TEchoMode); override;
|
||||
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: string); override;
|
||||
class function GetSelStart(const ACustomEdit: TCustomEdit): integer; override;
|
||||
@ -767,6 +768,12 @@ begin
|
||||
TQtTextEdit(ACustomMemo.Handle).setLineWrapMode(WordWrapMap[NewWordWrap]);
|
||||
end;
|
||||
|
||||
class procedure TQtWSCustomMemo.SetEchoMode(const ACustomEdit: TCustomEdit;
|
||||
NewMode: TEchoMode);
|
||||
begin
|
||||
{$note implement}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TQtWSCustomMemo.GetText
|
||||
Params:
|
||||
@ -868,6 +875,9 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
class procedure TQtWSCustomEdit.SetEchoMode(const ACustomEdit: TCustomEdit; NewMode: TEchoMode);
|
||||
begin
|
||||
if not WSCheckHandleAllocated(ACustomEdit, 'SetEchoMode') then
|
||||
Exit;
|
||||
|
||||
TQtLineEdit(ACustomEdit.Handle).setEchoMode(QLineEditEchoMode(Ord(NewMode)));
|
||||
end;
|
||||
|
||||
@ -909,16 +919,29 @@ begin
|
||||
end;
|
||||
|
||||
class function TQtWSCustomEdit.GetSelStart(const ACustomEdit: TCustomEdit): integer;
|
||||
var
|
||||
LineEdit: TQtLineEdit;
|
||||
begin
|
||||
Result := TQtLineEdit(ACustomEdit.Handle).getSelectionStart;
|
||||
LineEdit := TQtLineEdit(ACustomEdit.Handle);
|
||||
if LineEdit.hasSelectedText then
|
||||
Result := LineEdit.getSelectionStart
|
||||
else
|
||||
Result := LineEdit.FSelStart;
|
||||
end;
|
||||
|
||||
class function TQtWSCustomEdit.GetSelLength(const ACustomEdit: TCustomEdit): integer;
|
||||
var
|
||||
LineEdit: TQtLineEdit;
|
||||
W: WideString;
|
||||
begin
|
||||
LineEdit := TQtLineEdit(ACustomEdit.Handle);
|
||||
if LineEdit.hasSelectedText then
|
||||
begin
|
||||
W := TQtLineEdit(ACustomEdit.Handle).getSelectedText;
|
||||
Result := Length(W);
|
||||
end
|
||||
else
|
||||
Result := LineEdit.FSelLength;
|
||||
end;
|
||||
|
||||
class procedure TQtWSCustomEdit.SetSelStart(const ACustomEdit: TCustomEdit;
|
||||
@ -1398,7 +1421,7 @@ begin
|
||||
if (LineEdit <> nil) and QLineEdit_hasSelectedText(LineEdit) then
|
||||
Result := QLineEdit_selectionStart(LineEdit)
|
||||
else
|
||||
Result := 0;
|
||||
Result := TQtComboBox(ACustomComboBox.Handle).FSelStart;
|
||||
end;
|
||||
|
||||
class function TQtWSCustomComboBox.GetSelLength(
|
||||
@ -1414,7 +1437,7 @@ begin
|
||||
Result := Length(W);
|
||||
end
|
||||
else
|
||||
Result := 0;
|
||||
Result := TQtComboBox(ACustomComboBox.Handle).FSelLength;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -1462,6 +1485,7 @@ var
|
||||
LineEdit: QLineEditH;
|
||||
ALength: Integer;
|
||||
begin
|
||||
TQtComboBox(ACustomComboBox.Handle).FSelStart := NewStart;
|
||||
LineEdit := TQtComboBox(ACustomComboBox.Handle).LineEdit;
|
||||
if LineEdit <> nil then
|
||||
begin
|
||||
@ -1476,6 +1500,7 @@ var
|
||||
LineEdit: QLineEditH;
|
||||
AStart: Integer;
|
||||
begin
|
||||
TQtComboBox(ACustomComboBox.Handle).FSelLength := NewLength;
|
||||
LineEdit := TQtComboBox(ACustomComboBox.Handle).LineEdit;
|
||||
if LineEdit <> nil then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user