HerculesStudio/HercStudio/icons/modern/interrupt.png0000664000175000017500000000533012065055244022304 0ustar yakovyakovPNG  IHDR00W IDATxڽZ tT$$cd_*DRKOH[K-Z@jSb8R ʦ6!AQa Iʒ2lI{d2{O7o}]bċ\rd4u^O~{ 010@ځWg9*h %`2P܌5V`JJۃ2VХ yq=߈a+,4\ܥ4MQ߃$5v`.E :^ͤT32Ms*ԁbyR%V*|.":p:u[[|@V3ˣ`;C!HMOaF(J2 .8FC#rxBg샕9i)joB %`~D[1wd7)Z"A;׸(V{}z{P\'DBZl1"_)`fHĊ`0< #>e DӈNYxt|0C'r`}$eƻ9?xvcJE 8V>ɣCFO@!,?Ns_e=WT~4s<Va$r~ŔA |mj-YBJ[[w7xɐ` //j=Z~?Aјr$:X+%{iu /,c"ߺ%r͝OvCX] ٩(GBLGn|҄ mI99=Yr,^D ^_aFP+22! S"Йt 񾷞o^>+T=mNUﰺz s\d߾OKNvIr>_NK#A`[[(' 35gfӣG:=|r.]F1dّ\ nytމݘ:(1 q ڸ$מazuJÄ`,@p'/ h7 |]'f{i)n@KȻr b'[A>Yޢ4ĉL'YBeӧMד)))j=#sN5o= a;|X28bb{9鞯%rf͢V)99.$Hiq&&Ӛ$ j% Bcq/o65oVTDjjzyML# {)RǴjM@ɁP_GsKGo%ˡ [G3gF}3!K{dC4 i8,z=عUTÂcX+oE<ľFGM'G|{7%Egga<'*F}nI04smtЊPC}jE)5d)?? Srjݢ$rWv΅B4!J)dwl %\H:pB,G)oU7^Vj6L 8!kK_Kn kܳ>8e~ ϳ-f`e>g 4rÕD5w;NBy}/%Rt0 r^I]Ka6 ia~_&<í` ~LHO\/K;X?s05]FA|*2xFK| ,&6ZuBUW{Dr+~@b Wxi&1(>􋳳;0G4|:<XOJ5YutSlZ@M ݉s<|ޕE3]h g0g&Kl%1Q:x_aׇ=k d6ġf>P(*aa]XauQhV^R`3 iĵaǬ|Tn" Y¤dŠ-hP:n`/SD)cVm!={DTqTo7F8%, q>RoO_*D\|I'rnEVpdl5}!HK>;$Fϕ5v>Ь輑{y3Hy4@?WJTQwK$5uBsP^dIENDB`HerculesStudio/HercStudio/icons/modern/Pause.png0000664000175000017500000000134212065055244021324 0ustar yakovyakovPNG  IHDR00WsRGBbKGDee@ pHYs  tIME 9rגbIDAThJA -zW􅼈Ezص٦`If$3y^2{n`wJZNk~E\ 'U*Chj[/EѼ $ZHoـWu`im${c )K F3 idF-!)< 6B/bVqg`,Z4q[ Rv<ʁA zF,Gm!ɫAP$/d=[π`4š+*sFNh5"zKopr lCE@f4@>302f Ʈ>\\ 5`$՚Uі<-6^F5<:X[fjoDĽyJ\Bwy\% e{X߳< w9(NՈdoF95aTsoxH9շ8n%W \Q)[l"y51c}aI4W{BĹA{FY4Wu@\}чOy'!kD*IENDB`HerculesStudio/HercStudio/icons/modern/load.png0000664000175000017500000001153412065055244021172 0ustar yakovyakovPNG  IHDR00W#IDATxڽZ Xg`gP ~XbdjH7'DM(p@Ԓʬڠhv51ˮh8\AD@"3>ܛý_sZzwxQ|?+$I@|w7mysG_OznLP(K&}}Ų &ny7Sȕ#)Ӧ Kfju'Sw)}7gI>]Q^>sf(,Ғ1,88Ãti_?}+%EFOO׏RP*|=6NA' rtywM62*ZglԜ1dG yyWcGLIcb!uj`hd?߽;y.mS~MnTJntr< OHLX/|#G~F!|v%$.C]rEI tvtBjgv&[/X6m vc 9 g a۷mrM1}@kk3S##-86/!ܓKePVV)SVQBNAB|ο%=|٭[ qNkQ+a, Е!ƌyE0._ď|uE9= 8Tz0pOA3>Z$߷we`;644.Jҝ۷Yիؘ̌Ykd0joogmmUbZR<"n^|CeS(e*IqCCwyq4J"U6rXIM,\&h^TtݥDf7 ll*}IJ#FRVVx֭6?7g#_=*{yy%"jޥWPK@S (}ͱЂ'E w$  [|{WnnQ55`hh6\Ԕ2rT.lHst瓧L$`A{#SFj`Fk( Wy $H;|XR?2jtkUe>ׁش[|4R* %nZ_(~p .AO:yx#3fj'5I /(O Lrࡑjkm4+:dNNN tˑqn4dH 4G r|N m wR9Q'  =⌍&m\T@ Engϐa2If...l=(ZkE!!ȺdCìmK=u{zy/V#qv(__@_??#[[;nhJ%#J.2_QQa5$2J* NQM4G%}G{CN b^Ϻ qqv\aee=vԩyѣ`A۽а:)T%K􊳋3dGt|WAk 憏}"^M䤜 -}"0zLC .))aW._jFEc^(3;_d>gP`P'Xܣ0`D!1aA͚.3%Ei† LcF<ɅѢ5VmlIxqQtҥkf3 cMIA bnгٟs CÆIĄ*ѤQ%EI``3xuU5-q&?LlGO- ܓws2N@4jAzشq#*/3 B|V0ן8~9s*_8ã1Z*Na/g^lD ŇE(}ņjP@fy UNP}}|`RmM- @L@ANjp/2Bomٜ;q䡤2\8P=e׫TtRPsLLM5O5ׇ򭫫ˁ7*-+eb]РOP MϜɕ.^ѨtqF`A Aɑ5iPƅ?13"o;/`V֬ ~99:avu)_8@(.  07..l0VG! M?9ueKih8k8(`R5*: Xg!1 ` _Xh u&]8*3"">(*>`P UΏUx) c#*5tuU%8Ȱag>`Vb>Q8E›ubL~ F"0p8PNFF9Gg}}{ֶ=X *+-az BV0Jqqi S; :OVϊ۳GIIKxP5ZQS*l$JiJ VTdk04TPv/X6OSٍGC *#)T teb͋NoFԧƍdTV^ơ~!PzeF6#,inz22*֡Wg橯jj277wkO25VAUA{8(3;+_4oo}Wܡ-(H6/8C?֖V)+++q٩V$>KM3=ٳNU+,Ϊ*+24x!ѥb*8H=Z\>VLF"ZJ.ⴍ褠MF5,.IH HB)h~V^V&FPojZSpJ0_Cݹй._{QϢS2{=J4lO>L$ܰqSͱ*+*o8~ VUU1Px56KRTjGPX2ׂ577 @'phu8Μ> :Q:៪'O{xx<**DL< fc9P:&3W\I*j_,xp6Z7wB' Y]3cnt^8/=!G32d6z,e 7b݋?m`KpΝrF,U֣GKo?!"/z[n6:S!ߴ*#=Sᗞ 4ȚZ`DO{z؊Djƌxvsw~+#==cjd䲛7K@mDU&6]ޟ=}(YnYXX8p t($dPr*QOs9W^w86mL < ;s:̙2k+A1+ɫ^MGLt Wx:JN[~/>7YRr5z ` ;ڍP߰+/n޼hz$Y OATV,O}6&M{*'zLƍ衤Rstv7m|om MannSI+k /(xIQ3f2XITzu0'oW•4ir !REŋ G5KD:~񅬨833'hK<^Aq %%`'}'ɑB KDx=-2t{޵SYz|%%}|_3AiyҤ)"SiСWN0ؐ'4>my5w{Y?5+czg9G²^쑈&=teZiÿ9r$9}^(? _,OޙViλ[f5aI0&IENDB`HerculesStudio/HercStudio/icons/modern/Resume.png0000664000175000017500000000142412065055244021510 0ustar yakovyakovPNG  IHDR00WsRGBbKGD.n:@ pHYs  tIME * BQIDATh;1?۽!mBA5Ȑ k )1ڙtk-ˏZĔUUo3^[Mҗf[o 棽'=<~%g+,x+xM5i&r}zl\Rkt-*#l s|dG^S VBX R B] (pZ a @V$C://@@z*& iޯJf&NmgQNV+Amd?6{]B5%4 Uf @jKF#): &ScPYsS &OksJ!gDh31:+Jnjd[ BqΌfkYBVQBxD&s:8OTB9[ dLOMM $Q@ OKHlPZBx)Jp iH\!sR \&sPM { `7_HÇeƓ/p!5?- {A,so_.vJ6:?IENDB`HerculesStudio/HercStudio/icons/modern/Synchronize-icon.png0000664000175000017500000000723012065055244023512 0ustar yakovyakovPNG  IHDR00W_IDATxZ tU}U[ҝN'$IX%EԠs7ƅdgw ** (xDTY tV:Igtwzy&͚?Tկ_{X?bUtv8 MxfZl;{K5>&ȵǥb-!wnt}%+Zp3CQWjFU* 0* B.BD`䧶Wb7|wU!%w}l TuE4qL3&a5#X (Jג^\X]ui߾[ˀP>&x{LO)j1͚eL͂8S"nBMS JIRMてآNpyO2h&r柨,$0 kwm D8>1BQ"|A{dk ' ('+D4HSJ!?8jَ^Y]HdR.oLN; x8ֶn(_ukFn0,E>ˉ)EƂ"SF@N>EKO0-0H4pBc]wXִk))Y²o!0Ou@IAx!d֩8Ѫ$iqҒ{4 NEX)^k.}tzPwG[-%AwoJZ^0 B/;x|2h # &fX g Pf½I X&hjYRjкEؚ[3g(3wʕdfcG@+ t OP8ϒ= _ Ď4hlr)lubJ7+?#fՌ~d} Zkĉ2UJ<ƍC 2HOR9QXZ82L婃G8(K^8\% Odި_f/%,C(t=?IBg%0mSEf5j*1IVlqsyI YcpCsV!L ZYLR`@}>b)oKWL yF|"SjP>%N,k s=_)%XViwb@")9yO'fd|K4pVaϾMSXMdzc.E-8{^ "+dy?9>[ @~~WVlI ?gMHH9 DmJl'emXA^Տ6*UtEtbY5%_3xv-.5Bu﫭,#- -pze$\nfyF/gqO{Tl"YgK C2Ds;>Hiϙhq:`T7Ajw_z9RѫX3_3ap$@8FЄ۹sϦ@&!0rh68c8#Kʎ׼EOko8x@&%IT4 qp _<&HMg KЈ,^(ihJ*k/"xs 7H”^_.-;{8* "1.ˁV#Wm:q,yz@%#רU`:jǿ\`-!\hju0'P`ۮ_^UҗZ 1!u7Zb^%Z7@YYg9&11= Z1]U,F1huLVf swoH4'Df#D8t0>٨<2y|QbfFit(7ndD MmpjoMOν]K^]k[kO8u x%’Fq쵓 NwJJ4bh6E,Jxi)&K%18Em-v#^{d y7b,Ycp8Gx]qCјK@` ɵRGSgrtu_ܳF[OB ѯ\}m)q!A8wnB iG럝s)Z$۫d݀DH4ܽm:1G '_8w]R>txȕHLP˕sg^-3\vi)?hU~W 'd2e|DIENDB`HerculesStudio/HercStudio/icons/modern/Button.png0000664000175000017500000000114712065055244021525 0ustar yakovyakovPNG  IHDR csRGB pHYs  tIME  0 YPptEXtCommentCreated with GIMPWIDAT8]Kr0 [)Y {?NdE$/J(*!DAAB=OP#8q`;Sm.%{2_)u$.ﮨ+^ Tw@ԣEKLwUP8>W&8L쑠i-S55D04-ܬUw@SQ[n*Unx<*0>9 ~myՌ46[]0<{vE] 4Ф+6|%,.yklr$&g|gKqJY 3?KϰYŢWr'?0#t:ZYH(-f2Y3tnc +!rRgOn,1oHys|q[k6iزcLۮZrgll]y@ŋA>c.GcޢYIENDB`HerculesStudio/HercStudio/icons/modern/Play-icon.png0000664000175000017500000000462512065055244022111 0ustar yakovyakovPNG  IHDR00WsRGBbKGD.n:@ pHYs  tIME !# F IDATh͚[lYƿsƷc;k"VBBHT,bUPAZx *}灇JJ}h< jEJwl4ܸv8g<3I#YĶ 69&ψ;o++^ {u:tWC$>o|xQL_b8sKI9{&Ij燿8 X*cmcƱbCɉo {! B,Jr 8?a?-~p4 Bcc`(T%?>K'^ Mn{{@Lf:pBq}fc0v`d4qk_)Vb ϖ)ʊ*? a(~>}?3~ϰ"M2Mu> N8(WN;APFJ3uH-p^Cj(q>}?s|Oteb@(s8h'J6H'qKP䏧_w\;jitKB:DP}Ib^yJg)B(3j-p>,B<_'͟ '}8jv&M d/ BbûHWBF!0 Ԡ hPm 3>2h?&byF|#9zk^ӭ;2LA74)U!1 *keHuR13wVHbhͮDf.T~{S&Uo0u00PJARsm:!6|> !ćXZ \'hiZ RGKk-s njJj 8Fre6VjSN$AMn8hthM4&L%Nw"=+c ``H@!FH?X+ނ4kU9G0`“GN\jAQe,I Tk_[%dNUتʆTfhRiw px#ifwfmCVDM\K6#71l0(!KtէidPLźgw+ xf20B 0MFV64 4U"v4^$@ǔS>jJ= f}Ȧ0&w}vdrKԴ㻯 Nrtp-! 4!FfP.0ʿ?{Ss@7tKk%ݫc‹ml#.|BYTO?V>iP@~*NHY"םȌ18?2|<+9KRmAcqJ؊unګe:}i_]e30合HDTJ#S ɥw7墾%.2`wh G8%=XF|0V ӟjiQJqq~('ԩ] nMR?lj A_ˋs/F^T˶s-]uώ̳ k?8!>d,z |ZxqY.Kxe;  -t'4!qd0 3`TΕpomp=],!Fϣ_D~)'5k֪?e#!$9qFrHųHųת_zQ\rp,_ۺ؞ ]X4G69 1C\͕gի>x~0P0 !E(ZB~EWobg#HDb+iwt` H /Xo*ԫ=exdQ<5%I|l\ݔ%q&5DLRrUo#Ƽ6Ռvm` W 7R3nFepٖSgo./!)sr'.Ukvy?t?>`@YsU/ȏ=CY̪,KɓIENDB`HerculesStudio/HercStudio/icons/modern/Stop-icon.png0000664000175000017500000000403312065055244022122 0ustar yakovyakovPNG  IHDR00WIDATxYSG~Ê$xxQ37[4Iah˲ܠ&oEtwANslKUԪLUWwa<z'F,. mmcːHk4uܧL޾E{{tƦU#lEk ST!6616&\Gc̎9ATGcF/ڢQgQ8"Xo1&$ uP}pm/ؔ}{kWC]ռMDM'; 5ݓ}bg~3fsPS]uOh8n]=NՄL#zdg=nG?3ntzfGF.JZkewEGCK75PBms.ȁ.G^:p9\9#@Bd<8S2xh/FLi~(;W[^XM z ǝF3iC3ePYFWjl(tuo9w gy *("3bH ^;mrjté3P\ eEdRqpavΊd=J~Ipv>3C.x47:|{ڢ㎘F@5j$,yc3%'pJ %8ٰSN G W4@շ3%&NWxQ(4;#F>d#(+!#˟ xb$#Qu0˃m؅=<:Y3Pz.!PϞaLC:="Q"FVJ l&#PLfM˷Zw;Q{L4]1'r$8q:_OO sE19}\cQܾ׮yiћC"ke0nnĕ2 ?_=iS'[ޑQ,|I.UVؕC ;_NK&OכZƝvhyu4xb^kvWY58dPD9  :X"i0v W\JȱF8AB`>2(},\|O*A:؛c[ V$ 9Qr}K7C#IYX HIOcJ ~?sdJHJZ\rȣ+@Mg`{摝'P KCPXUBz͢IrT5 /'E g{ D8x?͖HN͂!83pާ[$hN[5M~ zd`S>(B !l}?e>@֪[LvL.[rJ:zsetd^Q&&= zt,BعF'z#34123XeR{ ky`@ΐ]B |%';v eGx=9ˌ`ve8@P&ܹ*ҀM!adVĹdGÐA Sxo&=&gNP빨\?n49X$"#/Mq"=@9Q24\@;HpKv;iֿ(':`$$$(:_􍇷isЀ1aC;-]YH vg Wh626n(:ޮͻe=ֵިVp]IіJ+{gV;mi؏Cx=OLJIENDB`HerculesStudio/HercStudio/icons/16x16/iconHelpAbout.png0000664000175000017500000000142012065055252022300 0ustar yakovyakovPNG  IHDRaIDATxڥkHSal;ܖ3/yFLQ(2$̠$>$!HАt!4R" -hdSNsv;B`T /<< ij d~.e$⏠q(Dy̵n,,H#<} rލoI!" xC W2( @2?Dh$I%Pgeq'oaW>(%2wxTer_c*| ~#a$Hк}(*%ɮa=g$eX0 'FqQ_ۅ#*E, ,fk"@U@ԀU(%C'p\"QhRO՛Œ+#>6 `~llҖVcr7 Ņ KTjR`d4|N4nZ YWX8|덓-+c:6 %Beuq/dz4ԡ*~et`^._9ƈPd;_5vZFXlx,G XwnMKKKL&7 J[;q {\!_*">/B*cmmml(%t*YYM&,.iEJ~d4H2"Pju{MMͫI&& 'iIENDB`HerculesStudio/HercStudio/icons/16x16/iconDarthVader.png0000664000175000017500000000127012065055252022444 0ustar yakovyakovPNG  IHDRaIDATxڥS]ha>N͹͟ )q*s#(1 b"-/]  ŮABeۍC0uA3g 0:GĆ]{9ys7Z:66b}ZF/7ZVR!|>Pש{p\WVVxEJX N'wB*z0|'s߇z {{{,,x܋.j`nnwqqL&t]( 0:: kkkf>NRO!zIR`ِH$i`bbuxxd0 Ʒ<f& 6 <J%t: bь3:^~988B4h6DZ"\. L&o`y;h4  0^Yd2(Q.{Hdn'A P.*}>sj;;;LykkΌYA&~}>\×:H"666h`6鞰X,ZJ9 o `/Y|dp& Bap8LbM] n-pqAbnWF Nf sIENDB`HerculesStudio/HercStudio/icons/16x16/iconStop.png0000664000175000017500000000106312065055252021345 0ustar yakovyakovPNG  IHDRaIDATxڥKSQvvs-jFmEaGM0#'!B!DiAT$$ +mtLl95w x3;p9:^\D=xڇֿ{[j ;Ҷ+raS:v侎'ۈ}όj:GhkE؄}hWiyPlpYySVb#׈j gV=TLP3ag|yNTuX^Pa]Y`'oS̺ hB*ǧD5ӇtOGqs vG>$[&lQ 5-cwBAo_`e,Pw]N% ٹUDDʁiT0 `fO uzC?@ ʧyZ{];nIENDB`HerculesStudio/HercStudio/icons/16x16/iconCommandLine.png0000664000175000017500000000035412065055252022610 0ustar yakovyakovPNG  IHDRaIDATxcd0*Sl@w])@uf1p8mJ 5t4ܸ^K7LYb@C.ضI .ȈaΤ%!Li ObԔU6GL}&&3:ݐ u\Y8г`+eHabJ[:pNxIENDB`HerculesStudio/HercStudio/icons/16x16/iconPoweroff.png0000664000175000017500000000122712065055252022211 0ustar yakovyakovPNG  IHDRa^IDATxڥOHQ3;Ͳ!RoDh V(Bx:uuQ%= ١,U'Z gewoz.>~=\h }N\Y4!p\W;MՋ[pqB!òFT}# kt}tƝ B,O@=g`1/$<ߒ%LX\'odQZ+I`7 c,[}>40OP't0@ߐ ܬf>ݎOk7zaƲ.-m s[U\n8Bg\^70D*ui"@/_z{Y'?WU_r,.6r:o=;*4_Qj@݈ Wyi+渚NQ<|DU$Ea-A+N5aQAs8@EШIUїEe(\X( zϽt`QD=cY ++ RibvZva.oKSyS6;7LƞRYQƴ@fix&@u67'Q3SIENDB`HerculesStudio/HercStudio/icons/16x16/dasdconv.png0000664000175000017500000000135312065055252021352 0ustar yakovyakovPNG  IHDRaIDATxڕ_HQƟos@򢕚 )g6u-,CBZn9ʋH 5nelN/mI7I'Nm.f;HQi/<;2 Rib08|>?7v{xXdJJ|*FGl (V])l".!#%%ʜdee|>eZQVQ/MHH$N'JKKz<E##H$u{^@h1/ǹ9l}@OBPP7C澾7: 5A$AAAʮ@ 8 yy |o}YH55ZՋMeD AC,\pL:pA=wN 鮝F0P(8ƢY22 774 zNG/#-- {{{XXXkXU]E͖/mmm'(Ucbb(ro~T\^^8;;;0[,+&IF'@ úYd20݅b0Bh4H>)Zjkk)!#pԡxt8@T*s SntWv9@z\Ȳ8HJOtKǹ}Q(Hh') ! IENDB`HerculesStudio/HercStudio/icons/16x16/iconPoweron.png0000664000175000017500000000121512065055252022050 0ustar yakovyakovPNG  IHDRaTIDATxڥ_HSaƟcӹ1ö$6DtmXEKVH]aUAhAEWE$B.ӊ KmQ&HXrvNA@q{;\d5.N !T" cdeft~|!_Zs<*q/7gT'@0MU'|oOu+`F [2[&?k6ݴLj`G:_3+:˒*1hy8s= |nF|p+sDON{@d#X(O6|2^=d}-chT뀥:EJg+r#P} YV#@ث39<CR&n\ 64ZG)G^hhe#虛r"#)Þ0je2* rT:5\˫ & tf:`9M *DTW{5}Д`ff\``10PpBƯE w%A6{pߔ_+TEn@&Ӽ?n/+Ayg1XIENDB`HerculesStudio/HercStudio/icons/16x16/iconStart.png0000664000175000017500000000124112065055252021513 0ustar yakovyakovPNG  IHDRahIDATxڍKQǿ-)W37WS^BBH`DQ[/>RmQD}!#θ3;8w.ss uL 8TfF#>+Y }x̀O **A:A,΀P˓z<}H,0FԠ¶+pjDR;c a/<{%?vD\5*mq Fޜ3.ǧysK]Ai*Z؅ I8dob1OLG;QQA[k"XmeQ!bÝkp{M+-¤H-; wLQr1)ug5 Ƣv<dIENDB`HerculesStudio/HercStudio/icons/16x16/iconSave.png0000664000175000017500000000061412065055252021317 0ustar yakovyakovPNG  IHDRaSIDATxc_1CcҌ Ң-oa&O0`Bw, pj{]2 y6y&DPv ؙj/C LXL1=w b 4Lf 8xê߿0yABBӧO #-1 3l^̐<h7x<<< V[h3*J1|aն`\N0 ^=#BAMQa ICd&Pxv ˢy81vJv\USnIENDB`HerculesStudio/HercStudio/icons/16x16/iconsave-as.png0000664000175000017500000000145412065055252021763 0ustar yakovyakovPNG  IHDRaIDATxڅ[LQv+mCEEAArTI$j1"A$1FIԀD胗*/+(1TQn]XV5O'3s3z326s"- ~J Cl_Uy긍a٣ߣD Ir)*9 "ck $(G"bE1.1*27Qmը V`VʲӸz=gtl)D ˛)(B׭ϏPU4(BwK+®<\iʰg*_VbfSjJզضh8^v6 yastŒ*!KDDduYy(Zry ʂ7(P.IAfLڰ`"x>_{W@-Ve'c|Q) PJ<'9TL7bK<\{bQs&;:xxO 5iF7j~03:>xV3(M(fs{bb쑑QC^a?y,46> qܨܡlu2@=$qEcóu:_g }g2-7nw 9 ULQ%o;x3oIENDB`HerculesStudio/HercStudio/icons/16x16/iconPreferences.png0000664000175000017500000000163112065055252022662 0ustar yakovyakovPNG  IHDRa`IDATxڍ}LU?yvzAr6Cnie9$9Djhl,Xo ?\9kka- Ƥ7>e\x\l?~;c}}~-]ow+Ӆ&fw HZB"F0(F8G'}>)XI2DJi躾H$A³3LO==2Gx7>1_O\Q9Eql[RL$4BR]=FwrFu0cğG9Kt|[%tHc0Sb i_;lxJ=磳tz'/X<,Ajv_eBY kkB$}Y+)_Op̚UrsY悷9{ ۛ1CTW<›{} Ugӑ *K<ģQ+nz͵1N06ipa$A#<sX3Xc=No} sQNj=i@y(w)W39BszByDlB*9d}#¥C[+odw AZU Wnq/ @2JÓ\y^Z8RvظAF./剕k? ʺ"M:%)MsÅor Ϯ;:kZt]S*V"PRra.bb.U+];ThRȔHR.P[,W ŀSՊRE@R|rW1EV!g$"IENDB`HerculesStudio/HercStudio/icons/16x16/iconDevDelete.png0000664000175000017500000000146412065055252022266 0ustar yakovyakovPNG  IHDRaIDATx]KSaϳ{ݜތiQ&F1|)DCA"2#%1C50~ǐt)jJh 1|!H|mͻ^y7S8<<oiSkuzK=+[a!D<΅8#석ۃ(в,UV՛ssAy4mo×iQۚܣ}Q+gOUuuH08/N#H٥(c=@r * B`|89K*5|X^Mr^R[gr(l) d 5  &gGW/OuM .zR|x|bntFChR׊B;'OAc( /ݿj$9*=/רbQk0Asf3D|>X ʀ [ BI

~t$vH#Sڀ>^MIv:ҫ%6aL-(mֲ^m5RlPd/&{\x1#D\ր>Kq.>#$2w?B2kDvߡ99EJOTpzne6IENDB`HerculesStudio/HercStudio/icons/16x16/dasdls.png0000664000175000017500000000135312065055252021023 0ustar yakovyakovPNG  IHDRaIDATxڕS]HSa~m&i"a4^&lRօGAtjNY6ċGJHl6g^H,E)7&Hh[nl2 ;y}(J$SSS[p|84;;Tƶh4jdy~?Q$oxб|u v1b\, !2!ө$l%HlD"LNN(["v不jl63ccc`08HUUk6ى֖jdMfaxx8*}XG8mq:j]ǿ:#xvpGX7AV dz( OD/j 7g-%Ig Je!kP m>_yvL8N3ؽrKzjfFyN fʪ7޼-p*̏k82lt# ~$XrPz8I ;n8i՜q[PھB XJL ,l(vahuri/-JĴn~RuxlɴݭJ(.*1=44v)bt:hFw(j`5 j Y̯'9_6 jI5 Af v1M@s' Q7ºA,vg-T>+ `zUI}t#USg-&ֲ#OeLZR.9$A!|TLW c~ݹq-4|Lؿ+G"TIENDB`HerculesStudio/HercStudio/icons/16x16/check.png0000664000175000017500000000112312065055252020621 0ustar yakovyakovPNG  IHDRaIDATxڕKSQǿN Kۈҋ&^h/ʐD)P"M" %*- #PP@5rߢ2;5==ޫLp=<DZh?&Ħ |]bK>TX# ]OY |TXQx#YQOp‡jwe(P%;y@1 Lfqs|2(pL~'u3ӭiA42-c [ H9X"˃Wby%Xkx%z5[NL,@&B-CχN\l# DXc(9uͥLs"!R cw Ã扤C3>{EMCƋ FWu4Q!Jn63/F۝ |lBU3TzF2_q MFhR |fF%pMcAaS=q8Iĉi?eD5IENDB`HerculesStudio/HercStudio/icons/16x16/iconMasterYoda.png0000664000175000017500000000110212065055252022462 0ustar yakovyakovPNG  IHDRa IDATxcd0^<bt͸h\ggzp20h3ܾW=Gc? ?SlZWg5?7 & O__Z|ه(d::J}_N@P?ffn! ,,$X XRJk7۔[FNNN&UI!Ws ŋ;?|{* )Ƞ/坟b>×ϣbBMwst߻ȠpnO(+[ }G\>hϟb-ǧλXdfhPc%/ʓYjo}k4YF=\gHa?3.ۖ^?;8P·s}}oOݻIRJ :YIX@T;O'.IENDB`HerculesStudio/HercStudio/icons/16x16/iconR2D2.png0000664000175000017500000000132412065055252021071 0ustar yakovyakovPNG  IHDRaIDATxcdbRX>~xwcͲe^aĥ9>.:TDh/x~~}oelIϴsg2e3f:eG ]^<=E48yZ0A%ëN^]4~DGGǴ47.\ %+Õۏ*K[bhXh^#Nji1bg+u V>ՀЀN.^gdq$+k~PZZشbѢő8 ""b… aaǰo6[n3\|çWmX=%O2s2gXa!jEq%6,ݵe};P MssX0Ây~;c̔9sM۵{O>P |||=JOgg*]x޽_lKߟTÀXϟ?6JJI {x?gd[l*5 M Oرŋ_wޝ)//Ç@q߯_gMLL_| Ưڧ#;w<َ-(4ZjO?\ €`LL^^^޾}{ɓS xiu  IENDB`HerculesStudio/HercStudio/icons/16x16/iconDeathStar.png0000664000175000017500000000147212065055252022303 0ustar yakovyakovPNG  IHDRaIDATxڥmHQn>lTJqV*iXB,"BY )"*-){cSf$s͵g:bJ_:9{Ϲ?-l623NWg,6L8&]c' $_iC*MA|X-݇.WܹL]Uۣs|5bcN';'Rn<Co.܂ؐ@rB2GRb [mD*X%kT7N0.\=Ȗ/ Z!5=u|y_QuWQ<<||7ðeO^<ذ ](Eb_SsQ"P_qU%G=\+Dm'Q+Vg R+8RyX_W _,ICdDT봟FɀgN>|yW$vj4LP\Q\R{ 9FEy0b=o@ `dtP8?OUa6 jT$ 9ONaf!AagӍKeA (Z,0JΠ{‹I>,Im [I󗻭*:+ p Fk#Z#bb!\ dy\uGsaw4_\PZQn2~ò'i&``!z!˴cOnǹ@pyڛ$N} N84f AM*N>IENDB`HerculesStudio/HercStudio/icons/16x16/iconControl.png0000664000175000017500000000140012065055252022033 0ustar yakovyakovPNG  IHDRaIDATxڥ_HSQϽ;7ҵܝsoV|H|l-}|H E !!z|*JI"af٠ұ5wz٠ftp~9φi2j۾^m]T)^_kxQJ6wS얏iquۮMo廅[ִW#X̨ A҇E *0kr6i!;չ\ ζjzWhWHV)(j.#$Z@>#?ط{ pepWc1 Bpm j) QgPPW,{HBE'*d>סHejPUUA˲ E9xn L&;rS)Ƌ\yx)6555KZF >uMFjIJbNWA(@`|ff6<җP>000 9@. IENDB`HerculesStudio/HercStudio/icons/16x16/iconIpl.png0000664000175000017500000000123712065055252021147 0ustar yakovyakovPNG  IHDRafIDATxڍKTQǿI3|X#,K Mh NBNb *sS%4&B"BM9f7 |?sx"AW`}r\X+j H0 qAMJxꟀ+d(kkV`&A\HjO@bDGӲ㫄&#GNBYJR7űTqh`VN^셺a5]1KWi熝kJFPw<ڲ6TUut6GDQ|IEp }Tl"];h^^"]B QuUMG.YuTK&rjV#N0qӓp'#D*+PYb)l Ȭg0<`i8SwܖI`+ %+υ-\#]2F a (blyHXV2b?sތMD_ƶ`;^IFb02644ۮ45H`׉]~^,J_oEQݍͼ_W`Gu]"(+%R?0IIENDB`HerculesStudio/HercStudio/icons/16x16/iconEdit.png0000664000175000017500000000111012065055252021276 0ustar yakovyakovPNG  IHDRaIDATxڕOhPKML'ۓz*=;x^B ÆN&AVm:Imlf,vkTq2JGx/}_B".E4jڌ붇"r!JAHO.rO@]m$Aȡd2Yە!JUl(W~`yUJsGB>ڬlB~Hd>nheс0Xrtbfr|gWWp)X-4= Mֹk\*Ϟ"Z>ڄR1fo+,]>joqu(ϼ"X-É; R%ܸ~=U%0X, ~p>@Q=`3 zF/k;(4,WOryhb3> ϣTq fS./n9s8c`P$pX- @Gєh~eeˢ(.?|6ӹ y0 q\/ lKIENDB`HerculesStudio/HercStudio/icons/16x16/dasdinit.png0000664000175000017500000000124512065055252021350 0ustar yakovyakovPNG  IHDRalIDATxڕS]HQ~~C`(#Wb]|ZXuS+\IJWA#KŠ͊]٢&~8~9{s+B8͘z<tttL.f2^wjKqo57SaJLFɄN&inVIgg' orw'>#NfaXre|~ysj52<{Q8[XTB@0޿>*V=~~XJ !0WhhPlf257;?CEy#G X9b4١A&HT DHA@8R:@R^ vP0E9FQ㲔T7zr1yC߭tiRt:t2HkkkEX,6)TV1<<V{jl33ѱDCrj;Bt:iX%Pe _iRI"#Qb@זZISIENDB`HerculesStudio/HercStudio/icons/16x16/iconHelp.png0000664000175000017500000000151412065055252021311 0ustar yakovyakovPNG  IHDRaIDATxڥSYLSQ=׆RVD#.XAT*.A\Р($A A(F\bQ4#E ȦJ->01_sL̜3CFFF0# q6Θ:G}pSe̛E!m_΀P|['kg^Ha"` JN'cDn_<ǵgw<8< EtiYeR?D^UwkݛF@f Nq"~] QUR\H%"J|hX\2l4t& עݺ8g^eΫ6?((.I%`jQQDz}ї߶f&dLxŎix].}11)N.{wo} aÇ3|L{7 `1K)`eg3ad'SDVUm۶J3PF+8y=<={ދT@񱘜B9}#P'#T;7/?zI ##7H?@|+7o} xy$d=M޼x (&ĜPyw޽xQÇ߿|3[o@'9aOyx|<0f;, `f``ggi; @ H|۟?~/fXE)3 3; ;3+##Xǿ #i `b t)%E IENDB`HerculesStudio/HercStudio/icons/16x16/iconDeleteMessages.png0000664000175000017500000000115212065055252023311 0ustar yakovyakovPNG  IHDRa1IDATxڅOhAƿMP.=y(6"zHCAz\5VS{SATPz`9KQe٤:3;Y5:~<Y4qgp_/. UGjst! _>9VQ "Zj'WKG3HEdb0g]Q0,`jnYE&u9`3}*tecKxweY3P䃌AeTJmp}==NwUű\?h&8\^/@~ olϣl@{`e 77[\ F-Y*,A<Ȋ>U׸Ʌ$Irig=qK7t1FK`˴dآu蟛&nan*鳭I;ºQTgguؐtH3ŚL,;O~NuΜ0-'q/ؐC/p2yK4@$X, TN$giV ?_FhIENDB`HerculesStudio/HercStudio/icons/16x16/iconDevInterrupt.png0000664000175000017500000000062312065055252023054 0ustar yakovyakovPNG  IHDRaZIDATxڕ?KPMl&ihT+:Uu"~' :9t(H⠒6$/Mkߵ ڗ;=!нVpn{8*?UX?@jU}#g8ˊ{UGEzT0i*&yqv[* q#py'AX_dDkK/X.Aϖ@3ށ8Y($KDQa5k~hE*.‡6Tg wHL:ua7vЛV5,Чi 7L}܄IENDB`HerculesStudio/HercStudio/icons/16x16/iconInterrupt.png0000664000175000017500000000123212065055252022412 0ustar yakovyakovPNG  IHDRaaIDATxڍ]HQݻw#2yEt!Ptc/jEE>|]Sih. (JEb\Jm޽Xc><Ndڨ'hHahLM`weJaSMU:+2@L>U؏걿HM8o)xrR]XtE(pKtw()u<-;(aglZP05֩eqiDzAݩC"JgM*?XmEՋ.['e٧˓]Hy k (>|qIENDB`HerculesStudio/HercStudio/icons/16x16/iconStoreStatus.png0000664000175000017500000000064612065055252022726 0ustar yakovyakovPNG  IHDRamIDATxcdE4],m:/pc%jQFF֮.߻B^NJgmddfgt l3>s9 ]#~kI3DwV=LŻ/~GNB3.``l?o| 1i]kϿf2o3N=)kwgK|qbU3>{^wD@Uոʄ4 9 PsVΏ !! OQi@zI12JMMmAL%HJR#7 m2s. }@V7XkPl3Kef#PF4ks =[Ё8{Tjuk\vE$~69~c_)hZBzf)ւE&/u8<(JnWgnŅFNrvw jgOFv4RP(m6b<a, A.n{2IXP8cPmʳ0 ˽QŔJb1İA%1 tdP6TT0L$01><2L`g>~QqqR[i$ACCW*V[VD LȠ8ǟ/]jo& t:]`0|>rrrpthn&l623raQJ@Ex1jӡqhU55z188(#$^,@ QФj !a4v]Mp{tF$7Ā%#s>1??V;"<22H$i\C^!/_Ǔ m]dMӜmEm痦gd$|>-uI䒬U:róB2;d:\IENDB`HerculesStudio/HercStudio/icons/16x16/iconOpen.png0000664000175000017500000000101212065055252021313 0ustar yakovyakovPNG  IHDRaIDATxڍ[+Daރ ~ .( JJ(JJTDC=WD%9i{6;fzuo4|oe"rCh\/U+ Hy P Q&_e'yxKXS ==ɡ͞F!VXP`6KLjj cmBu5Y|m0x˘B$E6ЂAd /"[<<ۼ=gKT$c<Օ=دZz)2fbZWɛ\]A®ԒTB'YW腂ӆ!<<.m9>3K%mCo_9 1~ Sv} ~2hduis=7A6Y nZg$RDy.UIENDB`HerculesStudio/HercStudio/icons/16x16/dasdload.png0000664000175000017500000000144712065055252021330 0ustar yakovyakovPNG  IHDRaIDATxuSmHSa~1ͱE$0)Qjf DHa(BcQdyhHJR+a ίms2 V3ſD?pĦҘCarHNNNs8r\L_=16au.,,لX`̳pkllcؒbP( Xvo;4cV Qbh FQ$$$Dn nZFy@C#H$PH)@dzz^ www*8a-_+ 8NphVөV+N~Y/µg)G(|p#RIv:9&**BD Lmt>G(}'0=4J%[DJ0ISwWeHQBXX$>\C&$l6S.`~I<7 [PPNj.%j26BB ԿA>$ ZmC6YFaz 0>n_ߍĆ6HR̔`01>++w`"Dx\yE3'$[(?Wnۧ[b$l6[+w.x ַ:y,k:ƺ {.!~$p#`6k{`.UIENDB`HerculesStudio/HercStudio/icons/16x16/eye-traceCCW.png0000664000175000017500000000166312065055252021770 0ustar yakovyakovPNG  IHDRatEXtSoftwareAdobe ImageReadyqe<UIDATxڤS]hU>gF[HM͋BRhDEjAiIXT1飊` '6-ZBhI$߽N+"y{swAB?F혜g2ٓQU-H% 2 c]uvn<28{Hl.w#iBRzmlP+Dwfp;_ۮ*d}  fs'yrlJ eN;aj{bO3Yj|CG VK/>U]I 򆦄#QC#w~@F]“O5jpμ d\˳S'LʵZi )r.FsdL^_K,2B03MB 'TPPЯiڡvcr(%R0 gO2n(a}Wvg+fc٫|pJ Hn_1@{bYءNikq ő@p# !vf3i3 *CGC^I]̐Ì(BT# s!#"d4vk_vG>6/#eSib6%8u8r;a+_pA?t4͔o-6W']8`+BQ)IENDB`HerculesStudio/HercStudio/icons/16x16/dasdisup.png0000664000175000017500000000142712065055252021367 0ustar yakovyakovPNG  IHDRaIDATxڅS]Ha~$ IB˅ ˼P$tl StL3 D›i[:.̋D ![Xa3?e*A93Ew<;9TIT.J?>m6[i7ݾ -===ys+r1AYY@ P(^ ( ddd`}}}}ַ#{ږ&Iҫhd xuw7Aff&tTZ766B|>[TF1l#!4(2 135[F_mmD1zZ PPD:I4>c[jsFMMjb1G0t:oC <bR#k!\(͡hʘ H@:}C j)Azz:[o6>OLR< ]~>BH0% HRRR.).flxىUUxۋiD,jkmSM.df73; yy ;*tE uuuoJRQQ7::X\\˲R[LgULL HLlllӽ;%%b˅HM/Y^Z|DO^#p8nC!p|aL7 E >: C;@%x>Է 4*3IENDB`HerculesStudio/HercStudio/icons/16x16/iconDevSStatus.png0000664000175000017500000000135712065055252022473 0ustar yakovyakovPNG  IHDRaIDATxڕkHQW47Ws˘\jE }b"I]巠B!I"#fiE ^@)y /M8]["wogTTr;V(:II͠ioIy9,,zu yO\&t/! d^7J^ef繥O~HBh۝,!1Ʊ -Q{QC[|G]LZL}[ I%dሐAπO c˔訾=RcCJ)$ȏ& CM(-̾K$gQ#6LO H7f4ޯt5?W ;n\oTaxՂu ”Jnrb2c O4b*VFC?鋭.sXSR-@_joi7Fsyu;7\'U1ٷM Qm%CR#FU]oɿMĬӍʻ-T\q>Eٮ7l^B$ EqicX<(}]IENDB`HerculesStudio/HercStudio/icons/16x16/iconDevRename.png0000664000175000017500000000133712065055252022272 0ustar yakovyakovPNG  IHDRaIDATxcd@ںݹʀ<\]=\mV?ɫgDVdꛕXn@rc꤮@-&ҏ~aM\Eㄾ}Y.):)hFޡ )-sJ}^v~{v\كl@|QjW+Ѐ3j@lj]SSX ##i'Zv#ڜ 4/mvo#4u= =My~[7>pll@\juLJ?aitJ,L|Ro`9 4OP۰Z //_mߏ`f38U9#';e_lK3kv(a³[O|tC17#33ㅭo7@GݦHAw~o{ Ff^ Lf(~v?1*O ĞpoΣ?s oo2`%Z(7wԔ?㛫 ş +Іd GfƏJ>^~w'B z^f8_31h0H  CIENDB`HerculesStudio/HercStudio/icons/16x16/iconExit.png0000664000175000017500000000147412065055252021337 0ustar yakovyakovPNG  IHDRaIDATx5_HTAuQbK=DFWIID"LɥR!2T6" * (%P A2]umgvlpg;wF!c'Kb> TzeyNweelp|~ڒD>E"Kg%նr:nGvIM)2)_::hN`Vq1B07g/X]IoO N VXH}c]ՙ=x~hQVcc$Gz:BI "~ lN۷C |!Y^w00{7op4(E|!ձsg@Ó'p2twCk+lAQ<{_Ľ^o߮٪>~4--SS'?KKP_I6 ccݶwܪIBx.^Iyjr元mm'A xzzIM)Ғ憃&'5-`7oBoaƑω 33lh>J6 -څ\XxC3gl%5%GGax, 23a^3\dď6>MUUqTWCvY 33&3=ǎQH gȑҔAz }l_={ı)X*t99WvJjZ4ʚ.KrLy5 &Jz, [*Rj?0a^2o$jGŃĬ;zIENDB`HerculesStudio/HercStudio/icons/16x16/iconPswRestart.png0000664000175000017500000000136412065055252022542 0ustar yakovyakovPNG  IHDRaIDATxڅ[HQǿN=͹y *!iDQ> F7BSJ>>5ftBМҼm_:₩=ԁw9ߗfHc53`Ծ y䪡g贖jt2T#.'#J> wv"<$eiach"=׭ 1t3"I3}hCI^xhV݄d'uF$8ޮz̥$/6#,p +/V 7y^;8ﺈw#$"𪀲f3(!K1=degYs_D}o( @zBT@q/=WFEL(0pE$aBP.aL*bXe!S4ho; nt^Q~׋.i@׎J >?FU尕7*'@`6u}Sʢ~ N{GiީC| 271b}=pa482p)R`:hǜ$AF*CA\kAMOjNL-OĀ # }DRjlб-r Bb+L^sWct USQz5OPSRV"i(XBvQf,P3MS3ͯgʹ;07< ) IENDB`HerculesStudio/HercStudio/icons/powerononu.gif0000664000175000017500000000071012065055254021156 0ustar yakovyakovGIF89a!4  >7+=8+>8+>8,@E9LE6MF7NF8[SC\TDg_MiaOjaPkbQun[xo[xo]yo]yo^yp^}i}iºۻ,!@`4+Ȥ8$.h*NvnEY {X+z^ZXkP~_]1+|)FX1,{ &  "x)0S0wz ! % (  '.#.| x  y*΄RS.)(+$(\S2-Մ+rDτ)G`d`"A~(R+`F( ŊWb\Ǐ A*IdGML2@;HerculesStudio/HercStudio/icons/poweroffu.gif0000664000175000017500000000265612065055254020772 0ustar yakovyakovGIF87a!zz)+YY :88868RRPR3111a___<>IKyy**XX |cey| ^[DDBDrrX[##SQQQ2000FGWT==;=kkLJJJxx+)))WWddx{CC[Zqq$"""RPPP]]<>4O j;VV~q] I?u!!< ||(^^ /yyeG)0ff7RRm~Oj;`qB]xx$?-+ZZuu|WWCJe,vvGlbb]`}}NNDii,!0U˨4|)# D "#Ġ  4UQr-#h$R"F<Q`gP&GpBCF|^ У"V)vOv43ƣ #v'=7D!k<8^Uq 7` :Gľ*<2"꬧8{` ^xQtUQ#vko[.^i_?HerculesStudio/HercStudio/icons/terminal.jpg0000664000175000017500000000113212065055254020570 0ustar yakovyakovJFIF,,Created with GIMPC  !"$"$C"'!1Qa2Aq" 1!Qa ?ݻ#bf,ܜBUF40HV XJ1t_06Ke&*եZ~eJu-bJd!Y_{[1wd?8Mһ+D*-uf {yUWYqcrֿV⹥pq3\`BOM$ac;]摥`v}v )԰l,L bYu`A޼9j:j-Qd8+ԅvQ HerculesStudio/HercStudio/icons/do_checkbox.png0000664000175000017500000000052712065055254021240 0ustar yakovyakovPNG  IHDR  pHYs+ cHRMz%u0`:o_FIDATx\N@gL,, XP $w O@ ;hAr(Oϱ@ab,MI2?#HZ;Ic[!Đ>Iʲ|޿朻 R,˾8<*O8>7M(H{RaY(`ƘqO'jgDQH9w!pjrӪWUI"̚ $n!IENDB`HerculesStudio/HercStudio/icons/yellow.png0000775000175000017500000000603212065055254020303 0ustar yakovyakovPNG  IHDRa pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3-gAMA|Q cHRMz%u0`:o_F5IDATxējPk%B©SGG_o3/ѩ:9w"b`It7\.|,8'E#xH hp=/ m9יd 5B\o<&ֆER>{:nIG5d1= `h1#jH#H%IB;Fq O =B3ek aϠڳXZM`Ju ;,fƕfd3 bٹO V}J”eok0rΒIENDB`HerculesStudio/HercStudio/icons/yellowhigh.png0000775000175000017500000000575012065055254021151 0ustar yakovyakovPNG  IHDRa pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3-gAMA|Q cHRMz%u0`:o_FIDATxē?jQ٬/ Xx˅@:,9=Ŗ,,d+\@P u=6@x3̼ߌ*X:Ĺ`(8h".j~fj3`hk`< [2v͍k<~ccZ*bDQN6&@ A$uJհqd5-˧#Bm$$yQ9|XthV3?ũt1|MkyRlmj*":\K )!m!!Ny'̐HerculesStudio/HercStudio/icons/do_up_arrow.png0000664000175000017500000000173612065055254021313 0ustar yakovyakovPNG  IHDR#>SiCCPPhotoshop ICC profilexc``$PPTR~!11 !/?/020|pYɕ4\PTp(%8 CzyIA c HRvA cHvH3c OIjE s~AeQfzFcJ~RBpeqIjng^r~QA~QbIj ^<#U*( >1H.-*%CC"C= o]KW0cc btY9y!K[z,٦}cg͡3#nM4}2?~ 4]bKGD̿ pHYs  tIME &.KIDATcAb 300眝{?r>[vǽ7ϙ>i0@}IENDB`HerculesStudio/HercStudio/icons/interruptd.gif0000664000175000017500000000264412065055254021153 0ustar yakovyakovGIF87a!)+YY :888RRPR3111a___<>IKyy**XX |eecey| ^[BDrr##!#SQQQ2000WT==;=mkkkLJJJxx+)))ddbdx{CCqq$"""RPPP]]<j0l1n24o6q78r:t;u=?M w@PQRA>.bklcn3rs O-0"89/Z3`+3Mde%YQ!mZחbܹM+ TXxClj p&,Q28XQp>xL Vp'mx=8[rfEBF-a& ;HerculesStudio/HercStudio/icons/opensource.png0000664000175000017500000000621412065055254021151 0ustar yakovyakovPNG  IHDRC<=gsRGBbKGD pHYs  tIME 0lNtEXtCommentCreated with GIMPW IDAThkp]usi˖-]J.!tIhڲH6I3ftڄ餤ڦ:M /@0HrҩW$6dd{un91՚3skX[ nrܶʎlnNGj=Ft9c%sΩ݁H+L ]>S`l).[f/ѐ* *clı>~%˒iwwE?Tgix]4$zE)"u:gUQd^󱬤~g*j݃=(0w^GEK͵R\X"r?UeOjWUռ/hb0&Ξ| X*HMMh&*coOK>+͡ƶ7lc-r,Q YNb n*+C$_L3Gw`ݲ ;TT5{r(I'%;zSI':)*_ej5@\,TAJc5n] -uOQ*r(!Y*!52UW/շdNdWXـ8aZVXփwn_V0ZKT6iQMK7\nS(p5bT mhE]?pPBB[*G`?/uUTnYR\||S`zKMe]b2UU$8$%u7Kƪۮ 9誒R\<ᩯ9 t{߈=z~*%!KHT?դ!\ ZBf,I~:%0F'}7) p͒us b I coe'RE[R0+ y9LqU(%#LAsAGSBS NI"4 (,y/`JɚrDڰ9Qpe VK_dz : L=% 0PB@~/P`n*b[Z\ET{k*^CKȓn2k ZR8jw7ןZ]M"οnע(3{ eʋ+,9ݯ|"'PWh㊛(|ջ x חp',"2rp~qj0~n@U G@us 8z$􉳈gw^ X>#;ꑰ5<I3x e#o9_@-{wMiܡP",ѱOXCƙRK^b."46c=nI[?=miЩ#gMSS%{:*ߞ:2B\VN tt/rL*3jc!_"dFgJUOOt8`݀~d GsR땳"s֋"e\}q?5qpc[Z>6ng]kKqjYe&/8!*%Hvq3,sydCϽ-^YgWv,*SW*k6,}o=?N=˓gŲ(|4}:7Yױ^Ɍ%INȡ>`G_N3iG?V(׭kk\20:OЖLĎOUCq|iϿ75@}U#uS9<۱k όGD}X_R0:wׇ' w6MlDeiMDdozd:]I'׫N^?X3sE1y,^F[s* b[wK?z3]Aʊn2ŒyCC{+Nך]W#EŠ7mfh[}}+͊؊-p-pMk(P {@+P ORxb@b.7[2S \21>21lp| 07Ϛ5xk? %)jNӞMjy\o i5׏_3g͠Rx~p3~bb.'ͽdw3ہ?^2~],S'L@U &M߷dg4o6wocڋl=4yꁝ;K`> Qn1pǬm"+&Sm]TeWko >DVh\C('}~363 &0xɦX>ʛIywv3)1mHP(h C3dUdJ6Cf&Bu+@~cf>Cl/0j2HUȻzt<1?}s{{MG;o?bk|F}xA\o|\go@di3r!S _3|pG >l3Xi}Ք[M1pz?RߐL|8ia.5eT/YL0nigSŇDiKq},ug#uw?Β7""PԱ2Fn8٦?QC\'<Цe̟&KIW(*S@u?/ʒ&V=3=O>}{f|;8h( 򒪑 a|bTP;p\9@>&[ja""#NpKz7*̑I!M2:B*yծɒF$ISI\dnDJlizz*Ukt{fl{CSئoUqM:Vd mXtrRD\4%7iF;s ?`8>m=S~{OLQqii@7lp2TFYmzyULgthⴰH#ɭ6K6BHYHerculesStudio/HercStudio/icons/tape.jpg0000664000175000017500000000144412065055254017714 0ustar yakovyakovJFIF,,Created with GIMPC  !"$"$C"&!1"#2!12AQ ?LoFo|3y*c!:C=bVwePK8ǽZK-.Ӻ;Nk5mdbS5Z^XnetvZc2ږbBr. L-sI'#uOn܎H5.a{չdc#hGre/"10*ePRsw맷Ùޘ3)ҩFI@ iZzk%.wsILV6ae\ ~گЭZLGߊn]|cV׹6ܔWin:hDrsdC'fUbLn0|*'IbYc`2AuWUܯyk+}٘oQ=nH# 7*I4^[BۘfcN}Q] :V 5>qbv%O42zd~3m4~v[A)ƒ9u.XHG靣F;>[35qWHerculesStudio/HercStudio/icons/console.jpg0000664000175000017500000000127312065055254020425 0ustar yakovyakovJFIF,,Created with GIMPC  !"$"$C"- !1ATUS !1AB ?g7}elf$y[GFkrSBc,=k.K;] ğJwoեMiߕ䧽 }0Õ1^3I_9yyV'c=-1OAFڻI_Nt^iOcs,XS#$>.Yk*&hA/OlJ7EWpe)%lG "6aw }G e{g}<,[6rYdRG6ZQUR$f\NJREToWM` c #070209", ", c #040309", "' c #000205", ") c #030000", "! c #000009", "~ c #00000E", "{ c #00000C", "] c #000108", "^ c #020100", "/ c #030100", "( c #000007", "_ c #00000A", ": c #00000B", "< c #02000D", "[ c #030009", "} c #040005", "| c #050308", "1 c #000002", "2 c #000202", "3 c #030005", "4 c #070005", "5 c #060004", "6 c #040004", "7 c #000102", "8 c #040200", "9 c #050006", "0 c #060005", "a c #030002", "b c #000000", "c c #000300", "d c #000004", "e c #010004", "f c #070002", "g c #0A0002", "h c #080000", "i c #010400", "j c #020400", "k c #020300", "l c #010207", "m c #030400", "n c #010200", "o c #010100", "p c #0B0003", "q c #090001", "r c #090002", "s c #090000", "t c #0B0000", "u c #0A0000", "v c #0A0300", "w c #060600", "x c #020900", "y c #000900", "z c #000500", "A c #000400", "B c #000203", "C c #010900", "D c #010700", "E c #040400", "F c #080100", "G c #070000", "H c #120C00", "I c #171904", "J c #172005", "K c #0F2000", "L c #071B00", "M c #011000", "N c #000B00", "O c #010005", "P c #000501", "Q c #041000", "R c #091800", "S c #102305", "T c #142409", "U c #182009", "V c #151604", "W c #100A00", "X c #100900", "Y c #1C1A0B", "Z c #2B3117", "` c #344420", " . c #334E21", ".. c #294E1A", "+. c #234814", "@. c #132E05", "#. c #0D2004", "$. c #050D02", "%. c #010204", "&. c #020006", "*. c #030104", "=. c #010002", "-. c #030406", ";. c #0B150A", ">. c #1A2A0F", ",. c #203B12", "'. c #2A4E1E", "). c #2E5222", "!. c #334E25", "~. c #2F3E1D", "{. c #21260F", "]. c #131102", "^. c #0B0B01", "/. c #1E2110", "(. c #344125", "_. c #465F37", ":. c #4A713A", "<. c #457937", "[. c #397C2F", "}. c #39772E", "|. c #325A25", "1. c #243E19", "2. c #0F1A0A", "3. c #030502", "4. c #020003", "5. c #040203", "6. c #010300", "7. c #040205", "8. c #0E100D", "9. c #1E2B1A", "0. c #324A26", "a. c #3C642F", "b. c #3A7731", "c. c #3B7D33", "d. c #457939", "e. c #446B36", "f. c #364F28", "g. c #222F15", "h. c #0F1103", "i. c #020200", "j. c #0A1002", "k. c #233118", "l. c #405C34", "m. c #4F7C45", "n. c #488A40", "o. c #3C8F37", "p. c #31932E", "q. c #379032", "r. c #467F3B", "s. c #35562B", "t. c #182511", "u. c #060702", "v. c #040002", "w. c #050102", "x. c #0B0509", "y. c #171813", "z. c #2C3925", "A. c #436439", "B. c #4C8541", "C. c #379034", "D. c #359734", "E. c #41933E", "F. c #478941", "G. c #426E39", "H. c #2D4923", "I. c #13210A", "J. c #000600", "K. c #010101", "L. c #0C1B08", "M. c #2A4524", "N. c #43723E", "O. c #438941", "P. c #329135", "Q. c #25992A", "R. c #1BA124", "S. c #229B28", "T. c #418B3C", "U. c #436B39", "V. c #26361C", "W. c #0C0B06", "X. c #090003", "Y. c #070001", "Z. c #0E0508", "`. c #1D1C17", " + c #3D4D33", ".+ c #507846", "++ c #408A3B", "@+ c #229B2A", "#+ c #1BA126", "$+ c #23972A", "%+ c #339238", "&+ c #408640", "*+ c #2E5C2B", "=+ c #0E280B", "-+ c #000E00", ";+ c #0B1E0A", ">+ c #254B24", ",+ c #3C793D", "'+ c #3A923E", ")+ c #279C31", "!+ c #16A525", "~+ c #0BAE1D", "{+ c #14A722", "]+ c #3C953B", "^+ c #42713A", "/+ c #273A1E", "(+ c #0E0E06", "_+ c #0B0004", ":+ c #080001", "<+ c #000700", "[+ c #11060A", "}+ c #1F1F17", "|+ c #3D5034", "1+ c #4D7C45", "2+ c #389238", "3+ c #15A623", "4+ c #0BAE1F", "5+ c #15A426", "6+ c #279C33", "7+ c #378E3F", "8+ c #27642B", "9+ c #0A2F0D", "0+ c #001101", "a+ c #030004", "b+ c #010103", "c+ c #091F0A", "d+ c #224D22", "e+ c #367D3B", "f+ c #32973B", "g+ c #1DA22B", "h+ c #0BAC1E", "i+ c #00B716", "j+ c #08AE1C", "k+ c #329834", "l+ c #3C7234", "m+ c #253A1B", "n+ c #0D0D03", "o+ c #080003", "p+ c #000800", "q+ c #090004", "r+ c #12060A", "s+ c #1F1F15", "t+ c #3C5132", "u+ c #497F41", "v+ c #319733", "w+ c #0AAB1F", "x+ c #1DA22D", "y+ c #2F933B", "z+ c #216729", "A+ c #07310D", "B+ c #001201", "C+ c #010007", "D+ c #071D08", "E+ c #204B20", "F+ c #337C37", "G+ c #2D9735", "H+ c #16A225", "I+ c #04AE18", "J+ c #00B90F", "K+ c #00B115", "L+ c #249428", "M+ c #316E2B", "N+ c #1D3513", "O+ c #0B0900", "P+ c #0B0001", "Q+ c #080004", "R+ c #120308", "S+ c #1F1D11", "T+ c #38502E", "U+ c #43803D", "V+ c #29992D", "W+ c #00B113", "X+ c #02AC16", "Y+ c #17A328", "Z+ c #2A9336", "`+ c #1E6626", " @ c #042E0A", ".@ c #001001", "+@ c #234920", "@@ c #357B35", "#@ c #309633", "$@ c #17A221", "%@ c #04AF15", "&@ c #00BA0B", "*@ c #00B111", "=@ c #219526", "-@ c #2E7029", ";@ c #1C3611", ">@ c #0C0001", ",@ c #090005", "'@ c #080005", ")@ c #130208", "!@ c #37512C", "~@ c #40823B", "{@ c #269B29", "]@ c #00B210", "^@ c #00BA0A", "/@ c #02AD13", "(@ c #18A324", "_@ c #2D9234", ":@ c #206524", "<@ c #072C0A", "[@ c #000E01", "}@ c #040009", "|@ c #040300", "1@ c #101B0A", "2@ c #294922", "3@ c #3C7A37", "4@ c #369634", "5@ c #1DA423", "6@ c #08B015", "7@ c #00BA0C", "8@ c #01B412", "9@ c #289E2C", "0@ c #32782F", "a@ c #223C17", "b@ c #0F0D01", "c@ c #0E0005", "d@ c #0B0006", "e@ c #000805", "f@ c #0C0007", "g@ c #15040C", "h@ c #211F13", "i@ c #39532E", "j@ c #3F853C", "k@ c #259E2A", "l@ c #03B310", "m@ c #00BB0A", "n@ c #07AF12", "o@ c #1DA424", "p@ c #339234", "q@ c #276526", "r@ c #0E2D0D", "s@ c #040E05", "t@ c #060009", "u@ c #06000B", "v@ c #15190B", "w@ c #2D4722", "x@ c #417837", "y@ c #3A9434", "z@ c #23A123", "A@ c #0EAD13", "B@ c #00B80A", "C@ c #06B210", "D@ c #28A12D", "E@ c #337B31", "F@ c #223E18", "G@ c #100E02", "H@ c #110006", "I@ c #0C0008", "J@ c #000502", "K@ c #000707", "L@ c #0D0009", "M@ c #17030C", "N@ c #38542E", "O@ c #3E863C", "P@ c #06B30C", "Q@ c #00B906", "R@ c #0DAC12", "S@ c #2C6226", "T@ c #122B0E", "U@ c #090C05", "V@ c #07000B", "W@ c #07000C", "X@ c #060201", "Y@ c #141608", "Z@ c #2F4320", "`@ c #457335", " # c #3C8F33", ".# c #209E20", "+# c #0BAB13", "@# c #00B508", "## c #09AD0E", "$# c #2D992A", "%# c #36732D", "&# c #203A15", "*# c #0C0C02", "=# c #0D0005", "-# c #090008", ";# c #000403", "># c #080007", ",# c #12030A", "'# c #1D1D13", ")# c #43803A", "!# c #2C9828", "~# c #09AE0A", "{# c #00B604", "]# c #09AA0F", "^# c #219F22", "/# c #398C34", "(# c #305D26", "_# c #13250B", ":# c #080903", "<# c #111305", "[# c #303E1D", "}# c #4A6D33", "|# c #3F8B31", "1# c #19A123", "2# c #02AF15", "3# c #00B40D", "4# c #13A914", "5# c #3A8A27", "6# c #426629", "7# c #243717", "8# c #080E02", "9# c #080109", "0# c #020001", "a# c #181E12", "b# c #3B4E2E", "c# c #517538", "d# c #3F902A", "e# c #14AB0E", "f# c #01B70A", "g# c #01AE14", "h# c #1AA226", "i# c #3C8735", "j# c #345526", "k# c #14200A", "l# c #040500", "m# c #151709", "n# c #374021", "o# c #506F36", "p# c #428C35", "q# c #15A424", "r# c #00B117", "s# c #00B40F", "t# c #12A815", "u# c #418E30", "v# c #476A32", "w# c #2B4021", "x# c #0D1508", "y# c #0A030A", "z# c #090506", "A# c #050100", "B# c #070304", "C# c #060006", "D# c #09070A", "E# c #1E2619", "F# c #3E5334", "G# c #53763E", "H# c #419130", "I# c #14A90F", "J# c #00B709", "K# c #00AF16", "L# c #15A428", "M# c #3F873B", "N# c #3A572B", "O# c #1A220D", "P# c #070A01", "Q# c #060002", "R# c #181A0C", "S# c #394223", "T# c #527138", "U# c #438D36", "V# c #00B30E", "W# c #0BA914", "X# c #309632", "Y# c #3B7739", "Z# c #314C2D", "`# c #1E2118", " $ c #170B0F", ".$ c #170A11", "+$ c #11100C", "@$ c #0A0F08", "#$ c #0B0E07", "$$ c #100F0B", "%$ c #180B12", "&$ c #1F1317", "*$ c #2D3027", "=$ c #3F5A3B", "-$ c #427E40", ";$ c #2E9730", ">$ c #0DAB10", ",$ c #00B608", "'$ c #16A529", ")$ c #40883C", "!$ c #3C592D", "~$ c #1D2510", "{$ c #0A0D04", "]$ c #16180A", "^$ c #384122", "/$ c #517037", "($ c #08AB14", "_$ c #249C2E", ":$ c #37853A", "<$ c #3E6338", "[$ c #38412E", "}$ c #352C25", "|$ c #342B24", "1$ c #2B3421", "2$ c #24361C", "3$ c #23351B", "4$ c #2C3522", "5$ c #382F28", "6$ c #3D342D", "7$ c #414A37", "8$ c #456A3F", "9$ c #3B893E", "0$ c #249D2C", "a$ c #3B582C", "b$ c #1B230E", "c$ c #080B02", "d$ c #121406", "e$ c #343D1E", "f$ c #4E6D34", "g$ c #418B34", "h$ c #14A323", "i$ c #08AD11", "j$ c #23A126", "k$ c #3B9136", "l$ c #4C7C40", "m$ c #52693F", "n$ c #535C3D", "o$ c #515C3A", "p$ c #476434", "q$ c #416831", "r$ c #426932", "s$ c #496636", "t$ c #545F3D", "u$ c #565F40", "v$ c #546B41", "w$ c #4D7D41", "x$ c #3C9237", "y$ c #25A326", "z$ c #09B00B", "A$ c #3E863A", "B$ c #385529", "C$ c #18200B", "D$ c #040700", "E$ c #333C1D", "F$ c #4D6C33", "G$ c #408A33", "H$ c #06B00F", "I$ c #16A317", "J$ c #2A9923", "K$ c #45883B", "L$ c #4A833E", "M$ c #468439", "N$ c #3C8B30", "O$ c #398F2E", "P$ c #3A902F", "Q$ c #3E8D32", "R$ c #48863B", "S$ c #44873A", "T$ c #3A8D31", "U$ c #17A515", "V$ c #07B309", "W$ c #14A327", "X$ c #3D8539", "Y$ c #375428", "Z$ c #171F0A", "`$ c #030600", " % c #131507", ".% c #353E1F", "+% c #4F6E35", "@% c #01B209", "#% c #0AAC08", "$% c #10A70E", "%% c #15A31B", "&% c #17A225", "*% c #14A524", "=% c #0FA818", "-% c #0CAB13", ";% c #18A429", ">% c #14A21A", ",% c #0EA50C", "'% c #08AB04", ")% c #02B502", "!% c #39562A", "~% c #19210C", "{% c #050800", "]% c #17190B", "^% c #00B306", "/% c #0BB908", "(% c #08B408", "_% c #04AF13", ":% c #00B119", "<% c #00B41E", "[% c #00B518", "}% c #00B70C", "|% c #00B907", "1% c #00B50A", "2% c #00B61E", "3% c #02B31D", "4% c #05B012", "5% c #05B107", "6% c #06B502", "7% c #00B500", "8% c #1C240F", "9% c #090C03", "0% c #00B218", "a% c #00B407", "b% c #04B201", "c% c #07B307", "d% c #02B013", "e% c #00AE16", "f% c #00B11B", "g% c #00B619", "h% c #00B80C", "i% c #00B301", "j% c #00B806", "k% c #00B70B", "l% c #00B316", "m% c #00B31B", "n% c #00B01A", "o% c #01AF10", "p% c #06B208", "q% c #09B805", "r% c #01B702", "s% c #00B017", "t% c #00B510", "u% c #02B30A", "v% c #07A905", "w% c #0FA80F", "x% c #15A61D", "y% c #18AB29", "z% c #12AE1D", "A% c #0DAD15", "B% c #10B018", "C% c #11AD1C", "D% c #16A927", "E% c #18A72B", "F% c #19A528", "G% c #0AAD06", "H% c #060900", "I% c #101204", "J% c #323B1C", "K% c #4C6B32", "L% c #07B110", "M% c #15A417", "N% c #299C25", "O% c #3A9133", "P% c #418538", "Q% c #458539", "R% c #3C8D31", "S% c #348E2C", "T% c #328C2A", "U% c #37882C", "V% c #418135", "W% c #44813B", "X% c #44883B", "Y% c #279A23", "Z% c #13A212", "`% c #00AE15", " & c #09AE12", ".& c #21A126", "+& c #369134", "@& c #44783A", "#& c #445F34", "$& c #42502F", "%& c #40502C", "&& c #375927", "*& c #315C24", "=& c #2D5820", "-& c #335523", ";& c #3E4E2A", ">& c #465433", ",& c #4B663B", "'& c #4A7E40", ")& c #379235", "!& c #1FA022", "~& c #08AF0A", "{& c #09AC15", "]& c #229C2D", "^& c #2F8135", "/& c #315A2E", "(& c #273420", "_& c #201D14", ":& c #1E1B12", "<& c #16230F", "[& c #11280C", "}& c #12290D", "|& c #221F16", "1& c #2A271E", "2& c #36432F", "3& c #40693D", "4& c #388A3E", "5& c #25A02E", "6& c #0BAF10", "7& c #0CAA15", "8& c #2D9732", "9& c #337434", "0& c #264525", "a& c #131B10", "b& c #0A0406", "c& c #0A0106", "d& c #070904", "e& c #030D04", "f& c #000A01", "g& c #060803", "h& c #0D0409", "i& c #100A0C", "j& c #20281D", "k& c #365535", "l& c #3C7D3D", "m& c #2D9830", "n& c #0EAD12", "o& c #363F20", "p& c #13A916", "q& c #3F9333", "r& c #416A30", "s& c #243D1D", "t& c #081607", "u& c #020106", "v& c #030504", "w& c #000405", "x& c #122011", "y& c #324B2B", "z& c #497238", "A& c #3C902E", "B& c #13AA0F", "C& c #323D1D", "D& c #05B016", "E& c #00B50E", "F& c #12AB13", "G& c #3F912D", "H& c #3E6627", "I& c #1F3713", "J& c #051000", "K& c #000201", "L& c #131E0E", "M& c #334B27", "N& c #4C7435", "O& c #3F942D", "P& c #10AA0C", "Q& c #00AD13", "R& c #19A125", "S& c #3D8836", "T& c #355627", "U& c #16220C", "V& c #060701", "W& c #050005", "X& c #17180A", "Y& c #334422", "Z& c #487437", "`& c #408F34", " * c #229F21", ".* c #0DAA13", "+* c #01B307", "@* c #0AAB0D", "#* c #309D28", "$* c #38782A", "%* c #233E13", "&* c #0D1000", "** c #0D0101", "=* c #0A0005", "-* c #110505", ";* c #1D200F", ">* c #385328", ",* c #438335", "'* c #2D9A25", ")* c #171B0D", "!* c #304824", "~* c #3E9335", "{* c #25A023", "]* c #11AC13", "^* c #02B70A", "/* c #07B20E", "(* c #2CA429", "_* c #347D2B", ":* c #244113", "<* c #111000", "[* c #110000", "}* c #0C0003", "|* c #000801", "1* c #0D0004", "2* c #170406", "3* c #21200E", "4* c #385527", "5* c #3E8735", "6* c #25A024", "7* c #121D0C", "8* c #2B4923", "9* c #3F7C39", "0* c #389635", "a* c #20A323", "b* c #0BAE15", "c* c #00B90C", "d* c #04B310", "e* c #289F29", "f* c #32792B", "g* c #223D12", "h* c #0E0C00", "i* c #0D0000", "j* c #140405", "k* c #201E0F", "l* c #3D8436", "m* c #239D24", "n* c #03B40E", "o* c #0D1C09", "p* c #244920", "q* c #387B36", "r* c #319533", "s* c #19A221", "t* c #06AD15", "u* c #00B90B", "v* c #01B111", "w* c #219624", "x* c #2D6F25", "y* c #1C360F", "z* c #0A0800", "A* c #0C0000", "B* c #080002", "C* c #110104", "D* c #1D1B0E", "E* c #354F28", "F* c #3E8036", "G* c #249926", "H* c #061C07", "I* c #1F4A1F", "J* c #347B37", "K* c #2D9534", "L* c #05AD18", "M* c #00B80F", "N* c #01B015", "O* c #316E29", "P* c #1D3511", "Q* c #110205", "R* c #1E1C10", "S* c #374F2B", "T* c #427F3A", "U* c #28982A", "V* c #081E09", "W* c #214C21", "X* c #367B3A", "Y* c #32953A", "Z* c #1DA12A", "`* c #0DAC1E", " = c #00B616", ".= c #0AAD1C", "+= c #0C0004", "@= c #091C08", "#= c #244822", "$= c #3C783C", "%= c #39913D", "&= c #279B30", "*= c #18A525", "== c #0CAE1D", "-= c #3A9339", ";= c #406F38", ">= c #26381E", ",= c #0D0D05", "'= c #0F040A", ")= c #1E1E16", "!= c #3C4E34", "~= c #4B7A43", "{= c #369036", "]= c #0B1806", "^= c #284322", "/= c #41703C", "(= c #41873F", "_= c #3D8738", ":= c #3F6637", "<= c #23321D", "[= c #090804", "}= c #070003", "|= c #0B0207", "1= c #1A1915", "2= c #3A4934", "3= c #4D7445", "4= c #3D873A", "5= c #070D00", "6= c #1A280F", "7= c #334F27", "8= c #45723B", "9= c #46883E", "0= c #3D9139", "a= c #2F942E", "b= c #328D30", "c= c #38702F", "d= c #26461F", "e= c #0E1B0A", "f= c #060604", "g= c #070007", "h= c #10100E", "i= c #243120", "j= c #395932", "k= c #41793A", "l= c #358E34", "m= c #379936", "n= c #42943F", "o= c #41833B", "p= c #35612C", "q= c #1F3B15", "r= c #0C1A03", "s= c #020800", "t= c #131605", "u= c #222F13", "v= c #314A22", "w= c #365F27", "x= c #306724", "y= c #24681B", "z= c #22611A", "A= c #1F4A15", "B= c #122B0B", "C= c #030D02", "D= c #000103", "E= c #030106", "F= c #07080A", "G= c #111D11", "H= c #203818", "I= c #274F1D", "J= c #27641F", "K= c #286A20", "L= c #326626", "M= c #305722", "N= c #243D16", "O= c #152208", "P= c #090B00", "Q= c #0F0D00", "R= c #151E03", "S= c #192D08", "T= c #183507", "U= c #0F3601", "V= c #0A3000", "W= c #062000", "X= c #001100", "Y= c #020005", "Z= c #000106", "`= c #000A02", " - c #071600", ".- c #082200", "+- c #0F3305", "@- c #113505", "#- c #163108", "$- c #152403", "%- c #101500", "&- c #090700", "*- c #080500", "=- c #080D00", "-- c #051200", ";- c #001500", ">- c #001300", ",- c #000C00", "'- c #000301", ")- c #000008", "!- c #01000A", "~- c #02000B", "{- c #001200", "]- c #011100", "^- c #050D00", "/- c #060700", "(- c #070100", "_- c #000407", ":- c #00010A", "<- c #020107", "[- c #01010D", "}- c #0B0102", "|- c #030200", "1- c #070006", "2- c #030300", "3- c #050300", "4- c #04010A", "5- c #000408", "6- c #040100", "7- c #080401", "8- c #04030B", "9- c #010409", "0- c #00010E", "a- c #02020A", "b- c #070200", "c- c #050008", " . + @ # $ % & * = - ; > , ' @ ) ) ! ~ { ] ^ / / + ( { ~ _ . ) ( : < [ ; } } | 1 2 # # @ + . ", ". ) @ # # 2 % & 3 } 4 5 6 1 7 # ^ . ( { { & + 8 / + ( { { ( ) + % ( * 9 0 5 5 a 1 7 # # @ b ) . ", "+ @ @ c c 2 d e 5 f g h ) @ i j k l : : & + m n o & : : & @ # # @ ) g p q + @ # c # @ b + ", "# # c # c 2 1 a r s t u v w x y z A B ( ! d @ k n @ d ! ( 7 c z C D E F u t h G ) @ # c # # @ @ ", "# c # c # 7 1 . G h t H I J K L M N A & ( O @ # # @ d ( & P Q R S T U V W u h G . b 7 2 $ 2 2 7 ", "# c # # 2 7 + ) h X Y Z ` ...+.@.#.$.%.&.*.n c # @ =.O -.;.>.,.'.).!.~.{.].v ) + 7 2 2 2 2 2 ", "@ # @ @ 7 1 b + ^./.(._.:.<.[.}.|.1.2.3.4.5.6.A c # ) 7.8.9.0.a.b.c.d.e.f.g.h.i.+ b 1 % 7 7 @ @ ", "b @ @ @ 1 1 b @ j.k.l.m.n.o.p.q.r.s.t.u.v.w.c z c c w.x.y.z.A.B.C.D.E.F.G.H.I.J.b 1 d d d 1 b b ", "+ + + 1 d 1 K.z L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.# J.z # Z.`. +.+++@+#+$+%+&+*+=+-+# 1 d d d 1 + + ", ") ) ) =.e =.K.J.;+>+,+'+)+!+~+{+]+^+/+(+_+:+# A <+# r [+}+|+1+2+3+4+5+6+7+8+9+0+# d O O e a ) ) ", ". . . a a+e b+<+c+d+e+f+g+h+i+j+k+l+m+n+p o+@ z p+@ q+r+s+t+u+v+j+i+w+x+y+z+A+B+c & C+= a+. . . ", ") ) ) a+3 a+4.J.D+E+F+G+H+I+J+K+L+M+N+O+P+X.@ <+z # Q+R+S+T+U+V+W+J+X+Y+Z+`+ @.@2 C+[ = a+) ) ) ", "@ b b e } } } j L.+@@@#@$@%@&@*@=@-@;@O+>@,@7 <+P @ '@)@S+!@~@{@]@^@/@(@_@:@<@[@d [ }@}@e b @ # ", "c # @ e } 0 4 |@1@2@3@4@5@6@7@8@9@0@a@b@c@d@7 z e@7 f@g@h@i@j@k@l@m@n@o@p@q@r@s@O t@u@}@e @ c A ", "z A # d } 0 ,@q v@w@x@y@z@A@B@C@D@E@F@G@H@I@% J@K@% L@M@h@N@O@k@P@Q@R@z@C.S@T@U@0 V@W@}@d # z J.", "z A # d } 0 4 X@Y@Z@`@ #.#+#@###$#%#&#*#=#-#d ;#;#d >#,#'#!@)#!#~#{#]#^#/#(#_#:#a+t@t@; d # A J.", "c # @ d 0 } B J.<#[#}#|#1#2#3#4#5#6#7#8#=.9#7.b 0#4.} 4.a#b#c#d#e#f#g#h#i#j#k#l## % 6 5 1 @ # # ", "# # @ =.0 a+;#p+m#n#o#p#q#r#s#t#u#v#w#x#7.y#z#+ A#B#C#D#E#F#G#H#I#J#K#L#M#N#O#P#A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+R#S#T#U#q#r#V#W#X#Y#Z#`# $.$+$@$#$$$%$&$*$=$-$;$>$,$K#'$)$!$~${$A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+]$^$/$U#q#r#V#($_$:$<$[$}$|$1$2$3$4$5$6$7$8$9$0$##J#K#'$)$a$b$c$A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+d$e$f$g$h$r#s#i$j$k$l$m$n$o$p$q$r$s$t$u$v$w$x$y$z$J#K#L#A$B$C$D$A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+<#E$F$G$h$r#s#H$I$J$ #K$L$M$N$O$P$Q$R$L$S$T$J$U$V$B@K#W$X$Y$Z$`$A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+ %.%+%g$h$r#s#@%#%$%%%&%Y+*%=%-%-%=%*%;%&%>%,%'%)%J#K#L#A$!%~%{%A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+]%S#/$U#q#r#V#^%/%(%_%:%<%[%}%|%{#1%[%2%3%4%5%6%7%J#K#'$)$a$8%9%A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+]$^$/$U#q#0%s#a%b%c%d%e%f%g%h%i%j%k%l%m%n%o%p%q%r%B@s%'$)$N#b$P#A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+d$.%f$g$h$0%t%u%v%w%x%H+'$y%z%A%B%C%D%E%F%x%w%G%)%J#K#L#M#!%~%H%A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+I%J%K%G$h$0%t%L%M%N%O%P%)#Q%R%S%T%U%V%W%X%O%Y%Z%5%,$`%W$A$B$C${%A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+<#E$F$g$h$0%t% &.&+&@&#&$&%&&&*&=&-&;&>&,&'&)&!&~&,$`%L#A$!%~%{%A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+m#n#o#p#q#0%s#{&]&^&/&(&_&:&<&[&}&t.|&1&2&3&4&5&6&B@s%'$M#N#O#P#A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+]$^$/$U#q#r#s#7&8&9&0&a&b&c&d&e&f&g&h&i&j&k&l&m&n&B@s%'$)$a$b$P#A $ v.Q#+ @ 7 7 ", "# # @ =.0 a+;#p+Y@o&+%p#q#0%s#p&q&r&s&t&B u&v&6.@ @ d w&x&y&z&A&B&J#K#L#M#N#O#H%A $ v.Q#+ @ 7 7 ", "A # @ d } } B J.I%C&}#|#1#D&E&F&G&H&I&J&@ d @ # # K&u&v&L&M&N&O&P&@#Q&R&S&T&U&V&# % 6 5 1 @ # # ", "J.z A % 3 0 W&X@X&Y&Z&`& *.*+*@*#*$*%*&***=*@ z J.@ o+-*;*>*,*'*~#{#]#^#/#(#_#:#a+t@t@; d # A J.", "<+J.A % O 0 '@q )*!*d.~*{*]*^*/*(*_*:*<*[*}*# z |*# 1*2*3*4*5*6*P@Q@R@z@C.S@T@U@0 V@W@}@d # z J.", "A c # d O } 4 |@7*8*9*0*a*b*c*d*e*f*g*h*i*g # J.p+# p j*k*>*l*m*n*m@n@o@p@q@r@s@O t@u@}@e @ c A ", "c # @ d O 3 } j o*p*q*r*s*t*u*v*w*x*y*z*A*B*# <+z # B*C*D*E*F*G*]@^@/@(@_@:@<@[@d [ }@}@e b @ # ", "@ b b e 3 e 4.J.H*I*J*K*&%L*M*N*L+O*P*O+A*X.# <+z # B*Q*R*S*T*U*W+J+X+Y+Z+`+ @.@2 C+[ = a+) ) ) ", "+ + + =.e e b+<+V*W*X*Y*Z*`* =.=k+l+m+n++=q+@ J.p+@ q+r+s+t+u+v+j+i+w+x+y+z+A+B+c & C+= a+. . . ", ") ) + =.e 1 K&J.@=#=$=%=&=*===3+-=;=>=,==*o+@ A J.@ o+'=)=!=~={=3+4+5+6+7+8+9+0+# d O O e a ) ) ", "+ + + 1 d 1 K.z ]=^=/=(=P.Q.R.S._=:=<=[=}=Q#@ A A @ Q#|=1=2=3=4=@+#+$+%+&+*+=+-+# 1 d d d 1 + + ", "b @ @ @ 1 1 b @ 5=6=7=8=9=0=a=b=c=d=e=f=g=9 c z z c a+g=h=i=j=k=l=m=n=o=p=q=r=s=b 1 d d d 1 b b ", "@ @ @ @ 1 1 + + w t=u=v=w=x=y=z=A=B=C=D== E=n A c c a+&.F=G=H=I=J=K=L=M=N=O=P=o + b 1 % 7 7 @ @ ", "@ @ # # 7 1 + ) h v Q=R=S=T=U=V=W=X=c & [ Y=@ c # @ Y=* Z=`= -.-+-@-#-$-%-&- ) + 7 2 2 2 2 2 ", "@ @ # # @ 1 =.. G G G *-=---;->-,-<+'-)-!-d @ # # @ u&~-)-'-p+,-{-]-^-/-(-h h h . b 7 2 $ 2 2 7 ", "+ + @ # @ 7 1 a h s F ) c J.p+J.z _-:-: & @ o o n <-[-:-% A J.A c o h u u }-) @ # c # # @ @ ", ". ) + @ @ 7 d e 6 }=d@X.) @ c z # n Z=: : & ^ o E |-Z=: : & @ # @ @ ) q g g B*+ @ # c # @ b + ", "h G ) @ @ 7 % & 3 } 1-6 d 7 $ # o A#)-{ : Z=2-/ 3-i.& : { ( ) + % ( C+9 >#4 5 a 1 7 # # @ b ) . ", "u h . + @ 7 % & 4-= ; = Z=5-w&c 6-7-8-{ : 9-E / / o & : 0-a-b-A#] : : [ c-9 } e 1 2 # # @ + . "}; HerculesStudio/HercStudio/icons/het.gif0000775000175000017500000000270412065055254017533 0ustar yakovyakovGIF89a  !  "%)"('-*1.3  480 5<<BA DE* O 8 _b- 1 "-!$ "(!&,"#E0(-%0&*.02-6046#"$"##'&0##$"""!%)$%)"  +!&$j7K(,"%# /#PD?)+6;(YAP9+2;3-'('-gBV8.YGU.(*#9:=2465,NNɸ!Created with GIMP,S,;s!cĈ*Dhf =qZy`N]=0R#G<4YݼS6l7oͪy1A3c\Xsw$x6 }cmnfI,Z'6m1ì;t\c]#WX=jň8FTx ѳ0j.W>t=psb͖f:I/zڅx `!6<ء?v+C4*4x'X8!0‘%7? *cA^G Y0@…|35GՌ` @ <`Gp@V3)t #@0: pAGDVM-24`D ,d=Ԥ6p"-Uh30- PR3=h36 !74RNQ IKyy**XX |eecey| ^[BDrr##!#SQQQ2000WT==;=mkkkLJJJxx+)))ddbdx{CCqq$"""RPPP]]<S pHYs  iCCPPhotoshop ICC profilexc``$PPTR~!11 !/?/020|pYɕ4\PTp(%8 CzyIA c HRvA cHvH3c OIjE s~AeQfzFcJ~RBpeqIjng^r~QA~QbIj ^<#U*( >1H.-*%CC"C= o]KW0cc btY9y!K[z,٦}cg͡3#nM4}2?~ 4] cHRMz%u0`:o_FRIDATxbX?\!ďЗhc k~q̼ sν9? ,g0j_,gtIENDB`HerculesStudio/HercStudio/icons/startu.gif0000664000175000017500000000152212065055254020267 0ustar yakovyakovGIF87a!N|Lξ̽ʺȶ¯^[[XXUWTURTQO}L~~}7F>䎥ً~|{yzxxvwutrqonlmkjhgedbcaa_ZXPNٞ¹ɸǷǵŴfcŲ`]\YYV^oeVSSP}|zyސݍ}}{|zvtsqrpljkiigec_]\Z,!Pj1l2n35o7q89r;t?L w@OQRAP/bklcn4rs NP.1"9:=?vPipűʚQR-ia!#Ʋܶ- .0b1®Șl q яX;K7=뢂F.R,Kj= hPq%i!YaT]cqֳ[ht$(BR-{yq9S)Yod8T J"ʜ`̀\ ,UgrRzVń|c>X{IJwoFu<>ګ(Ŝ;ێg 80̓,SCٔܝO>4O j;VVL~q] ?u!!< ||(^^ /yyeG\_)0ff7RRmO;q]xx$?-+ZZu|WWCJe,vvGlbb}}NNii,!H*\c‘C2\xR;((q O 28$C84ʣ ; lqH*f!B/x31E;hNp@#Ed6@ O 8NX1 eG!1QV5,و#v̥+^  ʲϢ0]}_Wv<˙,+0aQ#4YDkf#\.R"2 ЍFDvF߬a٥A+:P)iɁ  *Q$&j Ayv̏ W!LAWvԄ $#Y!x<f7EaD(0CQj$&tqgwi$uq`FbĔ_(K)$XeudmmTCYYmbS5eJQ "}І5։,a)^hM<K0a r(F"7JIZld~ewa&, )*&/fg^nС@mk&;HerculesStudio/HercStudio/icons/card.jpg0000664000175000017500000000110212065055254017663 0ustar yakovyakovJFIFvvCreated with GIMPC  !"$"$C"*1!"2ARq%!1aAQ" ?[˖{ORkJʞ%܌I1eK*x*\(–|=n;(* *0Ԣx]H"w9u˥Z”OQH40IRrD OlQ ጲL7;c:q<~6E83dӻ1Snʉ&ڱo[*D^}#>CLmnūg dDQE;G bvGuHerculesStudio/HercStudio/icons/highRed.jpg0000664000175000017500000000067412065055254020341 0ustar yakovyakovJFIFHHC  !"$"$C"#!1#AaQ!!"1 ?ίw{Ʀlѩi #(<{@ӭW7I\0rD&@CԍG;ˆiRL*2d|>ڶ eJ{"$AA>RtLΪ}*#0WRigHerculesStudio/HercStudio/icons/dasd.jpg0000664000175000017500000000110112065055254017664 0ustar yakovyakovJFIF,,Created with GIMPC  !"$"$C"0!"1#3Aat2QR ?$ve!N!ߺ !ž|Nw~iªd_®%͵]/SnϠm.7:;N/׆i$˧QR*+ќq߅Hч^lጺᥣ$G+ǠWj;dwtJTS DZuX X6 \Fe>TH^('Ru(dkf-D%9*T BK( ($A3(HerculesStudio/HercStudio/icons/poweronoffd.gif0000664000175000017500000000267312065055254021305 0ustar yakovyakovGIF87a!--,]\[\\Z}DDB::8987eeb\[YPOM[ZW/....-QQO}EEC:98.-,[ZXZZWQPNgecEED998,!H*\($IK$EAZ22$$HqDd<J̗]f!!y$J#@*@;7An٢ZÕ(0!uyť\l D[[Dfɮp iljP#[LC_ CaM;o ыDE| d E  :0ņ:6NP0(XDk \(XC(΢88ND}Q uDWyA z!ODYQO|񵀈$A\T0CqA,atC,Bu|TFN@` G~ 0AxLJ|1'B@UD GK@Ej}\Azx 1X`A0@PT(j3 c ڛ9'k2X( B z#,!̩Z QA/a }IdDh!ꚸqFzƯk76ZLCUPM4Nkj59D%f:WHTE 7DB E`.4Dʻ.7<" SLp!!  RbH,@;HerculesStudio/HercStudio/icons/restartd.gif0000664000175000017500000000251612065055254020601 0ustar yakovyakovGIF87a!K7Hm>>4O j;VV~q] ?u!!< ||(^^ /yyeG\_)0ff7RRwmO;q]]xx$?-+ZZu|WWCJe,vvGlbb}}NNii,!H*\XM9hfD",X$Ҍ9>0E?: XK9%DlH/tyҁK/53qEDxZQ(qdAa!G(o6K'pBzv]_d"79PYG,91 uh,\LLM$L:i RUUJF,]G0ru&K1U"lQfK.\e%6mx]Ska4Kz'dPƁ>E(O yƚH%ȍERe[5,eHmliBp*^, @Ĭ.9fg^}@|D+Vk;HerculesStudio/HercStudio/icons/stopd.gif0000664000175000017500000000263012065055254020077 0ustar yakovyakovGIF87a!zz)+YY :888RRPR3111a___<>IKyy**XX |cey|؎ ^[BDrrX[##!#QQ2000WT==;=kkLJJJxx+)))ddx{CCqq$"""RPPP]]<4- HH j• QZѕ&3gtU,RBR-R5F+/2jZ ktyҋ%IA. Qa^VBY+(($/.i|OvX*)ee^?Qb,Agjߨ|Y&'4WK$W-|q 4< ["UPGzKr,T"DdށFHH% U9K(BB-#{! QF`[ *:\R!$ f 4e[UtYR[B"h Z3Q[9 KRLQH.h\9 laPaј:ćl"`9_l'n”A\, G`q6J& %"$T*n ]fQTq J1ßVHg1S6| KdpG!ng{@m ) 1iPv\h%Bkgl" 7Gܰ@;HerculesStudio/HercStudio/icons/poweronond.gif0000664000175000017500000000072012065055254021136 0ustar yakovyakovGIF87a!6  >7+=8+>8+>8,LE6MF7NF8[SC\TDm^+g_MiaOjaPkbQun[xo[xo]yo]yo^yp^}i}iºۻ,!@pH,Ȥil:dFZ,U8z[.c5:<^UY {X+~_Z/1gbT1-*(+/Wp1+)U\1, & ! #)0b0 " % (! '..   *˖ߕl.)( +ɓ$(3\2-,ԻWi 63W)A+p`"E(R3? ) ɒYN˗0ct)$;HerculesStudio/HercStudio/icons/dial1.gif0000664000175000017500000000253712065055254017746 0ustar yakovyakovGIF89a;6www___UUUMMM333)))fff""" ,;6`!d)RRC\X @S`@IP,Tp A<J (` Ƞ  g P EEqr z\ a cn 4 qU8?  PVPX%T m"a̾q " g̖R mrgܚ4 =zTD  0M"oˀ3Y:WB8P q-DH<Hekq|F4;O 7DDŜF[}m0b"߲-o(hm _^. +n9>Lu2~kKb.ϋhtNmV~4GFmvhqy͗4Ķ=eؗ.6Hy 3MV4|䃗^22iL{ұsy0]XHA匊5ix7-H./d#>V/띪 TZ$A^?/Ak|]Q8X`,3jG:2(} ,U7ʣv"Xxprx M]UCP:fs',e!;HerculesStudio/HercStudio/icons/poweroffd.gif0000664000175000017500000000265412065055254020747 0ustar yakovyakovGIF87a!zz)+YY :88868RRPR3111a___<>IKyy**XX |cey| ^[DDBDrrX[##SQQQ2000FGWT==;=kkLJJJxx+)))WWddx{CC[Zqq$"""RPPP]]<SH˙(Ha2`VK*75qY Af3WFd\KD1 ׋#CM0N8rq%,e x3)HT"XCFU"[ 1F'ˋ15h a<Ut’lqBbhY 5JVaeGNyRcpcH3N89CmLͩK F#.L}TQ@F"3qXǤ!Leĩ)Ԋ+q @*gi ̆bZH\g1SC| Kx 6:.g|1m0>ٜP!xmh"lg4# w ܱ@;HerculesStudio/HercStudio/icons/do_handle.png0000664000175000017500000000542512065055254020707 0ustar yakovyakovPNG  IHDRH pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_F@IDATx\10B- +aETm} "jB{ƪG}}dIENDB`HerculesStudio/HercStudio/icons/stored.gif0000664000175000017500000000256012065055254020250 0ustar yakovyakovGIF87a!Kp7Hm>>4O j;VV~q] I?u!!< ||(^^ /yyeG\_)0ff7RRm~Oj;`qB]xx$?-+ZZuu|WWCJe,vvGlbb}}NNDii,!H*\BR;icfF%,p0E<>45DFB8$ b"FlqH2xeP/I4qF}^ cW@d:` `X XNX2IG]!1퀋QV,U0$̥+^,!& 2*;]_ivļ,/x#4Y)DƔO[HP:.1Xi"b0 +I*W!Jw:U0"A`8҅d`@GN YrXA(!jKz@^Da' 'TS,=cp%tD"N F"@RBj 2 GF<ė_2M KTprNWD*5VLS$Ac iULQTTEa>AyVX/YME,Ŝ4a&ᥧR}NFiG dnxWx1PY4T ,u vXZ(%j(Jǜ)hb"RJ4ó %z%"5 P ۮ@;HerculesStudio/HercStudio/icons/darkorange.stylesheet0000664000175000017500000002621212065055254022511 0ustar yakovyakovQToolTip { border: 1px solid black; background-color: #ffa02f; padding: 1px; border-radius: 3px; opacity: 100; } QWidget { color: #b1b1b1; background-color: #323232; } QWidget:item:hover { background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #ca0619); color: #000000; } QWidget:item:selected { background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a); } QMenuBar::item { background: transparent; } QMenuBar::item:selected { background: transparent; border: 1px solid #ffaa00; } QMenuBar::item:pressed { background: #444; border: 1px solid #000; background-color: QLinearGradient( x1:0, y1:0, x2:0, y2:1, stop:1 #212121, stop:0.4 #343434/*, stop:0.2 #343434, stop:0.1 #ffaa00*/ ); margin-bottom:-1px; padding-bottom:1px; } QMenu { border: 1px solid #000; } QMenu::item { padding: 2px 20px 2px 20px; } QMenu::item:selected { color: #000000; } QWidget:disabled { color: #404040; background-color: #323232; } QAbstractItemView { background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #4d4d4d, stop: 0.1 #646464, stop: 1 #5d5d5d); } QWidget:focus { /*border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);*/ } QLineEdit { background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #4d4d4d, stop: 0 #646464, stop: 1 #5d5d5d); padding: 1px; border-style: solid; border: 1px solid #1e1e1e; border-radius: 5; } QPushButton { color: #b1b1b1; background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #565656, stop: 0.1 #525252, stop: 0.5 #4e4e4e, stop: 0.9 #4a4a4a, stop: 1 #464646); border-width: 1px; border-color: #1e1e1e; border-style: solid; border-radius: 6; padding: 3px; font-size: 12px; padding-left: 5px; padding-right: 5px; } QPushButton:pressed { background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #2d2d2d, stop: 0.1 #2b2b2b, stop: 0.5 #292929, stop: 0.9 #282828, stop: 1 #252525); } QComboBox { /*selection-background-color: #ffaa00;*/ /*background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #565656, stop: 0.1 #525252, stop: 0.5 #4e4e4e, stop: 0.9 #4a4a4a, stop: 1 #464646);*/ border-style: solid; border: 1px solid #1e1e1e; border-radius: 5; } QComboBox:hover,QPushButton:hover { border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a); } QComboBox:on { padding-top: 3px; padding-left: 4px; background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #2d2d2d, stop: 0.1 #2b2b2b, stop: 0.5 #292929, stop: 0.9 #282828, stop: 1 #252525); selection-background-color: #ffaa00; } QComboBox QAbstractItemView { border: 2px solid darkgray; selection-background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a); } QComboBox::drop-down { subcontrol-origin: padding; subcontrol-position: top right; width: 15px; border-left-width: 0px; border-left-color: darkgray; border-left-style: solid; /* just a single line */ border-top-right-radius: 3px; /* same radius as the QComboBox */ border-bottom-right-radius: 3px; } QComboBox::down-arrow { image: url(:/icons/do_down_arrow.png); } QGroupBox:focus { border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a); } QTextEdit:focus { border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a); } QScrollBar:horizontal { border: 1px solid #222222; background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848); height: 7px; margin: 0px 16px 0 16px; } QScrollBar::handle:horizontal { background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ffa02f, stop: 0.5 #d7801a, stop: 1 #ffa02f); min-height: 20px; border-radius: 2px; } QScrollBar::add-line:horizontal { border: 1px solid #1b1b19; border-radius: 2px; background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ffa02f, stop: 1 #d7801a); width: 14px; subcontrol-position: right; subcontrol-origin: margin; } QScrollBar::sub-line:horizontal { border: 1px solid #1b1b19; border-radius: 2px; background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ffa02f, stop: 1 #d7801a); width: 14px; subcontrol-position: left; subcontrol-origin: margin; } QScrollBar::right-arrow:horizontal, QScrollBar::left-arrow:horizontal { border: 1px solid black; width: 1px; height: 1px; background: white; } QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { background: none; } QScrollBar:vertical { background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848); width: 7px; margin: 16px 0 16px 0; border: 1px solid #222222; } QScrollBar::handle:vertical { background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 0.5 #d7801a, stop: 1 #ffa02f); min-height: 20px; border-radius: 2px; } QScrollBar::add-line:vertical { border: 1px solid #1b1b19; border-radius: 2px; background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a); height: 14px; subcontrol-position: bottom; subcontrol-origin: margin; } QScrollBar::sub-line:vertical { border: 1px solid #1b1b19; border-radius: 2px; background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #d7801a, stop: 1 #ffa02f); height: 14px; subcontrol-position: top; subcontrol-origin: margin; } QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical { border: 1px solid black; width: 1px; height: 1px; background: white; } QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background: none; } QTextEdit { background-color: #242424; } QPlainTextEdit { background-color: #242424; } QHeaderView::section { background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #616161, stop: 0.5 #505050, stop: 0.6 #434343, stop:1 #656565); color: white; padding-left: 4px; border: 1px solid #6c6c6c; } QCheckBox:disabled { color: #414141; } QDockWidget::title { text-align: center; spacing: 3px; /* spacing between items in the tool bar */ background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #323232, stop: 0.5 #242424, stop:1 #323232); } QDockWidget::close-button, QDockWidget::float-button { text-align: center; spacing: 1px; /* spacing between items in the tool bar */ background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #323232, stop: 0.5 #242424, stop:1 #323232); } QDockWidget::close-button:hover, QDockWidget::float-button:hover { background: #242424; } QDockWidget::close-button:pressed, QDockWidget::float-button:pressed { padding: 1px -1px -1px 1px; } QMainWindow::separator { background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #161616, stop: 0.5 #151515, stop: 0.6 #212121, stop:1 #343434); color: white; padding-left: 4px; border: 1px solid #4c4c4c; spacing: 3px; /* spacing between items in the tool bar */ } QMainWindow::separator:hover { background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #d7801a, stop:0.5 #b56c17 stop:1 #ffa02f); color: white; padding-left: 4px; border: 1px solid #6c6c6c; spacing: 3px; /* spacing between items in the tool bar */ } QToolBar::handle { spacing: 3px; /* spacing between items in the tool bar */ background: url(:/icons/do_handle.png); } QMenu::separator { height: 2px; background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #161616, stop: 0.5 #151515, stop: 0.6 #212121, stop:1 #343434); color: white; padding-left: 4px; margin-left: 10px; margin-right: 5px; } QProgressBar { border: 2px solid grey; border-radius: 5px; text-align: center; } QProgressBar::chunk { background-color: #d7801a; width: 2.15px; margin: 0.5px; } QTabBar::tab { color: #b1b1b1; border: 1px solid #444; border-bottom-style: none; background-color: #323232; padding-left: 10px; padding-right: 10px; padding-top: 3px; padding-bottom: 2px; margin-right: -1px; } QTabWidget::pane { border: 1px solid #444; top: 1px; } QTabBar::tab:last { margin-right: 0; /* the last selected tab has nothing to overlap with on the right */ border-top-right-radius: 3px; } QTabBar::tab:first:!selected { margin-left: 0px; /* the last selected tab has nothing to overlap with on the right */ border-top-left-radius: 3px; } QTabBar::tab:!selected { color: #b1b1b1; border-bottom-style: solid; margin-top: 3px; background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:1 #212121, stop:.4 #343434); } QTabBar::tab:selected { border-top-left-radius: 3px; border-top-right-radius: 3px; margin-bottom: 0px; } QTabBar::tab:!selected:hover { /*border-top: 2px solid #ffaa00; padding-bottom: 3px;*/ border-top-left-radius: 3px; border-top-right-radius: 3px; background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:1 #212121, stop:0.4 #343434, stop:0.2 #343434, stop:0.1 #ffaa00); } QRadioButton::indicator:checked, QRadioButton::indicator:unchecked{ color: #b1b1b1; background-color: #323232; border: 1px solid #b1b1b1; border-radius: 6px; } QRadioButton::indicator:checked { background-color: qradialgradient( cx: 0.5, cy: 0.5, fx: 0.5, fy: 0.5, radius: 1.0, stop: 0.25 #ffaa00, stop: 0.3 #323232 ); } QCheckBox::indicator{ color: #b1b1b1; background-color: #323232; border: 1px solid #b1b1b1; width: 9px; height: 9px; } QRadioButton::indicator { border-radius: 6px; } QRadioButton::indicator:hover, QCheckBox::indicator:hover { border: 1px solid #ffaa00; } QCheckBox::indicator:checked { image:url(:/icons/do_checkbox.png); } QCheckBox::indicator:disabled, QRadioButton::indicator:disabled { border: 1px solid #444; } QSpinBox { background-color: #323232; border: 1px solid #ffaa00; } QSpinBox::up-arrow { image: url(:/icons/do_up_arrow.png); } QSpinBox::down-arrow { image: url(:/icons/do_down_arrow.png); } QDoubleSpinBox { background-color: #323232; border: 1px solid #ffaa00; } QDoubleSpinBox::up-arrow { image: url(:/icons/do_up_arrow.png); } QDoubleSpinBox::down-arrow { image: url(:/icons/do_down_arrow.png); } HerculesStudio/HercStudio/icons/loadu.gif0000664000175000017500000000250112065055254020047 0ustar yakovyakovGIF87a!K7Hm>>4O j;VVL~q] ?u!!< ||(^^ /yyeG)0ff7RRmO;q]xx$?-+ZZu|WWCJe,vvGlbb]`}}NNii,!@4!m.8rGG8ҧ D¡  D C]iPPV$R8"F3 рA& p0B:gNp@Dؓclx2!68p NJ] V0 ~>#X.mJ3j5U.g넓C2tA)><.1s+E` &,/,y3SVX¢殇Ĵ[D*e {Ev,㈷K1K 9V AMVT(f^z`C+΁A]I&2@ `F 4V= GzLrH Cq TM4rK VBB&>" QwbX==B\y%VJLcxemeRlDtGY%U J(HZ\Q^WY bF h) >4O j;VV~q] ?u!!< ||(^^ /yyeG)0ff7RRwmO;q]]xx$?-+ZZu|WWCJe,vvGlbb]`}}NNii,!TAJ|4dh!D`i " %ԏLj°!b$R":8鰩K&3pBCwZP$ic"yRA>i NJ7%~#X.mJ3(=UzgkC2t(B)SHE.Fs#Oo ',/,;S^殚Ĵgꅔ# {Ev,㈷KC %B` AM \p  Z 1ң?2RBirR`¹bAH$P1 # VFџ5P%aPAAF!wXP h`x\ep!Aui'caՄ$4sBtBp(uW^+2Cy0,ɕW 8YaeCx]V&FKXX`#ŵuEXdP% G\ J%V71FdRIB%Xea "A 7z9fs]WHvC`5j(ktQl=6n2 @B+P@;HerculesStudio/HercStudio/icons/poweronoffu.gif0000664000175000017500000000276512065055254021330 0ustar yakovyakovGIF87a!--,]\[\\Z}DDB::8987eeb\[YPOM'/ PpOia xogĀX@FHA U  1H 0 |, QqA`E+1 D ?H *aCi@H! A4k+QnlD(iT`|taB$ /PPF9p\hi1F B BQ睩@.P iP* jc<lt ȝ0ALBVHǠ1B- gaƩjƱo֪t0Tp eh-kFAJ F1;ڦBQH N:;F*ddJIB ;p!= ܕPk dTNPT<rxDу"P@GODpH"4@1+C(sL !\'r/<7; @@;HerculesStudio/HercStudio/icons/stopu.gif0000664000175000017500000000263212065055254020122 0ustar yakovyakovGIF87a!zz)+YY :888RRPR3111a___<>IKyy**XX |cey|؎ ^[BDrrX[##!#QQ2000WT==;=kkLJJJxx+)))ddx{CCqq$"""RPPP]]<_o9ETGـ.]!0zhhHE!4F06U l+qjiHO&l', ;HerculesStudio/HercConfiguration/ConfigFile.cpp0000664000175000017500000003044712065055226021223 0ustar yakovyakov/* * File: ConfigFile.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: ConfigFile.cpp 162 2012-12-13 14:31:56Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "ConfigFile.h" #include "HerculesStudio.h" #include "ConfigurationEditor.h" #include "SystemConfigLine.h" #include "DeviceConfigLine.h" #include #include #include #include #include using namespace std; #define synonymEntry(keyword1, keyword2) {#keyword1, #keyword2}, {#keyword2, #keyword1}, struct SynonymTableEntry ConfigFile::mSynonyms[] = { synonymEntry(ASN_AND_LX_REUSE,ALRF) {"", ""} }; ConfigFile::ConfigFile(const string& fileName) : mEditor(NULL), mLastSys(-1), mChanged(false), mNewConfig(false) { mFileName = fileName; initialize(); } void ConfigFile::initialize() { mFile = fopen(mFileName.c_str(), "r"); if (mFile==NULL) { outDebug(4, std::cout << "file not found:" << mFileName << std::endl); openTemplate(); } buildConfig(ConfigFile::File); if (mFile != NULL) { fclose(mFile); mFile = NULL; } } void ConfigFile::updateEditor(QPlainTextEdit& editor) { mEditor = &editor; mEditorIterator = mEditor->document()->begin(); buildConfig(ConfigFile::TextEdit); // TODO: build yourself by doing a merge: //1. Search the line in mFileArray //2. if not found - add. //3. compare if the same text - if not - flag with update. char buff[MAX_CONFIG_LINE]; while ( getNextLine(buff, MAX_CONFIG_LINE, ConfigFile::TextEdit)) { std::string s(buff); for (int i=0; i 1) { int additions = l.getMultiCount(); while (additions>1) { devno++; newLine.str(""); newLine << std::hex << std::setw(4) << std::setfill('0') << std::uppercase << devno << " " << l.getMultiToken(1,0) << "\n"; DeviceConfigLine n(newLine.str().c_str()); mFileArray.push_back(n); additions--; } } } } outDebug(3, std::cout << "### last sys=" << mLastSys << " size=" << mFileArray.size() << std::endl); outDebug(3, std::cout << mFileArray[mLastSys].getLine() << std::endl) } ConfigFile::~ConfigFile() { mFileArray.clear(); } void ConfigFile::addNonDev(SystemConfigLine * configLine) { FileArray::iterator it = mFileArray.begin() + mLastSys+1; mFileArray.insert(it, *configLine); ++mLastSys; mChanged = true; } void ConfigFile::addDev(DeviceConfigLine * configLine) { outDebug(2, std::cout << "add dev after " << mFileArray.size() << " line:'" << configLine->getLine() << std::endl); configLine->parseLine(); mFileArray.push_back(*configLine); mChanged = true; } const std::string& ConfigFile::getFileName() const { return mFileName; } DeviceConfigLine * ConfigFile::getDevice(int index) const { if (index <= mLastSys) { std::cout << "ConfigFile[" << index << "] requested where lastsys=" << mLastSys << std::endl; abort(); } if (static_cast(index) >= mFileArray.size()) { std::cout << "ConfigFile[" << index << "] requested where size=" << mFileArray.size() << std::endl; abort(); } return static_cast (const_cast(&mFileArray.at(index))); } int ConfigFile::numberOfDevices() { int num=0; for (size_t i=mLastSys+1 ; iisRemark() && !getDevice(i)->isDeleted() ) num++; } return num; } DeviceConfigLine * ConfigFile::getDevice(const std::string& devno) const { for (size_t i=mLastSys+1; igetToken(0) == devno) return l; } return NULL; } DeviceConfigLine * ConfigFile::findFirstDeviceByType(const char * type) const { DeviceConfigLine * ret; for (unsigned int i=mLastSys+1; i < mFileArray.size() ; i++) { ret = getDevice(i); if (ret->getToken(1) == type) return ret; } return NULL; } SystemConfigLine * ConfigFile::operator[] (int index) const { if (index > mLastSys) { outDebug(5, std::cout << "ConfigFile[" << index << "] requested where lastsys=" << mLastSys << std::endl); abort(); } return static_cast (const_cast(&mFileArray.at(index))); } int ConfigFile::size() const { return mFileArray.size(); } bool ConfigFile::write(const string& fileName) { FILE * f = fopen(fileName.c_str(), "w"); if (f==NULL) return false; for (int i=0; igetLine() << "=='" << (*this)[i]->getToken(0) << "'" <isRemark() && ((*this)[i]->getUppercaseToken(0) == keyword)) { outDebug(5, std::cout << "token(0):'" << (*this)[i]->getLine() << "'" << std::endl); return (*this)[i]; } } // look in new lines for (unsigned int i=0; igetLine() << std::endl); if (cl->getToken(0) == keyword) { outDebug(4, std::cout << "found" << std::endl); return cl; } } if (synonyms) { outDebug(4, std::cout << "locating in synonyms " << keyword << " in synonyms " << std::endl); for (int i=0; mSynonyms[i].keyword1.length() > 0; i++) { if (mSynonyms[i].keyword1.compare(keyword) == 0) { const ConfigLine * tmp = locateLine(mSynonyms[i].keyword2, false, false); if (tmp != NULL) { outDebug(4, std::cout << "found in synonyms" << std::endl); return tmp; } } } } SystemConfigLine * ret = NULL; if (create) { std::string line(keyword + "\n"); ret = new SystemConfigLine(line.c_str()); ret->setNew(true); outDebug(3, std::cout << "new line 1:" << ret->getToken(0) << " 2:" << ret->getToken(1) << std::endl); mNewLines.push_back(*ret); } return ret; } void ConfigFile::appendNewLines() { outDebug(4, std::cout << "append new lines:" << mNewLines.size() << std::endl); // append new system lines for (unsigned int i=0; idocument()->end()) { len = mEditorIterator.length(); if (len > 0) { strncpy(buff,mEditorIterator.text().toAscii().data(),len-1); buff[len-1] = '\0'; } else buff[0] = '\0'; mEditorIterator = mEditorIterator.next(); return buff; } else return NULL; } } const char * ConfigFile::configTemplate[52] = { "#------------------------------------------------------------------------------\n", "# CPU Configuration\n", "#------------------------------------------------------------------------------\n", "\n", " CPUSERIAL 002623 # CPU serial number\n", " CPUMODEL 3090 # CPU model number\n", " MODEL EMULATOR # STSI returned model\n", " PLANT ZZ # STSI returned plant\n", " MANUFACTURER HRC # STSI returned manufacturer\n", " LPARNAME HERCULES # DIAG 204 returned lparname\n", " CPUVERID FD # CPU Version Identification\n", " MAINSIZE 128 # Main storage size in megabytes\n", " NUMCPU 1 # Number of CPUs" "\n", "#------------------------------------------------------------------------------\n", "# OS Tailoring\n", "#------------------------------------------------------------------------------\n", "\n", " LOADPARM 0120.... # IPL parameter\n", "\n", "#------------------------------------------------------------------------------\n", "# Hercules Service Processor and Hercules Application Window\n", "#------------------------------------------------------------------------------\n", "\n", " DIAG8CMD disable echo # OS may not issue commands via DIAG 8\n", "\n", "# HTTPPORT 8081 noauth userid password # HTTP server port\n", "\n", " PANRATE FAST # Panel refresh rate\n", "\n", "\n", "#-------------------------------------------------------------------------------\n", "# Advanced Hercules Performance Tailoring\n", "#\n", "# +----------------------------------------------------------------+\n", "# | Caution: Modification of these parameters may adversely |\n", "# | affect the performance of the host system |\n", "# | and/or Hercules. |\n", "# +----------------------------------------------------------------+\n", "#-------------------------------------------------------------------------------\n", "\n", " HERCPRIO 0 # Hercules process runs at Normal priority\n", " CPUPRIO 15 # CPU thread(s) run at Low priority\n", " DEVPRIO 8 # Device thread(s) run at Below Normal priority\n", " TODPRIO -20 # TOD Clock and timer thread are Time Critical\n", "\n", "#------------------------------------------------------------------------------\n", "# I/O Devices\n", "#------------------------------------------------------------------------------\n", " 0009 3270\n", "\n", "EOF"}; HerculesStudio/HercConfiguration/TapeProperties.cpp0000664000175000017500000002020212065055226022150 0ustar yakovyakov/* * File: TapeProperties.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: TapeProperties.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "TapeProperties.h" #include "ConfigurationEditor.h" #include "Preferences.h" #include #include #include const std::string TapeProperties::types[] = {"3410", "3420", "3422", "3430", "3480", "3490", "3590", "9347", "8809", ""}; TapeProperties::TapeProperties(ConfigLine & line, QWidget *parent) : GenericDeviceProperties(line, parent) { ui.setupUi(this); //standard(true);//temp initialize(line); connect(ui.okButton, SIGNAL(clicked()), this, SLOT(ok())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancel())); connect(ui.fileButton, SIGNAL(clicked()), this, SLOT(fileBrowse())); } TapeProperties::~TapeProperties() { } void TapeProperties::ok() { if (!deviceNumberValidator(ui.deviceNumber)) return; if (ui.filename->text().isEmpty()) { QMessageBox * p = new QMessageBox(this); p->setText("Please enter file name"); p->exec(); ui.filename->setFocus(); return; } std::stringstream newLineBuff; newLineBuff << ui.deviceNumber->text().toStdString() << " " << ui.tapeCombo->currentText().toStdString(); newLineBuff << " " << ui.filename->text().toStdString(); if (ui.noAutomountCheckbox->isChecked()) newLineBuff << " noautomount"; if (ui.awsCheckbox->isChecked()) newLineBuff << " awstape"; if (ui.readonlycheckbox->isChecked()) newLineBuff << " RO"; if (ui.deonirqCheckbox->isChecked()) newLineBuff << " deonirq=1"; if (ui.compressionCombobox->currentIndex() > 0) { newLineBuff << " compress=1"; newLineBuff << " method=" << ui.compressionCombobox->currentText().toStdString(); newLineBuff << " level=" << ui.compressionLevelSlider->value(); } if (ui.chunkSizeSpinbox->value() != 65535) { newLineBuff << " chunksize=" << ui.chunkSizeSpinbox->value(); } if (ui.maxsizeNumSpinbox->value() > 0) { newLineBuff << " maxsize" ; switch (ui.maxsizeUnitsSpinbox->currentIndex()) { case (1): newLineBuff << "k="; break; case (2): newLineBuff << "m="; break; default: newLineBuff << "="; break; } newLineBuff << ui.maxsizeNumSpinbox->value(); } if (ui.eotmarginSpinbox->value() > 0) { newLineBuff << " eotmargin=" << ui.eotmarginSpinbox->value(); } newLineBuff << "\n"; mLine.replaceLine(newLineBuff.str()); emit updateLine(true); this->deleteLater(); } void TapeProperties::cancel() { emit updateLine(false); this->deleteLater(); } void TapeProperties::standard(bool set) { if (set) { scsi(false); ui.tapeGroupBox->setTitle("Standard Tape"); } //ui.filenameLabel->setVisible(set); //ui.filename->setVisible(set); //ui.fileButton->setVisible(set); ui.awsCheckbox->setVisible(set); ui.readonlycheckbox->setVisible(set); ui.deonirqCheckbox->setVisible(set); ui.compressionCombobox->setVisible(set); ui.compressionLevelSlider->setVisible(set); ui.chunkSizeSpinbox->setVisible(set); ui.chunkSizeLabel->setVisible(set); ui.label_slider_1->setVisible(set); ui.label_slider_9->setVisible(set); ui.maxsizeNumSpinbox->setVisible(set); ui.maxsizeUnitsSpinbox->setVisible(set); ui.maxsizeLabel->setVisible(set); ui.eotmarginSpinbox->setVisible(set); ui.eotmarginLabel->setVisible(set); } void TapeProperties::scsi(bool set) { if (set) { standard(false); ui.tapeGroupBox->setTitle("SCSI Tape"); } ui.noergCheckbox->setVisible(set); ui.blkid32Checkbox->setVisible(set); } void TapeProperties::fileBrowse() { std::string s = QFileDialog::getOpenFileName(this, "Browse For Tape Files", Preferences::getInstance().configDir().c_str(), tr("All files(*)")).toStdString(); ui.filename->setText(s.c_str()); } void TapeProperties::initialize(ConfigLine & line) { ui.deviceNumber->setText(line.getToken(0).c_str()); std::string dev = line.getToken(1); int type=0; while(types[type].length() > 0) { if (dev == types[type]) ui.tapeCombo->setCurrentIndex(type); type++; } standard(true); ui.filename->setText(line.getToken(2).c_str()); for (int i=3; isetChecked(true); } else if (token.toLower() == "--blkid-32") { ui.blkid32Checkbox->setChecked(true); } else if (token.toLower() == "awstape") { ui.awsCheckbox->setChecked(true); } if ( (token.toLower() == "compress=1") || (token.toLower() == "idrc=1") ) { if (ui.compressionCombobox->currentIndex() == 0) ui.compressionCombobox->setCurrentIndex(1); } if (token.toLower().toStdString().substr(0,7) == "method=") { if (token.toLower().toStdString().substr(7,1) == "z") ui.compressionCombobox->setCurrentIndex(1); else ui.compressionCombobox->setCurrentIndex(2); } if (token.toLower().toStdString().substr(0,6) == "level=") { int level = ConfigurationEditor::parseNum(token.toStdString().substr(6,1).c_str()); if (level >= 1 && level <=9) ui.compressionLevelSlider->setValue(level); } if (token.toLower().toStdString().substr(0,10) == "chunksize=") { int chunksize = ConfigurationEditor::parseNum(token.toStdString().substr(10).c_str()); if (chunksize >= 4096 && chunksize <=65535) ui.chunkSizeSpinbox->setValue(chunksize); } if (token.toLower().toStdString().substr(0,8) == "maxsize=") { int maxsize = ConfigurationEditor::parseNum(token.toStdString().substr(8).c_str()); ui.maxsizeUnitsSpinbox->setCurrentIndex(0); ui.maxsizeNumSpinbox->setValue(maxsize); } if (token.toLower().toStdString().substr(0,9) == "maxsizek=") { int maxsize = ConfigurationEditor::parseNum(token.toStdString().substr(9).c_str()); ui.maxsizeUnitsSpinbox->setCurrentIndex(1); ui.maxsizeNumSpinbox->setValue(maxsize); } if (token.toLower().toStdString().substr(0,9) == "maxsizem=") { int maxsize = ConfigurationEditor::parseNum(token.toStdString().substr(9).c_str()); ui.maxsizeUnitsSpinbox->setCurrentIndex(2); ui.maxsizeNumSpinbox->setValue(maxsize); } if (token.toLower().toStdString().substr(0,10) == "eotmargin=") { int eotmargin = ConfigurationEditor::parseNum(token.toStdString().substr(10).c_str()); ui.eotmarginSpinbox->setValue(eotmargin); } if ( (token.toLower() == "readonly=1") || (token.toLower() == "ro") || (token.toLower() == "noring") ) { ui.readonlycheckbox->setChecked(true); } if (token.toLower() == "deonirq=1") { ui.deonirqCheckbox->setChecked(true); } if (token.toLower() == "noautomount") { ui.noAutomountCheckbox->setChecked(true); } } } HerculesStudio/HercConfiguration/GenericDeviceProperties.cpp0000664000175000017500000001173212065055226023763 0ustar yakovyakov/* * File: GenericDeviceProperties.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: GenericDeviceProperties.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "GenericDeviceProperties.h" #include "TerminalProperties.h" #include "SysgProperties.h" #include "ConsoleProperties.h" #include "PrinterProperties.h" #include "CardReaderProperties.h" #include "PunchProperties.h" #include "TapeProperties.h" #include "CtcProperties.h" #include "DasdProperties.h" #include "DevicesWidget.h" #include "ConfigurationEditor.h" #include #include #include GenericDeviceProperties::GenericDeviceProperties(ConfigLine& line, QWidget *parent) : QDialog(parent) , mLine(line), mParent(parent), mOriginalDeviceNumber(ConfigurationEditor::parseNum(mLine.getToken(0),16)) { } GenericDeviceProperties::~GenericDeviceProperties() { } GenericDeviceProperties * GenericDeviceProperties::classFactory(DeviceConfigLine& line, QWidget *parent, DeviceTypes::Type type) { if (type == 0) type = line.getDeviceType(); outDebug(1, std::cout << "GenericDeviceProperties::classFactory " << type << std::endl); switch(type) { case DeviceTypes::Terminal: return new TerminalProperties(line,parent); case DeviceTypes::Console: return new ConsoleProperties(line,parent); case DeviceTypes::Printer: return new PrinterProperties(line,parent); case DeviceTypes::CardReader: return new CardReaderProperties(line,parent); case DeviceTypes::CardPunch: return new PunchProperties(line,parent); case DeviceTypes::Tape: return new TapeProperties(line,parent); case DeviceTypes::CTC: return new CtcProperties(line,parent); case DeviceTypes::DASD: return new DasdProperties(line,parent); case DeviceTypes::Sysg: return new SysgProperties(line,parent); default: throw hsException("Invalid device, "+ line.getToken(1)); } } bool GenericDeviceProperties::deviceNumberValidator(QLineEdit * deviceLine) { // check that field is not empty if (deviceLine->text().isEmpty() || !ConfigurationEditor::validateNum(deviceLine->text().toStdString(),16)) { QMessageBox * p = new QMessageBox(this); p->setText("Please enter device number in the range 0000-ffff"); p->exec(); deviceLine->setFocus(); return false; } //make sure device number is new/unique DevicesWidget * dev = dynamic_cast(mParent); // if parent is not DevicesWidget, it must be a live update while hercules is running if (dev == NULL) return true; std::stringstream buff; int iDevno = ConfigurationEditor::parseNum(deviceLine->text().toStdString(),16); if (iDevno != mOriginalDeviceNumber) { buff << std::hex << std::setw(4) << std::setfill('0') << std::uppercase << iDevno; std::string devno = buff.str(); if (!dev->isUnique(devno)) { QMessageBox * p = new QMessageBox(this); p->setText("This device number is already used"); p->exec(); return false; } } return true; } bool GenericDeviceProperties::ipValidator(QLineEdit * ipLineEdit, bool allowNull) { const std::string ip = ipLineEdit->text().toStdString(); bool ret = true; if (allowNull && ip.compare("...") == 0) return ret; QString qip = ip.c_str(); int pos=0; for (int i=0; i<4 && ret; i++) { outDebug(5, std::cout << "IP:" << ip << " pos:" << pos << " i=" << i << std::endl); if (i>0) { if (qip.toLatin1().data()[pos] != '.') { ret = false; break; } pos++; } int num = 0; int ppos=pos; while(ip[pos] >= '0' && ip[pos] <= '9') { num = num*10 + ip[pos] - '0'; pos++; } if (pos == ppos || num > 255) { ret = false; break; } } if (!ret) { QString msg = ip.c_str(); msg += " is illagel IP address"; QMessageBox::warning(this, "Illegal IP address", msg , QMessageBox::Ok); ipLineEdit->setFocus(); return false; } return true; } HerculesStudio/HercConfiguration/ConsoleProperties.ui0000664000175000017500000001164112065055226022523 0ustar yakovyakov ConsolePropertiesClass 0 0 474 381 ConsoleProperties 20 50 431 61 Terminal true 320 20 81 24 1052 3215 1052-C 3215-C 10 20 101 19 Device Number 120 20 61 25 226 20 81 20 Device Type 20 320 78 29 Cancel 370 320 78 29 Update 20 140 101 19 Terminal Group 170 140 161 25 170 140 31 25 x; 20 230 111 19 IP Address 170 230 161 25 hhh.hhh.hhh.hhh; 20 280 121 19 Subnet Mask 170 280 161 25 hhh.hhh.hhh.hhh; 20 170 91 24 No Prompt HerculesStudio/HercConfiguration/DevicesRename.cpp0000664000175000017500000000303212065055226021716 0ustar yakovyakov/* * File: DevicesRename.cpp * * Author: Jacob Dekel * Created on: Nov 1, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DevicesRename.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "DevicesRename.h" DevicesRename::DevicesRename(int value, int newValue, QWidget *parent) : QDialog(parent), mInitialDevNum(value) { ui.setupUi(this); mSpinBox = new Configuration::HexSpinBox(this); mSpinBox->move(180,40); mSpinBox->setValue(newValue); QString from = mSpinBox->textFromValue(value); ui.fromValue->setText(from); connect(ui.buttonBox,SIGNAL(accepted()), this, SLOT(ok())); connect(ui.buttonBox,SIGNAL(rejected()), this, SLOT(notok())); } DevicesRename::~DevicesRename() { } void DevicesRename::ok() { emit accepted(mSpinBox->textFromValue(mInitialDevNum), mSpinBox->textFromValue(mSpinBox->value())); } void DevicesRename::notok() { emit rejected(); } HerculesStudio/HercConfiguration/ConfigLine.cpp0000664000175000017500000000773412065055226021236 0ustar yakovyakov/* * File: ConfigLine.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: ConfigLine.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "ConfigLine.h" #include "HerculesStudio.h" #include #include ConfigLine::ConfigLine(const char *line) : mLine(line), mRemark(false), mDeleted(false), mUpdated(false), mNew(false), mInError(false), mTokens() { if (mLine.find_first_of("\n") == std::string::npos) mLine = mLine + "\n"; parseLine(); } ConfigLine::~ConfigLine() { } const std::string& ConfigLine::getLine() const { return mLine; } std::string ConfigLine::getToken(int i) const { if (i >= mSize) return ""; std::string result = mLine.substr(mTokens[i].first, mTokens[i].second ) ; return result; } std::string ConfigLine::getLowercaseToken(int i) const { std::string result = getToken(i); std::transform(result.begin(), result.end(), result.begin(), ::tolower); return result; } std::string ConfigLine::getUppercaseToken(int i) const { std::string result = getToken(i); std::transform(result.begin(), result.end(), result.begin(), ::toupper); return result; } std::string ConfigLine::getMultiToken(int from, int to) const { if (from >= mSize) return ""; if (to >= mSize || to == 0) to = mSize-1; return mLine.substr(mTokens[from].first, mTokens[to].first+mTokens[to].second-mTokens[from].first ) ; } int ConfigLine::getAbsoluteTokenColumn(int i) const { if (i >= mSize) return -1; int result = mTokens[i].first; return result; } int ConfigLine::getAbsoluteTokenEnd(int i) const { if (i >= mSize) return -1; int result = mTokens[i].second; return result; } void ConfigLine::replaceLine(const std::string& newLine) { outDebug(5, std::cout << "configLine: new Line '" << newLine << "'" << std::endl); outDebug(5, std::cout << "configLine: old Line '" << mLine << "'" << std::endl); mLine = newLine; mUpdated = true; parseLine(); } void ConfigLine::replaceParameters(const std::string& newParm) { std::string newString = " " + getToken(0) + " " + newParm + " #edited By Hercules Studio\n"; outDebug(5, std::cout << "configLine: line is now '" << newString << "'" << std::endl); outDebug(5, std::cout << "configLine: old string '" << mLine << "'" << std::endl); mLine = newString; mUpdated = true; mNew = false; parseLine(); } void ConfigLine::parseLine() { tokenize(" \t\n\r"); mRemark = false; if (mTokens.size() > 0 && mLine[mTokens[0].first] == '#') { mRemark = true; return; } mKeyStart=mLine.find_first_not_of(" \t\n\r"); if (mKeyStart == std::string::npos) // blank line { mRemark = true; return; } } void ConfigLine::tokenize(const std::string& delimiters) { std::string::size_type lastPos = mLine.find_first_not_of(delimiters, 0); std::string::size_type pos = mLine.find_first_of(delimiters, lastPos); mTokens.clear(); mSize = 0; while (std::string::npos != pos || std::string::npos != lastPos) { if (pos == std::string::npos) pos = mLine.length() - lastPos; TokenPair newToken(lastPos, pos - lastPos); mTokens.push_back(newToken); mSize++; lastPos = mLine.find_first_not_of(delimiters, pos); pos = mLine.find_first_of(delimiters, lastPos); if (lastPos != std::string::npos && mLine[lastPos] == '#') break; } } void ConfigLine::setDeleted(bool parm) { mDeleted = parm; } HerculesStudio/HercConfiguration/CardReaderProperties.h0000664000175000017500000000371312065055226022730 0ustar yakovyakov/* * File: CardReaderProperties.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: CardReaderProperties.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object handles the configuration of the card reader * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef CARDREADERPROPERTIES_H #define CARDREADERPROPERTIES_H #include "GenericDeviceProperties.h" #include "Extended_Ui_CardReaderProperties.h" #include class NewReaderFile; class CardReaderProperties : public GenericDeviceProperties { Q_OBJECT public: CardReaderProperties(ConfigLine& line, QWidget *parent = 0); virtual ~CardReaderProperties(); // Item previously dragged, was relocated, and the original should be deleted void shouldBeDeleted(); private: Extended_Ui_CardReaderProperties ui; QStandardItemModel * mModel; NewReaderFile * mNewReaderFile; int mDragCandidate, mDragCount; std::vector mFileList; void setSockdev(bool checked); void initialize(const ConfigLine & line); private slots: void ok(); void cancel(); void itemPressed (const QModelIndex &); void addPressed(); void deletePressed(); void addFile(QString& str); void newFileFinished(QObject * obj); void sockdevChanged(); }; #endif // CARDREADERPROPERTIES_H HerculesStudio/HercConfiguration/ConfigurationFreeEditor.cpp0000664000175000017500000000532112065055226023767 0ustar yakovyakov#include "ConfigurationFreeEditor.h" #include "HerculesStudio.h" #include ConfigurationFreeEditor::ConfigurationFreeEditor(QWidget *parent) : QPlainTextEdit(parent) { mLineNumberArea = new LineNumberArea(this); connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateLineNumberAreaWidth(int))); connect(this, SIGNAL(updateRequest(QRect,int)), this, SLOT(updateLineNumberArea(QRect,int))); connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(highlightCurrentLine())); updateLineNumberAreaWidth(0); highlightCurrentLine(); } int ConfigurationFreeEditor::lineNumberAreaWidth() { int digits = 1; int max = qMax(1, blockCount()); while (max >= 10) { max /= 10; ++digits; } int space = 3 + fontMetrics().width(QLatin1Char('9')) * digits; return space; } void ConfigurationFreeEditor::updateLineNumberAreaWidth(int /* newBlockCount */) { setViewportMargins(lineNumberAreaWidth(), 0, 0, 0); } void ConfigurationFreeEditor::updateLineNumberArea(const QRect &rect, int dy) { if (dy) mLineNumberArea->scroll(0, dy); else mLineNumberArea->update(0, rect.y(), mLineNumberArea->width(), rect.height()); if (rect.contains(viewport()->rect())) updateLineNumberAreaWidth(0); } void ConfigurationFreeEditor::resizeEvent(QResizeEvent *e) { QPlainTextEdit::resizeEvent(e); QRect cr = contentsRect(); mLineNumberArea->setGeometry(QRect(cr.left(), cr.top(), lineNumberAreaWidth(), cr.height())); } void ConfigurationFreeEditor::highlightCurrentLine() { QList extraSelections; if (!isReadOnly()) { QTextEdit::ExtraSelection selection; QColor lineColor = QColor(Qt::yellow).lighter(170); selection.format.setBackground(lineColor); selection.format.setProperty(QTextFormat::FullWidthSelection, true); selection.cursor = textCursor(); selection.cursor.clearSelection(); extraSelections.append(selection); } setExtraSelections(extraSelections); } void ConfigurationFreeEditor::lineNumberAreaPaintEvent(QPaintEvent *event) { QPainter painter(mLineNumberArea); painter.fillRect(event->rect(), Qt::gray); QTextBlock block = firstVisibleBlock(); int blockNumber = block.blockNumber(); int top = (int) blockBoundingGeometry(block).translated(contentOffset()).top(); int bottom = top + (int) blockBoundingRect(block).height(); while (block.isValid() && top <= event->rect().bottom()) { if (block.isVisible() && bottom >= event->rect().top()) { QString number = QString::number(blockNumber + 1); painter.setPen(Qt::black); painter.drawText(0, top, mLineNumberArea->width(), fontMetrics().height(), Qt::AlignRight, number); } block = block.next(); top = bottom; bottom = top + (int) blockBoundingRect(block).height(); ++blockNumber; } } HerculesStudio/HercConfiguration/VisualizedDeviceEntry.cpp0000664000175000017500000000234712065055226023475 0ustar yakovyakov/* * File: VisualizedDeviceEntry.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: VisualizedDeviceEntry.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "VisualizedDeviceEntry.h" VisualizedDeviceEntry::VisualizedDeviceEntry(int number, DeviceTypes::Type type, const std::string& definition) : mNumber(number), mType(type), mDefinition(definition), mPixmap(NULL), mIcon(NULL), mItem(NULL), mTraced(false) { } VisualizedDeviceEntry::VisualizedDeviceEntry() {} VisualizedDeviceEntry::~VisualizedDeviceEntry() { } HerculesStudio/HercConfiguration/TerminalProperties.ui0000664000175000017500000001011712065055226022671 0ustar yakovyakov TerminalPropertiesClass 0 0 474 374 TerminalProperties 20 50 431 61 Terminal true 320 20 81 24 3270 3287 10 20 111 19 Device Number 120 20 61 25 32767 226 20 91 20 Device Type 20 150 431 191 Optional Arguments 140 70 113 25 009.009.009.009; 140 30 113 25 20 30 111 21 Group Name 20 70 111 19 IP Address 340 140 78 29 Update 20 140 78 29 Cancel HerculesStudio/HercConfiguration/DeviceMenuProcessor.cpp0000664000175000017500000001217312065055226023136 0ustar yakovyakov/* * File: DeviceMenuProcessor.cpp * * Author: Jacob Dekel * Created on: Oct, 14 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DeviceMenuProcessor.cpp 162 2012-12-13 14:31:56Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "DeviceMenuProcessor.h" #include "GenericDeviceProperties.h" #include "NewReaderFile.h" #include DeviceMenuProcessor::DeviceMenuProcessor(QWidget *parent) : QWidget(parent), mClickRow(-1) { } DeviceMenuProcessor::~DeviceMenuProcessor() { } void DeviceMenuProcessor::devicesClick(QMouseEvent * event) { hOutDebug(5, "devicesClick(" << mClickRow << "): " << (event->button() == Qt::RightButton ? "Right " : " ?" ) << " at" << event->x()); mLastClick = mClickRow; if ( event->button() == Qt::RightButton ) { mMenu.clear(); QMenu * mMenuAdd; mMenuAdd = mMenu.addMenu("Add..."); mMenuAdd->clear(); mMenuAdd->addAction("Terminal", this, SLOT(menuAddTerminal())); if (canAddSYSG()) mMenuAdd->addAction("SYSG", this, SLOT(menuAddSYSG())); mMenuAdd->addAction("Console", this, SLOT(menuAddConsole())); mMenuAdd->addAction("Printer", this, SLOT(menuAddPrinter())); mMenuAdd->addAction("Card Reader", this, SLOT(menuAddCardReader())); mMenuAdd->addAction("Card Punch", this, SLOT(menuAddCardPunch())); mMenuAdd->addAction("Tape Drives", this, SLOT(menuAddTape())); mMenuAdd->addAction("CTC", this, SLOT(menuAddCTC())); mMenuAdd->addAction("Dasd", this, SLOT(menuAddDasd())); if (realDevice()) { mMenu.addAction("Delete", this, SLOT(menuDelete())); if (!isConfig()) { mMenu.addAction("Rename", this, SLOT(menuRename())); if (hasConfig()) mMenu.addAction("Re-Initialize...", this, SLOT(menuProperties())); mMenu.addAction("Attention Interrupt", this, SLOT(menuInterrupt())); mMenu.addAction("Subchannel Status", this, SLOT(menuStatus())); if (traced()) mMenu.addAction(*new QIcon(":/icons/16x16/check.png"),"Trace CCW", this, SLOT(menuTraceCCW())); else mMenu.addAction("Trace CCW", this, SLOT(menuTraceCCW())); if (this->getType(mClickRow) == DeviceTypes::Tape) { hOutDebug(3, "TAPE"); mMenu.addSeparator(); mMenu.addAction("Load Tape", this, SLOT(menuLoad())); mMenu.addAction("Unload Tape", this, SLOT(menuUnload())); } else { hOutDebug(3, "not tape"); } } else { mMenu.addSeparator(); mMenu.addAction("Properties...", this, SLOT(menuProperties())); mMenu.move(event->globalX(), event->globalY()); } } mMenu.move(event->globalX(), event->globalY()); mMenu.setVisible(true); mClickRow = -1; } } void DeviceMenuProcessor::menuAddTerminal() { menuAddItem(DeviceTypes::Terminal); } void DeviceMenuProcessor::menuAddConsole() { menuAddItem(DeviceTypes::Console); } void DeviceMenuProcessor::menuAddPrinter() { menuAddItem(DeviceTypes::Printer); } void DeviceMenuProcessor::menuAddCardReader() { menuAddItem(DeviceTypes::CardReader); } void DeviceMenuProcessor::menuAddCardPunch() { menuAddItem(DeviceTypes::CardPunch); } void DeviceMenuProcessor::menuAddTape() { menuAddItem(DeviceTypes::Tape); } void DeviceMenuProcessor::menuAddCTC() { menuAddItem(DeviceTypes::CTC); } void DeviceMenuProcessor::menuAddDasd() { menuAddItem(DeviceTypes::DASD); } void DeviceMenuProcessor::menuAddSYSG() { menuAddItem(DeviceTypes::Sysg); } void DeviceMenuProcessor::menuAddItem(int iType) { outDebug(5, std::cout << "add Item" << mClickRow << std::endl); if (iType < 0 || iType > DeviceTypes::Comm) return; DeviceTypes::Type type = static_cast (iType); mCandidateLine = new DeviceConfigLine("\n"); mCandidateLine->setNew(true); GenericDeviceProperties * mProp = NULL; try { mProp = GenericDeviceProperties::classFactory(*mCandidateLine,this,type); } catch (...) { outDebug(2, std::cout << "exception caught in class factory (add)" << std::endl); } connect(mProp, SIGNAL(updateLine(bool)), this, SLOT(doAddDevice(bool))); mProp->setVisible(true); mClickRow=-1; } void DeviceMenuProcessor::menuLoad() { NewReaderFile * newTapeFile = new NewReaderFile(this); connect(newTapeFile, SIGNAL(okPressed(QString&)), this, SLOT(newTapeFileOK(QString&))); newTapeFile->exec(); } void DeviceMenuProcessor::menuUnload() { QString s("*"); if (!isConfig()) doLoadTape(s); } void DeviceMenuProcessor::newTapeFileOK(QString& tapeFileName) { if (!isConfig()) doLoadTape(tapeFileName); } HerculesStudio/HercConfiguration/DeviceConfigView.h0000664000175000017500000000260712065055226022040 0ustar yakovyakov/* * File: DeviceConfigView.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DeviceConfigView.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object presents the devices in the configuration window * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DEVICECONFIGVIEW_H_ #define DEVICECONFIGVIEW_H_ #include "HerculesStudio.h" #include #include #include class DeviceConfigView : public QTableView { Q_OBJECT public: DeviceConfigView(QWidget * parent); virtual ~DeviceConfigView(); protected: virtual void mousePressEvent ( QMouseEvent * e ); signals: void deviceClick(QMouseEvent *); void deviceDoubleClick(QMouseEvent *); }; #endif /* DEVICECONFIGVIEW_H_ */ HerculesStudio/HercConfiguration/DeviceListView.cpp0000664000175000017500000000221512065055226022074 0ustar yakovyakov/* * File: DeviceListView.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DeviceListView.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "DeviceListView.h" #include DeviceListView::DeviceListView(QWidget * parent) :QListView(parent) { } DeviceListView::~DeviceListView() { } void DeviceListView::mousePressEvent ( QMouseEvent * event ) { QListView::mousePressEvent(event); emit deviceClick(event); } HerculesStudio/HercConfiguration/CtcProperties.cpp0000664000175000017500000003426312065055226022004 0ustar yakovyakov/* * File: CtcProperties.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: CtcProperties.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "CtcProperties.h" #include "ConfigurationEditor.h" #include "Preferences.h" #include #include #include CtcProperties::CtcProperties(ConfigLine& configLine, QWidget *parent) : GenericDeviceProperties(configLine, parent) { ui.setupUi(this); initialize(configLine); connect(ui.okButton, SIGNAL(clicked()), this, SLOT(ok())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancel())); connect(ui.typeCombo, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(typeChanged(const QString &))); connect(ui.oatBrowseButton, SIGNAL(clicked()), this, SLOT(oatBrowse())); connect(ui.tun0CheckBox, SIGNAL(stateChanged(int)), this, SLOT(tun0Check(int))); } CtcProperties::~CtcProperties() { } void CtcProperties::ok() { if (!deviceNumberValidator(ui.deviceNumber)) return; std::stringstream newLineBuff; newLineBuff << ui.deviceNumber->text().toStdString(); newLineBuff << " " << ui.typeCombo->currentText().toStdString(); if (ui.typeCombo->currentIndex() == 0) // lcs { if (!ui.tun->text().isEmpty()) { newLineBuff << " -n " << ui.tun->text().toStdString(); } if (!ui.oat->text().isEmpty()) { newLineBuff << " -o " << ui.oat->text().toStdString(); } if (!(ui.mac->text() == ":::::")) { if (macValidator(ui.mac->text().toStdString())) { newLineBuff << " -m " << ui.mac->text().toStdString() ; } else return; } if ( !ui.guestIP->text().isEmpty() && (ui.guestIP->text() != "..." ) ) { if (ipValidator(ui.guestIP, false)) { newLineBuff << " " << ui.guestIP->text().toStdString() ; } else return; } } else if (ui.typeCombo->currentIndex() == 2) // ctct { if (!ipValidator(ui.hostIP,false)) return; newLineBuff << " " << ui.lportSpinbox->text().toStdString() ; newLineBuff << " " << ui.hostIP->text().toStdString(); newLineBuff << " " << ui.hostPortSpinbox->text().toStdString(); newLineBuff << " " << ui.buffsizeSpinBox->text().toStdString(); } else if (ui.typeCombo->currentIndex() == 1) // ctci { if (ui.tun0CheckBox->isChecked()) { newLineBuff << " tun0"; } else { if (!ipValidator(ui.guestIP,false)) return; if (!ipValidator(ui.hostIP,false)) return; if (!ui.tun->text().isEmpty()) { newLineBuff << " -n " << ui.tun->text().toStdString(); } if (!(ui.mac->text() == ":::::")) { if (macValidator(ui.mac->text().toStdString())) { newLineBuff << " -m " << ui.mac->text().toStdString() ; } else return; } if (!(ui.mask->text() == "...")) { if (ipValidator(ui.mask, false)) { newLineBuff << " -s " << ui.mask->text().toStdString() ; } else return; } if (!(ui.guestIP->text() == "...")) { if (ipValidator(ui.guestIP, false)) { newLineBuff << " " << ui.guestIP->text().toStdString() ; } else return; } if (!(ui.hostIP->text() == "...")) { if (ipValidator(ui.hostIP, false)) { newLineBuff << " " << ui.hostIP->text().toStdString() ; } else return; } } } else // qeth { if (!(ui.hostIP->text() == "...")) { if (ipValidator(ui.hostIP, false)) { newLineBuff << " " << ui.hostIP->text().toStdString() ; } else return; } } newLineBuff << "\n"; mLine.replaceLine(newLineBuff.str()); emit updateLine(true); this->deleteLater(); } void CtcProperties::cancel() { emit updateLine(false); this->deleteLater(); } bool CtcProperties::macValidator(const std::string& mac) { bool ret = true; if (mac.length() != 17) ret = false; QString qmac = mac.c_str(); for (int i=0; i<6 && ret; i++) { int pos = i*3; if (i>0 && qmac.toStdString().substr(i*3-1,1) != ":") ret=false; std::string c1 = qmac.toLower().toStdString().substr(pos,1).c_str(); std::string c2 = qmac.toLower().toStdString().substr(pos+1,1).c_str(); if (c1[0] < '0' || c1[0] > 'f' || c2[0] < '0' || c2[0] > 'f') { ret=false; } } if (!ret) { QMessageBox::warning(this, "Illegal MAC address", "Please provide device name\nhh:hh:hh:hh:hh:hh", QMessageBox::Ok); return false; } return true; } void CtcProperties::typeChanged(const QString &newValue) { if (newValue.toLower() == "qeth") arrangeQeth(true); else if (newValue.toLower() == "lcs") arrangeLcs(true); else if (newValue.toLower() == "ctct") arrangeCtct(true); else arrangeCtc(true); } void CtcProperties::arrangeQeth(bool set) { outDebug(5, std::cout << "qeth " << (set ? "true" : "false") << std::endl); if (set) { arrangeCtc(!set); arrangeCtct(!set); arrangeLcs(!set); ui.hostIP->setInputMask("000.000.000.000;"); } ui.hostIPLabel->setVisible(set); ui.hostIP->setVisible(set); ui.hostIPLabel->setGeometry(20,50,53,16); ui.hostIP->setGeometry(110,40,113,26); } void CtcProperties::arrangeLcs(bool set) { outDebug(5, std::cout << "lcs " << (set ? "true" : "false") << std::endl); if (set) { arrangeCtc(!set); arrangeCtct(!set); arrangeQeth(!set); ui.hostIP->setInputMask("000.000.000.000;"); } ui.guestIPLabel->setVisible(set); ui.guestIP->setVisible(set); ui.tunLabel->setVisible(set); ui.tun->setVisible(set); ui.macLabel->setVisible(set); ui.mac->setVisible(set); ui.macLabel2->setVisible(set); ui.oatFilenameLabel->setVisible(set); ui.oat->setVisible(set); ui.oatBrowseButton->setVisible(set); //ui.oatEditButton->setVisible(set); ui.hostIPLabel->setGeometry(20,70,53,16); ui.hostIP->setGeometry(110,60,113,26); ui.tunLabel->setGeometry(20,70,81,16); ui.tun->setGeometry(110,60,301,26); ui.macLabel->setGeometry(20,110,53,16); ui.mac->setGeometry(110,100,171,26); ui.macLabel2->setGeometry(300,100,53,16); ui.oatFilenameLabel->setGeometry(20,150,91,16); ui.oat->setGeometry(110,140,211,26); ui.oatBrowseButton->setGeometry(330,140,21,26); //ui.oatEditButton->setGeometry(360,140,52,26); } void CtcProperties::arrangeCtc(bool set) { bool nonTunSet = set; outDebug(5, std::cout << "ctc " << (set ? "true" : "false") << std::endl); if (set) { arrangeLcs(!set); arrangeCtct(!set); arrangeQeth(!set); ui.hostIP->setInputMask("000.000.000.000;"); } ui.tun0CheckBox->setVisible(set); nonTunSet = !(ui.tun0CheckBox->isChecked()); ui.guestIPLabel->setVisible(set); ui.guestIP->setVisible(set); ui.maskLabel->setVisible(set); ui.mask->setVisible(set); ui.hostIPLabel->setVisible(set); ui.hostIP->setVisible(set); ui.tunLabel->setVisible(set); ui.tun->setVisible(set); ui.macLabel->setVisible(set); ui.mac->setVisible(set); ui.macLabel2->setVisible(set); //disable if tun0 is set ui.guestIPLabel->setEnabled(nonTunSet); ui.guestIP->setEnabled(nonTunSet); ui.maskLabel->setEnabled(nonTunSet); ui.mask->setEnabled(nonTunSet); ui.hostIPLabel->setEnabled(nonTunSet); ui.hostIP->setEnabled(nonTunSet); ui.tunLabel->setEnabled(nonTunSet); ui.tun->setEnabled(nonTunSet); ui.macLabel->setEnabled(nonTunSet); ui.mac->setEnabled(nonTunSet); ui.macLabel2->setEnabled(nonTunSet); ui.hostIPLabel->setGeometry(20,70,53,16); ui.hostIP->setGeometry(110,60,113,26); ui.tunLabel->setGeometry(20,110,81,16); ui.tun->setGeometry(110,100,301,26); ui.macLabel->setGeometry(20,150,53,16); ui.mac->setGeometry(110,140,171,26); ui.macLabel2->setGeometry(300,140,53,16); ui.tun0CheckBox->setGeometry(250,110,140,24); } void CtcProperties::arrangeCtct(bool set) { outDebug(3, std::cout << "ctct " << (set ? "true" : "false") << std::endl); if (set) { arrangeCtc(!set); arrangeLcs(!set); arrangeQeth(!set); ui.hostIP->setInputMask("000.000.000.000;"); } ui.hostIPLabel->setVisible(set); ui.hostIP->setVisible(set); ui.hostPortLabel->setVisible(set); ui.hostPortSpinbox->setVisible(set); ui.lportLabel->setVisible(set); ui.lportSpinbox->setVisible(set); ui.buffsizeLabel->setVisible(set); ui.buffsizeSpinBox->setVisible(set); ui.hostIPLabel->setGeometry(20,30,53,16); ui.hostIP->setGeometry(110,20,113,26); ui.hostPortLabel->setGeometry(240,30,61,16); ui.hostPortSpinbox->setGeometry(320,20,61,26); ui.lportLabel->setGeometry(20,70,61,16); ui.lportSpinbox->setGeometry(110,60,61,26); ui.buffsizeLabel->setGeometry(20,110,71,16); ui.buffsizeSpinBox->setGeometry(110,100,71,26); } void CtcProperties::arrangeByType() { if (ui.typeCombo->currentText().toLower() == "qeth") { arrangeQeth(true); } else if (ui.typeCombo->currentText().toLower() == "lcs") { arrangeLcs(true); } else if (ui.typeCombo->currentText().toLower() == "ctct") { arrangeCtct(true); } else { arrangeCtc(true); } } void CtcProperties::oatBrowse() { std::string s = QFileDialog::getOpenFileName(this, "Locate OAT File Name", Preferences::getInstance().configDir().c_str(), tr("All files(*)")).toUtf8().data(); ui.oat->setText(s.c_str()); } void CtcProperties::tun0Check(int) { arrangeByType(); } void CtcProperties::initialize(ConfigLine & configLine) { if (configLine.size() > 0) ui.deviceNumber->setText(configLine.getToken(0).c_str()); QString type = configLine.getToken(1).c_str(); if (type.toLower() == "qeth") { ui.typeCombo->setCurrentIndex(3); if (configLine.size() >= 2) { ui.hostIP->setText(configLine.getToken(2).c_str()); } } else if (type.toLower() == "lcs") { ui.typeCombo->setCurrentIndex(0); for (int i=2; isetText(configLine.getToken(++i).c_str()); } else if (configLine.getToken(i) == "-o" || configLine.getToken(i) == "--oat") { ui.oat->setText(configLine.getToken(++i).c_str()); } else if (configLine.getToken(i) == "-m" || configLine.getToken(i) == "--mac") { ui.mac->setText(configLine.getToken(++i).c_str()); } else if (i+1 == configLine.size()) { ui.guestIP->setText(configLine.getToken(i).c_str()); } } } else if (type.toLower() == "ctct") { ui.typeCombo->setCurrentIndex(2); int port = atoi(configLine.getToken(2).c_str()); ui.lportSpinbox->setValue(port); ui.hostIP->setInputMask(""); ui.hostIP->setText(configLine.getToken(3).c_str()); port = atoi(configLine.getToken(4).c_str()); ui.hostPortSpinbox->setValue(port); if (configLine.size() > 5) { int size = atoi(configLine.getToken(5).c_str()); ui.buffsizeSpinBox->setValue(size); } } else { ui.typeCombo->setCurrentIndex(1); QString tun0; if (configLine.size() > 2) tun0 = configLine.getToken(2).c_str(); if (tun0 == "tun0") { ui.tun0CheckBox->setChecked(true); } else { ui.tun0CheckBox->setChecked(false); for (int i=2; isetText(configLine.getToken(++i).c_str()); } else if (configLine.getToken(i) == "-m" || configLine.getToken(i) == "--mac") { ui.mac->setText(configLine.getToken(++i).c_str()); } else if (configLine.getToken(i) == "-s") { ui.mask->setText(configLine.getToken(++i).c_str()); } else if (i+1 == configLine.size()) { ui.hostIP->setText(configLine.getToken(i).c_str()); } else if (i+2 == configLine.size()) { ui.guestIP->setText(configLine.getToken(i).c_str()); } } ui.tun0CheckBox->setChecked(false); } } arrangeByType(); } HerculesStudio/HercConfiguration/DevicesPane.cpp0000664000175000017500000003400612065055226021377 0ustar yakovyakov/* * File: DevicesPane.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DevicesPane.cpp 164 2012-12-14 09:27:52Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "DevicesPane.h" #include "DevicesRename.h" #include "MainWindow.h" #include "VisualizedDeviceEntry.h" #include "Environment.h" #include "HerculesStudio.h" #include "GenericDeviceProperties.h" #include "StringTokenizer.h" #include #include #include #include #include #include DevicesPane::DevicesPane(QWidget *parent) : DeviceMenuProcessor(parent), StatusUpdateCollector(), mLayout(NULL), mListView(NULL), mModel(NULL), mRenameDlg(NULL), mOldDevNum(-1) { ui.setupUi(this); std::string iconsPath = Environment::getIconsPath() + "/yellow.png"; mYellowIcon = new QIcon(iconsPath.c_str()); iconsPath = Environment::getIconsPath() + "/yellowhigh.png"; mYellowHighIcon = new QIcon(iconsPath.c_str()); mMainWindow = dynamic_cast(parent); } DevicesPane::~DevicesPane() { delete mYellowIcon; delete mYellowHighIcon; delete mListView; mDevices.clear(); } bool DevicesPane::notify(const QByteArray& statusLine) { hOutDebug(1,"devices notify:" << statusLine.data() << "."); const struct DynDeviceLine * line = reinterpret_cast(statusLine.data()); int devNo; VisualizedDeviceEntry deviceEntry; bool deviceAdded = false; if (strncmp(line->DEV,"DEV",3) == 0) { DeviceTypes::Type devType = DeviceTypes::Other; switch (line->action) { case('A'): if (strncmp(line->devType,"DASD",4)==0) devType= DeviceTypes::DASD; else if (strncmp(line->devType,"CTC",3)==0) devType= DeviceTypes::CTC; else if (strncmp(line->devType,"OSA",3)==0) devType= DeviceTypes::Comm; else if (strncmp(line->devType,"QETH",4)==0) devType= DeviceTypes::Comm; else if (strncmp(line->devType,"RDR ",4)==0) devType= DeviceTypes::CardReader; else if (strncmp(line->devType,"PCH ",4)==0) devType= DeviceTypes::CardReader; else if (strncmp(line->devType,"PRT ",4)==0) devType= DeviceTypes::Printer; else if (strncmp(line->devType,"DSP ",4)==0) devType= DeviceTypes::Terminal; else if (strncmp(line->devType,"TAPE",4)==0) devType= DeviceTypes::Tape; else if (strncmp(line->devType,"CON",3)==0) devType= DeviceTypes::Console; devNo = strtol(line->devNo, NULL, 16); { VisualizedDeviceEntry deviceEntryPtr(devNo, devType, statusLine.data()); std::pair toinsert(devNo, deviceEntryPtr); mDevices.insert(toinsert); hOutDebug(5, "to be added:" << statusLine.data() << " " << (devNo !=0 ? "added" : "NOT ADDED")) ; if (devNo !=0) deviceAdded = true; // after disconnect and attach, herculess starts sending DEVA instead of DEVC } break; case('C'): devNo = strtol(line->devNo, NULL, 16); if (mDevices.find(devNo) != mDevices.end()) { deviceEntry = mDevices[devNo]; if (deviceEntry.getItem() != NULL) { if (line->statusBytes[1] == '1') { deviceEntry.getItem()->setIcon(*mYellowHighIcon); } else { deviceEntry.getItem()->setIcon(*mYellowIcon); } } } else { hOutDebug(1,"sending restart"); mDevices.clear(); //emit restartDevices(); } break; case('D'): { devNo = strtol(line->devNo, NULL, 16); std::map ::iterator it = mDevices.find(devNo); if (it != mDevices.end()) { mDevices.erase(it); deviceAdded = true; } } break; default: break; } } if (deviceAdded) { outDebug(3,std::cout << mDevices.size() << " Devices." << std::endl); if (mModel == NULL) mModel = new QStandardItemModel(); mModel->clear(); QStandardItem *parentItem = mModel->invisibleRootItem(); int currLine = 0; std::map::iterator it; for (int curDev=0; curDev<=DeviceTypes::Comm; curDev++ ) { outDebug(5,std::cout << "curDev:" << curDev<< std::endl); bool titleDevAdded = false; for (it = mDevices.begin(); it != mDevices.end(); it++) { VisualizedDeviceEntry& ent = it->second; if (ent.getType() == curDev) { outDebug(5,std::cout << "ent:" << ent.getDeviceNumber()<<" "<setEditable(false); parentItem->appendRow(item); currLine++; titleDevAdded=true; } char ss[255]; std::string def = ent.getDefinition(); size_t pos=def.find('\r'); while (pos != std::string::npos) { def.replace(pos,def.size()," "); pos = def.find('\r'); } sprintf(ss,"%4.4X %s",ent.getDeviceNumber(), def.substr(25).c_str()); if (ent.getIcon() == NULL) { ent.setIcon(mYellowIcon); } ent.setItem(new QStandardItem(*ent.getIcon(), ss)); ent.getItem()->setEditable(false); std::string tt = ent.getDefinition().substr(10,10).c_str() ; tt += ent.getDefinition().substr(25).c_str(); ent.getItem()->setToolTip(tt.c_str()); ent.setLineNumber(currLine++); parentItem->appendRow(ent.getItem()); } } } if (mListView != NULL) { mListView->close(); delete mListView; mListView = NULL; } mListView = new DeviceListView(this); mListView->setModel(mModel); mListView->setVisible(true); adjustSize(); connect(mListView, SIGNAL(pressed(QModelIndex)),this,SLOT(mousePressed(QModelIndex))); connect(mListView, SIGNAL(deviceClick(QMouseEvent *)), this, SLOT(devicesClick(QMouseEvent *))); return true; } else { return false; } } void DevicesPane::mousePressed(const QModelIndex index) { outDebug(1, std::cout << "pressed " << index.row() << std::endl); mClickRow = index.row(); } void DevicesPane::adjustSize() { if (mListView != NULL) mListView->setGeometry(0,0,this->size().width()-10,this->size().height()-10); } void DevicesPane::resizeEvent ( QResizeEvent * ) { adjustSize(); } QSize DevicesPane::sizeHint() const { return QSize(160, 100); } void DevicesPane::clear() { hOutDebug(1,"DevicesPane clear"); mDevices.clear(); if (mModel != NULL) mModel->clear(); if (mListView == NULL) return; adjustSize(); } bool DevicesPane::isRealDev(int lineNumber) { std::map::iterator it; for (it = mDevices.begin(); it != mDevices.end(); it++) { VisualizedDeviceEntry& ent = it->second; hOutDebug(5,"compare: " << ent.getLineNumber() << " with " << lineNumber); if (ent.getLineNumber() == lineNumber) return true; } return false; } DeviceTypes::Type DevicesPane::getType(int lineNumber) { std::map::iterator it; for (it = mDevices.begin(); it != mDevices.end(); it++) { VisualizedDeviceEntry& ent = it->second; hOutDebug(5,"compare: " << ent.getLineNumber() << " with " << lineNumber); if (ent.getLineNumber() == lineNumber) return ent.getType(); } return DeviceTypes::Other; } bool DevicesPane::canAddSYSG() { return false; } bool DevicesPane::realDevice() { return (isRealDev(mClickRow)); } void DevicesPane::doAddDevice(bool) { hOutDebug(2,mCandidateLine->getLine()); std::string command = mCandidateLine->getLine(); if (command.length() == 0) return; command = "attach " + command ; mMainWindow->issueCommand(command); mClickRow = -1; } void DevicesPane::menuRename() { std::map::iterator it = mDevices.begin(); while(it != mDevices.end()) { hOutDebug(2, "rename " << mLastClick << " " << it->second.getDeviceNumber() << " " << it->second.getLineNumber()); if (it->second.getLineNumber() == mLastClick) { int devno = it->second.getDeviceNumber(); mRenameDlg = new DevicesRename(devno, getNextDev(it), this); connect (mRenameDlg,SIGNAL(accepted(QString, QString)),this, SLOT(doRename(QString, QString))); connect (mRenameDlg,SIGNAL(rejected()), this, SLOT(rejected())); mRenameDlg->exec(); break; } it++; } mClickRow=-1; } void DevicesPane::doRename(QString oldDevNum, QString newDevNum) { hOutDebug(2, "rename " << oldDevNum.toStdString() << " " << newDevNum.toStdString()); mOldDevNum = ConfigurationEditor::parseNum(oldDevNum.toStdString(), 16); std::stringstream command; command << "define " << oldDevNum.toStdString() << " " << newDevNum.toStdString() ; mMainWindow->issueCommand(command.str()); disconnect(mRenameDlg,0,0,0); mRenameDlg->deleteLater(); } int DevicesPane::getNextDev(std::map::iterator it) const { int ret = it->second.getDeviceNumber()+1; ++it; while (it != mDevices.end()) { hOutDebug(5,"examining ret=" << ret << " to:" << it->second.getDeviceNumber()); if (it->second.getDeviceNumber() != ret) return ret; else ret = it->second.getDeviceNumber()+1; ++it; } return ret; } void DevicesPane::rejected() { hOutDebug(3, "rejected"); disconnect(mRenameDlg,0,0,0); mRenameDlg->deleteLater(); } void DevicesPane::menuDelete() { VisualizedDeviceEntry * entry = getDeviceEntry(); if (entry != NULL) { std::stringstream command; command << "detach " << std::hex << entry->getDeviceNumber() ; mMainWindow->issueCommand(command.str()); } mClickRow=-1; return; } void DevicesPane::menuInterrupt() { VisualizedDeviceEntry * entry = getDeviceEntry(); if (entry != NULL) { std::stringstream command; command << "i " << std::hex << entry->getDeviceNumber() ; mMainWindow->issueCommand(command.str()); } mClickRow=-1; return; } void DevicesPane::menuStatus() { VisualizedDeviceEntry * entry = getDeviceEntry(); if (entry != NULL) { std::stringstream command; command << "ds " << std::hex << entry->getDeviceNumber() ; mMainWindow->issueCommand(command.str()); } mClickRow=-1; return; } bool DevicesPane::traced() { VisualizedDeviceEntry * entry = getDeviceEntry(); if (entry != NULL) { return entry->traced(); } return false; } void DevicesPane::menuTraceCCW() { VisualizedDeviceEntry * entry = getDeviceEntry(); if (entry != NULL) { std::stringstream command; command << "t" << (entry->traced() ? "- " : "+ ") << std::hex << entry->getDeviceNumber() ; mMainWindow->issueCommand(command.str()); entry->setTraced(!entry->traced()); } mClickRow=-1; return; } bool DevicesPane::hasConfig() { VisualizedDeviceEntry * entry = getDeviceEntry(); if (entry == NULL) return false; QString devNo = textFromValue(entry->getDeviceNumber()); mCandidateLine = mMainWindow->getConfigurationFile()->getDevice(devNo.toStdString()); return mCandidateLine!= NULL; } void DevicesPane::menuProperties() { hOutDebug(3,"line=" << mCandidateLine->getLine()); GenericDeviceProperties * mProp = NULL; try { mProp = GenericDeviceProperties::classFactory(*mCandidateLine, this, mCandidateLine->getDeviceType()); } catch (...) { outDebug(2, std::cout << "exception caught in class factory (add)" << std::endl); } connect(mProp, SIGNAL(updateLine(bool)), this, SLOT(updateDevice(bool))); mProp->setVisible(true); mClickRow=-1; } void DevicesPane::updateDevice(bool done) { if (!done || mCandidateLine == NULL) { mClickRow = -1; return; } hOutDebug(5,mCandidateLine->getLine()); std::string command = mCandidateLine->getLine(); command = mCandidateLine->getToken(0) + " " + mCandidateLine->getMultiToken(2, 0); if (command.length() == 0) return; command = "devinit " + command ; mMainWindow->issueCommand(command); mClickRow = -1; } void DevicesPane::doLoadTape(QString& tapeFileName) { VisualizedDeviceEntry * entry = getDeviceEntry(); if (entry != NULL) { std::stringstream command; command << "devinit " << std::hex << entry->getDeviceNumber() << " " <issueCommand(command.str()); } mClickRow=-1; return; } VisualizedDeviceEntry* DevicesPane::getDeviceEntry() { hOutDebug(3,"getDeviceEntry - mLastClick=" << mLastClick); std::map::iterator it = mDevices.begin(); while(it != mDevices.end()) { if (it->second.getLineNumber() == mLastClick) { return &(it->second); break; } it++; } return NULL; } QString DevicesPane::textFromValue(int value) const { std::stringstream ss; ss << std::hex << value; char formatted[5]; if (value <= 0xffff) sprintf(formatted,"%4.4X",(value)); else strcpy(formatted,"0000"); QString ret(formatted); outDebug(5,std::cout << "textFromValue:" << value << "='" << ret.toStdString() << std::endl;) return ret; } HerculesStudio/HercConfiguration/Extended_Ui_CardReaderProperties.cpp0000664000175000017500000000267312065055226025544 0ustar yakovyakov/* * File: Extended_Ui_CardReaderProperties.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Extended_Ui_CardReaderProperties.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Extended_Ui_CardReaderProperties.h" Extended_Ui_CardReaderProperties::Extended_Ui_CardReaderProperties() { } Extended_Ui_CardReaderProperties::~Extended_Ui_CardReaderProperties() { } void Extended_Ui_CardReaderProperties::setupUi(QWidget *widget) { CardReaderPropertiesClass::setupUi(widget); fileNamesListView = new ReaderFileListView(groupBox_2); fileNamesListView->setObjectName(QString::fromUtf8("fileNamesListView")); fileNamesListView->setGeometry(QRect(90, 90, 331, 168)); fileNamesListView->setMovement(QListView::Snap); } HerculesStudio/HercConfiguration/SystemConfigLine.h0000664000175000017500000000230012065055226022070 0ustar yakovyakov/* * File: SystemConfigLine.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: SystemConfigLine.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages a configuration line of system parameters * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef SYSTEMCONFIGLINE_H_ #define SYSTEMCONFIGLINE_H_ #include "ConfigLine.h" class SystemConfigLine: public ConfigLine { public: SystemConfigLine(const char *line); virtual ~SystemConfigLine(); std::string getKeyword() const; }; #endif /* SYSTEMCONFIGLINE_H_ */ HerculesStudio/HercConfiguration/DevicesWidget.h0000664000175000017500000000414312065055226021403 0ustar yakovyakov/* * File: DevicesWidget.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DevicesWidget.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object presents the devices section in the configuration * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DEVICESDLG_H_ #define DEVICESDLG_H_ #include "ConfigFile.h" #include "DeviceConfigView.h" #include "DeviceMenuProcessor.h" #include #include #include class DevicesWidget : public DeviceMenuProcessor { Q_OBJECT public: DevicesWidget(ConfigFile * configFile, QWidget * parent); virtual ~DevicesWidget(); void update(ConfigFile * configFile); bool isUnique(std::string devno); private: ConfigFile * mConfigFile; DeviceConfigView * mConfigView; QMenu mMenu; std::map mDialogToFile; QIcon *mCardIcon; QIcon *mConsoleIcon; QIcon *mDasdIcon; QIcon *mNetIcon; QIcon *mPrinterIcon; QIcon *mTapeIcon; QIcon *mTerminalIcon; QIcon *mUnknownIcon; void initialize(); virtual bool isRealDev(int) { return true;} bool canAddSYSG(); bool isConfig() { return true; }; bool realDevice(); DeviceTypes::Type getType(int lineNumber); virtual void doLoadTape(QString&) { return; } virtual bool hasConfig() { return true; }; virtual bool traced() { return false; } private slots: void mousePressed(QModelIndex index); void doAddDevice(bool keep); void updateDevice(bool); public slots: void menuDelete(); void menuProperties(); }; #endif /* DEVICESDLG_H_ */ HerculesStudio/HercConfiguration/TerminalProperties.h0000664000175000017500000000304012065055226022500 0ustar yakovyakov/* * File: TerminalProperties.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: TerminalProperties.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages the terminal configuration properties * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TERMINALPROPERTIES_H #define TERMINALPROPERTIES_H #include "ConfigLine.h" #include "GenericDeviceProperties.h" #include "HerculesStudio.h" #include "ui_TerminalProperties.h" class TerminalProperties : public GenericDeviceProperties { Q_OBJECT public: TerminalProperties(ConfigLine& line,QWidget *parent = 0); virtual ~TerminalProperties(); protected: Ui::TerminalPropertiesClass & getUi() { return ui;}; virtual bool isSysg(); private: Ui::TerminalPropertiesClass ui; private slots: void ok(); void cancel(); signals: void updateLine(bool keep); }; #endif // TERMINALPROPERTIES_H HerculesStudio/HercConfiguration/PunchProperties.h0000664000175000017500000000316712065055226022014 0ustar yakovyakov/* * File: PunchProperties.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: PunchProperties.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages the card punch configuration properties * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef PUNCHPROPERTIES_H #define PUNCHPROPERTIES_H #include "ConfigLine.h" #include "GenericDeviceProperties.h" #include "HerculesStudio.h" #include "ui_PunchProperties.h" class PunchProperties : public GenericDeviceProperties { Q_OBJECT public: PunchProperties(ConfigLine& line,QWidget *parent = 0); virtual ~PunchProperties(); void setBoxesEnabled(bool enabled); private: Ui::PunchPropertiesClass ui; private slots: void ok(); void cancel(); }; class PunchFileNameValidator : public QValidator { public: PunchFileNameValidator(QObject * parent); virtual QValidator::State validate(QString&, int&) const; private: PunchProperties * mParent; }; #endif // PUNCHPROPERTIES_H HerculesStudio/HercConfiguration/SysgProperties.cpp0000664000175000017500000000261412065055226022213 0ustar yakovyakov/* * File: SysgProperties.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: SysgProperties.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "SysgProperties.h" SysgProperties::SysgProperties(ConfigLine& line, QWidget *parent) : TerminalProperties(line, parent) { getUi().terminalCombo->clear(); getUi().terminalCombo->insertItems(0, QStringList() << QApplication::translate("TerminalPropertiesClass", "SYSG", 0, QApplication::UnicodeUTF8) ); getUi().terminalCombo->setEnabled(false); getUi().deviceNumber->setText("0000"); getUi().deviceNumber->setEnabled(false); } SysgProperties::~SysgProperties() { } bool SysgProperties::isSysg() { return true; } HerculesStudio/HercConfiguration/StatusUpdateCollector.h0000664000175000017500000000230712065055226023152 0ustar yakovyakov/* * File: StatusUpdateCollector * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: StatusUpdateCollector.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This is the base class for all objects receiving status updates * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef STATUSUPDATECOLLECTOR_H_ #define STATUSUPDATECOLLECTOR_H_ #include class StatusUpdateCollector { public: StatusUpdateCollector(); virtual ~StatusUpdateCollector(); virtual bool notify(const QByteArray& ) = 0; }; #endif /* STATUSUPDATECOLLECTOR_H_ */ HerculesStudio/HercConfiguration/Configuration.ui0000664000175000017500000032121612065055226021655 0ustar yakovyakov ConfigurationClass Qt::ApplicationModal 0 0 732 575 8 Configuration 20 20 691 491 0 0 Qt::LeftToRight 0 Architecture 20 60 641 341 Architecture 30 30 261 41 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Sans'; font-size:8pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> specifies the initial architecture mode:</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> * use S/370 for OS/360, VM/370, and MVS 3.8.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> * use ESA/390 for MVS/XA, MVS/ESA, OS/390, VM/ESA, VSE/ESA, Linux/390, and ZZSA.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> * use z/Arch or ESAME for z/OS and zLinux. </p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">ESAME is a synonym for z/Arch. </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When z/Arch or ESAME is specified, the machine will always IPL in ESA/390mode, but is capable of being switched into z/Architecture mode after IPL.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This is handled automatically by all z/Architecture operating systems. </p></body></html> Type 10 12 71 22 S/370 true 90 12 97 22 ESA/390 190 12 61 22 Z/Arch 30 130 161 17 Cpu Serial number: 30 155 161 17 Cpu Model number: 30 180 171 17 Cpu Version code: 220 203 81 23 QAbstractSpinBox::UpDownArrows 1 64 30 205 171 17 Number of CPUs: 30 230 181 17 Number of Vector Facilities: 220 229 81 22 QAbstractSpinBox::UpDownArrows 1 64 30 255 181 17 Main Storage (MB): 220 255 81 24 QAbstractSpinBox::UpDownArrows 2 65535 64 30 280 181 17 Expanded Storage: 220 280 81 23 QAbstractSpinBox::UpDownArrows 0 1024 0 220 130 71 20 Times New Roman 220 154 71 22 Times New Roman 220 180 71 23 Times New Roman 330 130 131 22 Enable ECPSVM false 470 130 54 23 20 20 330 160 221 22 Enable ASN and LX Reuse 102 90 191 23 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:8pt; font-weight:400; font-style:normal;"> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">specifies the type of engine for each installed processor. The default engine type is CP. </p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">nn</span>* is an optional repeat count. </p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Examples: </p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';">ENGINES CP,CP,AP,IP</span> <br />specifies that processor engines 0 and 1 are of type CP, engine 2 is type AP, and engine 3 is type IP. </p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';">ENGINES 4*CP,2*AP,2*IP</span> <br />specifies that the first four processor engines (engines 0-3) are of type CP, the next two (engines 4-5) are of type AP, and the next two (engines 6-7) are of type IP. </p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The number of installed processor engines is determined by the compile time variable MAX_CPU_ENGINES. If the ENGINES statement specifies more than MAX_CPU_ENGINES, the excess engines are ignored. If fewer than MAX_CPU_ENGINES are specified, the remaining engines are set to type CP. </p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">See the <a href="http://www.hercules-390.org/hercconf.html#NUMCPU"><span style=" text-decoration: underline; color:#0000ff;">NUMCPU</span></a> statement for a discussion of MAX_CPU_ENGINES. </p></body></html> 30 92 56 17 Engines 330 40 131 17 Manufacturer 470 40 131 23 330 70 121 17 Model 470 70 131 23 470 100 131 23 330 100 121 17 Plant true 340 270 97 22 true 20 20 57 19 File Name: 100 20 551 19 Courier New Performance 20 60 651 161 Execution priority false 180 40 311 20 -20 20 Qt::Horizontal 60 40 131 17 Hercules process: 60 70 131 17 TOD clock thread: 60 100 131 17 Device I/O threads: 60 130 131 17 CPU threads: 180 70 311 20 -20 20 20 -20 Qt::Horizontal 180 100 311 20 -20 20 8 Qt::Horizontal 180 130 311 20 -20 20 -15 Qt::Horizontal 490 50 161 20 Arial 8 PreferDefault true Caution: process priorities have 490 62 161 20 Arial 8 PreferDefault true a direct impact on how thread 490 74 161 20 Arial 8 PreferDefault true priorities are interpreted. You 490 86 161 20 Arial 8 PreferDefault true should not modify one without 490 98 161 20 Arial 8 PreferDefault true understanding how doing so 490 110 161 20 Arial 8 PreferDefault true impacts the other. 180 20 31 20 -20 20 40 35 22 255 255 255 80 80 80 120 120 120 100 100 100 40 40 40 53 53 53 255 255 255 255 255 255 255 255 255 0 0 0 80 80 80 0 0 0 40 40 40 255 255 220 0 0 0 255 255 255 80 80 80 120 120 120 100 100 100 40 40 40 53 53 53 255 255 255 255 255 255 255 255 255 0 0 0 80 80 80 0 0 0 40 40 40 255 255 220 0 0 0 40 40 40 80 80 80 120 120 120 100 100 100 40 40 40 53 53 53 40 40 40 255 255 255 40 40 40 80 80 80 80 80 80 0 0 0 80 80 80 255 255 220 0 0 0 QFrame::NoFrame QFrame::Sunken true 3 0.000000000000000 0 20 70 35 22 255 255 255 80 80 80 120 120 120 100 100 100 40 40 40 53 53 53 255 255 255 255 255 255 255 255 255 0 0 0 80 80 80 0 0 0 40 40 40 255 255 220 0 0 0 255 255 255 80 80 80 120 120 120 100 100 100 40 40 40 53 53 53 255 255 255 255 255 255 255 255 255 0 0 0 80 80 80 0 0 0 40 40 40 255 255 220 0 0 0 40 40 40 80 80 80 120 120 120 100 100 100 40 40 40 53 53 53 40 40 40 255 255 255 40 40 40 80 80 80 80 80 80 0 0 0 80 80 80 255 255 220 0 0 0 QFrame::NoFrame QFrame::Sunken true 3 -20.000000000000000 -20 20 100 35 22 255 255 255 80 80 80 120 120 120 100 100 100 40 40 40 53 53 53 255 255 255 255 255 255 255 255 255 0 0 0 80 80 80 0 0 0 40 40 40 255 255 220 0 0 0 255 255 255 80 80 80 120 120 120 100 100 100 40 40 40 53 53 53 255 255 255 255 255 255 255 255 255 0 0 0 80 80 80 0 0 0 40 40 40 255 255 220 0 0 0 40 40 40 80 80 80 120 120 120 100 100 100 40 40 40 53 53 53 40 40 40 255 255 255 40 40 40 80 80 80 80 80 80 0 0 0 80 80 80 255 255 220 0 0 0 9 QFrame::NoFrame QFrame::Sunken true 3 8.000000000000000 8 20 130 35 22 255 255 255 80 80 80 120 120 120 100 100 100 40 40 40 53 53 53 255 255 255 255 255 255 255 255 255 0 0 0 80 80 80 0 0 0 40 40 40 255 255 220 0 0 0 255 255 255 80 80 80 120 120 120 100 100 100 40 40 40 53 53 53 255 255 255 255 255 255 255 255 255 0 0 0 80 80 80 0 0 0 40 40 40 255 255 220 0 0 0 40 40 40 80 80 80 120 120 120 100 100 100 40 40 40 53 53 53 40 40 40 255 255 255 40 40 40 80 80 80 80 80 80 0 0 0 80 80 80 255 255 220 0 0 0 QFrame::NoFrame QFrame::Sunken true 3 -15.000000000000000 -15 310 20 52 15 0 Qt::AlignCenter 440 20 52 15 20 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 30 340 121 17 Max device threads 150 340 91 23 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter -1 0 20 20 57 19 File Name: 100 20 551 19 Courier New 30 260 121 17 Timer Update Interval: 150 260 91 23 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 1 1000000 50 150 300 91 23 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 1 5000 50 250 300 57 19 (milisec) 30 300 111 17 Panel Refresh Rate O/S Tailor 20 60 641 391 O/S Tailor 20 90 120 271 O/S Tailor 10 20 97 22 Quiet true 10 122 97 22 Linux 10 224 97 22 None 10 54 97 22 VM 10 88 97 22 VSE 10 156 97 22 OS/390 10 190 97 22 z/OS 540 20 80 27 Browse... 140 22 391 23 20 30 111 17 Auto Mount Directory 330 230 83 22 Echo 150 140 221 22 Allow Mounted Tape Replacement 150 170 151 22 Allow Shell Commands 150 230 181 22 Enable DIAG 8 Interface 150 200 171 22 Auto detect SCSI tape mounts 150 110 121 22 Legacy Sense ID false 330 200 54 23 240 330 113 23 160 330 61 17 I/O Delay 370 330 57 19 (usec) 20 20 57 19 File Name: 100 20 551 19 Courier New Emulation 20 60 641 361 Details 550 150 71 23 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 0 65535 8081 380 150 56 17 HTTP Port 550 120 71 23 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 65535 3270 380 120 151 17 Console connection port: 20 60 121 17 Time Zone Offset: 380 90 121 17 Shared Device Port 550 90 71 23 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 65535 3990 160 30 91 23 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 4 1.000000000000000 20 30 121 17 Cpu Drag Factor: 160 90 91 23 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter -142 142 0 20 90 121 17 TOD Year Offset: 20 200 201 22 9 Enable licences program product o/s 380 30 81 17 LPAR Name 380 60 71 17 Load Parm 490 60 131 23 490 30 131 23 250 230 251 20 8 operating system you intend to run true 250 200 251 20 8 false 1 NOTE: It is YOUR responsibility to comply false false Qt::NoTextInteraction 250 215 251 20 8 with the terms of the license for the 20 320 531 23 20 290 211 17 8 Additional dynamic modules to load: 380 170 151 22 Enable HTTP Server 190 60 49 25 -12 12 280 60 49 25 59 160 65 21 16 HH: 250 65 21 16 MM: 20 20 57 19 File Name: 100 20 551 19 Courier New Environment 20 60 641 361 Parameters 160 140 91 23 1900 1960 1900 160 80 281 23 10 80 131 17 Modules search path 20 140 121 17 TOD Clock Epoch: 460 38 61 27 Browse... 10 40 131 17 HTTP Root Directory 160 40 281 23 460 80 61 27 Browse... 20 20 57 19 File Name: 100 20 551 19 Courier New Devices 100 20 551 19 Courier New 20 20 57 19 File Name: Free Edit 80 20 591 19 Courier New 20 20 57 19 File Name: 10 50 671 411 0 0 530 530 80 27 Cancel 630 530 80 27 OK Configuration pushButton_OK pushButton_Cancel s370Button ESA390Button ZArchButton cpuSerial CpuModel cpuVerid numVecSpin numCpuSpin mainSizeSpin xpndSizeSpin ecpSvm ecpSvmSpin alrfCheck HerculesStudio/HercConfiguration/DeviceConfigLine.h0000664000175000017500000000324612065055226022015 0ustar yakovyakov/* * File: DeviceConfigLine.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DeviceConfigLine.h 166 2012-12-16 14:49:00Z dekeljacob $ * * This object manages one configuration line belonging to devices * (see also ConfigLine.h) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DEVICECONFIGLINE_H_ #define DEVICECONFIGLINE_H_ #include "ConfigLine.h" #include "DeviceTypes.h" #include class DeviceConfigLine: public ConfigLine { public: typedef std::map DeviceTypesMap; DeviceConfigLine(const char *line); virtual ~DeviceConfigLine(); static void clear(); int getDeviceNumber() const; DeviceTypes::Type getDeviceType() const; std::string toString() const; int getMultiCount(); private: static std::map * mDeviceTypes; static std::map * mDeviceBaseTypes; int mMultiCount; void initilize(); void handleMultiLine(); }; #endif /* DEVICECONFIGLINE_H_ */ HerculesStudio/HercConfiguration/CardReaderProperties.ui0000664000175000017500000002127112065055226023115 0ustar yakovyakov CardReaderPropertiesClass 0 0 474 572 CardReaderProperties 15 40 441 61 Terminal true 320 20 81 24 1442 2501 3505 10 20 101 19 Device Number 120 20 61 25 226 20 81 20 Device Type 15 130 441 431 Optional Arguments 20 30 211 25 Card Reader Is Socket Device 90 70 191 19 Fila Names (drag to re-arrange) 10 90 61 29 Add... 10 140 61 29 Delete 340 390 80 29 OK 10 390 80 29 Cancel 150 90 271 29 10 90 131 19 Socket Specification 300 270 120 111 EOF handling 10 20 94 25 eof 10 50 94 25 intrq 10 80 91 21 None 10 269 211 111 Character Set 10 20 94 25 ebcdic 10 50 94 25 ascii 100 50 101 25 specifies, for ASCII files, that lines longer than 80 characters are truncated instead of producing a unit check error. Truncate 100 20 101 25 specifies, for EBCDIC files, that the file is automatically padded to a multiple of 80 bytes if necessary. Autopad 10 80 131 21 Auto Detect 10 200 111 25 specifies, when multiple input files are entered, to automatically open the next input file and continue reading whenever EOF is encountered on a given file. If not specified, then reading stops once EOF is reached on a given file and an attention interrupt is then required to open and begin reading the next file. Multifile HerculesStudio/HercConfiguration/CardReaderProperties.cpp0000664000175000017500000002000712065055226023256 0ustar yakovyakov/* * File: CardReaderProperties.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: CardReaderProperties.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "CardReaderProperties.h" #include "NewReaderFile.h" #include CardReaderProperties::CardReaderProperties(ConfigLine& line, QWidget *parent) : GenericDeviceProperties(line, parent), mNewReaderFile(NULL) { ui.setupUi(this); ReaderFileListView * listView = static_cast(ui.fileNamesListView); listView->setReaderParent(this); initialize(line); connect(ui.fileNamesListView, SIGNAL(pressed (const QModelIndex &)), this, SLOT(itemPressed( const QModelIndex &))); connect(ui.sockdev, SIGNAL(textChanged(const QString &)), this, SLOT(sockdevChanged())); connect(ui.addButton, SIGNAL(pressed()), this, SLOT(addPressed())); connect(ui.deleteButton, SIGNAL(pressed()), this, SLOT(deletePressed())); connect(ui.OKButton, SIGNAL(pressed()), this, SLOT(ok())); connect(ui.cancelButton, SIGNAL(pressed()), this, SLOT(cancel())); connect(ui.sockdevCheckBox, SIGNAL(stateChanged(int)), this, SLOT(sockdevChanged())); } CardReaderProperties::~CardReaderProperties() { } void CardReaderProperties::ok() { if (!deviceNumberValidator(ui.deviceNumber)) return; std::stringstream newLineBuff; newLineBuff << ui.deviceNumber->text().toStdString() << " " << ui.deviceCombo->currentText().toStdString(); if (ui.sockdevCheckBox->isChecked()) { newLineBuff << " " << ui.sockdev->text().toStdString(); } else { if (mModel!=NULL) { for (int i=0; irowCount(); i++) { newLineBuff << " " << mModel->item(i)->text().toStdString(); } } } if (ui.sockdevCheckBox->isChecked()) { newLineBuff << " sockdev" ; } else { if (ui.eofRadioButton->isChecked()) { newLineBuff << " eof"; } if (ui.intrqRadioButton->isChecked()) { newLineBuff << " intrq"; } if (ui.multifileCheckBox->isChecked()) { newLineBuff << " multifile"; } } if (ui.truncCheckBox->isChecked()) { newLineBuff << " trunc"; } if (ui.autopadCheckBox->isChecked()) { newLineBuff << " autopad"; } if (ui.ebcdicRadioButton->isChecked()) { newLineBuff << " ebcdic"; } if (ui.asciiRadioButton->isChecked()) { newLineBuff << " ascii"; } newLineBuff << "\n"; mLine.replaceLine(newLineBuff.str()); emit updateLine(true); this->deleteLater(); } void CardReaderProperties::cancel() { emit updateLine(false); this->deleteLater(); } void CardReaderProperties::itemPressed(const QModelIndex & index) { mDragCandidate = index.row(); mDragCount = mModel->rowCount(); outDebug(5, std::cout << "index pressed:" << mDragCandidate << std::endl); } void CardReaderProperties::shouldBeDeleted() { outDebug(5, std::cout << "should be deleted:" << mDragCandidate << std::endl); if (mModel->rowCount() > mDragCount) mModel->removeRow(mDragCandidate); mDragCandidate=-1; } void CardReaderProperties::addPressed() { if (mNewReaderFile != NULL) mNewReaderFile->close(); mNewReaderFile = new NewReaderFile(this); mNewReaderFile->move(this->geometry().x(),this->geometry().y()); connect(mNewReaderFile, SIGNAL(okPressed(QString &)), this, SLOT(addFile(QString&))); connect(mNewReaderFile, SIGNAL(destroyed(QObject *)), this, SLOT(newFileFinished(QObject *))); outDebug(5, std::cout << "add pressed:" << mDragCandidate << std::endl); } void CardReaderProperties::deletePressed() { outDebug(5, std::cout << "delete pressed:" << std::endl); if (ui.fileNamesListView->currentIndex().row() >= 0) { mModel->removeRow(ui.fileNamesListView->currentIndex().row()); } ui.sockdevCheckBox->setEnabled (mModel->rowCount() == 0); } void CardReaderProperties::addFile(QString & file) { outDebug(5, std::cout << "pickupFile:" << file.toStdString() << std::endl); QStandardItem *parentItem = mModel->invisibleRootItem(); parentItem->appendRow(new QStandardItem(file)); ui.sockdevCheckBox->setEnabled (mModel->rowCount() == 0); } void CardReaderProperties::newFileFinished(QObject *) { mNewReaderFile = NULL; } void CardReaderProperties::sockdevChanged() { setSockdev(ui.sockdevCheckBox->isChecked()); ui.sockdevCheckBox->setEnabled (ui.sockdev->text().isEmpty()); } void CardReaderProperties::setSockdev(bool enabled) { ui.addButton->setVisible(!enabled); ui.deleteButton->setVisible(!enabled); ui.fileNamesListView->setVisible(!enabled); ui.label->setVisible(!enabled); ui.multifileCheckBox->setVisible(!enabled); ui.eofGroupBox->setVisible(!enabled); ui.sockdev->setVisible(enabled); ui.sockspecLabel->setVisible(enabled); } void CardReaderProperties::initialize(const ConfigLine & line) { if (line.size() > 0) ui.deviceNumber->setText(line.getToken(0).c_str()); std::string dev = line.getToken(1); if (dev == "2501") ui.deviceCombo->setCurrentIndex(1); else if (dev == "3505") ui.deviceCombo->setCurrentIndex(2); else ui.deviceCombo->setCurrentIndex(0); mModel = new QStandardItemModel(0,3); mModel->clear(); QStandardItem *parentItem = mModel->invisibleRootItem(); ui.autoDetectRadioButton->setChecked(true); // default ui.eofNoneRadioButton->setChecked(true); // default int index = line.size()-1; if (index >= 2) { std::string keywords = "sockdev eof intrq multifile ebcdic ascii trunc autopad"; ui.sockdevCheckBox->setChecked(false); while (keywords.find(line.getToken(index)) != std::string::npos) { if (line.getToken(index) == "sockdev") { ui.sockdevCheckBox->setChecked(true); } else if (line.getToken(index) == "eof") { ui.eofRadioButton->setChecked(true); } else if (line.getToken(index) == "intrq") { ui.intrqRadioButton->setChecked(true); } else if (line.getToken(index) == "multifile") { ui.multifileCheckBox->setChecked(true); } else if (line.getToken(index) == "ebcdic") { ui.ebcdicRadioButton->setChecked(true); } else if (line.getToken(index) == "ascii") { ui.asciiRadioButton->setChecked(true); } else if (line.getToken(index) == "trunc") { ui.truncCheckBox->setChecked(true); } else if (line.getToken(index) == "autopad") { ui.autopadCheckBox->setChecked(true); } index--; } if (!ui.sockdevCheckBox->isChecked()) { for (int i=0; i<=index-2; i++) { parentItem->appendRow(new QStandardItem(line.getToken(i+2).c_str())); } } else { ui.sockdev->setText(line.getToken(2).c_str()); } } sockdevChanged(); ui.fileNamesListView->setModel(mModel); ui.fileNamesListView->setViewMode(QListView::ListMode); } HerculesStudio/HercConfiguration/TapeProperties.h0000664000175000017500000000301512065055226021620 0ustar yakovyakov/* * File: TapeProperties.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: TapeProperties.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages the tape configuration properties * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TAPEPROPERTIES_H #define TAPEPROPERTIES_H #include "ConfigLine.h" #include "GenericDeviceProperties.h" #include #include "ui_TapeProperties.h" class TapeProperties : public GenericDeviceProperties { Q_OBJECT public: TapeProperties(ConfigLine& line,QWidget *parent = 0); virtual ~TapeProperties(); private: Ui::TapePropertiesClass ui; static const std::string types[]; void initialize(ConfigLine & line); private slots: void ok(); void cancel(); void standard(bool set=true); void scsi(bool set=true); void fileBrowse(); }; #endif // TAPEPROPERTIES_H HerculesStudio/HercConfiguration/ConfigurationEditor.cpp0000664000175000017500000006324512065055226023176 0ustar yakovyakov/* * File: ConfigurationEditor.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: ConfigurationEditor.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "ConfigurationEditor.h" #include "HerculesStudio.h" #include #include #include #include #define min(a,b) ((a) < (b) ? (a) : (b)) //util #define max(a,b) ((a) > (b) ? (a) : (b)) //util #define TextItem(PARM,_parm) \ void ConfigurationEditor::PARM(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) \ { \ handleText(configUi->_parm, configLine, dir);\ } #define SliderItem(PARM,_parm) \ void ConfigurationEditor::PARM(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) \ { \ handleSlider(configUi->_parm, configLine, dir); \ } #define CheckBoxItem(PARM,parm, CHECKED, UNCHECKED) \ void ConfigurationEditor::PARM(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) \ { \ handleCheckbox(configUi->parm, configLine, dir, #CHECKED, #UNCHECKED); \ } #define SpinItem(PARM,_parm, default_) \ void ConfigurationEditor::PARM(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) \ {\ handleSpin(configUi->_parm, configLine, dir, default_); \ } void ConfigurationEditor::handleText(QLineEdit * lineEdit, const ConfigLine * configLine, Direction dir) { std::string parm = configLine->getToken(1); outDebug(4,std::cout << configLine->getToken(0) << std::endl); if (dir == toScreen) { if (configLine->getToken(2).length() != 0) configLine->setInError(configLine->getAbsoluteTokenColumn(2)); lineEdit->setText(parm.c_str()); } else { /*TODO: verification routine*/ if (lineEdit->isModified()) { const_cast(configLine)->replaceParameters(lineEdit->text().toStdString()); } } } void ConfigurationEditor::handleSpin(QSpinBox * spinBox, const ConfigLine * configLine, Direction dir, int dflt) { std::string keyword = configLine->getUppercaseToken(0); std::string parm = configLine->getToken(1); outDebug(4,std::cout << parm << std::endl); if (dir == toScreen) { std::string parm = configLine->getToken(1); if (parm.length() > 0) { if (parm[0] == '+') parm = parm.substr(1); int num = parseNum(parm); if (parm.length() > 0 && num == 0 && parm[0] != '0') { num = dflt; configLine->setInError(configLine->getAbsoluteTokenColumn(1)); } spinBox->setValue(num); } else { spinBox->setValue(0); } mSpinMap[keyword] = spinBox->value(); if (configLine->getToken(2).length() != 0) configLine->setInError(configLine->getAbsoluteTokenColumn(2)); } else { /*TODO: verification routine*/ if (mSpinMap[keyword] != spinBox->value()) const_cast(configLine)->replaceParameters(spinBox->text().toStdString()); } } void ConfigurationEditor::handleSpin(QDoubleSpinBox * doubleSpinBox, const ConfigLine * configLine, Direction dir, int dflt) { std::string parm = configLine->getToken(1); outDebug(4,std::cout << parm << std::endl); if (dir == toScreen) { std::string parm = configLine->getToken(1); if (parm.length() > 0) { if (parm[0] == '+') parm = parm.substr(1); int num = parseNum(parm); if (parm.length() > 0 && num == 0 && parm[0] != '0') { num = dflt; configLine->setInError(configLine->getAbsoluteTokenColumn(1)); } doubleSpinBox->setValue(num); } else { doubleSpinBox->setValue(0); } mSpinMap[parm] = doubleSpinBox->value(); if (configLine->getToken(2).length() != 0) configLine->setInError(configLine->getAbsoluteTokenColumn(2)); } else { /*TODO: verification routine*/ if (mSpinMap[parm] != doubleSpinBox->value()) const_cast(configLine)->replaceParameters(doubleSpinBox->text().toStdString()); } } void ConfigurationEditor::handleSlider(QSlider * slider, const ConfigLine * configLine, Direction dir) { std::string keyword = configLine->getToken(0); std::string parm = configLine->getToken(1); if (dir == toScreen) { int num = parseNum(parm); if (parm[0] == '-' || parm[0] == '+') parm = parm.substr(1); if (num == 0 && parm.find_first_not_of("0123456789") != std::string::npos) configLine->setInError(configLine->getAbsoluteTokenColumn(1)); slider->setValue(num); mSpinMap[keyword] = slider->value(); if (configLine->getToken(2).length() != 0) configLine->setInError(configLine->getAbsoluteTokenColumn(2)); } else { if(slider->isWindowModified()){}; /*TODO: verification routine*/ if (mSpinMap[keyword] != slider->value()) { std::stringstream s; s << slider->value(); std::string parm = s.str(); const_cast(configLine)->replaceParameters(s.str()); } } } void ConfigurationEditor::handleCheckbox(QCheckBox * checkbox, const ConfigLine * configLine, Direction dir, QString checked, QString unchecked) { QString name=configLine->getToken(0).c_str(); QString parm=configLine->getToken(1).c_str(); outDebug(2,std::cout << parm.toStdString() << std::endl); if (dir == toScreen) { if (parm=="") parm=unchecked; checkbox->setChecked( (parm.toUpper() == checked ) ? true : false); mCheckBoxMap[name.toStdString()] = checkbox->isChecked(); if (configLine->getToken(2).length() != 0) configLine->setInError(configLine->getAbsoluteTokenColumn(2)); } else { if ( (checkbox->isChecked() != mCheckBoxMap[name.toStdString()]) ) { if (checkbox->isChecked()) const_cast(configLine)->replaceParameters(checked.toStdString()); else const_cast(configLine)->replaceParameters(unchecked.toStdString()); } } } std::mapConfigurationEditor::mCheckBoxMap; std::mapConfigurationEditor::mSpinMap; ConfigurationEditor::ConfigurationEditor() { outDebug(5,std::cout << "ConfigurationEditor::ConfigurationEditor" << std::endl); } ConfigurationEditor::~ConfigurationEditor() { } void ConfigurationEditor::ARCHMODE(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) { if (dir == toScreen) { outDebug(4,std::cout << "ARCHMODE" << std::endl); std::string token = configLine->getLowercaseToken(1); if (token == "s/370") configUi->s370Button->setChecked(true); else if (token == "esa/390") configUi->ESA390Button->setChecked(true); else if ((token == "esame") || (token == "z/arch") || (token == "z/arch")) configUi->ZArchButton->setChecked(true); else { configLine->setInError(configLine->getAbsoluteTokenColumn(1)); } int value; if (configUi->s370Button->isChecked()) value = 0; else if (configUi->ESA390Button->isChecked()) value = 1; else value = 2; mSpinMap["ARCHMODE"] = value; validateMaxTokens(configLine, 1); } else { int value; if (configUi->s370Button->isChecked()) value = 0; else if (configUi->ESA390Button->isChecked()) value = 1; else value = 2; if (value != mSpinMap["ARCHMODE"]) { std::string parm; if (configUi->s370Button->isChecked()) parm="S/370"; else if(configUi->ESA390Button->isChecked()) parm="ESA/390"; else parm="z/Arch"; const_cast(configLine)->replaceParameters(parm); } } } CheckBoxItem(ASN_AND_LX_REUSE,alrfCheck, ENABLE, DISABLE) //CheckBoxItem(ALRF,alrfCheck, ENABLE, DISABLE) void ConfigurationEditor::ALRF(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) { handleCheckbox(configUi->alrfCheck, configLine, dir, "ENABLE", "DISABLE"); } void ConfigurationEditor::AUTO_MOUNT(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) { // TODO: accept "-", but do not generate one outDebug(4,std::cout << "AUTO_MOUNT" << std::endl); if (dir == toScreen) { std::string parm=configLine->getToken(1); if (parm=="+" || parm == "-") parm=configLine->getToken(1); configUi->autoMountDir->setText(parm.c_str()); } else if (configUi->autoMountDir->isModified()) { const std::string val = configUi->autoMountDir->text().toStdString(); const_cast(configLine)->replaceParameters(val); } } void ConfigurationEditor::AUTO_SCSI_MOUNT(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) { outDebug(4,std::cout << "AUTO_SCSI_MOUNT" << std::endl); if (dir == toScreen) { std::string parm = configLine->getLowercaseToken(1); int num = parseNum(parm); if (parm.length() == 0) num = 50; if (parm.length() != 0 && parm.compare("yes") == 0) { configUi->autoScsiMountCheck->setChecked(true); configUi->autoScisiSecSpin->setDisabled(false); configUi->autoScisiSecSpin->setValue(50); } else if (parm.length() != 0 && parm.compare("no") == 0) { configUi->autoScsiMountCheck->setChecked(true); configUi->autoScisiSecSpin->setDisabled(false); configUi->autoScisiSecSpin->setValue(num); } else { configUi->autoScsiMountCheck->setChecked(false); configUi->autoScisiSecSpin->setValue(num); configUi->autoScisiSecSpin->setDisabled(true); } mCheckBoxMap["AUTO_SCSI_MOUNT"] = configUi->autoScsiMountCheck->isChecked(); mSpinMap["AUTO_SCSI_MOUNT"] = configUi->autoScisiSecSpin->value(); } else if (mCheckBoxMap["AUTO_SCSI_MOUNT"] != configUi->autoScsiMountCheck->isChecked() || mSpinMap["AUTO_SCSI_MOUNT"] != configUi->autoScisiSecSpin->value() ) { std::string parm; if (!configUi->autoScsiMountCheck->isChecked()) { parm = "NO"; } else { int val = configUi->autoScisiSecSpin->value(); std::stringstream s; s << val; parm = s.str(); } outDebug(3,std::cout << "parm=" << parm << std::endl); const_cast(configLine)->replaceParameters(parm); } } SpinItem(CNSLPORT,ConsolePortSpin, 3270) void ConfigurationEditor::CONKPALV(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir) { if (dir == toScreen) { // just parse (we do not yet have a screen display for this parameter QRegExp exp("\\s+\\((\\d*),(\\d*),(\\d*)\\)"); QString line(configLine->getLine().substr(8).c_str()); if (exp.indexIn(line) == -1) configLine->setInError(8); else configLine->setNoError(); } } TextItem(CPUMODEL,CpuModel) SliderItem(CPUPRIO,cpuPrioSlider) TextItem(CPUSERIAL,cpuSerial) TextItem(CPUVERID,cpuVerid) SliderItem(DEVPRIO,devPrioSlider) SpinItem(DEVTMAX,devTMaxSpin, 0) void ConfigurationEditor::DIAG8CMD(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) { outDebug(4,std::cout << "DIAG8CMD" << std::endl); if (dir == toScreen) { std::string enableDisable = configLine->getLowercaseToken(1); std::string echoNoEcho = configLine->getLowercaseToken(2); if (enableDisable.compare("enable") == 0) configUi->diag8CmdCheckBox->setChecked(true); else if (enableDisable.compare("disable") == 0) configUi->diag8CmdCheckBox->setChecked(false); else configLine->setInError(configLine->getAbsoluteTokenColumn(1)); if (echoNoEcho.length() > 0 && echoNoEcho.compare("echo") == 0) configUi->diag8EchoCheckBox->setChecked(true); else if (echoNoEcho.length() > 0 && echoNoEcho.compare("noecho") == 0) configUi->diag8EchoCheckBox->setChecked(false); else if (echoNoEcho.length() == 0) configUi->diag8EchoCheckBox->setChecked(false); else configLine->setInError(configLine->getAbsoluteTokenColumn(2)); validateMaxTokens(configLine, 2); mCheckBoxMap["DIAG8CMD"]=configUi->diag8CmdCheckBox->isChecked(); mCheckBoxMap["DIAG8ECHO"]=configUi->diag8EchoCheckBox->isChecked(); } else if (mCheckBoxMap["DIAG8CMD"] != configUi->diag8CmdCheckBox->isChecked() || mCheckBoxMap["DIAG8ECHO"]!= configUi->diag8EchoCheckBox->isChecked()) { std::string enable, echo; if (configUi->diag8EchoCheckBox->isChecked()) echo = "ECHO"; else echo = "NOECHO"; if (configUi->diag8CmdCheckBox->isChecked()) enable = "ENABLE"; else enable = "DISABLE"; std::string parm = enable + " " + echo; const_cast(configLine)->replaceParameters(parm); } } TextItem(ENGINES,engines) void ConfigurationEditor::ECPSVM(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) { outDebug(4,std::cout << "ECPSVM" << std::endl); if (dir == toScreen) { if (configLine->getLowercaseToken(1) == "yes" || configLine->getLowercaseToken(1) == "level") { configUi->ecpSvmSpin->setEnabled(true); configUi->ecpSvm->setChecked(true); int level = 20; if (configLine->getToken(2) != "") level = parseNum(configLine->getToken(2)); configUi->ecpSvmSpin->setValue(level); } else if (configLine->getLowercaseToken(1) == "no") { configUi->ecpSvm->setChecked(false); configUi->ecpSvmSpin->setValue(20); configUi->ecpSvmSpin->setEnabled(false); } else configLine->setInError(configLine->getAbsoluteTokenColumn(1)); mCheckBoxMap["ECPSVM"] = configUi->ecpSvm->isChecked(); mSpinMap["ECPSVM"] = configUi->ecpSvmSpin->value(); validateMaxTokens(configLine, 1); } else if ( mCheckBoxMap["ECPSVM"] != configUi->ecpSvm->isChecked() || mSpinMap["ECPSVM"] != configUi->ecpSvmSpin->value() ) { std::string parm; if (configUi->ecpSvm->isChecked()) { std::stringstream ss; ss << configUi->ecpSvmSpin->value(); parm = "LEVEL " + ss.str(); } else parm = "NO"; const_cast(configLine)->replaceParameters(parm); } } SliderItem(HERCPRIO,hercPrioSlider) void ConfigurationEditor::HTTPPORT(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) \ { outDebug(4,std::cout << "HTTPPORT" << std::endl); if (dir == toScreen) { std::string parm = configLine->getToken(1); if ( parm.find_first_not_of("01234567890") != std::string::npos ) configLine->setInError(configLine->getAbsoluteTokenColumn(1)); int num = parseNum(parm); if (num !=0) { configUi->httpPortSpin->setValue(num); configUi->httpPortSpin->setEnabled(true); configUi->httpPortCheckBox->setChecked(true); } else { configUi->httpPortCheckBox->setChecked(false); configUi->httpPortSpin->setValue(0); configUi->httpPortSpin->setEnabled(false); } mSpinMap["HTTPPORT"] = configUi->httpPortSpin->value(); validateMaxTokens(configLine,1); } else { if (mSpinMap["HTTPPORT"] != configUi->httpPortSpin->value()) const_cast(configLine)->replaceParameters(configUi->httpPortSpin->text().toStdString()); } } void ConfigurationEditor::HTTPROOT(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) { outDebug(4,std::cout << "HTTPROOT" << std::endl); if (dir == toScreen) { std::string parm=configLine->getToken(1); if (parm=="+" || parm == "-") parm=configLine->getToken(1); configUi->httpRootDir->setText(parm.c_str()); validateMaxTokens(configLine,1); } else if (configUi->httpRootDir->isModified()) { const std::string val = configUi->httpRootDir->text().toStdString(); const_cast(configLine)->replaceParameters(val); } } SpinItem(IODELAY,ioDelaySpin, 0) TextItem(LDMOD,ldmod) void ConfigurationEditor::LEGACYSENSEID(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) { outDebug(4,std::cout << "LEGACYSENSEID" << std::endl); if (dir == toScreen) { std::string parm=configLine->getUppercaseToken(1); if ( (parm == "ON") || (parm == "ENABLE") ) configUi->legacySenseIdCheckbox->setChecked(true); else if ( (parm == "OFF") || (parm == "DISABLE") ) configUi->legacySenseIdCheckbox->setChecked(false); else configLine->setInError(configLine->getAbsoluteTokenColumn(1)); validateMaxTokens(configLine,1); mCheckBoxMap["LEGACYSENSEID"] = configUi->legacySenseIdCheckbox->isChecked(); } else { if (mCheckBoxMap["LEGACYSENSEID"] != configUi->legacySenseIdCheckbox->isChecked()) { if (configUi->legacySenseIdCheckbox->isChecked()) const_cast(configLine)->replaceParameters("ENABLE"); else const_cast(configLine)->replaceParameters("DISABLE"); } } } TextItem(LOADPARM,loadParm) CheckBoxItem(LOGOPT,logopt, TIMESTAMP, NOTIMESTAMP) TextItem(LPARNAME,lparName) SpinItem(MAINSIZE,mainSizeSpin, 64) TextItem(MANUFACTURER,manufacturer) TextItem(MODEL,model) CheckBoxItem(MOUNTED_TAPE_REINIT,mountedTapeReinitCheckbox,ALLOW,DISALLOW) void ConfigurationEditor::MODPATH(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) { outDebug(4,std::cout << "MODPATH" << std::endl); if (dir == toScreen) { std::string parm=configLine->getToken(1); configUi->modPath->setText(parm.c_str()); validateMaxTokens(configLine,1); } else if (configUi->modPath->isModified()) { const std::string val = configUi->modPath->text().toStdString(); const_cast(configLine)->replaceParameters(val); } } SpinItem(NUMCPU,numCpuSpin, 1) SpinItem(NUMVEC,numVecSpin, 0) void ConfigurationEditor::OSTAILOR(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) { outDebug(4,std::cout << "OSTAILOR" << std::endl); if (dir == toScreen) { std::string parm = configLine->getUppercaseToken(1); int initialValue = 0; if (parm == "QUIET") { configUi->quiet->setChecked(true); initialValue = 1; } else if (parm == "VM") { configUi->vm->setChecked(true); initialValue = 2; } else if (parm == "VSE") { configUi->vse->setChecked(true); initialValue = 3; } else if (parm == "LINUX") { configUi->linuxb->setChecked(true); initialValue = 4; } else if (parm == "OS/390") { configUi->os390->setChecked(true); initialValue = 5; } else if (parm == "Z/OS") { configUi->zOS->setChecked(true); initialValue = 6; } else if (parm == "") { configUi->none->setChecked(true); initialValue = 0; } else { configLine->setInError(configLine->getAbsoluteTokenColumn(1)); } validateMaxTokens(configLine,1); mSpinMap["OSTAILOR"] = initialValue; } else { int value; if (configUi->quiet->isChecked()) value=1; else if (configUi->vm->isChecked()) value=2; else if (configUi->vse->isChecked()) value=3; else if (configUi->linuxb->isChecked()) value=4; else if (configUi->os390->isChecked()) value=5; else if (configUi->zOS->isChecked()) value=6; else value=0; if (value != mSpinMap["OSTAILOR"]) { if (configUi->quiet->isChecked()) const_cast(configLine)->replaceParameters("QUIET"); else if (configUi->vm->isChecked()) const_cast(configLine)->replaceParameters("VM"); else if (configUi->vse->isChecked()) const_cast(configLine)->replaceParameters("VSE"); else if (configUi->linuxb->isChecked()) const_cast(configLine)->replaceParameters("LINUX"); else if (configUi->os390->isChecked()) const_cast(configLine)->replaceParameters("OS/390"); else if (configUi->zOS->isChecked()) const_cast(configLine)->replaceParameters("z/OS"); else if (configUi->none->isChecked()) const_cast(configLine)->replaceParameters("NONE"); } } } void ConfigurationEditor::PANRATE(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) { outDebug(4,std::cout << "PANRATE" << std::endl); if (dir == toScreen) { std::string panRateSpin = configLine->getLowercaseToken(1); if (panRateSpin.length() == 0) configLine->setInError(configLine->getAbsoluteTokenColumn(1)); if (panRateSpin[0] == '+') panRateSpin = panRateSpin.substr(1); int num = parseNum(panRateSpin); if (panRateSpin.length() > 0 && num == 0) { if (panRateSpin.compare("fast") == 0) num=50; else if (panRateSpin.compare("slow") == 0) num=500; else { num = 500; configLine->setInError(configLine->getAbsoluteTokenColumn(1)); } } configUi->panRateSpin->setValue(num); mSpinMap["PANRATE"] = configUi->panRateSpin->value(); if (configLine->getToken(2).length() != 0) configLine->setInError(configLine->getAbsoluteTokenColumn(2)); } else { /*TODO: verification routine*/ if (mSpinMap["PANRATE"] != configUi->panRateSpin->value()) const_cast(configLine)->replaceParameters(configUi->panRateSpin->text().toStdString()); } } CheckBoxItem(PGMPRDOS,pgmPrdOs,LICENSED,RESTRICTED) TextItem(PLANT,plant) CheckBoxItem(SHCMDOPT,shCmdOpt,DISABLE, NODIAG8) SpinItem(SHRDPORT,shrdPortSpin, 3990) SpinItem(SYSEPOCH,sysepochSpin, 1900) SpinItem(TIMERINT,timerIntSpin, 50) SpinItem(TODDRAG,todDragSpin, 0) SliderItem(TODPRIO,todPrioSlider) void ConfigurationEditor::TZOFFSET(Ui::ConfigurationClass * configUi, const ConfigLine * configLine, Direction dir) { hOutDebug(5,"TZOFFSET:"); if (dir == toScreen) { std::string parm = configLine->getToken(1); if (parm.length() < 4) { configLine->setInError(configLine->getAbsoluteTokenColumn(1)); return; } outDebug(5,std::cout << "parm=" << parm << std::endl;) int hh = 0, mm = 0; int sig = 1; if (parm[0] == '+') parm = parm.substr(1); if (parm[0] == '-') { parm = parm.substr(1); sig = -1; } if (parm.length() == 3) { hh = sig*(parm[0]-'0'); mm = parseNum(parm.substr(1)); } else if (parm.length() == 4) { hh = sig*parseNum(parm.substr(0,2)); mm = parseNum(parm.substr(2,2)); } else { configLine->setInError(configLine->getAbsoluteTokenColumn(1)); } configUi->tzOffsetHH->setValue(hh); configUi->tzOffsetMM->setValue(mm); outDebug(5,std::cout << "HH:" << hh << "MM:" << mm<< std::endl;) mSpinMap["TZOFFSET"] = parseNum(parm); validateMaxTokens(configLine,1); } else { int iParm = configUi->tzOffsetHH->value()*100 + configUi->tzOffsetMM->value(); if (mSpinMap["TZOFFSET"] != iParm) { QString parm = configUi->tzOffsetHH->text() + configUi->tzOffsetMM->text(); outDebug(5,std::cout << "parm:" << parm.toAscii().data() << std::endl;) const_cast(configLine)->replaceParameters(parm.toStdString()); } } } SpinItem(XPNDSIZE,xpndSizeSpin, 0) SpinItem(YROFFSET,yrOffsetSpin, 0) ///////////////////////////////////////////////////////////////////////////////////////////////// bool ConfigurationEditor::validateNum(const std::string& str, int base) { if (base == 16) { QString qstr = str.c_str(); if (qstr.toLower().toStdString().find_first_not_of("0123456789abcdef") != std::string::npos) return false; else return true; } return true; } int ConfigurationEditor::parseNum(const std::string& str, int base) { int ret=0; int sign = 1; const char *c = str.c_str(); static std::string digits = "0123456789abcdef"; if (*c == '-') { sign = -1; c++; } for ( ; *c != '\0' ; c++) { char pc = *c; if (base==10 && !isdigit(pc)) break; if ( (pc <= 'Z') && (pc >= 'A') ) pc+=('a'-'A'); ret *= base; //ret += (*c-'0'); size_t i = digits.find_first_of(pc) ; ret += i; } return ret*sign; } std::string ConfigurationEditor::normalizeNum(const std::string& str, int width, int base) { int devno = parseNum(str,base); std::stringstream newLine; newLine << std::hex << std::setw(width) << std::setfill('0') << std::uppercase << devno ; return newLine.str(); } void ConfigurationEditor::validateMaxTokens(const ConfigLine * configLine, int maxNum) { if (configLine->size() > maxNum+1) // size is 1-based maxNum is 0-based configLine->setInError(configLine->getAbsoluteTokenColumn(maxNum+1)); } HerculesStudio/HercConfiguration/DevicesRename.h0000664000175000017500000000273712065055226021376 0ustar yakovyakov/* * File: DevicesPane.h * * Author: Jacob Dekel * Created on: Nov 1, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DevicesRename.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object handles the re-initialization of devices during hercules run time * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DEVICESRENAME_H #define DEVICESRENAME_H #include "Configuration.h" #include #include "ui_DevicesRename.h" class DevicesRename : public QDialog { Q_OBJECT public: DevicesRename(int value, int newValue, QWidget *parent = 0); virtual ~DevicesRename(); public slots: void ok(); void notok(); signals: void accepted(QString oldValue, QString newValue); void rejected(); private: Ui::DevicesRenameClass ui; int mInitialDevNum; Configuration::HexSpinBox* mSpinBox; }; #endif // DEVICESRENAME_H HerculesStudio/HercConfiguration/ConsoleProperties.h0000664000175000017500000000277412065055226022344 0ustar yakovyakov/* * File: ConsoleProperties.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: ConsoleProperties.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object handles the configuration of the console * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef CONSOLEPROPERTIES_H #define CONSOLEPROPERTIES_H #include "ConfigLine.h" #include "GenericDeviceProperties.h" #include "ui_ConsoleProperties.h" class ConsoleProperties : public GenericDeviceProperties { Q_OBJECT public: ConsoleProperties(ConfigLine & line, QWidget *parent = 0); virtual ~ConsoleProperties(); private: Ui::ConsolePropertiesClass ui; ConfigLine & mLine; void setIntegrated(bool integrated); signals: void updateLine(bool); private slots: void ok(); void cancel(); void deviceTypeChanged(int index); }; #endif // CONSOLEPROPERTIES_H HerculesStudio/HercConfiguration/DeviceTypes.cpp0000664000175000017500000000451612065055226021440 0ustar yakovyakov/* * File: DeviceTypes.cpp * * Author: Jacob Dekel * Created on: Oct 15, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DeviceTypes.cpp 162 2012-12-13 14:31:56Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "DeviceTypes.h" #include "Environment.h" #define NUM_DEVICES 12 std::vector DeviceTypes::sDeviceIcons; DeviceTypes DeviceTypes::mInstance; const char *DeviceTypes::sDeviceNames[NUM_DEVICES] = { "Unknown", "Display Terminal", "SYSG", "Consoles", "Printers", "Card Readers", "Card Punch", "Line Printers", "Tape Drives", "CTC", "Dasd", "OSA" }; const char *DeviceTypes::sDeviceIconNames[NUM_DEVICES] = { "/unknown.jpg", //0 "/terminal.jpg", //1 "/terminal.jpg", //2 "/console.jpg", //3 "/printer.jpg", //4 "/card.jpg", //5 "/unknown.jpg", //6 "/printer.jpg", //7 "/tape.jpg", //8 "/net.jpg", //9 "/dasd.jpg", //10 "/net.jpg" //11 }; DeviceTypes::DeviceTypes() { } DeviceTypes::~DeviceTypes() { } DeviceTypes & DeviceTypes::instance() { return mInstance; } QIcon & DeviceTypes::getIcon(DeviceTypes::Type type) { if (sDeviceIcons.empty()) { std::string iconsPath = Environment::getIconsPath(); for (int i=0; i NUM_DEVICES) return NULL; return sDeviceNames[type]; } HerculesStudio/HercConfiguration/ConfigurationFreeEditor.h0000664000175000017500000000404512065055226023436 0ustar yakovyakov/* * File: FreeConfigurationEditor.h * * Author: Jacob Dekel * Created on: Apr 19, 2011 * * Copyright (c) 2011 Jacob Dekel. * Adapted from Nokia sample CodeEditor - * (Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)) * $Id: TerminalProperties.h 67 2010-09-13 14:06:31Z dekeljacob $ * * This object manages the terminal configuration properties * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef FREECONFIGURATIONEDITOR_H #define FREECONFIGURATIONEDITOR_H #include class ConfigurationFreeEditor : public QPlainTextEdit { Q_OBJECT public: explicit ConfigurationFreeEditor(QWidget *parent = 0); void lineNumberAreaPaintEvent(QPaintEvent *event); int lineNumberAreaWidth(); protected: void resizeEvent(QResizeEvent *event); private slots: void updateLineNumberAreaWidth(int newBlockCount); void highlightCurrentLine(); void updateLineNumberArea(const QRect &, int); private: QWidget *mLineNumberArea; }; class LineNumberArea : public QWidget { public: LineNumberArea(ConfigurationFreeEditor *editor) : QWidget(editor) { freeConfigurationEditor = editor; } QSize sizeHint() const { return QSize(freeConfigurationEditor->lineNumberAreaWidth(), 0); } protected: void paintEvent(QPaintEvent *event) { freeConfigurationEditor->lineNumberAreaPaintEvent(event); } private: ConfigurationFreeEditor *freeConfigurationEditor; }; #endif // FREECONFIGURATIONEDITOR_H HerculesStudio/HercConfiguration/DeviceMenuProcessor.h0000664000175000017500000000423412065055226022602 0ustar yakovyakov /* * File: DeviceMenuProcessor.h * * Author: Jacob Dekel * Created on: Oct 14, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DeviceMenuProcessor.h 162 2012-12-13 14:31:56Z dekeljacob $ * * This object is an interface for driving devices through menus * (used by both the devices pane and the devices configuration tab) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DEVICEMENUPROCESSOR_H_ #define DEVICEMENUPROCESSOR_H_ #include "DeviceConfigLine.h" #include "DeviceTypes.h" #include #include class DeviceMenuProcessor : public QWidget { Q_OBJECT public: DeviceMenuProcessor(QWidget *parent = 0); virtual ~DeviceMenuProcessor(); public slots: void devicesClick(QMouseEvent * event); void menuAddTerminal(); void menuAddConsole(); void menuAddPrinter(); void menuAddCardReader(); void menuAddCardPunch(); void menuAddTape(); void menuAddCTC(); void menuAddDasd(); void menuAddSYSG(); void menuLoad(); void menuUnload(); void newTapeFileOK(QString& tapeFile); protected: virtual bool isRealDev(int lineNumber) = 0; virtual bool canAddSYSG() = 0; virtual bool isConfig() = 0; virtual bool realDevice() = 0; virtual DeviceTypes::Type getType(int lineNumber) = 0; virtual void doLoadTape(QString& tapeFileName) = 0; virtual bool hasConfig() = 0; virtual bool traced() = 0; int mClickRow; int mLastClick; QMenu mMenu; DeviceConfigLine * mCandidateLine; private: void menuAddItem(int); }; #endif /* DEVICEMENUPROCESSOR_H_ */ HerculesStudio/HercConfiguration/DeviceListView.h0000664000175000017500000000252412065055226021544 0ustar yakovyakov/* * File: DeviceListView.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DeviceListView.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages the device list presented during run time by Devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DEVICELISTVIEW_H_ #define DEVICELISTVIEW_H_ #include "HerculesStudio.h" #include #include #include class DeviceListView : public QListView { Q_OBJECT public: DeviceListView(QWidget * parent); virtual ~DeviceListView(); protected: void mousePressEvent ( QMouseEvent * e ); signals: void deviceClick(QMouseEvent *); }; #endif /* DEVICELISTVIEW_H_ */ HerculesStudio/HercConfiguration/CtcProperties.h0000664000175000017500000000330412065055226021441 0ustar yakovyakov/* * File: CtcProperties.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * * This object handles the configuration of the CTC * $Id: CtcProperties.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef CTCPROPERTIES_H #define CTCPROPERTIES_H #include "ConfigLine.h" #include "GenericDeviceProperties.h" #include #include "ui_CtcProperties.h" class CtcProperties : public GenericDeviceProperties { Q_OBJECT public: CtcProperties(ConfigLine& configLine, QWidget *parent = 0); virtual ~CtcProperties(); private: Ui::CtcPropertiesClass ui; bool macValidator(const std::string& mac); void arrangeQeth(bool set); void arrangeLcs(bool set); void arrangeCtc(bool set); void arrangeCtct(bool set); void arrangeByType(); void initialize(ConfigLine & configLine); private slots: virtual void ok(); virtual void cancel(); virtual void oatBrowse(); void typeChanged(const QString &); void tun0Check(int); }; #endif // CTCPROPERTIES_H HerculesStudio/HercConfiguration/DevicesPane.h0000664000175000017500000001031112065055226021035 0ustar yakovyakov/* * File: DevicesPane.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DevicesPane.h 162 2012-12-13 14:31:56Z dekeljacob $ * * This object displays the devices pane during hercules run time * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DEVICESPANE_H #define DEVICESPANE_H #include "DeviceTypes.h" #include "DeviceListView.h" #include "StatusUpdateCollector.h" #include "DeviceMenuProcessor.h" #include #include "ui_Devices.h" #include #include #include #include #include #include typedef std::pair TokenPair; class VisualizedDeviceEntry; /* NOTE: look for BEGIN_DEVICE_CLASS_QUERY in hercules source note: DEVA=0180 3390 DASD 1001 /media/Data/Hercules/zLinux/CentOS-4.7/180.cckd [3339 cyls] */ struct DynDeviceLine { char DEV[3]; char action; char eq; char devNo[4]; char pad1; char devTypeN[4]; char pad2; char devType[4]; char pid3; char statusBytes[4]; }; template class dbgmap { public: dbgmap() { mMap = new std::map(); } typedef typename std::map::iterator iterator ; typedef typename std::map::const_iterator const_iterator ; std::pair< iterator, bool > insert(std::pair< const Key, T> t) { return mMap->insert(t); } void clear() { mMap->clear(); } typename std::map::iterator begin() const { return mMap->begin(); } iterator end() const { return mMap->end(); } iterator find(const Key& k) { return mMap->find(k); } void erase(iterator p) { mMap->erase(p); } size_t size() { return mMap->size(); } T& operator[] (const Key& k) { return (*mMap)[k]; } private: std::map *mMap; }; class MainWindow; class DeviceConfigLine; class DevicesRename; class DevicesPane : public DeviceMenuProcessor, public StatusUpdateCollector { Q_OBJECT public: DevicesPane(QWidget *parent = 0); virtual ~DevicesPane(); virtual bool notify(const QByteArray& statusLine); void clear(); public slots: void mousePressed(QModelIndex index); void menuRename(); void menuDelete(); void doAddDevice(bool); void updateDevice(bool); void menuProperties(); void doRename(QString oldDevNum, QString newDevNum); void menuInterrupt(); void menuStatus(); void menuTraceCCW(); void rejected(); protected: virtual bool isRealDev(int lineNumber); virtual bool canAddSYSG(); virtual bool isConfig() { return false; } virtual bool realDevice(); virtual DeviceTypes::Type getType(int lineNumber); virtual void doLoadTape(QString& tapeFileName); virtual bool hasConfig(); virtual bool traced(); private: Ui::DevicesClass ui; MainWindow * mMainWindow; QGridLayout * mLayout; QScrollArea * mScrollArea; DeviceListView * mListView; std::vector mTokens; std::map mDevices; QStandardItemModel * mModel; DevicesRename * mRenameDlg; int mOldDevNum; QSize sizeHint() const; void clearDevices(QWidget * parent); void resizeEvent ( QResizeEvent * event ); void adjustSize(); VisualizedDeviceEntry * getDeviceEntry(); QString textFromValue(int value) const; int getNextDev(std::map::iterator it) const; QIcon * mYellowIcon; QIcon * mYellowHighIcon; signals: void restartDevices(); }; #endif // DEVICES_H HerculesStudio/HercConfiguration/Extended_Ui_CardReaderProperties.h0000664000175000017500000000267412065055226025212 0ustar yakovyakov/* * File: Extended_Ui_CardReaderProperties.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Extended_Ui_CardReaderProperties.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object extends the card reader gui class to include ReaderFileListView * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef EXTENDED_UI_CARDREADERPROPERTIES_H_ #define EXTENDED_UI_CARDREADERPROPERTIES_H_ #include "ui_CardReaderProperties.h" #include "ReaderFileListView.h" class Extended_Ui_CardReaderProperties: public Ui::CardReaderPropertiesClass { public: Extended_Ui_CardReaderProperties(); virtual ~Extended_Ui_CardReaderProperties(); void setupUi(QWidget *CardReaderPropertiesClass); ReaderFileListView *fileNamesListView; }; #endif /* EXTENDED_UI_CARDREADERPROPERTIES_H_ */ HerculesStudio/HercConfiguration/DeviceConfigLine.cpp0000664000175000017500000002372012065055226022347 0ustar yakovyakov/* * File: DeviceConfigLine.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DeviceConfigLine.cpp 167 2012-12-16 16:07:35Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "DeviceConfigLine.h" #include "ConfigurationEditor.h" #include #include DeviceConfigLine::DeviceTypesMap *DeviceConfigLine::mDeviceTypes = NULL; std::map *DeviceConfigLine::mDeviceBaseTypes = NULL; DeviceConfigLine::DeviceConfigLine(const char *line): ConfigLine(line), mMultiCount(0) { initilize(); handleMultiLine(); } DeviceConfigLine::~DeviceConfigLine() { outDebug(5,std::cout << "~DeviceConfigLine" << std::endl); } void DeviceConfigLine::clear() { if (mDeviceTypes != NULL) mDeviceTypes->clear(); if (mDeviceBaseTypes != NULL) mDeviceBaseTypes->clear(); } int DeviceConfigLine::getDeviceNumber() const { return std::strtol(getToken(0).c_str(),NULL, 16); } DeviceTypes::Type DeviceConfigLine::getDeviceType() const { QString token = getToken(1).c_str(); DeviceTypesMap::iterator it = (*mDeviceTypes).find(token.toUpper().toStdString()); if (it == (*mDeviceTypes).end()) return (*mDeviceTypes)["0000"]; outDebug(5, std::cout << "getDeviceType " << token.toStdString() << std::endl); return it->second; } void DeviceConfigLine::handleMultiLine() { std::string devno = getToken(0); int first = -1, last = -1; size_t dash = devno.find_first_of("-"); if (dash != std::string::npos) { first = ConfigurationEditor::parseNum(devno.substr(0,dash), 16); last = ConfigurationEditor::parseNum(devno.substr(dash+1), 16); } size_t dot = devno.find_first_of("."); if (dot != std::string::npos) { first = ConfigurationEditor::parseNum(devno.substr(0,dot), 16); last = first+ConfigurationEditor::parseNum(devno.substr(dot+1), 10)-1; } size_t comma = devno.find_first_of(","); if (comma != std::string::npos) { first = ConfigurationEditor::parseNum(devno.substr(0,comma), 16); last = ConfigurationEditor::parseNum(devno.substr(comma+1), 16); } if (first > -1) { mMultiCount = last-first+1; outDebug(5, std::cout << devno << " multiCount:" << mMultiCount << std::endl); std::stringstream line; line << std::hex << first ; line << " " + getMultiToken(1,0) + "\n"; replaceLine(line.str()); } else { first = ConfigurationEditor::parseNum(devno, 16); } } int DeviceConfigLine::getMultiCount() { outDebug(5, std::cout << "get multiCount:" << mMultiCount << std::endl); return mMultiCount; } void DeviceConfigLine::initilize() { if (mDeviceTypes != NULL) return; mDeviceTypes = new std::map; mDeviceBaseTypes = new std::map; mDeviceTypes->insert(std::pair("0000",DeviceTypes::Other)); mDeviceTypes->insert(std::pair("3270",DeviceTypes::Terminal)); mDeviceTypes->insert(std::pair("3287",DeviceTypes::Terminal)); mDeviceTypes->insert(std::pair("SYSG",DeviceTypes::Sysg)); mDeviceTypes->insert(std::pair("1052",DeviceTypes::Console)); mDeviceTypes->insert(std::pair("3215",DeviceTypes::Console)); mDeviceTypes->insert(std::pair("1052-C",DeviceTypes::Console)); mDeviceTypes->insert(std::pair("3215-C",DeviceTypes::Console)); mDeviceTypes->insert(std::pair("1442",DeviceTypes::CardReader)); mDeviceTypes->insert(std::pair("2501",DeviceTypes::CardReader)); mDeviceTypes->insert(std::pair("3505",DeviceTypes::CardReader)); mDeviceTypes->insert(std::pair("3525",DeviceTypes::CardPunch)); mDeviceTypes->insert(std::pair("1403",DeviceTypes::Printer)); mDeviceTypes->insert(std::pair("3211",DeviceTypes::Printer)); mDeviceTypes->insert(std::pair("3410",DeviceTypes::Tape)); mDeviceTypes->insert(std::pair("3420",DeviceTypes::Tape)); mDeviceTypes->insert(std::pair("3422",DeviceTypes::Tape)); mDeviceTypes->insert(std::pair("3430",DeviceTypes::Tape)); mDeviceTypes->insert(std::pair("3480",DeviceTypes::Tape)); mDeviceTypes->insert(std::pair("3490",DeviceTypes::Tape)); mDeviceTypes->insert(std::pair("3590",DeviceTypes::Tape)); mDeviceTypes->insert(std::pair("9347",DeviceTypes::Tape)); mDeviceTypes->insert(std::pair("8809",DeviceTypes::Tape)); mDeviceTypes->insert(std::pair("3088",DeviceTypes::CTC)); mDeviceTypes->insert(std::pair("CTCI",DeviceTypes::CTC)); mDeviceTypes->insert(std::pair("LCS", DeviceTypes::CTC)); mDeviceTypes->insert(std::pair("QETH", DeviceTypes::CTC)); mDeviceTypes->insert(std::pair("CTCT", DeviceTypes::CTC)); mDeviceTypes->insert(std::pair("2305",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("2311",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("2314",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("3330",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("3340",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("3350",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("3375",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("3380",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("3390",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("9345",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("3310",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("3370",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("9332",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("9335",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("9336",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("0671",DeviceTypes::DASD)); mDeviceTypes->insert(std::pair("2703",DeviceTypes::Comm)); mDeviceBaseTypes->insert(std::pair("3088",DeviceTypes::CTCT)); mDeviceBaseTypes->insert(std::pair("CTCI",DeviceTypes::CTCI)); mDeviceBaseTypes->insert(std::pair("LCS", DeviceTypes::LCS)); mDeviceBaseTypes->insert(std::pair("QETH", DeviceTypes::QETH)); mDeviceBaseTypes->insert(std::pair("2305",DeviceTypes::CKD)); mDeviceBaseTypes->insert(std::pair("2311",DeviceTypes::CKD)); mDeviceBaseTypes->insert(std::pair("2314",DeviceTypes::CKD)); mDeviceBaseTypes->insert(std::pair("3330",DeviceTypes::CKD)); mDeviceBaseTypes->insert(std::pair("3340",DeviceTypes::CKD)); mDeviceBaseTypes->insert(std::pair("3350",DeviceTypes::CKD)); mDeviceBaseTypes->insert(std::pair("3375",DeviceTypes::CKD)); mDeviceBaseTypes->insert(std::pair("3380",DeviceTypes::CKD)); mDeviceBaseTypes->insert(std::pair("3390",DeviceTypes::CKD)); mDeviceBaseTypes->insert(std::pair("9345",DeviceTypes::CKD)); mDeviceBaseTypes->insert(std::pair("3310",DeviceTypes::FBA)); mDeviceBaseTypes->insert(std::pair("3370",DeviceTypes::FBA)); mDeviceBaseTypes->insert(std::pair("9332",DeviceTypes::FBA)); mDeviceBaseTypes->insert(std::pair("9335",DeviceTypes::FBA)); mDeviceBaseTypes->insert(std::pair("9336",DeviceTypes::FBA)); mDeviceBaseTypes->insert(std::pair("9336",DeviceTypes::FBA)); } std::string DeviceConfigLine::toString() const { int i=mLine.length()-3; while (i>=0) { if ( (mLine[i] != ' ') && (mLine[i] != '\t') && (mLine[i] != '\n') && (mLine[i] != '\r') ) break; --i; } return mLine.substr(0,i); } HerculesStudio/HercConfiguration/StatusUpdateCollector.cpp0000664000175000017500000000177712065055226023517 0ustar yakovyakov/* * File: StatusUpdateCollector.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: StatusUpdateCollector.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "StatusUpdateCollector.h" StatusUpdateCollector::StatusUpdateCollector() { } StatusUpdateCollector::~StatusUpdateCollector() { } HerculesStudio/HercConfiguration/PrinterProperties.cpp0000664000175000017500000000710612065055226022712 0ustar yakovyakov/* * File: PrinterProperties.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: PrinterProperties.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "PrinterProperties.h" #include #include #include #include PrinterProperties::PrinterProperties(ConfigLine& line, QWidget *parent) : GenericDeviceProperties(line, parent) { ui.setupUi(this); ui.filename->setValidator(new PrinterFileNameValidator(this)); if (!line.isNew()) { ui.deviceNumber->setText(mLine.getToken(0).c_str()); ui.printerCombo->setCurrentIndex( (mLine.getToken(1) == "3211") ? 1 : 0); if (mLine.size() > 2) { ui.filename->setText(mLine.getToken(2).c_str()); if (mLine.size() > 3) { std::string crlf = mLine.getToken(3); std::transform(crlf.begin(), crlf.end(), crlf.begin(), ::tolower); ui.crlfCheckBox->setChecked(crlf == "crlf"); } } else ui.crlfCheckBox->setEnabled(false); } connect(ui.OKButton, SIGNAL(clicked()), this, SLOT(ok())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancel())); connect(ui.filenameBrowseButton, SIGNAL(clicked()), this, SLOT(fileNameBrowse())); } PrinterProperties::~PrinterProperties() { } void PrinterProperties::ok() { if (!deviceNumberValidator(ui.deviceNumber)) return; if (ui.filename->text().isEmpty()) { QMessageBox::warning(this, "File name is empty", "Please provide file name", QMessageBox::Ok); return; } std::stringstream newLineBuff; bool crlf = (ui.filename->text().isEmpty() == false) && (ui.crlfCheckBox->isChecked()); newLineBuff << ui.deviceNumber->text().toStdString() << " " << ui.printerCombo->currentText().toStdString() << " " << ui.filename->text().toStdString() << " " << (crlf ? "crlf" : " ") << "\n"; outDebug(5, std::cout << "new line:" << newLineBuff.str() << std::endl); mLine.replaceLine(newLineBuff.str()); emit updateLine(true); this->deleteLater(); } void PrinterProperties::cancel() { emit updateLine(false); this->deleteLater(); } void PrinterProperties::setCrlfEnabled(bool checked) { ui.crlfCheckBox->setEnabled(checked); } void PrinterProperties::fileNameBrowse() { std::string s = QFileDialog::getOpenFileName(this, "Set Printer File", "~/", tr("All files(*)")).toUtf8().data(); ui.filename->setText(s.c_str()); } PrinterFileNameValidator::PrinterFileNameValidator(QObject * parent) : QValidator(parent), mParent(dynamic_cast(parent)) { } QValidator::State PrinterFileNameValidator::validate(QString & v, int & ) const { mParent->setCrlfEnabled(v.length()>0); return QValidator::Acceptable; } HerculesStudio/HercConfiguration/SysgProperties.h0000664000175000017500000000233512065055226021660 0ustar yakovyakov/* * File: SysgProperties.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: SysgProperties.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This class extends TerminalProperties for the SYSG integrated console * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef SYSGPROPERTIES_H_ #define SYSGPROPERTIES_H_ #include "TerminalProperties.h" class SysgProperties: public TerminalProperties { public: SysgProperties(ConfigLine& line,QWidget *parent = 0); virtual ~SysgProperties(); protected: virtual bool isSysg(); }; #endif /* SYSGPROPERTIES_H_ */ HerculesStudio/HercConfiguration/Configuration.h0000664000175000017500000000675512065055226021477 0ustar yakovyakov/* * File: Configuration.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Configuration.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages the Hercules configuration * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef CONFIGURATION_H #define CONFIGURATION_H #include "ConfigFile.h" #include "HerculesStudio.h" #include "ConfigurationEditor.h" #include "DevicesWidget.h" #include "ui_Configuration.h" #include #include struct ConfigTableEntry { std::string keyword; void (*populator)(Ui::ConfigurationClass *, const ConfigLine *, ConfigurationEditor::Direction dir); }; class Configuration : public QDialog { Q_OBJECT public: Configuration(ConfigFile* confignFile, bool newConfig = false, QWidget *parent = 0); virtual ~Configuration(); class DoubleDigitSpinBox : public QSpinBox { public: DoubleDigitSpinBox(QWidget * parent = 0, bool appendPlus=false); protected: virtual int valueFromText(const QString& text) const; virtual QString textFromValue(int value) const; private: bool mAppendPlus; }; class HexSpinBox : public QSpinBox { public: HexSpinBox(QWidget * parent = 0); virtual QString textFromValue(int value) const; protected: virtual int valueFromText(const QString& text) const; QValidator::State validate(QString & input, int & pos) const; }; protected: virtual void resizeEvent ( QResizeEvent * event ); private: Ui::ConfigurationClass ui; DevicesWidget * mDevWgt; QPlainTextEdit * mFreeEdit; QSyntaxHighlighter * mSyntaxHighlighter; QWidget * mParent; ConfigFile * mConfigFile; bool mNewConfig; bool mChanged; // text changed since last validation bool mTimerSet; // validation timer was set int mCurrTab; int mLastSys; // updated by blockCountChanged() static struct ConfigTableEntry mConfigTable[]; friend class ConfigHighlight; void initilize(); void populate(ConfigurationEditor::Direction); void handleHighlight(const ConfigLine& configLine, QTextCursor& cursor, QTextCharFormat& format); signals: void OKSignal(); private slots: void okPressed(); void cancelPressed(); void autoMountBrowsePressed(); void autoScsiMountChanged(); void cpuPrioChanged(int); void devPrioChanged(int); void hercPrioChanged(int); void todPrioChanged(int); void ecpSvmChanged(int); void httpPortChanged(int); void httpRootBrowsePressed(); void modPathBrowsePressed(); void tabChanged(int); void blockCountChangedSlot(); }; class ConfigHighlight : public QSyntaxHighlighter { Q_OBJECT public: ConfigHighlight(QWidget * parent); protected: void highlightBlock(const QString &text); private: QDialog mDummyConfig; Ui::ConfigurationClass mDummyUi; QColor mGreen; QColor mRed; QColor mBlack; QColor mBlue; QColor mGray; }; #endif // CONFIGURATION_H HerculesStudio/HercConfiguration/NewReaderFile.cpp0000664000175000017500000000500512065055226021662 0ustar yakovyakov/* * File: NewReaderFile.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: NewReaderFile.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This object handles the creation of a new reader file * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "NewReaderFile.h" #include "Preferences.h" #include NewReaderFile::NewReaderFile(QWidget * parent) : QDialog(parent), mLabel(this), mFileName(this), mBrowseButton(this), mOKButton(this), mCancelButton(this) { initialize(); move(parent->x()+50,parent->y()+50); connect(&mCancelButton, SIGNAL(pressed()), this, SLOT(doCancel())); connect(&mOKButton, SIGNAL(pressed()), this, SLOT(doOK())); connect(&mBrowseButton, SIGNAL(pressed()), this, SLOT(doBrowse())); } NewReaderFile::~NewReaderFile() { } void NewReaderFile::doCancel() { this->deleteLater(); } void NewReaderFile::doOK() { if (!mFileName.text().isEmpty()) { QString str = mFileName.text(); emit okPressed(str); } doCancel(); } void NewReaderFile::doBrowse() { std::string s = QFileDialog::getOpenFileName(this, "Locate reader file(s)", Preferences::getInstance().configDir().c_str(), tr("All files(*)")).toUtf8().data(); mFileName.setText(s.c_str()); } void NewReaderFile::initialize() { if (objectName().isEmpty()) setObjectName(QString::fromUtf8("NewReaderFile")); int x = this->geometry().x(); int y = this->geometry().x(); this->setGeometry(x, y, 400, 90); mLabel.setText("Enter file name to be used as reader file"); mLabel.setGeometry(5,5,300,12); mFileName.setGeometry(5, 30,300,30); mBrowseButton.setGeometry(310,40,30,20); mBrowseButton.setText("..."); mOKButton.setGeometry(5,60,50,30); mOKButton.setText("OK"); mCancelButton.setGeometry(310,60,50,30); mCancelButton.setText("Cancel"); } HerculesStudio/HercConfiguration/ConsoleProperties.cpp0000664000175000017500000001134112065055226022665 0ustar yakovyakov/* * File: ConsoleProperties.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: ConsoleProperties.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "ConsoleProperties.h" #include "HerculesStudio.h" #include #include ConsoleProperties::ConsoleProperties(ConfigLine & line, QWidget *parent) : GenericDeviceProperties(line, parent), mLine(line) { ui.setupUi(this); if (!mLine.isNew()) { outDebug(5, std::cout << "not new" << mLine.getLine() << std::endl); ui.deviceNumber->setText(mLine.getToken(0).c_str()); if (mLine.getToken(1) == "1052") ui.deviceCombo->setCurrentIndex(0); else if (mLine.getToken(1) == "3215") ui.deviceCombo->setCurrentIndex(1); else if (mLine.getLowercaseToken(1) == "1052-c") ui.deviceCombo->setCurrentIndex(2); else ui.deviceCombo->setCurrentIndex(3); if (ui.deviceCombo->currentIndex() >= 2) // integrated { setIntegrated(true); if (mLine.size() > 2) { ui.commandPrefix->setText(mLine.getToken(2).c_str()); } } else // not integrated { setIntegrated(false); int index=2; if (mLine.getToken(index) == "noprompt") { ui.noPromptCheckBox->setChecked(true); index++; } if (mLine.size() > index) { if (mLine.getToken(index).length() > 0 && mLine.getToken(index)[0] != '*') ui.terminalGroup->setText(mLine.getToken(index).c_str()); ui.ipAddress->setText(mLine.getToken(index+1).c_str()); ui.subnetMask->setText(mLine.getToken(index+2).c_str()); } } } else { setIntegrated(false); } connect(ui.OKButton, SIGNAL(clicked()), this, SLOT(ok())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancel())); connect(ui.deviceCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(deviceTypeChanged(int)) ); } ConsoleProperties::~ConsoleProperties() { } void ConsoleProperties::ok() { if (!deviceNumberValidator(ui.deviceNumber)) return; if ( (ui.deviceCombo->currentIndex() < 2) && !ipValidator(ui.ipAddress,false)) return; if (!ipValidator(ui.subnetMask,true)) return; std::stringstream newLineBuff; if (ui.deviceCombo->currentIndex() >= 2) { newLineBuff << ui.deviceNumber->text().toStdString() << " " << ui.deviceCombo->currentText().toStdString() << " " << ui.commandPrefix->text().toStdString() + "\n"; } else { newLineBuff << ui.deviceNumber->text().toStdString() << " " << ui.deviceCombo->currentText().toStdString(); // noprompt if (ui.noPromptCheckBox->isChecked()) newLineBuff << " noprompt" ; // terminal group if (ui.terminalGroup->text().length() > 0) newLineBuff << " " << ui.terminalGroup->text().toStdString(); else newLineBuff << " *"; // ip address newLineBuff << " " << ui.ipAddress->text().toStdString(); // subnet mask if (ui.subnetMask->text() != "...") newLineBuff << " " << ui.subnetMask->text().toStdString(); newLineBuff << "\n"; } outDebug(5, std::cout << newLineBuff.str() << std::endl); mLine.replaceLine(newLineBuff.str()); emit updateLine(true); this->deleteLater(); } void ConsoleProperties::cancel() { emit updateLine(false); deleteLater(); } void ConsoleProperties::setIntegrated(bool integrated) { ui.commandPrefix->setVisible(integrated); ui.noPromptCheckBox->setEnabled(!integrated); ui.label_terminal->setText( integrated ? "Command Prefix" : "Terminal Group"); ui.terminalGroup->setVisible(!integrated); ui.ipAddress->setEnabled(!integrated); ui.subnetMask->setEnabled(!integrated); } void ConsoleProperties::deviceTypeChanged(int index) { if (index >= 2) setIntegrated(true); else setIntegrated(false); } HerculesStudio/HercConfiguration/ConfigurationEditor.h0000664000175000017500000001475112065055226022641 0ustar yakovyakov/* * File: ConfigurationEditor.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: ConfigurationEditor.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages the editing of various keywords in the configuration file * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef CONFIGURATIONEDITOR_H_ #define CONFIGURATIONEDITOR_H_ #include "ConfigLine.h" #include "ui_Configuration.h" #include #include #include class ConfigurationEditor { public: enum Direction { toScreen, fromScreen }; ConfigurationEditor(); virtual ~ConfigurationEditor(); static void handleText(QLineEdit * lineEdit, const ConfigLine * configLine, Direction dir); static void handleSlider(QSlider * slider, const ConfigLine * configLine, Direction dir); static void handleCheckbox(QCheckBox * checkbox, const ConfigLine * configLine, Direction dir, QString checked, QString unchecked); static void handleSpin(QSpinBox * spinbox, const ConfigLine * configLine, Direction dir, int dflt); static void handleSpin(QDoubleSpinBox * spinbox, const ConfigLine * configLine, Direction dir, int dflt); static void ARCHMODE(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void ASN_AND_LX_REUSE(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void ALRF(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void AUTO_MOUNT(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void AUTO_SCSI_MOUNT(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void CNSLPORT(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void CONKPALV(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void CPUMODEL(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void CPUPRIO(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void CPUSERIAL(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void CPUVERID(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void DEVPRIO(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void DEVTMAX(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void DIAG8CMD(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void ECPSVM(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void ENGINES(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void HERCPRIO(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void HTTPPORT(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void HTTPROOT(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void IGNORE(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void IODELAY(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void LDMOD(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void LEGACYSENSEID(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void LOADPARM(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void LOGOPT(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void LPARNAME(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void MAINSIZE(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void MANUFACTURER(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void MODEL(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void MODPATH(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void MOUNTED_TAPE_REINIT(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void NUMCPU(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void NUMVEC(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void OSTAILOR(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void PANRATE(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void PGMPRDOS(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void PLANT(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void SHCMDOPT(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void SHRDPORT(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void SYSEPOCH(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void TIMERINT(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void TODDRAG(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void TODPRIO(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void TZOFFSET(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void XPNDSIZE(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static void YROFFSET(Ui::ConfigurationClass *, const ConfigLine * configLine, Direction dir); static bool validateNum(const std::string& str, int base); static int parseNum(const std::string& str, int base=10); //TODO util? static std::string normalizeNum(const std::string& str, int width=4, int base=10); //util? private: static void validateMaxTokens(const ConfigLine * configLine, int maxNum); static std::map mCheckBoxMap; static std::map mSpinMap; }; #endif /* CONFIGURATIONEDITOR_H_ */ HerculesStudio/HercConfiguration/PunchProperties.ui0000664000175000017500000001030612065055226022173 0ustar yakovyakov PunchPropertiesClass 0 0 474 344 PunchProperties 20 50 431 61 Printer false 320 20 81 24 3525 10 20 101 19 Device Number 120 20 61 25 226 20 81 20 Device Type 20 130 431 191 Optional Arguments 140 30 113 25 20 30 101 21 File Name 340 140 78 29 Update 20 140 78 29 Cancel 10 110 84 24 Append 10 90 84 24 Crlf 10 70 84 24 Ascii HerculesStudio/HercConfiguration/DasdProperties.cpp0000664000175000017500000002012512065055226022136 0ustar yakovyakov/* * File: DasdProperties.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DasdProperties.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "DasdProperties.h" #include "Preferences.h" #include #include #include std::string DasdProperties::ckd[] = {"2305", "2311", "2314", "3330", "3340", "3350", "3375", "3380", "3390", "9345", ""}; std::string DasdProperties::fba[] = {"3310", "3370", "9332", "9335", "9336", "0671", ""}; DasdProperties::DasdProperties(ConfigLine& configLine, QWidget *parent) : GenericDeviceProperties(configLine, parent) { ui.setupUi(this); connect(ui.okButton, SIGNAL(clicked()), this, SLOT(ok())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancel())); connect(ui.typeCombo, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(typeChanged(const QString &))); connect(ui.localRadioButton,SIGNAL(toggled(bool)), this, SLOT(localInetChanged())); connect(ui.browseButton, SIGNAL(clicked()), this, SLOT(browseClicked())); connect(ui.browseShadowButton, SIGNAL(clicked()), this, SLOT(browseShadowClicked())); initialize(configLine); } DasdProperties::~DasdProperties() { } void DasdProperties::ok() { if (!deviceNumberValidator(ui.deviceNumber)) return; std::stringstream newLineBuff; newLineBuff << ui.deviceNumber->text().toStdString() << " " << ui.typeCombo->currentText().toStdString(); if (ui.localRadioButton->isChecked()) { if (ui.filename->text().isEmpty()) { QMessageBox * p = new QMessageBox(this); p->setText("Please enter file name"); p->exec(); ui.filename->setFocus(); return; } newLineBuff << " " << ui.filename->text().toStdString(); } else { if (!ipValidator(ui.remotehost, false)) return; newLineBuff << " " << ui.remotehost->text().toStdString() << ":" << ui.portSpinBox->value() << ":" << ui.devnoSpinBox->value(); } if (ui.nosynchioCheckBox->isChecked()) newLineBuff << " nosyncio"; if (!ui.shadow->text().isEmpty()) newLineBuff << " sf=" << ui.shadow->text().toStdString(); if (!isFba(ui.typeCombo->currentText().toStdString())) { if (ui.cuComboBox->currentIndex()>0) newLineBuff << " cu=" << ui.cuComboBox->currentText().toStdString(); if (!ui.standardRadioButton->isChecked()) { newLineBuff << (ui.ReadonlyRadioButton->isChecked() ? " readonly" : " fakewrite"); } } else { //TODO } newLineBuff << "\n"; mLine.replaceLine(newLineBuff.str()); emit updateLine(true); this->deleteLater(); } void DasdProperties::cancel() { emit updateLine(false); this->deleteLater(); } void DasdProperties::browseClicked() { std::string s = QFileDialog::getOpenFileName(this, "Locate DASD File", Preferences::getInstance().configDir().c_str(), tr("All files(*)")).toUtf8().data(); ui.filename->setText(s.c_str()); } void DasdProperties::browseShadowClicked() { std::string s = QFileDialog::getOpenFileName(this, "Locate Shadow DASD File", Preferences::getInstance().configDir().c_str(), tr("All files(*)")).toUtf8().data(); ui.shadow->setText(s.c_str()); } void DasdProperties::typeChanged(const QString& newValue) { if (isFba(newValue.toStdString())) setFba(true); else setCkd(true); } void DasdProperties::localInetChanged() { if (ui.localRadioButton->isChecked()) { setLocal(true); } else setInet(true); } void DasdProperties::setLocal(bool set) { if (set) setInet(!set); ui.filenameLabel->setVisible(set); ui.filename->setVisible(set); ui.browseButton->setVisible(set); ui.shadowLabel->setVisible(set); ui.shadow->setVisible(set); ui.browseShadowButton->setVisible(set); } void DasdProperties::setInet(bool set) { if (set) setLocal(!set); ui.remotehostLabel->setVisible(set); ui.remotehost->setVisible(set); ui.portLabel->setVisible(set); ui.portSpinBox->setVisible(set); ui.devnoLabel->setVisible(set); ui.devnoSpinBox->setVisible(set); } bool DasdProperties::isFba(const std::string& dev) { int i=0; while (fba[i] != "") { if (dev == fba[i]) return true; i++; } return false; } void DasdProperties::setFba(bool set) { if (set) setCkd(false); } void DasdProperties::setCkd(bool set) { if (set) setFba(false); ui.ioModeGroupbox->setVisible(set); ui.cuComboBox->setVisible(set); ui.cuLabel->setVisible(set); } bool DasdProperties::isInet(const std::string& fileName, stringArray & vec) { int count; size_t ppos= -1; size_t pos = -2; for (count = 0; count < 3 && pos != std::string::npos; count++) { pos = fileName.find(':',ppos+1); if (pos != std::string::npos) { std::string s = fileName.substr(ppos+1,pos-ppos-1); vec[count] = s; ppos = pos; } else if (count ==2) vec[2] = fileName.substr(ppos+1); } return count==3; } void DasdProperties::initialize(ConfigLine& line) { ui.deviceNumber->setText(line.getToken(0).c_str()); int origType = ui.typeCombo->currentIndex(); for (int i=0; imaxCount(); i++) { ui.typeCombo->setCurrentIndex(i); if (ui.typeCombo->currentText().toStdString() == line.getToken(1)) break; else ui.typeCombo->setCurrentIndex(-1); } if (ui.typeCombo->currentIndex() == -1) ui.typeCombo->setCurrentIndex(origType); std::string vec[3]; if (isInet(line.getToken(2), vec)) { ui.remotehost->setText(vec[0].c_str()); ui.portSpinBox->setValue(atoi(vec[1].c_str())); ui.devnoSpinBox->setValue(atoi(vec[2].c_str())); ui.inetRadioButton->setChecked(true); } else { std::string token = line.getToken(2); ui.filename->setText(token.c_str()); } for (int i=2; isetChecked(true); } else if (line.getToken(i) == "nosyncio" || line.getToken(i) == "syio") { ui.nosynchioCheckBox->setChecked(true); } else if (line.getToken(i) == "readonly" || line.getToken(i) == "rdonly"|| line.getToken(i) == "ro") { ui.ReadonlyRadioButton->setChecked(true); } else if (line.getToken(i) == "fakewrite" || line.getToken(i) == "fakewrt"|| line.getToken(i) == "fw") { ui.fakeWritesRadioButton->setChecked(true); } else if (line.getToken(i).substr(0,3) == "cu=") { std::string cu = line.getToken(i).substr(3); for (int ii=0; iimaxCount(); ii++) { ui.cuComboBox->setCurrentIndex(ii); if (ui.cuComboBox->currentText().toStdString() == cu) break; else ui.cuComboBox->setCurrentIndex(-1); } } } localInetChanged(); typeChanged(ui.typeCombo->currentText()); } HerculesStudio/HercConfiguration/DeviceTypes.h0000664000175000017500000000315612065055226021104 0ustar yakovyakov/* * File: DeviceTypes.h * * Author: Jacob Dekel * Created on: Oct 15, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DeviceTypes.h 162 2012-12-13 14:31:56Z dekeljacob $ * * This object is an interface for driving devices through menus * (used by both the devices pane and the devices configuration tab) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DEVICETYPES_H_ #define DEVICETYPES_H_ #include class DeviceTypes { public: static DeviceTypes& instance(); virtual ~DeviceTypes(); enum Type { Other = 0, Terminal, Sysg, Console, Printer, CardReader, CardPunch, LinePrinter, Tape, CTC, DASD , Comm }; enum BaseType { CTCT=100 , CTCI, LCS, QETH, CKD, FBA}; QIcon & getIcon(DeviceTypes::Type type) ; const char * getName(Type type); private: DeviceTypes(); static DeviceTypes mInstance; const static char *sDeviceNames[]; const static char *sDeviceIconNames[]; static std::vector sDeviceIcons; }; #endif /* DEVICETYPES_H_ */ HerculesStudio/HercConfiguration/PrinterProperties.ui0000664000175000017500000000767312065055226022556 0ustar yakovyakov PrinterPropertiesClass 0 0 474 374 PrinterProperties 20 50 431 61 Printer true 320 20 81 24 1403 3211 10 20 101 19 Device Number 120 20 61 25 226 20 81 20 Device Type 20 150 431 191 Optional Arguments 100 30 271 25 20 30 81 21 File Name 340 140 78 29 Update 20 140 78 29 Cancel 20 80 84 24 Crlf 380 30 31 26 ... HerculesStudio/HercConfiguration/ReaderFileListView.h0000664000175000017500000000246312065055226022351 0ustar yakovyakov/* * File: ReaderFileListView.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: ReaderFileListView.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object presents a file list that can be managed with the mouse * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef READERFILELISTVIEW_H_ #define READERFILELISTVIEW_H_ #include class ReaderFileListView : public QListView { public: ReaderFileListView(QWidget * parent = 0 ); virtual ~ReaderFileListView(); void setReaderParent(QWidget * parent); private: QWidget * mReaderParent; void dropEvent ( QDropEvent * event ) ; }; #endif /* READERFILELISTVIEW_H_ */ HerculesStudio/HercConfiguration/TapeProperties.ui0000664000175000017500000004375312065055226022023 0ustar yakovyakov TapePropertiesClass 0 0 506 526 TapeProperties 40 60 431 61 Tape true 320 20 81 24 0 3410 3420 3422 3430 3480 3490 3590 9347 8809 10 20 101 19 Device Number 120 20 61 25 226 20 81 20 Device Type 40 140 431 311 Properties 20 70 351 29 380 70 41 29 ... 20 50 57 19 File Name 20 110 131 25 Causes HET files to be written in AWSTAPE format. This basically, disables the additional features provided by the HET format. AWSTAPE 20 140 131 28 Compression (IDRC) : compression method to use No Compression ZLib BZip2 170 150 241 16 1 9 5 Qt::Horizontal QSlider::TicksBelow 1 180 170 16 19 1 390 170 16 19 9 20 190 111 29 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The <span style=" font-family:'Courier New,courier';">CHUNKSIZE</span> option allows you to create HET files that contain different chunk sizes. The AWSTAPE (and therefore the HET) format allows each tape block to be logically broken up into smaller chunks. For instance, if your S/3x0 application creates tapes with a block size of 27998, those blocks would be broken down into <span style=" font-family:'Courier New,courier'; font-style:italic;">nnnnn</span>  sized chunks. The range is from <span style=" font-family:'Courier New,courier';">4096</span> to <span style=" font-family:'Courier New,courier';">65535</span>, the latter being the default. Decreasing the value from its default may reduce compression performance. For compatibility with AWSTAPE files created by the P/390, specify <span style=" font-family:'Courier New,courier';">AWSTAPE</span> with <span style=" font-family:'Courier New,courier';">CHUNKSIZE=4096</span>. </p></body></html> 4096 65535 65535 140 200 91 19 Chunk Size 20 100 191 25 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This option is intended to prevent issuance of the Erase Gap command to those SCSI tape drives which do not support it (such as the Quantum DLT series). It causes Hercules's device emulation logic to ignore any Erase Gap commands issued to the drive and to return immediate 'success' instead. </p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This option should only be used (specified) for drives such as the Quantum, which support switching from read mode to write mode in the middle of a data stream without the need of an intervening Erase Gap command. Specifying it for any other model SCSI drive may cause incorrect functioning as a result of the Erase Gap command not being issued to the actual SCSI hardware. </p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Check the manufacturer information for your particular model of SCSI-attached tape drive (and/or use Fish's "<a href="http://www.softdevlabs.com/Hercules"><span style=" text-decoration: underline; color:#0000ff;">ftape</span></a>" Windows utility) to determine whether or not this option is needed for your particular drive. </p></body></html> Ignore Erase-Gap commands 180 240 111 16 Maximum file size 20 230 61 26 Specifies the maximum size (in bytes, Kilobytes or Megabytes) that the emulated file is allowed to grow to. Specifying zero for this parameter means "unlimited" 1023 90 230 75 26 Bytes Kilobytes Megabytes 100 280 181 16 End-of-tape margin (kilobytes) 20 270 61 26 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Specifies the number of bytes remaining before reaching <span style=" font-style:italic;">maxsize</span> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">at which point the tape device will signal the presence of the </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">"End of Tape" marker (reflector), thus allowing the program </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">to switch to the next tape. </p></body></html> 999 110 110 80 22 Specifies whether the tape is mounted read-only (without a write ring or with the cartridge protect switch set to "write protect") Readonly 210 110 131 22 Specifies whether a device end is presented if intervention is required during tape motion Device-end on IRQ 20 120 161 25 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This option indicates that your SCSI-attached tape drive only supports 32-bit block-ids (as used by 3590 drives) and not the 22-bit format used by 3480/3490 drives. You should only specify this option if you intend to define the drive as a model 3480 or 3490 device, and then only if your actual SCSI drive uses 32-bit block-ids of course. If you define your Hercules tape drive as a model 3590 device however, then this option is of course not needed since model 3590 drives are already presumed to use 32-bit block-ids. </p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Specifying this option on a 3480/3490 device statement will cause Hercules device emulation logic to automatically translate the actual SCSI tape drive's 32-bit block-id into 22-bit format before returning it back to the guest operating system (since that is the format it expects it to be in for a model 3480/3490 drive), and to translate the guest's 22-bit format block-id into 32-bit format before sending it to the actual SCSI hardware (since that is the format that the actual hardware requires it to be in). </p></body></html> 32-bit Blockids Only 20 20 291 22 Do not allow guest initiated mounts 390 480 80 29 Update 40 480 80 29 Cancel HerculesStudio/HercConfiguration/hercconfiguration.ui0000664000175000017500000000065612065055226022561 0ustar yakovyakov HercConfigurationClass 0 0 400 300 HercConfiguration HerculesStudio/HercConfiguration/DevicesRename.ui0000664000175000017500000000362612065055226021562 0ustar yakovyakov DevicesRenameClass 0 0 400 143 DevicesRename 20 10 201 16 Rename Device Unit Address 20 50 41 16 From 80 40 61 26 HHHH; true 150 50 41 16 To 220 100 166 32 QDialogButtonBox::Cancel|QDialogButtonBox::Ok HerculesStudio/HercConfiguration/PrinterProperties.h0000664000175000017500000000324712065055226022361 0ustar yakovyakov/* * File: PrinterProperties.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: PrinterProperties.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages the printer configuration properties * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef PRINTERPROPERTIES_H #define PRINTERPROPERTIES_H #include "ConfigLine.h" #include "GenericDeviceProperties.h" #include "HerculesStudio.h" #include "ui_PrinterProperties.h" class PrinterProperties : public GenericDeviceProperties { Q_OBJECT public: PrinterProperties(ConfigLine& line,QWidget *parent = 0); virtual ~PrinterProperties(); void setCrlfEnabled(bool enabled); private: Ui::PrinterPropertiesClass ui; private slots: void ok(); void cancel(); void fileNameBrowse(); }; class PrinterFileNameValidator : public QValidator { public: PrinterFileNameValidator(QObject * parent); virtual QValidator::State validate(QString&, int&) const; private: PrinterProperties * mParent; }; #endif // PRINTERPROPERTIES_H HerculesStudio/HercConfiguration/Configuration.cpp0000664000175000017500000003556712065055226022035 0ustar yakovyakov/* * File: Configuration.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Configuration.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Configuration.h" #include "SystemConfigLine.h" #include "DeviceConfigLine.h" #include "ConfigurationFreeEditor.h" #include "Preferences.h" #include #include #include #include #define genEntry(keyword) {#keyword, ConfigurationEditor::keyword}, #define synonymEntry(keyword1, keyword2) {#keyword1, #keyword2}, {#keyword2, #keyword1}, struct ConfigTableEntry Configuration::mConfigTable[] = { genEntry(ARCHMODE) genEntry(ASN_AND_LX_REUSE) genEntry(ALRF) genEntry(AUTO_MOUNT) genEntry(AUTO_SCSI_MOUNT) //CODEPAGE genEntry(CNSLPORT) genEntry(CONKPALV) genEntry(CPUMODEL) genEntry(CPUPRIO) genEntry(CPUSERIAL) genEntry(CPUVERID) //DEFSYM genEntry(DEVPRIO) genEntry(DEVTMAX) genEntry(DIAG8CMD) genEntry(ECPSVM) genEntry(ENGINES) genEntry(HERCPRIO) genEntry(HTTPPORT) genEntry(HTTPROOT) //genEntry(IGNORE) //INCLUDE genEntry(IODELAY) genEntry(LDMOD) genEntry(LEGACYSENSEID) genEntry(LOADPARM) genEntry(LOGOPT) genEntry(LPARNAME) genEntry(MAINSIZE) genEntry(MANUFACTURER) genEntry(MODEL) genEntry(MODPATH) genEntry(MOUNTED_TAPE_REINIT) genEntry(NUMCPU) genEntry(NUMVEC) genEntry(OSTAILOR) genEntry(PANRATE) //PANTITLE -- genEntry(PGMPRDOS) genEntry(PLANT) genEntry(SHCMDOPT) genEntry(SHRDPORT) genEntry(SYSEPOCH) genEntry(TIMERINT) genEntry(TODDRAG) genEntry(TODPRIO) //TRACEOPT -- genEntry(TZOFFSET) genEntry(XPNDSIZE) genEntry(YROFFSET) {"",NULL} }; Configuration::Configuration(ConfigFile* configFile, bool newConfig, QWidget *parent) : QDialog(parent), mParent(parent), mConfigFile(configFile), mNewConfig(newConfig) { ui.setupUi(this); mDevWgt = new DevicesWidget(configFile, ui.Configuration->widget(5)); mDevWgt->move(0,50); mDevWgt->show(); mFreeEdit = new ConfigurationFreeEditor(ui.Configuration->widget(6)); mSyntaxHighlighter = new ConfigHighlight(mFreeEdit); mSyntaxHighlighter->setDocument(mFreeEdit->document()); mFreeEdit->move(10,50); mFreeEdit->resize(411, 671); initilize(); populate(ConfigurationEditor::toScreen); } Configuration::~Configuration() { } void Configuration::initilize() { DoubleDigitSpinBox * hh = new DoubleDigitSpinBox(ui.groupBox_4, true); hh->setObjectName(QString::fromUtf8("tzOffsetHH")); hh->setGeometry(QRect(ui.tzOffsetHH->geometry())); hh->setMinimum(ui.tzOffsetHH->minimum()); hh->setMaximum(ui.tzOffsetHH->maximum()); if (ui.tzOffsetHH != NULL) delete ui.tzOffsetHH; ui.tzOffsetHH = hh; DoubleDigitSpinBox * mm = new DoubleDigitSpinBox(ui.groupBox_4, false); mm->setObjectName(QString::fromUtf8("tzOffsetMM")); mm->setGeometry(QRect(ui.tzOffsetMM->geometry())); mm->setMaximum(ui.tzOffsetMM->maximum()); if (ui.tzOffsetMM != NULL) delete ui.tzOffsetMM; ui.tzOffsetMM = mm; mCurrTab = ui.Configuration->currentIndex(); ui.logopt->setVisible(false); // irrelevant for gui, but needed for syntax checking connect(ui.pushButton_OK, SIGNAL(clicked()), this , SLOT(okPressed())); connect(ui.pushButton_Cancel, SIGNAL(clicked()), this , SLOT(cancelPressed())); connect(ui.autoMountBrowseButton, SIGNAL(clicked()), this, SLOT(autoMountBrowsePressed())); connect(ui.autoScsiMountCheck, SIGNAL(stateChanged(int)), this, SLOT(autoScsiMountChanged())); connect(ui.cpuPrioSlider, SIGNAL(valueChanged(int)), this, SLOT(cpuPrioChanged(int)) ); connect(ui.devPrioSlider, SIGNAL(valueChanged(int)), this, SLOT(devPrioChanged(int)) ); connect(ui.hercPrioSlider, SIGNAL(valueChanged(int)), this, SLOT(hercPrioChanged(int)) ); connect(ui.todPrioSlider, SIGNAL(valueChanged(int)), this, SLOT(todPrioChanged(int)) ); connect(ui.ecpSvm, SIGNAL(stateChanged(int)), this, SLOT(ecpSvmChanged(int)) ); connect(ui.httpPortCheckBox, SIGNAL(stateChanged(int)), this, SLOT(httpPortChanged(int))); connect(ui.httpRootBrowseButton, SIGNAL(clicked()), this, SLOT(httpRootBrowsePressed())); connect(ui.modPathButton, SIGNAL(clicked()), this, SLOT(modPathBrowsePressed())); connect(ui.Configuration, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int))); connect(mFreeEdit, SIGNAL(blockCountChanged(int)), this, SLOT(blockCountChangedSlot())); } void Configuration::resizeEvent(QResizeEvent *event) { QDialog::resizeEvent(event); // move buttons int newY = qMax (530, size().height() - 47); int newX = qMax ( 430, size().width() - 102); ui.pushButton_OK->move(newX,newY); ui.pushButton_Cancel->move(newX-100,newY); // resize QTabWidget int newHeight = qMax ( size().height() - 86 , 491 ); int newWidth = qMax ( size().width() - 41, 691 ); ui.Configuration->resize( newWidth, newHeight ); // resize plainTextEdit newHeight = qMax ( size().height() - 164, 411); newWidth = qMax ( size().width() - 61, 671); mFreeEdit->resize( newWidth, newHeight); } void Configuration::populate(ConfigurationEditor::Direction dir) { if (mConfigFile == NULL || mNewConfig) { ui.fileNameLabel->setText("(new file)"); ui.fileNameLabel_2->setText("(new file)"); ui.fileNameLabel_3->setText("(new file)"); ui.fileNameLabel_4->setText("(new file)"); ui.fileNameLabel_5->setText("(new file)"); ui.fileNameLabel_6->setText("(new file)"); ui.fileNameLabel_7->setText("(new file)"); } else { ui.fileNameLabel->setText(mConfigFile->getFileName().c_str()); ui.fileNameLabel_2->setText(mConfigFile->getFileName().c_str()); ui.fileNameLabel_3->setText(mConfigFile->getFileName().c_str()); ui.fileNameLabel_4->setText(mConfigFile->getFileName().c_str()); ui.fileNameLabel_5->setText(mConfigFile->getFileName().c_str()); ui.fileNameLabel_6->setText(mConfigFile->getFileName().c_str()); ui.fileNameLabel_7->setText(mConfigFile->getFileName().c_str()); } for (int i=0; mConfigTable[i].keyword.compare("") != 0 ; i++) { outDebug(5,std::cout << "populate:" << mConfigTable[i].keyword << std::endl;) const ConfigLine * configLine = mConfigFile->locateLine(mConfigTable[i].keyword, true, true); mConfigTable[i].populator(&ui, configLine, dir); } } void Configuration::handleHighlight(const ConfigLine& configLine, QTextCursor& cursor, QTextCharFormat& format) { if (configLine.inError()) format.setForeground(Qt::red); else format.setForeground(Qt::black); cursor.setCharFormat(format); mFreeEdit->setTextCursor(cursor); } void Configuration::okPressed() { if (ui.Configuration->currentIndex() == 6) ui.Configuration->setCurrentIndex(0); populate(ConfigurationEditor::fromScreen); if (mNewConfig) { mParent->connect(this,SIGNAL(OKSignal()), mParent, SLOT(saveConfigAs())); emit OKSignal(); disconnect(this,0,0,0); } deleteLater(); } void Configuration::cancelPressed() { disconnect(this,0,0,0); deleteLater(); } void Configuration::autoScsiMountChanged() { ui.autoScisiSecSpin->setEnabled(ui.autoScsiMountCheck->isChecked()); } void Configuration::cpuPrioChanged(int newValue) { ui.cpuPrioNumber->display(newValue); } void Configuration::devPrioChanged(int newValue) { ui.devPrioNumber->display(newValue); } void Configuration::ecpSvmChanged(int newValue) { if (newValue == Qt::Checked) { ui.ecpSvmSpin->setEnabled(true); } else { ui.ecpSvmSpin->setEnabled(false); } } void Configuration::httpPortChanged(int newValue) { if (newValue == Qt::Checked) { ui.httpPortSpin->setEnabled(true); } else { ui.httpPortSpin->setValue(0); ui.httpPortSpin->setEnabled(false); } } void Configuration::hercPrioChanged(int newValue) { ui.hercPrioNumber->display(newValue); } void Configuration::todPrioChanged(int newValue) { ui.clockPrioNumber->display(newValue); } void Configuration::autoMountBrowsePressed() { std::string s = QFileDialog::getExistingDirectory(this,"Browse Auto Mount Directory","").toStdString(); ui.autoMountDir->setText(s.c_str()); } void Configuration::httpRootBrowsePressed() { std::string s = QFileDialog::getExistingDirectory(this,"Browse HTTP Root Directory",ui.httpRootDir->text()).toStdString(); ui.httpRootDir->setText(s.c_str()); } void Configuration::modPathBrowsePressed() { std::string s = QFileDialog::getExistingDirectory(this,"Browse Modules Path Directory",ui.modPathButton->text()).toStdString(); ui.modPath->setText(s.c_str()); } void Configuration::tabChanged(int newTab) { if (newTab == 6) { //populate configtab with data from first 5 tabs mConfigFile->appendNewLines(); populate(ConfigurationEditor::fromScreen); //build free editor data mFreeEdit->document()->clear(); QTextCursor cursor = mFreeEdit->textCursor(); QTextCharFormat format = cursor.charFormat(); format.setFont(QFont(Preferences::getInstance().fontName(Preferences::ConfigurationFontObject).c_str(), Preferences::getInstance().fontSize(Preferences::ConfigurationFontObject))); cursor.setCharFormat(format); mFreeEdit->setTextCursor(cursor); for (int i=0; i<=mConfigFile->getLastSys(); i++) { SystemConfigLine * configLine = (*mConfigFile)[i]; if (!configLine->isNew()) mFreeEdit->textCursor().insertText(configLine->getLine().c_str()); configLine->setUpdated(false); hOutDebug(5,"sys:" << i << configLine->getLine().c_str()); } for (int i=mConfigFile->getLastSys()+1; isize(); i++) { const DeviceConfigLine * configLine = mConfigFile->getDevice(i); mFreeEdit->textCursor().insertText(configLine->getLine().c_str()); hOutDebug(5,"dev:" << i << configLine->getLine().c_str()); } cursor = mFreeEdit->textCursor(); cursor.setPosition(0); mFreeEdit->setTextCursor(cursor); } else if (mCurrTab == 6) { //reconstruct configuration table from editor data mConfigFile->updateEditor(*mFreeEdit); mDevWgt->update(mConfigFile); //populate first 5 tabs with data from table populate(ConfigurationEditor::toScreen); } mCurrTab = newTab; } Configuration::DoubleDigitSpinBox::DoubleDigitSpinBox(QWidget * parent, bool appendPlus): QSpinBox(parent) { mAppendPlus = appendPlus; } int Configuration::DoubleDigitSpinBox::valueFromText(const QString& text) const { return QSpinBox::valueFromText(text); } QString Configuration::DoubleDigitSpinBox::textFromValue(int value) const { std::stringstream ss; int sig=1; int pValue=value; if (value < 0) { sig = -1; pValue = -value; } ss << pValue; QString ret = ss.str().c_str(); if (pValue < 10) ret = "0" + ret; if (sig == -1) ret = "-" + ret; if (mAppendPlus && sig != -1) ret = "+" + ret; outDebug(5,std::cout << "textFromValue:" << value << "='" << ret.toStdString() << std::endl;) return ret; } Configuration::HexSpinBox::HexSpinBox(QWidget * parent): QSpinBox(parent) { this->setMaximum(0xffff); } int Configuration::HexSpinBox::valueFromText(const QString& text) const { hOutDebug(5,"ValueFromText:" << text.toStdString() << ConfigurationEditor::parseNum(text.toStdString(),16) ); return ConfigurationEditor::parseNum(text.toStdString(),16); } QString Configuration::HexSpinBox::textFromValue(int value) const { std::stringstream ss; ss << std::hex << value; char formatted[5]; if (value <= 0xffff) sprintf(formatted,"%4.4X",(value)); else strcpy(formatted,"0000"); QString ret(formatted); outDebug(5,std::cout << "textFromValue:" << value << "='" << ret.toStdString() << std::endl;) return ret; } void Configuration::blockCountChangedSlot() { int mLastSys=-1; for (QTextBlock block = mFreeEdit->document()->begin(); block != mFreeEdit->document()->end(); block = block.next()) { mLastSys++; std::string str = block.text().toAscii().data(); int skipSpace = str.find_first_not_of(" "); if (skipSpace < 0 || str[skipSpace] == '#') continue; if (str[skipSpace] >= '0' && str[skipSpace] <= '9') break; } hOutDebug(5,"lastSys=" << mLastSys); } QValidator::State Configuration::HexSpinBox::validate (QString & input, int &) const { if (input.length() > 4 || input.toStdString().find_first_not_of("0123456789ABCDEFabcdef") != std::string::npos) return QValidator::Invalid; else return QValidator::Acceptable; } ConfigHighlight::ConfigHighlight(QWidget * parent) : QSyntaxHighlighter(parent) { mDummyUi.setupUi(&mDummyConfig); mDummyConfig.setVisible(false); mRed = QColor(255,0,0,255); mGreen = QColor(0,96,0,255); mBlue = QColor(0,0,255,255); mBlack = QColor(64,64,64,255); mGray = QColor(128,32,32,255); } void ConfigHighlight::highlightBlock(const QString &text) { hOutDebug(3,"Highlight:" << text.toStdString()); if (text.length() == 0) return; if (previousBlockState() == 2) { setCurrentBlockState(2); } else { std::string str = text.toAscii().data(); int skipSpace = str.find_first_not_of(" "); if (skipSpace >= 0 && str[skipSpace] != '#') { if (str[skipSpace] >= '0' && str[skipSpace] <= '9') setCurrentBlockState(2); else setCurrentBlockState(1); } } if (currentBlockState() == 2) { setFormat(0,text.length(),mBlue); return; } int remarkCol = text.indexOf("#"); ConfigLine configLine(text.toAscii().data()); int i=0; std::string tokenToSearch = configLine.getUppercaseToken(0); while (Configuration::mConfigTable[i].keyword.length() != 0 && Configuration::mConfigTable[i].keyword.compare(tokenToSearch) != 0) { i++; } if (Configuration::mConfigTable[i].keyword.length() != 0 && Configuration::mConfigTable[i].keyword.compare(tokenToSearch) == 0) { Configuration::mConfigTable[i].populator(&mDummyUi, &configLine, ConfigurationEditor::toScreen); int startCol = configLine.getAbsoluteTokenColumn(0); int endCol = configLine.getAbsoluteTokenColumn(1); setFormat(startCol,endCol-startCol+1,mBlue); if (configLine.size() > 0) { int lastToken = configLine.size(); startCol = configLine.getAbsoluteTokenColumn(1); endCol = configLine.getAbsoluteTokenColumn(lastToken-1) + configLine.getAbsoluteTokenEnd(lastToken-1); setFormat(startCol,endCol-startCol+1,mGray); } if (configLine.inError()) { setFormat(configLine.errorColumn(),configLine.getLine().size()-configLine.errorColumn(),mRed); } if (remarkCol != -1) { setFormat(remarkCol,configLine.getLine().size()-remarkCol,mGreen); } } else { if (configLine.isRemark()) { setFormat(0,configLine.getLine().size(),mGreen); } else { setFormat(0,configLine.getLine().size(),mRed); if (remarkCol != -1) { setFormat(remarkCol,configLine.getLine().size()-remarkCol,mGreen); } } } } HerculesStudio/HercConfiguration/ConfigFile.h0000664000175000017500000000601412065055226020661 0ustar yakovyakov/* * File: ConfigFile.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: ConfigFile.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages the configuration file * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef CONFIG_FILE #define CONFIG_FILE #include "SystemConfigLine.h" #include "DeviceConfigLine.h" #include #include #include #include typedef std::vector FileArray; #define MAX_CONFIG_LINE 512 struct SynonymTableEntry { std::string keyword1; std::string keyword2; }; class ConfigFile { public: ConfigFile(const std::string& fileName); virtual ~ConfigFile(); void initialize(); void updateEditor(QPlainTextEdit& document); const std::string& getFileName() const; SystemConfigLine * operator[] (int index) const; DeviceConfigLine * getDevice(int index) const; DeviceConfigLine * getDevice(const std::string& devno) const; DeviceConfigLine * findFirstDeviceByType(const char * type) const; int numberOfDevices(); bool write(const std::string& fileName); bool write(); int size() const; void addNonDev(SystemConfigLine * configLine); void addDev(DeviceConfigLine * configLine); void appendNewLines(); const ConfigLine * locateLine(const std::string& keyword, bool create=false, bool synonyms=true); void deleteLine(int index); inline int getLastSys() { return mLastSys; }; bool changed(); inline bool isNew() const {return mNewConfig;}; void setNew(bool newVal); private: enum BuildType { File=1, TextEdit }; std::string mFileName; FileArray mFileArray; std::vector mNewLines; std::vector mNewDeviceLines; static struct SynonymTableEntry mSynonyms[]; FILE * mFile; QPlainTextEdit * mEditor; QTextBlock mEditorIterator; int mLastSys; // last line before device statements bool mChanged; // updates were done to file which were not saved yet bool mNewConfig; // never saved static const char *configTemplate[]; // template for new config file int templateCounter; // line number to read from template void openTemplate(); char * getNextLine(char * buff, int len, BuildType type); void buildConfig(BuildType); }; #endif HerculesStudio/HercConfiguration/Devices.ui0000664000175000017500000000062012065055226020421 0ustar yakovyakov DevicesClass 0 0 212 553 Devices HerculesStudio/HercConfiguration/GenericDeviceProperties.h0000664000175000017500000000334112065055226023425 0ustar yakovyakov/* * File: GenericDeviceProperties.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: GenericDeviceProperties.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This is the base class for all devices properties dialogs * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef GENERICDEVICEPROPERTIES_H_ #define GENERICDEVICEPROPERTIES_H_ #include "DeviceConfigLine.h" #include "DeviceTypes.h" #include #include class GenericDeviceProperties : public QDialog { Q_OBJECT public: GenericDeviceProperties(ConfigLine& line, QWidget *parent); virtual ~GenericDeviceProperties(); static GenericDeviceProperties * classFactory(DeviceConfigLine& line, QWidget *parent, DeviceTypes::Type type=DeviceTypes::Other); protected: ConfigLine & mLine; QWidget * mParent; bool deviceNumberValidator(QLineEdit * deviceLine); bool ipValidator(QLineEdit * ipLineEdit, bool allowNull); int mOriginalDeviceNumber; private slots: virtual void ok()=0; virtual void cancel()=0; signals: void updateLine(bool keep); }; #endif /* GENERICDEVICEPROPERTIES_H_ */ HerculesStudio/HercConfiguration/DeviceConfigView.cpp0000664000175000017500000000223712065055226022372 0ustar yakovyakov/* * File: DeviceConfigView.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DeviceConfigView.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "DeviceConfigView.h" #include DeviceConfigView::DeviceConfigView(QWidget * parent) :QTableView(parent) { } DeviceConfigView::~DeviceConfigView() { } void DeviceConfigView::mousePressEvent ( QMouseEvent * event ) { QTableView::mousePressEvent(event); emit deviceClick(event); } HerculesStudio/HercConfiguration/CtcProperties.ui0000664000175000017500000002245212065055226021634 0ustar yakovyakov CtcPropertiesClass 0 0 474 575 CtcProperties 20 50 431 61 CTC true 320 20 81 24 LCS CTCI CTCT QETH 10 20 101 19 Device Number 120 20 61 25 226 20 81 20 Device Type 20 140 431 401 Parameters 110 20 113 26 000.000.000.000; 20 30 53 16 Guest IP 20 70 53 16 Host IP 110 60 113 26 000.000.000.000; 240 30 31 16 Mask 290 20 113 26 000.000.000.000; 20 150 53 16 MAC 110 140 171 26 hh:hh:hh:hh:hh:hh; 300 140 53 16 (optional) 110 100 301 26 20 110 81 16 Tunnel Device 20 190 91 16 OAT File Name 110 180 211 26 330 180 21 26 ... 240 70 61 16 Host Port 320 60 61 26 1024 65535 30880 110 240 71 26 1024 65535 30880 20 250 81 16 Local Port 320 350 80 26 Update 20 350 80 26 Cancel 20 290 71 16 Buffer Size 110 280 71 26 256 65535 1500 250 110 141 24 tun0 device HerculesStudio/HercConfiguration/NewReaderFile.h0000664000175000017500000000264312065055226021334 0ustar yakovyakov/* * File: NewReaderFile * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: NewReaderFile.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef NEWREADERFILE_H_ #define NEWREADERFILE_H_ #include #include #include #include class NewReaderFile : public QDialog { Q_OBJECT public: NewReaderFile(QWidget * parent = 0); virtual ~NewReaderFile(); private: QLabel mLabel; QLineEdit mFileName; QPushButton mBrowseButton; QPushButton mOKButton; QPushButton mCancelButton; void initialize(); private slots: void doCancel(); void doOK(); void doBrowse(); signals: void okPressed(QString&); }; #endif /* NEWREADERFILE_H_ */ HerculesStudio/HercConfiguration/ConfigLine.h0000664000175000017500000000503612065055226020674 0ustar yakovyakov/* * File: ConfigLine.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: ConfigLine.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages one line of the configuration file * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef CONFIGLINE_H #define CONFIGLINE_H #include #include #include typedef std::pair TokenPair; class ConfigLine { public: ConfigLine(const char *line); virtual ~ConfigLine(); void replaceLine(const std::string& newLine); void replaceParameters(const std::string& newParm); void setDeleted(bool parm); const std::string& getLine() const; inline bool isRemark() const { return mRemark; } inline bool isDeleted() const { return mDeleted; } inline bool isNew() const { return mNew; } inline bool isUpdated() const { return mUpdated; } inline bool inError() const { return mInError; } inline int errorColumn() const { return mErrorColumn; } inline void setNew(bool newVal) { mNew=newVal; } ; inline void setUpdated(bool updated) { mUpdated=updated; } ; inline void setInError(int column) const { mInError=true; mErrorColumn=column; } inline void setNoError() const { mInError=false; mErrorColumn=-1; } std::string getToken(int i) const; std::string getLowercaseToken(int i) const; std::string getUppercaseToken(int i) const; int getAbsoluteTokenColumn(int i) const; int getAbsoluteTokenEnd(int i) const; std::string getMultiToken(int from, int to) const; inline int size() const {return mSize;} void parseLine(); protected: std::string mLine; private: bool mRemark; bool mDeleted; bool mUpdated; bool mNew; int mSize; mutable bool mInError; mutable int mErrorColumn; std::string::size_type mKeyStart; std::string mKeyword; std::vector mTokens; void tokenize(const std::string& delimiters = " "); }; #endif // #ifdef CONFIGLINE_H HerculesStudio/HercConfiguration/SystemConfigLine.cpp0000664000175000017500000000215412065055226022432 0ustar yakovyakov/* * File: SystemConfigLine.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: SystemConfigLine.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "SystemConfigLine.h" #include "HerculesStudio.h" SystemConfigLine::SystemConfigLine(const char *line) : ConfigLine(line) { } SystemConfigLine::~SystemConfigLine() { } std::string SystemConfigLine::getKeyword() const { return getToken(0); } HerculesStudio/HercConfiguration/DasdProperties.ui0000664000175000017500000002717012065055226022000 0ustar yakovyakov DasdPropertiesClass 0 0 474 578 DasdProperties 20 20 431 61 DASD true 320 20 81 24 5 2305 2311 2314 3330 3340 3350 3375 3380 3390 9345 3310 3370 9332 9335 9336 0671 10 20 101 19 Device Number 120 20 61 25 230 20 81 20 Device Type 20 110 431 391 Parameters 20 30 151 80 Image 20 20 111 22 Local file true 20 50 121 22 INET Address 110 150 261 26 20 160 71 16 File Name 380 150 31 26 ... 380 190 31 26 ... 110 190 261 26 20 200 81 16 Shadow File 20 230 241 22 Non-synchroneus I/O 20 260 191 111 I/O Mode 10 20 171 22 Standard R/W I/O true 10 50 171 22 Read-only I/O 10 80 161 22 Fake writes 314 290 91 26 0 true (default) 2841 2314 3880 3990 3990-3 3990-6 9343 220 270 201 20 Override Default Control Unit: 290 30 113 26 HHH.HHH.HHH.HHH; 340 70 61 26 1 65536 3990 340 110 61 26 65535 190 40 81 16 Remote Host 190 80 71 16 Port 190 120 141 16 Relative Device Number 370 530 80 26 Update 20 530 80 26 Cancel HerculesStudio/HercConfiguration/DevicesWidget.cpp0000664000175000017500000001377412065055226021750 0ustar yakovyakov/* * File: DevicesWidget.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DevicesWidget.cpp 162 2012-12-13 14:31:56Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "DevicesWidget.h" #include "Configuration.h" #include "DeviceConfigLine.h" #include "GenericDeviceProperties.h" #include "Environment.h" #include #include #include #include #include DevicesWidget::DevicesWidget(ConfigFile * configFile, QWidget * parent) : DeviceMenuProcessor(parent) , mConfigFile(configFile), mConfigView() { mConfigView = new DeviceConfigView(this); mConfigView->setAutoScroll(false); mConfigView->setGeometry(0,0, 680,420); mConfigView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); QString iconPath = Environment::getIconsPath().c_str(); mCardIcon = new QIcon(iconPath + "/card.jpg"); mConsoleIcon = new QIcon(iconPath + "/card.jpg"); mDasdIcon = new QIcon(iconPath + "/dasd.jpg"); mNetIcon = new QIcon(iconPath + "/net.jpg"); mPrinterIcon = new QIcon(iconPath + "/printer.jpg"); mTapeIcon = new QIcon(iconPath + "/tape.jpg"); mTerminalIcon = new QIcon(iconPath + "/terminal.jpg"); mUnknownIcon = new QIcon(iconPath + "/unknown.jpg"); initialize(); QPushButton * okButton = new QPushButton(this); okButton->setText("OK"); okButton->move(10,630); QPushButton * cancelButton = new QPushButton(this); cancelButton->setText("Cancel"); cancelButton->move(710,630); mConfigView->setVisible(true); connect(mConfigView, SIGNAL(pressed(QModelIndex)),this,SLOT(mousePressed(QModelIndex))); connect(mConfigView, SIGNAL(deviceClick(QMouseEvent *)),this,SLOT(devicesClick(QMouseEvent *))); } DevicesWidget::~DevicesWidget() { } void DevicesWidget::update(ConfigFile *configFile) { mConfigFile = configFile; initialize(); } void DevicesWidget::mousePressed(const QModelIndex index) { hOutDebug(3, "widget mouse pressed " << index.row()) mClickRow = index.row(); } bool DevicesWidget::realDevice() { return (mClickRow >=0 && isRealDev(mClickRow)); } bool DevicesWidget::canAddSYSG() { return (mConfigFile->findFirstDeviceByType("SYSG") == NULL); } DeviceTypes::Type DevicesWidget::getType(int lineNumber) { hOutDebug(3, "getType " << lineNumber << " " << mLastClick << std::endl); DeviceConfigLine * line = mConfigFile->getDevice(mDialogToFile[lineNumber]); return line->getDeviceType(); } void DevicesWidget::menuDelete() { outDebug(5, std::cout << "delete " << mLastClick << std::endl); mConfigFile->deleteLine(mDialogToFile[mLastClick]); initialize(); } void DevicesWidget::menuProperties() { hOutDebug(3, "properties " << mLastClick); mCandidateLine = mConfigFile->getDevice(mDialogToFile[mLastClick]); mCandidateLine->setNew(false); GenericDeviceProperties * mProp = NULL; try { mProp = GenericDeviceProperties::classFactory(*mCandidateLine, this); } catch (hsException e) { std::string msg = e.what(); QMessageBox::critical(this, "Invalid Device Line", msg.c_str() , QMessageBox::Ok); } catch (...) { outDebug(2, std::cout << "exception caught in class factory (properties) " << std::endl); } if (mProp != NULL) { connect(mProp, SIGNAL(updateLine(bool)), this, SLOT(updateDevice(bool))); mProp->setVisible(true); } } void DevicesWidget::doAddDevice(bool keep) { outDebug(5, std::cout << "Update Line " << std::endl); std::stringstream newLine; newLine << ConfigurationEditor::normalizeNum(mCandidateLine->getToken(0),4,16); newLine << " " << mCandidateLine->getMultiToken(1,0) << "\n"; mCandidateLine->replaceLine(newLine.str()); if (mCandidateLine != NULL) { if (keep && mCandidateLine->isNew()) mConfigFile->addDev(mCandidateLine); mCandidateLine = NULL; } initialize(); } bool DevicesWidget::isUnique(std::string devno) { return (mConfigFile->getDevice(devno) == NULL); } void DevicesWidget::initialize() { int lastSys = mConfigFile->getLastSys(); QStandardItemModel * model = new QStandardItemModel(0,1); model->clear(); QStringList labels = (QStringList() << "Device"); model->setHorizontalHeaderLabels(labels); QStandardItem *parentItem = model->invisibleRootItem(); mDialogToFile.clear(); outDebug(5, std::cout << "DeviceDlg::initilize from " <size() << std::endl); int lineNum=-1; for (int i=lastSys+1; isize(); i++) { const DeviceConfigLine * line = mConfigFile->getDevice(i); outDebug(5,std::cout <<"line=" << line->getLine() << line->isRemark() << std::endl); if (line->isRemark()) continue; std::string strLine = line->getToken(0); strLine.resize(10,' '); strLine += line->getToken(1).c_str(); strLine.resize(20,' '); strLine += line->getMultiToken(2,0).c_str(); strLine.resize(133,' '); QStandardItem * item = new QStandardItem(strLine.c_str()); item->setIcon(DeviceTypes::instance().getIcon(line->getDeviceType())); parentItem->appendRow(item); ++lineNum; mDialogToFile[lineNum] = i; } mConfigView->setModel(model); mConfigView->setColumnWidth(0,800); QFont font("Mono", 10); mConfigView->setFont(font); for (int i=0; irowCount(); i++) mConfigView->setRowHeight(i,18); mConfigView->setGridStyle(Qt::NoPen); mConfigView->setEditTriggers(QAbstractItemView::NoEditTriggers); } void DevicesWidget::updateDevice(bool done) { if (!done || mCandidateLine == NULL) { mClickRow = -1; return; } initialize(); mClickRow = -1; } HerculesStudio/HercConfiguration/VisualizedDeviceEntry.h0000664000175000017500000000425112065055226023136 0ustar yakovyakov/* * File: VisualizedDeviceEntry.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: VisualizedDeviceEntry.h 164 2012-12-14 09:27:52Z dekeljacob $ * * This is the base class for all configuration device entries * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DEVICEENTRY_H_ #define DEVICEENTRY_H_ #include "DeviceTypes.h" #include #include #include #include class VisualizedDeviceEntry { public: VisualizedDeviceEntry(int number, DeviceTypes::Type type, const std::string& definition); VisualizedDeviceEntry(); virtual ~VisualizedDeviceEntry(); inline int getDeviceNumber(){ return mNumber; } inline int getLineNumber(){ return mLine; } inline DeviceTypes::Type getType() { return mType; } inline QPixmap * getPixmap() { return mPixmap; } inline QIcon * getIcon() { return mIcon; } inline QStandardItem * getItem() { return mItem; } inline std::string getDefinition() { return mDefinition; } inline bool traced() { return mTraced; } inline void setLineNumber(int lineNumber) { mLine = lineNumber; } inline void setPixmap(QPixmap * w) { mPixmap=w; } inline void setIcon(QIcon * w) { mIcon=w; } inline void setItem(QStandardItem * w) { mItem=w; } inline void setTraced(bool traced) { mTraced = traced; } private: int mNumber; int mLine; DeviceTypes::Type mType; std::string mDefinition; QPixmap * mPixmap; QIcon * mIcon; QStandardItem * mItem; bool mTraced; }; #endif /* DEVICEENTRY_H_ */ HerculesStudio/HercConfiguration/TerminalProperties.cpp0000664000175000017500000000565012065055226023044 0ustar yakovyakov/* * File: TerminalProperties.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: TerminalProperties.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "TerminalProperties.h" #include "ConfigLine.h" #include TerminalProperties::TerminalProperties(ConfigLine & line, QWidget *parent) : GenericDeviceProperties(line, parent) { ui.setupUi(this); if (!line.isNew()) { ui.deviceNumber->setText(mLine.getToken(0).c_str()); ui.terminalCombo->setCurrentIndex( (mLine.getToken(1) == "3287") ? 1 : 0); if (mLine.size() > 2) { int index = 2; if (mLine.getToken(index).compare("SYSGCONS") == 0) index++; if (mLine.getToken(index)[0] == '*') index++; else ui.groupName->setText(mLine.getToken(index++).c_str()); if (mLine.size() >= index) ui.IPAddress->setText(mLine.getToken(index).c_str()); } } connect(ui.OKButton, SIGNAL(clicked()), this, SLOT(ok())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancel())); } TerminalProperties::~TerminalProperties() { } void TerminalProperties::ok() { if (!deviceNumberValidator(ui.deviceNumber)) return; std::stringstream newLineBuff; std::string ip; if (ui.IPAddress->text().toStdString() == "...") // no address ip = ""; else { if (!ipValidator(ui.IPAddress,false)) return; ip = ui.IPAddress->text().toStdString(); } std::string sysgText; if (isSysg()) sysgText = "SYSGCONS "; newLineBuff << ui.deviceNumber->text().toStdString() << " " << ui.terminalCombo->currentText().toStdString() << " " << sysgText; if (ui.groupName->text().length() == 0) { newLineBuff << " *"; } else { newLineBuff << " " << ui.groupName->text().toStdString(); } newLineBuff << " " << ip + "\n"; outDebug(3, std::cout << "terminal: new line:" << newLineBuff.str() << " " << &mLine << std::endl); mLine.replaceLine(newLineBuff.str()); emit updateLine(true); this->deleteLater(); } bool TerminalProperties::isSysg() { return false; } void TerminalProperties::cancel() { emit updateLine(false); this->deleteLater(); } HerculesStudio/HercConfiguration/ReaderFileListView.cpp0000664000175000017500000000315012065055226022676 0ustar yakovyakov/* * File: ReaderFileListView.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: ReaderFileListView.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "ReaderFileListView.h" #include "CardReaderProperties.h" #include #include ReaderFileListView::ReaderFileListView(QWidget * parent ) : QListView(parent) { } ReaderFileListView::~ReaderFileListView() { } void ReaderFileListView::setReaderParent(QWidget * parent) { mReaderParent = parent; } void ReaderFileListView::dropEvent ( QDropEvent * event ) { QListView::dropEvent(event); if (event->isAccepted()) { CardReaderProperties * parent = NULL; try { parent = static_cast(mReaderParent); } catch (...){} if (parent != NULL) { parent->shouldBeDeleted(); } } } HerculesStudio/HercConfiguration/PunchProperties.cpp0000664000175000017500000000752112065055226022345 0ustar yakovyakov/* * File: PunchProperties.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: PunchProperties.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "PunchProperties.h" #include #include PunchProperties::PunchProperties(ConfigLine& line, QWidget *parent) : GenericDeviceProperties(line, parent) { ui.setupUi(this); ui.fileName->setValidator(new PunchFileNameValidator(this)); if (!line.isNew()) { ui.deviceNumber->setText(mLine.getToken(0).c_str()); ui.punchCombo->setCurrentIndex( 0 ); if (mLine.size() > 2) { ui.fileName->setText(mLine.getToken(2).c_str()); ui.asciiCheckBox->setChecked(false); ui.crlfCheckBox->setChecked(false); ui.noclearCheckBox->setChecked(false); for (int i=3; i< mLine.size(); i++) { std::string token = (mLine.getToken(i)); std::transform(token.begin(), token.end(), token.begin(), ::tolower); if (token == "ascii") ui.asciiCheckBox->setChecked(true); if (token == "crlf") ui.crlfCheckBox->setChecked(true); if (token == "noclear") ui.noclearCheckBox->setChecked(true); } } else { ui.asciiCheckBox->setEnabled(false); ui.crlfCheckBox->setEnabled(false); ui.noclearCheckBox->setEnabled(false); } } connect(ui.OKButton, SIGNAL(clicked()), this, SLOT(ok())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancel())); } PunchProperties::~PunchProperties() { } void PunchProperties::ok() { if (!deviceNumberValidator(ui.deviceNumber)) return; std::stringstream newLineBuff; bool fileGiven = (ui.fileName->text().toStdString().length() > 0); newLineBuff << ui.deviceNumber->text().toStdString() << " " << ui.punchCombo->currentText().toStdString() << " " << ui.fileName->text().toStdString() << (fileGiven && ui.asciiCheckBox->isChecked() ? " ascii" : " ") << (fileGiven && ui.crlfCheckBox->isChecked() ? " crlf" : " ") << (fileGiven && ui.noclearCheckBox->isChecked() ? " noclear" : " ") << "\n"; outDebug(5, std::cout << "new line:" << newLineBuff.str() << std::endl); mLine.replaceLine(newLineBuff.str()); emit updateLine(true); this->deleteLater(); } void PunchProperties::cancel() { emit updateLine(false); this->deleteLater(); } void PunchProperties::setBoxesEnabled(bool enabled) { ui.asciiCheckBox->setEnabled(enabled); ui.crlfCheckBox->setEnabled(enabled); ui.noclearCheckBox->setEnabled(enabled); } PunchFileNameValidator::PunchFileNameValidator(QObject * parent) : QValidator(parent), mParent(dynamic_cast(parent)) { } QValidator::State PunchFileNameValidator::validate(QString & v, int & ) const { mParent->setBoxesEnabled(v.length()>0); return QValidator::Acceptable; } HerculesStudio/HercConfiguration/DasdProperties.h0000664000175000017500000000353212065055226021606 0ustar yakovyakov/* * File: DasdProperties.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DasdProperties.h 161 2012-12-13 06:47:20Z dekeljacob $ * * * This object handles the configuration of DASDs * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DASDPROPERTIES_H #define DASDPROPERTIES_H #include "ConfigLine.h" #include "GenericDeviceProperties.h" #include #include "ui_DasdProperties.h" typedef std::string stringArray[3]; class DasdProperties : public GenericDeviceProperties { Q_OBJECT public: DasdProperties(ConfigLine& configLine, QWidget *parent = 0); virtual ~DasdProperties(); private: Ui::DasdPropertiesClass ui; static std::string ckd[]; static std::string fba[]; void initialize(ConfigLine& line); bool isInet(const std::string& fileName, stringArray & vec); bool isFba(const std::string& dev); void setInet(bool set); void setLocal(bool set); void setFba(bool set); void setCkd(bool set); private slots: virtual void ok(); virtual void cancel(); void browseClicked(); void browseShadowClicked(); void typeChanged(const QString &); void localInetChanged(); }; #endif // DASDPROPERTIES_H HerculesStudio/HercStudio/helpabout.ui0000664000175000017500000001321312065100300017444 0ustar yakovyakov HelpAboutClass Qt::ApplicationModal 0 0 370 345 About 230 300 80 25 OK 90 230 67 60 1 180 230 48 48 1 40 100 241 18 Qt::AlignCenter 10 120 341 20 Qt::AlignCenter 40 160 291 51 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Cantarell'; font-size:10pt; font-weight:400; font-style:normal;"> <table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> <tr> <td style="border: none;"> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.hercules-390.eu"><span style=" font-family:'Sans Serif'; font-size:9pt; text-decoration: underline; color:#0000ff;">Hercules</span></a><span style=" font-family:'Liberation Sans'; font-size:9pt;"> is © Copyright 1999-2009 </span></p> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Liberation Sans'; font-size:9pt;">by Roger Bowler, Jan Jaeger, and others</span></p></td></tr></table></body></html> true 10 20 351 61 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Cantarell'; font-size:10pt; font-weight:400; font-style:normal;"> <table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> <tr> <td style="border: none;"> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:9pt;">Copyright © 2009-2013 Jacob Dekel</span></p> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">see </span><a href="http://hercstudio.sourceforge.net/"><span style=" font-family:'Sans Serif'; font-size:9pt; text-decoration: underline; color:#0000ff;">http://hercstudio.sourceforge.net/</span></a><span style=" font-family:'Sans Serif'; font-size:9pt;"> for details </span></p></td></tr></table></body></html> true HerculesStudio/HercStudio/Fonts.h0000664000175000017500000000234012065055266016407 0ustar yakovyakov/* * File: Fonts.h * * Author: Jacob Dekel * Created on: Aug 10, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Fonts.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object is a front-end to the framework fonts services * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef FONTS_H_ #define FONTS_H_ #include class Fonts { public: static Fonts& getInstance(); virtual ~Fonts(); QStringList& getList(); QString at(int index); int indexOf(const QString& fontName); private: Fonts(); static Fonts *mInstance; QStringList mFonts; }; #endif /* FONTS_H_ */ HerculesStudio/HercStudio/Preferences.cpp0000664000175000017500000005222112065055266020115 0ustar yakovyakov/* * File: Preferences.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 JacobJacob Dekel * $Id: Preferences.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Preferences.h" #include "HerculesStudio.h" #include "SystemUtils.h" #include "ConfigurationEditor.h" #include #include #include #include #include #include Preferences * Preferences::instance = NULL; const char * Preferences::sKeywords[] = { "HerculesDir", "ConfigurationDir", "LogsDir" , "LogTimeStamp", "RegsViews", "Version", "LogFont", "RegistersFont", "PswFont", "CommandFont", "MipgAsGauge", "PswMode", "SplitLog", "AutosaveLog", "Theme", "LogFileLines", "GreenLed", "Animate", "DarkBackground"}; const char * Preferences::sRegsViews[] = { "ViewGR32", "ViewCR32", "ViewFR32", "ViewAR32", "ViewGR64", "ViewCR64", "ViewFR64", "ViewPsw" }; #define PrefSet(FUNC,TOKEN) \ void Preferences::FUNC(const std::string& p) \ { \ mSettings->setValue(sKeywords[TOKEN], p.c_str()); \ } #define PrefSetInt(FUNC,TOKEN, TYPE) \ void Preferences::FUNC(const TYPE p) \ { \ mSettings->setValue(sKeywords[TOKEN], p); \ } #define PrefSetBool(FUNC,TOKEN) \ void Preferences::FUNC(const bool p) \ { \ mSettings->setValue(sKeywords[TOKEN], p); \ } #define Pref(FUNC,TOKEN) \ std::string Preferences::FUNC() const\ { \ return mSettings->value(sKeywords[TOKEN]).toString().toStdString(); \ } #define PrefInt(FUNC,TOKEN, TYPE) \ int Preferences::FUNC(void) const \ { \ return mSettings->value(sKeywords[TOKEN]).toInt(); \ } #define PrefBool(FUNC,TOKEN) \ bool Preferences::FUNC() const\ { \ return mSettings->value(sKeywords[TOKEN]).toBool(); \ } #define GenFontKey(KEY,TYPE) \ const char *key = fontObjectToString(fontObject); \ std::string fullKey = "fonts/"; \ fullKey += key; \ fullKey += TYPE; Preferences::Preferences() { mSettings = new QSettings("org.mvsdasd","HerculesStudio"); if (mSettings->value("version") != "1.4") { if (mSettings->value("version") != "1.3") { QString oldFile = QDir::homePath() + "/.config/HercStudio.pref"; if (SystemUtils::fileExists(oldFile)) { convert(); } else { // set default values setLogsDir(QDir::homePath().toStdString()+"/Desktop"); setPswMode(Psw::StatusBar); } mSettings->setValue(sKeywords[Version],"1.3"); } mSettings->setValue(sKeywords[GreenLed], false); mSettings->setValue(sKeywords[Animate], false); mSettings->setValue(sKeywords[DarkBackground], false); mSettings->setValue(sKeywords[Version],"1.4"); } if (logFileLines() <= 0) setLogFileLines(5000); if (this->fontName(ConfigurationFontObject).size() == 0) setFontName(ConfigurationFontObject,"Monospace"); } Preferences::~Preferences() { } Preferences& Preferences::getInstance() { if (instance == NULL) instance = new Preferences(); return *instance; } Pref(hercDir,HerculesDir) Pref(configDir_,ConfigurationDir) Pref(logsDir,LogsDir) PrefBool(logTimestamp,LogTimestamp) PrefBool(splitLog,SplitLog) PrefBool(autosaveLog, AutosaveLog) PrefBool(mipsAsGauge, MipsAsGauge) PrefInt(logFileLines, LogFileLines, int) PrefBool(greenLed, GreenLed) PrefBool(animate, Animate) PrefBool(darkBackground, DarkBackground) PrefSet(setHercDir,HerculesDir) PrefSet(setConfigDir,ConfigurationDir) PrefSet(setLogsDir,LogsDir) PrefSetInt(setPswMode, PswMode, Psw::PswMode) PrefSetBool(setLogTimestamp, LogTimestamp) PrefSetBool(setSplitLog, SplitLog) PrefSetBool(setAutosaveLog,AutosaveLog) PrefSetBool(setMipsAsGauge,MipsAsGauge) PrefSetInt(setLogFileLines,LogFileLines,int) PrefSetBool(setGreenLed, GreenLed) PrefSetBool(setAnimate, Animate) PrefSetBool(setDarkBackground, DarkBackground) std::string Preferences::configDir() const { if (mVolatileConfigDir =="") return configDir_(); else return mVolatileConfigDir; } void Preferences::setVolatileConfigDir(const std::string& configDir) { mVolatileConfigDir = configDir; } Psw::PswMode Preferences::pswMode() const { return static_cast((mSettings->value(sKeywords[PswMode]).toInt())); } void Preferences::setRegs(Views v, bool view) { std::string key = "registers/"; key += sRegsViews[v]; mSettings->setValue(key.c_str(),view); } bool Preferences::regs(Views v) const { std::string key = "registers/"; key += sRegsViews[v]; return mSettings->value(key.c_str()).toBool(); } void Preferences::setFontName(FontObject fontObject, const std::string& fontName) { GenFontKey(key,"/Name") mSettings->setValue(fullKey.c_str(),fontName.c_str()); } std::string Preferences::fontName(FontObject fontObject) const { GenFontKey(key,"/Name") return mSettings->value(fullKey.c_str()).toString().toStdString(); } void Preferences::setFontSize(FontObject fontObject, int fontSize) { GenFontKey(key,"/Size"); mSettings->setValue(fullKey.c_str(),fontSize); } int Preferences::fontSize(FontObject fontObject) const { GenFontKey(key,"/Size"); if (mSettings->contains(fullKey.c_str())) return mSettings->value(fullKey.c_str()).toInt(); else return 9; } void Preferences::setBold(FontObject fontObject, bool bold) { GenFontKey(key,"/Bold"); mSettings->setValue(fullKey.c_str(),bold); } bool Preferences::fontIsBold(FontObject fontObject) const { GenFontKey(key,"/Bold"); return mSettings->value(fullKey.c_str()).toBool(); } void Preferences::setItalic(FontObject fontObject, bool italic) { GenFontKey(key,"/Italic"); mSettings->setValue(fullKey.c_str(),italic); } bool Preferences::fontIsItalic(FontObject fontObject) const { GenFontKey(key,"/Italic"); return mSettings->value(fullKey.c_str()).toBool(); } const char * Preferences::fontObjectToString(FontObject fontObject) const { switch(fontObject) { case RegsFontObject: return "RegsFont"; break; case PswFontObject: return "PswFont"; break; case CommandFontObject: return "CommandFont"; break; case ConfigurationFontObject: return "ConfigurationFont"; break; default: return "LogFont"; break; } } // for backward compatibility void Preferences::write() { } Preferences::Themes Preferences::theme() const { switch (mSettings->value(sKeywords[Theme]).toInt()) { case 1: return Modern; break; default: return Classic; break; } } void Preferences::setTheme(Themes theme) { mSettings->setValue(sKeywords[Theme],theme); } void Preferences::convert() { hOutDebug(0,"converting old preferences"); Preferences_1_2_0& oldPreferences = Preferences_1_2_0::getInstance(); setHercDir(oldPreferences.hercDir()); setConfigDir(oldPreferences.configDir()); setLogsDir(oldPreferences.logsDir()); for (FontObject f=LogFontObject; f(f+1) ) { setFontName(f,oldPreferences.fontName(static_cast(f))); setFontSize(f,oldPreferences.fontSize(static_cast(f))); setBold(f,oldPreferences.fontIsBold(static_cast(f))); setItalic(f,oldPreferences.fontIsItalic(static_cast(f))); } setLogTimestamp(oldPreferences.logTimestamp()); setRegs(ViewGR32,oldPreferences.regs(Preferences_1_2_0::ViewGR32)); setRegs(ViewCR32,oldPreferences.regs(Preferences_1_2_0::ViewCR32)); setRegs(ViewFR32,oldPreferences.regs(Preferences_1_2_0::ViewFR32)); setRegs(ViewAR32,oldPreferences.regs(Preferences_1_2_0::ViewAR32)); setRegs(ViewGR64,oldPreferences.regs(Preferences_1_2_0::ViewGR64)); setRegs(ViewCR64,oldPreferences.regs(Preferences_1_2_0::ViewCR64)); setRegs(ViewFR64,oldPreferences.regs(Preferences_1_2_0::ViewFR64)); setRegs(ViewPsw,oldPreferences.regs(Preferences_1_2_0::ViewPsw)); setMipsAsGauge(oldPreferences.mipsAsGauge()); setPswMode(oldPreferences.pswMode()); setSplitLog(false); setAutosaveLog(oldPreferences.autosaveLog()); setTheme(Classic); setFontName(ConfigurationFontObject,"Mono"); } void Preferences::setHistory(QVector &history) { QList list; for (int i=0; isetValue(QString("History"),QVariant(list)); } void Preferences::getHistory(QVector &history) { QList list; list = mSettings->value("History").toList(); for (int i=0; i. * */ #ifndef RECOVERY_H #define RECOVERY_H #include #include "ui_Recovery.h" class Recovery : public QDialog { Q_OBJECT public: Recovery(QWidget *parent = 0); ~Recovery(); std::string getHerculesConf(); private: Ui::RecoveryClass ui; std::string mHerculesConf; std::string readHerculesConf(); public slots: void exit(); void recover(); void skip(); }; #endif // RECOVERY_H HerculesStudio/HercStudio/Watchdog.h0000664000175000017500000000242512065055266017062 0ustar yakovyakov/* * File: Watchdog.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Watchdog.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object is the watchdog for the hercules process * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef WATCHDOG_H_ #define WATCHDOG_H_ #include #include class Watchdog : public QThread { Q_OBJECT public: Watchdog(int herculesPid, bool child); Watchdog(QProcess * herculesProcess); virtual ~Watchdog(); virtual void run(); signals: void HerculesEnded(); private: int mHerculesPid; bool mChild; QProcess * mProcess; }; #endif /* WATCHDOG_H_ */ HerculesStudio/HercStudio/IplConfig.ui0000664000175000017500000000563212065055266017365 0ustar yakovyakov IplConfigClass 0 0 400 266 IplConfig 50 210 80 25 OK 270 210 80 25 Cancel 30 20 341 171 IPL Parameters 110 120 113 24 xxxxxxxx; 20 130 81 16 Load Parm 110 50 113 24 20 100 311 16 Specify Load Parm (up to 8 characters) 20 30 271 16 Select device to use for IPL 20 60 71 16 Ipl Device HerculesStudio/HercStudio/StringTokenizer.h0000664000175000017500000000400712065055266020461 0ustar yakovyakov/* * File: StringTokenizer.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: StringTokenizer.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object enables tokenizing a line of text by delimiters * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef STRINGTOKENIZER_H #define STRINGTOKENIZER_H #include #include namespace Tokenizer { typedef std::string::size_type handle; } class StringTokenizer { public: static inline std::string getFirstWord(const std::string& line, std::string::size_type &pos, std::string::size_type &lastPos, const std::string& delimiters) { lastPos = line.find_first_not_of(delimiters, 0); if (lastPos == std::string::npos) return (""); pos = line.find_first_of(delimiters, lastPos); if (pos == std::string::npos) return (line); return line.substr(lastPos, pos-lastPos); } static inline std::string getNextWord(const std::string& line, std::string::size_type &pos, std::string::size_type &lastPos, const std::string& delimiters) { lastPos = line.find_first_not_of(delimiters, pos); if (lastPos == std::string::npos) return (""); pos = line.find_first_of(delimiters, lastPos); if (pos == std::string::npos) pos=line.length(); return line.substr(lastPos, pos-lastPos); } }; #endif // STRINGTOKENIZER_H HerculesStudio/HercStudio/MainWindow.ui0000664000175000017500000004247412065055266017574 0ustar yakovyakov MainWindowClass 0 0 1000 750 Hercules Studio :/icons/tray.xpm:/icons/tray.xpm 0 0 1000 22 File Edit Command Utilities Help :/icons/16x16/iconOpen.png:/icons/16x16/iconOpen.png Open configuration... :/icons/16x16/iconEdit.png:/icons/16x16/iconEdit.png Edit configuration... :/icons/16x16/iconExit.png:/icons/16x16/iconExit.png Exit true true :/icons/16x16/iconControl.png:/icons/16x16/iconControl.png View Controls true true :/icons/yellowhigh.png:/icons/yellowhigh.png View Devices :/icons/16x16/iconPreferences.png:/icons/16x16/iconPreferences.png Preferences... :/icons/16x16/iconDeleteMessages.png:/icons/16x16/iconDeleteMessages.png Delete messages :/icons/16x16/iconSave.png:/icons/16x16/iconSave.png Save messages :/icons/16x16/iconPoweron.png:/icons/16x16/iconPoweron.png Power on :/icons/16x16/iconPoweroff.png:/icons/16x16/iconPoweroff.png Power off :/icons/16x16/iconIpl.png:/icons/16x16/iconIpl.png IPL/Load :/icons/16x16/iconStart.png:/icons/16x16/iconStart.png Start :/icons/16x16/iconStop.png:/icons/16x16/iconStop.png Stop :/icons/16x16/iconInterrupt.png:/icons/16x16/iconInterrupt.png Interrupt :/icons/16x16/iconStoreStatus.png:/icons/16x16/iconStoreStatus.png Store status :/icons/16x16/iconPswRestart.png:/icons/16x16/iconPswRestart.png PSW Restart Device Interrupt false Display/Alter storage Load reader Load tape Unload tape true :/icons/16x16/dasdinit.png:/icons/16x16/dasdinit.png Dasdinit... Dasdinit true :/icons/16x16/dasdconv.png:/icons/16x16/dasdconv.png Dasdconv... :/icons/16x16/dasdcopy.png:/icons/16x16/dasdcopy.png Dasdcopy... :/icons/16x16/dasdload.png:/icons/16x16/dasdload.png Dasdload... :/icons/16x16/dasdisup.png:/icons/16x16/dasdisup.png Dasdisup... :/icons/16x16/dasdls.png:/icons/16x16/dasdls.png Dasdls... :/icons/16x16/dasdcat.png:/icons/16x16/dasdcat.png Dasdcat... Dasdpdsu... Dmap2hrc... Cckdcdsk... Cckdcomp... Cckdswap... :/icons/tape.jpg:/icons/tape.jpg Tapemap... :/icons/tape.jpg:/icons/tape.jpg Tapesplit... :/icons/tape.jpg:/icons/tape.jpg Tapecopy... :/icons/het.gif:/icons/het.gif Hetinit... :/icons/het.gif:/icons/het.gif Hetmap... :/icons/het.gif:/icons/het.gif Hetupd... :/icons/het.gif:/icons/het.gif Hetget... :/icons/16x16/iconHelpAbout.png:/icons/16x16/iconHelpAbout.png About... true true :/icons/16x16/iconCommandLine.png:/icons/16x16/iconCommandLine.png View Command Line :/icons/16x16/iconNew.png:/icons/16x16/iconNew.png New... :/icons/16x16/iconSave.png:/icons/16x16/iconSave.png Save :/icons/16x16/iconsave-as.png:/icons/16x16/iconsave-as.png Save As... true View 32-bit Control Registers true View 32-bit General Registers true View 32-bit Floating-Point Registers true View 64-bit General Registers true View 64-bit Control Registers true View 64-bit Floating-Point Registers true View 32-bit Access Registers true View PSW HerculesStudio/HercStudio/NamedPipe.h0000664000175000017500000000352312065055266017164 0ustar yakovyakov/* * File: NamedPipe.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: NamedPipe.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages the pipe between hercules and hercules studio * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef NAMEDPIPE_H_ #define NAMEDPIPE_H_ #include #include #include #include class NamedPipe { public: static NamedPipe& getInstance(); virtual ~NamedPipe(); int recover(); void generatePid(int studioPid, int herculesPid); int getHerculesPid(); std::string getHerculesCommandline(); FILE * getHerculesStdin(); FILE * getHerculesCommandsFile(); FILE * getHerculesStdout(); QFile& getHerculesLogfile(); FILE * getHerculesStderr(); QFile& getHerculesStatus(); private: static NamedPipe sInstance; std::string mSetPath; std::string mFifo0; std::string mFifo1; std::string mFifo2; bool mRecovery; int mHerculesPid; int delDir(std::string& path); QMutex mMutex; FILE * mStdinOutput; FILE * mStdout; QFile * mStdoutInput; FILE * mStderr; QFile * mStderrInput; protected: NamedPipe(); }; #endif /* NAMEDPIPE_H_ */ HerculesStudio/HercStudio/MainPanelModern.cpp0000664000175000017500000001610012065055266020661 0ustar yakovyakov/* * File: MainPanelModern.cpp * * Author: Jacob Dekel * Created on: Oct 28, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: MainPanel.cpp 67 2010-09-13 14:06:31Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "MainPanelModern.h" #include "Environment.h" #include "PanelButton.h" #include "Preferences.h" #include "MipsLed.h" #include "MipsGauge.h" #include "ConfigurationEditor.h" #include "Preferences.h" #include MainPanelModern::MainPanelModern(QWidget *parent) : MainPanel(parent) { setupUi(parent); mLcd0 = new QLCDNumber(1,this); mLcd0->setVisible(false); mLcd1 = new QLCDNumber(1,this); mLcd1->setVisible(false); mLcd2 = new QLCDNumber(1,this); mLcd2->setVisible(false); mLcd3 = new QLCDNumber(1,this); mLcd3->setVisible(false); mStopped=true; doConnect(); } MainPanelModern::~MainPanelModern() { delete mMips; delete mYellowLow; delete mYellowHigh; } void MainPanelModern::setupUi(QWidget *) { const QColor black(70,70,70); const QColor white(255,255,20); QBrush blackBrush(black); QPalette blackPalette(white, black); this->setPalette(blackPalette); this->setAutoFillBackground(true); QString iconsPath = Environment::getIconsPath().c_str() ; hOutDebug(3,"icons path:'" << iconsPath.toStdString() << "'"); setButton(mPowerOnButton, QString("Power\nOn"), QIcon(iconsPath + "/modern/Play-icon.png")); setButton(mPowerOffButton, QString("Power\nOff"), QIcon(iconsPath + "/modern/Stop-icon.png")); setButton(mStopButton, QString("Stop"), QIcon(iconsPath + "/modern/Pause.png")); setButton(mInterruptButton, QString("Interrupt"), QIcon(iconsPath + "/modern/interrupt.png")); setButton(mLoadButton, QString("IPL\n(Boot)"), QIcon(iconsPath + "/modern/load.png")); mRestartButton = NULL; mStoreButton = NULL; mStartButton = NULL; mPowerOnButton->setToolTip("Power On"); mPowerOffButton->setToolTip("Power Off"); mInterruptButton->setToolTip("Interrupt"); mLoadButton->setToolTip("Load (IPL)"); mStopButton->setToolTip("Stop all CPUs"); QFont font; font.setPointSize(6); mPSW = new QLabel(this); QFont pswFont("Mono", 10); mPSW->setFont(pswFont); if (Preferences::getInstance().mipsAsGauge()) mMips = new MipsGauge(this); else mMips = new MipsLed(this); mMips->setActive(false); } void MainPanelModern::setButton(QToolButton*& button, QString text, QIcon icon) { button = new QToolButton(this); button->resize(60,70); button->setText(text); button->setIcon(icon); button->setStyleSheet("QToolButton {background: rgb(50,50,50); color: white; }"); button->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); } void MainPanelModern::resizeEvent(QResizeEvent * ) { int width = this->size().rwidth(); mPowerOnButton->move(10,20); mPowerOffButton->move(70,20); mStopButton->move(130,20); mInterruptButton->move(190,20); mLoadButton->move(250,20); mMips->move(320,20); mPSW->setGeometry(width-550,110,48*12,12); } void MainPanelModern::setDormant() { if (!mStopButton->text().contains("Stop", Qt::CaseSensitive)) { stopClickedSlot(); } mMips->setActive(false); } void MainPanelModern::standby() { mMips->setActive(true); const QColor black(50,50,50); const QColor white(255,255,255); QBrush blackBrush(black); QBrush whiteBrush(black); QPalette blackPalette(white, black); QPalette whitePalette(white, white); this->setPalette(whitePalette); this->setAutoFillBackground(true); this->repaint(); this->setPalette(blackPalette); } bool MainPanelModern::notify(const QByteArray& statusLine) { bool ret = true; if (statusLine.startsWith("MIPS=")) { double d = atof(statusLine.data()+5); if (d > mMipsHWM) { mMipsHWM = d; std::stringstream ss; ss << "High Water Mark:" << d; mMips->setToolTip(ss.str().c_str()); } mMips->display(d); } //3.07 :STATUS=CPU0000 PSW=00000000 00000000 0000000000000000 M....... instcount=0 else ret = false; return ret; } void MainPanelModern::switchMips() { bool updated = false; bool visible = mMips->isVisible(); if (Preferences::getInstance().mipsAsGauge()) { MipsLed * oldMips = dynamic_cast(mMips); if (oldMips != NULL) { Mips * gauge = new MipsGauge(this); mMips = gauge; mMips->setToolTip(oldMips->toolTip()); oldMips->deleteLater(); updated = true; } } else { MipsGauge * oldMips = dynamic_cast(mMips); if (oldMips != NULL) { Mips * lcd = new MipsLed(this); mMips = lcd; mMips->setToolTip(oldMips->toolTip()); oldMips->deleteLater(); updated = true; } } if (updated) { mMips->setActive(visible); int width = this->size().rwidth(); mMips->move(width-680,20); } } QSize MainPanelModern::sizeHint() const { return QSize(100, 100); } void MainPanelModern::stopClickedSlot() { if (!mMips->isVisible()) // actually: is hercules running return; if (mStopButton->text().contains("Stop", Qt::CaseSensitive)) { delete mStopButton; setButton(mStopButton, QString("Resume"), QIcon(QString(Environment::getIconsPath().c_str()) + "/modern/Resume.png")); mStopped=true; } else { delete mStopButton; setButton(mStopButton, QString("Stop"), QIcon(QString(Environment::getIconsPath().c_str()) + "/modern/Pause.png")); mStopped=false; } resizeEvent(NULL); connect(stopButton(), SIGNAL(clicked()), this , SLOT(stopClickedSlot())); mStopButton->setVisible(true); emit stopClicked(); } template void MainPanelModern::animateOne(int x, int y, T* button, int step) { for (int i = this->width(); i>=x; i-=step) { button->move(i,y); this->repaint(); } } void MainPanelModern::animate() { int width = this->width(); mPowerOnButton->move(width,20); mPowerOffButton->move(width,20); mStopButton->move(width,20); mInterruptButton->move(width,20); mLoadButton->move(width,20); mMips->move(width,20); animateOne(10,20,mPowerOnButton, 5); animateOne(70,20,mPowerOffButton, 5); animateOne(130,20,mStopButton, 10); animateOne(190,20,mInterruptButton, 10); animateOne(250,20,mLoadButton, 15); animateOne(320,20,mMips,5); } HerculesStudio/HercStudio/Psw.cpp0000664000175000017500000001031612065055266016424 0ustar yakovyakov/* * File: Psw.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Psw.cpp 162 2012-12-13 14:31:56Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Psw.h" #include "HerculesStudio.h" #include "Preferences.h" #include #include Psw::Psw( QStatusBar * statusBar) : mHasStatusBar(false), mVisible(false), mCpu(NULL) { mStatusBar = statusBar; mMode = Preferences::getInstance().pswMode(); mFontCourier = new QFont("Mono",10); setFont(); setStatusBar(); mActive = false; setStatusVisible(false,false); mLine.reserve(100); mLine = QString(100,' '); setGeometry(0,0,1200,12); } Psw::~Psw() { delete mFontCourier; } bool Psw::notify(const QByteArray& statusLine) { if (!mActive || !mVisible) return false; if (statusLine.startsWith("SYS=")) { if (statusLine[4] == '1') mSys->setText("SYS"); else mSys->setText(" "); return true; } //STATUS=CPU0000 PSW=00000000 00000000 0000000000000000 M.W..... instcount=0 if (!statusLine.startsWith("STATUS=") || statusLine.length() < 63) return false; if (mMode == Psw::Docked) { mLine.replace(0,46, statusLine.mid(7,46)); mLine.replace(48,statusLine.length()-56, statusLine.mid(63,statusLine.length()-56)); setText(mLine); } else { mCpu->setText(statusLine.mid(7,43)); mInstCount->setText(statusLine.mid(62)); if (statusLine[54] == 'M') mMan->setText("MAN"); else mMan->setText(" "); if (statusLine[56] == 'W') mWait->setText("WAIT"); else mWait->setText(" "); } return true; } void Psw::setFont() { Preferences& pref = Preferences::getInstance(); QFont font(pref.fontName(Preferences::PswFontObject).c_str(), pref.fontSize(Preferences::PswFontObject), (pref.fontIsBold(Preferences::PswFontObject) ? QFont::Bold : QFont::Normal), pref.fontIsItalic(Preferences::PswFontObject)); font.setStyleHint(QFont::Courier); QLabel::setFont(font); } void Psw::setMode(Psw::PswMode mode) { mMode = mode; setStatusBar(); setStatusVisible(mVisible, Preferences::getInstance().theme() == Preferences::Modern); } void Psw::setStatusBar() { if (!mHasStatusBar) { mHasStatusBar = true; mCpu = new QLabel(" ", mStatusBar); mCpu->setMinimumWidth(400); mCpu->setFont(*mFontCourier); mCpu->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); mStatusBar->addWidget(mCpu); mSys = new QLabel(" ", mStatusBar); mSys->setFont(*mFontCourier); mSys->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); mStatusBar->addWidget(mSys); mWait = new QLabel(" ", mStatusBar); mWait->setFont(*mFontCourier); mWait->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); mStatusBar->addWidget(mWait); mMan = new QLabel(" ", mStatusBar); mMan->setFont(*mFontCourier); mMan->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); mStatusBar->addWidget(mMan); mInstCount = new QLabel(" ", mStatusBar); mInstCount->setFont(*mFontCourier); mInstCount->setFrameStyle(QFrame::StyledPanel | QFrame::NoFrame); mStatusBar->addWidget(mInstCount); } } void Psw::setStatusVisible(bool visible, bool modern) { mCpu->setVisible((mMode != Docked) && visible); mSys->setVisible(visible && modern); mWait->setVisible(visible && modern); mMan->setVisible(visible && modern); mInstCount->setVisible((mMode != Docked) && visible); mVisible = visible; } void Psw::setVisible(bool visible, bool modern) { setStatusVisible(visible, modern); } bool Psw::visible() { return mVisible; } void Psw::setDormant() { mActive = false; } void Psw::standby() { mActive = true; } HerculesStudio/HercStudio/Runner.cpp0000664000175000017500000000171012065055266017122 0ustar yakovyakov/* * File: Runner.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Runner.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Runner.h" Runner::Runner(SynchronizedQueue & queue) : mQueue(queue) { } Runner::~Runner() { } HerculesStudio/HercStudio/Arguments.h0000664000175000017500000000247712065055266017276 0ustar yakovyakov/* * File: Arguments.h * * Author: Jacob Dekel * Created on: Oct 6, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Arguments.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Arguments handling class * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef ARGUMENTS_H_ #define ARGUMENTS_H_ class Arguments { public: virtual ~Arguments(); static Arguments& getInstance(); int parse(int argc, char *argv[]); void printUsage(); bool helpRequested() const; const std::string& configFileName() const; const std::string& resourceFileName() const; private: Arguments(); static Arguments instance; bool mHelp; std::string mConfigFile; std::string mResourceFile; }; #endif /* ARGUMENTS_H_ */ HerculesStudio/HercStudio/PreferencesWin.ui0000664000175000017500000004704112065055266020432 0ustar yakovyakov PreferencesWinClass 0 0 716 579 Preferences true 10 3 696 501 0 Look and Feel 250 10 131 121 Style 10 30 131 19 Classic 10 60 141 19 Modern 10 90 151 24 Use Animation 20 170 231 19 Show PSW in a docked window 20 10 221 121 Mips Metering false 10 32 101 21 LED display 10 60 131 31 Gauge 120 30 90 31 9 75 true Green LED 10 210 651 251 Font Definitions 180 40 141 25 -1 220 10 61 16 Font 380 40 51 25 4 20 10 390 10 41 16 Size 450 40 79 21 530 40 79 21 450 10 55 16 Bold 530 10 55 16 Italic 30 50 131 16 Log Window 180 80 141 25 180 120 141 25 180 160 141 25 380 80 51 25 4 20 10 380 120 51 25 4 20 10 380 160 51 25 4 20 10 450 80 79 21 450 120 79 21 450 160 79 21 530 80 79 21 530 120 79 21 530 160 79 21 30 90 131 16 Registers 30 130 141 16 PSW 30 160 131 16 Command Line 30 200 131 16 Configuration Edit 530 200 79 21 380 200 51 25 4 20 10 450 200 79 21 180 200 141 25 true 400 10 261 121 Theme false 10 30 141 29 (System Default) Dark Directories 190 110 431 23 10 30 171 17 Hercule's Directory 10 70 171 17 Configuration Directory 10 110 171 17 Logs Directory 190 30 431 23 This is the directory which contains the hercules executable. If hercules is on your shell's path, you can leave this field empty 190 70 431 23 630 70 31 27 ... 630 110 31 27 ... 630 30 31 27 ... Logging 10 70 231 21 Append time to each log line 10 40 231 19 Autosave log 10 100 371 21 Split Hercules and O/S log (requires restart) 240 140 101 22 100000000 100 5000 10 145 221 16 Maximum lines to keep for scrollback 630 530 75 23 OK 520 530 75 23 Cancel HerculesStudio/HercStudio/LogRunner.cpp0000664000175000017500000000437712065055266017600 0ustar yakovyakov/* * File: LogRunner.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: LogRunner.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "LogRunner.h" #include "HerculesStudio.h" #include "NamedPipe.h" #include "Preferences.h" LogRunner::LogRunner(SynchronizedQueue& logQueue, HerculesExecutor * herculesExecutor, int maxQueueSize) : Runner(logQueue), mHerculesExecutor(herculesExecutor), mMaxQueueSize(maxQueueSize) { } LogRunner::~LogRunner() { } void LogRunner::run() { mQueue.push_back("logger started"); emit newData(); #ifdef hFramework mProcess = mHerculesExecutor->getQProcess(); connect(mProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readStandardOutput())); return; #else QFile& logFile = NamedPipe::getInstance().getHerculesLogfile(); QByteArray buff; buff.resize(512); mRunning = true; while(mRunning) { int size; if ((size = logFile.readLine(buff.data(),512)) <= 0) { mQueue.push_back("logger ended"); emit newData(); QThread::sleep(100); break; } buff[size-1] = '\0'; mQueue.push_back(buff); emit newData(); while (mQueue.size() > mMaxQueueSize) // do not flood the queue QThread::msleep(100); // yield } #endif } #ifdef hFramework void LogRunner::readStandardOutput() { mProcess->setReadChannel(QProcess::StandardOutput); while (true) { QByteArray output = mProcess->readLine(); if (output.length() == 0) break; #ifndef hCRLF output[output.length()-1]='\0'; #else output[output.length()-2]='\0'; #endif mQueue.push_back(output.data()); emit newData(); } } #endif HerculesStudio/HercStudio/HercStudio.qrc0000664000175000017500000000663212065055266017735 0ustar yakovyakov icons/card.jpg icons/console.jpg icons/dasd.jpg icons/dial1.gif icons/het.gif icons/highRed.jpg icons/interruptu.gif icons/interruptd.gif icons/loadu.gif icons/loadd.gif icons/net.jpg icons/opensource.png icons/poweronoffu.gif icons/poweronoffd.gif icons/poweronond.gif icons/powerononu.gif icons/poweroffu.gif icons/poweroffd.gif icons/printer.jpg icons/red.jpg icons/restartu.gif icons/restartd.gif icons/startu.gif icons/startd.gif icons/stopu.gif icons/stopd.gif icons/storeu.gif icons/stored.gif icons/tape.jpg icons/terminal.jpg icons/tray.xpm icons/unknown.jpg icons/yellow.png icons/yellowhigh.png icons/16x16/check.png icons/16x16/eye-traceCCW.png icons/16x16/iconDevDelete.png icons/16x16/iconDevInterrupt.png icons/16x16/iconDevRename.png icons/16x16/iconDevSStatus.png icons/16x16/iconEdit.png icons/16x16/iconExit.png icons/16x16/iconInterrupt.png icons/16x16/iconIpl.png icons/16x16/iconNew.png icons/16x16/iconOpen.png icons/16x16/iconPoweroff.png icons/16x16/iconPoweron.png icons/16x16/iconPswRestart.png icons/16x16/iconsave-as.png icons/16x16/iconSave.png icons/16x16/iconStart.png icons/16x16/iconStop.png icons/16x16/iconStoreStatus.png icons/16x16/iconHelpAbout.png icons/16x16/iconControl.png icons/16x16/iconCommandLine.png icons/16x16/iconDeleteMessages.png icons/16x16/iconPreferences.png icons/16x16/dasdcopy.png icons/16x16/dasdinit.png icons/16x16/dasdcat.png icons/16x16/dasdconv.png icons/16x16/dasdisup.png icons/16x16/dasdload.png icons/16x16/dasdls.png icons/modern/interrupt.png icons/modern/load.png icons/modern/Pause.png icons/modern/Resume.png icons/modern/Play-icon.png icons/modern/Stop-icon.png icons/modern/Synchronize-icon.png icons/darkorange.stylesheet icons/do_checkbox.png icons/do_handle.png icons/do_down_arrow.png icons/do_up_arrow.png HerculesStudio/HercStudio/MainWindow.h0000664000175000017500000001214412065055266017375 0ustar yakovyakov/* * File: mainwindow.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: MainWindow.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Main window object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef MAINWINDOW_H #define MAINWINDOW_H #include #include "HerculesStudio.h" #include "ui_MainWindow.h" #include "MainPanel.h" #include "DevicesPane.h" #include "CommandLine.h" #include "Psw.h" #include "Regs32.h" #include "Regs64.h" #include "HerculesExecutor.h" #include "LogRunner.h" #include "StatusRunner.h" #include "Preferences.h" #include "Watchdog.h" #include "ConfigFile.h" #include "Configuration.h" #include #include #include class LogRunner; class HerculesExecutor; class PlainLogWidget; class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = 0); virtual ~MainWindow(); bool issueCommand(const std::string& command); ConfigFile * getConfigurationFile(); private: Ui::MainWindowClass ui; QDockWidget * mTopDock; QDockWidget * mDevicesDock; QDockWidget * mBottomDock; QDockWidget * mGRegisters32Dock; QDockWidget * mCRegisters32Dock; QDockWidget * mFRegisters32Dock; QDockWidget * mARegisters32Dock; QDockWidget * mGRegisters64Dock; QDockWidget * mCRegisters64Dock; QDockWidget * mFRegisters64Dock; QDockWidget * mPswDock; Configuration * mConfiguration; ConfigFile * mConfigFile; PlainLogWidget * mLogWindow; QSystemTrayIcon * mSystemTrayIcon; MainPanel * mMainPanel; DevicesPane * mDevicesPane; CommandLine * mCommandLine; Psw * mPsw; Regs32 * mGRegisters32; Regs32 * mCRegisters32; Regs32 * mFRegisters32; Regs32 * mARegisters32; Regs64 * mGRegisters64; Regs64 * mCRegisters64; Regs64 * mFRegisters64; SynchronizedQueue mLogQueue; SynchronizedQueue mStatusQueue; HerculesExecutor * mHerculesExecutor; LogRunner * mLogRunner; StatusRunner * mStatusRunner; Preferences * mPreferences; Watchdog * mWatchdog; bool mHerculesActive; bool mMinimizeOnClose; bool mRecovery; bool mDevicesRecovery; bool mDevicesRecoveryCommenced; bool mSystrayHintEjected; bool mStatusReceived; QString mRecoveryConfig; QString mCurrentPath; QString mAdHocLoadParm; QString mIplDevno; void testGui(); void connectMainPanel(); void fontChanged(); void mipsChanged(); void pswChanged(); void styleChanged(); void themeChanged(); void setIpled(QString ipled); void setDarkBackground(bool dark); public slots: void powerOn(); void powerOff(); void extInterrupt(); void devInterrupt(); void load(); void restart(); void store(); void start(); void stop(); void restartDevices(); // menu-related slots void newConfig(); void config(); void saveConfig(); void saveConfigAs(); void openConfig(); void exitNow(); void loadCommand(); void editViewControls(); void editViewDevices(); void editViewCommand(); void editView32BitGr(); void editView32BitCr(); void editView32BitFr(); void editView32BitAr(); void editView64BitGr(); void editView64BitCr(); void editView64BitFr(); void editViewPSW(); void dasdinit(); void dasdload(); void dasdisup(); void dasdls(); void dasdcat(); void dasdconv(); void dasdcopy(); void tapemap(); void tapecopy(); void tapesplit(); void hetinit(); void hetget(); void hetupd(); void hetmap(); void writeToLogFromQueue(); void writeToLog(QByteArray line); void preferencesChanged(); void dispatchStatus(); void newCommand(); void herculesEndedSlot(); void deleteMessages(); void saveMessages(); void preferences(); void helpAbout(); void closeEvent(QCloseEvent * event); void tryAbort(); void systrayClick(QSystemTrayIcon::ActivationReason); void hideRestore(); void systrayHint(); void recoverDevices(QByteArray& statusLine); void keyPressEvent(QKeyEvent * event); }; #endif // MAINWINDOW_H HerculesStudio/HercStudio/LogWidget.cpp0000664000175000017500000001500412065055266017537 0ustar yakovyakov/* * File: LogsWidget.cpp * * Author: Jacob Dekel * Created on: July 1, 2010 * * Copyright (c) 2010 Jacob Dekel * $Id: * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "LogWidget.h" #include "Preferences.h" #include "HerculesStudio.h" #include #include #include #include #include #include #ifndef hFramework #include #endif #define for_each_log \ for (int for_loop_i=0; for_loop_i<2; for_loop_i++) #define current_log mLogs[for_loop_i] PlainLogWidget::PlainLogWidget(QWidget * parent, const char * suffix) :QTextEdit(parent), mGreen(10,120,10), mYellow(215,201,45), mRed(240,20,20), mBlack(0,0,0), mWhite(250,250,250), mLinesWritten(0) { mSaveLog = Preferences::getInstance().autosaveLog(); mLogFileLines = Preferences::getInstance().logFileLines(); QString parm(suffix); setLogFileName(parm); mIpled = false; mDarkBackground = Preferences::getInstance().darkBackground(); } void PlainLogWidget::setLogFileName (QString& suffix) { getTimeStamp(true); mLogFileName = Preferences::getInstance().logsDir().c_str(); mLogFileName += "/hercules"; mLogFileName += mTimeStamp; if (suffix.length() != 0) { mLogFileName += "."; mLogFileName += suffix; } mLogFileName += ".log"; } void PlainLogWidget::append(const QByteArray & text) { if (Preferences::getInstance().logTimestamp()) { getTimeStamp(false); } else mTimeStamp[0] = '\0'; QByteArray s = text; if (text.data()[0] == '<') s = text.mid(24); QColor keepC = textColor(); if (mDarkBackground) { if (strncmp(text.data(),"HHC",3) == 0) { if (text[8] == 'I') setTextColor(mGreen); else if (text.mid(8,1) =="W") setTextColor(mYellow); else if (text.mid(8,1) =="E") setTextColor(mRed); } else setTextColor(mWhite); } else { if (strncmp(text.data(),"HHC",3) == 0) { if (text[8] == 'I') setTextColor(mGreen); else if (text.mid(8,1) =="W") setTextColor(mYellow); else if (text.mid(8,1) =="E") setTextColor(mRed); } else setTextColor(mBlack); } int len = s.length()-1; if (s[len] == '\n') s[len] = '\0'; QTextEdit::append(QByteArray(mTimeStamp) + s); setTextColor(keepC); if (QTextEdit::document()->blockCount()%mLogFileLines == 0) { writeToFile(Overflow); } } void PlainLogWidget::getTimeStamp(bool withDate) { struct tm *current; time_t now; time(&now); current = localtime(&now); if (withDate) strftime(mTimeStamp, 255, "%Y-%m-%d-%H-%M-%S", current); else { strftime(mTimeStamp, 255, "%H:%M:%S", current); //"%m-%d-%y %H:%M:%S" memcpy(mTimeStamp+8, " ", 2); } } QString PlainLogWidget::toPlainText() { return QTextEdit::toPlainText(); } bool PlainLogWidget::isOSLog() { return false; } void PlainLogWidget::writeToFile(WriteType type) { QTextDocument *oldDocument = QTextEdit::document(); if (mSaveLog || type == MenuCommand) { QFile file(mLogFileName); if (!file.open(QIODevice::Append | QIODevice::Text)) { hOutDebug(0,"Failed to open file " << mLogFileName.toStdString()); return ; } QTextStream out(&file); QTextBlock block = oldDocument->begin(); // skip lines that were already written long linecount = 0; while(linecount < mLinesWritten && block != oldDocument->end()) { block=block.next(); linecount++; } // write new lines while(block != oldDocument->end()) { out << block.text().toAscii().data() << "\n"; mLinesWritten++; block=block.next(); } file.close(); } if (type == Overflow) { oldDocument->clear(); QTextDocument *newBlock = new QTextDocument(this); QTextEdit::setDocument(newBlock); mLinesWritten = 0; getTimeStamp(true); QString sepLine = "---------------- log was saved at "; sepLine += mTimeStamp; sepLine += "-------------------------"; QTextEdit::append(sepLine); } } void PlainLogWidget::preferencesChanged() { mLogFileLines = Preferences::getInstance().logFileLines(); // might have been updated mDarkBackground = Preferences::getInstance().darkBackground(); } void PlainLogWidget::setIpled(bool ipled) { mIpled = ipled; } void PlainLogWidget::clear() { QTextEdit::clear(); } LogWidget::LogWidget(QWidget * parent) : PlainLogWidget(NULL), cHercIndex(0), cOsIndex(1) { mTabWidget = new QTabWidget(parent); mLogs[cHercIndex] = new PlainLogWidget(this, "hercules"); mLogs[cOsIndex] = new PlainLogWidget(this, "os"); mTabWidget->addTab(mLogs[cHercIndex], "Hercules"); mTabWidget->addTab(mLogs[cOsIndex], "OS"); for_each_log { current_log->setReadOnly(true); current_log->setVisible(true); } mIpled = false; } LogWidget::~LogWidget() { } QTabWidget * LogWidget::tabWidget() { return mTabWidget; } void LogWidget::clear() { for_each_log current_log->clear(); } void LogWidget::setReadOnly(bool ro) { for_each_log current_log->setReadOnly(ro); } void LogWidget::append(const QByteArray & text) { QByteArray s = text; hOutDebug(3, s.data()); if (text.data()[0] == '<') s = text.mid(24); if (text.startsWith("HHC") || !mIpled) mLogs[cHercIndex]->append(s); else mLogs[cOsIndex]->append(s); } void LogWidget::setFont(const QFont & font) { for_each_log current_log->setFont(font); } void LogWidget::setTextBackgroundColor (const QColor &color) { for_each_log current_log->setTextBackgroundColor(color); } void LogWidget::setTextColor (const QColor &color) { for_each_log current_log->setTextColor(color); } QString LogWidget::toPlainText() { QString ret; for_each_log ret += current_log->toPlainText(); return ret; } bool LogWidget::empty() { return mLogs[cHercIndex]->document()->isEmpty() && mLogs[cOsIndex]->document()->isEmpty(); } bool LogWidget::isOSLog() { return (mTabWidget->currentIndex() == 1); } void LogWidget::writeToFile(WriteType writeType) { for_each_log current_log->writeToFile(writeType); } void LogWidget::preferencesChanged() { for_each_log current_log->preferencesChanged(); } void LogWidget::setIpled(bool ipled) { mIpled = ipled; } HerculesStudio/HercStudio/MipsGauge.h0000664000175000017500000000271512065055266017205 0ustar yakovyakov/* * File: MipsGauge.h * * Author: Jacob Dekel * Created on: June 15, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: MipsGauge.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object presents the current mips reading as gauge needle * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef MIPSGAUGE_H_ #define MIPSGAUGE_H_ #include "Mips.h" class MipsGauge: public Mips { Q_OBJECT public: MipsGauge(QWidget * parent = 0); virtual ~MipsGauge(); virtual void display(double); virtual void setActive(bool visible); virtual void move(int, int); virtual void setToolTip(const QString & tip); virtual void deleteLater(void); virtual bool isVisible(); protected: void paintEvent(QPaintEvent *); double mPrevAngle; private: double mValue; double mHwm; QColor mPenColor; }; #endif /* MIPSGAUGE_H_ */ HerculesStudio/HercStudio/Fonts.cpp0000664000175000017500000000315312065055266016745 0ustar yakovyakov/* * File: Fonts.cpp * * Author: Jacob Dekel * Created on: Aug 10, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Fonts.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Fonts.h" #include "HerculesStudio.h" #include #include Fonts * Fonts::mInstance = NULL; Fonts::Fonts() { QFontDatabase db; mFonts = db.families(); mFonts.insert(0,"(system default)"); for (int i=0; i. * */ #ifndef FONTPREFERENCES_H_ #define FONTPREFERENCES_H_ #include class QFile; class FontPreferences { public: enum variations { Bold = 128, Italic = 64 }; FontPreferences(std::string line); virtual ~FontPreferences(); void setFontName( const std::string& fontName) ; std::string& fontName () ; void setFontSize( int size ); int fontSize(); void setFontBoldness( bool isBold ); void setFontItalic( bool isItalic ); bool fontIsBold(); bool fontIsItalic(); int fontVariation(); std::string prefLine(); void setPrefLine(std::string line); private: std::string mLine; std::string mName; int mSize; bool mBold; bool mItalic; }; #endif /* FONTPREFERENCES_H_ */ HerculesStudio/HercStudio/HerculesExecutor.h0000664000175000017500000000345212065055266020614 0ustar yakovyakov/* * File: HerculesExecutor.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HerculesExecutor.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object runs hercules as a child process * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef HERCULESEXECUTOR_H_ #define HERCULESEXECUTOR_H_ #include #include #include class HerculesExecutor { public: HerculesExecutor(QMainWindow& mainWindow, int pid=0); virtual ~HerculesExecutor(); int run(std::string configName, std::string herculesPath); void issueCommand(const char * command); void issueFormattedCommand(const char *format, const char * arg1); void issueFormattedCommand(const char *format, const int arg1); void issueFormattedCommand(const char *format, const char * arg1, const char *arg2); QByteArray getLine(); bool getLine(char * buff, int max); QByteArray getStatusLine(); bool getStatusLine(char * buff, int max); QProcess * getQProcess(){ return mProcess; }; int state() {return mProcess->state();}; private: QMainWindow & mMainWindow; QProcess *mProcess; int mPid; }; #endif /* HERCULESEXECUTOR_H_ */ HerculesStudio/HercStudio/MipsLed.h0000664000175000017500000000261512065055266016660 0ustar yakovyakov/* * File: MipsLcd.h * * Author: Jacob Dekel * Created on: June 15, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: MipsLed.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object presents the current mips reading in LCD format * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef MIPSLCD_H_ #define MIPSLCD_H_ #include "Mips.h" #include class MipsLed : public Mips { Q_OBJECT public: MipsLed(QWidget * parent = 0); virtual ~MipsLed(); virtual void display(double); virtual void setActive(bool active); virtual void move(int, int); virtual void setToolTip(const QString & tip); virtual void deleteLater(void); virtual bool isVisible(); private: QLCDNumber *mMips; QPalette mMipsPalette; }; #endif /* MIPSLCD_H_ */ HerculesStudio/HercStudio/Environment.cpp0000664000175000017500000000270012065055266020155 0ustar yakovyakov/* * File: Environment.cpp * * Author: Jacob Dekel * Created on: Aug 8, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Environment.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Environment.h" #include "cstdlib" #define ENV_ICONS "HERCULES_ICONS" std::string Environment::mEmptyString; std::string Environment::mDefaultIconPath = ":/icons";//"/usr/share/herculesstudio/icons"; std::string *Environment::mIconsPath = NULL; Environment::Environment() { } Environment::~Environment() { delete mIconsPath; } std::string& Environment::getIconsPath() { if (mIconsPath != NULL) return *mIconsPath; char * path = getenv("HERCULES_ICONS"); if (path == NULL) mIconsPath = &mDefaultIconPath; else mIconsPath = new std::string(path); return *mIconsPath; } HerculesStudio/HercStudio/Arguments.cpp0000664000175000017500000000376712065055266017634 0ustar yakovyakov/* * File: Arguments.cpp * * Author: Jacob Dekel * Created on: Oct 6, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Arguments.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "Arguments.h" #include Arguments Arguments::instance; Arguments::Arguments() : mHelp(false) { } Arguments::~Arguments() { } Arguments& Arguments::getInstance() { return instance; } bool Arguments::helpRequested() const { return mHelp; } const std::string& Arguments::configFileName() const { return mConfigFile; } const std::string& Arguments::resourceFileName() const { return mResourceFile; } int Arguments::parse(int argc, char * argv[]) { while(--argc) { argv++; if (argv[0][0] != '-') return(-1); switch(argv[0][1]) { case('h'): mHelp = true; break; case('f'): --argc; ++argv; if (argc > 0) mConfigFile = argv[0]; break; case('r'): --argc; ++argv; if (argc > 0) mResourceFile = argv[0]; break; default: break; } } hOutDebug(1,"resource file:'" << mResourceFile << "'"); return 0; } void Arguments::printUsage() { std::cout << "Usage:" << std::endl << std::endl << "\tHerculesStudio [ -f ] [ -r ] [ -h ]" << std::endl; } HerculesStudio/HercStudio/MainPanelClassic.cpp0000664000175000017500000002530012065055266021020 0ustar yakovyakov/* * File: MainPanelClassic.cpp * * Author: Jacob Dekel * Created on: Oct 28, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: MainPanel.cpp 67 2010-09-13 14:06:31Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "MainPanelClassic.h" #include "Environment.h" #include "PanelButton.h" #include "Preferences.h" #include "MipsLed.h" #include "MipsGauge.h" #include MainPanelClassic::MainPanelClassic(QWidget *parent) : MainPanel(parent) { setupUi(parent); doConnect(); } MainPanelClassic::~MainPanelClassic() { delete mMips; delete mYellowLow; delete mYellowHigh; } void MainPanelClassic::setupUi(QWidget *) { const QColor black(50,50,50); const QColor white(255,255,20); QBrush blackBrush(black); QPalette blackPalette(white, black); this->setPalette(blackPalette); this->setAutoFillBackground(true); QString iconsPath = Environment::getIconsPath().c_str(); mPowerOnButton = new PanelButton(iconsPath + "/poweronoffu.gif", iconsPath + "/poweronoffd.gif", this); mPowerOffButton = new PanelButton(iconsPath + "/poweroffu.gif", iconsPath + "/poweroffd.gif", this); mInterruptButton = new PanelButton(iconsPath + "/interruptu.gif", iconsPath + "/interruptd.gif", this); mLoadButton = new PanelButton(iconsPath + "/loadu.gif", iconsPath + "/loadd.gif", this); mRestartButton = new PanelButton(iconsPath + "/restartu.gif", iconsPath + "/restartd.gif", this); mStoreButton = new PanelButton(iconsPath + "/storeu.gif", iconsPath + "/stored.gif", this); mStopButton = new PanelButton(iconsPath + "/stopu.gif", iconsPath + "/stopd.gif", this); mStartButton = new PanelButton(iconsPath + "/startu.gif", iconsPath + "/startd.gif", this); mPowerOnButton->setToolTip("Power On"); mPowerOffButton->setToolTip("Power Off"); mInterruptButton->setToolTip("Interrupt"); mLoadButton->setToolTip("Load (IPL)"); mRestartButton->setToolTip("Restart"); mStoreButton->setToolTip("Store"); mStopButton->setToolTip("Stop all CPUs"); mStartButton->setToolTip("Start all CPUs"); QFont font; font.setPointSize(6); mSys = new QLabel(this); mSys->setPixmap(*mYellowLow); mSysText = new QLabel("SYS",this); mSysText->setFont(font); mMan = new QLabel(this); mMan->setPixmap(*mYellowLow); mManText = new QLabel("MAN",this); mManText->setFont(font); mWait = new QLabel(this); mWait->setPixmap(*mYellowLow); //path = iconsPath + "/yellowhigh.png"; mPSW = new QLabel(this); QFont pswFont("Mono", 10); mPSW->setFont(pswFont); mWaitText = new QLabel("WAIT",this); mWaitText->setFont(font); mLoad = new QLabel(this); mLoad->setPixmap(*mYellowLow); mLoadText = new QLabel("LOAD",this); mLoadText->setFont(font); mLcd0 = new QLCDNumber(1,this);; mLcd0->setSegmentStyle(QLCDNumber::Flat); mLcd0->setFrameStyle(QFrame::NoFrame); mLcd0->resize(20,20); mLcd0->setMode(QLCDNumber::Hex); mLcd1 = new QLCDNumber(1,this); mLcd1->setSegmentStyle(QLCDNumber::Flat); mLcd1->setFrameStyle(QFrame::NoFrame); mLcd1->resize(20,20); mLcd1->setMode(QLCDNumber::Hex); mLcd2 = new QLCDNumber(1,this); mLcd2->setSegmentStyle(QLCDNumber::Flat); mLcd2->setFrameStyle(QFrame::NoFrame); mLcd2->resize(20,20); mLcd2->setMode(QLCDNumber::Hex); mLcd3 = new QLCDNumber(1,this); mLcd3->setSegmentStyle(QLCDNumber::Flat); mLcd3->setFrameStyle(QFrame::NoFrame); mLcd3->resize(20,20); mLcd3->setMode(QLCDNumber::Hex); QString path = Environment::getIconsPath().c_str(); QPixmap pixMap(path + "/dial1.gif"); mDial0 = new ClickLabel(this,mLcd0); mDial0->setPixmap(pixMap); mDial1 = new ClickLabel(this,mLcd1); mDial1->setPixmap(pixMap); mDial2 = new ClickLabel(this,mLcd2); mDial2->setPixmap(pixMap); mDial3 = new ClickLabel(this,mLcd3); mDial3->setPixmap(pixMap); mDial0->setToolTip("Click to select IPL address"); mDial1->setToolTip("Click to select IPL address"); mDial2->setToolTip("Click to select IPL address"); mDial3->setToolTip("Click to select IPL address"); if (Preferences::getInstance().mipsAsGauge()) mMips = new MipsGauge(this); else mMips = new MipsLed(this); mMips->setActive(false); } void MainPanelClassic::resizeEvent(QResizeEvent * ) { int width = this->size().rwidth(); mPowerOnButton->move(width-90,15); mPowerOffButton->move(width-50,15); mInterruptButton->move(width-90,45); mLoadButton->move(width-50,45); mRestartButton->move(width-510,15); mStoreButton->move(width-550,15); mStopButton->move(width-510,45); mStartButton->move(width-550,45); mSys->move(width-200,60); mSysText->move(width-200,50); mMan->move(width-172,60); mManText->move(width-172,50); mWait->move(width-144,60); mWaitText->move(width-144,50); mLoad->move(width-116,60); mLoadText->move(width-116,50); mLcd0->move(width-250,5); mLcd1->move(width-310,5); mLcd2->move(width-370,5); mLcd3->move(width-430,5); mDial0->move(width-270,30); mDial1->move(width-330,30); mDial2->move(width-390,30); mDial3->move(width-450,30); mMips->move(width-680,20); mPSW->setGeometry(width-550,110,48*12,12); } void MainPanelClassic::updateLcd(QLCDNumber * lcd, int inc) { lcd->display(lcd->intValue()+inc); if (lcd->intValue() > 15) lcd->display(0); if (lcd->intValue() < 0) lcd->display(15); outDebug(5, std::cout << "update " << lcd->intValue() << std::endl); } void MainPanelClassic::setDormant() { mMips->setActive(false); QString iconsPath = Environment::getIconsPath().c_str(); ((PanelButton *)mPowerOnButton)->replaceButton(iconsPath + "/poweronoffu.gif", iconsPath + "/poweronoffd.gif"); } void MainPanelClassic::standby() { mMips->setActive(true); QString iconsPath = Environment::getIconsPath().c_str(); ((PanelButton *)mPowerOnButton)->replaceButton(iconsPath + "/powerononu.gif", iconsPath + "/poweronond.gif"); } bool MainPanelClassic::notify(const QByteArray& statusLine) { bool ret = true; if (statusLine.startsWith("SYS=")) { QChar sysVal = statusLine[4]; if (sysVal == '1') mSys->setPixmap(*mYellowHigh); else mSys->setPixmap(*mYellowLow); } else if (statusLine.startsWith("LOAD=")) { QChar sysVal = statusLine[4]; if (sysVal == '1') mLoad->setPixmap(*mYellowHigh); else mLoad->setPixmap(*mYellowLow); } else if (statusLine.startsWith("MIPS=")) { double d = statusLine.mid(5).toDouble(); if (d > mMipsHWM) { mMipsHWM = d; std::stringstream ss; ss << "High Water Mark:" << d; mMips->setToolTip(ss.str().c_str()); } mMips->display(d); } //STATUS=CPU0000 PSW=00000000 00000000 0000000000000000 M.W..... instcount=0 else if ( (statusLine.startsWith("STATUS=")) && (statusLine.length() > 56) ) { if (statusLine[54] == 'M') mMan->setPixmap(*mYellowHigh); else mMan->setPixmap(*mYellowLow); if (statusLine[56] == 'W') mWait->setPixmap(*mYellowHigh); else mWait->setPixmap(*mYellowLow); } else ret = false; return ret; } void MainPanelClassic::switchMips() { bool updated = false; if (Preferences::getInstance().mipsAsGauge()) { MipsLed * oldMips = dynamic_cast(mMips); if (oldMips != NULL) { Mips * gauge = new MipsGauge(this); mMips = gauge; mMips->setToolTip(oldMips->toolTip()); oldMips->deleteLater(); updated = true; } } else { MipsGauge * oldMips = dynamic_cast(mMips); if (oldMips != NULL) { Mips * lcd = new MipsLed(this); mMips = lcd; mMips->setToolTip(oldMips->toolTip()); oldMips->deleteLater(); updated = true; } } if (updated) { mMips->setActive(true); int width = this->size().rwidth(); mMips->move(width-680,20); } } QSize MainPanelClassic::sizeHint() const { return QSize(100, 100); } bool MainPanelClassic::isStopped() const { return mStopped; } template void MainPanelClassic::animateOne(int x, int y, T* button, int step) { for (int i = 0; i<=x; i+=step) { button->move(i,y); this->repaint(); } } void MainPanelClassic::animate() { int width = this->size().rwidth(); mPowerOnButton->move(width,15); mPowerOffButton->move(width,15); mInterruptButton->move(width,45); mLoadButton->move(width,45); mRestartButton->move(width,15); mStoreButton->move(width,15); mStopButton->move(width,45); mStartButton->move(width,45); mDial0->move(width,30); mDial1->move(width,30); mDial2->move(width,30); mDial3->move(width,30); mStoreButton->move(width,15); mStopButton->move(width,45); mStartButton->move(width,45); mLcd0->move(width,5); mLcd1->move(width,5); mLcd2->move(width,5); mLcd3->move(width,5); mSys->move(width,60); mSysText->move(width,50); mMan->move(width,60); mManText->move(width,50); mWait->move(width,60); mWaitText->move(width,50); mLoad->move(width,60); mLoadText->move(width,50); animateOne(width-90,15,mPowerOnButton,5); animateOne(width-50,15,mPowerOffButton,5); animateOne(width-90,45,mInterruptButton,5); animateOne(width-50,45,mLoadButton,5); animateOne(width-510,15,mRestartButton,5); mStoreButton->move(width-550,15); mStopButton->move(width-510,45); mStartButton->move(width-550,45); animateOne(width-270,30,mDial0,2); animateOne(width-330,30,mDial1,15); animateOne(width-390,30,mDial2,15); animateOne(width-450,30,mDial3,15); mSys->move(width-200,60); mSysText->move(width-200,50); mMan->move(width-172,60); mManText->move(width-172,50); mWait->move(width-144,60); mWaitText->move(width-144,50); mLoad->move(width-116,60); mLoadText->move(width-116,50); mLcd0->move(width-250,5); mLcd1->move(width-310,5); mLcd2->move(width-370,5); mLcd3->move(width-430,5); mMips->move(width-680,20); } HerculesStudio/HercStudio/Mips.cpp0000664000175000017500000000165712065055266016573 0ustar yakovyakov/* * File: Mips.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Mips.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Mips.h" Mips::Mips(QWidget * parent) : QWidget(parent) { } Mips::~Mips() { } HerculesStudio/HercStudio/IplConfig.cpp0000664000175000017500000000274012065055266017527 0ustar yakovyakov/* * File: IplConfig.cpp * * Author: Jacob Dekel * Created on: June 22, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: IplConfig.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "IplConfig.h" #include "HerculesStudio.h" #include #include IplConfig::IplConfig(QString &devno, QString& loadParm, QWidget *parent) : QDialog(parent), mDevno(devno), mLoadParm(loadParm) { ui.setupUi(this); ui.devNo->setText(mDevno); ui.loadParm->setText(mLoadParm); connect(ui.okButton, SIGNAL(clicked()), this, SLOT(okPressed())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed())); } IplConfig::~IplConfig() { } void IplConfig::okPressed() { mDevno = ui.devNo->text(); mLoadParm = ui.loadParm->text(); accept(); } void IplConfig::cancelPressed() { deleteLater(); } HerculesStudio/HercStudio/MipsGauge.cpp0000664000175000017500000000453312065055266017540 0ustar yakovyakov/* * File: MipsGauge.cpp * * Author: Jacob Dekel * Created on: Jun 15, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: MipsGauge.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "MipsGauge.h" #include "HerculesStudio.h" #include #include MipsGauge::MipsGauge(QWidget * parent) : Mips(parent) { mHwm = 0.0; resize(120,120); mPenColor = QColor::fromRgb(250,250,250,50); } MipsGauge::~MipsGauge() { } void MipsGauge::move(int x, int y) { QWidget::move(x,y); } void MipsGauge::display(double value) { mValue = value; hOutDebug(5,"mValue=" << mValue); if (mValue > mHwm) mHwm = mValue; static QRect rect(0,0,120,120); update(rect); } void MipsGauge::setActive(bool active) { hOutDebug(5, "MipsGauge " << (active? "Active" : "NotActive")); if (active) mPenColor = QColor::fromRgb(250,250,250,255); else mPenColor = QColor::fromRgb(250,250,250,50); this->repaint(); } void MipsGauge::setToolTip(const QString & tip) { QWidget::setToolTip(tip); } void MipsGauge::paintEvent(QPaintEvent *) { hOutDebug(5,"Gauge paint" << std::endl); QPainter painter(this); painter.setPen(mPenColor); painter.drawArc(0,10,120,120,30*16,120*16); painter.translate(60,70); painter.rotate(30.0); for (int angle=30; angle<=150; angle+=10) { painter.drawLine(-65,0,-60,0); painter.rotate(10.0); } painter.rotate(-160.0); mPrevAngle = 30.0; double angle = 30.0 ; if (mHwm > 0.0) angle = 30 + (mValue/mHwm*120); hOutDebug(5,"angle="< SynchronizedQueue::SynchronizedQueue() : mQueue() { } SynchronizedQueue::~SynchronizedQueue() { } bool SynchronizedQueue::empty() const { return mQueue.empty(); } QByteArray& SynchronizedQueue::front() { return mQueue.front(); } void SynchronizedQueue::push_back(const QByteArray& str) { QMutexLocker lock(&mMutex); mQueue.push_back(str); } void SynchronizedQueue::pop_front() { QMutexLocker lock(&mMutex); mQueue.pop_front(); } int SynchronizedQueue::size() { return mQueue.size(); } void SynchronizedQueue::clear() { mQueue.clear(); } HerculesStudio/HercStudio/PreferencesWin.h0000664000175000017500000000310112065055266020231 0ustar yakovyakov/* * File: PreferencesWin.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: PreferencesWin.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object presents/updates the user preferences * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef PREFERENCESWIN_H #define PREFERENCESWIN_H #include #include "ui_PreferencesWin.h" #include "Preferences.h" class PreferencesWin : public QDialog { Q_OBJECT public: PreferencesWin(const std::string& currentPath, Preferences * preferences, QWidget *parent = 0); ~PreferencesWin(); std::string getHercDir(); private: Ui::PreferencesWinClass ui; std::string mCurrentPath; Preferences * mPreferences; public slots: void okPressed(); void cancelPressed(); void hercDirPressed(); void configDirPressed(); void logsDirPressed(); void mipsToggled(); signals: void preferencesChanged(); }; #endif // PREFERENCESWIN_H HerculesStudio/HercStudio/CommandLine.cpp0000664000175000017500000000627012065055266020045 0ustar yakovyakov/* * File: CommandLine.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: CommandLine.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "CommandLine.h" #include "Preferences.h" #include #include CommandLine::CommandLine(QWidget * parent) : QLineEdit(parent), mHistoryPtr(-1) { setMaxLength(512); setFont(); } CommandLine::~CommandLine() { } QSize CommandLine::sizeHint() { return QSize(1024, 50); } void CommandLine::enterPressed(const QString & text1) { outDebug(4,std::cout << "text1:"<< this->text().toStdString() << std::endl); mHistory.insert(mHistory.begin(),text1); while (mHistory.size() > 100) mHistory.erase(mHistory.end()-1); mHistoryPtr = -1; this->setText(""); } void CommandLine::keyPressEvent(QKeyEvent * event) { outDebug(4, std::cout << "key:" << event->key() << " " << (event->key() == Qt::Key_Up) << std::endl); QLineEdit::keyPressEvent(event); switch (event->key()) { case Qt::Key_Enter: case Qt::Key_Return: enterPressed(this->text()); break; case Qt::Key_Down: if (mHistoryPtr >= 0) mHistoryPtr--; setLine(); break; case Qt::Key_Up: mHistoryPtr++; if (mHistoryPtr >= (signed) mHistory.size()) mHistoryPtr = mHistory.size()-1; setLine(); break; default: break; } } void CommandLine::setLine() { outDebug(4,std::cout << "setLine:" << mHistoryPtr << " size:" << mHistory.size() << " " << mHistory[mHistoryPtr].toStdString() << std::endl); if (mHistoryPtr < -1 || mHistoryPtr >= (signed) mHistory.size()) return; if (mHistoryPtr != -1) this->setText(mHistory[mHistoryPtr]); else this->setText(""); } void CommandLine::setFont() { Preferences& pref = Preferences::getInstance(); QFont font(pref.fontName(Preferences::CommandFontObject).c_str(), pref.fontSize(Preferences::CommandFontObject), (pref.fontIsBold(Preferences::CommandFontObject) ? QFont::Bold : QFont::Normal), pref.fontIsItalic(Preferences::CommandFontObject)); font.setStyleHint(QFont::Courier); QLineEdit::setFont(font); } bool CommandLine::empty() { return (!(mHistory.size() > 0)); } void CommandLine::save() { Preferences& pref = Preferences::getInstance(); while(mHistory.size() > 30) mHistory.pop_back(); pref.setHistory(mHistory); } void CommandLine::restore() { Preferences& pref = Preferences::getInstance(); pref.getHistory(mHistory); } HerculesStudio/HercStudio/HerculesExecutor.cpp0000664000175000017500000001406312065055266021147 0ustar yakovyakov/* * File: HerculesExecutor.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HerculesExecutor.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesExecutor.h" #include "HerculesStudio.h" #include "Arguments.h" #include "NamedPipe.h" #include #include #include #include #include #include #ifdef UNISTD_INC #include #endif int pipeLog[2]; int pipeStatus[2]; int pipeCommand[2]; HerculesExecutor::HerculesExecutor(QMainWindow & mainWindow, int pid) : mMainWindow(mainWindow), mProcess(NULL), mPid(pid) { } HerculesExecutor::~HerculesExecutor() { } #ifndef hFramework int HerculesExecutor::run(std::string configName, std::string herculesPath) { int pid; int rc =0; pid = fork(); if (pid < 0) return -1; if (pid == 0) { std::string hercules = herculesPath; if (herculesPath.length() != 0 ) hercules += "/"; hercules += "hercules"; outDebug(2, std::cout << "hercules:" << hercules << std::endl); FILE * fileOut = NamedPipe::getInstance().getHerculesStdout(); rc = dup2(fileno(fileOut),fileno(stdout)); FILE * fileErr = NamedPipe::getInstance().getHerculesStderr(); rc = dup2(fileno(fileErr),fileno(stderr)); FILE * fileIn = NamedPipe::getInstance().getHerculesStdin(); if (fileIn == NULL) perror("fifo0"); fflush(stdout); rc = dup2(fileno(fileIn),fileno(stdin)); if (rc != 0) perror("stdin"); if (Arguments::getInstance().resourceFileName().length() > 0) { std::string resourceFile = "HERCULES_RC=" + Arguments::getInstance().resourceFileName(); int stat = putenv(const_cast(resourceFile.c_str())); if (stat) { std::cout<<"failed to define environment variable "<< stat << std::endl; } } rc = execlp(hercules.c_str(),hercules.c_str(),"-d","-f",configName.c_str(),"EXTERNALGUI",NULL); std::cout << "***************************************************************" << std::endl << "hercules could not be started (" << rc << ")" << std::endl << "check that hercules is properly installed and is on the default path " << std::endl #ifndef Q_WS_MAC << "or that the path specified in Edit/Preferences is correct." << std::endl #else << "or that the path specified in HerculesStudio/Preferences is correct." << std::endl #endif << "**************************************************************" << std::endl; _exit(1); } mPid = pid; printf("pid=:%d\n",pid); return pid; } void HerculesExecutor::issueCommand(const char * command) { if (mPid == 0) return; outDebug(2, std::cout << "issue command:" << command << std::endl); FILE * input = NamedPipe::getInstance().getHerculesCommandsFile(); if (input) { fprintf(input,"%s\n", command); fflush(input); return; } else { outDebug(3, std::cout << "input=" << input << std::endl); return; } } void HerculesExecutor::issueFormattedCommand(const char * format, const char * arg1) { std::vector buffer(strlen(format) + strlen(arg1) + 2); sprintf(&buffer[0],format,arg1); issueCommand(&buffer[0]); } void HerculesExecutor::issueFormattedCommand(const char * format, int arg1) { std::vector buffer(strlen(format) + 64); sprintf(&buffer[0],format,arg1); issueCommand(&buffer[0]); } #else // hFramework int HerculesExecutor::run(std::string configName, std::string herculesPath) { mProcess=NULL; std::string prog = herculesPath; if (prog.size() > 0) prog += "/"; prog += "hercules"; QString program = prog.c_str(); QStringList arguments; arguments << "-d" << "-f" << configName.c_str() << "EXTERNALGUI" ; mProcess = new QProcess(); mProcess->start(program,arguments); int iter=2; #ifndef Q_WS_WIN while(mProcess->state() == QProcess::NotRunning && --iter > 0) { sleep(1); } #endif if (mProcess->state() != QProcess::Running && mProcess->state() != QProcess::Starting) return -1; Q_PID pid = mProcess->pid(); if (pid != 0) return 0; else return -1; } void HerculesExecutor::issueCommand(const char * command) { mProcess->write(command); } void HerculesExecutor::issueFormattedCommand(const char * format, const char * arg1) { std::string buffer; buffer.resize(strlen(format)+strlen(arg1)+2); sprintf(&buffer[0],format,arg1); mProcess->write(buffer.c_str()); } void HerculesExecutor::issueFormattedCommand(const char * format, int arg1) { std::string buffer; buffer.resize(strlen(format)+64); sprintf(&buffer[0],format,arg1); mProcess->write(buffer.c_str()); } bool HerculesExecutor::getLine(char * buff, int max) { bool ready=false; while (!ready) { ready = mProcess->waitForReadyRead(3000); if (ready) { hOutDebug(1,"waiting for log"); QByteArray output = mProcess->readLine(max); int len = output.length(); hOutDebug(1,"log len=" << len << ":" << output.data()); if (len > 0) { strncpy(buff, output.data(), (len>max? max : len)); buff[len] = '\0'; } else { ready=false; } } } return true; } bool HerculesExecutor::getStatusLine(char * buff, int max) { bool ready=false; while (!ready) { ready = mProcess->waitForReadyRead(3000); if (ready) { hOutDebug(1,"waiting for status"); QByteArray output = mProcess->readAllStandardError(); int len = output.length(); hOutDebug(1,"status len=" << len); if (len > 0) { strncpy(buff, output.data(), (len>max? max : len)); buff[len] = '\0'; } else { ready=false; } } } return true; } #endif HerculesStudio/HercStudio/Recovery.ui0000664000175000017500000001202312065055266017301 0ustar yakovyakov RecoveryClass 0 0 497 359 Recovery 400 320 80 25 Exit 200 320 80 25 Skip 20 320 80 25 Attach 20 10 451 131 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">There is a stray Hercules running for which there is no running HerculesStudio.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Please choose -</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Attach </span>- Will attach this Hercules Studio to the running process</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Skip</span> - Ignore the running Hercules, and start normaly </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> (The runnig Hercules will remain unattended)</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Exit </span>- Exit HerculesStudio altogether</p></body></html> 20 170 461 131 Details 10 30 111 16 Configuration File: 140 30 311 16 ... 10 60 111 16 Process Number: 140 60 52 15 ... HerculesStudio/HercStudio/MipsLed.cpp0000664000175000017500000000402712065055266017212 0ustar yakovyakov/* * File: MipsLcd.cpp * * Author: Jacob Dekel * Created on: Jun 15, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: MipsLed.cpp 167 2012-12-16 16:07:35Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "MipsLed.h" #include "HerculesStudio.h" #include "Preferences.h" #include MipsLed::MipsLed(QWidget * parent) : Mips(parent) { mMipsPalette.setColor(QPalette::Foreground, QColor(255,0,0)); mMips = new QLCDNumber(6,parent); mMips->setPalette(mMipsPalette); mMips->setSegmentStyle(QLCDNumber::Flat); mMips->setFrameShape( QLCDNumber::NoFrame ); mMips->setVisible(true); } MipsLed::~MipsLed() { } void MipsLed::move(int x, int y) { mMips->move(x,y); } void MipsLed::display(double value) { mMips->display(value); } void MipsLed::setActive(bool active) { if (active) { if (Preferences::getInstance().greenLed()) mMipsPalette.setColor(QPalette::Foreground, QColor(0,255,0)); else mMipsPalette.setColor(QPalette::Foreground, QColor(255,0,0)); } else if (Preferences::getInstance().greenLed()) mMipsPalette.setColor(QPalette::Foreground, QColor(0,80,0)); else mMipsPalette.setColor(QPalette::Foreground, QColor(120,0,0)); mMips->setPalette(mMipsPalette); } void MipsLed::setToolTip(const QString & tip) { mMips->setToolTip(tip); } void MipsLed::deleteLater() { mMips->deleteLater(); } bool MipsLed::isVisible() { return mMips->isVisible(); } HerculesStudio/HercStudio/MainPanel.cpp0000664000175000017500000000620712065055266017523 0ustar yakovyakov/* * File: MainPanel.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: MainPanel.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "MainPanel.h" #include "MainPanelClassic.h" #include "Preferences.h" #include "Environment.h" #include "ConfigurationEditor.h" #include #include #include MainPanel::MainPanel(QWidget *parent) :QWidget(parent), mMipsHWM(0) { QString iconsPath = Environment::getIconsPath().c_str(); mYellowLow = new QPixmap(iconsPath + "/yellow.png"); mYellowHigh = new QPixmap(iconsPath + "/yellowhigh.png"); } MainPanel::~MainPanel() { } void MainPanel::doConnect() { connect(powerOnButton(), SIGNAL(clicked()), this , SLOT(powerOnClickedSlot())); connect(powerOffButton(), SIGNAL(clicked()), this , SLOT(powerOffClickedSlot())); connect(interruptButton(), SIGNAL(clicked()), this , SLOT(interruptClickedSlot())); connect(loadButton(), SIGNAL(clicked()), this , SLOT(loadClickedSlot())); connect(stopButton(), SIGNAL(clicked()), this , SLOT(stopClickedSlot())); checkedConnect(mRestartButton,restartClickedSlot()); checkedConnect(mStoreButton,storeClickedSlot()); checkedConnect(mStartButton,startClickedSlot()); } void MainPanel::powerOnClickedSlot() { emit powerOnClicked(); } void MainPanel::powerOffClickedSlot() { emit powerOffClicked(); } void MainPanel::loadClickedSlot() { emit loadClicked(); } void MainPanel::restartClickedSlot() { emit restartClicked(); } void MainPanel::storeClickedSlot() { emit storeClicked(); } void MainPanel::startClickedSlot() { mStopped=false; emit startClicked(); } void MainPanel::stopClickedSlot() { mStopped=true; emit stopClicked(); } void MainPanel::interruptClickedSlot() { emit interruptClicked(); } ClickLabel::ClickLabel(MainPanel * parent, QObject * lcd) : QLabel(parent), mPanel(parent), mLcd(lcd) { } void ClickLabel::mousePressEvent(QMouseEvent * event) { mPanel->updateLcd((QLCDNumber*)(mLcd), event->x() > 30 ? 1 : -1); } int MainPanel::getLoadAddress() { return mLcd0->intValue() + 16*mLcd1->intValue() + (16*16)*mLcd2->intValue() + (16*16*16)*mLcd3->intValue(); } void MainPanel::setLoadAddress(const char *devNo) { int addr = ConfigurationEditor::parseNum(devNo,16); QLCDNumber *nums[4] = {mLcd0, mLcd1, mLcd2, mLcd3}; for (int i=0; i< 4; i++) { int dig = addr%16; addr /= 16; nums[i]->display(dig); } } HerculesStudio/HercStudio/Environment.h0000664000175000017500000000236012065055266017624 0ustar yakovyakov/* * File: Environment.h * * Author: Jacob Dekel * Created on: Aug 8, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Environment.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages access to the system environment variables * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef ENVIRONMENT_H_ #define ENVIRONMENT_H_ #include class Environment { public: Environment(); virtual ~Environment(); static std::string& getIconsPath(); private: static std::string *mIconsPath; static std::string mEmptyString; static std::string mDefaultIconPath; }; #endif /* ENVIRONMENT_H_ */ HerculesStudio/HercStudio/Regs32.h0000664000175000017500000000306512065055266016370 0ustar yakovyakov/* * File: Regs32.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Regs32.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object implements the 32-bit registers view * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef REGS_H_ #define REGS_H_ #include "StatusUpdateCollector.h" #include #include #include #include class Regs32 : public QWidget, public StatusUpdateCollector { Q_OBJECT public: Regs32(QWidget * parent, std::string command); virtual ~Regs32(); void setFont(); virtual void setActive(bool active); bool notify(const QByteArray& statusLine); static std::string gCommand; static std::string fCommand; static std::string cCommand; static std::string aCommand; protected: QWidget * mParent; QLabel mLine1, mLine2, mLine3, mLine4; // subclass can add more std::string mCommand; }; #endif /* REGS_H_ */ HerculesStudio/HercStudio/Regs64.cpp0000664000175000017500000000565012065055266016732 0ustar yakovyakov/* * File: Regs64.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Regs64.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Regs64.h" #include "Preferences.h" std::string Regs64::gCommand = "]GREGS64="; std::string Regs64::cCommand = "]CREGS64="; std::string Regs64::fCommand = "]FREGS64="; Regs64::Regs64(QWidget * parent, std::string command) : Regs32(parent, command), mLine5(this), mLine6(this), mLine7(this), mLine8(this) { setFont(); } Regs64::~Regs64() { } void Regs64::setActive(bool active) { Regs32::setActive(active); mLine5.setVisible(active); mLine6.setVisible(active); mLine7.setVisible(active); mLine8.setVisible(active); std::string command = mCommand + (active ? '1' : '0'); } void Regs64::setFont() { Regs32::setFont(); Preferences& pref = Preferences::getInstance(); int fontSize = pref.fontSize(Preferences::RegsFontObject); QFont font(pref.fontName(Preferences::RegsFontObject).c_str(), fontSize, (pref.fontIsBold(Preferences::RegsFontObject) ? QFont::Bold : QFont::Normal), pref.fontIsItalic(Preferences::RegsFontObject)); font.setStyleHint(QFont::Courier); mLine5.setFont(font); mLine6.setFont(font); mLine7.setFont(font); mLine8.setFont(font); mLine5.setGeometry(fontSize*36,fontSize+2,fontSize*35,fontSize+2); mLine6.setGeometry(fontSize*36,2*(fontSize+2),fontSize*35,fontSize+2); mLine7.setGeometry(fontSize*36,3*(fontSize+2),fontSize*35,fontSize+2); mLine8.setGeometry(fontSize*36,4*(fontSize+2),fontSize*35,fontSize+2); } bool Regs64::notify(const QByteArray& statusLine) { if (statusLine.length() < 2) { setFont(); return false; } if (statusLine[5] == '0') Regs32::mLine1.setText(statusLine); else if (statusLine[5] == '2') Regs32::mLine2.setText(statusLine); else if (statusLine[5] == '4') Regs32::mLine3.setText(statusLine); else if (statusLine[5] == '6') Regs32::mLine4.setText(statusLine); else if (statusLine[5] == '8') Regs64::mLine5.setText(statusLine); else if (statusLine[5] == 'A') Regs64::mLine6.setText(statusLine); else if (statusLine[5] == 'C') Regs64::mLine7.setText(statusLine); else if (statusLine[5] == 'E') Regs64::mLine8.setText(statusLine); else return false; return true; } HerculesStudio/HercStudio/MainPanelClassic.h0000664000175000017500000000401512065055266020465 0ustar yakovyakov/* * File: MainPanelClassic.h * * Author: Jacob Dekel * Created on: Oct 28, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: MainPanel.h 67 2010-09-13 14:06:31Z dekeljacob $ * * This object presents the main panel in "classic" mode * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef MAINPANELCLASSIC_H_ #define MAINPANELCLASSIC_H_ #include "MainPanel.h" #include "StatusUpdateCollector.h" #include "Mips.h" #include #include "ui_Devices.h" #include #include class MainPanelClassic : public MainPanel { Q_OBJECT public: MainPanelClassic(QWidget *parent = 0); virtual ~MainPanelClassic(); void standby(); void setDormant(); bool notify(const QByteArray& statusLine); void switchMips(); bool isStopped() const; virtual void updateLcd(QLCDNumber * lcd, int inc); virtual void animate(); protected: virtual void resizeEvent(QResizeEvent * event); virtual QSize sizeHint() const; virtual void setupUi(QWidget * parent); private: template void animateOne(int x, int y, T* button, int step); QLabel *mSys; QLabel *mSysText; QLabel *mMan; QLabel *mManText; QLabel *mWait; QLabel *mWaitText; QLabel *mLoad; QLabel *mLoadText; QLabel *mPSW; ClickLabel *mDial0, *mDial1, *mDial2, *mDial3; Mips *mMips; }; #endif /* MAINPANELCLASSIC_H_ */ HerculesStudio/HercStudio/Mips.h0000664000175000017500000000251512065055266016232 0ustar yakovyakov/* * File: Mips.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Mips.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object presents the current mips reading as received from hercules * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef MIPS_H_ #define MIPS_H_ #include #include class Mips : public QWidget { public: Mips(QWidget * parent = 0); virtual ~Mips(); virtual void display(double value) = 0; virtual void setActive(bool) = 0; virtual void move(int, int) = 0; virtual void setToolTip(const QString &) = 0; virtual void deleteLater(void) = 0; virtual bool isVisible() = 0; }; #endif /* MIPS_H_ */ HerculesStudio/HercStudio/IplConfig.h0000664000175000017500000000302012065055266017164 0ustar yakovyakov/* * File: IplConfig.h * * Author: Jacob Dekel * Created on: June 22, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: IplConfig.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Main window object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPLCONFIG_H #define IPLCONFIG_H #include #include "ui_IplConfig.h" class IplConfig : public QDialog { Q_OBJECT public: IplConfig(QString &devno, QString& loadParm, QWidget *parent = 0); virtual ~IplConfig(); protected: QString textFromValue(int value) const; //TODO was duplicated. move to util object int valueFromText(const QString& text) const; //TODO was duplicated. move to util object private: Ui::IplConfigClass ui; QString &mDevno; QString &mLoadParm; private slots: void okPressed(); void cancelPressed(); signals: void doIpl(QString devNo, QString loadParm); }; #endif // IPLCONFIG_H HerculesStudio/HercStudio/PreferencesWin.cpp0000664000175000017500000002240412065055266020573 0ustar yakovyakov/* * File: PreferencesWin.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: PreferencesWin.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "PreferencesWin.h" #include "HerculesStudio.h" #include "Fonts.h" #include #include PreferencesWin::PreferencesWin( const std::string& currentPath, Preferences *preferences, QWidget *parent) : QDialog(parent), mCurrentPath(currentPath), mPreferences(preferences) { ui.setupUi(this); #ifdef Q_WS_MAC ui.AnimateCheckBox->setVisible(false); #endif connect(ui.okButton, SIGNAL(pressed()), this, SLOT(okPressed())); connect(ui.cancelButton, SIGNAL(pressed()), this, SLOT(cancelPressed())); connect(ui.hercDirButton, SIGNAL(pressed()), this, SLOT(hercDirPressed())); connect(ui.configDirButton, SIGNAL(pressed()), this, SLOT(configDirPressed())); connect(ui.logsDirButton, SIGNAL(pressed()), this, SLOT(logsDirPressed())); connect(ui.mipsGaugeButton, SIGNAL(toggled(bool)), this, SLOT(mipsToggled())); ui.hercDirLineEdit->setText(mPreferences->hercDir().c_str()); ui.configDirLineEdit->setText(mPreferences->configDir().c_str()); ui.logsDirLineEdit->setText(mPreferences->logsDir().c_str()); QStringList& list = Fonts::getInstance().getList(); ui.fontNameLog->addItems(list); ui.fontNameRegs->addItems(list); ui.fontNamePsw->addItems(list); ui.fontNameCommand->addItems(list); ui.fontNameConfiguration->addItems(list); int fontIndex = Fonts::getInstance().indexOf(mPreferences->fontName(Preferences::LogFontObject).c_str()); if (fontIndex == -1) fontIndex = 0; ui.fontNameLog->setCurrentIndex(fontIndex); ui.fontSizeLog->setValue(mPreferences->fontSize(Preferences::LogFontObject)); ui.boldLog->setChecked(mPreferences->fontIsBold(Preferences::LogFontObject)); ui.italicLog->setChecked(mPreferences->fontIsItalic(Preferences::LogFontObject)); fontIndex = Fonts::getInstance().indexOf(mPreferences->fontName(Preferences::RegsFontObject).c_str()); if (fontIndex == -1) fontIndex = 0; ui.fontNameRegs->setCurrentIndex(fontIndex); ui.fontSizeRegs->setValue(mPreferences->fontSize(Preferences::RegsFontObject)); ui.boldRegs->setChecked(mPreferences->fontIsBold(Preferences::RegsFontObject)); ui.italicRegs->setChecked(mPreferences->fontIsItalic(Preferences::RegsFontObject)); fontIndex = Fonts::getInstance().indexOf(mPreferences->fontName(Preferences::PswFontObject).c_str()); if (fontIndex == -1) fontIndex = 0; ui.fontNamePsw->setCurrentIndex(fontIndex); ui.fontSizePsw->setValue(mPreferences->fontSize(Preferences::PswFontObject)); ui.boldPsw->setChecked(mPreferences->fontIsBold(Preferences::PswFontObject)); ui.italicPsw->setChecked(mPreferences->fontIsItalic(Preferences::PswFontObject)); fontIndex = Fonts::getInstance().indexOf(mPreferences->fontName(Preferences::CommandFontObject).c_str()); if (fontIndex == -1) fontIndex = 0; ui.fontNameCommand->setCurrentIndex(fontIndex); ui.fontSizeCommand->setValue(mPreferences->fontSize(Preferences::CommandFontObject)); ui.boldCommand->setChecked(mPreferences->fontIsBold(Preferences::CommandFontObject)); ui.italicCommand->setChecked(mPreferences->fontIsItalic(Preferences::CommandFontObject)); fontIndex = Fonts::getInstance().indexOf(mPreferences->fontName(Preferences::ConfigurationFontObject).c_str()); if (fontIndex == -1) fontIndex = 0; ui.fontNameConfiguration->setCurrentIndex(fontIndex); ui.fontSizeConfiguration->setValue(mPreferences->fontSize(Preferences::ConfigurationFontObject)); ui.boldConfiguration->setChecked(mPreferences->fontIsBold(Preferences::ConfigurationFontObject)); ui.italicConfiguration->setChecked(mPreferences->fontIsItalic(Preferences::ConfigurationFontObject)); ui.logTimestampCheckbox->setChecked(mPreferences->logTimestamp()); if (mPreferences->mipsAsGauge()) ui.mipsGaugeButton->setChecked(true); else ui.mipsLedButton->setChecked(true); if (mPreferences->pswMode() == Psw::Docked) ui.pswDock->setChecked(true); else ui.pswDock->setChecked(false); ui.splitLogCheckbox->setChecked(mPreferences->splitLog()); ui.autosaveLogCheckbox->setChecked(mPreferences->autosaveLog()); if (mPreferences->theme() == Preferences::Classic) ui.classicRadioButton->setChecked(true); else ui.modernRadioButton->setChecked(true); if (mPreferences->logFileLines() > 0) ui.memLines->setValue( mPreferences->logFileLines() ); else ui.memLines->setValue(5000); if (mPreferences->greenLed()) ui.GreenCheckBox->setChecked(true); else ui.GreenCheckBox->setChecked(false); if (mPreferences->animate()) ui.AnimateCheckBox->setChecked(true); else ui.AnimateCheckBox->setChecked(false); if (mPreferences->darkBackground()) ui.ThemeComboBox->setCurrentIndex(1); else ui.ThemeComboBox->setCurrentIndex(0); } PreferencesWin::~PreferencesWin() { } void PreferencesWin::okPressed() { mPreferences->setHercDir(ui.hercDirLineEdit->text().toStdString()); mPreferences->setConfigDir(ui.configDirLineEdit->text().toStdString()); mPreferences->setLogsDir(ui.logsDirLineEdit->text().toStdString()); mPreferences->setFontName(Preferences::LogFontObject, ui.fontNameLog->currentText().toStdString()); mPreferences->setFontSize(Preferences::LogFontObject, ui.fontSizeLog->value()); mPreferences->setBold(Preferences::LogFontObject, ui.boldLog->isChecked()); mPreferences->setItalic(Preferences::LogFontObject, ui.italicLog->isChecked()); mPreferences->setFontName(Preferences::RegsFontObject, ui.fontNameRegs->currentText().toStdString()); mPreferences->setFontSize(Preferences::RegsFontObject, ui.fontSizeRegs->value()); mPreferences->setBold(Preferences::RegsFontObject, ui.boldRegs->isChecked()); mPreferences->setItalic(Preferences::RegsFontObject, ui.italicRegs->isChecked()); mPreferences->setFontName(Preferences::PswFontObject, ui.fontNamePsw->currentText().toStdString()); mPreferences->setFontSize(Preferences::PswFontObject, ui.fontSizePsw->value()); mPreferences->setBold(Preferences::PswFontObject, ui.boldPsw->isChecked()); mPreferences->setItalic(Preferences::PswFontObject, ui.italicPsw->isChecked()); mPreferences->setFontName(Preferences::CommandFontObject, ui.fontNameCommand->currentText().toStdString()); mPreferences->setFontSize(Preferences::CommandFontObject, ui.fontSizeCommand->value()); mPreferences->setBold(Preferences::CommandFontObject, ui.boldCommand->isChecked()); mPreferences->setItalic(Preferences::CommandFontObject, ui.italicCommand->isChecked()); mPreferences->setFontName(Preferences::ConfigurationFontObject, ui.fontNameConfiguration->currentText().toStdString()); mPreferences->setFontSize(Preferences::ConfigurationFontObject, ui.fontSizeConfiguration->value()); mPreferences->setBold(Preferences::ConfigurationFontObject, ui.boldConfiguration->isChecked()); mPreferences->setItalic(Preferences::ConfigurationFontObject, ui.italicConfiguration->isChecked()); mPreferences->setLogTimestamp(ui.logTimestampCheckbox->isChecked()); mPreferences->setMipsAsGauge(ui.mipsGaugeButton->isChecked()); mPreferences->setPswMode( ui.pswDock->isChecked() ? Psw::Docked : Psw::StatusBar); mPreferences->setSplitLog( ui.splitLogCheckbox->isChecked()); mPreferences->setAutosaveLog( ui.autosaveLogCheckbox->isChecked()); mPreferences->setTheme( ui.classicRadioButton->isChecked() ? Preferences::Classic : Preferences::Modern); mPreferences->setLogFileLines( ui.memLines->value() ); mPreferences->setGreenLed(ui.GreenCheckBox->isChecked()); ui.GreenCheckBox->setEnabled(!ui.mipsGaugeButton->isChecked()); mPreferences->setAnimate(ui.AnimateCheckBox->isChecked()); mPreferences->setDarkBackground(ui.ThemeComboBox->currentIndex() == 1); mPreferences->write(); setVisible(false); // do not hide animation emit preferencesChanged(); close(); } void PreferencesWin::cancelPressed() { close(); } void PreferencesWin::hercDirPressed() { QString s = QFileDialog::getExistingDirectory(this, tr("Find Hercules directory"), ui.hercDirLineEdit->text(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); if (s.length() > 0) ui.hercDirLineEdit->setText(s); } void PreferencesWin::configDirPressed() { QString s = QFileDialog::getExistingDirectory(this, tr("Hercules configurations directory"), ui.configDirLineEdit->text(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); if (s.length() > 0) ui.configDirLineEdit->setText(s); } void PreferencesWin::logsDirPressed() { QString s = QFileDialog::getExistingDirectory(this, tr("Logs directory"), ui.logsDirLineEdit->text(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); if (s.length() > 0) ui.logsDirLineEdit->setText(s); } void PreferencesWin::mipsToggled() { ui.GreenCheckBox->setEnabled(!ui.mipsGaugeButton->isChecked()); } HerculesStudio/HercStudio/StatusRunner.h0000664000175000017500000000260012065055266017772 0ustar yakovyakov/* * File: StatusRunner.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: StatusRunner.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object collects status data from hercules * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef STATUSRUNNER_H_ #define STATUSRUNNER_H_ #include "Runner.h" #include "SynchronizedQueue.h" #include "HerculesExecutor.h" #include class StatusRunner : public Runner { Q_OBJECT public: StatusRunner(SynchronizedQueue& statusQueue, HerculesExecutor * herculesExecutor); virtual ~StatusRunner(); virtual void run(); private: HerculesExecutor * mHerculesExecutor; QProcess *mProcess; public slots: void readStandardError(); }; #endif /* STATUSRUNNER_H_ */ HerculesStudio/HercStudio/main.cpp0000664000175000017500000000242012065055266016574 0ustar yakovyakov/* * File: main.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: main.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "MainWindow.h" #include "MainPanel.h" #include "Arguments.h" #include #include int main(int argc, char *argv[]) { Arguments::getInstance().parse(argc, argv); if (Arguments::getInstance().helpRequested()) { Arguments::getInstance().printUsage(); return 1; } QApplication a(argc, argv); a.setAttribute(Qt::AA_DontShowIconsInMenus, false); MainWindow w; w.show(); return a.exec(); } HerculesStudio/HercStudio/HelpAbout.h0000664000175000017500000000221412065055266017201 0ustar yakovyakov/* * File: HelpAbout.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HelpAbout.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef HELPABOUT_H #define HELPABOUT_H #include #include "ui_helpabout.h" class HelpAbout : public QDialog { Q_OBJECT public: HelpAbout(QWidget *parent = 0); ~HelpAbout(); public slots: void okPressed(); private: Ui::HelpAboutClass ui; }; #endif // HELPABOUT_H HerculesStudio/HercStudio/SynchronizedQueue.h0000664000175000017500000000272012065055266021004 0ustar yakovyakov/* * File: SynchronizedQueue.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: SynchronizedQueue.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object implements a queue to which access is serialized * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef SYNCHRONIZEDQUEUE_H_ #define SYNCHRONIZEDQUEUE_H_ #include #include #include typedef std::deque HercQueue; class SynchronizedQueue { public: SynchronizedQueue(); virtual ~SynchronizedQueue(); bool empty ( ) const; QByteArray& front ( ) ; void pop_front ( ); void push_back(const QByteArray& charBuff); int size( ); void clear( ); private: HercQueue mQueue; QMutex mMutex; }; #endif /* SYNCHRONIZEDHERCULESQUEUE_H_ */ HerculesStudio/HercStudio/CommandLine.h0000664000175000017500000000271112065055266017506 0ustar yakovyakov/* * File: CommandLine.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: CommandLine.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object manages the command line widget * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef COMMANDLINE_H_ #define COMMANDLINE_H_ #include "HerculesStudio.h" #include #include class CommandLine : public QLineEdit { Q_OBJECT public: CommandLine(QWidget * parent=NULL ); virtual ~CommandLine(); void setFont(); bool empty(); void save(); void restore(); QSize sizeHint(); protected: virtual void keyPressEvent ( QKeyEvent * event ); private slots: void enterPressed(const QString & text); private: QVector mHistory; int mHistoryPtr; void setLine(); }; #endif /* COMMANDLINE_H_ */ HerculesStudio/HercStudio/Recovery.cpp0000664000175000017500000000370012065055266017450 0ustar yakovyakov/* * File: Recovery.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Recovery.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Recovery.h" #include "NamedPipe.h" #include Recovery::Recovery(QWidget *parent) : QDialog(parent) { ui.setupUi(this); mHerculesConf = readHerculesConf(); ui.configurationFilename->setText(mHerculesConf.c_str()); std::stringstream ss; ss << NamedPipe::getInstance().getHerculesPid(); ui.processNumber->setText(ss.str().c_str()); connect(ui.exitButton, SIGNAL(clicked()), this , SLOT(exit())); connect(ui.attachButton, SIGNAL(clicked()), this , SLOT(recover())); connect(ui.skipButton, SIGNAL(clicked()), this , SLOT(skip())); } Recovery::~Recovery() { } void Recovery::exit() { mHerculesConf = "!"; this->close(); } void Recovery::skip() { mHerculesConf = ""; this->close(); } void Recovery::recover() { this->close(); } std::string Recovery::getHerculesConf() { return mHerculesConf; } std::string Recovery::readHerculesConf() { std::string cmdLine = NamedPipe::getInstance().getHerculesCommandline(); int ind = cmdLine.find("-d -f"); std::string past_f = cmdLine.substr(ind+6); ind = past_f.find(" "); return past_f.substr(0,ind); } HerculesStudio/HercStudio/PanelButton.h0000664000175000017500000000273212065055266017556 0ustar yakovyakov/* * File: PanelButton.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: PanelButton.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object implements one panel button * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef PANELBUTTON_H_ #define PANELBUTTON_H_ #include #include class PanelButton : public QPushButton { Q_OBJECT public: PanelButton(const QString& upButtonName, const QString& downButtonName, QWidget * parent=NULL); virtual ~PanelButton(); void replaceButton(const QString& upButtonName, const QString& downButtonName); virtual void paintEvent(QPaintEvent *pEvent); public slots: void pressedSignal(); void releasedSignal(); private: bool mDown; QString mUpButtonName, mDownButtonName; }; #endif /* PANELBUTTON_H_ */ HerculesStudio/HercStudio/Watchdog.cpp0000664000175000017500000000344112065055266017414 0ustar yakovyakov/* * File: Watchdog.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Watchdog.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Watchdog.h" #include "HerculesStudio.h" #include "SystemUtils.h" #include #include #ifndef hFramework #include #endif #include #include Watchdog::Watchdog(int herculesPid, bool child) { mHerculesPid = herculesPid; mChild = child; } Watchdog::Watchdog(QProcess * herculesProcess) { mHerculesPid = -1; mChild = false; mProcess = herculesProcess; } Watchdog::~Watchdog() { } void Watchdog::run() { if (mChild) { #ifndef hFramework int stat_loc; int rc = waitpid(mHerculesPid, &stat_loc, 0); outDebug(1, std::cout << "watchdog ended for pid:" << rc << std::endl); #endif } else { if (mHerculesPid > 0) { while(SystemUtils::processIsRunning(mHerculesPid)) sleep(2); } else { while (mProcess->state() != QProcess::NotRunning) sleep(2); } } emit HerculesEnded(); } HerculesStudio/HercStudio/NamedPipe.cpp0000664000175000017500000001431712065055266017522 0ustar yakovyakov/* * File: NamedPipe.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: NamedPipe.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HerculesStudio.h" #include "SystemUtils.h" #include "NamedPipe.h" #include #include #include #include #include #include #include #include #ifndef hFramework #include #include #include #endif #define MAXIMUM_SETS 20 NamedPipe NamedPipe::sInstance; NamedPipe::NamedPipe() { } NamedPipe& NamedPipe::getInstance() { return sInstance; } NamedPipe::~NamedPipe() { } int NamedPipe::recover() { #ifndef hFramework int set = 0; mRecovery = false; char * home = getenv("HOME"); std::string hercstudioDir = home; hercstudioDir += "/.hercstudio"; std::string setPath; int rc = mkdir(hercstudioDir.c_str(), 0777); if (rc<0 && errno != EEXIST) { perror(hercstudioDir.c_str()); outDebug(1,std::cout << "rc=" << errno << std::endl); return -1; } for (int pipeSet=0; pipeSetopen(QIODevice::ReadOnly); } return *mStdoutInput; } FILE * NamedPipe::getHerculesStderr() { if (mStderr == NULL) { mStderr = fopen(mFifo2.c_str(),"w"); } return mStderr; } QFile& NamedPipe::getHerculesStatus() { if (mStderrInput == NULL) { mStderrInput = new QFile(mFifo2.c_str()); mStderrInput->open(QIODevice::ReadOnly); } return *mStderrInput; } std::string NamedPipe::getHerculesCommandline() { std::stringstream procPath; procPath << "/proc/" << mHerculesPid << "/cmdline"; FILE * f = fopen(procPath.str().c_str(),"r"); if (f==NULL) return ""; char buff[255]; int len = fread(buff,sizeof(char), 255,f); if (len == -1) { fclose(f); return ""; } for (int i=0; i. * */ #include "Regs32.h" #include "Preferences.h" #include "MainWindow.h" #include std::string Regs32::gCommand = "]GREGS="; std::string Regs32::cCommand = "]CREGS="; std::string Regs32::fCommand = "]FREGS="; std::string Regs32::aCommand = "]AREGS="; Regs32::Regs32(QWidget * parent, std::string command) : QWidget(parent), mParent(parent), mLine1(this), mLine2(this), mLine3(this), mLine4(this) { //QFont font("monospace", 9); setFont(); mCommand = command; } Regs32::~Regs32() { } void Regs32::setActive(bool active) { mLine1.setVisible(active); mLine2.setVisible(active); mLine3.setVisible(active); mLine4.setVisible(active); std::string command = mCommand + (active ? '1' : '0'); MainWindow * mainWindow = dynamic_cast(mParent); mainWindow->issueCommand(command); } void Regs32::setFont() { Preferences& pref = Preferences::getInstance(); int fontSize = pref.fontSize(Preferences::RegsFontObject); QFont font(pref.fontName(Preferences::RegsFontObject).c_str(), fontSize, (pref.fontIsBold(Preferences::RegsFontObject) ? QFont::Bold : QFont::Normal), pref.fontIsItalic(Preferences::RegsFontObject)); font.setStyleHint(QFont::Courier); mLine1.setFont(font); mLine2.setFont(font); mLine3.setFont(font); mLine4.setFont(font); mLine1.setGeometry(2,fontSize+2,fontSize*35,fontSize+2); mLine2.setGeometry(2,2*(fontSize+2),fontSize*35,fontSize+2); mLine3.setGeometry(2,3*(fontSize+2),fontSize*35,fontSize+2); mLine4.setGeometry(2,4*(fontSize+2),fontSize*35,fontSize+2); } bool Regs32::notify(const QByteArray& statusLine) { if (statusLine.length() < 2) { setFont(); return false; } if (statusLine[2] == '0') Regs32::mLine1.setText(statusLine); else if (statusLine[2] == '4') Regs32::mLine2.setText(statusLine); else if (statusLine[2] == '8') Regs32::mLine3.setText(statusLine); else if (statusLine[2] == 'C') Regs32::mLine4.setText(statusLine); else return false; return true; } HerculesStudio/HercStudio/Preferences.h0000664000175000017500000002466112065055266017571 0ustar yakovyakov/* * File: Preferences.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Preferences.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This singleton object manages user preferences * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef PREFERENCES_H_ #define PREFERENCES_H_ #include "Psw.h" #include #include #include class Preferences_1_0 { public: enum keys { HerculesDir = 0, ConfigurationDir = 1, LogsDir = 2, Font = 3, FontSize = 4, FontVariation = 5, LogTimestamp = 6, RegsViews = 7 }; enum general { NumberOfLines = 8 }; enum Views { ViewGR32 = 0x80, ViewCR32 = 0x40, ViewFR32 = 0x20, ViewAR32 = 0x10, ViewGR64 = 0x08, ViewCR64 = 0x04, ViewFR64 = 0x02, ViewPsw = 0x01 }; enum VariationMasks { Bold = 128, Italic = 64 }; virtual ~Preferences_1_0(); static Preferences_1_0& getInstance(); void write(); void setHercDir(const std::string& hercDir); std::string& hercDir(){return mPrefs[HerculesDir]; } ; void setConfigDir(const std::string& logsDir) ; void setVolatileConfigDir(const std::string& logsDir) ; const std::string& configDir(); void setLogsDir(const std::string& logsDir) ; std::string& logsDir(){return mPrefs[LogsDir]; } ; void setFontName( const std::string& fontName) ; std::string& fontName () ; void setFontSize( int variation ); int fontSize(); void setFontVariation( int variation ); int fontVariation(); bool fontIsBold(); bool fontIsItalic(); bool logTimestamp(); void setLogTimestamp(bool isTrue); // register views void setRegs(Views v,bool view); bool regs(Views v); protected: Preferences_1_0(); private: void readPref(); void assertConfDir(); std::string getValue(char * line, const char * keyword); QString getFileName(); std::string mPath; int mView; std::string mVolatileConfigDir; static Preferences_1_0 *instance; static const char *sFileName; static const char *sKeywords[]; std::vector mPrefs; }; class Preferences_1_1 { public: enum keys { HerculesDir = 0, ConfigurationDir = 1, LogsDir = 2, Font = 3, FontSize = 4, FontVariation = 5, LogTimestamp = 6, RegsViews = 7, Version = 8, LogFont = 9, RegsFont = 10, PswFont = 11, CommandFont = 12 }; enum FontObject { LogFontObject = 0, RegsFontObject = 1, PswFontObject = 2, CommandFontObject = 3 }; enum general { NumberOfLines = 13, PREF_LINE_LENGTH = 300 }; enum Views { ViewGR32 = 0x80, ViewCR32 = 0x40, ViewFR32 = 0x20, ViewAR32 = 0x10, ViewGR64 = 0x08, ViewCR64 = 0x04, ViewFR64 = 0x02, ViewPsw = 0x01 }; virtual ~Preferences_1_1(); static Preferences_1_1& getInstance(); void write(); // hercules directory void setHercDir(const std::string& hercDir); std::string& hercDir(){return mPrefs[HerculesDir]; } ; // configuration default directory void setConfigDir(const std::string& logsDir) ; void setVolatileConfigDir(const std::string& logsDir) ; const std::string& configDir(); // log directory void setLogsDir(const std::string& logsDir) ; std::string& logsDir(){return mPrefs[LogsDir]; } ; // font name void setFontName( FontObject fontObject, const std::string& fontName) ; std::string fontName (FontObject fontObject) ; // font size void setFontSize( FontObject fontObject, int variation ); int fontSize(FontObject fontObject); // bold void setBold( FontObject fontObject, bool bold); bool fontIsBold(FontObject fontObject); // italic void setItalic (FontObject fontObject, bool italic); bool fontIsItalic(FontObject fontObject); // logs time stamp bool logTimestamp(); void setLogTimestamp(bool isTrue); const std::string& version(); // register views void setRegs(Views v,bool view); bool regs(Views v); protected: Preferences_1_1(); private: void readPref(); void assertConfDir(); std::string getValue(char * line, const char * keyword); QString getFileName(); const std::string& getVersion(); keys fontObjectToIndex(FontObject fontObject); std::string mPath; int mView; std::string mVolatileConfigDir; static Preferences_1_1 *instance; static const char *sFileName; static const char *sKeywords[]; std::vector mPrefs; static const char cFontLog[], cFontRegs[], cFontPsw[], cFontCommand[]; }; class Preferences_1_2_0 { public: enum keys { HerculesDir = 0, ConfigurationDir = 1, LogsDir = 2, Font = 3, FontSize = 4, FontVariation = 5, LogTimestamp = 6, RegsViews = 7, Version = 8, LogFont = 9, RegsFont = 10, PswFont = 11, CommandFont = 12, MipsAsGauge = 13, PswMode = 14, SplitLog = 15, AutosaveLog = 16 }; enum FontObject { LogFontObject = 0, RegsFontObject = 1, PswFontObject = 2, CommandFontObject = 3 }; enum general { NumberOfLines = 17, PREF_LINE_LENGTH = 300 }; enum Views { ViewGR32 = 0x80, ViewCR32 = 0x40, ViewFR32 = 0x20, ViewAR32 = 0x10, ViewGR64 = 0x08, ViewCR64 = 0x04, ViewFR64 = 0x02, ViewPsw = 0x01 }; virtual ~Preferences_1_2_0(); static Preferences_1_2_0& getInstance(); void write(); // hercules directory void setHercDir(const std::string& hercDir); std::string& hercDir(){return mPrefs[HerculesDir]; } ; // configuration default directory void setConfigDir(const std::string& logsDir) ; void setVolatileConfigDir(const std::string& logsDir) ; const std::string& configDir(); // log directory void setLogsDir(const std::string& logsDir) ; std::string& logsDir(){return mPrefs[LogsDir]; } ; // font name void setFontName( FontObject fontObject, const std::string& fontName) ; std::string fontName (FontObject fontObject) ; // font size void setFontSize( FontObject fontObject, int variation ); int fontSize(FontObject fontObject); // bold void setBold( FontObject fontObject, bool bold); bool fontIsBold(FontObject fontObject); // italic void setItalic (FontObject fontObject, bool italic); bool fontIsItalic(FontObject fontObject); // logs time stamp bool logTimestamp(); void setLogTimestamp(bool isTrue); const std::string& version(); // register views void setRegs(Views v,bool view); bool regs(Views v); // Mips as gauge void setMipsAsGauge(bool gauge); bool mipsAsGauge(); // Psw Mode Psw::PswMode pswMode(); void setPswMode(Psw::PswMode mode); // Split log bool splitLog(); void setSplitLog(bool); // Autosave log bool autosaveLog(); void setAutosaveLog(bool); protected: Preferences_1_2_0(); private: void readPref(); void assertConfDir(); std::string getValue(char * line, const char * keyword); QString getFileName(); const std::string& getVersion(); keys fontObjectToIndex(FontObject fontObject); QString mPath; int mView; std::string mVolatileConfigDir; static Preferences_1_2_0 *instance; static const char *sFileName; static const char *sKeywords[]; std::vector mPrefs; static const char cFontLog[], cFontRegs[], cFontPsw[], cFontCommand[], cMipsAsGauge[], cPswMode[], cSplitLog[], cAutosaveLog[]; }; class QSettings; class Preferences { public: enum keys { HerculesDir = 0, ConfigurationDir = 1, LogsDir = 2, LogTimestamp = 3, RegsViews = 4, Version = 5, LogFont = 6, RegsFont = 7, PswFont = 8, CommandFont = 9, MipsAsGauge = 10, PswMode = 11, SplitLog = 12, AutosaveLog = 13, Theme = 14, LogFileLines = 15, GreenLed = 16, Animate=17, DarkBackground=18 }; enum FontObject { LogFontObject = 0, RegsFontObject = 1, PswFontObject = 2, CommandFontObject = 3, ConfigurationFontObject = 4 }; enum Views { ViewGR32 = 0, ViewCR32 = 1, ViewFR32 = 2, ViewAR32 = 3, ViewGR64 = 4, ViewCR64 = 5, ViewFR64 = 6, ViewPsw = 7 }; enum Themes { Classic = 0, Modern = 1 }; virtual ~Preferences(); static Preferences& getInstance(); void write(); // hercules directory void setHercDir(const std::string& hercDir); std::string hercDir() const; // configuration default directory void setConfigDir(const std::string& configDir) ; void setVolatileConfigDir(const std::string& logsDir) ; std::string configDir() const; std::string configDir_() const; // log directory void setLogsDir(const std::string& logsDir) ; std::string logsDir() const; // font name void setFontName( FontObject fontObject, const std::string& fontName) ; std::string fontName (FontObject fontObject) const; // font size void setFontSize( FontObject fontObject, int variation ); int fontSize(FontObject fontObject) const; // bold void setBold( FontObject fontObject, bool bold); bool fontIsBold(FontObject fontObject) const; // italic void setItalic (FontObject fontObject, bool italic); bool fontIsItalic(FontObject fontObject) const; // logs time stamp bool logTimestamp() const; void setLogTimestamp(bool isTrue); const std::string& version() const; // register views void setRegs(Views v,bool view); bool regs(Views v) const; // Mips as gauge void setMipsAsGauge(bool gauge); bool mipsAsGauge() const; // Led Color green (mips) void setGreenLed(bool green); bool greenLed() const; // Psw Mode void setPswMode(Psw::PswMode mode); Psw::PswMode pswMode() const; // Split log bool splitLog() const; void setSplitLog(bool); // Autosave log void setAutosaveLog(bool); bool autosaveLog() const; // theme void setTheme(Themes theme); Themes theme() const; // LogFileLines void setLogFileLines(int lines); int logFileLines() const; //command line history void setHistory(QVector& history); void getHistory(QVector& history); //animation void setAnimate(bool animate); bool animate() const; //dark background void setDarkBackground(bool dark); bool darkBackground() const; protected: Preferences(); private: static Preferences *instance; QSettings *mSettings; static const char *sKeywords[]; static const char *sRegsViews[]; std::string mVolatileConfigDir; const char * fontObjectToString(FontObject fontObject) const; void convert(); }; #endif /* PREFERENCES_H_ */ HerculesStudio/HercStudio/HerculesStudio.h0000664000175000017500000000355112065055266020265 0ustar yakovyakov/* * File: HerculesStudio.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HerculesStudio.h 170 2012-12-17 07:45:20Z dekeljacob $ * * a collection of product-wide definitions * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef HERCULESSTUDIO_H_ #define HERCULESSTUDIO_H_ #include #ifndef HS_BUILD_ID #define HS_BUILD_ID "Unknown" #endif #define HERCSTUDIO_VERSION "Version: 1.4.0" #define HERCSTUDIO_REVISION "$Revision: 183 $" #define hDEBUG 0 #define UNISTD_INC #ifdef Q_WS_WIN #define hFramework #define hCRLF #undef UNISTD_INC #endif #include #define outDebug(level,s) if ((level) <= hDEBUG ) \ {s;} \ else {} #define hOutDebug(level,s) if ((level) <= hDEBUG ) \ {std::cout << s << std::endl;} \ else {} #define checkedConnect(button,slot) \ if ((button) != NULL ) { connect(button, SIGNAL(clicked()), this , SLOT(slot)) ;} else{}; class hsException : public std::exception { public: hsException(std::string msg) { mWhat = msg.c_str(); } virtual ~hsException() throw() { } virtual const char* what() const throw() { return mWhat.c_str(); } private: std::string mWhat; }; #endif /* HERCULESSTUDIO_H_ */ HerculesStudio/HercStudio/MainPanel.h0000664000175000017500000000633712065055266017174 0ustar yakovyakov/* * File: MainPanel.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: MainPanel.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object presents the main panel * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef MAINPANEL_H_ #define MAINPANEL_H_ #include "StatusUpdateCollector.h" #include "Mips.h" #include #include #include #include #include #include "ui_Devices.h" class MainPanel; // base class for "clickable" objects class ClickLabel : public QLabel { Q_OBJECT public: ClickLabel(MainPanel *parent, QObject * lcd); virtual void mousePressEvent(QMouseEvent * event ); signals: void clicked(const QPoint &); private: MainPanel * mPanel; QObject * mLcd; }; class MainPanel : public QWidget, public StatusUpdateCollector { Q_OBJECT public: MainPanel(QWidget *parent = 0); virtual ~MainPanel(); virtual void doConnect(); virtual void standby()=0; virtual void setDormant()=0; virtual bool notify(const QByteArray& statusLine)=0; virtual void switchMips()=0; virtual int getLoadAddress(); virtual void setLoadAddress(const char * devNo); virtual bool isStopped()const = 0; virtual void updateLcd(QLCDNumber * lcd, int inc)=0; virtual void animate() = 0; signals: void powerOnClicked(); void powerOffClicked(); void loadClicked(); void interruptClicked(); void restartClicked(); void storeClicked(); void startClicked(); void stopClicked(); protected: virtual void resizeEvent(QResizeEvent * event)=0; virtual QSize sizeHint() const=0; virtual QAbstractButton* powerOnButton() {return mPowerOnButton;}; virtual QAbstractButton* powerOffButton() {return mPowerOffButton;}; virtual QAbstractButton* interruptButton() {return mInterruptButton;}; virtual QAbstractButton* stopButton() {return mStopButton;}; virtual QAbstractButton* loadButton() {return mLoadButton;}; bool mStopped; double mMipsHWM; QPushButton *mPowerOnButton; QPushButton *mPowerOffButton; QPushButton *mInterruptButton; QPushButton *mLoadButton; QPushButton *mRestartButton; QPushButton *mStoreButton; QPushButton *mStopButton; QPushButton *mStartButton; QPixmap *mYellowLow; QPixmap *mYellowHigh; QLCDNumber *mLcd0, *mLcd1, *mLcd2, *mLcd3; public slots: void powerOnClickedSlot(); void powerOffClickedSlot(); void loadClickedSlot(); void interruptClickedSlot(); void restartClickedSlot(); void storeClickedSlot(); void startClickedSlot(); void stopClickedSlot(); }; #endif /* MAINPANEL_H_ */ HerculesStudio/HercStudio/MainWindow.cpp0000664000175000017500000011030112065055266017722 0ustar yakovyakov/* * File: mainwindow.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: MainWindow.cpp 166 2012-12-16 14:49:00Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "MainWindow.h" #include "MainPanelClassic.h" #include "MainPanelModern.h" #include "PreferencesWin.h" #include "Watchdog.h" #include "Recovery.h" #include "HelpAbout.h" #include "DasdInit.h" #include "DasdLoad.h" #include "DasdIsup.h" #include "Dasdls.h" #include "Dasdcat.h" #include "Dasdconv.h" #include "Dasdcopy.h" #include "TapeMap.h" #include "TapeSplt.h" #include "TapeCopy.h" #include "HetInit.h" #include "HetGet.h" #include "HetUpd.h" #include "HetMap.h" #include "NamedPipe.h" #include "Environment.h" #include "Arguments.h" #include "IplConfig.h" #include "SystemConfigLine.h" #include "LogWidget.h" #include #include #include #include #include #include #include "cerrno" #ifndef hFramework #include #endif #include #ifdef UNISTD_INC #include #endif MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), mTopDock(NULL), mDevicesDock(NULL), mConfigFile(NULL), mCommandLine(NULL), mHerculesExecutor(NULL), mPreferences(NULL), mHerculesActive(false) { ui.setupUi(this); setDarkBackground(Preferences::getInstance().darkBackground()); QString iconPath(Environment::getIconsPath().c_str()); this->setWindowIcon(QIcon(iconPath+"/tray.xpm")); if (Arguments::getInstance().configFileName().length() > 0) { mConfigFile = new ConfigFile(Arguments::getInstance().configFileName()); } QDir d(""); mCurrentPath = d.absolutePath(); // left dock (Devices) mDevicesDock = new QDockWidget("Devices",this); mDevicesDock->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); mDevicesPane = new DevicesPane(this); mDevicesDock->setWidget(mDevicesPane); addDockWidget(Qt::LeftDockWidgetArea, mDevicesDock ); // top dock (MainPanel) mTopDock = new QDockWidget("Controls",this); mTopDock->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); if (Preferences::getInstance().theme() == Preferences::Modern) mMainPanel = new MainPanelModern(this); else mMainPanel = new MainPanelClassic(this); mTopDock->setWidget(mMainPanel); addDockWidget(Qt::TopDockWidgetArea,mTopDock ); // gregs32 dock mGRegisters32Dock = new QDockWidget("32-bit General Regs",this); mGRegisters32Dock->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); mGRegisters32 = new Regs32(this,Regs32::gCommand); mGRegisters32Dock->setWidget(mGRegisters32); addDockWidget(Qt::TopDockWidgetArea,mGRegisters32Dock ); this->tabifyDockWidget(mTopDock,mGRegisters32Dock); mGRegisters32Dock->setVisible(false); // cregs32 dock mCRegisters32Dock = new QDockWidget("32-bit Control Regs",this); mCRegisters32Dock->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); mCRegisters32 = new Regs32(this,Regs32::cCommand); mCRegisters32Dock->setWidget(mCRegisters32); addDockWidget(Qt::TopDockWidgetArea,mCRegisters32Dock ); this->tabifyDockWidget(mTopDock,mCRegisters32Dock); mCRegisters32Dock->setVisible(false); // fregs32 dock mFRegisters32Dock = new QDockWidget("32-bit Floating-Point Regs",this); mFRegisters32Dock->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); mFRegisters32 = new Regs32(this,Regs32::fCommand); mFRegisters32Dock->setWidget(mFRegisters32); addDockWidget(Qt::TopDockWidgetArea,mFRegisters32Dock ); this->tabifyDockWidget(mTopDock,mFRegisters32Dock); mFRegisters32Dock->setVisible(false); // aregs32 dock mARegisters32Dock = new QDockWidget("Access Registers",this); mARegisters32Dock->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); mARegisters32 = new Regs32(this,Regs32::aCommand); mARegisters32Dock->setWidget(mARegisters32); addDockWidget(Qt::TopDockWidgetArea,mARegisters32Dock ); this->tabifyDockWidget(mTopDock,mARegisters32Dock); mARegisters32Dock->setVisible(false); // gregs64 dock mGRegisters64Dock = new QDockWidget("64-bit General Regs",this); mGRegisters64Dock->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); mGRegisters64 = new Regs64(this,Regs64::gCommand); mGRegisters64Dock->setWidget(mGRegisters64); addDockWidget(Qt::TopDockWidgetArea,mGRegisters64Dock ); this->tabifyDockWidget(mTopDock,mGRegisters64Dock); mGRegisters64Dock->setVisible(false); // cregs64 dock mCRegisters64Dock = new QDockWidget("64-bit Control Regs",this); mCRegisters64Dock->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); mCRegisters64 = new Regs64(this, Regs64::cCommand); mCRegisters64Dock->setWidget(mCRegisters64); addDockWidget(Qt::TopDockWidgetArea,mCRegisters64Dock ); this->tabifyDockWidget(mTopDock,mCRegisters64Dock); mCRegisters64Dock->setVisible(false); // fregs64 dock mFRegisters64Dock = new QDockWidget("64-bit Floating Point Regs",this); mFRegisters64Dock->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); mFRegisters64 = new Regs64(this, Regs64::fCommand); mFRegisters64Dock->setWidget(mFRegisters64); addDockWidget(Qt::TopDockWidgetArea,mFRegisters64Dock ); this->tabifyDockWidget(mTopDock,mFRegisters64Dock); mFRegisters64Dock->setVisible(false); tabifyDockWidget(mGRegisters32Dock, mTopDock); // CommandLine mBottomDock = new QDockWidget("Command",this); mBottomDock->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); mCommandLine = new CommandLine(mBottomDock); mCommandLine->setReadOnly(true); mBottomDock->setWidget(mCommandLine); addDockWidget(Qt::BottomDockWidgetArea,mBottomDock ); // psw mPswDock = new QDockWidget("PSW", this); mPswDock->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); mPsw = new Psw(this->statusBar()); mPswDock->setWidget(mPsw); addDockWidget(Qt::BottomDockWidgetArea,mPswDock ); this->tabifyDockWidget(mPswDock,mBottomDock); if (Preferences::getInstance().pswMode() == Psw::Docked) mPswDock->setVisible(true); else mPswDock->setVisible(false); mPsw->setMode(Preferences::getInstance().pswMode()); mPsw->setDormant(); if( (Preferences::getInstance().regs(Preferences::ViewGR32)) ) editView32BitGr(); if( (Preferences::getInstance().regs(Preferences::ViewCR32)) ) editView32BitCr(); if( (Preferences::getInstance().regs(Preferences::ViewFR32)) ) editView32BitFr(); if( (Preferences::getInstance().regs(Preferences::ViewAR32)) ) editView32BitAr(); if( (Preferences::getInstance().regs(Preferences::ViewGR64)) ) editView64BitGr(); if( (Preferences::getInstance().regs(Preferences::ViewCR64)) ) editView64BitCr(); if( (Preferences::getInstance().regs(Preferences::ViewFR64)) ) editView64BitFr(); ui.actionView_PSW->setChecked(Preferences::getInstance().regs(Preferences::ViewPsw)); editViewPSW(); QString path = Environment::getIconsPath().c_str(); outDebug(3,std::cout << "icons=" << path.toStdString() << std::endl); QIcon trayIcon(path + "/tray.xpm"); mSystemTrayIcon = new QSystemTrayIcon(trayIcon); QMenu *trayIconMenu = new QMenu(this); QAction *restoreAction = new QAction(tr("&Hide"), this); connect(restoreAction, SIGNAL(triggered()), this, SLOT(hideRestore())); trayIconMenu->addAction(restoreAction); mSystemTrayIcon->setContextMenu(trayIconMenu); connect(ui.actionNew, SIGNAL(triggered()), this , SLOT(newConfig())); connect(ui.actionOpen_configuration, SIGNAL(triggered()), this , SLOT(openConfig())); connect(ui.actionEditConfig, SIGNAL(triggered()), this , SLOT(config())); connect(ui.actionSave, SIGNAL(triggered()), this , SLOT(saveConfig())); connect(ui.actionSave_As, SIGNAL(triggered()), this , SLOT(saveConfigAs())); connect(ui.actionExit, SIGNAL(triggered()), this , SLOT(exitNow())); connect(ui.actionViewControls, SIGNAL(triggered()), this, SLOT(editViewControls())); connect(ui.actionViewDevices, SIGNAL(triggered()), this, SLOT(editViewDevices())); connect(ui.actionViewCommand, SIGNAL(triggered()), this, SLOT(editViewCommand())); connect(ui.actionView_32_bit_General_Registers, SIGNAL(triggered()), this, SLOT(editView32BitGr())); connect(ui.actionView_32_bit_Control_Registers, SIGNAL(triggered()), this, SLOT(editView32BitCr())); connect(ui.actionView_32_bit_Floating_Point_Registers, SIGNAL(triggered()), this, SLOT(editView32BitFr())); connect(ui.actionView_32_bit_Access_Registers, SIGNAL(triggered()), this, SLOT(editView32BitAr())); connect(ui.actionView_64_bit_General_Registers, SIGNAL(triggered()), this, SLOT(editView64BitGr())); connect(ui.actionView_64_bit_Control_Registers, SIGNAL(triggered()), this, SLOT(editView64BitCr())); connect(ui.actionView_64_bit_Floating_Point_Registers, SIGNAL(triggered()), this, SLOT(editView64BitFr())); connect(ui.actionView_PSW, SIGNAL(triggered()), this, SLOT(editViewPSW())); connect(ui.actionDelete_messages, SIGNAL(triggered()), this, SLOT(deleteMessages())); connect(ui.actionSave_messages, SIGNAL(triggered()), this, SLOT(saveMessages())); connect(ui.actionPreferences, SIGNAL(triggered()), this, SLOT(preferences())); connect(ui.actionPower_on, SIGNAL(triggered()), this, SLOT(powerOn())); connect(ui.actionPower_off, SIGNAL(triggered()), this, SLOT(powerOff())); connect(ui.actionIPL_Load, SIGNAL(triggered()), this, SLOT(loadCommand())); connect(ui.actionStart, SIGNAL(triggered()), this, SLOT(start())); connect(ui.actionStop, SIGNAL(triggered()), this, SLOT(stop())); connect(ui.actionExtInterrupt, SIGNAL(triggered()), this, SLOT(extInterrupt())); connect(ui.actionStore_status, SIGNAL(triggered()), this, SLOT(store())); connect(ui.actionPSW_Restart, SIGNAL(triggered()), this, SLOT(restart())); connect(ui.actionDevice_Interrupt, SIGNAL(triggered()), this, SLOT(devInterrupt())); connect(ui.actionDasdinit, SIGNAL(triggered()), this, SLOT(dasdinit())); connect(ui.actionDasdload, SIGNAL(triggered()), this, SLOT(dasdload())); connect(ui.actionDasdisup, SIGNAL(triggered()), this, SLOT(dasdisup())); connect(ui.actionDasdls, SIGNAL(triggered()), this, SLOT(dasdls())); connect(ui.actionDasdcat, SIGNAL(triggered()), this, SLOT(dasdcat())); connect(ui.actionDasdconv, SIGNAL(triggered()), this, SLOT(dasdconv())); connect(ui.actionDasdcopy, SIGNAL(triggered()), this, SLOT(dasdcopy())); connect(ui.actionTapemap, SIGNAL(triggered()), this, SLOT(tapemap())); connect(ui.actionTapecopy, SIGNAL(triggered()), this, SLOT(tapecopy())); connect(ui.actionTapesplit, SIGNAL(triggered()), this, SLOT(tapesplit())); connect(ui.actionHetinit, SIGNAL(triggered()), this, SLOT(hetinit())); connect(ui.actionHetget, SIGNAL(triggered()), this, SLOT(hetget())); connect(ui.actionHetupd, SIGNAL(triggered()), this, SLOT(hetupd())); connect(ui.actionHetmap, SIGNAL(triggered()), this, SLOT(hetmap())); connect(ui.actionAbout, SIGNAL(triggered()), this, SLOT(helpAbout())); connect(mDevicesPane, SIGNAL(restartDevices()), this , SLOT(restartDevices())); connect(mCommandLine, SIGNAL(returnPressed()), this , SLOT(newCommand())); connect(mSystemTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(systrayClick(QSystemTrayIcon::ActivationReason))); connectMainPanel(); if (Preferences::getInstance().splitLog()) { mLogWindow = new LogWidget(this); fontChanged(); setCentralWidget(static_cast(mLogWindow)->tabWidget()); } else { mLogWindow = new PlainLogWidget(this); mLogWindow->setReadOnly(true); fontChanged(); setCentralWidget(mLogWindow); } int recoverRc = NamedPipe::getInstance().recover(); mRecovery = (recoverRc == 1) ; if (mRecovery) { Recovery * r = new Recovery(this); r->exec(); mRecoveryConfig = r->getHerculesConf().c_str(); if (mRecoveryConfig == "!") { exit(0); } if (mRecoveryConfig == "") mRecovery = false; else { powerOn(); mLogWindow->append("--- successfully attached to Hercules ---"); } } mCommandLine->restore(); setVisible(true); if (Preferences::getInstance().animate()) mMainPanel->animate(); if (Arguments::getInstance().configFileName().length() > 0) powerOn(); } MainWindow::~MainWindow() { DeviceConfigLine::clear(); // free acquired static data if (mConfigFile != NULL) delete mConfigFile; } void MainWindow::connectMainPanel() { connect(mMainPanel, SIGNAL(powerOnClicked()), this , SLOT(powerOn())); connect(mMainPanel, SIGNAL(powerOffClicked()), this , SLOT(powerOff())); connect(mMainPanel, SIGNAL(interruptClicked()), this , SLOT(extInterrupt())); connect(mMainPanel, SIGNAL(loadClicked()), this , SLOT(load())); connect(mMainPanel, SIGNAL(restartClicked()), this , SLOT(restart())); connect(mMainPanel, SIGNAL(storeClicked()), this , SLOT(store())); connect(mMainPanel, SIGNAL(startClicked()), this , SLOT(start())); connect(mMainPanel, SIGNAL(stopClicked()), this , SLOT(stop())); } void MainWindow::writeToLog(QByteArray line) { mLogWindow->append(line); } void MainWindow::preferencesChanged() { fontChanged(); mipsChanged(); pswChanged(); styleChanged(); themeChanged(); mLogWindow->preferencesChanged(); } void MainWindow::fontChanged() { std::string fontName = Preferences::getInstance().fontName(Preferences::LogFontObject); if (fontName[0] == '(') { mLogWindow ->setFont(QFont()); } else { QFont font(fontName.c_str()); font.setPointSize(Preferences::getInstance().fontSize(Preferences::LogFontObject)); font.setBold(Preferences::getInstance().fontIsBold(Preferences::LogFontObject)); font.setItalic(Preferences::getInstance().fontIsItalic(Preferences::LogFontObject)); mLogWindow->setFont(font); } mCRegisters32->setFont(); mGRegisters32->setFont(); mFRegisters32->setFont(); mARegisters32->setFont(); mCRegisters64->setFont(); mGRegisters64->setFont(); mFRegisters64->setFont(); mPsw->setFont(); mCommandLine->setFont(); } void MainWindow::mipsChanged() { mMainPanel->switchMips(); } void MainWindow::pswChanged() { mPsw->setMode(mPreferences->pswMode()); mPswDock->setVisible(mPreferences->pswMode() == Psw::Docked); } void MainWindow::styleChanged() { QByteArray loadAddress = QByteArray::number(mMainPanel->getLoadAddress(),16); // preserve mMainPanel->close(); delete mMainPanel; if (Preferences::getInstance().theme() == Preferences::Classic) mMainPanel = new MainPanelClassic(this); else mMainPanel = new MainPanelModern(this); mMainPanel->setLoadAddress(loadAddress); // restore ipl address if (mHerculesActive) mMainPanel->standby(); mTopDock->setWidget(mMainPanel); connectMainPanel(); } void MainWindow::themeChanged() { setDarkBackground (Preferences::getInstance().darkBackground()); if (mPreferences->animate()) mMainPanel->animate(); } void MainWindow::writeToLogFromQueue() { if (!mLogQueue.empty()) { QByteArray& s = mLogQueue.front(); if (!s.isEmpty()) { mLogWindow->append(s); } mLogQueue.pop_front(); } } void MainWindow::dispatchStatus() { while (!mStatusQueue.empty()) { QByteArray& statusLine = mStatusQueue.front(); hOutDebug(1, "writeToDevice:" << statusLine.data() << std::endl); if (!statusLine.isEmpty()) { if (statusLine[0] == 'D') { if (mDevicesRecovery) recoverDevices(statusLine); mDevicesPane->notify(statusLine); } else if (statusLine[0] == 'G') mGRegisters32->notify(statusLine); else if (statusLine[0] == 'C') mCRegisters32->notify(statusLine); else if (statusLine[0] == 'F') mFRegisters32->notify(statusLine); else if (statusLine[0] == 'A') mARegisters32->notify(statusLine); else if (statusLine[0] == '6') { if (statusLine[3] == 'G') mGRegisters64->notify(statusLine); else if (statusLine[3] == 'C') mCRegisters64->notify(statusLine); else if (statusLine[3] == 'F') mFRegisters64->notify(statusLine); } else { if (mMainPanel->notify(statusLine)) mStatusReceived = true; mPsw->notify(statusLine); } } mStatusQueue.pop_front(); } } void MainWindow::recoverDevices(QByteArray& statusLine) { hOutDebug(3,"recorver:" <setReadChannel(QProcess::StandardError); while (true) { QByteArray output = mProcess->readLine(); if (output.length() == 0) break; output[output.length()-1]='\0'; mQueue.push_back(output.data()); emit newData(); } } HerculesStudio/HercStudio/MainPanelModern.h0000664000175000017500000000470212065055266020333 0ustar yakovyakov/* * File: MainPanelModern.h * * Author: Jacob Dekel * Created on: Oct 28, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: MainPanel.h 67 2010-09-13 14:06:31Z dekeljacob $ * * This object presents the main panel in "modern" mode * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef MAINPANELMODERN_H_ #define MAINPANELMODERN_H_ #include "MainPanel.h" #include "StatusUpdateCollector.h" #include "Mips.h" #include #include "ui_Devices.h" #include #include #include class MainPanelModern : public MainPanel { Q_OBJECT public: MainPanelModern(QWidget *parent = 0); virtual ~MainPanelModern(); void standby(); void setDormant(); bool notify(const QByteArray& statusLine); void switchMips(); bool isStopped() const { return mStopped; }; virtual void updateLcd(QLCDNumber * , int ){} // null function in this context virtual void animate(); protected: virtual void resizeEvent(QResizeEvent * event); virtual QSize sizeHint() const; virtual void setupUi(QWidget * parent); virtual QAbstractButton * powerOnButton() { return mPowerOnButton; }; virtual QAbstractButton * powerOffButton() { return mPowerOffButton; }; virtual QAbstractButton* interruptButton() {return mInterruptButton;}; virtual QAbstractButton* stopButton() {return mStopButton;}; virtual QAbstractButton* loadButton() {return mLoadButton;}; void setButton(QToolButton*& button, QString text, QIcon icon); private slots: void stopClickedSlot(); private: template void animateOne(int x, int y, T* button, int step); QToolButton *mPowerOnButton; QToolButton *mPowerOffButton; QToolButton *mInterruptButton; QToolButton *mStopButton; QToolButton *mLoadButton; QLabel *mPSW; Mips *mMips; }; #endif /* MAINPANELMODERN_H_ */ HerculesStudio/HercStudio/Psw.h0000664000175000017500000000355312065055266016076 0ustar yakovyakov/* * File: Psw.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Psw.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object managed display of the psw * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef PSW_H_ #define PSW_H_ #include #include #include #include class Psw: public StatusUpdateCollector, public QLabel { public: enum PswMode { Docked = 0, StatusBar }; Psw( QStatusBar * statusBar ); virtual ~Psw(); virtual bool notify(const QByteArray& ); void setFont(); inline bool isActive() const { return mActive; } ; void setMode(PswMode mode); void standby(); void setDormant(); virtual void setVisible(bool visible, bool modern); virtual bool visible(); private: void setStatusBar(); // visible - make status bar visible // modern - full status (including man/wait/sys) - used in modern panel void setStatusVisible(bool visible, bool modern); QString mLine; bool mHasStatusBar; bool mVisible; bool mActive; QStatusBar * mStatusBar; Psw::PswMode mMode; QLabel * mCpu; QLabel * mInstCount; QLabel * mSys; QLabel * mWait; QLabel * mMan; QFont * mFontCourier; }; #endif /* PSW_H_ */ HerculesStudio/HercStudio/Runner.h0000664000175000017500000000242112065055266016567 0ustar yakovyakov/* * File: Runner.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Runner.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object is the base class for all "runners" which collect input from hercules * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef RUNNER_H_ #define RUNNER_H_ #include "SynchronizedQueue.h" #include #include class Runner : public QThread { Q_OBJECT public: Runner(SynchronizedQueue & queue); virtual ~Runner(); virtual void run()=0; signals: void newData(); protected: SynchronizedQueue& mQueue; bool mRunning; }; #endif /* RUNNER_H_ */ HerculesStudio/HercStudio/Regs64.h0000664000175000017500000000246612065055266016401 0ustar yakovyakov/* * File: Regs64.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Regs64.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object implements the 64-bit registers view * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef REGS64_H_ #define REGS64_H_ #include "Regs32.h" class Regs64: public Regs32 { public: Regs64(QWidget * parent, std::string command); virtual ~Regs64(); void setFont(); void setActive(bool active); bool notify(const QByteArray& statusLine); static std::string gCommand; static std::string fCommand; static std::string cCommand; protected: QLabel mLine5, mLine6, mLine7, mLine8; }; #endif /* REGS64_H_ */ HerculesStudio/HercStudio/LogRunner.h0000664000175000017500000000302512065055266017232 0ustar yakovyakov/* * File: LogRunner.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: LogRunner.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object collects data from the hercules log into the queue * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef LOGRUNNER_H_ #define LOGRUNNER_H_ #include "Runner.h" #include "HerculesStudio.h" #include "SynchronizedQueue.h" #include "HerculesExecutor.h" #include #include class QProcess; class LogRunner : public Runner { Q_OBJECT public: LogRunner(SynchronizedQueue& logQueue, HerculesExecutor * herculesExecutor, int maxQueueSize); virtual ~LogRunner(); void run(); private: std::string mLogFifo; HerculesExecutor *mHerculesExecutor; QProcess *mProcess; bool mRunning; int mMaxQueueSize; public slots: #ifdef hFramework void readStandardOutput(); #endif }; #endif /* LOGRUNNER_H_ */ HerculesStudio/HercStudio/HelpAbout.cpp0000664000175000017500000000353712065055266017545 0ustar yakovyakov/* * File: HelpAbout.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HelpAbout.cpp 181 2012-12-18 14:04:01Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HelpAbout.h" #include "HerculesStudio.h" #include "Environment.h" #include #include #include HelpAbout::HelpAbout(QWidget *parent) : QDialog(parent) { ui.setupUi(this); if (strlen(HERCSTUDIO_REVISION) < 16) ui.versionLabel->setText(HERCSTUDIO_VERSION); else { QString rev(HERCSTUDIO_REVISION); ui.versionLabel->setText(HERCSTUDIO_VERSION " (build " + (rev.mid(11,4).replace(" ","") + ")")); } ui.stampLabel->setText("Built on: "__DATE__ " " __TIME__); static QString icon1 = Environment::getIconsPath().c_str(); icon1 += "/opensource.png"; static QPixmap * pixmap1 = new QPixmap(icon1); ui.label1->setPixmap(*pixmap1); static QString icon2 = Environment::getIconsPath().c_str(); icon2 += "/tray.xpm"; static QPixmap * pixmap2 = new QPixmap(icon2); ui.label2->setPixmap(*pixmap2); connect(ui.okButton, SIGNAL(clicked()), this, SLOT(okPressed())); } HelpAbout::~HelpAbout() { } void HelpAbout::okPressed() { close(); } HerculesStudio/HercStudio/FontPreferences.cpp0000664000175000017500000000531012065055266020741 0ustar yakovyakov/* * File: Fonts.cpp * * Author: Jacob Dekel * Created on: Nov 9, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: FontPreferences.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "FontPreferences.h" #include "Preferences.h" #include "StringTokenizer.h" #include "ConfigurationEditor.h" #include "HerculesStudio.h" #include #include FontPreferences::FontPreferences(std::string line) : mLine(line), mName("(System Default)"), mSize(9), mBold(false), mItalic(false) { setPrefLine(line); } FontPreferences::~FontPreferences() { } void FontPreferences::setFontName( const std::string& fontName) { mName = fontName; } std::string& FontPreferences::fontName() { return mName; } void FontPreferences::setFontSize( int fontSize ) { mSize = fontSize; hOutDebug(2, "FontPreferences set size" << mSize); } int FontPreferences::fontSize() { hOutDebug(2, "FontPreferences return size " << mSize); return mSize; } void FontPreferences::setFontBoldness( bool isBold ) { mBold = isBold; } void FontPreferences::setFontItalic( bool isItalic ) { mItalic = isItalic; } bool FontPreferences::fontIsBold() { return mBold; } bool FontPreferences::fontIsItalic() { return mItalic; } int FontPreferences::fontVariation() { return (mBold ? Bold : 0) + (mItalic ? Italic : 0); } void FontPreferences::setPrefLine(std::string line) { hOutDebug(2, "FontPreferences Line='" << line << "'"); if (line.length() == 0) return; Tokenizer::handle pos=0, lastPos=0; std::string word = StringTokenizer::getFirstWord(line, pos, lastPos, ","); if (word == "") return; mName = word; word = StringTokenizer::getNextWord(line, pos, lastPos, ","); mSize = ConfigurationEditor::parseNum(word,10); mBold = ("true" == StringTokenizer::getNextWord(line, pos, lastPos, ",")); mItalic = ("true" == StringTokenizer::getNextWord(line, pos, lastPos, ", \n\t")); return; } std::string FontPreferences::prefLine() { std::stringstream ss; ss << mName << "," << mSize << "," << (mBold ? "true" : "false" ) << "," << (mItalic ? "true" : "false"); return ss.str(); } HerculesStudio/HercStudio/LogWidget.h0000664000175000017500000000465712065055266017220 0ustar yakovyakov/* * File: LogsWidget.h * * Author: Jacob Dekel * Created on: July 1, 2010 * * Copyright (c) 2010 Jacob Dekel * $Id: * * Multiple QTextEdit wrapper with selection tab * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef LOGSWIDGET_H_ #define LOGSWIDGET_H_ #include #include #include class QTabWidget; class PlainLogWidget : public QTextEdit { public: enum WriteType { MenuCommand, Overflow, Shutdown } ; PlainLogWidget(QWidget * parent, const char * suffix=""); virtual void append(const QByteArray & text); virtual QString toPlainText(); virtual bool isOSLog(); virtual void writeToFile(WriteType type); virtual void preferencesChanged(); virtual void setIpled(bool ipled); virtual void clear(); protected: void getTimeStamp(bool withDate); void setLogFileName (QString& suffix); char mTimeStamp[64]; int mLogFileLines; bool mIpled; bool mSaveLog; QString mLogFileName; QColor mGreen, mYellow, mRed, mBlack, mWhite; long mLinesWritten; bool mDarkBackground; }; class LogWidget : public PlainLogWidget { Q_OBJECT public: LogWidget(QWidget * parent); virtual ~LogWidget(); int active(); void setActive(int i); void setReadOnly(bool readOnly); void setFont(const QFont & font); void setTextBackgroundColor (const QColor &); void setTextColor (const QColor &); QTabWidget * tabWidget(); virtual bool empty(); virtual void clear(); virtual void append(const QByteArray & text); virtual QString toPlainText(); virtual bool isOSLog(); virtual void writeToFile(PlainLogWidget::WriteType writeType); virtual void preferencesChanged(); virtual void setIpled(bool ipled); private: const int cHercIndex; const int cOsIndex; QTabWidget * mTabWidget; PlainLogWidget * mLogs[2]; int mActive; bool mIpled; }; #endif /* LOGSWIDGET_H_ */ HerculesStudio/HercStudio/PanelButton.cpp0000664000175000017500000000365512065055266020116 0ustar yakovyakov/* * File: PanelButton.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: PanelButton.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "PanelButton.h" #include "HerculesStudio.h" #include "Environment.h" #include #include #include PanelButton::PanelButton(const QString& upButtonName, const QString& downButtonName, QWidget * parent) : QPushButton(parent), mDown(false), mUpButtonName(upButtonName), mDownButtonName(downButtonName) { connect(this,SIGNAL(pressed()), this, SLOT(pressedSignal())); connect(this,SIGNAL(released()), this, SLOT(releasedSignal())); } PanelButton::~PanelButton() { } void PanelButton::replaceButton(const QString& upButtonName, const QString& downButtonName) { mUpButtonName = upButtonName; mDownButtonName = downButtonName; repaint(); } void PanelButton::paintEvent(QPaintEvent *) { QString filename = mUpButtonName; if (mDown) filename = mDownButtonName; QPixmap newPix(filename); QPainter painter(this); painter.drawPixmap(0, 0, newPix); resize(33,25); } void PanelButton::pressedSignal() { mDown = true; repaint(); } void PanelButton::releasedSignal() { mDown = false; repaint(); } HerculesStudio/HercUtilities/Dasdcopy.ui0000664000175000017500000001472212065055302017754 0ustar yakovyakov DasdcopyClass 0 0 554 528 Dasdcopy 460 480 80 26 Cancel 350 480 80 26 Run 10 20 521 111 Input 120 30 361 26 490 30 22 22 ... 10 40 71 16 Ckd File: 120 70 361 26 490 70 22 22 ... 10 80 71 16 Shadow file 10 210 521 111 Output 80 30 401 26 80 70 401 26 490 70 22 22 ... 10 40 61 16 File Name 10 80 61 16 Path 20 330 521 131 Options false 120 20 75 26 None zlib bz2 20 30 81 16 Compression 20 60 181 22 Build One Large File 20 90 201 22 Replace Output File If Exists true 10 160 521 23 0 true false HerculesStudio/HercUtilities/DasdTab.cpp0000664000175000017500000001156312065055302017655 0ustar yakovyakov/* * File: DasdTab.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DasdTab.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "DasdTab.h" #include "HerculesStudio.h" SizeMap DasdTab::ckdTab; SizeMap DasdTab::fbaTab; DasdTab DasdTab::mInstance; DasdTab::DasdTab() { init(); } DasdTab::~DasdTab() { } DasdTab& DasdTab::getInstance() { return mInstance; } int DasdTab::getCkdSize(const std::string& dev) { outDebug(3, std::cout << "DasdTab dev=" << dev << " size=" << ckdTab.size() << std::endl); SizeMap::iterator it = ckdTab.find(dev); if (it == ckdTab.end()) return 0; outDebug(3, std::cout << it->second << " " << it->first << std::endl); return it->second; } int DasdTab::getFbaSize(const std::string& dev) { outDebug(3, std::cout << "DasdTab dev=" << dev << " size=" << fbaTab.size() << std::endl); SizeMap::iterator it = fbaTab.find(dev); if (it == fbaTab.end()) return 0; outDebug(3, std::cout << it->second << " " << it->first << std::endl); return it->second; } void DasdTab::init() { ckdTab.insert(SizePair("2305",48)); ckdTab.insert(SizePair("2305-1",48)); ckdTab.insert(SizePair("2305-2",96)); ckdTab.insert(SizePair("2311",200)); ckdTab.insert(SizePair("2311-1",200)); ckdTab.insert(SizePair("2314",200)); ckdTab.insert(SizePair("2314-1",200)); ckdTab.insert(SizePair("3330",404)); ckdTab.insert(SizePair("3330-1",404)); ckdTab.insert(SizePair("3330-2",808)); ckdTab.insert(SizePair("3330-11",808)); ckdTab.insert(SizePair("3340",348)); ckdTab.insert(SizePair("3340-1",348)); ckdTab.insert(SizePair("3340-35",348)); ckdTab.insert(SizePair("3340-2",696)); ckdTab.insert(SizePair("3340-70",696)); ckdTab.insert(SizePair("3350",555)); ckdTab.insert(SizePair("3350-1",555)); ckdTab.insert(SizePair("3375",959)); ckdTab.insert(SizePair("3375-1",959)); ckdTab.insert(SizePair("3380",885)); ckdTab.insert(SizePair("3380-1",885)); ckdTab.insert(SizePair("3380-A",885)); ckdTab.insert(SizePair("3380-B",885)); ckdTab.insert(SizePair("3380-D",885)); ckdTab.insert(SizePair("3380-J",885)); ckdTab.insert(SizePair("3380-2",1770)); ckdTab.insert(SizePair("3380-E",1770)); ckdTab.insert(SizePair("3380-3",2655)); ckdTab.insert(SizePair("3380-K",2655)); ckdTab.insert(SizePair("EMC3380K+",3339)); ckdTab.insert(SizePair("EMC3380K++",3993)); ckdTab.insert(SizePair("3390",1113)); ckdTab.insert(SizePair("3390-1",1113)); ckdTab.insert(SizePair("3390-2",2226)); ckdTab.insert(SizePair("3390-3",3339)); ckdTab.insert(SizePair("3390-9",10017)); ckdTab.insert(SizePair("3390-27",32760)); ckdTab.insert(SizePair("3390-J",32760)); ckdTab.insert(SizePair("3390-54",65520)); ckdTab.insert(SizePair("3390-JJ",65520)); ckdTab.insert(SizePair("9345",1440)); ckdTab.insert(SizePair("9345-1",1440)); ckdTab.insert(SizePair("9345-2",2156)); fbaTab.insert(SizePair("3310",125664)); fbaTab.insert(SizePair("3310-1",125664)); fbaTab.insert(SizePair("3310-x",0 )); fbaTab.insert(SizePair("3370",558000)); fbaTab.insert(SizePair("3370-1",558000)); fbaTab.insert(SizePair("3370-A1",558000)); fbaTab.insert(SizePair("3370-B1",558000)); fbaTab.insert(SizePair("3370-2",712752)); fbaTab.insert(SizePair("3370-A2",712752)); fbaTab.insert(SizePair("3370-B2",712752)); fbaTab.insert(SizePair("3370-x",0 )); fbaTab.insert(SizePair("9332",360036)); fbaTab.insert(SizePair("9332-400",360036)); fbaTab.insert(SizePair("9332-600",554800)); fbaTab.insert(SizePair("9332-x",0 )); fbaTab.insert(SizePair("9335",804714)); fbaTab.insert(SizePair("9335-x",0 )); fbaTab.insert(SizePair("9313",246240)); fbaTab.insert(SizePair("9313-x",0 )); fbaTab.insert(SizePair("9336",920115)); fbaTab.insert(SizePair("9336-10",920115)); fbaTab.insert(SizePair("9336-20",1672881)); fbaTab.insert(SizePair("9336-25",1672881)); fbaTab.insert(SizePair("9336-x",0)); fbaTab.insert(SizePair("0671-08",513072)); fbaTab.insert(SizePair("0671",574560)); fbaTab.insert(SizePair("0671-04",624456)); fbaTab.insert(SizePair("0671-x",0 )); } HerculesStudio/HercUtilities/HetInit.cpp0000775000175000017500000001213212065055302017713 0ustar yakovyakov/* * File: HetInit.cpp * * Author: Jacob Dekel * Created on: Sep 3, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HetInit.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HetInit.h" #include "HerculesStudio.h" #include "UtilityRunner.h" #include "Preferences.h" #include #include #include HetInit::HetInit(QWidget *parent) : GenericUtility("hetinit",parent) { ui.setupUi(this); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.exitButton, SIGNAL(clicked()), this, SLOT(exitClicked())); connect(ui.browseFileButton, SIGNAL(clicked()), this, SLOT(browseFileClicked())); connect(ui.browseDirButton, SIGNAL(clicked()), this, SLOT(browseDirClicked())); mVolser = new VolserSpinBox(ui.groupBox); mVolser->setObjectName(QString::fromUtf8("spinBox")); mVolser->setGeometry(QRect(20, 40, 91, 22)); ui.directory->setText(Preferences::getInstance().logsDir().c_str()); ui.directory->setBackgroundRole(QPalette::Window); ui.directory->setToolTip("Use the button on the right to select directory"); } HetInit::~HetInit() { } void HetInit::runClicked() { if (!runOrStopClicked()) { ui.runButton->setText("Run"); return; } if (ui.filename->text().isEmpty()) { QMessageBox::warning(this, "hetinit", "Please specify tape file to create", QMessageBox::Ok, QMessageBox::NoButton); return; } std::vector parameters; if (ui.compressionCheckbox->isChecked()) parameters.push_back("-d"); if (ui.nlCheckbox->isChecked()) parameters.push_back("-n"); else { parameters.push_back("-i"); if (!ui.owner->text().isEmpty()) parameters.push_back(ui.owner->text().toStdString()); } std::string filename = ui.directory->text().toStdString(); if (filename.size() > 0) filename += "/"; filename += ui.filename->text().toStdString(); parameters.push_back(filename); parameters.push_back(mVolser->text().toStdString()); std::string command = "hetinit"; execute(command, Preferences::getInstance().hercDir(), parameters); ui.runButton->setText("Stop"); } void HetInit::exitClicked() { deleteLater(); } void HetInit::browseFileClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for disk to update",ui.filename->text()); if (s.size() > 0) { QFileInfo fi(s); ui.directory->setText(fi.absolutePath()); ui.filename->setText(fi.fileName()); } } void HetInit::browseDirClicked() { QString s = QFileDialog::getExistingDirectory(this,"Browse for disk to update",ui.directory->text()); if (s.size() > 0) ui.directory->setText(s); } void HetInit::finishedSlot() { deleteLater(); } //////////////// VolserSpinBox ////////////////////////////// VolserSpinBox::VolserSpinBox(QWidget * parent) : QAbstractSpinBox(parent) { connect(this, SIGNAL(editingFinished()), this, SLOT(verify())); setText("000000"); verify(); } VolserSpinBox::~VolserSpinBox() { } QFlags VolserSpinBox::stepEnabled () const { return mStepFlag ; } QString VolserSpinBox::text() const { return lineEdit()->text(); } void VolserSpinBox::setText(QString text) { lineEdit()->setText(text); } void VolserSpinBox::stepBy ( int steps ) { if (verify()) // standard numbering { int value = text().toUInt() + steps; if (value > 999999) return; if (value < 0) return; QString result = QString::number(value); if (result.size() < 6) result = QString("000000").left(6-result.size()) + result; setText(result); verify(); } } bool VolserSpinBox::verify() { bool verified = true; QString str = text(); if (str.size() == 6) { char num[6]; strncpy(num,text().toAscii().data(),6); for (int i=0; i<6; i++) { if (!isdigit(num[i])) { verified = false; } } } else { verified = false; } if (verified) { mStepFlag = QAbstractSpinBox::StepUpEnabled | QAbstractSpinBox::StepDownEnabled; if (str == "000000") mStepFlag &= ~QAbstractSpinBox::StepDownEnabled; if (str == "999999") mStepFlag &= ~QAbstractSpinBox::StepUpEnabled; } else { mStepFlag = QAbstractSpinBox::StepNone; } return verified; } HerculesStudio/HercUtilities/DasdInit.h0000664000175000017500000000347012065055302017515 0ustar yakovyakov/* * File: DasdInit.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DasdInit.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Dasdinit utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DASDINIT_H #define DASDINIT_H #include "UtilityExecutor.h" #include "GenericUtility.h" #include #include #include #include #include "ui_DasdInit.h" class UtilityExecutor; class DasdInit : public GenericUtility { Q_OBJECT public: DasdInit(QWidget *parent = 0); virtual ~DasdInit(); private: Ui::dasdinitClass ui; bool mEnded; void initialize(); void setSizeValue(); virtual void finishedSlot(); class VolserValidator : public QValidator { public: VolserValidator(QObject * parent); virtual State validate(QString & input, int & pos) const; }; private slots: void rawSlot(int); void sizeClicked(); void exitClicked(); void runClicked(); void newDevType(); void browseClicked(); void filenameFocus(); void runnerMaximumChanged(int maximum); void runnerValueChanged(int value); }; #endif // DASDINIT_H HerculesStudio/HercUtilities/GenericUtility.h0000775000175000017500000000367212065055302020765 0ustar yakovyakov/* * File: GenericUtility.h * * Author: Jacob Dekel * Created on: Aug 26, 2010 * * Copyright (c) 2010 Jacob Dekel * $Id: GenericUtility.h 114 2011-03-02 19:35:46Z dekeljacob $ * * This object is a base class for all utilities * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef GENERICUTILITY_H_ #define GENERICUTILITY_H_ #include #include #include #include class UtilityExecutor; class UtilityRunner; class GenericUtility : public QDialog { Q_OBJECT public: GenericUtility(QString name, QWidget *parent = 0); virtual ~GenericUtility(); protected: QString mName; UtilityExecutor * mExecutor; UtilityRunner * mRunner; UtilityRunner * mErrorRunner; bool mStarted, mFinished, mFinishedOK; int mRc; bool runOrStopClicked(); // returns false if currently running int execute(const std::string & pCommand, const std::string& pPath, std::vector& pParameters); std::string getFlatCommand(const std::string & command, const std::string& path, std::vector& parameters); protected: virtual void finishedSlot() = 0; private slots: void timeout(); void finished(int result, QProcess::ExitStatus status); void errorSlot(); void runnerError(const QByteArray& line); signals: void error(); void output(QByteArray line); }; #endif /* GENERICUTILITY_H_ */ HerculesStudio/HercUtilities/Dasdls.ui0000664000175000017500000000543012065055302017414 0ustar yakovyakov DasdlsClass 0 0 561 229 Dasdls 20 40 521 121 Input 90 30 391 26 490 30 22 22 ... 10 40 71 16 Ckd File: 90 70 391 26 490 70 22 22 ... 10 80 71 16 Shadow File: 360 180 80 26 Run 460 180 80 26 Cancel HerculesStudio/HercUtilities/SystemUtils.cpp0000664000175000017500000000277612065055302020666 0ustar yakovyakov/* * File: SystemUtils.h * * Author: Jacob Dekel * Created on: Aug 24, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "SystemUtils.h" #include "HerculesStudio.h" #include #include #include #include #ifndef hFramework #include #endif SystemUtils::SystemUtils() { } SystemUtils::~SystemUtils() { } bool SystemUtils::processIsRunning(int pid) { if (pid <= 1) return false; std::stringstream procPath;// TODO: merge with Watchdog (same function!) procPath << "/proc/" << pid; return (fileExists(procPath.str())); } bool SystemUtils::fileExists(const std::string & fileName) { static struct stat dstat; return (stat(fileName.c_str(), &dstat) == 0); } bool SystemUtils::fileExists(const QString & fileName) { return (QFile::exists(fileName)); } HerculesStudio/HercUtilities/Dasdconv.h0000664000175000017500000000265312065055302017561 0ustar yakovyakov/* * File: Dasdconv.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Dasdconv.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Dasdconv utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DASDCONV_H #define DASDCONV_H #include "GenericUtility.h" #include #include "ui_Dasdconv.h" class UtilityExecutor; class Dasdconv : public GenericUtility { Q_OBJECT public: Dasdconv(QWidget *parent = 0); virtual ~Dasdconv(); private slots: void runClicked(); void exitClicked(); void browseFileClicked(); void browseOutClicked(); void runnerMaximumChanged(int maximum); void runnerValueChanged(int value); private: Ui::DasdconvClass ui; virtual void finishedSlot(); }; #endif // DASDCONV_H HerculesStudio/HercUtilities/DasdIsup.ui0000664000175000017500000000616712065055302017726 0ustar yakovyakov DasdIsupClass 0 0 539 264 DasdIsup 10 20 521 121 Input 90 30 391 26 490 30 22 22 ... 10 40 71 16 Ckd File: 90 70 391 26 490 70 22 22 ... 10 80 71 16 Shadow File: 340 220 80 26 Run 450 220 80 26 Cancel 10 170 521 23 100 0 HerculesStudio/HercUtilities/Dasdcat.h0000664000175000017500000000254712065055302017365 0ustar yakovyakov/* * File: Dasdcat.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Dasdcat.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Dasdcat utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DASDCAT_H #define DASDCAT_H #include "GenericUtility.h" #include #include "ui_Dasdcat.h" class UtilityExecutor; class Dasdcat : public GenericUtility { Q_OBJECT public: Dasdcat(QWidget *parent = 0); ~Dasdcat(); private: Ui::DasdcatClass ui; virtual void finishedSlot(); private slots: void exitClicked(); void runClicked(); void browseFileClicked(); void browseSfClicked(); void specificToggeled(bool); }; #endif // DASDCAT_H HerculesStudio/HercUtilities/Dasdcopy.h0000664000175000017500000000274312065055302017566 0ustar yakovyakov/* * File: Dasdcopy.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Dasdcopy.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Dasdcopy utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DASDCOPY_H #define DASDCOPY_H #include "GenericUtility.h" #include #include "ui_Dasdcopy.h" class UtilityExecutor; class Dasdcopy : public GenericUtility { Q_OBJECT public: Dasdcopy(QWidget *parent = 0); ~Dasdcopy(); private: Ui::DasdcopyClass ui; bool mFirstEndReceived; virtual void finishedSlot(); private slots: void runClicked(); void exitClicked(); void browseFileClicked(); void browseShadowClicked(); void browseOutClicked(); void runnerMaximumChanged(int maximum); void runnerValueChanged(int value); }; #endif // DASDCOPY_H HerculesStudio/HercUtilities/HetMap.cpp0000775000175000017500000001310212065055302017523 0ustar yakovyakov/* * File: HetMap.cpp * * Author: Jacob Dekel * Created on: Sep 6, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HetMap.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HetMap.h" #include "HerculesStudio.h" #include "UtilityRunner.h" #include "Preferences.h" #include #include #include HetMap::HetMap(QWidget *parent) : GenericUtility("hetmap",parent) { ui.setupUi(this); mInternalChange = false; connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(exitClicked())); connect(ui.allCheckBox, SIGNAL(stateChanged(int)), this, SLOT(allClicked())); connect(ui.fileInfoCheckBox, SIGNAL(stateChanged(int)), this, SLOT(fileInfoClicked())); connect(ui.labelInfoCheckBox, SIGNAL(stateChanged(int)), this, SLOT(labelInfoClicked())); connect(ui.dataInfoCheckBox, SIGNAL(stateChanged(int)), this, SLOT(dataInfoClicked())); connect(ui.tapemapCheckBox, SIGNAL(stateChanged(int)), this, SLOT(tapemapClicked())); connect(ui.selFile, SIGNAL(clicked()), this, SLOT(browseFileClicked())); } HetMap::~HetMap() { } void HetMap::runClicked() { if (!runOrStopClicked()) { ui.runButton->setText("Run"); return; } if (ui.filename->text().isEmpty()) { QMessageBox::warning(this, "hetmap", "Please specify tape file to map", QMessageBox::Ok, QMessageBox::NoButton); return; } std::vector parameters; if (ui.dataInfoCheckBox->isChecked()) parameters.push_back("-d"); if (ui.allCheckBox->isChecked()) parameters.push_back("-a"); if (ui.fileInfoCheckBox->isChecked()) parameters.push_back("-f"); if (ui.labelInfoCheckBox->isChecked()) parameters.push_back("-l"); if (ui.tapemapCheckBox->isChecked()) parameters.push_back("-t"); parameters.push_back(ui.filename->text().toStdString()); std::string command = "hetmap"; execute(command, Preferences::getInstance().hercDir(), parameters); ui.runButton->setText("Stop"); } void HetMap::exitClicked() { deleteLater(); } void HetMap::browseFileClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for Input File",ui.filename->text()); if (s.size() > 0) ui.filename->setText(s); } void HetMap::allClicked() { if (mInternalChange) return; mInternalChange = true; // do not trigger signal when changing the bellow checkboxes ui.fileInfoCheckBox->setChecked(false); ui.labelInfoCheckBox->setChecked(false); ui.allCheckBox->setChecked(true); mInternalChange = false; // resume propagating signals } void HetMap::fileInfoClicked() { if (mInternalChange) return; mInternalChange = true; // do not trigger signal when changing the bellow checkboxes ui.allCheckBox->setChecked(false); ui.fileInfoCheckBox->setChecked(true); mInternalChange = false; // resume propagating signals } void HetMap::labelInfoClicked() { if (mInternalChange) return; mInternalChange = true; // do not trigger signal when changing the bellow checkboxes ui.allCheckBox->setChecked(false); ui.labelInfoCheckBox->setChecked(true); mInternalChange = false; // resume propagating signals } void HetMap::dataInfoClicked() { if (mInternalChange) return; mInternalChange = true; // do not trigger signal when changing the bellow checkboxes if (ui.dataInfoCheckBox->isChecked()) { ui.allCheckBox->setChecked(false); ui.fileInfoCheckBox->setChecked(false); ui.labelInfoCheckBox->setChecked(false); ui.tapemapCheckBox->setChecked(false); ui.allCheckBox->setEnabled(false); ui.fileInfoCheckBox->setEnabled(false); ui.labelInfoCheckBox->setEnabled(false); ui.tapemapCheckBox->setEnabled(false); } else { ui.allCheckBox->setEnabled(true); ui.fileInfoCheckBox->setEnabled(true); ui.labelInfoCheckBox->setEnabled(true); ui.tapemapCheckBox->setEnabled(true); ui.allCheckBox->setChecked(true); } mInternalChange = false; // resume propagating signals } void HetMap::tapemapClicked() { if (mInternalChange) return; mInternalChange = true; // do not trigger signal when changing the bellow checkboxes if (ui.tapemapCheckBox->isChecked()) { ui.allCheckBox->setChecked(false); ui.fileInfoCheckBox->setChecked(false); ui.labelInfoCheckBox->setChecked(false); ui.dataInfoCheckBox->setChecked(false); ui.allCheckBox->setEnabled(false); ui.fileInfoCheckBox->setEnabled(false); ui.labelInfoCheckBox->setEnabled(false); ui.dataInfoCheckBox->setEnabled(false); } else { ui.allCheckBox->setEnabled(true); ui.fileInfoCheckBox->setEnabled(true); ui.labelInfoCheckBox->setEnabled(true); ui.dataInfoCheckBox->setEnabled(true); ui.allCheckBox->setChecked(true); } mInternalChange = false; // resume propagating signals } void HetMap::runnerError(const QByteArray &line) { QByteArray lineCopy = line; if (lineCopy.endsWith("\n")) lineCopy.chop(1); emit output(lineCopy); } void HetMap::finishedSlot() { deleteLater(); } HerculesStudio/HercUtilities/Dasdls.h0000664000175000017500000000260712065055302017231 0ustar yakovyakov/* * File: Dasdls.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Dasdls.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Dasdls utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DASDLS_H #define DASDLS_H #include "GenericUtility.h" #include #include "ui_Dasdls.h" class Dasdls : public GenericUtility { Q_OBJECT public: Dasdls(QWidget *parent = 0); ~Dasdls(); private: Ui::DasdlsClass ui; int mMaximum; virtual void finishedSlot(); private slots: void exitClicked(); void runClicked(); void browseFileClicked(); void browseSfClicked(); void runnerMaximumChanged(int maximum); void runnerValueChanged(int value); }; #endif // DASDLS_H HerculesStudio/HercUtilities/TapeCopy.ui0000664000175000017500000000621412065055302017727 0ustar yakovyakov TapeCopyClass 0 0 540 299 HetMap 10 70 501 80 Input Tape 20 30 391 26 440 30 22 22 ... 10 170 501 71 Output Tape 70 30 51 24 9 20 40 52 14 /dev/st 10 30 211 20 Copy From File to SCSI 260 30 211 20 Copy From SCSI to File 310 250 85 27 Run 420 250 85 27 Cancel HerculesStudio/HercUtilities/HetGet.cpp0000775000175000017500000001076412065055302017540 0ustar yakovyakov/* * File: HetGet.cpp * * Author: Jacob Dekel * Created on: Sep 3, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HetGet.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HetGet.h" #include "HerculesStudio.h" #include "UtilityRunner.h" #include "Preferences.h" #include #include #include HetGet::HetGet(QWidget *parent) : GenericUtility("hetget",parent) { ui.setupUi(this); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.exitButton, SIGNAL(clicked()), this, SLOT(exitClicked())); connect(ui.browseInFile, SIGNAL(clicked()), this, SLOT(browseInFileClicked())); connect(ui.browseOutDir, SIGNAL(clicked()), this, SLOT(browseOutDirClicked())); connect(ui.browseOutFile, SIGNAL(clicked()), this, SLOT(browseOutFileClicked())); connect(ui.asciiCheckBox, SIGNAL(stateChanged(int)), this, SLOT(asciiChanged())); connect(ui.stripCheckBox, SIGNAL(stateChanged(int)), this, SLOT(stripChanged())); connect(ui.unblockCheckBox, SIGNAL(stateChanged(int)), this, SLOT(unblockChanged())); ui.outdir->setText(Preferences::getInstance().logsDir().c_str()); ui.outdir->setBackgroundRole(QPalette::Window); ui.outdir->setToolTip("Use the button on the right to select directory"); } HetGet::~HetGet() { } void HetGet::runClicked() { if (!runOrStopClicked()) { ui.runButton->setText("Run"); return; } if (ui.infile->text().isEmpty()) { QMessageBox::warning(this, "hetget", "Please specify input tape file to process", QMessageBox::Ok, QMessageBox::NoButton); return; } else { if (!QFile::exists(ui.infile->text())) { QMessageBox::warning(this, "hetget", "Input tape file does not exist", QMessageBox::Ok, QMessageBox::NoButton); ui.infile->setFocus(Qt::OtherFocusReason); return; } } if (ui.outfile->text().isEmpty()) { QMessageBox::warning(this, "hetget", "Please specify output tape file", QMessageBox::Ok, QMessageBox::NoButton); return; } std::vector parameters; if (ui.nlCheckBox->isChecked()) parameters.push_back("-n"); if (ui.asciiCheckBox->isChecked()) parameters.push_back("-a"); if (ui.unblockCheckBox->isChecked()) parameters.push_back("-u"); if (ui.stripCheckBox->isChecked()) parameters.push_back("-s"); parameters.push_back(ui.infile->text().toStdString()); QString outfile = ui.outdir->text(); if (outfile.size() > 0) outfile += "/"; outfile += ui.outfile->text(); parameters.push_back(outfile.toStdString()); parameters.push_back(QString::number(ui.inputBlocksSpinBox->value()).toStdString()); std::string command = "hetget"; execute(command, Preferences::getInstance().hercDir(), parameters); ui.runButton->setText("Stop"); } void HetGet::exitClicked() { deleteLater(); } void HetGet::browseInFileClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for tape to process",ui.infile->text()); if (s.size() > 0) { ui.infile->setText(s); } } void HetGet::browseOutDirClicked() { QString s = QFileDialog::getExistingDirectory(this,"Browse for target output directory",ui.outdir->text()); if (s.size() > 0) ui.outdir->setText(s); } void HetGet::browseOutFileClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for target output file",ui.outdir->text()); if (s.size() > 0) { QFileInfo fi(s); ui.outdir->setText(fi.absolutePath()); ui.outfile->setText(fi.fileName()); } } void HetGet::asciiChanged() { if (ui.asciiCheckBox->isChecked()) ui.unblockCheckBox->setChecked(true); } void HetGet::stripChanged() { if (ui.stripCheckBox->isChecked()) ui.asciiCheckBox->setChecked(true); } void HetGet::unblockChanged() { if (!ui.unblockCheckBox->isChecked()) ui.asciiCheckBox->setChecked(false); } void HetGet::finishedSlot() { deleteLater(); } HerculesStudio/HercUtilities/DasdLoad.h0000664000175000017500000000263512065055302017473 0ustar yakovyakov/* * File: DasdLoad.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DasdLoad.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Dasdload utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DASDLOAD_H #define DASDLOAD_H #include #include "ui_DasdLoad.h" class UtilityExecutor; class DasdLoad : public QDialog { Q_OBJECT public: DasdLoad(QWidget *parent = 0); ~DasdLoad(); private: Ui::DasdLoadClass ui; bool mEnded; UtilityExecutor * mExecutor; private slots: void exitClicked(); void runClicked(); void runnerMaximumChanged(int maximum); void runnerValueChanged(int value); void browseCtlClicked(); void browseOutClicked(); }; #endif // DASDLOAD_H HerculesStudio/HercUtilities/DasdIsup.h0000664000175000017500000000264212065055302017532 0ustar yakovyakov/* * File: DasdIsup.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DasdIsup.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Dasdisup utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DASDISUP_H #define DASDISUP_H #include "GenericUtility.h" #include #include "ui_DasdIsup.h" class UtilityExecutor; class DasdIsup : public GenericUtility { Q_OBJECT public: DasdIsup(QWidget *parent = 0); ~DasdIsup(); private: Ui::DasdIsupClass ui; virtual void finishedSlot(); private slots: void exitClicked(); void runClicked(); void browseFileClicked(); void browseSfClicked(); void runnerMaximumChanged(int maximum); void runnerValueChanged(int value); }; #endif // DASDISUP_H HerculesStudio/HercUtilities/UtilityExecutor.h0000664000175000017500000000320512065055302021174 0ustar yakovyakov/* * File: UtilityExecutor.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: UtilityExecutor.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object runs the various utilities as a child process * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef UTILITYEXECUTOR_H_ #define UTILITYEXECUTOR_H_ #include "HerculesStudio.h" #include "UtilityRunner.h" #include #include #include #include class QProcess; class UtilityRunner; class UtilityExecutor : public QObject { Q_OBJECT public: UtilityExecutor(QObject *parent=0); virtual ~UtilityExecutor(); int run(const std::string & command, const std::string & pPath, std::vector pParameters, UtilityRunner * runner, UtilityRunner * errorRunner); bool running(); QProcess * getQProcess() { return mProcess;}; void terminate(); private: QProcess * mProcess; }; #endif /* UTILITYEXECUTOR_H_ */ HerculesStudio/HercUtilities/TapeSplt.ui0000775000175000017500000000712112065055302017740 0ustar yakovyakov TapeSpltClass 0 0 659 479 Dialog 20 60 621 80 Input File 10 30 541 20 570 30 31 23 ... 20 150 621 241 Output File(s) 530 120 75 23 Move Down 530 30 75 23 Add... 530 90 75 23 Move Up 530 60 75 23 Delete 10 20 501 201 Courier 10 Pitch 470 430 75 23 Run 560 430 75 23 Cancel HerculesStudio/HercUtilities/TapeSpltSubDlg.ui0000775000175000017500000000462312065055302021045 0ustar yakovyakov Dialog 0 0 554 204 Dialog 30 30 461 16 Name of output file: 30 60 461 20 500 60 31 23 ... 30 120 42 22 9 1 30 90 251 16 Number of blocks to extarct into this tape file: 30 160 75 23 Add 460 160 75 23 Cancel HerculesStudio/HercUtilities/TapeCopy.h0000664000175000017500000000254612065055302017545 0ustar yakovyakov/* * File: TapeCopy.h * * Author: Jacob Dekel * Created on: Aug 27, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: TapeCopy.h 161 2012-12-13 06:47:20Z dekeljacob $ * * tapecopy utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TAPECOPY_H #define TAPECOPY_H #include "GenericUtility.h" #include #include "ui_TapeCopy.h" class TapeCopy : public GenericUtility { Q_OBJECT public: TapeCopy(QWidget *parent = 0); ~TapeCopy(); private: Ui::TapeCopyClass ui; QRect mUpperGeometry, mLowerGeometry; virtual void finishedSlot(); public slots: void runClicked(); void cancelClicked(); void browseFileClicked(); void tapeToScsi(); void scsiToTape(); }; #endif // TAPECOPY_H HerculesStudio/HercUtilities/DasdInit.ui0000664000175000017500000003325112065055302017703 0ustar yakovyakov dasdinitClass 0 0 556 585 Dasdinit 10 30 521 121 Output Specification 10 30 71 16 Filename 90 20 381 26 10 70 61 16 Path 90 60 381 26 480 60 22 22 ... 10 190 521 181 Options false 120 20 75 26 None zlib bz2 expanding 20 30 101 16 Compression 20 60 181 22 Build One Large File 20 90 241 22 Include Alternate Cylinders 20 120 231 22 Raw Dasd Image File 20 150 251 22 Linux Formatted Dasd (cdl) 10 380 521 131 Device Specifications 170 25 91 31 20 2305 2305-1 2305-2 2311 2311-1 2314 2314-1 3330 3330-1 3330-2 3330-11 3340 3340-1 3340-35 3340-2 3340-70 3350 3350-1 3375 3375-1 3380 3380-1 3380-A 3380-B 3380-D 3380-J 3380-2 3380-E 3380-3 3380-K EMC3380K+ EMC3380K++ 3390 3390-1 3390-2 3390-3 3390-9 3390-27 3390-J 3390-54 3390-JJ 9345 9345-1 9345-2 3310 3310-1 3370 3370-1 3370-A1 3370-B1 3370-2 3370-A2 3370-B2 9332 9332-400 9332-600 9335 9313 9336 9336-10 9336-20 9336-25 0671 0671-04 0671-08 10 40 101 16 Device Type 172 70 101 26 6 10 80 161 16 Volume Serial Number 300 30 151 22 Irregular size 310 70 121 26 1000000 340 530 80 26 Run 450 530 80 26 Cancel true 10 160 521 23 0 true false HerculesStudio/HercUtilities/TapeMap.h0000664000175000017500000000246212065055302017345 0ustar yakovyakov/* * File: TapeMap.h * * Author: Jacob Dekel * Created on: Aug 26, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: TapeMap.h 161 2012-12-13 06:47:20Z dekeljacob $ * * tapemap utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TAPEMAP_H #define TAPEMAP_H #include "GenericUtility.h" #include #include "ui_TapeMap.h" #include class UtilityExecutor; class TapeMap : public GenericUtility { Q_OBJECT public: TapeMap(QWidget *parent = 0); ~TapeMap(); private slots: void exitClicked(); void runClicked(); void browseFileClicked(); private: Ui::TapeMapClass ui; void finishedSlot(); }; #endif // TAPEMAP_H HerculesStudio/HercUtilities/Dasdconv.ui0000664000175000017500000001601512065055302017744 0ustar yakovyakov DasdconvClass 0 0 556 657 Dasdconv 20 20 521 101 Input 100 50 381 26 490 50 22 22 ... 10 60 71 16 Input file 10 20 301 16 input HDR-30 CKD image file: 20 180 521 131 Output 80 50 401 26 80 90 401 26 490 90 22 22 ... 10 60 61 16 File Name 10 100 61 16 Path 10 20 321 16 AWSCKD image file to be created: 350 610 80 26 Run 450 610 80 26 Cancel true 20 140 521 23 0 true false 20 320 521 251 Options false 120 20 75 26 None zlib bz2 expanding 20 30 81 16 Compression 20 60 221 22 Build One Large File 20 90 221 22 Replace File If Exists 20 120 211 22 Raw Dasd Image File 20 150 251 22 Linux Formatted Dasd (cdl) HerculesStudio/HercUtilities/LineEditWithFocus.h0000664000175000017500000000250512065055302021345 0ustar yakovyakov/* * File: LineEditWithFocus.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: LineEditWithFocus.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object implements a QLineEdit which exports focus events * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef LINEEDITWITHFOCUS_H_ #define LINEEDITWITHFOCUS_H_ #include class LineEditWithFocus : public QLineEdit { Q_OBJECT public: LineEditWithFocus(QWidget* parent=0); virtual ~LineEditWithFocus(); protected: void focusInEvent(QFocusEvent *); void focusOutEvent(QFocusEvent *); signals: void FocusGained(); void FocusLost(); }; #endif /* LINEEDITWITHFOCUS_H_ */ HerculesStudio/HercUtilities/HetUpd.h0000775000175000017500000000250512065055302017210 0ustar yakovyakov/* * File: HetUpd.h * * Author: Jacob Dekel * Created on: Sep 3, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HetUpd.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Hetupd utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef HETUPD_H #define HETUPD_H #include "GenericUtility.h" #include #include "ui_HetUpd.h" class HetUpd : public GenericUtility { Q_OBJECT public: HetUpd(QWidget *parent = 0); ~HetUpd(); private: Ui::HetUpdClass ui; virtual void finishedSlot(); private slots: void exitClicked(); void runClicked(); void browseInFileClicked(); void browseOutDirClicked(); void browseOutFileClicked(); }; #endif // HETUPD_H HerculesStudio/HercUtilities/Dasdcat.ui0000664000175000017500000001236612065055302017553 0ustar yakovyakov DasdcatClass 0 0 556 435 Dasdcat 10 20 521 161 Input 140 30 341 26 490 30 22 22 ... 10 40 91 16 Ckd File: 140 70 341 26 490 70 22 22 ... 10 80 111 16 Shadow file 10 120 121 16 Dataset Name 140 110 341 26 10 200 521 171 Run Options 150 120 351 26 10 130 131 16 Membe name 10 40 201 22 List PDS members 10 60 291 22 Show specific member content 10 20 53 16 Mode 10 80 321 22 Show content of all members in PDS 450 390 80 26 Cancel 350 390 80 26 Run HerculesStudio/HercUtilities/DasdInit.cpp0000664000175000017500000001725612065055302020057 0ustar yakovyakov/* * File: DasdInit.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DasdInit.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "DasdInit.h" #include "UtilityExecutor.h" #include "UtilityRunner.h" #include "DasdTab.h" #include "LineEditWithFocus.h" #include "StringTokenizer.h" #include "Preferences.h" #include "ConfigurationEditor.h" #include "SystemUtils.h" #include #include #include #include #include #include #include #include DasdInit::DasdInit(QWidget *parent) : GenericUtility("dasdinit", parent) { ui.setupUi(this); ui.volser->setValidator(new VolserValidator(this)); QLineEdit *old = ui.filename; LineEditWithFocus * myLineEdit = new LineEditWithFocus(ui.groupBox); ui.filename = myLineEdit; ui.filename->setObjectName(old->objectName()); ui.filename->setGeometry(old->geometry()); delete old; ui.path->setText(Preferences::getInstance().configDir().c_str()); ui.progressBar->setVisible(false); ui.sizeSpinBox->setEnabled(false); ui.linuxCheckBox->setEnabled(false); setSizeValue(); connect(ui.rawCheckBox, SIGNAL(stateChanged(int)), this, SLOT(rawSlot(int))); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.exitButton, SIGNAL(clicked()), this, SLOT(exitClicked())); connect(ui.sizeCheckBox, SIGNAL(clicked()), this, SLOT(sizeClicked())); connect(ui.deviceTypeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(newDevType())); connect(ui.browseButton, SIGNAL(clicked()), this, SLOT(browseClicked())); connect(myLineEdit, SIGNAL(FocusGained()), this, SLOT(filenameFocus())); } DasdInit::~DasdInit() { } void DasdInit::rawSlot(int) { if (ui.rawCheckBox->isChecked()) { ui.volser->setEnabled(false); ui.volser->clear(); } else { ui.volser->setEnabled(!ui.rawCheckBox->isChecked()); } } void DasdInit::sizeClicked() { if (ui.sizeCheckBox->isChecked()) { ui.sizeSpinBox->setEnabled(true); setSizeValue(); } else { ui.sizeSpinBox->setEnabled(false); setSizeValue(); } } void DasdInit::setSizeValue() { int size = DasdTab::getInstance().getCkdSize(ui.deviceTypeComboBox->currentText().toStdString()); if (size == 0) { size = DasdTab::getInstance().getFbaSize(ui.deviceTypeComboBox->currentText().toStdString()); ui.altCheckBox->setEnabled(false); ui.altCheckBox->setChecked(false); } else { if (ui.sizeCheckBox->isChecked()) { ui.altCheckBox->setEnabled(false); ui.altCheckBox->setChecked(false); } else { ui.altCheckBox->setEnabled(true); } } ui.sizeSpinBox->setValue( size ); ui.progressBar->setMaximum(size); } void DasdInit::filenameFocus() { outDebug(2, std::cout << "dasdinit focus" << std::endl); if (ui.filename->text().length() == 0) { QString s = "dasd."; s += ui.deviceTypeComboBox->currentText(); if (DasdTab::getInstance().getCkdSize(ui.deviceTypeComboBox->currentText().toStdString()) > 0) s += ".ckd"; else s += ".fba"; ui.filename->setText(s); } } void DasdInit::exitClicked() { deleteLater(); } void DasdInit::runClicked() { if (!runOrStopClicked()) { ui.runButton->setText("Run"); return; } if (ui.filename->text().isEmpty() && !ui.rawCheckBox->isChecked()) { QMessageBox::warning(this, "dasdinit", "missing output file name", QMessageBox::Ok, QMessageBox::NoButton); return; } if (ui.volser->text().isEmpty() && !ui.rawCheckBox->isChecked()) { QMessageBox::warning(this, "dasdinit", "missing volume serial number", QMessageBox::Ok, QMessageBox::NoButton); return; } mEnded = false; std::vector parameters; switch (ui.compressionComboBox->currentIndex()) { case 1: parameters.push_back("-z"); break; case 2: parameters.push_back("-bz2"); break; case 3: parameters.push_back("-0"); break; default: break; } if (ui.lfsCheckBox->isChecked()) parameters.push_back("-lfs"); if (ui.altCheckBox->isChecked()) parameters.push_back("-a"); if (ui.rawCheckBox->isChecked()) parameters.push_back("-r"); if (ui.linuxCheckBox->isChecked()) parameters.push_back("-linux"); std::string fullPath; if (ui.path->text().length() > 0) { fullPath = ui.path->text().toStdString(); fullPath += "/"; } fullPath += ui.filename->text().toStdString(); parameters.push_back(fullPath); parameters.push_back(ui.deviceTypeComboBox->currentText().toStdString()); if (!ui.rawCheckBox->isChecked()) parameters.push_back(ui.volser->text().toStdString()); if (ui.sizeCheckBox->isChecked()) parameters.push_back(ui.sizeSpinBox->text().toStdString()); std::string command = "dasdinit"; std::string path = Preferences::getInstance().hercDir(); ui.progressBar->setVisible(true); execute(command, path, parameters); connect(mRunner, SIGNAL(valueChanged(int)), this, SLOT(runnerValueChanged(int))); connect(mRunner, SIGNAL(maximumChanged(int)), this, SLOT(runnerMaximumChanged(int))); connect(mErrorRunner, SIGNAL(valueChanged(int)), this, SLOT(runnerValueChanged(int))); connect(mErrorRunner, SIGNAL(maximumChanged(int)), this, SLOT(runnerMaximumChanged(int))); ui.runButton->setText("Stop"); } void DasdInit::newDevType() { if (ui.deviceTypeComboBox->currentText().toStdString().compare(0,4,"3390") == 0) ui.linuxCheckBox->setEnabled(true); else { ui.linuxCheckBox->setEnabled(false); ui.linuxCheckBox->setChecked(false); } setSizeValue(); } void DasdInit::browseClicked() { QString s = QFileDialog::getExistingDirectory(this,"Browse for dasd path",ui.path->text()); ui.path->setText(s); } void DasdInit::runnerMaximumChanged(int maximum) { ui.progressBar->setMaximum(maximum); } void DasdInit::runnerValueChanged(int value) { if (value > 0) ui.progressBar->setValue(value); else ui.progressBar->setValue(ui.progressBar->maximum()); } void DasdInit::initialize() { } DasdInit::VolserValidator::VolserValidator(QObject * parent ) : QValidator(parent) { } QValidator::State DasdInit::VolserValidator::validate(QString & input, int & ) const { if (input.length() > 6) return Invalid; input = input.toUpper(); return Acceptable; } void DasdInit::finishedSlot() { if (mExecutor == NULL) { ui.progressBar->setValue(ui.progressBar->maximum()); if (mRc == 0) QMessageBox::information(this, "dasdinit", "Disk creation successfully completed!", QMessageBox::Ok, QMessageBox::NoButton); } deleteLater(); } HerculesStudio/HercUtilities/HetInit.ui0000775000175000017500000001065612065055302017557 0ustar yakovyakov HetInitClass 0 0 549 328 Dialog 20 20 421 91 Options 20 20 46 14 volser 130 40 121 20 130 20 46 14 Owner 270 20 221 18 No-Label 270 50 241 18 Disable compression 20 120 421 141 Output 30 40 331 20 30 20 131 16 File Name 380 40 21 23 ... 30 100 331 20 true 30 70 131 16 Directory 380 100 21 23 ... 350 280 75 23 Run 450 280 75 23 Cancel HerculesStudio/HercUtilities/GenericUtility.cpp0000775000175000017500000000740212065055302021313 0ustar yakovyakov/* * File: GenericUtility.h * * Author: Jacob Dekel * Created on: Aug 26, 2010 * * Copyright (c) 2010 Jacob Dekel * $Id: GenericUtility.cpp 114 2011-03-02 19:35:46Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "GenericUtility.h" #include "UtilityExecutor.h" #include #include GenericUtility::GenericUtility(QString name, QWidget *parent) : QDialog(parent), mName(name), mExecutor(NULL), mRunner(NULL), mErrorRunner(NULL) { } GenericUtility::~GenericUtility() { delete mRunner; delete mErrorRunner; delete mExecutor; } bool GenericUtility::runOrStopClicked() { if (mExecutor != NULL) { mExecutor->terminate(); mExecutor = NULL; QMessageBox::warning(this, mName, mName +" operation was aborted at user's request", QMessageBox::Ok, QMessageBox::NoButton); return false; } else { return true; } } int GenericUtility::execute(const std::string & command, const std::string& path, std::vector& parameters) { mStarted = true; mFinished = false; parameters.push_back("EXTERNALGUI"); mExecutor = new UtilityExecutor(this); mRunner = new UtilityRunner(mExecutor); mErrorRunner = new UtilityRunner(mExecutor); emit output(getFlatCommand(command,path,parameters).c_str()); int ret = mExecutor->run(command, path, parameters, mRunner, mErrorRunner); // do not wait forever //QTimer::singleShot(2000, this, SLOT(timeout())); // we should know if finished connect(mExecutor->getQProcess(),SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(finished(int, QProcess::ExitStatus))); // connect to default handlers (superclass can override these slots) connect(mRunner, SIGNAL(error(QByteArray)), this, SLOT(runnerError(QByteArray))); connect(mErrorRunner, SIGNAL(error(QByteArray)), this, SLOT(runnerError(QByteArray))); // general error status handler connect(this, SIGNAL(error()), this, SLOT(errorSlot())); return ret; } void GenericUtility::timeout() { } void GenericUtility::finished(int result, QProcess::ExitStatus status) { mFinished = true; mRc = result; mFinishedOK = ( (status==QProcess::NormalExit) && (mRc == 0) ); QByteArray rcLine = mName.toAscii() + " ended; rc="; rcLine += QString::number(result); emit output(rcLine); finishedSlot(); } void GenericUtility::errorSlot() { QMessageBox::warning(this, mName, mName + " failed. Please check the log for details", QMessageBox::Ok, QMessageBox::NoButton); deleteLater(); } void GenericUtility::runnerError(const QByteArray& line) { emit output(line); } std::string GenericUtility::getFlatCommand(const std::string & command, const std::string& path, std::vector& parameters) { std::string result; result = path; if (path.size() > 0 ) result += "/"; result+=command; for (unsigned int i = 0; i < parameters.size()-1; i++) { result += " "; result+=parameters[i]; } return result; } HerculesStudio/HercUtilities/TapeSplt.h0000775000175000017500000000560712065055302017561 0ustar yakovyakov/* * File: TapeSplt.h * * Author: Jacob Dekel * Created on: Aug 31, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: TapeSplt.h 161 2012-12-13 06:47:20Z dekeljacob $ * * tapesplt utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TAPESPLT_H #define TAPESPLT_H #include "GenericUtility.h" #include "ui_TapeSplt.h" #include #include #include #include #include #include #include class TapeSpltSubDlg : public QDialog { Q_OBJECT public: TapeSpltSubDlg(QWidget *parent = 0); virtual ~TapeSpltSubDlg(); private: QLabel *label; QLineEdit *lineEdit; QPushButton *selOutputButton; QSpinBox *spinBox; QLabel *label_2; QPushButton *addButton; QPushButton *cancelButton; QTableView *tableView; void setupUi(); private slots: void selectOutputSlot(); void addSlot(); void cancelSlot(); signals: void fileNameSet(QString, int); }; #define HTableType std::vector class HTableModel : public QAbstractTableModel { public: HTableModel(QObject * parent = 0); virtual ~HTableModel(); virtual int rowCount(const QModelIndex &parent = QModelIndex()) const; virtual int columnCount(const QModelIndex &parent = QModelIndex()) const; bool insertRow(int row, const QModelIndex &, QString, QString); bool removeRow ( int row, const QModelIndex & parent = QModelIndex() ); virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; virtual QVariant rowData(const QModelIndex &index) const; virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const; bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); private: HTableType mTable; }; class TapeSplt : public GenericUtility { Q_OBJECT public: TapeSplt(QWidget *parent = 0); ~TapeSplt(); private: Ui::TapeSpltClass ui; HTableModel *mModel; int mMaxFile; virtual void finishedSlot(); QString genLine(QString file, int blocks); private slots: void runClicked(); void cancelClicked(); void selectInputClicked(); void addClicked(); void deleteClicked(); void downClicked(); void upClicked(); void fileNameSetSlot(QString, int); }; #endif // TAPESPLT_H HerculesStudio/HercUtilities/Dasdconv.cpp0000664000175000017500000001165612065055302020117 0ustar yakovyakov/* * File: Dasdconv.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Dasdconv.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Dasdconv.h" #include "HerculesStudio.h" #include "UtilityExecutor.h" #include "UtilityRunner.h" #include "Preferences.h" #include #include #include Dasdconv::Dasdconv(QWidget *parent) : GenericUtility("dasdconv",parent) { ui.setupUi(this); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.exitButton, SIGNAL(clicked()), this, SLOT(exitClicked())); connect(ui.browseFileButton, SIGNAL(clicked()), this, SLOT(browseFileClicked())); connect(ui.browseOutButton, SIGNAL(clicked()), this, SLOT(browseOutClicked())); } Dasdconv::~Dasdconv() { } void Dasdconv::runClicked() { if (!runOrStopClicked()) { ui.runButton->setText("Run"); return; } if (ui.infile->text().isEmpty()) { QMessageBox::warning(this, "dasdconv", "Please specify input file to convert", QMessageBox::Ok, QMessageBox::NoButton); return; } if (!QFile::exists(ui.infile->text())) { QMessageBox::warning(this, "dasdconv", "Input file does not exist", QMessageBox::Ok, QMessageBox::NoButton); return; } if (ui.filename->text().isEmpty()) { QMessageBox::warning(this, "dasdconv", "Please specify ckd file to create", QMessageBox::Ok, QMessageBox::NoButton); return; } if (ui.path->text().isEmpty()) { QMessageBox::warning(this, "dasdconv", "Please specify output directory", QMessageBox::Ok, QMessageBox::NoButton); return; } if (!QFile::exists(ui.path->text())) { QMessageBox::warning(this, "dasdconv", "Output directory does not exist", QMessageBox::Ok, QMessageBox::NoButton); return; } QFileInfo dirInfo(ui.path->text()); if (!dirInfo.isDir()) { QMessageBox::warning(this, "dasdconv", "Output path is not a directory", QMessageBox::Ok, QMessageBox::NoButton); return; } std::vector parameters; if (ui.replaceCheckbox->isChecked()) parameters.push_back("-r"); if (ui.lfsCheckbox->isChecked()) parameters.push_back("-lfs"); parameters.push_back(ui.infile->text().toStdString()); std::string fullPath; if (ui.path->text().length() > 0) { fullPath = ui.path->text().toStdString(); fullPath += "/"; } fullPath += ui.filename->text().toStdString(); parameters.push_back(fullPath); std::string command = "dasdconv"; execute(command, Preferences::getInstance().hercDir(), parameters); connect(mRunner, SIGNAL(valueChanged(int)), this, SLOT(runnerValueChanged(int))); connect(mRunner, SIGNAL(maximumChanged(int)), this, SLOT(runnerMaximumChanged(int))); connect(mRunner, SIGNAL(error(QByteArray)), this, SLOT(runnerError(QByteArray))); connect(mErrorRunner, SIGNAL(valueChanged(int)), this, SLOT(runnerValueChanged(int))); connect(mErrorRunner, SIGNAL(maximumChanged(int)), this, SLOT(runnerMaximumChanged(int))); ui.runButton->setText("Stop"); } void Dasdconv::exitClicked() { deleteLater(); } void Dasdconv::browseFileClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for input disk",ui.filename->text()); ui.infile->setText(s); if (ui.path->text().isEmpty()) { QDir d("/"); std::string path = d.absoluteFilePath(s).toStdString(); int lastSlash = s.toStdString().find_last_of('/'); ui.path->setText(path.substr(0,lastSlash).c_str()); } } void Dasdconv::browseOutClicked() { QString s = QFileDialog::getExistingDirectory(this,"Browse for output file path",ui.path->text()); ui.path->setText(s); } void Dasdconv::runnerMaximumChanged(int maximum) { ui.progressBar->setMaximum(maximum); } void Dasdconv::runnerValueChanged(int value) { outDebug(5, std::cout << "dasdconv got value changed " << value << std::endl); if (value > 0) ui.progressBar->setValue(value); else { ui.progressBar->setValue(ui.progressBar->maximum()); } } void Dasdconv::finishedSlot() { deleteLater(); } HerculesStudio/HercUtilities/UtilityRunner.h0000664000175000017500000000303212065055302020645 0ustar yakovyakov/* * File: UtilityRunner.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: UtilityRunner.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object tracks on running utilites and updates their status * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include #include #ifndef UTILIYRUNNER_H_ #define UTILIYRUNNER_H_ class UtilityExecutor; class UtilityRunner : public QThread { Q_OBJECT public: UtilityRunner(UtilityExecutor * utilityExecutor); virtual ~UtilityRunner(); void run(); signals: void valueChanged(int value); void maximumChanged(int maximum); void error(QByteArray errorLine); private: UtilityExecutor * mUtilityExecutor; QProcess * mProcess; void updateStatus(const std::string& line); private slots: void readStandardOutput(); void readStandardError(); }; #endif /* UTILIYRUNNER_H_ */ HerculesStudio/HercUtilities/Dasdcat.cpp0000664000175000017500000000744312065055302017720 0ustar yakovyakov/* * File: Dasdcat.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Dasdcat.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Dasdcat.h" #include "HerculesStudio.h" #include "UtilityRunner.h" #include "Preferences.h" #include #include #include Dasdcat::Dasdcat(QWidget *parent) : GenericUtility("dasdcat",parent) { ui.setupUi(this); ui.listRadioButton->setChecked(true); ui.memberName->setDisabled(true); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.exitButton, SIGNAL(clicked()), this, SLOT(exitClicked())); connect(ui.browseFileButton, SIGNAL(clicked()), this, SLOT(browseFileClicked())); connect(ui.browseSfButton, SIGNAL(clicked()), this, SLOT(browseSfClicked())); connect(ui.specificRadioButton, SIGNAL(toggled(bool)), this, SLOT(specificToggeled(bool))); } Dasdcat::~Dasdcat() { } void Dasdcat::runClicked() { if (!runOrStopClicked()) { ui.runButton->setText("Run"); return; } if (ui.filename->text().isEmpty()) { QMessageBox::warning(this, "dasdcat", "Please specify ckd file to process", QMessageBox::Ok, QMessageBox::NoButton); return; } if (ui.dsname->text().isEmpty()) { QMessageBox::warning(this, "dasdcat", "Please specify PDS name", QMessageBox::Ok, QMessageBox::NoButton); return; } std::vector parameters; parameters.push_back("-i"); parameters.push_back(ui.filename->text().toStdString()); if (!ui.shadowFile->text().isEmpty()) { std::string sf = "sf="; sf += ui.shadowFile->text().toStdString(); parameters.push_back(sf); } std::string dsnameSpec = ui.dsname->text().toStdString(); dsnameSpec += "/"; if (ui.listRadioButton->isChecked()) { dsnameSpec+= "?"; } else if (ui.specificRadioButton->isChecked()) { if (ui.memberName->text().isEmpty()) { QMessageBox::warning(this, "dasdcat", "Member name must be provided when selecting\n'show specific member content'", QMessageBox::Ok, QMessageBox::NoButton); return; } dsnameSpec += ui.memberName->text().toStdString(); dsnameSpec += ":c"; // make it readable on log } else if (ui.allRadioButton) { dsnameSpec += "*:c"; } parameters.push_back(dsnameSpec); std::string command = "dasdcat"; execute(command, Preferences::getInstance().hercDir(), parameters); ui.runButton->setText("Stop"); } void Dasdcat::exitClicked() { deleteLater(); } void Dasdcat::browseFileClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for disk to update",ui.filename->text()); ui.filename->setText(s); } void Dasdcat::browseSfClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for shadow file",ui.shadowFile->text()); ui.shadowFile->setText(s); } void Dasdcat::specificToggeled(bool checked) { ui.memberName->setEnabled(checked); } void Dasdcat::finishedSlot() { } HerculesStudio/HercUtilities/Dasdcopy.cpp0000664000175000017500000001366012065055302020121 0ustar yakovyakov/* * File: Dasdcopy.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Dasdcopy.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Dasdcopy.h" #include "HerculesStudio.h" #include "UtilityExecutor.h" #include "UtilityRunner.h" #include "Preferences.h" #include #include #include Dasdcopy::Dasdcopy(QWidget *parent) : GenericUtility("dasdcopy",parent) { ui.setupUi(this); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.exitButton, SIGNAL(clicked()), this, SLOT(exitClicked())); connect(ui.browseFileButton, SIGNAL(clicked()), this, SLOT(browseFileClicked())); connect(ui.browseSfButton, SIGNAL(clicked()), this, SLOT(browseShadowClicked())); connect(ui.browseOutButton, SIGNAL(clicked()), this, SLOT(browseOutClicked())); } Dasdcopy::~Dasdcopy() { } void Dasdcopy::runClicked() { if (!runOrStopClicked()) { ui.runButton->setText("Run"); return; } if (ui.infile->text().isEmpty()) { QMessageBox::warning(this, "dasdcopy", "Please specify input file to convert", QMessageBox::Ok, QMessageBox::NoButton); return; } if (!QFile::exists(ui.infile->text())) { QMessageBox::warning(this, "dasdcopy", "Input file does not exist", QMessageBox::Ok, QMessageBox::NoButton); return; } if (ui.filename->text().isEmpty()) { QMessageBox::warning(this, "dasdcopy", "Please specify ckd file to create", QMessageBox::Ok, QMessageBox::NoButton); return; } if (ui.path->text().isEmpty()) { QMessageBox::warning(this, "dasdcopy", "Please specify output directory", QMessageBox::Ok, QMessageBox::NoButton); return; } if (!QFile::exists(ui.path->text())) { QMessageBox::warning(this, "dasdcopy", "Output directory does not exist", QMessageBox::Ok, QMessageBox::NoButton); return; } QFileInfo dirInfo(ui.path->text()); if (!dirInfo.isDir()) { QMessageBox::warning(this, "dasdcopy", "Output path is not a directory", QMessageBox::Ok, QMessageBox::NoButton); return; } std::vector parameters; if (ui.replaceCheckbox->isChecked()) parameters.push_back("-r"); if (ui.lfsCheckbox->isChecked()) parameters.push_back("-lfs"); switch (ui.compressionComboBox->currentIndex()) { case 1: parameters.push_back("-z"); break; case 2: parameters.push_back("-bz2"); break; default: break; } parameters.push_back(ui.infile->text().toStdString()); std::string fullPath; if (ui.path->text().length() > 0) { fullPath = ui.path->text().toStdString(); fullPath += "/"; } fullPath += ui.filename->text().toStdString(); parameters.push_back(fullPath); std::string command = "dasdcopy"; std::string path = Preferences::getInstance().hercDir(); execute(command, path, parameters); mFirstEndReceived = false; connect(mRunner, SIGNAL(valueChanged(int)), this, SLOT(runnerValueChanged(int))); connect(mRunner, SIGNAL(maximumChanged(int)), this, SLOT(runnerMaximumChanged(int))); connect(mErrorRunner, SIGNAL(valueChanged(int)), this, SLOT(runnerValueChanged(int))); connect(mErrorRunner, SIGNAL(maximumChanged(int)), this, SLOT(runnerMaximumChanged(int))); ui.runButton->setText("Stop"); } void Dasdcopy::exitClicked() { deleteLater(); } void Dasdcopy::browseFileClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for input disk",ui.infile->text()); ui.infile->setText(s); if (ui.path->text().isEmpty()) { QDir d("/"); std::string path = d.absoluteFilePath(s).toStdString(); int lastSlash = s.toStdString().find_last_of('/'); ui.path->setText(path.substr(0,lastSlash).c_str()); } } void Dasdcopy::browseShadowClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for input disk",ui.shadowFile->text()); ui.shadowFile->setText(s); } void Dasdcopy::browseOutClicked() { QString s = QFileDialog::getExistingDirectory(this,"Browse for output file path",ui.path->text()); ui.path->setText(s); } void Dasdcopy::runnerMaximumChanged(int maximum) { ui.progressBar->setMaximum(maximum); } void Dasdcopy::runnerValueChanged(int value) { outDebug(3, std::cout << "dasdcopy got value changed " << value << std::endl); if (value >= 0) ui.progressBar->setValue(value); else { if (!mFirstEndReceived) { mFirstEndReceived = true; } else if (mExecutor != NULL) { mExecutor = NULL; QMessageBox::warning(this, "dasdcopy", "Disk copy failed", QMessageBox::Ok, QMessageBox::NoButton); } } } void Dasdcopy::finishedSlot() { if (mStarted && mFinished && mFinishedOK) { ui.progressBar->setValue(ui.progressBar->maximum()); QMessageBox::information(this, "dasdcopy", "Disk was successfully copied", QMessageBox::Ok, QMessageBox::NoButton); } deleteLater(); } HerculesStudio/HercUtilities/DasdLoad.ui0000664000175000017500000001340212065055302017653 0ustar yakovyakov DasdLoadClass 0 0 556 485 Dasdload 20 20 521 91 Input 80 30 401 26 490 30 22 22 ... 10 40 71 16 Contol File: 20 160 521 111 Output 80 30 401 26 80 70 401 26 490 70 22 22 ... 10 40 61 16 File Name 10 80 61 16 Path 20 290 521 131 Options 110 20 75 26 None zlib bz2 expanding 10 30 81 16 Compression 10 60 181 22 Build One Large File 10 90 191 22 Include Alternate Cylinders 360 440 80 26 Run 460 440 80 26 Cancel true 20 120 521 23 0 true false HerculesStudio/HercUtilities/DasdTab.h0000664000175000017500000000260312065055302017315 0ustar yakovyakov/* * File: DasdTab.h * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DasdTab.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This singleton object holds the table of dasds * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DASDTAB_H_ #define DASDTAB_H_ #include #include typedef std::pair SizePair; typedef std::map SizeMap; class DasdTab { public: virtual ~DasdTab(); static DasdTab& getInstance(); static int getCkdSize(const std::string& dev); static int getFbaSize(const std::string& dev); private: static SizeMap ckdTab; static SizeMap fbaTab; static DasdTab mInstance; DasdTab(); void init(); }; #endif /* DASDTAB_H_ */ HerculesStudio/HercUtilities/HetInit.h0000775000175000017500000000344212065055302017364 0ustar yakovyakov/* * File: HetInit.h * * Author: Jacob Dekel * Created on: Sep 3, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HetInit.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Hetinit utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef HETINIT_H #define HETINIT_H #include "GenericUtility.h" #include #include #include "ui_HetInit.h" class VolserSpinBox : public QAbstractSpinBox { Q_OBJECT public: VolserSpinBox(QWidget * parent = 0); virtual ~VolserSpinBox(); virtual QFlags stepEnabled () const; virtual QString text() const; virtual void setText(QString text); protected: QFlags mStepFlag; virtual void stepBy (int steps); protected slots: bool verify(); }; class HetInit : public GenericUtility { Q_OBJECT public: HetInit(QWidget *parent = 0); ~HetInit(); private: Ui::HetInitClass ui; QAbstractSpinBox *mVolser; virtual void finishedSlot(); private slots: void exitClicked(); void runClicked(); void browseFileClicked(); void browseDirClicked(); }; #endif // HETINIT_H HerculesStudio/HercUtilities/HetMap.ui0000775000175000017500000000750512065055302017370 0ustar yakovyakov HetMapClass 0 0 589 315 HetMapClass 10 20 501 80 Input 10 30 61 16 File Name 80 30 371 20 470 30 21 23 ... 10 120 501 121 Options 260 30 281 18 Print Only Dataset Information 20 60 171 18 Print File Information 20 90 161 20 Print Label Information 20 30 161 18 Print Everything true 260 60 271 20 Tapemap-compatible format output 380 270 75 23 Run 480 270 75 23 Cancel HerculesStudio/HercUtilities/Dasdls.cpp0000664000175000017500000000627512065055302017571 0ustar yakovyakov/* * File: Dasdls.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: Dasdls.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "Dasdls.h" #include "HerculesStudio.h" #include "UtilityRunner.h" #include "Preferences.h" #include "StringTokenizer.h" #include #include #include Dasdls::Dasdls(QWidget *parent) : GenericUtility("dasdls",parent) { ui.setupUi(this); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.exitButton, SIGNAL(clicked()), this, SLOT(exitClicked())); connect(ui.browseFileButton, SIGNAL(clicked()), this, SLOT(browseFileClicked())); connect(ui.browseSfButton, SIGNAL(clicked()), this, SLOT(browseSfClicked())); } Dasdls::~Dasdls() { } void Dasdls::exitClicked() { deleteLater(); } void Dasdls::runClicked() { if (!runOrStopClicked()) { ui.runButton->setText("Run"); return; } if (ui.filename->text().isEmpty()) { QMessageBox::warning(this, "dasdls", "Please specify ckd file to process", QMessageBox::Ok, QMessageBox::NoButton); return; } std::vector parameters; parameters.push_back(ui.filename->text().toStdString()); if (!ui.shadowFile->text().isEmpty()) { parameters.push_back("sf=" + ui.shadowFile->text().toStdString()); } std::string command = "dasdls"; execute(command, Preferences::getInstance().hercDir(), parameters); connect(mErrorRunner, SIGNAL(valueChanged(int)), this, SLOT(runnerValueChanged(int))); connect(mErrorRunner, SIGNAL(maximumChanged(int)), this, SLOT(runnerMaximumChanged(int))); ui.runButton->setText("Stop"); } void Dasdls::browseFileClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for disk to list",ui.filename->text()); ui.filename->setText(s); } void Dasdls::browseSfClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for shadow file",ui.shadowFile->text()); ui.shadowFile->setText(s); } void Dasdls::runnerMaximumChanged(int maximum) { mMaximum = maximum; outDebug(2, std::cout << "dasdls maximum is " << maximum << std::endl); } void Dasdls::runnerValueChanged(int value) { hOutDebug(2,"value:" << value); return; } void Dasdls::finishedSlot() { mExecutor = NULL; if (mFinishedOK) { QMessageBox::information(this, "dasdls", "Disk listing successfully completed!", QMessageBox::Ok, QMessageBox::NoButton); } ui.runButton->setText("Run"); deleteLater(); } HerculesStudio/HercUtilities/SystemUtils.h0000664000175000017500000000236012065055302020320 0ustar yakovyakov/* * File: SystemUtils.h * * Author: Jacob Dekel * Created on: Aug 24, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: SystemUtils.h 161 2012-12-13 06:47:20Z dekeljacob $ * * This object provides system-level utilities to other utilities * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef SYSTEMUTILS_H_ #define SYSTEMUTILS_H_ #include #include class SystemUtils { public: SystemUtils(); virtual ~SystemUtils(); static bool processIsRunning(int pid); static bool fileExists(const std::string& filename); static bool fileExists(const QString& filename); }; #endif /* SYSTEMUTILS_H_ */ HerculesStudio/HercUtilities/HetGet.ui0000775000175000017500000002454412065055302017374 0ustar yakovyakov HetGetClass 0 0 575 454 Dialog 30 10 531 61 Input File 90 30 391 20 10 30 71 16 File Name 500 30 21 21 ... 30 190 531 201 Options 30 20 241 18 Input Tape is Non-Labeled 310 20 42 22 1 9999 360 25 131 16 Input File Number 30 60 69 22 9 F FA FB FBA FBM FBS FBSA FBSM FM FS FSA FSM U UA UM V VA VB VBA VBM VBS VBSA VBSM VM VS VSA VSM 110 65 46 14 Recfm 180 60 91 22 32767 80 290 65 61 16 Lrecl 330 60 101 22 32768 1600 450 65 71 16 Blksize 20 100 421 18 Convert Output To ASCII (Implies Unblock) 20 130 421 18 Unblock (Removes BDWs And RDWs If RECFM=V) 20 160 431 18 Strip Trailing Blanks (requires Convert To Ascii) 390 420 75 23 Run 480 420 75 23 Cancel 30 80 531 91 Output File 100 30 381 20 500 30 21 23 ... 100 60 381 20 500 60 21 23 ... 20 30 71 16 Output Dir 20 60 71 16 File Name HerculesStudio/HercUtilities/DasdLoad.cpp0000664000175000017500000001042612065055302020023 0ustar yakovyakov/* * File: DasdLoad.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DasdLoad.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "DasdLoad.h" #include "UtilityExecutor.h" #include "UtilityRunner.h" #include "StringTokenizer.h" #include #include #include DasdLoad::DasdLoad(QWidget *parent) : QDialog(parent) { ui.setupUi(this); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.exitButton, SIGNAL(clicked()), this, SLOT(exitClicked())); connect(ui.browseCtlButton, SIGNAL(clicked()), this, SLOT(browseCtlClicked())); connect(ui.browseOutButton, SIGNAL(clicked()), this, SLOT(browseOutClicked())); } DasdLoad::~DasdLoad() { } void DasdLoad::exitClicked() { deleteLater(); } void DasdLoad::runClicked() { if (mExecutor != NULL) { mExecutor->terminate(); QMessageBox::warning(this, "dasdload", "dasdload operation was aborted at user's request", QMessageBox::Ok, QMessageBox::NoButton); ui.runButton->setText("Ok"); return; } mEnded = false; std::vector parameters; switch (ui.compressionComboBox->currentIndex()) { case 1: parameters.push_back("-z"); break; case 2: parameters.push_back("-bz2"); break; case 3: parameters.push_back("-0"); break; default: break; } if (ui.lfsCheckBox->isChecked()) parameters.push_back("-lfs"); if (ui.altCheckBox->isChecked()) parameters.push_back("-a"); parameters.push_back(ui.control->text().toStdString()); std::string fullPath; if (ui.path->text().length() > 0) { fullPath = ui.path->text().toStdString(); fullPath += "/"; } fullPath += ui.filename->text().toStdString(); parameters.push_back(fullPath); parameters.push_back("EXTERNALGUI"); std::string command = "dasdload"; std::string path = ""; ui.progressBar->setVisible(true); mExecutor = new UtilityExecutor(); UtilityRunner * runner = new UtilityRunner(mExecutor); runner->start(); UtilityRunner * errorRunner = new UtilityRunner(mExecutor); errorRunner->start(); mExecutor->run(command, path, parameters, runner, errorRunner); connect(runner, SIGNAL(valueChanged(int)), this, SLOT(runnerValueChanged(int))); connect(runner, SIGNAL(maximumChanged(int)), this, SLOT(runnerMaximumChanged(int))); connect(runner, SIGNAL(error(QByteArray)), this, SLOT(errorRunner(QByteArray))); connect(errorRunner, SIGNAL(valueChanged(int)), this, SLOT(runnerValueChanged(int))); connect(errorRunner, SIGNAL(maximumChanged(int)), this, SLOT(runnerMaximumChanged(int))); connect(errorRunner, SIGNAL(error(QByteArray)), this, SLOT(errorRunner(QByteArray))); ui.runButton->setText("Stop"); } void DasdLoad::browseCtlClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for input file path",ui.path->text()); ui.control->setText(s); } void DasdLoad::browseOutClicked() { QString s = QFileDialog::getExistingDirectory(this,"Browse for output file path",ui.path->text()); ui.path->setText(s); } void DasdLoad::runnerMaximumChanged(int maximum) { ui.progressBar->setMaximum(maximum); } void DasdLoad::runnerValueChanged(int value) { if (value > 0) ui.progressBar->setValue(value); else ui.progressBar->setValue(ui.progressBar->maximum()); } HerculesStudio/HercUtilities/DasdIsup.cpp0000664000175000017500000000725112065055302020066 0ustar yakovyakov/* * File: DasdIsup.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: DasdIsup.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "DasdIsup.h" #include "UtilityExecutor.h" #include "UtilityRunner.h" #include "StringTokenizer.h" #include "Preferences.h" #include #include #include DasdIsup::DasdIsup(QWidget *parent) : GenericUtility("dasdisup",parent) { ui.setupUi(this); ui.progressBar->setVisible(false); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.exitButton, SIGNAL(clicked()), this, SLOT(exitClicked())); connect(ui.browseFileButton, SIGNAL(clicked()), this, SLOT(browseFileClicked())); connect(ui.browseSfButton, SIGNAL(clicked()), this, SLOT(browseSfClicked())); } DasdIsup::~DasdIsup() { } void DasdIsup::exitClicked() { deleteLater(); } void DasdIsup::runClicked() { if ((mExecutor != NULL) && (mExecutor->getQProcess()->state() == QProcess::Running)) { mExecutor->terminate(); QMessageBox::warning(this, "dasdisup", "dasdisup operation was aborted at user's request", QMessageBox::Ok, QMessageBox::NoButton); mExecutor = NULL; ui.runButton->setText("Run"); return; } if (ui.filename->text().isEmpty()) { QMessageBox::warning(this, "dasdisup", "Please specify ckd file to process", QMessageBox::Ok, QMessageBox::NoButton); } std::vector parameters; parameters.push_back(ui.filename->text().toStdString()); if (!ui.shadowFile->text().isEmpty()) { parameters.push_back(ui.shadowFile->text().toStdString()); } parameters.push_back("EXTERNALGUI"); std::string command = "dasdisup"; ui.progressBar->setVisible(true); execute(command, Preferences::getInstance().hercDir(), parameters); connect(mRunner, SIGNAL(valueChanged(int)), this, SLOT(runnerValueChanged(int))); connect(mRunner, SIGNAL(maximumChanged(int)), this, SLOT(runnerMaximumChanged(int))); connect(mRunner, SIGNAL(error(QByteArray)), this, SLOT(runnerError(QByteArray))); ui.runButton->setText("Stop"); } void DasdIsup::browseFileClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for disk to update",ui.filename->text()); ui.filename->setText(s); } void DasdIsup::browseSfClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for shadow file",ui.shadowFile->text()); ui.shadowFile->setText(s); } void DasdIsup::runnerMaximumChanged(int maximum) { ui.progressBar->setMaximum(maximum); outDebug(2, std::cout << "dasdisup maximum is " << maximum << std::endl); } void DasdIsup::runnerValueChanged(int value) { if (value > 0) ui.progressBar->setValue(value); else if (value < 0) { ui.progressBar->setValue(ui.progressBar->maximum()); } } void DasdIsup::finishedSlot() { QMessageBox::information(this, "dasdisup", "Disk update successfully completed!", QMessageBox::Ok, QMessageBox::NoButton); deleteLater(); } HerculesStudio/HercUtilities/TapeMap.ui0000664000175000017500000000444712065055302017540 0ustar yakovyakov TapeMapClass 0 0 586 185 TapeMap 30 40 521 81 Input 90 30 391 26 490 30 22 22 ... 10 40 71 16 Tape File: 370 140 85 27 Run 480 140 85 27 Cancel 30 10 391 16 Print a Map Of an AWS Tape File HerculesStudio/HercUtilities/UtilityExecutor.cpp0000664000175000017500000000503612065055302021533 0ustar yakovyakov/* * File: UtilityExecutor.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: UtilityExecutor.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "UtilityExecutor.h" #include "HerculesStudio.h" #include "UtilityRunner.h" #include #include #include #include #include UtilityExecutor::UtilityExecutor(QObject *parent) :QObject(parent) { mProcess = NULL; } UtilityExecutor::~UtilityExecutor() { } int UtilityExecutor::run(const std::string & pCommand, const std::string& pPath, std::vector pParameters, UtilityRunner * runner, UtilityRunner * errorRunner) { QString program = pPath.c_str(); if (pPath.size() > 0) program += "/"; program += pCommand.c_str(); QStringList arguments; for (unsigned int i=0; istart(); connect(mProcess, SIGNAL(readyReadStandardOutput()), runner, SLOT(readStandardOutput())); } if (errorRunner != NULL) { errorRunner->start(); connect(mProcess, SIGNAL(readyReadStandardError()), errorRunner, SLOT(readStandardError())); } for (int i=0 ; istart(program,arguments); Q_PID pid = mProcess->pid(); if (pid != 0) return 0; else return -1; } bool UtilityExecutor::running() { if (mProcess != NULL) return mProcess->state() == QProcess::Running; else return false; } void UtilityExecutor::terminate() { if (mProcess != NULL) { mProcess->close(); mProcess = NULL; } } HerculesStudio/HercUtilities/HetMap.h0000775000175000017500000000276612065055302017206 0ustar yakovyakov/* * File: HetMap.h * * Author: Jacob Dekel * Created on: Sep 6, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HetMap.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Hetmap utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef HETMAP_H #define HETMAP_H #include "GenericUtility.h" #include #include "ui_HetMap.h" class HetMap : public GenericUtility { Q_OBJECT public: HetMap(QWidget *parent = 0); ~HetMap(); private: Ui::HetMapClass ui; bool mInternalChange; // check box changed internally - no need to propagate virtual void finishedSlot(); private slots: void exitClicked(); void runClicked(); void allClicked(); void fileInfoClicked(); void labelInfoClicked(); void dataInfoClicked(); void tapemapClicked(); void browseFileClicked(); void runnerError(const QByteArray &line); }; #endif // HETMAP_H HerculesStudio/HercUtilities/HetUpd.ui0000775000175000017500000001737112065055302017405 0ustar yakovyakov HetUpdClass 0 0 695 542 Dialog 10 30 661 91 Input File 150 40 451 20 20 40 111 16 Input File Name 620 40 21 23 ... 10 130 661 131 Output File false 150 30 451 20 false 150 80 451 20 620 30 21 23 ... 620 80 21 23 ... 20 30 121 16 Output Directory 20 80 121 16 Output File Name 10 270 141 181 Run Option 10 30 151 18 Decompress 10 60 151 18 Recompress 10 90 151 18 Rechunk 10 130 191 18 verbose information 180 270 491 181 GroupBox 20 90 451 80 Compression Options 20 20 321 18 use BZLIB compression 20 50 321 18 use ZLIB compression 100 20 61 22 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 4096 65535 65535 20 25 91 16 Chunk Size 20 60 481 18 Strict AWSTAPE Specification (chunksize=4096,no compression) 490 490 75 23 Run 590 490 75 23 Cancel HerculesStudio/HercUtilities/TapeCopy.cpp0000664000175000017500000000651012065055302020073 0ustar yakovyakov/* * File: TapeCopy.cpp * * Author: Jacob Dekel * Created on: Aug 31, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: TapeCopy.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "TapeCopy.h" #include "Preferences.h" #include "UtilityExecutor.h" #include "UtilityRunner.h" #include "StringTokenizer.h" #include #include #include #include #include TapeCopy::TapeCopy(QWidget *parent) : GenericUtility("tapecopy",parent) { ui.setupUi(this); mUpperGeometry = ui.FileBox->geometry(); mLowerGeometry = ui.ScsiBox->geometry(); connect(ui.scsiToFileRadio, SIGNAL(clicked()), this, SLOT(scsiToTape())); connect(ui.fileToScsiRadio, SIGNAL(clicked()), this, SLOT(tapeToScsi())); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancelClicked())); connect(ui.browseFileButton, SIGNAL(clicked()), this, SLOT(browseFileClicked())); } TapeCopy::~TapeCopy() { } void TapeCopy::runClicked() { if (!runOrStopClicked()) { ui.runButton->setText("Run"); return; } if (ui.filename->text().isEmpty()) { QMessageBox::warning(this, "tapecopy", "Please specify tape file to process", QMessageBox::Ok, QMessageBox::NoButton); return; } if (!QFile::exists(ui.filename->text())) { QMessageBox::warning(this, "tapecopy", "The specified file does not exist", QMessageBox::Ok, QMessageBox::NoButton); return; } std::vector parameters; parameters.push_back(ui.filename->text().toStdString()); std::string scsi="/dev/st"; scsi+=ui.spinBox->text().toStdString(); parameters.push_back(scsi.c_str()); std::string command = "tapecopy"; execute(command, Preferences::getInstance().hercDir(), parameters); ui.runButton->setText("Stop"); } void TapeCopy::browseFileClicked() { QString dir = ui.filename->text(); if (dir.isEmpty()) dir = Preferences::getInstance().configDir().c_str(); QString s = QFileDialog::getOpenFileName(this,"Browse for tape to map",dir); ui.filename->setText(s); } void TapeCopy::cancelClicked() { deleteLater(); } void TapeCopy::tapeToScsi() { ui.FileBox->setGeometry(mUpperGeometry); ui.ScsiBox->setGeometry(mLowerGeometry); ui.FileBox->setTitle("Input Tape"); ui.ScsiBox->setTitle("Output Tape"); } void TapeCopy::scsiToTape() { ui.FileBox->setGeometry(mLowerGeometry); ui.ScsiBox->setGeometry(mUpperGeometry); ui.FileBox->setTitle("Output Tape"); ui.ScsiBox->setTitle("Input Tape"); } void TapeCopy::finishedSlot() { } HerculesStudio/HercUtilities/HetGet.h0000775000175000017500000000262512065055302017202 0ustar yakovyakov/* * File: HetGet.h * * Author: Jacob Dekel * Created on: Sep 3, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HetGet.h 161 2012-12-13 06:47:20Z dekeljacob $ * * Hetget utility object * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef HETGET_H #define HETGET_H #include "GenericUtility.h" #include #include "ui_HetGet.h" class HetGet : public GenericUtility { Q_OBJECT public: HetGet(QWidget *parent = 0); ~HetGet(); private: Ui::HetGetClass ui; virtual void finishedSlot(); private slots: void exitClicked(); void runClicked(); void browseInFileClicked(); void browseOutDirClicked(); void browseOutFileClicked(); void asciiChanged(); void stripChanged(); void unblockChanged(); }; #endif // HETGET_H HerculesStudio/HercUtilities/TapeMap.cpp0000664000175000017500000000553312065055302017702 0ustar yakovyakov/* * File: TapeMap.cpp * * Author: Jacob Dekel * Created on: Aug 31, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: TapeMap.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "TapeMap.h" #include "HerculesStudio.h" #include "SystemUtils.h" #include "Preferences.h" #include "UtilityExecutor.h" #include "UtilityRunner.h" #include "StringTokenizer.h" #include #include #include #include TapeMap::TapeMap(QWidget *parent) : GenericUtility("tapemap", parent) { ui.setupUi(this); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.exitButton, SIGNAL(clicked()), this, SLOT(exitClicked())); connect(ui.browseFileButton, SIGNAL(clicked()), this, SLOT(browseFileClicked())); } TapeMap::~TapeMap() { } void TapeMap::runClicked() { if (!runOrStopClicked()) { ui.runButton->setText("Run"); return; } if (ui.filename->text().isEmpty()) { QMessageBox::warning(this, "tapemap", "Please specify tape file to process", QMessageBox::Ok, QMessageBox::NoButton); return; } if (!QFile::exists(ui.filename->text())) { QMessageBox::warning(this, "tapemap", "The specified file does not exist", QMessageBox::Ok, QMessageBox::NoButton); return; } std::vector parameters; parameters.push_back(ui.filename->text().toStdString()); std::string command = "tapemap"; execute(command, Preferences::getInstance().hercDir(), parameters); ui.runButton->setText("Stop"); } void TapeMap::browseFileClicked() { QString dir = ui.filename->text(); if (dir.isEmpty()) dir = Preferences::getInstance().configDir().c_str(); QString s = QFileDialog::getOpenFileName(this,"Browse for tape to map",dir); ui.filename->setText(s); } void TapeMap::exitClicked() { deleteLater(); } void TapeMap::finishedSlot() { if (mStarted && mFinished && mFinishedOK) { QMessageBox::information(this, "tapemap", "Tapemap operation successfully completed!", QMessageBox::Ok, QMessageBox::NoButton); deleteLater(); } else emit error(); } HerculesStudio/HercUtilities/HetUpd.cpp0000775000175000017500000000564512065055302017553 0ustar yakovyakov/* * File: HetUpd.cpp * * Author: Jacob Dekel * Created on: Sep 3, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: HetUpd.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "HetUpd.h" #include "HerculesStudio.h" #include "UtilityRunner.h" #include "Preferences.h" #include #include #include HetUpd::HetUpd(QWidget *parent) : GenericUtility("hetupd",parent) { ui.setupUi(this); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(exitClicked())); connect(ui.selInfile, SIGNAL(clicked()), this, SLOT(browseInFileClicked())); connect(ui.selOutdir, SIGNAL(clicked()), this, SLOT(browseOutDirClicked())); connect(ui.selOutfile, SIGNAL(clicked()), this, SLOT(browseOutFileClicked())); ui.outdir->setText(Preferences::getInstance().logsDir().c_str()); ui.outdir->setBackgroundRole(QPalette::Window); ui.outdir->setToolTip("Use the button on the right to select directory"); } HetUpd::~HetUpd() { } void HetUpd::runClicked() { if (!runOrStopClicked()) { ui.runButton->setText("Run"); return; } if (ui.outfile->text().isEmpty()) { QMessageBox::warning(this, "hetupd", "Please specify tape file to create", QMessageBox::Ok, QMessageBox::NoButton); return; } std::vector parameters; std::string command = "hetupd"; execute(command, Preferences::getInstance().hercDir(), parameters); ui.runButton->setText("Stop"); } void HetUpd::exitClicked() { deleteLater(); } void HetUpd::browseInFileClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for Input File",ui.infile->text()); if (s.size() > 0) ui.infile->setText(s); } void HetUpd::browseOutFileClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for Output File",ui.outfile->text()); if (s.size() > 0) { QFileInfo fi(s); ui.outdir->setText(fi.absolutePath()); ui.outfile->setText(fi.fileName()); } } void HetUpd::browseOutDirClicked() { QString s = QFileDialog::getExistingDirectory(this,"Browse For Output Directory",ui.outdir->text()); if (s.size() > 0) ui.outdir->setText(s); } void HetUpd::finishedSlot() { deleteLater(); } HerculesStudio/HercUtilities/LineEditWithFocus.cpp0000664000175000017500000000225412065055302021701 0ustar yakovyakov/* * File: LineEditWithFocus.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: LineEditWithFocus.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "LineEditWithFocus.h" LineEditWithFocus::LineEditWithFocus(QWidget* parent) : QLineEdit(parent) { } LineEditWithFocus::~LineEditWithFocus() { } void LineEditWithFocus::focusInEvent(QFocusEvent *) { emit FocusGained(); } void LineEditWithFocus::focusOutEvent(QFocusEvent *) { emit FocusLost(); } HerculesStudio/HercUtilities/TapeSplt.cpp0000775000175000017500000002333212065055302020107 0ustar yakovyakov/* * File: TapeSplt.cpp * * Author: Jacob Dekel * Created on: Aug 31, 2010 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: TapeSplt.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "TapeSplt.h" #include "HerculesStudio.h" #include "UtilityRunner.h" #include "Preferences.h" #include #include #include #include TapeSplt::TapeSplt(QWidget *parent) : GenericUtility("tapesplt",parent) { ui.setupUi(this); ui.tableView->setEditTriggers(QTableView::NoEditTriggers); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runClicked())); connect(ui.exitButton, SIGNAL(clicked()), this, SLOT(cancelClicked())); connect(ui.inputSelButton, SIGNAL(clicked()), this, SLOT(selectInputClicked())); connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addClicked())); connect(ui.deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked())); connect(ui.downButton, SIGNAL(clicked()), this, SLOT(downClicked())); connect(ui.upButton, SIGNAL(clicked()), this, SLOT(upClicked())); mMaxFile = ui.tableView->geometry().width()/8-8; } TapeSplt::~TapeSplt() { } void TapeSplt::runClicked() { if (!runOrStopClicked()) { ui.runButton->setText("Run"); return; } if (ui.inputFile->text().isEmpty()) { QMessageBox::warning(this, "tapesplt", "Please specify input file to process", QMessageBox::Ok, QMessageBox::NoButton); return; } if (!QFile::exists(ui.inputFile->text())) { QMessageBox::warning(this, "tapesplt", "The specified file does not exist", QMessageBox::Ok, QMessageBox::NoButton); return; } std::vector parameters; parameters.push_back(ui.inputFile->text().toStdString()); for (int i=0; irowCount(); i++) { QModelIndex ix = mModel->index(i,0,QModelIndex()); QString row = mModel->data(ix).toString(); QString fileName = row.left(mMaxFile).trimmed(); QString blocks = row.mid(mMaxFile); ui.inputFile->setText(fileName); parameters.push_back(fileName.toStdString()); parameters.push_back(blocks.toStdString()); } std::string command = "tapesplt"; execute(command, Preferences::getInstance().hercDir(), parameters); ui.runButton->setText("Stop"); } void TapeSplt::cancelClicked() { deleteLater(); } void TapeSplt::selectInputClicked() { QString s = QFileDialog::getOpenFileName(this,"Browse for input tape file",ui.inputFile->text()); ui.inputFile->setText(s); } void TapeSplt::addClicked() { TapeSpltSubDlg * subDlg = new TapeSpltSubDlg(this); connect (subDlg, SIGNAL(fileNameSet(QString, int)), this, SLOT(fileNameSetSlot(QString, int))); subDlg->exec(); } void TapeSplt::deleteClicked() { int i = ui.tableView->currentIndex().row(); if (i>= 0) mModel->removeRow(i); QStandardItemModel t; ui.tableView->setModel(&t); ui.tableView->setModel(mModel); ui.tableView->resizeColumnToContents(0); } void TapeSplt::downClicked() { int i = ui.tableView->currentIndex().row(); if (i>=0 && (i+1)rowCount()) { QVariant itemA = mModel->rowData(ui.tableView->currentIndex()); QVariant itemB = mModel->rowData(ui.tableView->currentIndex().sibling(i+1,0)); mModel->setData(ui.tableView->currentIndex(),itemB); mModel->setData(ui.tableView->currentIndex().sibling(i+1,0),itemA); ui.tableView->setCurrentIndex(ui.tableView->currentIndex().sibling(i+1,0)); QStandardItemModel t; ui.tableView->setModel(&t); ui.tableView->setModel(mModel); ui.tableView->resizeColumnToContents(0); } } void TapeSplt::upClicked() { int i = ui.tableView->currentIndex().row(); if (i>=1 && mModel->rowCount() > 1) { QVariant itemA = mModel->rowData(ui.tableView->currentIndex().sibling(i-1,0)); QVariant itemB = mModel->rowData(ui.tableView->currentIndex()); mModel->setData(ui.tableView->currentIndex(),itemA); mModel->setData(ui.tableView->currentIndex().sibling(i-1,0),itemB); ui.tableView->setCurrentIndex(ui.tableView->currentIndex().sibling(i-1,0)); QStandardItemModel t; ui.tableView->setModel(&t); ui.tableView->setModel(mModel); ui.tableView->resizeColumnToContents(0); } } void TapeSplt::fileNameSetSlot(QString fileName, int blocks) { if (fileName == "") return; if (ui.tableView->model() == NULL) { mModel = new HTableModel(this); } else { QStandardItemModel t; ui.tableView->setModel(&t); } mModel->insertRow(mModel->rowCount()-1, QModelIndex(), fileName, QString::number(blocks)); ui.tableView->setModel(mModel); ui.tableView->resizeColumnToContents(0); } QString TapeSplt::genLine(QString file, int blocks) { QString ret = file.leftJustified(mMaxFile,' ') + QString::number(blocks); return file.leftJustified(mMaxFile,' ') + QString::number(blocks); } void TapeSplt::finishedSlot() { if (mFinishedOK) { QMessageBox::information(this, "tapsplt", "Tape split successfully completed!", QMessageBox::Ok, QMessageBox::NoButton); deleteLater(); } else emit error(); ui.runButton->setText("Run"); } TapeSpltSubDlg::TapeSpltSubDlg(QWidget * parent) : QDialog(parent) { setupUi(); connect(selOutputButton, SIGNAL(clicked()), this, SLOT(selectOutputSlot())); connect(addButton, SIGNAL(clicked()), this, SLOT(addSlot())); connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelSlot())); } TapeSpltSubDlg::~TapeSpltSubDlg() { } void TapeSpltSubDlg::setupUi() { resize(554, 204); label = new QLabel(this); label->setObjectName(QString::fromUtf8("label")); label->setGeometry(QRect(30, 30, 461, 16)); lineEdit = new QLineEdit(this); lineEdit->setObjectName(QString::fromUtf8("lineEdit")); lineEdit->setGeometry(QRect(30, 60, 461, 20)); selOutputButton = new QPushButton(this); selOutputButton->setObjectName(QString::fromUtf8("selOutputButton")); selOutputButton->setGeometry(QRect(510, 60, 31, 23)); spinBox = new QSpinBox(this); spinBox->setObjectName(QString::fromUtf8("spinBox")); spinBox->setGeometry(QRect(30, 120, 42, 22)); spinBox->setMaximum(9); spinBox->setValue(1); label_2 = new QLabel(this); label_2->setObjectName(QString::fromUtf8("label_2")); label_2->setGeometry(QRect(30, 90, 251, 16)); addButton = new QPushButton(this); addButton->setObjectName(QString::fromUtf8("addButton")); addButton->setGeometry(QRect(30, 160, 75, 23)); cancelButton = new QPushButton(this); cancelButton->setObjectName(QString::fromUtf8("cancelButton")); cancelButton->setGeometry(QRect(460, 160, 75, 23)); setWindowTitle("Add Output Tape"); label->setText("Name of output file:"); selOutputButton->setText("..."); label_2->setText("Number of blocks to extarct into this tape file:"); addButton->setText("Add"); cancelButton->setText("Cancel"); } void TapeSpltSubDlg::selectOutputSlot() { QString s = QFileDialog::getOpenFileName(this,"Browse for output tape file",lineEdit->text()); lineEdit->setText(s); } void TapeSpltSubDlg::addSlot() { emit fileNameSet(lineEdit->text(), spinBox->value()); deleteLater(); } void TapeSpltSubDlg::cancelSlot() { deleteLater(); } ////////////////////////////////////// HTableModel::HTableModel(QObject *o) : QAbstractTableModel(o) { } HTableModel::~HTableModel() { } bool HTableModel::insertRow(int row, const QModelIndex &index, QString filename, QString blocks) { hOutDebug(3,"insert " << filename.toStdString() << " to row "<< row); if (row > static_cast(mTable.size())) return false; HTableType::iterator it = mTable.begin()+(1+row); QStringList list; list << filename << blocks ; beginInsertRows(index, row+1, row+2); mTable.insert(it, list); endInsertRows(); return true; } bool HTableModel::removeRow ( int row, const QModelIndex & parent) { if (parent.isValid()) return false; if (row >= static_cast(mTable.size())) return false; HTableType::iterator it = mTable.begin()+row; mTable.erase(it); return true; } int HTableModel::rowCount(const QModelIndex &parent) const { if (parent.isValid()) return 0; else return mTable.size(); } int HTableModel::columnCount(const QModelIndex &parent) const { if (parent.isValid()) return 0; else return 2; } QVariant HTableModel::data(const QModelIndex &index, int role) const { if (index.row() >= static_cast(mTable.size())) return QVariant(); QStringList list = mTable[index.row()]; hOutDebug(5,"data(): request for col=" << index.column() << ";row=" << index.row() <<";role=" << role); hOutDebug(5," list with size=" << list.size()); if (role != Qt::DisplayRole) return QVariant(); if (index.column() == 0) return QVariant(list[0]); else return QVariant(list[1]); } QVariant HTableModel::rowData(const QModelIndex &index) const { if (index.row() >= static_cast(mTable.size())) return QVariant(); QStringList list = mTable[index.row()]; return QVariant(list); } QVariant HTableModel::headerData ( int col, Qt::Orientation orientation, int role ) const { if (orientation == Qt::Horizontal && role == 0) { if (col == 0) return QVariant(QString("File-Name")); else return QVariant(QString("Blocks")); } else { return QVariant(); } } bool HTableModel::setData(const QModelIndex &index, const QVariant &value, int) { if (static_cast(mTable.size()) <= index.row()) return false; if (!value.isValid() || !value.canConvert(QVariant::StringList)) return false; QStringList list = value.toStringList(); mTable[index.row()] = list; return true; } HerculesStudio/HercUtilities/UtilityRunner.cpp0000664000175000017500000001324012065055302021202 0ustar yakovyakov/* * File: UtilityRunner.cpp * * Author: Jacob Dekel * Created on: Aug 7, 2009 * * Copyright (c) 2009-2013 Jacob Dekel * $Id: UtilityRunner.cpp 161 2012-12-13 06:47:20Z dekeljacob $ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "UtilityRunner.h" #include "HerculesStudio.h" #include "UtilityExecutor.h" #include "StringTokenizer.h" #include "ConfigurationEditor.h" #include #include #include #include UtilityRunner::UtilityRunner(UtilityExecutor * utilityExecutor) : mUtilityExecutor(utilityExecutor), mProcess(utilityExecutor->getQProcess()) { } UtilityRunner::~UtilityRunner() { } void UtilityRunner::run() { //mUtilityExecutor->getQProcess()->waitForStarted(); mProcess = mUtilityExecutor->getQProcess(); return; } void UtilityRunner::updateStatus(const std::string& line) { Tokenizer::handle pos, lastPos; std::string word = StringTokenizer::getFirstWord(line, pos, lastPos, " \t\n"); outDebug(1, std::cout << "util runner line:" << line << std::endl); if (line.length() == 0) return; if (word == "HHCDU044I") // dasdinit { QByteArray qline(line.c_str()); emit error(qline); int i = line.find(":") + 2; int cyls = ConfigurationEditor::parseNum(line.substr(i),10); emit maximumChanged(cyls); return; } if (line.compare(0,5,"NMEM=") == 0) // dasdisup { int currMem = ConfigurationEditor::parseNum(line.substr(5),10); emit maximumChanged(currMem); return; } if (line.compare(0,4,"POS=") == 0) // dasdcopy { int currMem = ConfigurationEditor::parseNum(line.substr(5),10); emit valueChanged(currMem); return; } if (line.compare(0,5,"IPOS=") == 0) // hetmap { int currMem = ConfigurationEditor::parseNum(line.substr(5),10); emit valueChanged(currMem); return; } if (line.compare(0,4,"MEM=") == 0) // dasdisup { int currMem = ConfigurationEditor::parseNum(line.substr(5),10); emit valueChanged(currMem); return; } if (line.compare(0,5,"ETRK=") == 0) // dasdls, dasdcat { int currMem = ConfigurationEditor::parseNum(line.substr(5),10); emit maximumChanged(currMem); return; } if (line.compare(0,4,"TRK=") == 0) // dasdcopy { int currMem = ConfigurationEditor::parseNum(line.substr(4),10); emit valueChanged(currMem); return; } if (line.compare(0,5,"CYLS=") == 0) // dasdconv { int currMem = ConfigurationEditor::parseNum(line.substr(5),10); emit maximumChanged(currMem); return; } if (line.compare(0,4,"CYL=") == 0) // dasdinit { int currMem = ConfigurationEditor::parseNum(line.substr(4),10); emit valueChanged(currMem); return; } if (line.compare(0,4,"BLK=") == 0) // dasdinit { int currMem = ConfigurationEditor::parseNum(line.substr(4),10); emit valueChanged(currMem); return; } if (line.compare(0,5,"TRKS=") == 0) // dasdcopy { int currMem = ConfigurationEditor::parseNum(line.substr(5),10); emit maximumChanged(currMem); return; } if (line.compare(0,5,"CTRK=") == 0) // dasdls, dasdcat { int currMem = ConfigurationEditor::parseNum(line.substr(5),10); emit valueChanged(currMem); outDebug(2, std::cout << "Value changed " << currMem << std::endl); return; } if (line.compare(0,7,"OUTCYL=") == 0) { int currCyl = ConfigurationEditor::parseNum(line.substr(7),10); emit valueChanged(currCyl); return; } if (line.compare(0,5,"SIZE=") == 0) // dasdcopy { // swallow this message return; } if (line.length() > 5 && line.compare(2,4,"CYL=") == 0) { int currCyl = ConfigurationEditor::parseNum(line.substr(4),10); outDebug(5, std::cout << "emitting value changed to " << currCyl << std::endl); emit valueChanged(currCyl); return; } if (line.length() > 2 && line.compare(2,8,"REQCYLS=") == 0) { int currCyl = ConfigurationEditor::parseNum(line.substr(8),10); emit valueChanged(currCyl); return; } if (line.length() > 2 && line.compare(2,4,"BLK=") == 0) { int currCyl = ConfigurationEditor::parseNum(line.substr(4),10); emit valueChanged(currCyl); return; } else { QByteArray qline(line.c_str()); emit error(qline); } } void UtilityRunner::readStandardOutput() { if (mProcess == NULL) return; mProcess->setReadChannel(QProcess::StandardOutput); while (true) { QByteArray output = mProcess->readLine(); if (output.length() == 0) break; hOutDebug(2,"util runner:" << output.data()); updateStatus(QString(output).toStdString()); } } void UtilityRunner::readStandardError() { if (mProcess == NULL) return; mProcess->setReadChannel(QProcess::StandardError); while (true) { QByteArray output = mProcess->readLine(); if (output.length() == 0) break; output.replace('\n','\0'); output.replace('\r','\0'); hOutDebug(2,"util runner err:" << output.data()); updateStatus(QString(output).toStdString()); } } HerculesStudio/HerculesStudio.pro0000664000175000017500000001733112065055302016555 0ustar yakovyakov###################################################################### # Automatically generated by qmake (2.01a) Sat Jan 15 21:23:42 2011 ###################################################################### TEMPLATE = app TARGET = HerculesStudio INCLUDEPATH += HercConfiguration \ HercStudio \ ui \ HercUtilities UI_DIR = ui MOC_DIR = moc OBJECTS_DIR = obj !win32{ QMAKE_CC = @echo [c] $< && $$QMAKE_CC QMAKE_CXX = @echo [c++] $< && $$QMAKE_CXX QMAKE_MOC = @echo [moc] $< && $$QMAKE_MOC QMAKE_LINK = @echo [link] $$TARGET && $$QMAKE_LINK #QMAKE_UIC = @echo [uic ] $< && $$QMAKE_UIC DEFINES += HS_BUILD_ID="" QMAKE_CXXFLAGS = -pedantic -Wno-long-long } # Input HEADERS += HercConfiguration/CardReaderProperties.h \ HercConfiguration/ConfigFile.h \ HercConfiguration/ConfigLine.h \ HercConfiguration/Configuration.h \ HercConfiguration/ConfigurationEditor.h \ HercConfiguration/ConfigurationFreeEditor.h \ HercConfiguration/ConsoleProperties.h \ HercConfiguration/CtcProperties.h \ HercConfiguration/DasdProperties.h \ HercConfiguration/DeviceConfigLine.h \ HercConfiguration/DeviceConfigView.h \ HercConfiguration/DeviceListView.h \ HercConfiguration/DeviceMenuProcessor.h \ HercConfiguration/DevicesPane.h \ HercConfiguration/DevicesRename.h \ HercConfiguration/DevicesWidget.h \ HercConfiguration/DeviceTypes.h \ HercConfiguration/Extended_Ui_CardReaderProperties.h \ HercConfiguration/GenericDeviceProperties.h \ HercConfiguration/NewReaderFile.h \ HercConfiguration/PrinterProperties.h \ HercConfiguration/PunchProperties.h \ HercConfiguration/ReaderFileListView.h \ HercConfiguration/StatusUpdateCollector.h \ HercConfiguration/SysgProperties.h \ HercConfiguration/SystemConfigLine.h \ HercConfiguration/TapeProperties.h \ HercConfiguration/TerminalProperties.h \ HercConfiguration/VisualizedDeviceEntry.h \ HercStudio/Arguments.h \ HercStudio/CommandLine.h \ HercStudio/Environment.h \ HercStudio/FontPreferences.h \ HercStudio/Fonts.h \ HercStudio/HelpAbout.h \ HercStudio/HerculesExecutor.h \ HercStudio/HerculesStudio.h \ HercStudio/IplConfig.h \ HercStudio/LogRunner.h \ HercStudio/LogWidget.h \ HercStudio/MainPanel.h \ HercStudio/MainPanelClassic.h \ HercStudio/MainPanelModern.h \ HercStudio/MainWindow.h \ HercStudio/Mips.h \ HercStudio/MipsGauge.h \ HercStudio/MipsLed.h \ HercStudio/NamedPipe.h \ HercStudio/PanelButton.h \ HercStudio/Preferences.h \ HercStudio/PreferencesWin.h \ HercStudio/Psw.h \ HercStudio/Recovery.h \ HercStudio/Regs32.h \ HercStudio/Regs64.h \ HercStudio/Runner.h \ HercStudio/StatusRunner.h \ HercStudio/StringTokenizer.h \ HercStudio/SynchronizedQueue.h \ HercStudio/Watchdog.h \ HercUtilities/Dasdcat.h \ HercUtilities/Dasdconv.h \ HercUtilities/Dasdcopy.h \ HercUtilities/DasdInit.h \ HercUtilities/DasdIsup.h \ HercUtilities/DasdLoad.h \ HercUtilities/Dasdls.h \ HercUtilities/DasdTab.h \ HercUtilities/GenericUtility.h \ HercUtilities/HetGet.h \ HercUtilities/HetInit.h \ HercUtilities/HetMap.h \ HercUtilities/HetUpd.h \ HercUtilities/LineEditWithFocus.h \ HercUtilities/SystemUtils.h \ HercUtilities/TapeCopy.h \ HercUtilities/TapeMap.h \ HercUtilities/TapeSplt.h \ HercUtilities/UtilityExecutor.h \ HercUtilities/UtilityRunner.h FORMS += HercConfiguration/CardReaderProperties.ui \ HercConfiguration/Configuration.ui \ HercConfiguration/ConsoleProperties.ui \ HercConfiguration/CtcProperties.ui \ HercConfiguration/DasdProperties.ui \ HercConfiguration/Devices.ui \ HercConfiguration/DevicesRename.ui \ HercConfiguration/hercconfiguration.ui \ HercConfiguration/PrinterProperties.ui \ HercConfiguration/PunchProperties.ui \ HercConfiguration/TapeProperties.ui \ HercConfiguration/TerminalProperties.ui \ HercStudio/helpabout.ui \ HercStudio/IplConfig.ui \ HercStudio/MainWindow.ui \ HercStudio/PreferencesWin.ui \ HercStudio/Recovery.ui \ HercUtilities/Dasdcat.ui \ HercUtilities/Dasdconv.ui \ HercUtilities/Dasdcopy.ui \ HercUtilities/DasdInit.ui \ HercUtilities/DasdIsup.ui \ HercUtilities/DasdLoad.ui \ HercUtilities/Dasdls.ui \ HercUtilities/HetGet.ui \ HercUtilities/HetInit.ui \ HercUtilities/HetMap.ui \ HercUtilities/HetUpd.ui \ HercUtilities/TapeCopy.ui \ HercUtilities/TapeMap.ui \ HercUtilities/TapeSplt.ui \ HercUtilities/TapeSpltSubDlg.ui SOURCES += HercConfiguration/CardReaderProperties.cpp \ HercConfiguration/ConfigFile.cpp \ HercConfiguration/ConfigLine.cpp \ HercConfiguration/Configuration.cpp \ HercConfiguration/ConfigurationEditor.cpp \ HercConfiguration/ConfigurationFreeEditor.cpp \ HercConfiguration/ConsoleProperties.cpp \ HercConfiguration/CtcProperties.cpp \ HercConfiguration/DasdProperties.cpp \ HercConfiguration/DeviceConfigLine.cpp \ HercConfiguration/DeviceConfigView.cpp \ HercConfiguration/DeviceListView.cpp \ HercConfiguration/DeviceMenuProcessor.cpp \ HercConfiguration/DevicesPane.cpp \ HercConfiguration/DevicesRename.cpp \ HercConfiguration/DevicesWidget.cpp \ HercConfiguration/DeviceTypes.cpp \ HercConfiguration/Extended_Ui_CardReaderProperties.cpp \ HercConfiguration/GenericDeviceProperties.cpp \ HercConfiguration/NewReaderFile.cpp \ HercConfiguration/PrinterProperties.cpp \ HercConfiguration/PunchProperties.cpp \ HercConfiguration/ReaderFileListView.cpp \ HercConfiguration/StatusUpdateCollector.cpp \ HercConfiguration/SysgProperties.cpp \ HercConfiguration/SystemConfigLine.cpp \ HercConfiguration/TapeProperties.cpp \ HercConfiguration/TerminalProperties.cpp \ HercConfiguration/VisualizedDeviceEntry.cpp \ HercStudio/Arguments.cpp \ HercStudio/CommandLine.cpp \ HercStudio/Environment.cpp \ HercStudio/FontPreferences.cpp \ HercStudio/Fonts.cpp \ HercStudio/HelpAbout.cpp \ HercStudio/HerculesExecutor.cpp \ HercStudio/IplConfig.cpp \ HercStudio/LogRunner.cpp \ HercStudio/LogWidget.cpp \ HercStudio/main.cpp \ HercStudio/MainPanel.cpp \ HercStudio/MainPanelClassic.cpp \ HercStudio/MainPanelModern.cpp \ HercStudio/MainWindow.cpp \ HercStudio/Mips.cpp \ HercStudio/MipsGauge.cpp \ HercStudio/MipsLed.cpp \ HercStudio/NamedPipe.cpp \ HercStudio/PanelButton.cpp \ HercStudio/Preferences.cpp \ HercStudio/PreferencesWin.cpp \ HercStudio/Psw.cpp \ HercStudio/Recovery.cpp \ HercStudio/Regs32.cpp \ HercStudio/Regs64.cpp \ HercStudio/Runner.cpp \ HercStudio/StatusRunner.cpp \ HercStudio/SynchronizedQueue.cpp \ HercStudio/Watchdog.cpp \ HercUtilities/Dasdcat.cpp \ HercUtilities/Dasdconv.cpp \ HercUtilities/Dasdcopy.cpp \ HercUtilities/DasdInit.cpp \ HercUtilities/DasdIsup.cpp \ HercUtilities/DasdLoad.cpp \ HercUtilities/Dasdls.cpp \ HercUtilities/DasdTab.cpp \ HercUtilities/GenericUtility.cpp \ HercUtilities/HetGet.cpp \ HercUtilities/HetInit.cpp \ HercUtilities/HetMap.cpp \ HercUtilities/HetUpd.cpp \ HercUtilities/LineEditWithFocus.cpp \ HercUtilities/SystemUtils.cpp \ HercUtilities/TapeCopy.cpp \ HercUtilities/TapeMap.cpp \ HercUtilities/TapeSplt.cpp \ HercUtilities/UtilityExecutor.cpp \ HercUtilities/UtilityRunner.cpp RESOURCES += HercStudio/HercStudio.qrc target.path = /usr/bin INSTALLS += target CONFIG += warn_on CONFIG += debug_and_release macx:RC_FILE = hercstudio.icns HerculesStudio/.project0000664000175000017500000000552612065055302014543 0ustar yakovyakov HerculesStudio com.trolltech.qtcppproject.QtMakefileGenerator org.eclipse.cdt.make.core.makeBuilder clean,full,incremental, org.eclipse.cdt.core.errorOutputParser org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser; org.eclipse.cdt.make.core.append_environment true org.eclipse.cdt.make.core.build.arguments -j8 org.eclipse.cdt.make.core.build.command make org.eclipse.cdt.make.core.build.location org.eclipse.cdt.make.core.build.target.auto debug org.eclipse.cdt.make.core.build.target.clean clean org.eclipse.cdt.make.core.build.target.inc debug org.eclipse.cdt.make.core.enableAutoBuild false org.eclipse.cdt.make.core.enableCleanBuild true org.eclipse.cdt.make.core.enableFullBuild true org.eclipse.cdt.make.core.enabledIncrementalBuild true org.eclipse.cdt.make.core.environment PATH=/usr/bin:${env_var:PATH}:${env_var:PATH}| org.eclipse.cdt.make.core.stopOnError false org.eclipse.cdt.make.core.useDefaultBuildCmd false org.eclipse.cdt.make.core.ScannerConfigBuilder org.eclipse.cdt.core.cnature org.eclipse.cdt.core.ccnature org.eclipse.cdt.make.core.makeNature org.eclipse.cdt.make.core.ScannerConfigNature com.trolltech.qtcppproject.QtNature HerculesStudio/hercstudio.icns0000664000175000017500000036100512065055302016120 0ustar yakovyakovicnsh8mk ic08< jP ftypjp2 jp2 Ojp2hihdrcolr"cdef<jp2cOQ2R \@@HHPHHPHHPHHPHHPd Axialis ;S ]@@HHPHHPHHPHHPHHPS ]@@HHPHHPHHPHHPHHPS ]@@HHPHHPHHPHHPHHPyǚԷXK<ȭYW /}3% Zu`_{f ڞŇƂY,| u V ȫ8{fIY'Jab!I'8S0R?)aI?h/٦9^_0.HI?߂?R `My-,W, |sk 㵑*p`MlZ&nO_2]MVӊYʢz_?h$l;ӨLdv*&5IFFz?V P>j'9blx[izRF^Ic'fX2A0J̜nVTt WQTX͜!,UN( Nd6vА&U,fu5|hETe9~}];^Y! b_9ħ@"MS6J=؟a`?WNR/ I9@Z\/1: N; X`@|o@)(,|ф mc~ڈlI^;GB6+wy1#3A3)gcVdߊZ){fJȄh0Bb`Y),hcTDmt|H8MbM0ڃJZX @|n@)UPA$RQ=HSdUUǾ&4!- ٭ fsB>;qM^[ڕ Qb-z72ޯ;wiNMB*Dss6c+SebG3@:b4~‚U81[pFϖSS9|}T 7Czgz${ 7q i}yJHO* 48 {JK 4\\q&T1ֈ?֠^o5f¦9ym).6n2+3F}n}n6h `H%S6ZcOW$+kOw?\ tX w,g&1*s"˦ 5Wilg^mo*>E;d.7Y!Rq\~2 Wҝn| l[3@;|AqoΪe0bhj5.@5kq:\(|})곞b@ALrBg5| EТwU?UCרWU׻->Qi ) LB2IEN MBEi;I(Ύ:[lVugBz3"tݪu,ݨ%0% 6T>/+W#ާt@ w]qO&]BԿ oK#|~4BՋCf)fBoJDr ;g+8g]\jVBļ6ٌ-H#+tS*i+ 0b.YEp[ w5ϳg&E Q2o jG0*xF涛g)?G|,Y;jݒNj}YU@LF6ę({_1L l'eCX5*Q<]ufY%Vg'u^f+~BKS*3ax=r(Z;)%aKfCU7|cY6OmG뗵L,䭟*T}'c7S % 9(L!yd VM{C!49yO4_?6l>.@Y!$ߺk5k~.so "f?`["1zxuN"\ʇ%=[,{cf'N-d.JPVxx68OB` !wW{6.Ի?존<ڥ/JՂ ֨%1 kVJTH?y̲D@σ7|efGRa}Qs*65YmWJ\!G $>˫r XĐ]g#;L'Ē`@(+F= DV|R*e7渕5[ЄVo6n2q0.-+=-ICd/M8˵҆b&/_܈U4)yR"[GsEIźu2P`ȃ=F$ 稀4N,WvI%TV:SPQi+<=5u%>;}#osRNEy)k;x1clM2ܹ&ٗ얩_lK,\fe$IkT~DTX&aKa/7GIFl(`8|Ƙg+ tDG׿ᾴ~%byZ%[?Q/!e_˺If*{7-N&L_#`s;L]S ՐlH) ~^cΉŎPcL,8IKmCyki?;< ҄>zC2^n41UC2I łtHO ae1ްH*?]z`n6w37ړ Ԧ ow\n@QWIthPO Y?rÒ~)'YC<pǗ+cڝ$o~?xҮSvyzVtȒZ,dumCcB'6yQm:1s£r6epNXloYLݯԋ#ؐ$E~ 9f >=àc_q;m49В=ԝAbo<_dZ9u /!hҒێ4Aq;|?Pj:4'gH}QL70O ^ 54!ǔ-m3$ڣҚ/L3+~F"B˄Ci s0CC{L؂4;H*`5ݎOcf~S\=ڀ6[OPK \_ DzMԢǀxt,Le8@"3t\R[38&ZTlwGrj;[H@C?mh7Eiז6q;(^O@@Eӣp"dЂy8~5饟ܜ䑦yLW6< 5:.iUJ6M+vo@mP " D0vX(!*fRr痹ڛy&VLv)[7朘?$izOK?v!(4nz 248u=91SR{TL?][3ac+[7 f"5e<АxdQg(YY0{ij/fB&ID!X`po'qETFzetF^3oa1ZwG?U!dytN@?k$+IXk_6Z cQ)o{#v<`Db%[|j m dqĹ To(]˚5M2h~$4,_4HhY)(vC0??i8AϒA |A&u9!`[kr%[ME9n<H wdO0Vp0. b,ʼ8 ߒ"&KޙGzv'%e8K14; цS'RJuO˯ө@f7ZN+Ze+̪mEyH `=vӓ.Ӊ&8@۝X[|*U(͐_y%<0-͘9+†*u`ʚ`A)(YC~EGEp 1YTzv0Vwn;jsyF:㥛:\?U 9ˊ DBoK5F3 |5sU{p&j߅V-OcқQJ٧<N>V7x[j@Dx XGTH9/ǫ)$NːЌF:u E?K ڏ,̕1J(7? .Ao|>߶ !|qg :SEpn; WT4_SBаIͽU+Ԋ[.i1N3"4s{UH5vUjO# ]wv&#]EjM$1tJZb$L%_KXr XWꝯ5ʧu5نy?=k}a%/QJo*[)~5a$be7Yp%Jhp)}t63:*`:hy#uezG`y\]9s;:Ձ%i/ՋaX?d9M|Ak$d!Tߴ=8C(WQW\-KmQ!/]3`1f4Lܖ MU`p1g=wbguUv܈SSt3Wx&iLNxb(BFZ–)qMUiЏ@sxvyJ-~"d=:,gߞ{Xis127à yEu&-'pUM$&[Vp:3ݩovgG%px4FǠqxh+0qvʏJߩF7b4&f*f@~%)n 'Zt Q6ְ2ątc9ԗū1 CzQ7yU~50k%}8)t(.ýaj4'aޟq?ڸr5;"RWf䰁P4RE5g'gD+ԹSt(_c.&5xijNMڲ#|55YJf !fkMO < iQ*C]=˥-BW[5E( i"=!?ǫ s#!EHH _4<+K7z=J^%_UJPz4]IZbٞi;߱i |/ (0}P'\!fˇ.["^(p{=uBKjF=c48 )$EƩ)$×]#H^:m@eqGk@V5"_Wrtoɿ?& ={;5hu*WnJҽp1|IRG/2vڄr, {@QV5#&F+Sۯ@پ[ޡ-ϜMC,3\&FKG@gc(<7Kd>3‘JdyD(` -5S#O oZ]l~aHx-:Pza&gs#NQ50}{(chѫ-Kc4yfX2wf~`Ê`as}kI ƗQ4Eb*\) =&gqbl@n,M ʼn6| /q?,G 7w${cxU .jP˞"k " %ȩZ[uU H bGݗ5nxӏb1`p 2C>?f{Ul:M !Sˤ&/2""V^Y\)Mm.f[CvZj-bdgv$@~I冂ܢy}d]NM*" )s|6+yL̵"' 2b@QxBjĤ(6W@yb ]аs1_z-_\EH$h 7zHNC;*KI o'8.}_?*kJ7o^8\w̸EQXV[Sdêiy85V4 zEh#dv\3]"24n:}T\`f؁\wA2{+띁GH9[٤1N߇L*Rf #aQIQ$1sФbTRMmuւZR =\オ)` k!co2: IdXRO)]3,Rw{?u}y3<[ND૒JFv|cnT~2XJt!/º5&Xz;jg͉ w!M-M?Ν';b`]p$8бWg *d2- "3ӏBcJ|x[fZ !M{D30Rw*n >uݜZF{Dj26pGGDOoIl^ y[>nP@0A4=LMgw4bi4X%1ѯޗsW * -"]/:}@25A2o7qb4(!̧=“/Nc-~kl ؆ad+9'y2BWbکWLUGi#ˆߛlts E?bynE("Qp YOh4&de.=)o vYc#V\VGXS1%aO֌dx?Z1VX|[藞PeREk-3K&ќz>e0(%v,NQ9f %<$(qW\6'.Q{Zk\&WZ&0L/ޯ뾇 כدK_m;:=wSPz$%Dwv"u U!Fh&G9I(E2ҲPZG} K s~_{.VKyi`glogQ(FJ4XƩkAeYR8`fMQ>CE~e )țw^3ùu5cq>#4cq>~륫U-XG^E`}ִtYإ5ͩdMCUV+2(~bj0rأf@a/r;O0F?igӝ̯e@X$!uDYzDƦwqJ}}}}}X v9j,‚$g+-X!r.ʊ;{Ǔ۷ t I̢aA-Q6;: *]8cElgro.;#9GS 㲢]5 y$Qa xbF1⍋c(Nn2Ⳏ'[<4xSImڇiuł,˞+lyxS q@ eIU밐-ͷƭk~Z TgV&\‡fc%]IJOv}@Z ^Znh4>Bg.b鼜Qr?$P^-E 0 wmpXVuyZ뭟J p6GȨlUr?ą_VkOJp(qv߻'I;d?K,rk {\- q;ozo-Q#헴 8)pH)@M²0b9x /,(wDxq`őcHA\]pQvNHq.1|jSa9+bYˣBKds !ܦxb>Þv#^J-xQ!͏fZlA075aJě{Ⱦq^mj +ԃL hCp\9G_8fSD+'Ce@/C,$wW?W&}5ou7[mӐ%5zj Tj`; ff4C޲rCץ\\$-N $(Ya|ZxkT~+>mj f'j4dZ;Z$+$hZe0͏q !b~@paK !rG/7>|?4GU8<ާ( [gF/jҥLֵ+tTJ.#H>ٌu =PF(ic09 jP ftypjp2 jp2 Ojp2hihdrcolr"cdefjp2cOQ2R \@@HHPHHPHHPHHPHHPd Axialis /S ]@@HHPHHPHHPHHPHHPS ]@@HHPHHPHHPHHPHHPS ]@@HHPHHPHHPHHPHHP}|"{{lžz=}ZY?=fRʿ*%D,~mUHL\4W -+geRe`/_8It1y'S>?q`>c;qT:ZHȗғ) =on-L z5VC;@ &尸 @>婻ϱ'Ȃq@\}[YpȷA[?*s(:"UΙ\D &?qE|ovvk領(a 'L:+a 0uQ6ϱ'Ȟ)[}O"~μuJP{~xnLU?TɈȔ0L/Yͤv:.g708Q#4$z酭=dj9Ϥ8\Va | '8żZjtMPe5,)=Z5fCVNba| YN,e&JbUxXs?-=“a(t\z"$Xc촵1~,$ s9#Sz v`Io\Kwʲ0CJ==C+oQ ǒ["w'l̸vU4<]ʼ\nOX`|@)(,|:h7jqsERF2=>})Vb.{;[@6;G$&KΎ=S~How=\s1IKnw ֓g&߆lYE+uQneLv= ce sMXW@|n)UPA$N&FM- }/4 &M\zp dU"e-n7ȏki&.s5)I#q @Wߓ>;X1i*6l5WjN b qhBZ/2'%8 g b(!o7S/28i3S6e'%Wc2kAI-/tXwA' -3[GD݌5̽͢o ρ:F kDCp<=S x :=Ճ3.b|[ w-vc0ͫW)uv '=h)Թ^y T !i`J]}x6Zۄp %!zLZgazX_SܻbyR\)?@:wBboICvc_k/?ݢtCu[6T>/+W#ު{p MAdю6qk&R!DN3-O6/e؏:8-ݟ{];h|ŮDV`•L3ޕAQ21oxZSux@rs_kd3mp2hD@%% #PSz?5mÏ}deB0nӄM?HyI/\o w +XOaV9(=g Wc,؅q xxN.;88b,칫^p:>/SZI" %-X6@=w.+W#ާq6gwhc*@o{*Co[Ķa15gI-tCcntc:z>Rɼ*nq61,yAx4'-xn+ .4m nZG_R?UZi/treAWC~<^SZ/r3 YEVQO"XFm"v#ͦz/eְhlϗFi9^{W})\\O͡$, R3;' V8\vu8pFIjh7|m@a|[:F L,qP=w QC! %U7= D`mؘ%­;݇-j:;@uUqVa!9 H=/ X_C1%))"*ؓ]ۑj6޹[l& MfDf+G_;H?OտI Er[ޓ1Ҽ(|i- L7 H6]"KI0JuoNDU,&GpbF hѶg,~X38xpl J7\M%hȲ~E.r-CkG,<uln#VkDsR_3j{"[lnlgԞ:%On,%HD쥼c 88#'c"[:`TPIp>&W*&Hľݐ#ɛi;ZypYY-hl[H,2Mix@|c9ꏙ%tBnm|:tdCZ=c>AlSTSziok{0$Mb*] %[L;izT +KoV I#tK`xc,DW(:rҷ!&}@Ɲ΂^WE?b˙6dC§仢*E6h ݗ8)%39хǨVh^ sĠ;0^Yj77'PqsE2юg֊iCS0_K+JE/# k>:Ubm*~(JiIS Gpo&x-ݾLR`N59G/J|r5bEg.qUq%{5af9tф G9gzf ,b 3 &UoYlf=QB,Iަ\AGIGlߦ Z' T8`U-Ic,M[uI&s^m;@]-ÝUZe\p~Lph5ȅD9R},ddRKW-L9ؗ/7Q0)(TNh9>xn>?p. 7rZ{֤#}SNJ('U5$dS>pV\QvF|ݗ&_)J lc(Sp[AK~Ao{5+>O>; I(IQT+\o/28;N y +M6NۘK;Z7fF-)kYןi/| WapQ2$ ۯ[fK "[? tO[! bgcqxE5 {CJ~4CA%#.:3EԞ sK$VdtIlcv ޷/$='؄?R &^4Zt tI, j6\ rwN\}Ё;aWM^~5(QBΨDؔ_FK|YX"CSUFM&) kvaW4FEhuZe3ΖtԚ8"((&u|oP~࿟ A\O1B0bGY)@(ƭa@@o.tf-ΰs0]~c6Էhn:OE9Mn S$Cn}p=#Rˈ:y "rL]t@'ٶtA5*;߫(*_NurhIPTl/9[(ЕCCAn9P›*fd;|ol}zeN0sr,W'%":)";]ݤkY1,7G3}l=FL0 ?hCH2MhLq1bvЕ eZ>w! W )tX -BD k@Yx67}X {M \(c/jF_MN޶!MЃV-=(1Lgp)94 wR k$y;g[;ET,C ϶nxp!'| BYH״IϺC4M`AX *%dKK F*!4Zž"7Z 6p;&czh4Xޚ2\q̒۞B<}24oO+DHљ|ZilI=cRDY@|Wʵ!( I'(u9 V?i]_rG2kF'fDE9P|/AGsn[F"t[WfGA Ͽo5du\lMh;ZQ`qx>-]' MOeC/Iʽ,;f#=4ثF}NK$w$b2~qHв\H6NFM4I9-s0)Jr^~qU&)R{(H-#r&\ ROLd9ZJNW޳A9,BM3؎4>]j&rbTg=1uw@fjOVaJ3p洘3CtItw.# ΰ/m0zswvIv@˹STLZ<#fpe{P?B30#M֯āેD r=}b94`-% ;>#exnb`wWԪ;hB!񖏌|e- 9 .p)Rv@`:]Ou)6*0|L|fP?VuD~ʾ/hDbw%˝u΁NYu7/n8Vw!_뿤hA]9F.aG*A*:ؤ!C_rSm)K  d Op *:0AgR썰*T+V'3j2zz:L^9 [~*nTg!<(w_]%JZ٪pă8kvGƮ d4rir܊bw<V%K$qN/dШTnBG])oSѯ!ܸC}=xPyST_BP^l6Ɗ{ZRS^9qS-KVZ&#F%e^ZӜ&4wB$2(O3g[9EdWg6D}W_E9# b](Nt)>)ap|R7+yN=3vt@5Έ46I֪ޭw;ufZ `b%%|6 ZTW!MgπT[yʛ?jM=hcH l,b)UKX|`bg (Z\өk0fp`DR$\|-15Gw Ȥ6W`umpQ-#l2)*S,N1n*~]E)4IJ>dZ:G$yd!W}{% lu}Pܒ 9\Lی~%jg;*!`!qm5]=G17>Zuu_ 嫯fC;#$q }:n0t9-OK \@{$ҔM} \P[S|`e.zð-Rio6cm o:\KUX> ^hޖ nم p\Z!G5Foz,+qd2(,\uEM^ r~uķhpT~¦BEk5UBr@ l8s4iaRtR5} !03=꟡U;@"O\hV kNl .%P:6"YBI@#J?(}'I(!7TUtO_*>dW;A_7%$Dp*3PI ߽Wl (}-> E((8$ W-r ']O5dYqђe+T yfǓSi,z(ZHѷ}(R̪=AH"t=j?{b-X8~P-2`~gėӰ:Mb43*L1P?hFχT|.sKڥ߆`~4'ոN /`H` aC&yfERLv >F!zx³ցK~k -!2II}9Bpmi3~N_w/an⢽ץTdMm3z[5G8oQe)ズ("I3`~nQ:13ŻςB"?Df4SHyɒS$pQ.ͽie4{N*wMm[ۉFLX>Xa21TYhXK;axHv}&P/woWO#̗Y|TW$TFuedV<  -t-NWO,+]L&)0gPBGun[T#7/]9ό륓y[2oOt ?w1nI(kKUXEENpc]N4QƸG5gúg(&*bK%dxhM ϣ'uK9麙pGF2fxnȓ%KZ+ơcf4/ؓwmie+(B"嚹A[w-}>jW@hZ.zgjdILO`7l~ ̯VNlQIu'MNaYux/MPQ;GE.kKyZP>#hhݺ[!i}| ?*qKS3JAq/4l}\6UŬ|fG@MνRY^M=WnSn%ڧ Mٻk\;M)O|5Ƿ6UejZC\2B!r.N#/PwՐ6ڔ.Lp^U (7;S]vHٰo @%#':;'+h1EfG{'@>nQ"` yԂ1%crnͶ5 hԒg^4u c(Z\ L"נ.uK* eP!,{D%=ݾxOMëi}qd1Is TF/sN1ϰu(h ql&#[_% 0v^d n*}H^^źcy/8]7pk܆ܓq5Χ͜Bi ~GPfX"W\ 6|\0Z0JU@CB@={ ֨|ȼ3J$;G^}A!)ع`GvMj@aC\XP6 ?Fi,FM"36 •/|9V[\Lb}駲D%v]ORØӨ|46^iV%W0[l QmkNÂlV_aT?+ؚt'q|s${<+|=taKC E Ila9W9F"tvYYxb I@"wh_M[ S&8_Έ cz9Qvf2{f~(fud & TAM؏h:sKe|& c$`K'\pTG؂G8[u/ :<$/JZV8SU%\ i*^A NjwSj4eM/$E5*r M}vlxH"_"d|*3 F=qdC"S[ⷓ;&C4\"ƭY 20{/ur4bWYE5^dZFW0˂{by_ uEn sH4Fx-KeU,YJdhҝЏKJcQ+ݳ3;v :oZ *Fr"`}s) i1I|w'iQ&I)pW)w$4ٷS'TjyȤ+ HbІ ~ JeiE%uG:nV'w}_zdnV'C@bnЭTs=?=GΕ~`LL&e %4uhD>.Feׇ+T"Ų=8)gLH4RKjgNJϧdͯ%꟯(Kbs4BK 8c${ i?qRޑAzNLudl`j0ߪK\ K='IaM&^H GŊTBBfoP#G4ٲ.8/8SHQWzR1ёK n_ 򛆚R.3А̩H"u ܚP YU6cpznZK Ohy[ N^]:n&r"`ScQ]CAVA۴6O'iwYeIj' dS8CڵDgTwqYw8' 达? ҟ[D,.,Q-m >]'rDuWƕP6Ud_tUY!c` sLf"H@o[TU=FԻw0d$Np3 \|Ή%rxT:%ƙq`=]B#T/b!&tE"~>B/c;t~ Z&iAKGLӫYBsdKJ?l:3, %~"%=ڃT#C+MIQWyl镍(s_#]43̻/p\X`C)lrI! |6yn -2z ؑ ܺ/G$4sT-׈TWuOM0^c{ u]cu0yYoqkb֒Z+N~GF'9h - H^.P nãFˑV㣁?xsy 。o XyGoQPET㙼Q~qb;S'_"1v9 %N==,ax<P*c;<@.R?%.JS'RW_Kmz]dQߡv399W+PljlW߲He閎dMK }bKzXqtz99DzNr$aSٽeDp(^!'xB6`N==~^P:3U.xTS2N,| ~ǫ-?$^ ;Unb_HJY:ZԹhJ bvGIZaԚR6睽|-,Q[jk?pp|@6?#% Y%_OD_{Q y{G jB95X-~?`o+z+Hz} E3!vB_`')~Դդoxcb9H7$"ϐLb~Ni݌,gS[;4,-3"BΛBʷ_j/t7gJ^K矋PjB"˖C%vIMjEҪݏw쯐Y']$ ێǷPfEf31-:ӵqּښ趒ڃeL|l_CG)1k}po!kĉt2~+)J^ڕ~J#_JZwi"n48?yI9O60u_컲2[r")1|ѹ%J]S9E5L͏~  "'NK_i-TF'ӎj nTį*ߞjUfBjx CVͲ/ÎTs`XQH| o&lb9 b5f"2LVkA#۱!@BXs +Pc.Ej,߲:Mauʮ^ h/p:s4补Ӡ$9l_>|eHNY?Rfv gQAj+D+J:%ʐ9u s,ַJ Xi 8pFoPJcԍ8EPP?st~y)j\ן(uҀv$e4yx.\(hjۮb1x+݉>e8/$@%r^4H < ?CVsBK0o@e V#d!?1yBfIt:o}^R2GJXCLWޡ&PgśsecÕQ7xb3B}U!l28uZSF\3ٕ;PS)%L]K,|ITey7_-\ψr̾ݰ"i|jL4)X^AKn(# ҙ֕/ilvh2ݮ&`z0Ohaݻ4UwmӔ8e/[DmOc3ܟgC)ffJ=fk'2¨V? #8IP?T<*/s&ԨߩzA2^)T|,2w3ȫ0nՉܖ 3pݍ ZxZxKW֔`Zn o;`"1u NnTLʅ̧Oäƀ}t"'RNtD6aI\A |I3HȱwR/@P T娕#IW >px7cvb;~}x~1z#h2`?e#?}U]= ˘)h~4蹨y$goql82:rOME0 `^!  _#yBtA[T{tX@c9dRأNwcxL57l,ut{,ZۈQ(~i@ bw 6_]I6vV6.=h~lT4*)eUμuYSBԞV/McPHSܮ2F/^->bXHsޣ@>! >x݃~ H3=O=s~%KK 8WH/<{ū QW Cڿrb),LGjn7kMCKg策8ð")Әk</Y(sT/g) qJNٽajlckI0|F5%晵M7}{S6WF ~Χ1A(Z'PVyHx$ q[-wC+w<%XmSk?,G'˖Mv \(7Gܫx^k@Ki@Ґv^p5ͽESZRdD>ZO9i9T8ދ_}ɤǜ8}cǶ!@QeC!AB>:e"mFC.# Jz?TH)̞g!;췓i<+$ OoF )KIBJ'teW3,x/HGXLԈafDv"EַTQOaQm׸DU, J+^nl *rdm@1*(٤۟ta@5p>@ա Xys/s7?ᙠ\Ղ@)͛f.AU,Tqoږxp TUV]WA==rcJ_}A4@=r^mg·(PT%BtXW71^il&ן}-w!Pk3ήua4=\% W݇@;:q9G@擓i7Ud{}=T5vXўJ6舲eFVz%ԩ_$k vJNSOt7%r^}nK(P *Ҷ ^+.[Oe!c,`Ǩ[9$\x`P.VK&>ئa@΂4#?=>.ĂK>`C+ K NsloK_dHfO!lzB-Eä ZFӚL o\Aq#q]>`׀,a--C>$-/+t:NuTNϦuW,j HPrx .|-5pxHKj./1`2fl&ٙHhS) ==e-g\Ep2Ln7ZR;&#U\<,Y$>P{·x&Nh}8t!7Z)TM6FK ۨI5tRd5C$@ NέЂ0R;m3ՠ/ |IY pC-пlO}T_eMR/aL|Lz3*IܲgTL5*. eG0(cczVN2]=̞u@3 Vy;GUjM‚}G;=7\-I((G߸;csɌ\x}:lZ골H#x|x:uQFbQAt@_hc}SmBwS 9~<=;c A Ƣ옶pf1ݝ)G?3jDԢ%XN!u$%YAגnnpJ#1 nW(> !oq\UzP`-b +SaSx,{z9K]nr2 )Fƒ}pSqcH0`)3J̼X-T*۳Um6eh'vb(DdgkVٮCS7!! fgr d8pm*2&$HUnxFY? 2P03xJy VV-}֪y޸ʚOg[C"%"vA1s }]9WbH7U%ͱJ#OD䡃 Mr rGF,'V"3 G\<I3vR6 (ugYQ} V8ǣ>mڮM@aJ(Qn*=^xH;;n֟LIMfEOy!^lEz:^qo$<}^uԅ#͏p,*MO.SqOR87=U`\(1G'cr3>*ZQE]>C۟ҿu_{_7~vøp?b:WCQtz=etÿ=w*= tˊS+K"CTmL ? q|VGtlrI/-K7SbW %G''_'Xy&ium.մXZlY@j0:hep7WLgr[{K`fGRNue1 ZzBQ;ʃy+a1Hon4FuAjgDR 5ċbYBAM @$rS U%ꇧ{1Xܛis'[c ]-3裿RG[ |6 TFvw]:p["f'M׈G? $gvVgHiX .?&vxA5ްsx< ("j7[inq ,o[qRFFJ]tG f][/M(mFu^)H%_{jrVJkG37Ǡ; kId1z0"{rg9+o/|iѪ_/ګz ə^؝F}TaAA$?[>byvy?QW[of☴ִִTKm=.>E&M4Ґ t$t ̠H6z^bBc'H =ۡt9uw̉1(O`Bm"CpcP.0D'˔wlQ/{`슯+MkMkMkMupiCQGq}:؋*,,at8Q VR DvQ ]u GX`i\,Sc!e13AAPJմV][Kium.մV˖o@Pg/%9Iν"Nn?{3y#1݊K.Ԧ2KH'$!,LX!bgzL ʇvh$[z'X t]}_+a&~E >hx^nRyn{KFQ Z7;H ( c$7,&0I?x/zzK pC. U 0,,@5EMT)MqZDxKV `:+rj57iݧv~My7iݧv|cD\0F'MZzOAHOSu%q{T p?UoS 6G鏌98] PBoJ=Hjj nZNNYԿA,a#eQCb-=m.o$N̚*^Nb1KtExdت$!/C(qwo3-#lh ݮ&bX޴wdC~!͆]AH/!ï]U0775>Ʒ!y !bQǽ rR%xa5`3.E^ iZZ\hDSh -*,"HR-y:C3jUr^#\e2$ɱ+VL.)/?/8O+_vձ?~#f6tL=M$p,6dEm@W'ՌS}T"53gv0NM!-5555555555ϓ "Qg [sW`yOg:/)yK^R򗔼/)yK^QB8U7uصgh>xLae3,)I0zl,:}㝿݅ـ)\>RySS,]Xh**p}P>(bXUܣ9RT)0'ET7 ɐ'R2$`7!4!w< ׇb'}@#1-eQCkE[{/덯YU$A1Z 70*JC'+_]̺u?1~aymڙzdc1jPi"܁g僱@` ْb2t 'tRl$.[Kۣ2i;{@Kk ۚ@u9 SnAs=}y{Tl0fHrUIjT = !pZe !N* ( #)%pPk$+ p@+X[Is1ƸkT.SMdN/r291W kOlbu05|>/m|ko[|_ƶ5xtsfR1/>JX:,YӛEKq;AVcJڋe/)yK^R򗔼/)yK^RR]Nw'™X~<^}y=|EppcbOKjk<@qDg&A޲ys>!Etkɇ),@)Aʹ V!{,/]2vN[cX^RL4xaH&[%iJy?ص+,0"%eHwcaܘ.hsp%eФ3@uT*s~\\xye#d Ŗ$V'\I͜$;~Cs!uHG Hʫ\-g[fv`N ߜR W+x/Z'`:qHCqC>gv'㧬hed@|G3)O˕g6o?,M܍ (aۏPP]u[)vS9d: OjZ}Eg~ShhJ5$l&S)yD 2 %DA#ϹP &2*_Z/ӈ`#G>!}h5~}M*lf0H3|!,J>6KZ6 jO3S:%lyS+mݜB<>E\ ~8iC 7;XgrdN< â g봴J5dA?O+qFJ+ic_"Οƶ5/m|ko\KvIMj]H yc_{nVE}:TEoɝ޷gCG.t=p˸@]}~91w"^=󀤂$s hwEk1mVs5D Xv 0NEaeO(/Gn,xcHV2sn-$w$γf}P!$"UB #'#?=U27>8rɅ{H96$o X5nD?WˣfZ*U:f6VRo@l8yr歖1 N>K9U谬`BpbA,;0+vzQᇁFE2sOF\%cK]8q\-d m PA<@cb 5i>8jE٫߳}Mz&mP2=`wɀx9md2b/ĈG3`VyWk|(8e8z6!CX)XB?>d;| ,\ɕ"e7lwhZ3ZD#Mɯ@IvE{K']]3 8_B/셝?:$x6#)-+ b:G ēbu = +=e5$Z{SBcF7vetrn9.]3Mj)d9Cx@ǥFXt ]ӻWh[x**<(JX?wiN,߷Y[[~N;4@[q%< yQU THEyN+#=w|+keDgm@jI!1Ռ{sGޥP^&\}Vgqlj^o/D R4.F$V`wIF6G X")f:Vn+*E!|yk~~}U:E=saj" SnG|,3G}=?F b~ɠ:;!^iD(\¬Vڐov ĉx4ua֭`nYv%r0ٰDVh8!ȘwP#V6CN!w$8TH֓L/C MzrQ-Vp}m(3bSϰZ SV]bˀ^U"@#^+pl~6@Ma{KC?y>)g 3PhdPRF#Z%"3eD?=9[q &2 6 }E=kUܸ<%3?t*IX?#HIXl}KMy`._`ɟ1M0 7K6-0ِ2B1tѡ h E$W?yIf,Xd by~ ZYh^S^?. w [&cR/->@Y6A-N6ٍJkof﷖abG\5?D@h>50`' !s lS+$|(qrD 'tdYq,MUgWWnӰqf_-:QaC9UXa[t1g U3;.kRA hJb13)dx$ZB?i,ՆٮϱӬeWx1}:Be<9 vl /aJi;I,!χ3DG=ސ\8ET领g; *D{=>8nP=DlY&qF:2[XM_O;Z2aLc?y#" cq0:UY[JuMf\jr\FKdX. u<>YbaGcOpf~7vP(t@0~!Vڰcz6v&ߎͯ!cFV BO&rƪsP ;F}elH.Ha]7q0r +ݝ`%eʹC;tfe,XXTA89@.)Xz5P lD?T_i1W6+x~k]"LH-vQso_kAѸ剞FS]=:Ja%K/w̭{jdHZ.#Ft=jye6kYpe17Aq ]fa~:AQ7UO!I{9\p[WyĄb> e/W`A|ژV/\wG 8*&BNA@X%s/5,ˍey G0pC#ڥ ŷadKX)3*H*VH qaSuo(b/Xy~|h) nRv( 88nV!2JB@O*ܵ6 7%a4-ցA='M`U(Ľd1T0ed0vYr|M|)U{3gj*+=W맬< #V(ZZlƅO 8?P%PΟۨS%Y,9Q!RQrLe ?)ͭUP%B5ĺD[,DN79<=l'{_9sOM0BJ:!70^]4_QjMxHŔ 8zj:ŜY:%1:`'nT9qJؼBz(*o@-1+=m5I]䱉[f: }laJ4ڠ~@0S -!u{N3vL_"3' a'u,d6=KJd-q.5O J~pD^ʗJH 2@[5ǘ,wو[ۨ  60xYv˳;0C /rv `mIOyBmp[.Eh,\v&[탵L`QA5PVQo<'7\"Db~cR/ 1ZJ@z T[KT(V!X|jFOGs<-¸% wy8!Ė*|6^n% h e.7XGi;ly ,)EUp!GEj)$TYi a'68{ws=}}>,~FaOp'l߇۷{z}=v^;w݆}#>'o_ꛇ;?C}>Fa&w]7龅ɒ_bT+l ooeyR`ޔ䗣P|dB?63ֺ$OSA [x?wooIAf,ysn~~~*aIHUBm$Ɩ7\OYп"L"Gol]kVp|{~yS%k<[+XW·2S7:paǿ:h8 ? Zf@7fd,ڝf]5x([Tf)SdeGPg>D>D'CGJdD.m})v( M]mL( 7˷Dݱf?$c"dVCydbN0b5<ѵr6-4RXg0s~ ;,yYG ֭T#Cf@աhaZC!T~%q~ @mZZ%Zr:pp xS.]7r#`Ev8pL3j 6uf 18-8t F+mmlBxr<ÛOl1r %4@(T|E.AKg/(.H1NHRVo#Nh\a5`Rj0 >G81xYEm/p ng[E@[Wr"b?| *0DAyϴF7_R? n j!`Znv TW*25(oVMT 3c4ϓԍ0Hzax>0KVt&ɶP?܇8"㧡(nk~8\|bj'@EhNh+C p{cue ~*;XLwvL7lͧ$q'<=S\*0hȶI3c;tڵ0hyYd^/XJqAb ܒqZ\l/cwtV1ZF2+HEiȭ#cB}"UpF_A=t&df~?N( cĠlΘ МlJq-Fg8+AijV_w,:WS[3zs9)Y(I[52Kl'?qnQhe LQ̘2|?-@B%] ܈~]J%`9IxYނwX5%1D BJЪ 5s*>Ø'*S$$c_?)]Msx8W!#T|/ qc|A[A虠R5"qeDvl Yݡ[TNm9j%k#Z[юHlf/Y+^Om֙x5)^rթUAN K>` Z6VM_vi[`ˠߔ +0{]rl6 #%ΔEm0u8Ű?"oͬ+a8L{_6O=LD ea?!?صb 7@!fRCng$m*`Fi9qIl`_= 5ADŽ%$bdM12&b[5THF3S=_ˠ,)VGJu/pd-[Yneu-[YnңMI:!rQnùE5Ǯt 77s~{azHֳ)H8"04 =eQ$ЬKw>O ^prBuXX WjVST٤k,F}s六 GصCīL4jR(r16 X).[35шcN趟yh\V]ԢX90#$|DˌH/쥶8,2<Qu$I7~Km$0< 8 F}ܹkd?B6 mI"1zQ [:Re"Ҩ~S_'XL0KzŔk*f 0/D{",x Ou#cfHGIO'B* F-gLy:g["nv]Q܋7Iԏ FE{ߨ}00ۦn`Fj1)TCe2ƘYω{KH,yT*zRk'?g|7p|+6 LRmpDRԀ/[f{Um14s %_Vddpf<,0NxYUK-kG/H7G8jMg6Z4rhM3x0yG5^}'ON[Q 6+@pS!pHbk t`b>YY[Xצ&ֵCCRkqs88~X*-[Yn#[io:3v4PkH^]$x :ڙe*3I<5ʇ36-nΰb13oNuYc+YtVB1ABRu w8?K T^:fpxT+IGj91T_iH}/,7{e,HjL *5hy+k*SmN|&$ɌeG^3׷qBH8!m4$;2f9(xΪ/Fת%sU Q<_ c ];%3+j1g 9w9YIhi=_;@Ua#:/c+:4xǺ<--{5V[fYwv-32y |ڮEY;1WvVՃ2u^lQPW6\nD0=,}@(\hbQI)0 %*b弼B <[UU)𒓪g߻=Ʉ?\%]GHaP6opS1x>£P ֗6 tJVqr[Zj7tkG %`hT?ߧ.ZZf J^(Ja9R|IFʟoМ, ITq./ r-8ӈ!U bCx?0Nq3&):C)`Ӻ<qPr/nAcve@X[iseJV\%,~   ҿFL?z4jIzј $)էECz&oRv*mzÝЅ4Nb A2Dž" xC#pEޠS-&@X"N{oF^AR׀>sdk \;7):>V{sAG#6YSI{톢R``, x'hgW^[O ()u1eAK_6kާ>h[σ&̵PƖ"~1B+.%Eҭh:AsF%yxB6'TV/3F.m027CQi4~+>3} )𳭳`Ok9b'Ĩq@(n\QRsB'7l?pSOB)\i@a|앸Jߢsa~Ntm z(kYBScd ߊp! X9Kqd~7@1ghoRJ6*k*`R]2\2aЁG>LUf>Y|zЎ6noÌ[s4ZWKMm!㧰}P0r[A|UuTYM}} 4=yB+܏?Ե>CkڬdMQ>'.Qۮ~X Hߘ< r\!ҖS: nI$I$siᤨޜ75ENQȂ5 h蝪ɳnfGN#*/QZ 0L2`)^qfo0x?9;b3rЈ,$i|xF pw̾WCH{Ȓ >3ohr8nhVløxHy-{yɩٜ`m&mK/*ms䨬+9:sI^d&CA%LOl3s]wx%QqoE;#Fx(57<24lpMMxc{jSP]34l0R9æ@>g4ptȿs8tDbwe=yugoJLw܁1!~d ?{K| xw! |C[XX[ÒKGNK.ex(Qf}i,&dIm݀޵0V_n\VFmzNhkC-1,Mb+sM1yqXTa)gK3*C4(E1QϊmvݟD@iwJ^>7 7ӫ ꡌCbjkG6^=[Rv]!VXV omt9[i):E{"C7LZ7^EM3p΅VA/TKZ(-h I#|gࡶƸ-iYK;k$dtZޛ+wە_}ZYXV55Ȯd8$-qɧ(|? bҿَSJϪ=%E5oO;ÆxťIvwn%OJ)Vgz؜rrL'j']ٸJK3I B$'!3Df4T?s._ !~֤.+) 2RH붞7|=Jm0@oYz`0^tP`Er 3B0W2pKG'$le̬43Xt L{ϖ%;Tm "t_A %Ü.d?S ?qi#ˣ7NL9JB̢rAb}JȜ<鰡姁Hۣ =n4[ :Ox-.hZ'덀5,+q%_N2':WP}O,1\ ʣ- /]3KFls}HTEƅ(887aϘ `5FZ`;Xvw~? 4>ڤ+\Paa]2j9m$Nӧ2l,\Vr^]vѮ)ν!/;XktpftQt}E/K1gXcKGC>Ԗ\k|}8U&+GrA82kݕp.O+*]NA]/m{.ռbxS5_{to)뙧0ܦ?ݻeVȁ`ǂAqqPy7$pq1B)z[ _0xtՉ1$ŭy5#:?wT "rO\$ew~6 RUq6A&u_4NYӄ=t(t5Rzd1ͻ[︬4M!=^(2Ý;v1MG!VEy聽<ȭl-_rHX;ܸ_`},؛?ɴnl߰_6Yݭx台-.b+C:4f@0!,T4}:3L,b'UCxɿD䂖"? .b*M86,3z:NbKqx4_ 2{˱SeBz' HB:eCȞC-Ι!.~/ F| KOJ\#h圫o+Dg+~T>c,lms}^`0Гz0}ȗ$XRhQz/m<ÌK6[Qj&kt$4ckDš>=¥QQt 6Λ&Ð3q/{=CF!Pψ"[J I&Ub<ۼm#§JGGK?[@_>zG[\uui<&DZ?bg5.}\.:pAs ܮkNF 2{gb4`oich#Hmmmmommnmmmoom߶m}nmmmich4ٝY띙ٛٝٝ_ٕٝٝ_Yٝ띙ٕٝYٝYٝٝYYYٝꝟٕٝߕYYYYٕY_ٝߕYٝYYߕٝYYٝYYYٕٕٝYYٝYٝYYߕٝٝߕYYٕٝYYٝߕ_ٝYYߕٝ__ٝYYYٕYٕٝYYٝYYٝYYߕٝYYٝYٝYYYYٝYYYٕY_ٝYYٕٝYߕߕYYYYYٕYYich8 ˦˦˦覦堦榠栦栦堦栦堦栦妠堠禦˦˦禦ˠ禦覦栦榦堦符妠栦禦栦禠妦謬第榠榦栦禠禠第栦妠榦榦栦砦榦第禠栦栦第砦禦妦栦禦妠第禦禦禦禬icl4ٞپ랹랹랯[Y뙾땹땿[ߕ[[[_Y랿[ٛߕꞹꕩZٝٝ_ٝߕٕ_ߝ_YYYٝٝߕߝYٝٝYYicl8榦禦堦堦妠妦ˬˠ˦禠妦榬妠ˠ妦ˬ榬禠榦栦第堦堦妠˦˦欬禦ICN#mmmmݶommݶmics#Homics4ٝ_ߝYٕٕ_YYٝߝics8堦堦妦嬬嬬嬬妬第ih32          $&(*)'$  &*+,+*' %*+*,*+*++*%#+*,),*,,)+**+#&+)+*,),*,,)+))+& $+)+*,),**,,*++*+*,,)+ ))++)**$ +)+*,),**,,*,**,*,)+))+*++)+*,),*+*,*,*+,,*,)+))+))+)+*,), *+)+)+**+))+**,)+))+)+*,),*++,+*,)+))+)+*,),*+*,*+*,)+))+)+*,),*+*,*+*,)+))+)+*,),*+*,*+*,)+))+)+*,),*+*,*+*,)+))+)+*,),*+*,*+*,)+))+)+*,),*+*,*+*,)+))+)+*,),*+*,*+*,)+))+)+*,),*+*,*+*,)+))+)+*,),*+*,*+*,)+))+*,),*+*,*+*,)+))+,),*,*+*,)+*+)+)+))+*,*+ )++**+)*,,)+)++,+,**+,,**+))+)+),*+)+)+*+)+)+  *.* )., /?A=.+0!6NeffgM53IgffeQ86NfeggN53Hg fR9 7MfeggL64Hg fR9 7MfeggL64HgfR9  7MfeggL64HgfR9 7MfeggL64HgfR9 7MfeggL64HgfR9  7MfeggL64HgfR9 7MfeggL64HgfR9 7MfeggL64Hg fR9 7MfeggL64Hg fR9  7MfeggL64HgfR9  7MfeggM6 5HgfR9 7MffggN:,  ):IfggfR9  7NeddfM?:767:>JefR9  6Mdhlrhfiklm lkhffrlheP7"Fd~~gH&*CYloZE,#++/BYl oZD0++#&+ *.BYlpgf moZD0*+& $+ *.BYlk_YVUVUVZ^hoZD0*++)**$ + *.BYlkZL?= @JYhoZD0*+*++ *.BYlkWB0-, 0@WhoZD0*+))+ *.BYllV@.* .>VhoZD0*+ *.BYlkXA.*+ *-=WhoZD0*+ *.BYlkXA.*+ *-=WhoZD0*+ *.BYlkXA.*+ *-=WhoZD0*+ *.BYlkXA.*+ *-=WhoZD0*+ *.BYlkXA.*+ *-=WhoZD0*+ *.BYlkXA.*+ *-=WhoZD0*+ *.BYlkXA.*+ *-=WhoZD0*+ *.BYlkXA.*+ *-=WhoZD0*+ *.BYlkXA.*+ *-=WhoZD0*+ *.BYlkXA.*+ *-=WhoZD0*+ *.AYklW@-*+ *->WhoZD0*+*-BXllWA-*+ *-=VioZE0*+*-=UbfgbS<,*+*+:Q`hgcU@.*+*+5GRUVQE4+*+*2DPVSH6+)+*.4:<><3-*+*,3:>==5-*+)**+,+**)+**+,**+)+)*+            #&(* )('# '*+,+*& %*,*,+*,*+*+&#+,,)+*,*,,*+))+#&+),,)+*,*,*,,*+))+& $+),,)+*,*+)*,*+))+)**$ +),,)+*,,*+*+))++*,*+))+*++ ),,)+*,,*+)++,+,*+))+))+ ),,)+*,,*+)+)+*+)+*,*+))+ ),,)+*,,**,,+)),*+))+ ),,)+*,,**,,*+)),*+))+ ),,)+*,,**,,*+)),*+))+ ),,)+*,,**,,*+)),*+))+ ),,)+*,,**,,*+)),*+))+ ),,)+*,,**,,*+)),*+))+ ),,)+*,,**,,*+)),*+))+ ),,)+*,,**,,*+)),*+))+ ),,)+*,,**,,*+)),*+))+ ),,)+*,,**,,*+)),*+))+ )*,)+*,,*,*,*+)),*+*+)++),*,*+))*,**,*+)+*,+*+),**,,*+ )++*,*+*,*)+ )+,,**,*+**+)+*)+))+)++)+))++,+)+)+)+)+il32     $(*++*($  '*++,+'  '+*++*,*,*,**+'(+)++*,**,*+**,*+)+*(#++)+))++*,**,*,**+))+)+#+)++*,*+**+*++**,*+)+ )+)+))++*,*+)+)+*+))+)+)+)++*,*+*,*+)+ )+)+))++*,*+)+)+*+))+)+)+)++*,*+*,*+)+ )+)+))++*,*+)+)+*+))+)+)+)++*,*+*,*+)+ )+)+))++*,*+)+)+*+))+)+)+,**,*+*,*+*+)+)+))+*,*++)+*,*+)+)+)+)++)+))+),*+)+)+)+)+)+*+)+)+)+     %;<<;$!:<<;' /VefV/,SffX3  /VfgV0 -SgfX3  1VfgV0 ,SffX3  1VfgV0 ,SgfX3  1VfgV0 ,SffX3  1VfgV0 ,SgfX3  1VfgV0 ,SffX3  1VfgV/ ,SgfX3  1VfgV1  /SffX3  1VefU<31 3;SffX3  0[otsorsttsrorto]3  $PsvS%  '+3Ts~{zz~uU4+'(++*3Tsr^YWXY^puU4*+*(#++)+)3TssV>8 =TquU4*)+)+#+*3TssR2*2PquU4*+)+)+)3TssS2*)+)1OquU4*)+)+)+*3TssS2*++*1QquU4*+)+)+)3TssS2*)+)1OquU4*)+)+)+*3TssS2*++*1QquU4*+)+)+)3TssS2*)+)1OquU4*)+)+)+*3TssS2*++*1QquU4*+)+)+)3TssS2*)+)1OquU4*)+)+)+*2SssR1*++*1QquU4*+)+)+)0L`cc`K.*)+*-I^ccaN1*)+)+)+6BDDB5+*+*4BDDC7+*+)+)+)+*+*)+)+))*+**+)+)+)+*+*+  $(*($ (+,+'  '++,**,,* ++**+'(+9),**,,*,*,,*+*,,*+))++*(#++)+)),**,*+*+**++,,*++))+)+)+#+),**,+)+)+)*,,*+))+)+)+)),**,*+,+)+))+,*++))+)+)+)+),**,**,*+)+,,*+))+)+)+)),**,**,+)+))+,*++))+)+)+)+),**,**,*+)+,,*+))+)+)+)),**,**,+)+))+,*++))+)+)+)+),**,**,*+)+,,*+))+)+)+)),**,**,+)+))+,*++))+)+)+)+),**,*+)+,,**,,*+)+)+))+*,*++)+*,**,+)+)+)+)+)+)++))+)+)+)+))+)+)+)+)+)+)+is32;$)++)$*+*)+)+)+)+)+)+)+ ** ** __^`__^`__^` __^`M^^,*]_+pzy{{yzq-*Cy}kjjk||D*)+*CyzE00Dy{D*+)++*CyzB**@y{D*+ *CyzB**@y{D*+ *CyzB**@y{D*+ *Bz{A**@z|D*+ *7RS6**5RS8*+*++*+$)++)$*++,+,+**)+ **++*,+)++)+*,*+*,+)+*,*+*,+)+*,*+*,+)+*,*+*,*+*+*+)+it32                                                                                 !#&'&%#!  &()++,,+*,-,+ ('#!    !%(+,+.+,**,+,+,*,-.-,++*)% "#'+*+,*++,*,*,*,*++, +*+,*$ !')&+&*,+))+,*,*,*,*,*, *+)),-,/-'!  %()++,(-(+,))+*,*,*,*,*,*,*+)*,(-*)+,*% )+*)*),,+(-(),*+**,*,*,*,*,*,*+ ,(,,+(,**)*,,(+)+,)*,+).)),,*,*,*,*,*,*,*, )),,(,,)(-)*-)%,+))*,)*),)+,+).)),*+*+*+*+*+*+*+*)),,(,,)(-)**)*++,&  +,*)++)+)+,)+,+).)),,*,*+,+,*,+,*,+,*,+,*+,*, )),,(,,)(-)*)+ ,-,,* !*+))+)+ )+,)+,+).)),,*,./-./,)+,*, )),,(,,)(-)**)+),+#")++)+)++)+,)+,+).)),,*,&+,)'(**'(),*, )),,(,,)(-)**)+)+),*!"+)+)++)+,)+,+).)),,*,+-*(+(+)**),*(/,*, )),,(,,)(-)**)+ ),+)+,*!  +,)+)+)++)+,)+,+).)),,*,+-+)-(.-,+,-).*,*, )),,(,,)(-)**)+)*)+( (+)+))+)+)++)+,)+,+).)),,*,((+')**+)()(+*',*,*, )),,(,,)(-)**)+ )++)++))+*(#++)+)+)++)+,)+,+).)),,*, -++-+()-.+,++,+*.-+),-'-,*, )),,(,,)(-)**)+)+))+,$),+*+)*)*))*),)+,+).)),*+* -)),)+*,+-+,*, *++*-,**,-'-*+* )),,(,,)(-)*)*) +)),*&+)-,+)+)++)+,)+,+).)),,*, -)),)-,,*-+,*+)+*,+-'-,*, )),,(,,)(-)**)+)+)++)++,#++))++*+)+)++)+,)+,+).)),,*, ((+).+,)+,*,*)),-+-'-+,*, )),,(,,)(-)**)+)+)++*+*+)+)+)++)+,)+,+).)),,*,)),)*,.-,- *+,--,--*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+*, )*)*,,+,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+)+)+*+)+*+)((*+,*,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*, )),))*))+)*)+)+*()+,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*, )),)+)++,+)+)+)+*,*,'-,*, )),,(,,)(-)**)+)+)+)*)*)*))*),)+,+).)),*+* ,)),)+)+*,+)++)*)+)+*,*,'-*+* )),,(,,)(-)*)*)*)*+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-,*, )),,(,,)(-)**)+)+)+)*)*)*))*),)+,+).)),*+* ,)),)+)+*,+)++)*)+)+*,*,'-*+* )),,(,,)(-)*)*)*)*+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-,*, )),,(,,)(-)**)+)+)+)*)*)*))*),)+,+).)),*+* ,)),)+)+*,+)++)*)+)+*,*,'-*+* )),,(,,)(-)*)*)*)*+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-,*, )),,(,,)(-)**)+)+)+)*)*)*))*),)+,+).)),*+* ,)),)+)+*,+)++)*)+)+*,*,'-*+* )),,(,,)(-)*)*)*)*+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,+).)),,*,)),)+*,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)++)+,)+,*).)),,*,)),)+,*+)+)+)+,,*,'-+,*, )),,(,,)(-)**)+)+)+)+)+)+)+ *-)+,,)-(),,*, +-))-)+*+),,*+)+ )++*+*,,*,'-+,*, )),,(,,)(-+(*)+)+)+)+)+)+)+ *-)+,,)-'*,,*, +-))-(,,+),*+)+ )+*,**,,*,'-+,*, )),,(,,)(-+(*+)+)+)+)+)+)+ *-)+,,)-'*,,*, +-))-(,,+),*+)+ )++*++*,*,'-+,*, )),,(,,)(-+(*+)+)+)+)+)+)+ *-)+,,)-'),,*,+-))-(,,+),*+)+)+))+**,'-+,*,+,)),,(,,)(-+(*+)+)+)*)*)*) +,()+)+-,,- *),(-,*+,**+)*)+ *,(*+,++),,-,)*,**-+**)*)*)*+)+)+ )+))+,))+)('('(,*-,**,*+)+*,(*+,)' )**),--+-)*)+)+)+)+)+)+ )++)),)+,,++,+, --+,,)+*,*+)+*,))+,+,+,+*,*-+,,+)+)+)+)+)+)+ )++))++,,*+*,*,*+*--,+),,*+)+*,)+**+,*,*,*)*++**+)+)+)+)+)+)+ )+)+*,**,,**++) *-,+),*+**+)+ *,+*,,)+*,*+*,,*+*(,,*+)+)+)+)+)+)+ ((+,++*,++)+ *-+((-,,*+)+)+ )++*+*--)+,-*+)+,-+((.-,*+)+)+)+)+)+)+**++((*)+))*)+)((,*+)+)+)+*+)*)+)+)*(,*+)+)+)+)+)+)+,,*+)*))+*+)*),+)+)+)+)**)*((*)+*+)+)+)*)*) +,*+)++))+*,*+*,+)*)*))+)++))+)*)+,,))+)*)*)*+)+)+)+*+)++,*,++)+*+)+)+)+)+,*,+**+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+*+)+)+)+)+)+)+)+)+)*)+)+)+)+)+)+)*)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)                   "&()()()&" !%()()(*(% '-123430,%!  %*.134320'" !(06:<;84/) $-279; :9660*    ',5;?>=>=:4.     (38<= >=;:6/%   *29>DGIIHD<82$ %.7:CHIH IKIE@:4+#   ,4;>Q`dcce aJ?<5'  '1:80&  .5;=Ncgdfgeg dM?;6,"  (2:80&  .5;=Ncgdfgeg dM?;6,"  (2:80&  .4<>Ncgdfgeg dM?;6,"  '2:80&  /6=?Ncgdfgeg dL>;7,!  *3:;FagegeffTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;FagegeffTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;Fageg effTA>81'  /6=?Ncgdfefe fdL>;7,!  *3:;Fagefef TA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;FagegeffTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;FagegeffTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;Fageg effTA>81'   /6=?Ncgdfgeg dL>;7,!  *3:;FagegeffTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;Fageg effTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;Fageg effTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;Fageg effTA>81'  /6=?Ncgdfefe fdL>;7,!  *3:;Fagefef TA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;Fageg effTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;Fageg effTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;Fageg effTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;FagegeffTA>81'  /6=?Ncgdfgeg dL>;7,!   *3:;Fageg effTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;Fageg effTA>81'   /6=?Ncgdfgeg dL>;7,!  *3:;Fageg effTA>81'  /6=?Ncgdfefe fdL>;7,!  *3:;Fagefef TA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;Fageg effTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;Fageg effTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;FagegeffTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:;FagegeffTA>81'  /6=?Ncgdfgeg dL>;7,!  *3:81'  /6=?Ncgdfgeg dL>;7,!  *3;81'  /6=?Ncgdfgeg dL>;7,!  *3;81'  /6=?Ncgdfefe fdL>;7+    *2;81'  /6=?Ncgdfgeg dL?:7."  +5;81'   /6=?Ncgdfgeg dM@=9,(  %-2>>G`gegeffTA>81'  /6=?Ncgdfgeg dMA=;1-$ $)15>>G`geg effTA>81'  /6=?Ncgdfgeg dMA?<84,)'&%%$ &(,/7;>>G`geg effTA>81'  /6=?Ncgdfgeg dMA><<82.0-.,- ,.0214;??>G`gfgf TA>81'   /6=?Ndgced cddcMB?A<<:9765"667767::<=@?HaeddccdgedffTA>81'   /6=?NdgcedffgdK??A>=<<==?@??==>@ A@H`effgffgf TA>81'  /6=?Ndgceced bMEGKKMPRVVYZ]\[ZWVTSOMJGIEJ_d ffTA>81'  /5=?Ndgccdegilpvysnmqrqpqqppqrq pmnxvqlhgfe fSA>81'   /7;>Magjrvz~}ztokieT@;60'  -6?IaxydKA:0&  ,BQ\ao~~~ tc_SA0 *?HKRW^_f| ~ra^ZQK=62+*+)+)++)++,#++))++*+)+)*15?FRX^`l}} ~j_\]PKC=545334 35589CIQU]_f| ~ra^ZQK=62+*+)+)++*+*+)+)+)*15?FRX^`l}} ~k`ZYOH;50.-.-, .03ERV]^l~ k_\XOF:4,,*+)+ )+/0;BNV\^f| ~ra^ZPK=80+*+)+)+)+)+)+)*.3=DQW\^l~ k_\XMF:2,+,*+)+ )+/0;BNV\^f| ~ra^ZPK=80+*+)+)+)+)+)+)*.3=DQW\^l~ k_\XMF:2,+,*+)+ )+/09CMU\^f| ~ra^ZPK=80+*+)+)+)+)+)+)*.3=DQW\^m~k_\XNF:2,*+)+ ),/0:AMU\^f| ra^ZPK=80+*+)+)+)*)*) */34/+*+)+ *,49DKSUZ]_ ]^][WQIB63-,+)+)+)+)+)+)++.5;CIOUWXWYYZ YTRLIA;2-,*+)+ *,06@FNQUXZ YWUQKB=41,*)+)+)+)+)+)+ )++-15>AHLPQRSQSQ RQNKGC:50,*+)+ *+.3:=GINQRSQS QRRNMJE=90/+))+)+)+)+)+)+)+,.008:>AFHIIJK JFC><32.-*)+)+ )++*/035@CFHJK JGHGF?=95-,,+)+)+)+)+)+)+*+.03489==?>@? @<;860.-*+)+)+ )++*+-/189=?@? @>?>=8521+,,*+)+)+)+)+)+ )++*+,,.0234532/.--*)+)+)+*+..02354511.,*+*+)+)+)*)*)*) *,*+,-/.0/1..+*,*)*)*)*)*+-,-./1 //./,,+,))+)*)*)*+)+)+)+*++)**,+*+**)++*+)+)+)+**)*+*+*+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+*+)+)+)+)+)+)+)+)+)*)+)+)+)+)+)+)*)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)                                         !$%$#""!   '))*+,,+,,-,* )**#   !%(*++,,.-*-./-+**)(%  #''*+,*+,*,+,*,+,*,+,*++, +*+,)$  "))%,)*++))+,*,*,*,*,*, *+))**+-)&!  %))+,+'/+))+*,*,*,*,*,*,*+))+*,()+-,& )++*++-++&.-(+**,*,*,*,*,*,*+)+,,(*+,*,*+)*,,(*)+-*+-+&.,(+,*,*,*,*,*,*,*, )+,+((+))+(+-)%,+))*,))*-*,-+&.,(+*+*+*+*+*+*+*+*)+,+(()*)+(++)*++,&  +,*)++)*)*-*,-+&.,(+,*,*+,+,*,+,*,+,*,+,*,*, )+,+((+))+(+ ,-,,* !*+))+)+))*-*,-+&.,(+,*,./+.-.-.-.-.,)+,*, )+,+((+))+(++)+),+#")++)+))*)*-*,-+&.,(+,*,',-'()')),*, )+,+((+))+(+)+),*!"+)+)**)*-*,-+&.,(+,*,+--+-(+*,*+),+2-+,,*, )+,+((+))+(+ ),+)+,*!  +,)+)+)**)*-*,-+&.,(+,*,+..+.(.-.-.-.*--0+,*, )+,+((+))+(+)*)+( (+)+))+)+)**)*-*,-+&.,(+,*,+-))-&()()()()(.+,*, )+,+((+))+(+ )++)++))+*(#++)+)+)**)*-*,-+&.,(+,*, -,,-*)+,-,++)+,*, +(*+*-*+*(,(-,*, )+,+((+))+(+)+))+,$),+*+)*)* )*-*,-+&.,(+*+* -**-(+*,*,*+)+*+* +(*+*,,*+(,(-*+* )+,+(()*)+(++)*) +)),*&+)-,+)+)**)*-*,-+&.,(+,*, -*+,(,,+(+*+ )(*++)*,-(,(-,*, )+,+((+))+(+)+)++)++,#++))++*+)+)**)*-*,-+&.,(+,*, +*),(-**',,* )()++(*-.),(-+,*, )+,+((+))+(+)+)++*+*+)+)+)**)*-*,-+&.,(+,*, +-,')+*)),-,*,- ,,*-,,-+,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*,+-,'*++*)*,)*)*, *+)**,+,,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+)(*++()+**+)+*+) ++*,**-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+)(()+()+)+))+*+*-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, -,'*+,++,,+)+)+ ))+)++*,-)-,*, )+,+((+))+(+)+)+)*)*)* )*-*,-+&.,(+*+* -,'*+,**,,+)++)*) **)*)+*,-)-*+* )+,+(()*)+(++)*)*)*+)+)+)**)*-*,-+&.,(+,*, -,'*+,**--*+)+)*)++*,-)-,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, -,'*+,**--*+)+)*)++*,-)-,*, )+,+((+))+(+)+)+)*)*)* )*-*,-+&.,(+*+*-,'*+,**+)++)*)*)+*,-)-*+* )+,+(()*)+(++)*)*)*+)+)+)**)*-*,-+&.,(+,*, -,'*+,**--*+)+)*)++*,-)-,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, -,'*+,**--*+)+)*)++*,-)-,*, )+,+((+))+(+)+)+)*)*)* )*-*,-+&.,(+*+*-,'*+,**+)++)*)*)+*,-)-*+* )+,+(()*)+(++)*)*)*+)+)+)**)*-*,-+&.,(+,*, -,'*+,**--*+)+)*)++*,-)-,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, -,'*+,**--*+)+)*)++*,-)-,*, )+,+((+))+(+)+)+)*)*)* )*-*,-+&.,(+*+*-,'*+,**+)++)*)*)+*,-)-*+* )+,+(()*)+(++)*)*)*+)+)+)**)*-*,-+&.,(+,*, -,'*+,**--*+)+)*)++*,-)-,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,'*+,**--*+)+)*)++*,-)-+,*, )+,+((+))+(+)+)+)+)+)+)**)*-*,-+&.,(+,*, +-,')*,**--*+)+)*)+**,-)-+,*, )+,+((+))+(+*+)+)+)+)+)+)*(*+-**,)'.-)*,*,+-,(,*+*,,*+)+ )**))+,,+-)-+,*, )+,+)+,**,+*,*+)+)+)+)+)+)*(*),)+,*'.-),,*,+.-(,*+*,*+)+ )*)+)+,,+-)-+,*,)+,+)+,*,*+)+)+)+)+)+)*(*),)+,*'.-),,*,+.-(,*+*,*+)+ )**)*+**,-)-+,*,)+,+)+,*,*+)+)+)+)+)+)*(*),)+,*'.-),+*+.-(,*++,*+)+ )*))()+**-)-+ *++,)*,+)+,+,*,*+)+)+)*)*) **(*+-))+)+..-.+),+)),**+)*)++)+,(+,-,--.--,+*)*--,,+)*)*)*+)+)+ )*(*),))++(),,++,+))+)+ *,(),.)),,)( )**)(),**-+,,*+)+)+)+)+)+))**),)+,-,+--*)*)+)+*,((+,++*-, ++,,**+*,*+)+)+)+)+)+ )++)++(+,,))**,**,,))(*+)+ *,((*)+*,+, )(+,*+))+,*+)+)+)+)+)+ )+))*,()*,++,,*+)*,*)+))+)+(*)+*,*,,)),,+)*+)+)+)+)+)+ )*(),-))+,*+**+-,*+,++)+)+)++)*),-*+ **++-*)(.-,*+)+)+)+)+)+)*(*+,))+*+)++)*(*) *++)+*,,+)+)+)++)++)+)*(*)++))+)*(,*+)+)+)+)+)+)*((*),,*,**,,+) +))++*,,+)+)+)+*(++)+,,++)*)+*+)+)+)*)*)**(),*,+)+,,+)*)*))+)(++))+,*+()+,))+)*)*)*+)+)+)+*+)+*,*,++)+**+)+)+)+)+,*,*+*+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+*+)+)+)+)+)+)+)+)+)*)+)+)+)+)+)+)*)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)+)l8mks8mkt8mk@HerculesStudio/INSTALL0000664000175000017500000000242312065055302014116 0ustar yakovyakov Building Hercules Studio from source ------------------------------------ Building Hercules Studio from source is a fairly straightforward process, but it does require some knowledge in software building. If you prefer, you can use the pre-compiled binaries available from http://sourceforge.net/projects/hercstudio/files/ . 1. Prerequisites: you should already have a c++ compiler and the rest of the tool chain. It is recommended to install all the necessary tools using the distribution-supplied packge: On debian/ubuntu do: sudo apt-get install build-essential On RedHat do (as root): yum groupinstall "Development Tools" In addition, you should have the Qt development framework from a release above 4.4.2. Your distribution should have this package ready. On debian/ubuntu do: sudo apt-get install libqt-dev (note: sometimes called libqt4-dev) On RedHat do (as root): yum install libqt-dev (note: sometimes called libqt4-dev) 2. Enter the top hercstudio directory: $ cd hercstudio 3. Run Qt's Makefile generation command: $ qmake 4. Start the build: $ make 5. Install Hercules Studio (as root): $ make install Jacob Dekel September, 2009 http://sourceforge.net/projects/hercstudio HerculesStudio/.cproject0000664000175000017500000001713312065055302014703 0ustar yakovyakov make release false false true make debug false false true HerculesStudio/COPYING0000664000175000017500000010451412065055302014124 0ustar yakovyakov GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . HerculesStudio/INSTALL-BIN0000664000175000017500000000021712065055302014523 0ustar yakovyakovdebian: prerequisits: libqtcore4 libqtgui4 aptitude install libqtcore4 libqtgui4 Fedora: prerequisites: qt-x11 yum install qt-x11 HerculesStudio/id0000664000175000017500000000005612065055302013404 0ustar yakovyakov$Id: id 176 2012-12-18 13:19:23Z dekeljacob $ HerculesStudio/HercStudio/icons/modern/0000775000175000017500000000000012065102175017535 5ustar yakovyakovHerculesStudio/HercStudio/icons/16x16/0000775000175000017500000000000012065102175017036 5ustar yakovyakovHerculesStudio/HercStudio/icons/0000775000175000017500000000000012065102175016251 5ustar yakovyakovHerculesStudio/HercConfiguration/0000775000175000017500000000000012065102175016476 5ustar yakovyakovHerculesStudio/HercStudio/0000775000175000017500000000000012065102175015136 5ustar yakovyakovHerculesStudio/HercUtilities/0000775000175000017500000000000012065102175015642 5ustar yakovyakovHerculesStudio/0000775000175000017500000000000012065102175013065 5ustar yakovyakov