On 03/30/15 14:31, Bill Somerville wrote:
> On 30/03/2015 20:37, John C. Peterson wrote:
> Hi John,
>> I'm working a cleaning up some other small problems with WSPR-X and one
>> of them is getting the ComboBox widgets with serial port entries (for
>> CAT, PTT) to have entries that are meaningful for the given target
>> platform (e.g. MACX, UNIX or WIN32).
>>
>> On WIN32, meaningful entries would be COM1... while on UNIX they would
>> be /dev/ttyS0... /dev/ttyUSB0... and something similar on OS X. One
>> could put ALL of them into the ComboBoxen with qtcreator, but I suspect
>> this could be a source of confusion for end users without experience on
>> multiple platforms.
>>
>> So far, the best way I have identified to approach this is to have
>> a single entry ("None") in the XML file ouput by qtcreator. Then at
>> runtime during the UI setup phase, make platform specific calls to
>> ui.ComboBox->addItem( ) to add meaningful entries. These can be made
>> platform specific using standard cpp constructs like #ifdef.
>>
>> Another approach would be to have platform specific devsetup.ui XML
>> files, but my first impression is that is asking for trouble when
>> it comes to keeping them synchronized as the interface evolves.
>>
>> I've worked a fair bit with GUI toolkits, but not very much with QT.
>> I was curious if anyone knew of a better approach than dealing with
>> the issue at runtime...
> Simple answer, QtSerialPortInfo::availablePorts(). For an implementation
> that uses it look at Configuration.cpp in ^/branches/wsjtx recently
> added code to use it to enumerate ports. Works FB on Windows/Mac/Linux.
> WSJT-X has a couple of complexities with port names but the principle is
> very simple. Beware of QSerialPortInfo::isBusy() to check for free ports
> as that opens the port which will toggle DTR & RTS on Linux and Mac
> which might interfere with PTT switching arrangements.
>> 73, John
>>
> 73
> Bill
> G4WJS.
With Fedora and Linux Mint.
I have used udev's rules.d to create links from the product and vendor codes 
to names I can create. It would be good to have the links displayed in the 
menu. I don't think they're displayed with fldigi but I just enter them in and 
it works. The kernel will reassign the USB driver names on a reboot but with 
the product and vendor codes installed, a consistent  /dev/USB0 for the 
TS-440S, /dev/USB1 for the FT-847 CAT, and /dev/USB2 for the TS-440S TX 
symlinks will always be accurate.
I hope the symlinks can be displayed in the menu.

Chuck
WA7OEF

>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> wsjt-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wsjt-devel


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
wsjt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to