Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 03-07-2012, 10:22   #1
Registered User

Join Date: Jun 2012
Posts: 2
Plugin Development Question

Is this the right forum for developer/programming questions related to
the source code of opencpn or plugin development?

Question:
Is there a way, (from a plugin) to query/get current display chart's path on disk.
(path to the KAP file)?

/Pelle
pelle2004 is offline   Reply With Quote
Old 03-07-2012, 13:13   #2
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Re: Plugin development question?

It is certainly the right forum. Not 100% sure if it answers your question, but check out GetChartDatabaseEntryXML in pluginmanager.cpp
/j
JesperWe is offline   Reply With Quote
Old 03-07-2012, 14:06   #3
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Plugin development question?

pelle2004...

Welcome. Always happy to have new developers come aboard. Got your patch in Flyspray. Thanks.

To answer your question: No. No-one has yet seen the need for this API. However, it is a good time to extend the OpenCPN PlugIn API right now, since we will very soon start the 3.1 Beta cycle.

In quilt mode, there are multiple charts open. Which displayed chart do you mean? Do you want a list?


Anyway, if we can understand what you need as far as the identification of one or all charts currently on-screen, we should be able to implement something useful.

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 04-07-2012, 01:00   #4
Registered User

Join Date: Jun 2012
Posts: 2
Re: Plugin Development Question

Hi Everyone!

Thanks for a very nice software!
Good functionality and an excellent way of adding plugins.

The GetChartDatabaseEntryXML is very useful. Then all you only need to know
is what index(s) are currently visible.

Something like

int GetIndexOfVisibleDatabaseEntryXML( int *indexArray, int size, bool flag );
// indexArray: Array of index values of curently visible open charts in quilt mode.
// size: len of indexArray
// flag: Sort by cursor position .....??
// return: Number of entries in indexArray

First entry in 'indexArray' would be the one under the cursor.
If you then add a context menu item from a plugin you can easyly get all the chart info by a right click.

Maybe some flags are need.

PS. Looking forward for the upcoming 3.1 and if I see an opportunity to contribute I will.

/Thanks!
pelle2004 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Advertise Here


All times are GMT -7. The time now is 20:59.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.