Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 12-02-2024, 06:54 AM   #1
jwes
Connoisseur
jwes began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Jul 2023
Device: none
Are plugins modal?

I am looking into writing a plugin fixing typos found on an e-reader. My idea was to take a list of strings containing typos from the e-reader, find them one at a time in the document, and edit them with Sigil. The interface would be like a toolbar with a button to find the next string and set the cursor into the code window at the start of the string. I don't see how this could work if the plugin is modal, so is this possible?
jwes is offline   Reply With Quote
Old 12-02-2024, 08:29 AM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,734
Karma: 5703586
Join Date: Nov 2009
Device: many
The plugin runner dialog itself must be modal. You can create your own dialogs inside it as modal or non-modal so as long as you do the replacements inside the plugin (there is full regex support) you could do what you want, just inside the plugin not inside Sigil. And plugins now support QtWebEngine so making a Preview inside of a plugin is easier.

Last edited by KevinH; 12-02-2024 at 09:43 AM.
KevinH is offline   Reply With Quote
Advert
Old 12-02-2024, 01:30 PM   #3
jwes
Connoisseur
jwes began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Jul 2023
Device: none
If I understand correctly, the plugin would have to have a code window and a preview window. Are there any examples that would help me get started?
jwes is offline   Reply With Quote
Old 12-02-2024, 03:18 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,734
Karma: 5703586
Join Date: Nov 2009
Device: many
I will look for PySide6 examples of using a QPlainTextEdit (for CV) and a QWebEngineView (for Preview) and if I find any point you at them. Calibre src code may be a good source for both but would need to be tweaked to get something workable for PySide6.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Metadata Source plugins] Calibre internal plugins fail igorius Plugins 1 05-28-2023 11:42 AM
Systemwide installation of plugins / Discovery of installed plugins via pkg_resources t-8ch Development 8 11-14-2020 09:25 AM
Another newbie question: Popup/Modal windows JackTrade ePub 26 02-04-2020 03:06 PM
Feature Request: Non-modal Metadata Editor Window Katsunami Calibre 3 03-20-2018 06:19 PM


All times are GMT -4. The time now is 03:38 AM.


MobileRead.com is a privately owned, operated and funded community.