2iB&SrSSKJrJrJrJrJrJrJrJ r J r J r J r J r SSKJr SSKJr SSKJr SSKJr "SS\5rg ) zh Sync Profile Editor Dialog Allows creating and editing sync profiles with source and destination paths ) QDialog QVBoxLayout QHBoxLayout QFormLayout QGroupBox QLineEdit QCheckBox QPushButtonQDialogButtonBox QFileDialog QMessageBoxQLabel)Qt)logger)Path)Databasech^\rSrSrSrSS\S\4U4SjjjrSrSr Sr S r S \ 4S jr S rS rU=r$)SyncProfileDialogz)Dialog for creating/editing sync profilesdb profile_idc>[TU]U5 X lX0lUSLUlUR UR(aSOS5 UR SS5 UR5 UR(aUR5 gg)NzEdit Sync ProfilezNew Sync Profileii) super__init__rris_editsetWindowTitlesetMinimumSize _setup_ui_load_profile_data)selfparentrr __class__s .c:\PYTHON\Scheduler\gui\sync_profile_dialog.pyrSyncProfileDialog.__init__sr  $"-  4<</EWX C%  <<  # # % c[U5nURS5 [S5n[U5n[ 5UlUR R S5 URSUR 5 [ 5UlURR S5 URSUR5 URU5 [S5n[U5n[S5nURS 5 URS U5 [5n[ 5Ul URR S 5 URUR5 [S 5nURR!UR"5 URU5 URS U5 [5n [ 5UlUR$R S5 U RUR$5 [S 5n U RR!UR&5 U RU 5 URSU 5 [)S5UlUR*R-S5 URS UR*5 URU5 [S5n U RS5 URU 5 [/[.R0R2[.R0R4-5n U R6R!UR85 U R:R!UR<5 URU 5 g)zSetup dialog UIzBasic Informationz'e.g., WebDAV Sync, Network Share MirrorzProfile Name *:zOptional descriptionz Description:zSynchronization Settingsu⚠ Unidirectional mirror: Destination will be identical to Source. Files deleted from Source will be deleted from Destination.z"color: #ff6600; font-weight: bold;ze.g., C:\Documents or Z:\sharedz Browse...zSource Path *:ze.g., D:\backup or Z:\archivezDestination Path *:zEnable this profileTzrNetwork paths (like Z:\) are supported. Files are compared by modification time and size for fast synchronization.zcolor: #666; font-size: 10px;N)r setSpacingrrr name_editsetPlaceholderTextaddRowdescription_edit addWidgetr setStyleSheetr source_editr clickedconnect_browse_sourcedestination_edit_browse_destinationr enabled_check setCheckedr StandardButtonSaveCancelaccepted _save_profilerejectedreject) r layout basic_group basic_layoutsettings_groupsettings_layout info_label source_layoutbrowse_source_btn dest_layoutbrowse_dest_btn help_label button_boxs r#rSyncProfileDialog._setup_ui%sT"" 34 ";/ " ))*ST-t~~> )  001GHND,A,AB%##=>%n5 J    !EFr:.$ $; ++,OP 0 01' 4!!))$*=*=> 12/?"m )  001RSd334%k2''(@(@Ao.4kB&'<= %%d+r4#5#56( Y    !@A$&  + + 0 0  + + 2 2 3  ##D$6$67##DKK0$r%cURRUR5nU(d7[R"USSURS35 UR 5 gUR RUS5 URRURSS55 URRUS5 URRUS 5 URR[US 55 g![aNn[ R""S U35 [R"USS U35 UR 5 SnAgSnAff=f) zLoad profile data in edit modeErrorzProfile z not foundNname descriptionr( source_pathdestination_pathenabledzError loading profile data: zFailed to load profile: )rget_sync_profilerr criticalr>r*setTextr-getr0r4r6r7bool Exceptionrerror)r profilees r#r$SyncProfileDialog._load_profile_datass gg..t?G$$T7ht>Oz4Z[  NN " "76? 3  ! ! ) )'++mR*H I    $ $W]%; <  ! ! ) )'2D*E F    ) )$wy/A*B C  LL7s; <  w2J1#0N O KKMM s A"D%B,D E*AE%%E*c[R"USURR5=(d S5nU(aURR U5 gg)zBrowse for source directoryzSelect Source Directoryr(N)r getExistingDirectoryr0textrUr directorys r#r3 SyncProfileDialog._browse_sourcesM44  %    ! ! # )r     $ $Y / r%c[R"USURR5=(d S5nU(aURR U5 gg)z Browse for destination directoryzSelect Destination Directoryr(N)r r^r4r_rUr`s r#r5%SyncProfileDialog._browse_destinationsM44  *  ! ! & & ( .B   ! ! ) )) 4 r%returncRURR5R5(d3[R"USS5 URR 5 gUR R5R5(d3[R"USS5 UR R 5 gURR5R5(d3[R"USS5 URR 5 g[UR R5R55nUR5(d6[R"USSU35 UR R 5 g[URR5R55nUR5UR5:Xa3[R"USS5 URR 5 gXR;ak[R"USS [RR[RR-5nU[RR:XagX!R;ak[R"USS [RR[RR-5nU[RR:Xagg ! N=f! g =f) zValidate form inputszValidation ErrorzProfile name is requiredFzSource path is requiredzDestination path is requiredzSource path does not exist: z/Source and destination paths cannot be the sameWarningz\Destination is inside source directory. This may cause infinite recursion. Continue anyway?z]Source is inside destination directory. This may cause unexpected behavior. Continue anyway?T)r*r_stripr warningsetFocusr0r4rexistsresolveparentsr8YesNo)r rP dest_pathreplys r#_validate_inputs"SyncProfileDialog._validate_inputss~~""$**,,   &8:T U NN # # %$$&,,..   &8:S T    % % '$$))+1133   &8:X Y  ! ! * * ,4++00288:; !!##   "/ }=     % % '..335;;=>  ""$ (9(9(;;##&E %%..0< ///#++' ..22[5O5O5R5RR K66999 ///#++' ..22[5O5O5R5RR K66999 ?  6  s!AL&A9L" A9L"L"L&c UR5(dgURR5R5nURR5R5nUR R5R5nUR R5R5nURR5nUR(aOURRURUUUUUS9 [R"SURSU35 O9URRUUUUUS9n[R"SUSU35 UR!5 g!["a>n[R$"SU35 [&R("USS U35 SnAgSnAff=f) zSave profile to databaseN)rrNrOrPrQrRzUpdated sync profile z: )rNrOrPrQrRzCreated sync profile zError saving profile: rMzFailed to save profile: )rrr*r_rhr-r0r4r6 isCheckedrrupdate_sync_profilerrinfocreate_sync_profileacceptrXrYr rT)r rNrOrPrQrRrr[s r#r<SyncProfileDialog._save_profiles$$&& " P>>&&(..0D//446<<>K**//1779K#4499;AAC ((224G||++# + +%5# , 3DOO3DBtfMN"WW88 + +%5# 9  3Jrs<  "{P{Pr%