Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Please support our sponsors and let them know you heard about them on CruisersForum.com
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
Senior Cruiser
 
bdbcat's Avatar

Cruisers Forum Supporter

Join Date: Mar 2008
Posts: 2,273
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

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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



Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

RV & Travel Trailer Communities

Our RV & Travel Trailer sites encompasses virtually all types of Recreational Vehicles, from brand-specific to general RV communities.

» More about our RV Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


Copyright 2002-2012 Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 07:53.


Social Knowledge Networks

Sailing News Delivered to your Email!

Stay up-to-date with the latest cruising news.

unsusbcribe at anytime with one click

Close [X]


ShowCase vBulletin Plugins by Drive Thru Online, Inc.