mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 13:30:52 -05:00 
			
		
		
		
	Add fading colors to bandmap and bandmap2.
Double-click on callsign in bandmap, bandmap2, puts it into ToRadio. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@415 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									370f113b8a
								
							
						
					
					
						commit
						80cfd49a0b
					
				
							
								
								
									
										48
									
								
								display.F90
									
									
									
									
									
								
							
							
						
						
									
										48
									
								
								display.F90
									
									
									
									
									
								
							@ -6,11 +6,11 @@ subroutine display
 | 
			
		||||
 | 
			
		||||
  parameter (MAXLINES=500,MX=500)
 | 
			
		||||
  integer indx(MAXLINES),indx2(MX)
 | 
			
		||||
  character*80 line(MAXLINES),line2(MX),line3(MAXLINES)
 | 
			
		||||
  character out*41,cfreq0*3
 | 
			
		||||
  character*81 line(MAXLINES),line2(MX),line3(MAXLINES)
 | 
			
		||||
  character out*46,cfreq0*3
 | 
			
		||||
  character*6 callsign,callsign0
 | 
			
		||||
  character*10 freqcall(100)
 | 
			
		||||
  character*36 bm2
 | 
			
		||||
  character*12 freqcall(100)
 | 
			
		||||
  character*40 bm2
 | 
			
		||||
  real freqkHz(MAXLINES)
 | 
			
		||||
  integer utc(MAXLINES),utc2(MX),utcz
 | 
			
		||||
  real*8 f0
 | 
			
		||||
@ -29,14 +29,25 @@ subroutine display
 | 
			
		||||
  enddo
 | 
			
		||||
 | 
			
		||||
10 nz=i-1
 | 
			
		||||
 | 
			
		||||
  utcz=utc(nz)
 | 
			
		||||
  ndiff=utcz-utc(1)
 | 
			
		||||
  if(ndiff.lt.0) ndiff=ndiff+1440
 | 
			
		||||
  if(ndiff.gt.nkeep) then
 | 
			
		||||
  nquad=nkeep/4
 | 
			
		||||
  do i=1,nz
 | 
			
		||||
     nage=utcz-utc(i)
 | 
			
		||||
     if(nage.lt.0) nage=nage+1440
 | 
			
		||||
     iage=(nage/nquad) + 1
 | 
			
		||||
     if(nage.le.1) iage=0
 | 
			
		||||
     write(line(i)(78:81),1021) iage
 | 
			
		||||
1021 format(i4)
 | 
			
		||||
  enddo
 | 
			
		||||
 | 
			
		||||
  nage=utcz-utc(1)
 | 
			
		||||
  if(nage.lt.0) nage=nage+1440
 | 
			
		||||
  if(nage.gt.nkeep) then
 | 
			
		||||
     do i=1,nz
 | 
			
		||||
        ndiff=utcz-utc(i)
 | 
			
		||||
        if(ndiff.lt.0) ndiff=ndiff+1440
 | 
			
		||||
        if(ndiff.le.nkeep) go to 20
 | 
			
		||||
        nage=utcz-utc(i)
 | 
			
		||||
        if(nage.lt.0) nage=nage+1440
 | 
			
		||||
        if(nage.le.nkeep) go to 20
 | 
			
		||||
     enddo
 | 
			
		||||
20   i0=i
 | 
			
		||||
     nz=nz-i0+1
 | 
			
		||||
@ -108,7 +119,7 @@ subroutine display
 | 
			
		||||
  nc=0
 | 
			
		||||
  callsign0='          '
 | 
			
		||||
  do k=1,k3
 | 
			
		||||
     out=line3(k)(5:12)//line3(k)(28:31)//line3(k)(39:67)
 | 
			
		||||
     out=line3(k)(5:12)//line3(k)(28:31)//line3(k)(39:67)//line3(k)(77:81)
 | 
			
		||||
     if(out(1:3).ne.'   ') then
 | 
			
		||||
        if(out(1:3).eq.cfreq0) then
 | 
			
		||||
           out(1:3)='   '
 | 
			
		||||
@ -116,29 +127,32 @@ subroutine display
 | 
			
		||||
           cfreq0=out(1:3)
 | 
			
		||||
        endif
 | 
			
		||||
        write(19,1030) out
 | 
			
		||||
1030    format(a41)
 | 
			
		||||
1030    format(a46)
 | 
			
		||||
        i1=index(out(20:),' ')
 | 
			
		||||
        callsign=out(i1+20:)
 | 
			
		||||
        i2=index(callsign,' ')
 | 
			
		||||
        if(i2.gt.1) callsign(i2:)='      '
 | 
			
		||||
        if(callsign.ne.'      ' .and. callsign.ne.callsign0) then
 | 
			
		||||
           nc=nc+1
 | 
			
		||||
           freqcall(nc)=cfreq0//' '//callsign
 | 
			
		||||
           freqcall(nc)=cfreq0//' '//callsign//line3(k)(80:81)
 | 
			
		||||
           callsign0=callsign
 | 
			
		||||
        endif
 | 
			
		||||
        if(callsign.ne.'      ' .and. callsign.eq.callsign0) then
 | 
			
		||||
           freqcall(nc)=cfreq0//' '//callsign//line3(k)(80:81)
 | 
			
		||||
        endif
 | 
			
		||||
     endif
 | 
			
		||||
  enddo
 | 
			
		||||
  call flushqqq(19)
 | 
			
		||||
  nc=nc+1
 | 
			
		||||
  freqcall(nc)='          '
 | 
			
		||||
  freqcall(nc)='            '
 | 
			
		||||
  nc=nc+1
 | 
			
		||||
  freqcall(nc)='          '
 | 
			
		||||
  freqcall(nc+1)='          '
 | 
			
		||||
  freqcall(nc)='            '
 | 
			
		||||
  freqcall(nc+1)='            '
 | 
			
		||||
  iz=(nc+2)/3
 | 
			
		||||
  do i=1,iz
 | 
			
		||||
     bm2=freqcall(i)//'  '//freqcall(i+iz)//'  '//freqcall(i+2*iz)
 | 
			
		||||
     write(20,1040) bm2
 | 
			
		||||
1040 format(a36)
 | 
			
		||||
1040 format(a40)
 | 
			
		||||
  enddo
 | 
			
		||||
  call flushqqq(20)
 | 
			
		||||
  return
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										46
									
								
								map65.py
									
									
									
									
									
								
							
							
						
						
									
										46
									
								
								map65.py
									
									
									
									
									
								
							@ -17,7 +17,7 @@ from types import *
 | 
			
		||||
import array
 | 
			
		||||
 | 
			
		||||
root = Tk()
 | 
			
		||||
Version="0.1 r" + "$Rev$"[6:-1]
 | 
			
		||||
Version="0.7 r" + "$Rev$"[6:-1]
 | 
			
		||||
print "******************************************************************"
 | 
			
		||||
print "MAP65 Version " + Version + ", by K1JT"
 | 
			
		||||
print "Revision date: " + \
 | 
			
		||||
@ -174,10 +174,15 @@ def bandmap(event=NONE):
 | 
			
		||||
    if g.Win32: bm.iconbitmap("wsjt.ico")
 | 
			
		||||
    iframe_bm1 = Frame(bm, bd=1, relief=SUNKEN)
 | 
			
		||||
    bmtext=Text(iframe_bm1, height=35, width=41, bg="Navy", fg="yellow")
 | 
			
		||||
    bmtext.bind('<Double-Button-1>',dbl_click_bmtext)
 | 
			
		||||
    bmtext.pack(side=LEFT, fill=X, padx=1, pady=3)
 | 
			
		||||
    bmsb = Scrollbar(iframe_bm1, orient=VERTICAL, command=bmtext.yview)
 | 
			
		||||
    bmsb.pack(side=RIGHT, fill=Y)
 | 
			
		||||
    bmtext.configure(yscrollcommand=bmsb.set)
 | 
			
		||||
    bmtext.tag_configure('age0',foreground='red')
 | 
			
		||||
    bmtext.tag_configure('age1',foreground='yellow')
 | 
			
		||||
    bmtext.tag_configure('age2',foreground='gray75')
 | 
			
		||||
    bmtext.tag_configure('age3',foreground='gray50')
 | 
			
		||||
    iframe_bm1.pack(expand=1, fill=X, padx=4)
 | 
			
		||||
 | 
			
		||||
#------------------------------------------------------ bandmap2
 | 
			
		||||
@ -188,7 +193,12 @@ def bandmap2(event=NONE):
 | 
			
		||||
    if g.Win32: bm2.iconbitmap("wsjt.ico")
 | 
			
		||||
    iframe_bm2 = Frame(bm2, bd=1, relief=SUNKEN)
 | 
			
		||||
    bm2text=Text(iframe_bm2, height=24, width=36, bg="Navy", fg="yellow")
 | 
			
		||||
    bm2text.bind('<Double-Button-1>',dbl_click_bm2text)
 | 
			
		||||
    bm2text.pack(side=LEFT, fill=X, padx=1, pady=3)
 | 
			
		||||
    bm2text.tag_configure('age0',foreground='red')
 | 
			
		||||
    bm2text.tag_configure('age1',foreground='yellow')
 | 
			
		||||
    bm2text.tag_configure('age2',foreground='gray75')
 | 
			
		||||
    bm2text.tag_configure('age3',foreground='gray50')
 | 
			
		||||
    iframe_bm2.pack(expand=1, fill=X, padx=4)
 | 
			
		||||
 | 
			
		||||
#------------------------------------------------------ logqso
 | 
			
		||||
@ -223,6 +233,16 @@ def dbl_click_text(event):
 | 
			
		||||
    t=text.get('1.0',END)           #Entire contents of text box
 | 
			
		||||
    t1=text.get('1.0',CURRENT)      #Contents from start to cursor
 | 
			
		||||
    dbl_click_call(t,t1,event)
 | 
			
		||||
#------------------------------------------------------ dbl_click_bmtext
 | 
			
		||||
def dbl_click_bmtext(event):
 | 
			
		||||
    t=bmtext.get('1.0',END)           #Entire contents of text box
 | 
			
		||||
    t1=bmtext.get('1.0',CURRENT)      #Contents from start to cursor
 | 
			
		||||
    dbl_click_call(t,t1,event)
 | 
			
		||||
#------------------------------------------------------ dbl_click_bm2text
 | 
			
		||||
def dbl_click_bm2text(event):
 | 
			
		||||
    t=bm2text.get('1.0',END)           #Entire contents of text box
 | 
			
		||||
    t1=bm2text.get('1.0',CURRENT)      #Contents from start to cursor
 | 
			
		||||
    dbl_click_call(t,t1,event)
 | 
			
		||||
#------------------------------------------------------ dbl_click_ave
 | 
			
		||||
def dbl_click_ave(event):
 | 
			
		||||
    t=avetext.get('1.0',END)        #Entire contents of text box
 | 
			
		||||
@ -1271,7 +1291,13 @@ def update():
 | 
			
		||||
            bmtext.insert(END,'Freq  DF Pol  UTC\n')
 | 
			
		||||
            bmtext.insert(END,'----------------------------------------\n')
 | 
			
		||||
            for i in range(len(lines)):
 | 
			
		||||
                bmtext.insert(END,lines[i])
 | 
			
		||||
                nage=int(lines[i][41:])
 | 
			
		||||
                lines[i]=lines[i][:41]
 | 
			
		||||
                if nage==0: attr='age0'
 | 
			
		||||
                if nage==1: attr='age1'
 | 
			
		||||
                if nage==2: attr='age2'
 | 
			
		||||
                if nage>=3: attr='age3'
 | 
			
		||||
                bmtext.insert(END,lines[i],attr)
 | 
			
		||||
            bmtext.see(END)
 | 
			
		||||
 | 
			
		||||
            try:
 | 
			
		||||
@ -1283,7 +1309,21 @@ def update():
 | 
			
		||||
            bm2text.configure(state=NORMAL)
 | 
			
		||||
            bm2text.delete('1.0',END)
 | 
			
		||||
            for i in range(len(lines)):
 | 
			
		||||
                bm2text.insert(END,lines[i])
 | 
			
		||||
                for j in range(3):
 | 
			
		||||
                    ka=14*j
 | 
			
		||||
                    kb=ka+12
 | 
			
		||||
                    t=lines[i][ka:kb]
 | 
			
		||||
                    try:
 | 
			
		||||
                        nage=int(t[10:])
 | 
			
		||||
                    except:
 | 
			
		||||
                        nage=0
 | 
			
		||||
                    t=t[:11]+' '
 | 
			
		||||
                    if j==2: t=t+'\n'
 | 
			
		||||
                    if nage==0: attr='age0'
 | 
			
		||||
                    if nage==1: attr='age1'
 | 
			
		||||
                    if nage==2: attr='age2'
 | 
			
		||||
                    if nage>=3: attr='age3'
 | 
			
		||||
                    bm2text.insert(END,t,attr)
 | 
			
		||||
            bm2text.see(END)
 | 
			
		||||
 | 
			
		||||
            Audio.gcom2.ndecdone=0
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user