【更新内容】 qstring 新增 NewId 函数,qcndate、qxml、qtimetypes、qmacros、qmapsymbols、qdigest、qworker 修正了与Delphi 2007 的兼容性问题。 修改完的兼容性测试结果如下(QDB在开发过程中,未做任何兼容性处理): 【更新级别】 可选 【特别
月度归档: 2015年2月
QWorker 更新 – TQJobGroup 新增 Insert 函数来临时插入一个作业
【更新说明】 如果我们在顺序作业执行过程中,想要临时在作业中插入一个作业时,由于 Add 函数只能追加到尾部而无法完成。新增的 Insert 函数可以辅助用户方便的完成此作业。 首先我们看函数说明:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
/// <summary>插入一个作业过程,如果准备内部计数器为0,则直接执行,否则只添加到列表</summary> /// <param name="AIndex">要插入的的位置索引</param> /// <param name="AProc">要执行的作业过程</param> /// <param name="AData">附加数据指针</param> /// <param name="AInMainThread">作业是否需要在主线程中执行</param> /// <param name="AFreeType">AData指定的附加数据指针释放方式</param> /// <returns>成功,返回True,失败,返回False</returns> /// <remarks>添加到分组中的作业,要么执行完成,要么被取消,不运行通过句柄取消</remarks> function Insert(AIndex:Integer;AProc: TQJobProc; AData: Pointer; AInMainThread: Boolean = False; AFreeType: TQJobDataFreeType = jdfFreeByUser): Boolean; overload; /// <summary>插入一个作业过程,如果准备内部计数器为0,则直接执行,否则只添加到列表</summary> /// <param name="AIndex">要插入的的位置索引</param> /// <param name="AProc">要执行的作业过程</param> /// <param name="AData">附加数据指针</param> /// <param name="AInMainThread">作业是否需要在主线程中执行</param> /// <param name="AFreeType">AData指定的附加数据指针释放方式</param> /// <returns>成功,返回True,失败,返回False</returns> /// <remarks>添加到分组中的作业,要么执行完成,要么被取消,不运行通过句柄取消</remarks> function Insert(AIndex:Integer;AProc: TQJobProcG; AData: Pointer; AInMainThread: Boolean = False; AFreeType: TQJobDataFreeType = jdfFreeByUser): Boolean; overload; {$IFDEF UNICODE} /// <summary>插入一个作业过程,如果准备内部计数器为0,则直接执行,否则只添加到列表</summary> /// <param name="AIndex">要插入的的位置索引</param> /// <param name="AProc">要执行的作业过程</param> /// <param name="AData">附加数据指针</param> /// <param name="AInMainThread">作业是否需要在主线程中执行</param> /// <param name="AFreeType">AData指定的附加数据指针释放方式</param> /// <returns>成功,返回True,失败,返回False</returns> /// <remarks>添加到分组中的作业,要么执行完成,要么被取消,不运行通过句柄取消</remarks> function Insert(AIndex:Integer;AProc: TQJobProcA; AData: Pointer; AInMainThread: Boolean = False; AFreeType: TQJobDataFreeType = jdfFreeByUser): Boolean; overload; {$ENDIF} |
下面的示例代码可能帮助您理解其用法: [crayon-
QWorker更新-新增几个方法以简化与主线程交互编程
【更新说明】 1、TQJob.Synchronize 新增匿名函数版本; 2、新增 RunInMainThread 系列函数:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
TMainThreadProc=procedure (AData:Pointer) of object; TMainThreadProcG=procedure (AData:Pointer); /// <summary>在主线程中执行指定的函数</summary> /// <param name="AProc">要执行的函数</param> /// <param name="AData">附加参数</param> procedure RunInMainThread(AProc:TMainThreadProc;AData:Pointer);overload; /// <summary>在主线程中执行指定的函数</summary> /// <param name="AProc">要执行的函数</param> /// <param name="AData">附加参数</param> procedure RunInMainThread(AProc:TMainThreadProcG;AData:Pointer);overload; /// <summary>在主线程中执行指定的函数</summary> /// <param name="AProc">要执行的函数</param> procedure RunInMainThread(AProc:TThreadProcedure);overload; |
在后台作业中,直接调用 RunInMainThread 函数就可以将附加的函数代码运行在主线程并等待其返回: [crayon-
QMsgPack 更新 – 修正了键不支持非字符串类型的兼容性问题
【问题描述】 该问题是由于我对协议的理解出现差错造成的。MessagePack 协议不要求映射的键一定是字符串,所以键就可以是任何简单类型。新版加入了 KeyAsXXX 用来对不同类型的键进行支持:
1 2 3 4 5 6 7 8 9 10 11 |
property KeyType: TQMsgPackType read FKeyType; property KeyAsString: QStringW read GetKeyAsString write SetKeyAsString; property KeyAsInt64: Int64 read GetKeyAsInt64 write SetKeyAsInt64; property KeyAsInteger: Integer read GetKeyAsInteger write SetKeyAsInteger; property KeyAsSingle: Single read GetKeyAsSingle write SetKeyAsSingle; property KeyAsFloat: Double read GetKeyAsFloat write SetKeyAsFloat; property KeyAsDateTime: TDateTime read GetKeyAsDateTime write SetKeyAsDateTime; property KeyAsBytes: TBytes read GetKeyAsBytes write SetKeyAsBytes; property KeyAsBoolean: Boolean read GetKeyAsBoolean write SetKeyAsBoolean; property KeyIsNull: Boolean read GetKeyIsNull; |
其中,KeyType 表明了键的类型,KeyAsXXX
恭祝大家春节快乐,万事如意,新春吉祥如意
在新的一年里,希望 QDAC 项目在大家的支持下进一步成长,为大家的发展提供新的助力。 由于春节期间在外地没有 Wifi ,可怜的流量伤不起,所以更新只以 SVN 方式上传,等回到家有 Wifi 时再统一上传,敬请谅解。
Delphi 自带的 TabSlidingProject 演示程序的一处Bug
启动程序,你会发现按下返回键程序无法退出,问题出在:
1 2 3 4 5 6 7 8 |
procedure TTabSlideTransitionFrmBase.FormKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState); begin if Key = vkHardwareBack then begin TabControl1.Previous; Key := 0; end; end; |
自己处理下,检查处理下,在首页时不设置 Key=0 就 OK 了,简单修改如下:
1 2 3 4 5 6 7 8 |
procedure TTabSlideTransitionFrmBase.FormKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState); begin if Key = vkHardwareBack then begin if TabControl1.Previous then Key := 0; end; end; |
Delphi/C++ Builder 支持触控操作步骤
1、在当前窗体上添加一个 TGestureManager 对象。 2、选择设置要支持触控的控件 2.1、找到 Touch 属性 2.1.1、修改GestureManager 属性为第 1 步添加的 TGestureManager 对象; 2.1.2、设置Gestures 或 InteractiveGestures 中自
[FMX] Android 下如何让编辑框中只输入数字
XE 7 中 Android 下,字符不会触发 OnKeyDown 事件,所以你无法再在编辑框中过滤一些特殊字符,禁止用户输入。虽然 XE7 的TEdit 提供了一个 FilterChar ,但遗憾的是它依然不好。通过分析,其提供了一个 OnValidating 方法在用户输入一个字符时,触发来让您验证输入的有效性。但
[FMX] 应用程序状态检测
在 FMX 平台下,TApplication 暂时没有了那么多的事件,比如程序激活啥的,那么在它下面我们该如何处理呢?实际上,FMX 平台下的消息机制采用的是订阅机制,所以你只需要订阅 TApplicationEventMessage 消息就可以得到了,目前官方未提供相应的组件来支持,但将来有可能提供,咱们先来说下步骤
QMsgPack 更新 – 修正了 AsInteger/AsInt64/AsFloat 不兼容十六进制字符串的问题
【问题描述】 如果字符串是十六进制值,在使用 AsInteger / AsInt64 / AsFloat 访问时,会提示不是有效的数字。 【严重程度】 中 【更新级别】 可选 【特别感谢】 阿木
QJson 更新 – 修正了 AsInteger/AsInt64/AsFloat 不兼容十六进制字符串的问题
【问题描述】 下面的 JSON 字符串:
1 2 3 |
{ "color":"$FF0000" } |
如果对 color 使用 AsInteger / AsInt64 / AsFloat 访问时,会提示不是有效的数字。 【严重程度】 中 【更新级别】 可选 【特别感谢】 阿木
[FMX] 痛苦的先驱 – Android 下部分按键不会触发 KeyDown 事件的处理
做先驱是痛苦的,死的壮烈,活的憋屈。遇到问题,在谷哥和度娘都帮不上忙的情况下,只好自己摸索。相信在黑暗中,总有那么一道光闪过智慧的脑袋瓜子~~~~ 前情提要:因为试图要在窗体的 OnKeyDown 事件中响应红外遥控器上的 OK 确认键,结果却痛苦的发现,相应的事件不会被触发,于是痛苦的摸索过程开始了…… (此处省略5
[FMX] 如何解决一个设置了Style的控件无法调整高或宽的问题
这个,我不知道怎么触发的,反正控件样式的 FixedHeight 被设置为了一个固定的高度,问题是我没有设置 FixedHeight 属性,考虑到万一有人不兴与我同罪,所以特意告诉大家解决办法: 1、在 FMX Style Designer 将样式保存( Save )到文件,比如 a.style; 2、用 IDE 或者
[FMX] 换肤术 – 使用 TStyleBook 动态加载皮肤样式
在前面的 [FMX] 技巧 – 为你的按钮添加图标 一文中,我们讨论了如何为你的 TSpeedButton 加一个图标的问题,大家一致反映 FMX Style Designer 这个败家玩意确实不稳定,这就 EMB 在时刻提醒我们:随时保存,否则后果很严重! 现在,本着学习佛祖悍不畏死,永往超前,我不下地狱谁下地狱的
一个蛮无聊的函数,在主线程中非阻塞的方式延时一段时间
在主线程中非阻塞的方式延时一段时间,仅适用于 Windows 平台:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
procedure MsgWait(ADelay:Integer;ABreakOnAppQuit:Boolean); var AHandle:THandle; T:Cardinal; begin while ADelay>0 do begin T:=GetTickCount; if MsgWaitForMultipleObjects(0,AHandle,false,ADelay,QS_ALLINPUT)=WAIT_OBJECT_0 then begin Application.ProcessMessages; if Application.Terminated and ABreakOnAppQuit then Break; end; Dec(ADelay,GetTickCount-T); end; end; |
[FMX] 技巧 – 为你的按钮添加图标
累得死安得真特慢,一年一度的FMX 花样作死大赛开始了,今天出场的选手是号称“千年小妖”的 TSpeedButton,要知道 TSpeedButton 在 VCL 中,我们可以为它设置图标的,但到了 FMX中,对不起,图标~~~没了!怎么办?怎么办?怎么办! 为了解决这一千古难题,我们用到了神奇的爱出错的 FMX St
[FMX] Android 按键定义
在FMX中,默认的按键定义位于 FMX.UITypes 文件中,以 vk 打头,如 vkReturn 代表回车键,但其定义并不全面。因此,我们找到 Android 源码中相关的列表,列出来供大家参考:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
#define KEY_RESERVED 0 #define KEY_ESC 1 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_1 2 #define KEY_2 3 #define KEY_3 4 #define KEY_4 5 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_5 6 #define KEY_6 7 #define KEY_7 8 #define KEY_8 9 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_9 10 #define KEY_0 11 #define KEY_MINUS 12 #define KEY_EQUAL 13 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_BACKSPACE 14 #define KEY_TAB 15 #define KEY_Q 16 #define KEY_W 17 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_E 18 #define KEY_R 19 #define KEY_T 20 #define KEY_Y 21 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_U 22 #define KEY_I 23 #define KEY_O 24 #define KEY_P 25 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_LEFTBRACE 26 #define KEY_RIGHTBRACE 27 #define KEY_ENTER 28 #define KEY_LEFTCTRL 29 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_A 30 #define KEY_S 31 #define KEY_D 32 #define KEY_F 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_G 34 #define KEY_H 35 #define KEY_J 36 #define KEY_K 37 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_L 38 #define KEY_SEMICOLON 39 #define KEY_APOSTROPHE 40 #define KEY_GRAVE 41 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_LEFTSHIFT 42 #define KEY_BACKSLASH 43 #define KEY_Z 44 #define KEY_X 45 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_C 46 #define KEY_V 47 #define KEY_B 48 #define KEY_N 49 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_M 50 #define KEY_COMMA 51 #define KEY_DOT 52 #define KEY_SLASH 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_RIGHTSHIFT 54 #define KEY_KPASTERISK 55 #define KEY_LEFTALT 56 #define KEY_SPACE 57 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_CAPSLOCK 58 #define KEY_F1 59 #define KEY_F2 60 #define KEY_F3 61 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_F4 62 #define KEY_F5 63 #define KEY_F6 64 #define KEY_F7 65 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_F8 66 #define KEY_F9 67 #define KEY_F10 68 #define KEY_NUMLOCK 69 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_SCROLLLOCK 70 #define KEY_KP7 71 #define KEY_KP8 72 #define KEY_KP9 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_KPMINUS 74 #define KEY_KP4 75 #define KEY_KP5 76 #define KEY_KP6 77 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_KPPLUS 78 #define KEY_KP1 79 #define KEY_KP2 80 #define KEY_KP3 81 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_KP0 82 #define KEY_KPDOT 83 #define KEY_ZENKAKUHANKAKU 85 #define KEY_102ND 86 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_F11 87 #define KEY_F12 88 #define KEY_RO 89 #define KEY_KATAKANA 90 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_HIRAGANA 91 #define KEY_HENKAN 92 #define KEY_KATAKANAHIRAGANA 93 #define KEY_MUHENKAN 94 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_KPJPCOMMA 95 #define KEY_KPENTER 96 #define KEY_RIGHTCTRL 97 #define KEY_KPSLASH 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_SYSRQ 99 #define KEY_RIGHTALT 100 #define KEY_LINEFEED 101 #define KEY_HOME 102 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_UP 103 #define KEY_PAGEUP 104 #define KEY_LEFT 105 #define KEY_RIGHT 106 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_END 107 #define KEY_DOWN 108 #define KEY_PAGEDOWN 109 #define KEY_INSERT 110 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_DELETE 111 #define KEY_MACRO 112 #define KEY_MUTE 113 #define KEY_VOLUMEDOWN 114 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_VOLUMEUP 115 #define KEY_POWER 116 #define KEY_KPEQUAL 117 #define KEY_KPPLUSMINUS 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_PAUSE 119 #define KEY_SCALE 120 #define KEY_KPCOMMA 121 #define KEY_HANGEUL 122 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_HANGUEL KEY_HANGEUL #define KEY_HANJA 123 #define KEY_YEN 124 #define KEY_LEFTMETA 125 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_RIGHTMETA 126 #define KEY_COMPOSE 127 #define KEY_STOP 128 #define KEY_AGAIN 129 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_PROPS 130 #define KEY_UNDO 131 #define KEY_FRONT 132 #define KEY_COPY 133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_OPEN 134 #define KEY_PASTE 135 #define KEY_FIND 136 #define KEY_CUT 137 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_HELP 138 #define KEY_MENU 139 #define KEY_CALC 140 #define KEY_SETUP 141 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_SLEEP 142 #define KEY_WAKEUP 143 #define KEY_FILE 144 #define KEY_SENDFILE 145 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_DELETEFILE 146 #define KEY_XFER 147 #define KEY_PROG1 148 #define KEY_PROG2 149 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_WWW 150 #define KEY_MSDOS 151 #define KEY_COFFEE 152 #define KEY_SCREENLOCK KEY_COFFEE /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_DIRECTION 153 #define KEY_CYCLEWINDOWS 154 #define KEY_MAIL 155 #define KEY_BOOKMARKS 156 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_COMPUTER 157 #define KEY_BACK 158 #define KEY_FORWARD 159 #define KEY_CLOSECD 160 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_EJECTCD 161 #define KEY_EJECTCLOSECD 162 #define KEY_NEXTSONG 163 #define KEY_PLAYPAUSE 164 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_PREVIOUSSONG 165 #define KEY_STOPCD 166 #define KEY_RECORD 167 #define KEY_REWIND 168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_PHONE 169 #define KEY_ISO 170 #define KEY_CONFIG 171 #define KEY_HOMEPAGE 172 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_REFRESH 173 #define KEY_EXIT 174 #define KEY_MOVE 175 #define KEY_EDIT 176 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_SCROLLUP 177 #define KEY_SCROLLDOWN 178 #define KEY_KPLEFTPAREN 179 #define KEY_KPRIGHTPAREN 180 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_NEW 181 #define KEY_REDO 182 #define KEY_F13 183 #define KEY_F14 184 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_F15 185 #define KEY_F16 186 #define KEY_F17 187 #define KEY_F18 188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_F19 189 #define KEY_F20 190 #define KEY_F21 191 #define KEY_F22 192 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_F23 193 #define KEY_F24 194 #define KEY_PLAYCD 200 #define KEY_PAUSECD 201 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_PROG3 202 #define KEY_PROG4 203 #define KEY_DASHBOARD 204 #define KEY_SUSPEND 205 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_CLOSE 206 #define KEY_PLAY 207 #define KEY_FASTFORWARD 208 #define KEY_BASSBOOST 209 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_PRINT 210 #define KEY_HP 211 #define KEY_CAMERA 212 #define KEY_SOUND 213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_QUESTION 214 #define KEY_EMAIL 215 #define KEY_CHAT 216 #define KEY_SEARCH 217 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_CONNECT 218 #define KEY_FINANCE 219 #define KEY_SPORT 220 #define KEY_SHOP 221 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_ALTERASE 222 #define KEY_CANCEL 223 #define KEY_BRIGHTNESSDOWN 224 #define KEY_BRIGHTNESSUP 225 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_MEDIA 226 #define KEY_SWITCHVIDEOMODE 227 #define KEY_KBDILLUMTOGGLE 228 #define KEY_KBDILLUMDOWN 229 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_KBDILLUMUP 230 #define KEY_SEND 231 #define KEY_REPLY 232 #define KEY_FORWARDMAIL 233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_SAVE 234 #define KEY_DOCUMENTS 235 #define KEY_BATTERY 236 #define KEY_BLUETOOTH 237 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_WLAN 238 #define KEY_UWB 239 #define KEY_UNKNOWN 240 #define KEY_VIDEO_NEXT 241 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_VIDEO_PREV 242 #define KEY_BRIGHTNESS_CYCLE 243 #define KEY_BRIGHTNESS_ZERO 244 #define KEY_DISPLAY_OFF 245 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KEY_WIMAX 246 #define KEY_RFKILL 247 #define KEY_MICMUTE 248 |
[转]小豆豆:使用 Bitmap Style Designer 为FMX修改已有样式
转自 ①FireMonkey[移动开发] QQ群(群号:165232328)的小豆豆(QQ:599132718)分享的文章,略有改动,版权归小豆豆所有。 我本是菜鸟,不懂编程,只是个设计师,但因工作需要,老板需要我熟悉 Delphi 控件,方便设计控件样式。在本人长期的自我摸索与学习中学到了点东西,因为关于 style
QWorker 更新 – 修正了在使用 FastMM 的 FullDebugInIDE 模式时退出时出错的问题
【问题描述】 该问题是由于 TStaticThread.Execute 等待事件超时时,未检查 Workers 对象是否处于清理状态造成的:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
... wrTimeout: begin if (not Workers.Terminating) and Assigned(Workers.FSimpleJobs) and (Workers.FSimpleJobs.Count > 0) and (LastCpuUsage < 60) and (Workers.IdleWorkers = 0) then Workers.LookupIdleWorker(True); ... 改为 wrTimeout: begin if Assigned(Workers) and (not Workers.Terminating) and Assigned(Workers.FSimpleJobs) and (Workers.FSimpleJobs.Count > 0) and (LastCpuUsage < 60) and (Workers.IdleWorkers = 0) then Workers.LookupIdleWorker(True); ... |
另外,新增 TQWorkers.OnError 属性,以处理作业异常信息。 【严重程度】 高 【更新级别】 推荐
[FMX] Android 判断自己程序是否是前台程序
如果程序当前在前台,返回 True,否则返回 False。我不知道有没有更好的判断方法,这个是通过枚举列表的方式实现的,至于 SharedActivityManager 函数请参考前一篇文章:[FMX]将 Android 程序切换到后台及从后台切换到前台实现。 [crayon-6004c0e7618a977526655