extend the LoadFile parameter

To post any request/idea for new functionalities
Post Reply
theadib
Posts: 7
Joined: Wed Oct 21, 2020 8:07 pm

extend the LoadFile parameter

Post by theadib »

Hello Daniel,

I am author of that qJsonRPC plugin that has "open" function to open files.

Now a user has problems to open bundler ".out" files silently.

The problems is that the import dialogue has input for additional filelist filename.
But if that can not be changed that lead to potential errors on importing.

My idea is to extend the FileIOFilter::LoadParameters by additional QHash<QString, QVariant>.
In that way I could extend the functionality of the actual import function by passing additional parameter without changing the API.

What do you thing?

Regards, Adib.
--
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: extend the LoadFile parameter

Post by daniel »

Wouldn't it be better to have a custom 'BunderFilter::loadFile' method and call it directly?
Daniel, CloudCompare admin
theadib
Posts: 7
Joined: Wed Oct 21, 2020 8:07 pm

Re: extend the LoadFile parameter

Post by theadib »

there is this RPC "open" function with filename as parameter and some paramters to suppress the parameter dialog.

However some paramter should get some values from the caller (in the bundler it should be "lists.txt" filename)
If I have to decide that is the bundler::loadFile() function, then I have to decide and make the file extension magic in the plugin.
But the plugin does not have this parameter.

So I wanted a generic way to pass the parameter and use/bind as late as possible in the call hirarchy.

Regards, Adib.
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: extend the LoadFile parameter

Post by daniel »

Ok, in that case I guess you can extend the FileIOFilter::LoadParameters structure. I'll wait for the PR.
Daniel, CloudCompare admin
Post Reply