ImageProcessing-ElectronicPublications / photoquick

Light-weight image viewer with crop,resize,collage, photogrid and filters
GNU General Public License v3.0
4 stars 0 forks source link

Repeats in plugins? #32

Closed zvezdochiot closed 3 years ago

zvezdochiot commented 3 years ago

https://github.com/ImageProcessing-ElectronicPublications/photoquick/blob/ccae4eeb9c2da025e3f5d4a9f6246c294412cbff/src/main.cpp#L627-L709 Repeats in plugins:

Can I use bicubic interpolation from https://github.com/ImageProcessing-ElectronicPublications/photoquick/blob/master/src/main.cpp instead of duplicating code?

ksharindam commented 3 years ago

That is the problem of using single executable. As the plugins are not linked with the main program, they can not call any function in main program directly. That's why in most plugins, i have copied code from filters.cpp.

But there is a dirty work around. that is declare the function in Window as a SLOT. Then in the plugin create a SIGNAL, and connect that signal and slot. then emit signal. The slot must return void.

zvezdochiot commented 3 years ago

@ksharindam say:

The slot must return void.

Not. It won't do.