diff --git a/resources/ui/gui_main.ui b/resources/ui/gui_main.ui
index 2aa1e4b..ca60219 100644
--- a/resources/ui/gui_main.ui
+++ b/resources/ui/gui_main.ui
@@ -662,7 +662,7 @@
-
-
+
0
@@ -675,7 +675,65 @@
-
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 32
+ 0
+
+
+
+
+ 32
+ 16777215
+
+
+
+ Qt::LeftToRight
+
+
+ +
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Region:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ 32
+
+
+
+ -
+
0
diff --git a/src/database/mapRegions.csv b/src/database/mapRegions.csv
new file mode 100644
index 0000000..472d1e7
--- /dev/null
+++ b/src/database/mapRegions.csv
@@ -0,0 +1,114 @@
+regionID,regionName,x,y,z,xMin,xMax,yMin,yMax,zMin,zMax,factionID,nebula,radius
+10000001,Derelik,-77361951922776896.0000000000,50878032664301904.0000000000,-64433101266115400.0000000000,-105549987563848000.0000000000,-49173916281705696.0000000000,27128553877044000.0000000000,74627511451559808.0000000000,26423360511028700.0000000000,102442842021202000.0000000000,500007,11799,None
+10000002,The Forge,-96420329664617600.0000000000,64027075837740400.0000000000,112539817132904000.0000000000,-143645654698282000.0000000000,-49195004630953000.0000000000,35154556396755100.0000000000,92899595278725696.0000000000,-144452603161759008.0000000000,-80627031104049792.0000000000,500001,11806,None
+10000003,Vale of the Silent,-44069323337837904.0000000000,94729444152458304.0000000000,181384695885576992.0000000000,-99233760260769408.0000000000,11095113585093600.0000000000,58204170407514304.0000000000,131254717897402000.0000000000,-218879593357516000.0000000000,-143889798413638000.0000000000,None,11814,None
+10000004,UUA-F4,89868004257875904.0000000000,54780096006728496.0000000000,272575750367216992.0000000000,67390827320013696.0000000000,112345181195738000.0000000000,13865039116517100.0000000000,95695152896940000.0000000000,-380774177850620032.0000000000,-164377322883812992.0000000000,None,11817,None
+10000005,Detorid,133540404993619008.0000000000,-31391501876004700.0000000000,-196392258478521984.0000000000,58085917807688304.0000000000,208994892179550016.0000000000,-50720332048902600.0000000000,-12062671703106700.0000000000,164748864800977984.0000000000,228035652156065984.0000000000,None,11849,None
+10000006,Wicked Creek,96232593513274400.0000000000,2541722640313030.0000000000,-162683939101784992.0000000000,55094289188289696.0000000000,137370897838259008.0000000000,-16779717773981400.0000000000,21863163054607500.0000000000,142341340477442000.0000000000,183026537726128992.0000000000,None,11847,None
+10000007,Cache,244727810799539008.0000000000,-16185129443509700.0000000000,-85073283149395296.0000000000,183951658928238016.0000000000,305503962670838976.0000000000,-42131490031126800.0000000000,9761231144107390.0000000000,49918145941828496.0000000000,120228420356962000.0000000000,None,11845,None
+10000008,Scalding Pass,64136817637020496.0000000000,5114679584706430.0000000000,-138210100477706000.0000000000,18636660874023100.0000000000,109636974400018000.0000000000,-21485660357373500.0000000000,31715019526786400.0000000000,103993036168968992.0000000000,172427164786443008.0000000000,None,11846,None
+10000009,Insmother,154196834892712000.0000000000,2835111179265830.0000000000,-145389178945984992.0000000000,108381641944456000.0000000000,200012027840968992.0000000000,-41217100179207504.0000000000,46887322537739200.0000000000,98366331309125408.0000000000,192412026582844992.0000000000,None,11844,None
+10000010,Tribute,-120113706247411008.0000000000,100251692022651008.0000000000,224257843400491008.0000000000,-180136061822224992.0000000000,-60091350672596304.0000000000,81744510925868896.0000000000,118758873119434000.0000000000,-248701329588798016.0000000000,-199814357212184000.0000000000,None,11813,None
+10000011,Great Wildlands,52513837630224096.0000000000,29056627593860200.0000000000,-72759207717599296.0000000000,15787578166538700.0000000000,89240097093909504.0000000000,-4417019452325860.0000000000,62530274640046304.0000000000,37724433284453200.0000000000,107793982150744992.0000000000,500015,11841,None
+10000012,Curse,13928759309586000.0000000000,-1279955725086000.0000000000,-151114759582864992.0000000000,-17164902474422800.0000000000,45022421093594896.0000000000,-30265859627869800.0000000000,27705948177697800.0000000000,135105384527696992.0000000000,167124134638033984.0000000000,500011,11842,None
+10000013,Malpais,175707909414576000.0000000000,68486867977334496.0000000000,91441353104261600.0000000000,146522777958075008.0000000000,204893040871076000.0000000000,43221875094774000.0000000000,93751860859895104.0000000000,-136571342987508000.0000000000,-46311363221014800.0000000000,None,11819,None
+10000014,Catch,-113595452153499008.0000000000,21828796395059000.0000000000,-200997188121672992.0000000000,-176804941309964000.0000000000,-50385962997033904.0000000000,-10643152813927400.0000000000,54300745604045296.0000000000,139121469927840992.0000000000,262872906315505984.0000000000,None,11801,None
+10000015,Venal,-123149072132624000.0000000000,111405178366884992.0000000000,308325578657564032.0000000000,-174025244531812992.0000000000,-72272899733434096.0000000000,92454439987537200.0000000000,130355916746234000.0000000000,-361822060302760000.0000000000,-254829097012368000.0000000000,500010,11812,None
+10000016,Lonetrek,-189171222177239008.0000000000,94552463350949600.0000000000,155696128982270016.0000000000,-233466109933311008.0000000000,-144876334421167008.0000000000,69990843340574896.0000000000,119114083361324000.0000000000,-193878176320107008.0000000000,-117514081644434000.0000000000,500001,11807,None
+10000017,J7HZ-F,9262044950387990.0000000000,81443031428475504.0000000000,231053798464132000.0000000000,-30990419959122300.0000000000,49514509859898304.0000000000,59874912584642304.0000000000,103011150272308992.0000000000,-278250620384737984.0000000000,-183856976543526016.0000000000,500005,11835,None
+10000018,The Spire,232956156642256000.0000000000,31778178062885000.0000000000,23367365618509800.0000000000,202456187021459008.0000000000,263456126263052000.0000000000,-2645094100301930.0000000000,66201450226071904.0000000000,-70018197282657504.0000000000,23283466045637800.0000000000,None,11843,None
+10000019,A821-A,13680672219108900.0000000000,70681466135509904.0000000000,284135649247806016.0000000000,-6980977234977400.0000000000,34342321673195100.0000000000,56667187302576896.0000000000,84695744968442800.0000000000,-333999270054646976.0000000000,-234272028440964992.0000000000,500005,11836,None
+10000020,Tash-Murkon,-211753371863879008.0000000000,62838705971068000.0000000000,-123934814537664000.0000000000,-239002211770168992.0000000000,-184504531957590016.0000000000,33647274359967700.0000000000,92030137582168304.0000000000,88544490553691392.0000000000,159325138521638016.0000000000,500003,11792,None
+10000021,Outer Passage,291498150006238976.0000000000,4086283626834610.0000000000,80307683457889904.0000000000,253707828044976000.0000000000,329288471967502976.0000000000,-57431940876101000.0000000000,65604508129770200.0000000000,-147627280712887008.0000000000,-12988086202892600.0000000000,None,11822,None
+10000022,Stain,-158827678964844000.0000000000,58691190475642496.0000000000,-309223961465603008.0000000000,-220896070661676992.0000000000,-96759287268010400.0000000000,16401533988548500.0000000000,100980846962736000.0000000000,254043792338772000.0000000000,364404130592435008.0000000000,500019,11802,None
+10000023,Pure Blind,-260921882715692000.0000000000,78979266191427392.0000000000,220225532514732000.0000000000,-319394067132734976.0000000000,-202449698298648992.0000000000,36527305406486200.0000000000,121431226976368992.0000000000,-238553930773527008.0000000000,-201897134255936992.0000000000,None,11809,None
+10000025,Immensea,21892914159865900.0000000000,-3017828945779400.0000000000,-205784180881657984.0000000000,-22895386897376800.0000000000,66681215217108600.0000000000,-23530339396911300.0000000000,17494681505352500.0000000000,165767307374257984.0000000000,245801054389059008.0000000000,None,11848,None
+10000027,Etherium Reach,128382041362752000.0000000000,56377147096749904.0000000000,37868198303199904.0000000000,67955570592463600.0000000000,188808512133040000.0000000000,29084806420449200.0000000000,83669487773050592.0000000000,-79958405732611296.0000000000,4222009126211450.0000000000,None,11840,None
+10000028,Molden Heath,-35722113622288200.0000000000,4350325397619760.0000000000,-5376103573250500.0000000000,-57124632275023104.0000000000,-14319594969553300.0000000000,-11025569331781400.0000000000,19726220127020900.0000000000,-7297437656327950.0000000000,18049644802829000.0000000000,500002,11839,None
+10000029,Geminate,-15833926531865600.0000000000,59778184289369000.0000000000,115546529090020992.0000000000,-45137480054461200.0000000000,13469626990730100.0000000000,23541985779531900.0000000000,96014382799206000.0000000000,-137261979990136992.0000000000,-93831078189904400.0000000000,None,11815,None
+10000030,Heimatar,-92929285491600704.0000000000,32124391627089500.0000000000,24148721399369200.0000000000,-128269338426336992.0000000000,-57589232556864000.0000000000,5117709236688720.0000000000,59131074017490304.0000000000,-51576774226127800.0000000000,3279331427389420.0000000000,500002,11838,None
+10000031,Impass,-38606167129705296.0000000000,-1840037937294340.0000000000,-334948558437468992.0000000000,-46272153163454400.0000000000,-30940181095956200.0000000000,-30528048481020700.0000000000,26847972606432100.0000000000,305300973053793024.0000000000,364596143821145024.0000000000,None,11851,None
+10000032,Sinq Laison,-181912883076480000.0000000000,41699538786904704.0000000000,39780738677074200.0000000000,-218619639817449984.0000000000,-145206126335510016.0000000000,14838041011608700.0000000000,68561036562200704.0000000000,-85257599295005904.0000000000,5696121940857440.0000000000,500004,11824,None
+10000033,The Citadel,-154620630524368992.0000000000,78594974110412192.0000000000,104821797629467008.0000000000,-187991094902497984.0000000000,-121250166146240992.0000000000,47332294584113104.0000000000,109857653636711008.0000000000,-148876595282702016.0000000000,-60766999976232400.0000000000,500001,11805,None
+10000034,The Kalevala Expanse,133941223410126000.0000000000,54809888059021104.0000000000,94979579378192800.0000000000,110709276315876992.0000000000,157173170504376000.0000000000,28290179526872200.0000000000,81329596591170000.0000000000,-130038972058830000.0000000000,-59920186697555400.0000000000,None,11818,None
+10000035,Deklein,-276352540202200992.0000000000,89769327588659104.0000000000,310283495605705984.0000000000,-357288458792001984.0000000000,-195416621612400000.0000000000,51805965511940200.0000000000,127732689665378000.0000000000,-352811725566156032.0000000000,-267755265645256000.0000000000,None,11810,None
+10000036,Devoid,-141697960063520992.0000000000,58441572274484496.0000000000,-63334110155348200.0000000000,-169282385386756000.0000000000,-114113534740286000.0000000000,22056522365527300.0000000000,94826622183441600.0000000000,30322971680447200.0000000000,96345248630249200.0000000000,500003,11791,None
+10000037,Everyshore,-194822013294280992.0000000000,8827663029283090.0000000000,20255953804920800.0000000000,-215583579631561984.0000000000,-174060446956999008.0000000000,-12533014553205200.0000000000,30188340611771400.0000000000,-31215239124872700.0000000000,-9296668484968890.0000000000,500004,11825,None
+10000038,The Bleak Lands,-159172230516598016.0000000000,31388510588133000.0000000000,-50936750365377600.0000000000,-174834407400640000.0000000000,-143510053632556992.0000000000,1703819912406750.0000000000,61073201263859200.0000000000,32861581505385500.0000000000,69011919225369600.0000000000,500003,11790,None
+10000039,Esoteria,-86787864713685600.0000000000,-16977131982195800.0000000000,-417232597484758016.0000000000,-121897659027506000.0000000000,-51678070399865104.0000000000,-60129751947834496.0000000000,26175487983442900.0000000000,362533200787438976.0000000000,471931994182076032.0000000000,None,11804,None
+10000040,Oasa,233391636757060992.0000000000,63335681505452400.0000000000,122542259755244992.0000000000,194254750307968992.0000000000,272528523206152992.0000000000,35499276163976200.0000000000,91172086846928608.0000000000,-174387649267655008.0000000000,-70696870242835104.0000000000,None,11821,None
+10000041,Syndicate,-321246237025974976.0000000000,19458130625209900.0000000000,74164013458830592.0000000000,-362419022806808000.0000000000,-280073451245142016.0000000000,-7412017246704660.0000000000,46328278497124400.0000000000,-111626842054836992.0000000000,-36701184862824200.0000000000,500009,11829,None
+10000042,Metropolis,-74267055557312000.0000000000,35798638720555200.0000000000,45153300095399000.0000000000,-137997971841352992.0000000000,-10536139273270900.0000000000,-6953093208971080.0000000000,78550370650081600.0000000000,-79085709291584992.0000000000,-11220890899213000.0000000000,500002,11837,None
+10000043,Domain,-200437833726152992.0000000000,53561700932206800.0000000000,-81355239085633408.0000000000,-254049920576990016.0000000000,-146825746875316992.0000000000,12999421783769300.0000000000,94123980080644304.0000000000,18203772891834400.0000000000,144506705279432000.0000000000,500003,11789,None
+10000044,Solitude,-321931746318950976.0000000000,28256329216600400.0000000000,19276106332841400.0000000000,-339484138934816000.0000000000,-304379353703084992.0000000000,4650554638853240.0000000000,51862103794347600.0000000000,-44118642051444896.0000000000,5566429385762110.0000000000,500004,11832,None
+10000045,Tenal,-72287885133620192.0000000000,58340276587659400.0000000000,433602446107849024.0000000000,-116748577875112992.0000000000,-27827192392127100.0000000000,15107945762421200.0000000000,101572607412898000.0000000000,-458300452818907008.0000000000,-408904439396790976.0000000000,None,11816,None
+10000046,Fade,-293951880420984000.0000000000,58738864363854704.0000000000,257748117411352000.0000000000,-321962586144748032.0000000000,-265941174697220000.0000000000,34663165880920400.0000000000,82814562846788896.0000000000,-262210335614023008.0000000000,-253285899208680992.0000000000,None,11834,None
+10000047,Providence,-121750759712200992.0000000000,58495651402332800.0000000000,-151515874111716000.0000000000,-147682648205223008.0000000000,-95818871219178704.0000000000,31109112724575900.0000000000,85882190080089696.0000000000,104761552559676000.0000000000,198270195663755008.0000000000,None,11800,None
+10000048,Placid,-270798690016688992.0000000000,73701796812053600.0000000000,95464459677699200.0000000000,-295050806700006976.0000000000,-246546573333371008.0000000000,33687292631730900.0000000000,113716300992376000.0000000000,-135456400892811008.0000000000,-55472518462587104.0000000000,500004,11828,None
+10000049,Khanid,-318287416184579008.0000000000,20419414094204800.0000000000,-133487524109219008.0000000000,-364404836850033984.0000000000,-272169995519124000.0000000000,-23375955554404600.0000000000,64214783742814200.0000000000,94313193241472400.0000000000,172661854976964992.0000000000,500008,11795,None
+10000050,Querious,-363413099563971968.0000000000,53220650446317800.0000000000,-240706130531268992.0000000000,-421044001198137984.0000000000,-305782197929806976.0000000000,17099563981870700.0000000000,89341736910764800.0000000000,178498284629577984.0000000000,302913976432960000.0000000000,None,11796,None
+10000051,Cloud Ring,-320933851367644032.0000000000,74422197368443696.0000000000,146459468769175008.0000000000,-334343216505568000.0000000000,-307524486229721024.0000000000,54504251791135296.0000000000,94340142945752096.0000000000,-176405700933116992.0000000000,-116513236605232992.0000000000,None,11830,None
+10000052,Kador,-237297480079980992.0000000000,40680338829849696.0000000000,-76830967297819296.0000000000,-265099009094967008.0000000000,-209495951064995008.0000000000,14239360364081900.0000000000,67121317295617504.0000000000,21947268249072400.0000000000,131714666346566000.0000000000,500003,11788,None
+10000053,Cobalt Edge,292184365554961984.0000000000,53493388123815000.0000000000,204625108850392000.0000000000,273407634801880992.0000000000,310961096308044032.0000000000,33347140400224400.0000000000,73639635847405696.0000000000,-264957831553220000.0000000000,-144292386147564000.0000000000,None,11823,None
+10000054,Aridia,-368177411221382016.0000000000,18612570807884000.0000000000,-77770315686733296.0000000000,-413892030804225984.0000000000,-322462791638537984.0000000000,-5883182983731610.0000000000,43108324599499600.0000000000,38510404670607400.0000000000,117030226702859008.0000000000,500003,11794,None
+10000055,Branch,-145831957034713984.0000000000,66915247329955600.0000000000,412717925093977024.0000000000,-192334882877540992.0000000000,-99329031191886704.0000000000,45899826698416200.0000000000,87930667961494896.0000000000,-468006802398913024.0000000000,-357429047789041024.0000000000,None,11811,None
+10000056,Feythabolis,30647318047262800.0000000000,-16097388834061700.0000000000,-403080457499606016.0000000000,-13427359251370500.0000000000,74721995345896192.0000000000,-47538841307943904.0000000000,15344063639820500.0000000000,338718234219339008.0000000000,467442680779873984.0000000000,None,11852,None
+10000057,Outer Ring,-392563738530011008.0000000000,21671932707227800.0000000000,86377281026647104.0000000000,-440630233235486976.0000000000,-344497243824534016.0000000000,8454685496211170.0000000000,34889179918244500.0000000000,-114159691483192000.0000000000,-58594870570102496.0000000000,500014,11831,None
+10000058,Fountain,-449013589606488000.0000000000,37227379065383104.0000000000,-6024369036247570.0000000000,-503218614776420992.0000000000,-394808564436556032.0000000000,12825904470868000.0000000000,61628853659898096.0000000000,-52236755323923000.0000000000,64285493396418200.0000000000,None,11833,None
+10000059,Paragon Soul,-113652861165762000.0000000000,-26361011640727300.0000000000,-471184672814803968.0000000000,-147103312663208000.0000000000,-80202409668315808.0000000000,-47884791640159696.0000000000,-4837231641294960.0000000000,462265945308572032.0000000000,480103400321036992.0000000000,None,11803,None
+10000060,Delve,-429369275408752000.0000000000,51426121003625904.0000000000,-256560110972768992.0000000000,-465524711410822976.0000000000,-393213839406681024.0000000000,20784301985101400.0000000000,82067940022150496.0000000000,187448411080600992.0000000000,325671810864937984.0000000000,None,11797,None
+10000061,Tenerifis,47395435143070304.0000000000,-12025278304512600.0000000000,-285986932642694016.0000000000,-31142252027931900.0000000000,125933122314072992.0000000000,-41257255525995000.0000000000,17206698916969700.0000000000,242460862907172992.0000000000,329513002378214976.0000000000,None,11850,None
+10000062,Omist,100319291593819008.0000000000,-27486110166441700.0000000000,-389560313235004032.0000000000,52468324379805600.0000000000,148170258807832000.0000000000,-46426415059427600.0000000000,-8545805273455740.0000000000,368934289108777024.0000000000,410186337361230976.0000000000,None,11853,None
+10000063,Period Basis,-414504229299553024.0000000000,83788485653959904.0000000000,-386878506419457024.0000000000,-440202713206803968.0000000000,-388805745392302016.0000000000,66106045165950096.0000000000,101470926141970000.0000000000,355667366886337024.0000000000,418089645952577024.0000000000,None,11798,None
+10000064,Essence,-218476380293208992.0000000000,36079691343274896.0000000000,53743933634810000.0000000000,-237409458368697984.0000000000,-199543302217719008.0000000000,7633597424402840.0000000000,64525785262147000.0000000000,-79609990006493200.0000000000,-27877877263126800.0000000000,500004,11826,None
+10000065,Kor-Azor,-296212317520308992.0000000000,41618648470271696.0000000000,-104651247949499008.0000000000,-358902782416633024.0000000000,-233521852623984000.0000000000,-1015080651431890.0000000000,84252377591975392.0000000000,72820222035818304.0000000000,136482273863180000.0000000000,500003,11793,None
+10000066,Perrigen Falls,211874376981372000.0000000000,25904748164016500.0000000000,107107866838870000.0000000000,176484345431305984.0000000000,247264408531438016.0000000000,-5434191277816090.0000000000,57243687605849000.0000000000,-165684697545403008.0000000000,-48531036132337296.0000000000,None,11820,None
+10000067,Genesis,-260029907705174016.0000000000,14889648452313800.0000000000,-15431994130441300.0000000000,-299197792151819008.0000000000,-220862023258528992.0000000000,-19762699275081500.0000000000,49541996179709104.0000000000,-23280212488173200.0000000000,54144200749055800.0000000000,500003,11787,None
+10000068,Verge Vendor,-242498312843249984.0000000000,41170103611453904.0000000000,51557451055966600.0000000000,-258065601351460992.0000000000,-226931024335039008.0000000000,31582533609315800.0000000000,50757673613592000.0000000000,-65212930160258000.0000000000,-37901971951675200.0000000000,500004,11827,None
+10000069,Black Rise,-222687068034734016.0000000000,77559410642208400.0000000000,136029596082308000.0000000000,-303606258828316032.0000000000,-141767877241152000.0000000000,-3359780151373490.0000000000,158478601435790016.0000000000,-216948786875889984.0000000000,-55110405288726600.0000000000,500001,11808,None
+10000070,Pochven,-122411864335628000.0000000000,47387680180212200.0000000000,31918737703135300.0000000000,-238290946220046016.0000000000,-6532782451210520.0000000000,-4522598544370160.0000000000,99297958904794496.0000000000,-100531188490154000.0000000000,164368663896424992.0000000000,500026,11794,None
+10001000,Yasna Zakh,6732782451210000.0000000000,4722598544370000.0000000000,-2508346782640000.0000000000,6632782451210000.0000000000,6832782451210000.0000000000,4622598544370000.0000000000,4822598544370000.0000000000,-2608346782640000.0000000000,-2408346782640000.0000000000,None,26196,None
+11000001,A-R00001,7637617076349299712.0000000000,1539385485286040064.0000000000,-9497611206336489472.0000000000,7623729705807830016.0000000000,7665157295345890304.0000000000,1518671690517009920.0000000000,1560099280055069952.0000000000,9477933517891790848.0000000000,9519361107429849088.0000000000,None,11781,None
+11000002,A-R00002,7600934527203749888.0000000000,1539372289941680128.0000000000,-9430502663833180160.0000000000,7547910222240369664.0000000000,7660664491887200256.0000000000,1482995155118269952.0000000000,1595749424765090048.0000000000,9373692811784239104.0000000000,9486447081431070720.0000000000,None,11781,None
+11000003,A-R00003,7661386280000360448.0000000000,1539367788970249984.0000000000,-9338593801813639168.0000000000,7609931630741890048.0000000000,7712858379144850432.0000000000,1487904414768770048.0000000000,1590831163171729920.0000000000,9285124270197149696.0000000000,9388051018600110080.0000000000,None,11781,None
+11000004,B-R00004,7760336818417940480.0000000000,1539349495218259968.0000000000,-9340059589515669504.0000000000,7737126961114479616.0000000000,7793280410365299712.0000000000,1511272770592849920.0000000000,1567426219843680000.0000000000,9310082659344670720.0000000000,9366236108595499008.0000000000,None,11782,None
+11000005,B-R00005,7874079523648960512.0000000000,1539375483746469888.0000000000,-9503071288589080576.0000000000,7838285280590149632.0000000000,7927692292804259840.0000000000,1494671977639409920.0000000000,1584078989853519872.0000000000,9457118105404020736.0000000000,9546525117618139136.0000000000,None,11782,None
+11000006,B-R00006,7831044544147189760.0000000000,1539382673759310080.0000000000,-9659853503736190976.0000000000,7799948827056690176.0000000000,7865467018861049856.0000000000,1506623577857129984.0000000000,1572141769661489920.0000000000,9627248564723838976.0000000000,9692766756528199680.0000000000,None,11782,None
+11000007,B-R00007,7634045819571999744.0000000000,1539365918889139968.0000000000,-9732388555647289344.0000000000,7582131918499590144.0000000000,7679566586097470464.0000000000,1490648585090200064.0000000000,1588083252688090112.0000000000,9674034319686610944.0000000000,9771468987284500480.0000000000,None,11782,None
+11000008,B-R00008,7505098631820529664.0000000000,1539344551718560000.0000000000,-9637129770691969024.0000000000,7462530995555059712.0000000000,7542543312478669824.0000000000,1499338393256750080.0000000000,1579350710180359936.0000000000,9596116217610829824.0000000000,9676128534534440960.0000000000,None,11782,None
+11000009,C-R00009,7756998458470830080.0000000000,1539362847859320064.0000000000,-9838335106976929792.0000000000,7733892610273920000.0000000000,7792430659156670464.0000000000,1510093823417939968.0000000000,1568631872300689920.0000000000,9808324988800120832.0000000000,9866863037682870272.0000000000,None,11783,None
+11000010,C-R00010,7458020897442199552.0000000000,1539386844078560000.0000000000,-9700538756680148992.0000000000,7425735456035609600.0000000000,7490617757005800448.0000000000,1506945693593459968.0000000000,1571827994563660032.0000000000,9664719860254670848.0000000000,9729602161224869888.0000000000,None,11783,None
+11000011,C-R00011,7404801088082939904.0000000000,1539415503269789952.0000000000,-9453566499046539264.0000000000,7361246485281089536.0000000000,7444160286740459520.0000000000,1497958602540100096.0000000000,1580872403999470080.0000000000,9412409856560680960.0000000000,9495323658020059136.0000000000,None,11783,None
+11000012,C-R00012,7467327450977550336.0000000000,1539410948820979968.0000000000,-9324079843325939712.0000000000,7425135948559049728.0000000000,7507803666449810432.0000000000,1498077089875599872.0000000000,1580744807766360064.0000000000,9281225475247849472.0000000000,9363893193138599936.0000000000,None,11783,None
+11000013,C-R00013,7704331832534580224.0000000000,1539435195291849984.0000000000,-9219177949355570176.0000000000,7630566808753089536.0000000000,7745794371494110208.0000000000,1481821413921339904.0000000000,1597048976662360064.0000000000,9169527536370570240.0000000000,9284755099111600128.0000000000,None,11783,None
+11000014,C-R00014,7913231764061009920.0000000000,1539411905418899968.0000000000,-9304069748077330432.0000000000,7891835899058190336.0000000000,7933259475845659648.0000000000,1518700117025159936.0000000000,1560123693812640000.0000000000,9288696078764910592.0000000000,9330119655552389120.0000000000,None,11783,None
+11000015,C-R00015,7974274717456719872.0000000000,1539405967433920000.0000000000,-9450756025749610496.0000000000,7937343760644570112.0000000000,8019086603567089664.0000000000,1498534545972649984.0000000000,1580277388895180032.0000000000,9410153489013360640.0000000000,9491896331935889408.0000000000,None,11783,None
+11000016,D-R00016,7950412099255820288.0000000000,1539417188591280128.0000000000,-9645473572355399680.0000000000,7901779329738460160.0000000000,7981201563743850496.0000000000,1499706071588590080.0000000000,1579128305593979904.0000000000,9597323281864929280.0000000000,9676745515870330880.0000000000,None,11784,None
+11000017,D-R00017,7751984075340600320.0000000000,1539422970296859904.0000000000,-9780708820372819968.0000000000,7742532050694139904.0000000000,7786567027004290048.0000000000,1517405482141789952.0000000000,1561440458451930112.0000000000,9747991647592890368.0000000000,9792026623903039488.0000000000,None,11784,None
+11000018,D-R00018,7568425212096589824.0000000000,1539422759484110080.0000000000,-9705161757846870016.0000000000,7524869683523309568.0000000000,7597828274914010112.0000000000,1502943463788760064.0000000000,1575902055179460096.0000000000,9677409703411189760.0000000000,9750368294801889280.0000000000,None,11784,None
+11000019,D-R00019,7446369144431120384.0000000000,1539413446685319936.0000000000,-9564135782886729728.0000000000,7405238029993790464.0000000000,7489348788137199616.0000000000,1497358067613609984.0000000000,1581468825757019904.0000000000,9519696541969010688.0000000000,9603807300112420864.0000000000,None,11784,None
+11000020,D-R00020,7386876286054590464.0000000000,1539436657469120000.0000000000,-9258460824800780288.0000000000,7336518038999409664.0000000000,7450651620673989632.0000000000,1482369866631830016.0000000000,1596503448306400000.0000000000,9198709827110030336.0000000000,9312843408784609280.0000000000,None,11784,None
+11000021,D-R00021,7575667614415110144.0000000000,1539420791428610048.0000000000,-9121182970002969600.0000000000,7531403030956669952.0000000000,7635739674965990400.0000000000,1487252469423940096.0000000000,1591589113433270016.0000000000,9074551305786470400.0000000000,9178887949795800064.0000000000,None,11784,None
+11000022,D-R00022,7979890027924389888.0000000000,1539423414900480000.0000000000,-9211421806146249728.0000000000,7929642865003240448.0000000000,8025792183143870464.0000000000,1491348755830159872.0000000000,1587498073970789888.0000000000,9166167670022070272.0000000000,9262316988162699264.0000000000,None,11784,None
+11000023,D-R00023,8084323841980080128.0000000000,1539401095322680064.0000000000,-9713010202943850496.0000000000,8036967474469860352.0000000000,8143374379736609792.0000000000,1486197642689309952.0000000000,1592604547956059904.0000000000,9653418783323650048.0000000000,9759825688590409728.0000000000,None,11784,None
+11000024,E-R00024,7171962412864889856.0000000000,1539364134790099968.0000000000,-9350811708841140224.0000000000,7115607080392070144.0000000000,7229234837983569920.0000000000,1482550255994350080.0000000000,1596178013585850112.0000000000,9293875144491169792.0000000000,9407502902082670592.0000000000,None,11785,None
+11000025,E-R00025,7334821710428279808.0000000000,1539376350729870080.0000000000,-9110378661974970368.0000000000,7304784715862420480.0000000000,7352397124512100352.0000000000,1515570146405029888.0000000000,1563182555054720000.0000000000,9081841178120850432.0000000000,9129453586770539520.0000000000,None,11785,None
+11000026,E-R00026,7709709849205610496.0000000000,1539351806049769984.0000000000,-8983960038446709760.0000000000,7648543757451039744.0000000000,7767940440005990400.0000000000,1479653464772300032.0000000000,1599050147327239936.0000000000,8922012299595209728.0000000000,9041408982150160384.0000000000,None,11785,None
+11000027,E-R00027,8177591655159520256.0000000000,1539361932565989888.0000000000,-9311264611897260032.0000000000,8130973150192579584.0000000000,8233286243617240064.0000000000,1488205385853659904.0000000000,1590518479278320128.0000000000,9261823633916950528.0000000000,9364136727341611008.0000000000,None,11785,None
+11000028,E-R00028,8050512763275060224.0000000000,1539387000103539968.0000000000,-9892764759783260160.0000000000,8004289386676129792.0000000000,8096104457479029760.0000000000,1493479464702089984.0000000000,1585294535504989952.0000000000,9849345444957310976.0000000000,9941160515760209920.0000000000,None,11785,None
+11000029,E-R00029,7593303031066829824.0000000000,1539366959543490048.0000000000,-10013072297253699584.0000000000,7563671925360780288.0000000000,7612134282308790272.0000000000,1515135781069489920.0000000000,1563598138017499904.0000000000,9983430548021499904.0000000000,10031892904969500672.0000000000,None,11785,None
+11000030,F-R00030,7305532907080500224.0000000000,1539388528743369984.0000000000,-9838448405941430272.0000000000,7241869510086280192.0000000000,7360325025330140160.0000000000,1480160771121440000.0000000000,1598616286365299968.0000000000,9777642277831849984.0000000000,9896097793075709952.0000000000,None,11786,None
+11000031,G-R00031,7205500000000000000.0000000000,1539300000000000000.0000000000,-9538400000000000000.0000000000,7141800000000000000.0000000000,7260300000000000000.0000000000,1480100000000000000.0000000000,1598600000000000000.0000000000,9477600000000000000.0000000000,9596000000000000000.0000000000,None,20955,None
+11000032,H-R00032,7536356782802140160.0000000000,1539240548011399936.0000000000,-9744159706750429184.0000000000,7386356782802140160.0000000000,7686356782802140160.0000000000,1389240548011399936.0000000000,1689240548011399936.0000000000,-9894159706750429184.0000000000,-9594159706750429184.0000000000,None,20955,None
+11000033,K-R00033,6740235039820449792.0000000000,1539280797403170048.0000000000,-9713256053927880704.0000000000,6590235039820449792.0000000000,6890235039820449792.0000000000,1389280797403170048.0000000000,1689280797403170048.0000000000,-9863256053927880704.0000000000,-9563256053927880704.0000000000,None,20955,None
+12000001,ADR01,5332454814931099648.0000000000,6032700368271840256.0000000000,-8324663071957520384.0000000000,5182454814931099648.0000000000,5482454814931099648.0000000000,5882700368271840256.0000000000,6182700368271840256.0000000000,-8474663071957520384.0000000000,-8174663071957520384.0000000000,None,22041,None
+12000002,ADR02,5034040109070720000.0000000000,4624302468910480384.0000000000,-9032456813257299968.0000000000,4884040109070720000.0000000000,5184040109070720000.0000000000,4474302468910479872.0000000000,4774302468910480384.0000000000,-9182456813257299968.0000000000,-8882456813257299968.0000000000,None,22042,None
+12000003,ADR03,6174725715457210368.0000000000,4914357726000979968.0000000000,-8717885681374310400.0000000000,6024725715457210368.0000000000,6324725715457210368.0000000000,4764357726000979968.0000000000,5064357726000979968.0000000000,-8867885681374310400.0000000000,-8567885681374310400.0000000000,None,22043,None
+12000004,ADR04,2242403240434639872.0000000000,4815854669694629888.0000000000,-7553306654028019712.0000000000,2092403240434639872.0000000000,2392403240434639872.0000000000,4665854669694629888.0000000000,4965854669694629888.0000000000,-7703306654028019712.0000000000,-7403306654028019712.0000000000,None,22044,None
+12000005,ADR05,3566457038685740032.0000000000,5327335743611320320.0000000000,-5457243999556049920.0000000000,3416457038685740032.0000000000,3716457038685740032.0000000000,5177335743611320320.0000000000,5477335743611320320.0000000000,-5607243999556049920.0000000000,-5307243999556049920.0000000000,None,22045,None
+13000001,No Name,10021062147228399616.0000000000,-940800961435038976.0000000000,5187111540381899776.0000000000,9871062147228430336.0000000000,10171062147228399616.0000000000,-1090800961435040000.0000000000,-790800961435038976.0000000000,5037111540381899776.0000000000,5337111540381899776.0000000000,None,11810,None
+14000001,VR-01,-3900972456350439936.0000000000,2574944990858209792.0000000000,-8266927768219929600.0000000000,-4050972456350439936.0000000000,-3750972456350439936.0000000000,2424944990858209792.0000000000,2724944990858209792.0000000000,-8416927768219929600.0000000000,-8116927768219929600.0000000000,None,11821,None
+14000002,VR-02,-3731106719789579776.0000000000,3112925601017509888.0000000000,-8155501714385859584.0000000000,-3881106719789579776.0000000000,-3581106719789579776.0000000000,2962925601017509888.0000000000,3262925601017509888.0000000000,-8305501714385859584.0000000000,-8005501714385859584.0000000000,None,11821,None
+14000003,VR-03,-5431841546101449728.0000000000,2985429153089509888.0000000000,-6018316379407049728.0000000000,-5581841546101449728.0000000000,-5281841546101449728.0000000000,2835429153089509888.0000000000,3135429153089509888.0000000000,-6168316379407049728.0000000000,-5868316379407049728.0000000000,None,11821,None
+14000004,VR-04,-4545298976287320064.0000000000,2308091069617820160.0000000000,-6316706917218969600.0000000000,-4695298976287320064.0000000000,-4395298976287320064.0000000000,2158091069617819904.0000000000,2458091069617820160.0000000000,-6466706917218969600.0000000000,-6166706917218969600.0000000000,None,11821,None
+14000005,VR-05,-3876324035229649920.0000000000,2174764391831830016.0000000000,-5975813282299729920.0000000000,-4026324035229649920.0000000000,-3726324035229649920.0000000000,2024764391831830016.0000000000,2324764391831830016.0000000000,-6125813282299729920.0000000000,-5825813282299729920.0000000000,None,11821,None
diff --git a/src/shortcircuit/app.py b/src/shortcircuit/app.py
index 8c5d20d..bc86b84 100644
--- a/src/shortcircuit/app.py
+++ b/src/shortcircuit/app.py
@@ -237,7 +237,7 @@ def additional_gui_setup(self):
for line_edit_field in [
self.lineEdit_source,
self.lineEdit_destination,
- self.lineEdit_avoid_name,
+ self.lineEdit_system_avoid_name,
self.lineEdit_set_dest,
]:
completer = QtWidgets.QCompleter(system_list, self)
@@ -247,6 +247,14 @@ def additional_gui_setup(self):
)
line_edit_field.setCompleter(completer)
+ region_list = self.nav.eve_db.region_name_list()
+ region_list.sort(key=str.lower)
+ completer = QtWidgets.QCompleter(region_list, self)
+ completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
+ completer.setModelSorting(QtWidgets.QCompleter.CaseInsensitivelySortedModel)
+ completer.setFilterMode(QtCore.Qt.MatchContains)
+ self.lineEdit_region_avoid_name.setCompleter(completer)
+
# Signals
self.pushButton_eve_login.clicked.connect(self.btn_eve_login_clicked)
self.pushButton_player_location.clicked.connect(
@@ -255,7 +263,12 @@ def additional_gui_setup(self):
self.pushButton_find_path.clicked.connect(self.btn_find_path_clicked)
self.pushButton_trip_config.clicked.connect(self.btn_trip_config_clicked)
self.pushButton_trip_get.clicked.connect(self.btn_trip_get_clicked)
- self.pushButton_avoid_add.clicked.connect(self.btn_avoid_add_clicked)
+ self.pushButton_system_avoid_add.clicked.connect(
+ self.btn_system_avoid_add_clicked
+ )
+ self.pushButton_region_avoid_add.clicked.connect(
+ self.btn_region_avoid_add_clicked
+ )
self.pushButton_avoid_delete.clicked.connect(self.btn_avoid_delete_clicked)
self.pushButton_avoid_clear.clicked.connect(self.btn_avoid_clear_clicked)
self.pushButton_set_dest.clicked.connect(self.btn_set_dest_clicked)
@@ -264,8 +277,11 @@ def additional_gui_setup(self):
self.lineEdit_destination.returnPressed.connect(
self.line_edit_destination_return
)
- self.lineEdit_avoid_name.returnPressed.connect(
- self.line_edit_avoid_name_return
+ self.lineEdit_system_avoid_name.returnPressed.connect(
+ self.line_edit_system_avoid_name_return
+ )
+ self.lineEdit_region_avoid_name.returnPressed.connect(
+ self.line_edit_region_avoid_name_return
)
self.lineEdit_set_dest.returnPressed.connect(self.btn_set_dest_clicked)
self.tableWidget_path.itemSelectionChanged.connect(
@@ -327,9 +343,9 @@ def read_settings(self):
self.groupBox_avoidance.setChecked(
self.settings.value("avoidance_enabled", "false") == "true"
)
- for sys_name in self.settings.value("avoidance_list", "").split(','):
- if sys_name != "":
- self._avoid_system_name(sys_name)
+ for entity in self.settings.value("avoidance_list", "").split(','):
+ if entity != "":
+ self._avoid_entity_name(entity)
# Restrictions
self.comboBox_size.setCurrentIndex(
@@ -455,33 +471,38 @@ def avoidance_enabled(self) -> bool:
return self.groupBox_avoidance.isChecked()
def avoidance_list(self) -> List[str]:
- items: List[QtWidgets.QListWidgetItem] = []
- for index in range(self.listWidget_avoid.count()):
- items.append(self.listWidget_avoid.item(index))
- return [i.text() for i in items]
-
- def _avoid_system_name(self, sys_name):
- if not sys_name:
- self._avoid_message(
- "Avoidance list: invalid system name :(", MessageType.ERROR
- )
+ items: List[str] = []
+ for idx in range(self.listWidget_avoid.count()):
+ item: QtWidgets.QListWidgetItem = self.listWidget_avoid.item(idx)
+ items.append(item.text())
+ return items
+
+ def _avoid_entity_name(self, name):
+ if not name:
+ self._avoid_message("Avoidance list: invalid name :(", MessageType.ERROR)
return
- if sys_name in self.avoidance_list():
+ if name in self.avoidance_list():
self._avoid_message(
- "Avoidance list: {} is already in the list!".format(sys_name),
+ "Avoidance list: {} is already in the list!".format(name),
MessageType.ERROR
)
return
- QtWidgets.QListWidgetItem(sys_name, self.listWidget_avoid)
- self._avoid_message(
- "Avoidance list: {} added".format(sys_name), MessageType.OK
- )
+ QtWidgets.QListWidgetItem(name, self.listWidget_avoid)
+ self._avoid_message("Avoidance list: {} added".format(name), MessageType.OK)
def avoid_system(self):
- sys_name = self.nav.eve_db.normalize_name(self.lineEdit_avoid_name.text())
- self._avoid_system_name(sys_name)
+ sys_name = self.nav.eve_db.normalize_name(
+ self.lineEdit_system_avoid_name.text()
+ )
+ self._avoid_entity_name(sys_name)
+
+ def avoid_region(self):
+ region_name = self.nav.eve_db.normalize_region_name(
+ self.lineEdit_region_avoid_name.text()
+ )
+ self._avoid_entity_name(region_name)
@staticmethod
def get_system_class_color(sclass):
@@ -567,12 +588,25 @@ def get_restrictions_security(self) -> Dict[SpaceType, int]:
return security_prio
def get_restrictions_avoidance(self) -> List[int]:
- avoidance_list: List[str] = []
+ if not self.avoidance_enabled():
+ return []
+
+ res = []
+ for entity in self.avoidance_list():
+ idx = self.eve_db.name2id(entity)
+
+ if idx:
+ res.append(idx)
+ continue
+
+ idx = self.eve_db.region_name_to_id(entity)
+
+ if not idx:
+ continue
- if self.avoidance_enabled():
- avoidance_list = self.avoidance_list()
+ res.extend(self.eve_db.get_region_system_ids(idx))
- return [self.eve_db.name2id(x) for x in avoidance_list]
+ return res
def get_restrictions(self) -> Restrictions:
size_restriction = self.get_restrictions_size()
@@ -833,9 +867,13 @@ def btn_trip_get_clicked(self):
self._status_tripwire_update()
@QtCore.Slot()
- def btn_avoid_add_clicked(self):
+ def btn_system_avoid_add_clicked(self):
self.avoid_system()
+ @QtCore.Slot()
+ def btn_region_avoid_add_clicked(self):
+ self.avoid_region()
+
@QtCore.Slot()
def btn_avoid_delete_clicked(self):
for item in self.listWidget_avoid.selectedItems():
@@ -864,9 +902,13 @@ def btn_reset_clicked(self):
self._status_tripwire_update()
@QtCore.Slot()
- def line_edit_avoid_name_return(self):
+ def line_edit_system_avoid_name_return(self):
self.avoid_system()
+ @QtCore.Slot()
+ def line_edit_region_avoid_name_return(self):
+ self.avoid_region()
+
@QtCore.Slot()
def line_edit_source_return(self):
self.lineEdit_destination.setFocus()
diff --git a/src/shortcircuit/model/evedb.py b/src/shortcircuit/model/evedb.py
index 55d8684..eb3d163 100644
--- a/src/shortcircuit/model/evedb.py
+++ b/src/shortcircuit/model/evedb.py
@@ -3,7 +3,7 @@
import csv
from enum import Enum
from os import path
-from typing import Dict, List, TypedDict, Union
+from typing import Dict, List, Optional, TypedDict, Union
from typing_extensions import deprecated
from .logger import Logger
@@ -225,6 +225,61 @@ def get_system_class(self):
return '??'
+class Region:
+
+ def __init__(
+ self,
+ regionID: int,
+ regionName: str,
+ x: float,
+ y: float,
+ z: float,
+ xMin: float,
+ xMax: float,
+ yMin: float,
+ yMax: float,
+ zMin: float,
+ zMax: float,
+ factionID: Optional[int],
+ nebula: str,
+ radius: Optional[float]
+ ):
+ self.regionID = regionID
+ self.regionName = regionName
+ self.x = x
+ self.y = y
+ self.z = z
+ self.xMin = xMin
+ self.xMax = xMax
+ self.yMin = yMin
+ self.yMax = yMax
+ self.zMin = zMin
+ self.zMax = zMax
+ self.factionID = factionID
+ self.nebula = nebula
+ self.radius = radius
+
+ @staticmethod
+ def from_row(row: List[str]):
+ regionID, regionName, x, y, z, xMin, xMax, yMin, yMax, zMin, zMax, factionID, nebula, radius = row
+ return Region(
+ regionID=int(regionID),
+ regionName=regionName,
+ x=float(x),
+ y=float(y),
+ z=float(z),
+ xMin=float(xMin),
+ xMax=float(xMax),
+ yMin=float(yMin),
+ yMax=float(yMax),
+ zMin=float(zMin),
+ zMax=float(zMax),
+ factionID=int(factionID) if factionID != 'None' else None,
+ nebula=nebula,
+ radius=float(radius) if radius != 'None' else None
+ )
+
+
class EveDb(metaclass=Singleton):
"""
Eve Database Handler
@@ -361,10 +416,12 @@ def __init__(self):
# @see https://www.fuzzwork.co.uk/dump/
filename_gates = 'mapSolarSystemJumps.csv'
filename_descriptions = 'mapSolarSystems.csv'
+ filename_regions = 'mapRegions.csv'
self._init_gates(get_csv_reader(filename_gates))
self._init_system_descriptions(get_csv_reader(filename_descriptions))
self._init_renames(get_csv_reader(filaname_renames))
+ self._init_regions(get_csv_reader(filename_regions))
self.wh_codes: Dict[str, WormholeSize] = {
rows[0]: WormholeSize(int(rows[1]))
@@ -385,9 +442,10 @@ def _init_gates(self, reader):
def _init_system_descriptions(self, reader):
self.system_desc: Dict[int, SystemDescription] = {}
+ self.region_systems: Dict[int, List[SystemDescription]] = {}
for row in reader:
system = SolarSystem.from_row(row)
- self.system_desc[system.solarSystemID] = {
+ description = SystemDescription({
'class': system.get_system_class(),
'flags': {
'triglavian': system.is_triglavian()
@@ -396,7 +454,11 @@ def _init_system_descriptions(self, reader):
'name': system.solarSystemName,
'region_id': system.regionID,
'security': system.security
- }
+ })
+ self.system_desc[system.solarSystemID] = description
+ if description['region_id'] not in self.region_systems:
+ self.region_systems[description['region_id']] = []
+ self.region_systems[description['region_id']].append(description)
def _init_renames(self, reader):
for row in reader:
@@ -404,6 +466,12 @@ def _init_renames(self, reader):
name = row[1]
self.system_desc[id]['name'] = name
+ def _init_regions(self, reader):
+ self.regions: Dict[int, Region] = {}
+ for row in reader:
+ region = Region.from_row(row)
+ self.regions[region.regionID] = region
+
def get_whsize_by_code(self, code: str) -> WormholeSize:
return self.wh_codes.get(code.upper(), WormholeSize.UNKNOWN)
@@ -440,6 +508,9 @@ def get_whsize_by_system(self, source_id: int, dest_id: int) -> WormholeSize:
def system_name_list(self):
return [x['name'] for x in self.system_desc.values()]
+ def region_name_list(self):
+ return [x.regionName for x in self.regions.values()]
+
def get_system_dict_pair_by_partial_name(self, part: str):
if not part:
return (None, None)
@@ -470,6 +541,12 @@ def normalize_name(self, name) -> Union[None, str]:
return system['name']
+ def normalize_region_name(self, partial: str):
+ for region in self.regions.values():
+ if partial.lower() in region.regionName.lower():
+ return region.regionName
+ return None
+
# TODO properly type this
def name2id(self, name):
[sid, _] = self.get_system_dict_pair_by_partial_name(name)
@@ -482,3 +559,12 @@ def id2name(self, sid):
except KeyError:
sys_name = None
return sys_name
+
+ def region_name_to_id(self, name: str):
+ for region in self.regions.values():
+ if name == region.regionName:
+ return region.regionID
+ return None
+
+ def get_region_system_ids(self, idx: int):
+ return [x["id"] for x in self.region_systems[idx]]
diff --git a/src/shortcircuit/view/gui_main.py b/src/shortcircuit/view/gui_main.py
index ad647e2..a158ca4 100644
--- a/src/shortcircuit/view/gui_main.py
+++ b/src/shortcircuit/view/gui_main.py
@@ -380,30 +380,60 @@ def setupUi(self, MainWindow):
self.horizontalLayout_2.addWidget(self.label_3)
- self.lineEdit_avoid_name = QLineEdit(self.groupBox_avoidance)
- self.lineEdit_avoid_name.setObjectName(u"lineEdit_avoid_name")
+ self.lineEdit_system_avoid_name = QLineEdit(self.groupBox_avoidance)
+ self.lineEdit_system_avoid_name.setObjectName(u"lineEdit_system_avoid_name")
sizePolicy5 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
sizePolicy5.setHorizontalStretch(0)
sizePolicy5.setVerticalStretch(0)
- sizePolicy5.setHeightForWidth(self.lineEdit_avoid_name.sizePolicy().hasHeightForWidth())
- self.lineEdit_avoid_name.setSizePolicy(sizePolicy5)
- self.lineEdit_avoid_name.setMaxLength(32)
+ sizePolicy5.setHeightForWidth(self.lineEdit_system_avoid_name.sizePolicy().hasHeightForWidth())
+ self.lineEdit_system_avoid_name.setSizePolicy(sizePolicy5)
+ self.lineEdit_system_avoid_name.setMaxLength(32)
- self.horizontalLayout_2.addWidget(self.lineEdit_avoid_name)
+ self.horizontalLayout_2.addWidget(self.lineEdit_system_avoid_name)
- self.pushButton_avoid_add = QPushButton(self.groupBox_avoidance)
- self.pushButton_avoid_add.setObjectName(u"pushButton_avoid_add")
- sizePolicy2.setHeightForWidth(self.pushButton_avoid_add.sizePolicy().hasHeightForWidth())
- self.pushButton_avoid_add.setSizePolicy(sizePolicy2)
- self.pushButton_avoid_add.setMinimumSize(QSize(32, 0))
- self.pushButton_avoid_add.setMaximumSize(QSize(32, 16777215))
- self.pushButton_avoid_add.setLayoutDirection(Qt.LeftToRight)
+ self.pushButton_system_avoid_add = QPushButton(self.groupBox_avoidance)
+ self.pushButton_system_avoid_add.setObjectName(u"pushButton_system_avoid_add")
+ sizePolicy2.setHeightForWidth(self.pushButton_system_avoid_add.sizePolicy().hasHeightForWidth())
+ self.pushButton_system_avoid_add.setSizePolicy(sizePolicy2)
+ self.pushButton_system_avoid_add.setMinimumSize(QSize(32, 0))
+ self.pushButton_system_avoid_add.setMaximumSize(QSize(32, 16777215))
+ self.pushButton_system_avoid_add.setLayoutDirection(Qt.LeftToRight)
- self.horizontalLayout_2.addWidget(self.pushButton_avoid_add)
+ self.horizontalLayout_2.addWidget(self.pushButton_system_avoid_add)
self.verticalLayout_4.addLayout(self.horizontalLayout_2)
+ self.horizontalLayout_5 = QHBoxLayout()
+ self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
+ self.label_11 = QLabel(self.groupBox_avoidance)
+ self.label_11.setObjectName(u"label_11")
+ sizePolicy4.setHeightForWidth(self.label_11.sizePolicy().hasHeightForWidth())
+ self.label_11.setSizePolicy(sizePolicy4)
+
+ self.horizontalLayout_5.addWidget(self.label_11)
+
+ self.lineEdit_region_avoid_name = QLineEdit(self.groupBox_avoidance)
+ self.lineEdit_region_avoid_name.setObjectName(u"lineEdit_region_avoid_name")
+ sizePolicy5.setHeightForWidth(self.lineEdit_region_avoid_name.sizePolicy().hasHeightForWidth())
+ self.lineEdit_region_avoid_name.setSizePolicy(sizePolicy5)
+ self.lineEdit_region_avoid_name.setMaxLength(32)
+
+ self.horizontalLayout_5.addWidget(self.lineEdit_region_avoid_name)
+
+ self.pushButton_region_avoid_add = QPushButton(self.groupBox_avoidance)
+ self.pushButton_region_avoid_add.setObjectName(u"pushButton_region_avoid_add")
+ sizePolicy2.setHeightForWidth(self.pushButton_region_avoid_add.sizePolicy().hasHeightForWidth())
+ self.pushButton_region_avoid_add.setSizePolicy(sizePolicy2)
+ self.pushButton_region_avoid_add.setMinimumSize(QSize(32, 0))
+ self.pushButton_region_avoid_add.setMaximumSize(QSize(32, 16777215))
+ self.pushButton_region_avoid_add.setLayoutDirection(Qt.LeftToRight)
+
+ self.horizontalLayout_5.addWidget(self.pushButton_region_avoid_add)
+
+
+ self.verticalLayout_4.addLayout(self.horizontalLayout_5)
+
self.listWidget_avoid = QListWidget(self.groupBox_avoidance)
self.listWidget_avoid.setObjectName(u"listWidget_avoid")
self.listWidget_avoid.setSelectionMode(QAbstractItemView.ExtendedSelection)
@@ -490,7 +520,9 @@ def retranslateUi(self, MainWindow):
self.label_9.setText(QCoreApplication.translate("MainWindow", u"WH:", None))
self.groupBox_avoidance.setTitle(QCoreApplication.translate("MainWindow", u"Avoidance list", None))
self.label_3.setText(QCoreApplication.translate("MainWindow", u"System:", None))
- self.pushButton_avoid_add.setText(QCoreApplication.translate("MainWindow", u"+", None))
+ self.pushButton_system_avoid_add.setText(QCoreApplication.translate("MainWindow", u"+", None))
+ self.label_11.setText(QCoreApplication.translate("MainWindow", u"Region:", None))
+ self.pushButton_region_avoid_add.setText(QCoreApplication.translate("MainWindow", u"+", None))
self.pushButton_avoid_delete.setText(QCoreApplication.translate("MainWindow", u"Delete selected", None))
self.pushButton_avoid_clear.setText(QCoreApplication.translate("MainWindow", u"Clear list", None))
self.pushButton_reset.setText(QCoreApplication.translate("MainWindow", u"Reset chain", None))