Changeset 123 for trunk/Forms
- Timestamp:
- Mar 16, 2022, 11:35:08 AM (3 years ago)
- Location:
- trunk/Forms
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormCompare.lfm
r121 r123 1083 1083 end 1084 1084 object OpenDialogSide: TOpenDialog 1085 Left = 3 441086 Top = 36 21085 Left = 336 1086 Top = 360 1087 1087 end 1088 1088 object MainMenu1: TMainMenu -
trunk/Forms/UFormContact.lfm
r112 r123 1 1 object FormContact: TFormContact 2 Left = 10 633 Height = 7 734 Top = 44 95 Width = 103 22 Left = 1043 3 Height = 769 4 Top = 446 5 Width = 1033 6 6 Caption = 'Contact' 7 ClientHeight = 7 738 ClientWidth = 103 27 ClientHeight = 769 8 ClientWidth = 1033 9 9 DesignTimePPI = 150 10 10 OnClose = FormClose … … 14 14 LCLVersion = '2.2.0.4' 15 15 object ButtonCancel: TButton 16 Left = 90 016 Left = 901 17 17 Height = 39 18 Top = 7 2018 Top = 716 19 19 Width = 120 20 20 Anchors = [akRight, akBottom] … … 25 25 end 26 26 object ButtonOk: TButton 27 Left = 7 5927 Left = 760 28 28 Height = 39 29 Top = 7 2029 Top = 716 30 30 Width = 124 31 31 Anchors = [akRight, akBottom] … … 38 38 Left = 8 39 39 Height = 39 40 Top = 7 2040 Top = 716 41 41 Width = 124 42 42 Anchors = [akLeft, akBottom] … … 50 50 Left = 150 51 51 Height = 39 52 Top = 7 2052 Top = 716 53 53 Width = 120 54 54 Anchors = [akLeft, akBottom] … … 61 61 object PageControlContact: TPageControl 62 62 Left = 8 63 Height = 69 663 Height = 692 64 64 Top = 8 65 Width = 10 0966 ActivePage = TabSheet General65 Width = 1010 66 ActivePage = TabSheetOthers 67 67 Anchors = [akTop, akLeft, akRight, akBottom] 68 68 ParentFont = False 69 TabIndex = 069 TabIndex = 5 70 70 TabOrder = 4 71 71 object TabSheetGeneral: TTabSheet 72 72 Caption = 'General' 73 ClientHeight = 65 574 ClientWidth = 99973 ClientHeight = 651 74 ClientWidth = 1000 75 75 OnHide = TabSheetGeneralHide 76 76 OnShow = TabSheetGeneralShow … … 340 340 object TabSheetHome: TTabSheet 341 341 Caption = 'Home' 342 ClientHeight = 65 5343 ClientWidth = 999342 ClientHeight = 651 343 ClientWidth = 1000 344 344 OnHide = TabSheetHomeHide 345 345 OnShow = TabSheetHomeShow … … 429 429 Height = 287 430 430 Top = 225 431 Width = 89 7431 Width = 898 432 432 Anchors = [akTop, akLeft, akRight] 433 433 Caption = 'Address' 434 434 ClientHeight = 285 435 ClientWidth = 89 5435 ClientWidth = 896 436 436 TabOrder = 6 437 437 object Label36: TLabel … … 600 600 object TabSheetWork: TTabSheet 601 601 Caption = 'Work' 602 ClientHeight = 65 5603 ClientWidth = 999602 ClientHeight = 651 603 ClientWidth = 1000 604 604 OnHide = TabSheetWorkHide 605 605 OnShow = TabSheetWorkShow … … 906 906 object TabSheetChat: TTabSheet 907 907 Caption = 'Chat' 908 ClientHeight = 65 5909 ClientWidth = 999908 ClientHeight = 651 909 ClientWidth = 1000 910 910 OnHide = TabSheetChatHide 911 911 OnShow = TabSheetChatShow … … 1121 1121 object TabSheetSocial: TTabSheet 1122 1122 Caption = 'Social' 1123 ClientHeight = 65 51124 ClientWidth = 9991123 ClientHeight = 651 1124 ClientWidth = 1000 1125 1125 OnHide = TabSheetSocialHide 1126 1126 OnShow = TabSheetSocialShow … … 1288 1288 object TabSheetOthers: TTabSheet 1289 1289 Caption = 'Others' 1290 ClientHeight = 65 51291 ClientWidth = 9991290 ClientHeight = 651 1291 ClientWidth = 1000 1292 1292 OnHide = TabSheetOthersHide 1293 1293 OnShow = TabSheetOthersShow 1294 1294 object MemoNotes: TMemo 1295 1295 Left = 17 1296 Height = 2 931296 Height = 289 1297 1297 Top = 50 1298 Width = 9631298 Width = 671 1299 1299 Anchors = [akTop, akLeft, akRight, akBottom] 1300 1300 ParentFont = False … … 1310 1310 Caption = 'Notes:' 1311 1311 ParentFont = False 1312 end 1313 object BarcodeQR1: TBarcodeQR 1314 Left = 704 1315 Height = 286 1316 Top = 50 1317 Width = 280 1318 ParentColor = False 1319 Text = 'TBarcodeQR' 1320 end 1321 object Label1: TLabel 1322 Left = 704 1323 Height = 27 1324 Top = 16 1325 Width = 80 1326 Anchors = [akTop, akRight] 1327 Caption = 'QR code:' 1312 1328 end 1313 1329 end … … 1381 1397 Top = 608 1382 1398 end 1399 object PopupMenuQrCode: TPopupMenu 1400 Left = 528 1401 Top = 472 1402 object MenuItemSaveQrToFile: TMenuItem 1403 Caption = 'Save to file' 1404 OnClick = MenuItemSaveQrToFileClick 1405 end 1406 end 1383 1407 end -
trunk/Forms/UFormContact.lrj
r110 r123 89 89 {"hash":90893459,"name":"tformcontact.tabsheetothers.caption","sourcebytes":[79,116,104,101,114,115],"value":"Others"}, 90 90 {"hash":89566314,"name":"tformcontact.label6.caption","sourcebytes":[78,111,116,101,115,58],"value":"Notes:"}, 91 {"hash":144712418,"name":"tformcontact.barcodeqr1.text","sourcebytes":[84,66,97,114,99,111,100,101,81,82],"value":"TBarcodeQR"}, 92 {"hash":74080234,"name":"tformcontact.label1.caption","sourcebytes":[81,82,32,99,111,100,101,58],"value":"QR code:"}, 91 93 {"hash":113983571,"name":"tformcontact.tabsheetall.caption","sourcebytes":[65,108,108,32,102,105,101,108,100,115],"value":"All fields"}, 92 94 {"hash":8431845,"name":"tformcontact.aphotoload.caption","sourcebytes":[76,111,97,100,32,102,114,111,109,32,102,105,108,101],"value":"Load from file"}, … … 99 101 {"hash":171928085,"name":"tformcontact.calendardialog1.title","sourcebytes":[83,101,108,101,99,116,32,100,97,116,101],"value":"Select date"}, 100 102 {"hash":11067,"name":"tformcontact.calendardialog1.okcaption","sourcebytes":[38,79,75],"value":"&OK"}, 101 {"hash":77089212,"name":"tformcontact.calendardialog1.cancelcaption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"} 103 {"hash":77089212,"name":"tformcontact.calendardialog1.cancelcaption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 104 {"hash":9308581,"name":"tformcontact.menuitemsaveqrtofile.caption","sourcebytes":[83,97,118,101,32,116,111,32,102,105,108,101],"value":"Save to file"} 102 105 ]} -
trunk/Forms/UFormContact.pas
r110 r123 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 9 ComCtrls, ActnList, Menus, ExtCtrls, ExtDlgs, Buttons, UContact, LCLIntf, 10 UFormProperties, DateUtils {$IFDEF LCLGTK2}, Gtk2Globals{$ENDIF}, UContactImage;10 UFormProperties, DateUtils, Gtk2Globals, UContactImage, ubarcodes; 11 11 12 12 type … … 21 21 APhotoLoad: TAction; 22 22 ActionList1: TActionList; 23 BarcodeQR1: TBarcodeQR; 23 24 ButtonCancel: TButton; 24 25 ButtonHomeAddressShow: TButton; … … 96 97 GroupBox2: TGroupBox; 97 98 ImagePhoto: TImage; 99 Label1: TLabel; 98 100 Label10: TLabel; 99 101 Label11: TLabel; … … 167 169 MenuItem4: TMenuItem; 168 170 MenuItem5: TMenuItem; 171 MenuItemSaveQrToFile: TMenuItem; 169 172 OpenPictureDialog1: TOpenPictureDialog; 170 173 PageControlContact: TPageControl; 174 PopupMenuQrCode: TPopupMenu; 171 175 PopupMenuPhoto: TPopupMenu; 172 176 SavePictureDialog1: TSavePictureDialog; … … 202 206 procedure FormShow(Sender: TObject); 203 207 procedure ImagePhotoClick(Sender: TObject); 208 procedure MenuItemSaveQrToFileClick(Sender: TObject); 204 209 procedure SpeedButtonHomeWebClick(Sender: TObject); 205 210 procedure SpeedButtonAniversaryClick(Sender: TObject); … … 249 254 250 255 uses 251 UCore, UCommon, UFormImage, UFormNameDetails ;256 UCore, UCommon, UFormImage, UFormNameDetails, UDataFile; 252 257 253 258 resourcestring … … 255 260 SPhotoUrl = 'Photo URL'; 256 261 SPhotoUrlQuery = 'Enter URL for profile photo'; 262 SImageTypeNotSupported = 'Image type not supported.'; 257 263 258 264 function DateToISO(Date: TDateTime): string; … … 341 347 end; 342 348 349 procedure TFormContact.MenuItemSaveQrToFileClick(Sender: TObject); 350 var 351 F: string; 352 begin 353 SavePictureDialog1.Filter := 'Windows bitmap files (*.bmp)|*.bmp|' + 354 'Portable network graphic files (*.png)|*.png|' + 355 'JPEG image files (*.jpg;*.jpeg)|*.jpg;*.jpeg|' + 356 'TIFF image files (*.tiff; *.tif)|*.tiff;*.tif|'+ 357 'XPM image files (*.xpm)|*.xpm|' + 358 'Scalable vector graphics files (*.svg)|*.svg|'+ 359 'Encapsulated PostScript files (*.eps;*.ps)|*.eps;*.ps|'+ 360 SAllFiles + ' (*.*)|*.*'; 361 SavePictureDialog1.FilterIndex := 2; 362 SavePictureDialog1.DefaultExt := '.png'; 363 if Core.LastQrCodeFileName = '' then 364 Core.LastQrCodeFileName := 'QR code.png'; 365 SavePictureDialog1.InitialDir := ExtractFileDir(Core.LastQrCodeFileName); 366 SavePictureDialog1.FileName := ExtractFileName(Core.LastQrCodeFileName); 367 if SavePictureDialog1.Execute then begin 368 F := LowerCase(ExtractFileExt(SavePictureDialog1.FileName)); 369 if F = '.bmp' then BarcodeQR1.SaveToFile(SavePictureDialog1.FileName, TBitmap) 370 else if F = '.png' then BarcodeQR1.SaveToFile(SavePictureDialog1.FileName, TPortableNetworkGraphic) 371 else if (F = '.jpg') or (F = '.jpeg') then BarcodeQR1.SaveTofile(SavePictureDialog1.FileName, TJpegImage) 372 else if (F = '.tif') or (F = '.tiff') then BarcodeQR1.SaveToFile(SavePictureDialog1.FileName, TTiffImage) 373 else if F = '.xpm' then BarcodeQR1.SaveToFile(SavePictureDialog1.FileName, TPixmap) 374 else if F = '.svg' then BarcodeQR1.SaveToSvgFile(SavePictureDialog1.FileName) 375 else if (F = '.eps') or (F = '.ps') then BarcodeQR1.SaveToEpsFile(SavePictureDialog1.FileName) 376 else raise Exception.Create(SImageTypeNotSupported); 377 Core.LastQrCodeFileName := SavePictureDialog1.FileName; 378 end; 379 end; 380 343 381 procedure TFormContact.SpeedButtonHomeWebClick(Sender: TObject); 344 382 begin … … 528 566 begin 529 567 MemoNotes.Lines.Text := Contact.Fields[cfNote]; 568 BarcodeQR1.Text := Contact.AsString; 530 569 end; 531 570 … … 641 680 procedure TFormContact.APhotoLoadExecute(Sender: TObject); 642 681 begin 643 OpenPictureDialog1.FileName := Core.LastPhotoFileName; 682 OpenPictureDialog1.InitialDir := ExtractFileDir(Core.LastPhotoFileName); 683 OpenPictureDialog1.FileName := ExtractFileName(Core.LastPhotoFileName); 644 684 if OpenPictureDialog1.Execute then begin 645 685 FPhoto.LoadFromFile(OpenPictureDialog1.FileName); … … 655 695 procedure TFormContact.APhotoSaveExecute(Sender: TObject); 656 696 begin 657 SavePictureDialog1.FileName := Core.LastPhotoFileName; 697 SavePictureDialog1.InitialDir := ExtractFileDir(Core.LastPhotoFileName); 698 SavePictureDialog1.FileName := ExtractFileName(Core.LastPhotoFileName); 658 699 if SavePictureDialog1.Execute then begin 659 700 ImagePhoto.Picture.SaveToFile(SavePictureDialog1.FileName); … … 777 818 FPhoto.FieldIndex := cfPhoto; 778 819 FPhoto.OnChange := PhotoChange; 820 821 // Set Barcode unpublished properties 822 BarcodeQR1.Anchors := [akTop, akRight]; 823 BarcodeQR1.PopupMenu := PopupMenuQrCode; 779 824 end; 780 825 -
trunk/Forms/UFormImage.pas
r103 r123 73 73 procedure TFormImage.ButtonLoadClick(Sender: TObject); 74 74 begin 75 OpenPictureDialog1.FileName := Core.LastPhotoFileName; 75 OpenPictureDialog1.InitialDir := ExtractFileDir(Core.LastPhotoFileName); 76 OpenPictureDialog1.FileName := ExtractFileName(Core.LastPhotoFileName); 76 77 if OpenPictureDialog1.Execute then begin 77 78 Image.LoadFromFile(OpenPictureDialog1.FileName); … … 87 88 procedure TFormImage.ButtonSaveClick(Sender: TObject); 88 89 begin 89 SavePictureDialog1.FileName := Core.LastPhotoFileName; 90 SavePictureDialog1.InitialDir := ExtractFileDir(Core.LastPhotoFileName); 91 SavePictureDialog1.FileName := ExtractFileName(Core.LastPhotoFileName); 90 92 if SavePictureDialog1.Execute then begin 91 93 Image.SaveToFile(SavePictureDialog1.FileName); -
trunk/Forms/UFormProperties.pas
r108 r123 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, 9 ComCtrls, Menus, ActnList, UContact, U ListViewSort, fgl, LazUTF8;9 ComCtrls, Menus, ActnList, UContact, UDataFile, UListViewSort, fgl, LazUTF8; 10 10 11 11 type … … 94 94 SFiltered = 'Filtered'; 95 95 SSelected = 'Selected'; 96 SAllFiles = 'All files';97 96 STextFiles = 'Text files'; 98 97 SValue = 'Value';
Note:
See TracChangeset
for help on using the changeset viewer.