diff --git a/app/resources/qt/translations/mindforger_cs.ts b/app/resources/qt/translations/mindforger_cs.ts index 681feb9d..aef925c8 100644 --- a/app/resources/qt/translations/mindforger_cs.ts +++ b/app/resources/qt/translations/mindforger_cs.ts @@ -4,53 +4,53 @@ QObject - + Save Note - + Do you want to save changes? - + Discard changes - + &Discard changes - - + + Autosave - + Do not ask & autosave - + Continue editing - + Continue &editing - + Save - + &Save @@ -60,15 +60,15 @@ - - + + Empty Phrase - - + + Phrase to search/explain/process is empty. @@ -2654,44 +2654,44 @@ Choose new library source: m8r::MainWindowPresenter - + Cannot think - either Mind already dreaming or repository too big - + Hyperlink %1 clicked... - + Link target not found for relative link %1 - + New Markdown File Error - - - + + + Specified file path already exists! - + Cannot start sleeping - please wait until dreaming finishes and then try again - + Learn Markdown File - + Learn @@ -2707,54 +2707,54 @@ Choose new library source: - + Autolinked Notebooks and Notes - + Notebook Full-text Search - + Note Full-text Search - + Full-text Search - - - - + + + + Notebook - - + + Notebook not found - + Find Note by Tags in Notebook - - + + Find Note by Tags - - - + + + Note @@ -2764,565 +2764,565 @@ Choose new library source: - + Thing not found - - + + Note not found - + Refactored Note to Notebook ' - + Target Notebook not found - + Refactor Note - + Note to be refactored not specified! - + Find Note by Name in Notebook - + Find Note by Name - - - - + + + + Initializing NER and predicting... - - - - + + + + NER - - - - + + + + Memory NER not implemented yet. - + Recognizing named entities... - + Initializing NER and recognizing named entities... - + Initializing (the first run only) NER and predicting... - - + + Named-entity Recognition - + NER predicition finished - + No named entities recognized. - + image - + Given path '%1' doesn't exist - target will not be copied, but link will be created - + Saving pasted image data to file: '%1' - + HTML Note preview flickering can be eliminated by disabling math and diagrams in Preferences menu - + Edit Notebook - + Please open an Notebook to edit. - - + + New Note - + Failed to create new Note! - - + + Clone Notebook - + Failed to clone Notebook! - + Please open and Notebook to be cloned. - + Home tag toggled/removed - Notebook '%1' is no longer home - + Notebook '%1' successfully marked as home - + Make Notebook home - + Notebook can be marked as home only when viewed. - - + + Forget Notebook - + Library already indexed - use 'Update library' action to synchronize documents. - + Unable to index documents on library path - either memory directory doesn't exist or not in MindForger workspace mode. - + Library synchronization - + There are no libraries - nothing to synchronize. - + Library deletion - + There are no libraries - nothing to delete. - + Delete Library - + Do you really want to delete Notebooks which represent the library documents? - + Do you really want to forget ' - + ' Notebook? - + Cannot think - either Mind already dreaming or workspace too big - - + + New Workspace Error - + Specified workspace path already exists! - + Failed to create empty workspace! - + ERROR: workspace created, but attempt to copy documentation and/or stencils failed - + Learn Directory or MindForger Workspace - + This is neither valid MindForger/Markdown workspace nor file. - + Home Notebook not set - use menu 'Notebooks/Make Home' - + File copied to workspace path '%1' - + 🔒 Notebook Write Error - + Notebook file is read-only and cannot be written: '%1' - + Do you really want to deprecate ' - + Notebook can be forgotten only when viewed. - - - + + + Export Error - + Unable to find Notebook to export! - + Import TWiki File - + Open and view a Notebook to create new Note. - + Edit Note - - + + Please select a Note to edit in the Notebook. - - + + Edit Note with External Editor Error - + External editor command is not configured in preferences (Editor tab). - - + + Edit Note with External Editor - + Running command: '%1' - + Running command: '%1'. Close external editor to return control back to MindForger. - + Delete Note - + Do you really want to delete note ' - + ' along with its child notes? - + Forget Note - + Please select a Note to forget. - - - + + + Extract Note - + Please select a text to extract. - + Failed to extract new Note! - + Please select a Note, edit it and select a text to extract. - - - + + + Clone Note - + Do you want to clone Note ' - + ' including its child notes?'? - + Failed to clone Note! - + Please select a Note to be cloned. - + Moved Note '%1' to be the first child - - - - + + + + Move Note - - - - + + + + Please select a Note to be moved. - + Moved up Note '%1' - + Moved down Note '%1' - + Moved Note '%1' to be the last child - + Promoted Note '%1' - + Promote Note - + Please select a Note to be promoted. - + Demoted Note '%1' - + Demote Note - + Please select a Note to be demoted. - - - + + + Add Library Error - + Library directory doesn't exist! - + Organizer Update Error - + Eisenhower Matrix organizer is built-in and cannot be edited - please create or update a custom organizer. - + Organizer Clone Error - + Eisenhower Matrix organizer is built-in and cannot be cloned - please create or update a custom organizer. - + Forget Organizer - + ' Organizer? - + Delete Organizer - + Eisenhower Matrix is built-in and cannot be deleted - only custom organizers can. - + View Limbo - + Limbo directory with deleted Notebooks is available in the MindForger workspace, not if a Markdown is edited or a directory with markdowns is opened. - + About MindForger @@ -3944,71 +3944,74 @@ Choose new library source: m8r::OrlojPresenter - + Eisenhower Matrix: - + Kanban: - + Organizer: ' - + Selected Organizer not found! - + No Organizer selected! - + + + Selected Notebook not found! - - + + + No Notebook selected! - + Selected Tag not found! - - + + No Tag selected! - + Note '%1' %2 - - + + Note - + Selected Notebook/Note not found! - - + + No Note selected! diff --git a/app/resources/qt/translations/mindforger_en.qm b/app/resources/qt/translations/mindforger_en.qm index 7683aa32..7536dc9b 100644 Binary files a/app/resources/qt/translations/mindforger_en.qm and b/app/resources/qt/translations/mindforger_en.qm differ diff --git a/app/resources/qt/translations/mindforger_en.ts b/app/resources/qt/translations/mindforger_en.ts index 1acd7889..3ec6ee79 100644 --- a/app/resources/qt/translations/mindforger_en.ts +++ b/app/resources/qt/translations/mindforger_en.ts @@ -4,53 +4,53 @@ QObject - + Save Note - + Do you want to save changes? - + Discard changes - + &Discard changes - - + + Autosave - + Do not ask & autosave - + Continue editing - + Continue &editing - + Save - + &Save @@ -60,15 +60,15 @@ - - + + Empty Phrase - - + + Phrase to search/explain/process is empty. @@ -1019,7 +1019,7 @@ Choose new library source: &Mind - Fi&le + &Workspace @@ -1220,7 +1220,7 @@ Choose new library source: &Recall - F&ind + &Find @@ -2682,34 +2682,34 @@ Choose new library source: m8r::MainWindowPresenter - + Cannot think - either Mind already dreaming or repository too big - + Hyperlink %1 clicked... - + Link target not found for relative link %1 - + New Markdown File Error - - - + + + Specified file path already exists! - + Cannot start sleeping - please wait until dreaming finishes and then try again @@ -2718,12 +2718,12 @@ Choose new library source: Open Directory or MindForger Repository - + Learn Markdown File Open Markdown File - + Learn Open @@ -2739,54 +2739,54 @@ Choose new library source: - + Autolinked Notebooks and Notes - + Notebook Full-text Search - + Note Full-text Search - + Full-text Search - - - - + + + + Notebook - - + + Notebook not found - + Find Note by Tags in Notebook - - + + Find Note by Tags - - - + + + Note @@ -2796,565 +2796,565 @@ Choose new library source: - + Thing not found - - + + Note not found - + Refactored Note to Notebook ' - + Target Notebook not found - + Refactor Note - + Note to be refactored not specified! - + Find Note by Name in Notebook - + Find Note by Name - - - - + + + + Initializing NER and predicting... - - - - + + + + NER - - - - + + + + Memory NER not implemented yet. - + Recognizing named entities... - + Initializing NER and recognizing named entities... - + Initializing (the first run only) NER and predicting... - - + + Named-entity Recognition - + NER predicition finished - + No named entities recognized. - + image - + Given path '%1' doesn't exist - target will not be copied, but link will be created - + Saving pasted image data to file: '%1' - + HTML Note preview flickering can be eliminated by disabling math and diagrams in Preferences menu - + Edit Notebook - + Please open an Notebook to edit. - - + + New Note - + Failed to create new Note! - - + + Clone Notebook - + Failed to clone Notebook! - + Please open and Notebook to be cloned. - + Home tag toggled/removed - Notebook '%1' is no longer home - + Notebook '%1' successfully marked as home - + Make Notebook home - + Notebook can be marked as home only when viewed. - - + + Forget Notebook Deprecate Notebook - + Library already indexed - use 'Update library' action to synchronize documents. - + Unable to index documents on library path - either memory directory doesn't exist or not in MindForger workspace mode. - + Library synchronization - + There are no libraries - nothing to synchronize. - + Library deletion - + There are no libraries - nothing to delete. - + Delete Library - + Do you really want to delete Notebooks which represent the library documents? - + Do you really want to forget ' - + ' Notebook? - + Cannot think - either Mind already dreaming or workspace too big - - + + New Workspace Error - + Specified workspace path already exists! - + Failed to create empty workspace! - + ERROR: workspace created, but attempt to copy documentation and/or stencils failed - + Learn Directory or MindForger Workspace - + This is neither valid MindForger/Markdown workspace nor file. - + Home Notebook not set - use menu 'Notebooks/Make Home' - + File copied to workspace path '%1' - + 🔒 Notebook Write Error - + Notebook file is read-only and cannot be written: '%1' - + Do you really want to deprecate ' - + Notebook can be forgotten only when viewed. - - - + + + Export Error - + Unable to find Notebook to export! - + Import TWiki File - + Open and view a Notebook to create new Note. - + Edit Note - - + + Please select a Note to edit in the Notebook. - - + + Edit Note with External Editor Error - + External editor command is not configured in preferences (Editor tab). - - + + Edit Note with External Editor - + Running command: '%1' - + Running command: '%1'. Close external editor to return control back to MindForger. - + Delete Note - + Do you really want to delete note ' - + ' along with its child notes? - + Forget Note Delete Note - + Please select a Note to forget. Please select a Note to delete. - - - + + + Extract Note - + Please select a text to extract. - + Failed to extract new Note! - + Please select a Note, edit it and select a text to extract. - - - + + + Clone Note - + Do you want to clone Note ' - + ' including its child notes?'? - + Failed to clone Note! - + Please select a Note to be cloned. - + Moved Note '%1' to be the first child - - - - + + + + Move Note - - - - + + + + Please select a Note to be moved. - + Moved up Note '%1' - + Moved down Note '%1' - + Moved Note '%1' to be the last child - + Promoted Note '%1' - + Promote Note - + Please select a Note to be promoted. - + Demoted Note '%1' - + Demote Note - + Please select a Note to be demoted. - - - + + + Add Library Error - + Library directory doesn't exist! - + Organizer Update Error - + Eisenhower Matrix organizer is built-in and cannot be edited - please create or update a custom organizer. - + Organizer Clone Error - + Eisenhower Matrix organizer is built-in and cannot be cloned - please create or update a custom organizer. - + Forget Organizer - + ' Organizer? - + Delete Organizer - + Eisenhower Matrix is built-in and cannot be deleted - only custom organizers can. - + View Limbo - + Limbo directory with deleted Notebooks is available in the MindForger workspace, not if a Markdown is edited or a directory with markdowns is opened. - + About MindForger @@ -3976,71 +3976,74 @@ Choose new library source: m8r::OrlojPresenter - + Eisenhower Matrix: - + Kanban: - + Organizer: ' - + Selected Organizer not found! - + No Organizer selected! - + + + Selected Notebook not found! - - + + + No Notebook selected! - + Selected Tag not found! - - + + No Tag selected! - + Note '%1' %2 - - + + Note - + Selected Notebook/Note not found! - - + + No Note selected! diff --git a/app/resources/qt/translations/mindforger_nerd_cs.ts b/app/resources/qt/translations/mindforger_nerd_cs.ts index 52e18d32..c3846f16 100644 --- a/app/resources/qt/translations/mindforger_nerd_cs.ts +++ b/app/resources/qt/translations/mindforger_nerd_cs.ts @@ -4,53 +4,53 @@ QObject - + Save Note - + Do you want to save changes? - + Discard changes - + &Discard changes - - + + Autosave - + Do not ask & autosave - + Continue editing - + Continue &editing - + Save - + &Save @@ -60,15 +60,15 @@ - - + + Empty Phrase - - + + Phrase to search/explain/process is empty. @@ -2666,66 +2666,66 @@ Choose new library source: m8r::MainWindowPresenter - + Cannot think - either Mind already dreaming or repository too big - + Cannot start sleeping - please wait until dreaming finishes and then try again - + Learn - + Full-text Search - - - + + + Note - - + + Note not found - + Refactor Note - + Note to be refactored not specified! - + Find Note by Name - - + + New Note - + Failed to create new Note! - + Hyperlink %1 clicked... @@ -2735,195 +2735,195 @@ Choose new library source: - + Autolinked Notebooks and Notes - + Link target not found for relative link %1 - + New Markdown File Error - - - + + + Specified file path already exists! - + Learn Markdown File - + Notebook Full-text Search - + Note Full-text Search - - - - + + + + Notebook - - + + Notebook not found - + Refactored Note to Notebook ' - + Target Notebook not found - + Find Note by Name in Notebook - + Home Notebook not set - use menu 'Notebooks/Make Home' - + File copied to workspace path '%1' - + Edit Notebook - + Please open an Notebook to edit. - - + + Clone Notebook - + Failed to clone Notebook! - + Please open and Notebook to be cloned. - + Notebook '%1' successfully marked as home - + Make Notebook home - + Notebook can be marked as home only when viewed. - + Library already indexed - use 'Update library' action to synchronize documents. - + Unable to index documents on library path - either memory directory doesn't exist or not in MindForger workspace mode. - + Library synchronization - + There are no libraries - nothing to synchronize. - + Library deletion - + There are no libraries - nothing to delete. - + Delete Library - + Do you really want to delete Notebooks which represent the library documents? - + Do you really want to forget ' - + ' Notebook? - + Notebook can be forgotten only when viewed. - + Open and view a Notebook to create new Note. - + Edit Note - - + + Please select a Note to edit in the Notebook. - + Find Note by Tags in Notebook @@ -2939,402 +2939,402 @@ Choose new library source: - + Cannot think - either Mind already dreaming or workspace too big - - + + New Workspace Error - + Specified workspace path already exists! - + Failed to create empty workspace! - + ERROR: workspace created, but attempt to copy documentation and/or stencils failed - + Learn Directory or MindForger Workspace - + This is neither valid MindForger/Markdown workspace nor file. - + Thing not found - - + + Find Note by Tags - - - - + + + + Initializing NER and predicting... - - - - + + + + NER - - - - + + + + Memory NER not implemented yet. - + Recognizing named entities... - + Initializing NER and recognizing named entities... - + Initializing (the first run only) NER and predicting... - - + + Named-entity Recognition - + NER predicition finished - + No named entities recognized. - + image - + Given path '%1' doesn't exist - target will not be copied, but link will be created - + Saving pasted image data to file: '%1' - + HTML Note preview flickering can be eliminated by disabling math and diagrams in Preferences menu - + 🔒 Notebook Write Error - + Notebook file is read-only and cannot be written: '%1' - + Home tag toggled/removed - Notebook '%1' is no longer home - - + + Forget Notebook - + Do you really want to deprecate ' - - - + + + Export Error - + Unable to find Notebook to export! - + Import TWiki File - - + + Edit Note with External Editor Error - + External editor command is not configured in preferences (Editor tab). - - + + Edit Note with External Editor - + Running command: '%1' - + Running command: '%1'. Close external editor to return control back to MindForger. - + Delete Note - + Do you really want to delete note ' - + ' along with its child notes? - + Forget Note - + Please select a Note to forget. - - - + + + Extract Note - + Please select a text to extract. - + Failed to extract new Note! - + Please select a Note, edit it and select a text to extract. - - - + + + Clone Note - + Do you want to clone Note ' - + ' including its child notes?'? - + Failed to clone Note! - + Please select a Note to be cloned. - + Moved Note '%1' to be the first child - - - - + + + + Move Note - - - - + + + + Please select a Note to be moved. - + Moved up Note '%1' - + Moved down Note '%1' - + Moved Note '%1' to be the last child - + Promoted Note '%1' - + Promote Note - + Please select a Note to be promoted. - + Demoted Note '%1' - + Demote Note - + Please select a Note to be demoted. - - - + + + Add Library Error - + Library directory doesn't exist! - + Organizer Update Error - + Eisenhower Matrix organizer is built-in and cannot be edited - please create or update a custom organizer. - + Organizer Clone Error - + Eisenhower Matrix organizer is built-in and cannot be cloned - please create or update a custom organizer. - + Forget Organizer - + ' Organizer? - + Delete Organizer - + Eisenhower Matrix is built-in and cannot be deleted - only custom organizers can. - + View Limbo - + Limbo directory with deleted Notebooks is available in the MindForger workspace, not if a Markdown is edited or a directory with markdowns is opened. - + About MindForger @@ -3956,71 +3956,74 @@ Choose new library source: m8r::OrlojPresenter - + Eisenhower Matrix: - + Kanban: - + Organizer: ' - + Selected Organizer not found! - + No Organizer selected! - + + + Selected Notebook not found! - - + + + No Notebook selected! - + Selected Tag not found! - - + + No Tag selected! - + Note '%1' %2 - - + + Note - + Selected Notebook/Note not found! - - + + No Note selected! diff --git a/app/resources/qt/translations/mindforger_nerd_en.ts b/app/resources/qt/translations/mindforger_nerd_en.ts index 7567abc6..b39a40c4 100644 --- a/app/resources/qt/translations/mindforger_nerd_en.ts +++ b/app/resources/qt/translations/mindforger_nerd_en.ts @@ -4,53 +4,53 @@ QObject - + Save Note - + Do you want to save changes? - + Discard changes - + &Discard changes - - + + Autosave - + Do not ask & autosave - + Continue editing - + Continue &editing - + Save - + &Save @@ -60,15 +60,15 @@ - - + + Empty Phrase - - + + Phrase to search/explain/process is empty. @@ -2650,66 +2650,66 @@ Choose new library source: m8r::MainWindowPresenter - + Cannot think - either Mind already dreaming or repository too big - + Cannot start sleeping - please wait until dreaming finishes and then try again - + Learn - + Full-text Search - - - + + + Note - - + + Note not found - + Refactor Note - + Note to be refactored not specified! - + Find Note by Name - - + + New Note - + Failed to create new Note! - + Hyperlink %1 clicked... @@ -2719,195 +2719,195 @@ Choose new library source: - + Autolinked Notebooks and Notes - + Link target not found for relative link %1 - + New Markdown File Error - - - + + + Specified file path already exists! - + Learn Markdown File - + Notebook Full-text Search - + Note Full-text Search - - - - + + + + Notebook - - + + Notebook not found - + Refactored Note to Notebook ' - + Target Notebook not found - + Find Note by Name in Notebook - + Home Notebook not set - use menu 'Notebooks/Make Home' - + File copied to workspace path '%1' - + Edit Notebook - + Please open an Notebook to edit. - - + + Clone Notebook - + Failed to clone Notebook! - + Please open and Notebook to be cloned. - + Notebook '%1' successfully marked as home - + Make Notebook home - + Notebook can be marked as home only when viewed. - + Library already indexed - use 'Update library' action to synchronize documents. - + Unable to index documents on library path - either memory directory doesn't exist or not in MindForger workspace mode. - + Library synchronization - + There are no libraries - nothing to synchronize. - + Library deletion - + There are no libraries - nothing to delete. - + Delete Library - + Do you really want to delete Notebooks which represent the library documents? - + Do you really want to forget ' - + ' Notebook? - + Notebook can be forgotten only when viewed. - + Open and view a Notebook to create new Note. - + Edit Note - - + + Please select a Note to edit in the Notebook. - + Find Note by Tags in Notebook @@ -2923,402 +2923,402 @@ Choose new library source: - + Cannot think - either Mind already dreaming or workspace too big - - + + New Workspace Error - + Specified workspace path already exists! - + Failed to create empty workspace! - + ERROR: workspace created, but attempt to copy documentation and/or stencils failed - + Learn Directory or MindForger Workspace - + This is neither valid MindForger/Markdown workspace nor file. - + Thing not found - - + + Find Note by Tags - - - - + + + + Initializing NER and predicting... - - - - + + + + NER - - - - + + + + Memory NER not implemented yet. - + Recognizing named entities... - + Initializing NER and recognizing named entities... - + Initializing (the first run only) NER and predicting... - - + + Named-entity Recognition - + NER predicition finished - + No named entities recognized. - + image - + Given path '%1' doesn't exist - target will not be copied, but link will be created - + Saving pasted image data to file: '%1' - + HTML Note preview flickering can be eliminated by disabling math and diagrams in Preferences menu - + 🔒 Notebook Write Error - + Notebook file is read-only and cannot be written: '%1' - + Home tag toggled/removed - Notebook '%1' is no longer home - - + + Forget Notebook - + Do you really want to deprecate ' - - - + + + Export Error - + Unable to find Notebook to export! - + Import TWiki File - - + + Edit Note with External Editor Error - + External editor command is not configured in preferences (Editor tab). - - + + Edit Note with External Editor - + Running command: '%1' - + Running command: '%1'. Close external editor to return control back to MindForger. - + Delete Note - + Do you really want to delete note ' - + ' along with its child notes? - + Forget Note - + Please select a Note to forget. - - - + + + Extract Note - + Please select a text to extract. - + Failed to extract new Note! - + Please select a Note, edit it and select a text to extract. - - - + + + Clone Note - + Do you want to clone Note ' - + ' including its child notes?'? - + Failed to clone Note! - + Please select a Note to be cloned. - + Moved Note '%1' to be the first child - - - - + + + + Move Note - - - - + + + + Please select a Note to be moved. - + Moved up Note '%1' - + Moved down Note '%1' - + Moved Note '%1' to be the last child - + Promoted Note '%1' - + Promote Note - + Please select a Note to be promoted. - + Demoted Note '%1' - + Demote Note - + Please select a Note to be demoted. - - - + + + Add Library Error - + Library directory doesn't exist! - + Organizer Update Error - + Eisenhower Matrix organizer is built-in and cannot be edited - please create or update a custom organizer. - + Organizer Clone Error - + Eisenhower Matrix organizer is built-in and cannot be cloned - please create or update a custom organizer. - + Forget Organizer - + ' Organizer? - + Delete Organizer - + Eisenhower Matrix is built-in and cannot be deleted - only custom organizers can. - + View Limbo - + Limbo directory with deleted Notebooks is available in the MindForger workspace, not if a Markdown is edited or a directory with markdowns is opened. - + About MindForger @@ -3940,71 +3940,74 @@ Choose new library source: m8r::OrlojPresenter - + Eisenhower Matrix: - + Kanban: - + Organizer: ' - + Selected Organizer not found! - + No Organizer selected! - + + + Selected Notebook not found! - - + + + No Notebook selected! - + Selected Tag not found! - - + + No Tag selected! - + Note '%1' %2 - - + + Note - + Selected Notebook/Note not found! - - + + No Note selected! diff --git a/app/resources/qt/translations/mindforger_zh_cn.ts b/app/resources/qt/translations/mindforger_zh_cn.ts index 144f4af0..0f4de728 100644 --- a/app/resources/qt/translations/mindforger_zh_cn.ts +++ b/app/resources/qt/translations/mindforger_zh_cn.ts @@ -4,53 +4,53 @@ QObject - + Save Note - + Do you want to save changes? - + Discard changes - + &Discard changes - - + + Autosave - + Do not ask & autosave - + Continue editing - + Continue &editing - + Save - + &Save @@ -60,15 +60,15 @@ - - + + Empty Phrase - - + + Phrase to search/explain/process is empty. @@ -2682,34 +2682,34 @@ Choose new library source: m8r::MainWindowPresenter - + Cannot think - either Mind already dreaming or repository too big - + Hyperlink %1 clicked... - + Link target not found for relative link %1 - + New Markdown File Error - - - + + + Specified file path already exists! - + Cannot start sleeping - please wait until dreaming finishes and then try again @@ -2718,12 +2718,12 @@ Choose new library source: Open Directory or MindForger Repository - + Learn Markdown File Open Markdown File - + Learn Open @@ -2739,54 +2739,54 @@ Choose new library source: - + Autolinked Notebooks and Notes - + Notebook Full-text Search - + Note Full-text Search - + Full-text Search - - - - + + + + Notebook - - + + Notebook not found - + Find Note by Tags in Notebook - - + + Find Note by Tags - - - + + + Note @@ -2796,565 +2796,565 @@ Choose new library source: - + Thing not found - - + + Note not found - + Refactored Note to Notebook ' - + Target Notebook not found - + Refactor Note - + Note to be refactored not specified! - + Find Note by Name in Notebook - + Find Note by Name - - - - + + + + Initializing NER and predicting... - - - - + + + + NER - - - - + + + + Memory NER not implemented yet. - + Recognizing named entities... - + Initializing NER and recognizing named entities... - + Initializing (the first run only) NER and predicting... - - + + Named-entity Recognition - + NER predicition finished - + No named entities recognized. - + image - + Given path '%1' doesn't exist - target will not be copied, but link will be created - + Saving pasted image data to file: '%1' - + HTML Note preview flickering can be eliminated by disabling math and diagrams in Preferences menu - + Edit Notebook - + Please open an Notebook to edit. - - + + New Note - + Failed to create new Note! - - + + Clone Notebook - + Failed to clone Notebook! - + Please open and Notebook to be cloned. - + Home tag toggled/removed - Notebook '%1' is no longer home - + Notebook '%1' successfully marked as home - + Make Notebook home - + Notebook can be marked as home only when viewed. - - + + Forget Notebook Deprecate Notebook - + Library already indexed - use 'Update library' action to synchronize documents. - + Unable to index documents on library path - either memory directory doesn't exist or not in MindForger workspace mode. - + Library synchronization - + There are no libraries - nothing to synchronize. - + Library deletion - + There are no libraries - nothing to delete. - + Delete Library - + Do you really want to delete Notebooks which represent the library documents? - + Do you really want to forget ' - + ' Notebook? - + Cannot think - either Mind already dreaming or workspace too big - - + + New Workspace Error - + Specified workspace path already exists! - + Failed to create empty workspace! - + ERROR: workspace created, but attempt to copy documentation and/or stencils failed - + Learn Directory or MindForger Workspace - + This is neither valid MindForger/Markdown workspace nor file. - + Home Notebook not set - use menu 'Notebooks/Make Home' - + File copied to workspace path '%1' - + 🔒 Notebook Write Error - + Notebook file is read-only and cannot be written: '%1' - + Do you really want to deprecate ' - + Notebook can be forgotten only when viewed. - - - + + + Export Error - + Unable to find Notebook to export! - + Import TWiki File - + Open and view a Notebook to create new Note. - + Edit Note - - + + Please select a Note to edit in the Notebook. - - + + Edit Note with External Editor Error - + External editor command is not configured in preferences (Editor tab). - - + + Edit Note with External Editor - + Running command: '%1' - + Running command: '%1'. Close external editor to return control back to MindForger. - + Delete Note - + Do you really want to delete note ' - + ' along with its child notes? - + Forget Note Delete Note - + Please select a Note to forget. Please select a Note to delete. - - - + + + Extract Note - + Please select a text to extract. - + Failed to extract new Note! - + Please select a Note, edit it and select a text to extract. - - - + + + Clone Note - + Do you want to clone Note ' - + ' including its child notes?'? - + Failed to clone Note! - + Please select a Note to be cloned. - + Moved Note '%1' to be the first child - - - - + + + + Move Note - - - - + + + + Please select a Note to be moved. - + Moved up Note '%1' - + Moved down Note '%1' - + Moved Note '%1' to be the last child - + Promoted Note '%1' - + Promote Note - + Please select a Note to be promoted. - + Demoted Note '%1' - + Demote Note - + Please select a Note to be demoted. - - - + + + Add Library Error - + Library directory doesn't exist! - + Organizer Update Error - + Eisenhower Matrix organizer is built-in and cannot be edited - please create or update a custom organizer. - + Organizer Clone Error - + Eisenhower Matrix organizer is built-in and cannot be cloned - please create or update a custom organizer. - + Forget Organizer - + ' Organizer? - + Delete Organizer - + Eisenhower Matrix is built-in and cannot be deleted - only custom organizers can. - + View Limbo - + Limbo directory with deleted Notebooks is available in the MindForger workspace, not if a Markdown is edited or a directory with markdowns is opened. - + About MindForger @@ -3976,71 +3976,74 @@ Choose new library source: m8r::OrlojPresenter - + Eisenhower Matrix: - + Kanban: - + Organizer: ' - + Selected Organizer not found! - + No Organizer selected! - + + + Selected Notebook not found! - - + + + No Notebook selected! - + Selected Tag not found! - - + + No Tag selected! - + Note '%1' %2 - - + + Note - + Selected Notebook/Note not found! - - + + No Note selected! diff --git a/app/src/qt/cli_n_breadcrumbs_view.cpp b/app/src/qt/cli_n_breadcrumbs_view.cpp index 43b3b7df..087a5c7e 100644 --- a/app/src/qt/cli_n_breadcrumbs_view.cpp +++ b/app/src/qt/cli_n_breadcrumbs_view.cpp @@ -131,7 +131,7 @@ CliAndBreadcrumbsView::CliAndBreadcrumbsView(QWidget* parent, bool zenMode) cliCompleter->setCaseSensitivity(Qt::CaseSensitivity::CaseInsensitive); cliCompleter->setCompletionMode(QCompleter::PopupCompletion); cli->setCompleter(cliCompleter); - cli->setText("Use \"? ...\" to chat (Alt-x), \"> ...\" for commands (Ctrl-/), or type a phrase to search."); + cli->setText("Enter a prompt - \"? .\" for help, \"/ .\" to chat (Alt-x), \"> .\" run command (Ctrl-/), or type a phrase to find."); layout->addWidget(cli); showBreadcrumb(); diff --git a/app/src/qt/dialogs/configuration_dialog.cpp b/app/src/qt/dialogs/configuration_dialog.cpp index 3b8a1b6a..be1e4602 100644 --- a/app/src/qt/dialogs/configuration_dialog.cpp +++ b/app/src/qt/dialogs/configuration_dialog.cpp @@ -123,6 +123,7 @@ ConfigurationDialog::AppTab::AppTab(QWidget *parent) startupCombo->addItem(QString{START_TO_DASHBOARD}); #endif startupCombo->addItem(QString{START_TO_OUTLINES}); + startupCombo->addItem(QString{START_TO_OUTLINES_TREE}); startupCombo->addItem(QString{START_TO_TAGS}); startupCombo->addItem(QString{START_TO_RECENT}); #ifdef MF_BUG diff --git a/app/src/qt/main_menu_presenter.cpp b/app/src/qt/main_menu_presenter.cpp index 292fdafd..800d579c 100644 --- a/app/src/qt/main_menu_presenter.cpp +++ b/app/src/qt/main_menu_presenter.cpp @@ -170,6 +170,24 @@ MainMenuPresenter::MainMenuPresenter(MainWindowPresenter* mwp) QObject::connect( view->actionOutlineClone, SIGNAL(triggered()), mwp, SLOT(doActionOutlineClone())); + QObject::connect( + view->actionOutlinePromote, SIGNAL(triggered()), + mwp, SLOT(doActionNotePromote())); + QObject::connect( + view->actionOutlineDemote, SIGNAL(triggered()), + mwp, SLOT(doActionNoteDemote())); + QObject::connect( + view->actionOutlineFirst, SIGNAL(triggered()), + mwp, SLOT(doActionNoteFirst())); + QObject::connect( + view->actionOutlineUp, SIGNAL(triggered()), + mwp, SLOT(doActionNoteUp())); + QObject::connect( + view->actionOutlineDown, SIGNAL(triggered()), + mwp, SLOT(doActionNoteDown())); + QObject::connect( + view->actionOutlineLast, SIGNAL(triggered()), + mwp, SLOT(doActionNoteLast())); QObject::connect( view->actionOutlineHtmlExport, SIGNAL(triggered()), mwp, SLOT(doActionOutlineHtmlExport())); @@ -325,17 +343,26 @@ MainMenuPresenter::~MainMenuPresenter() void MainMenuPresenter::showFacetDashboard() { - view->showFacetOutlineList(config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY); + view->showFacetOutlineList( + config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY, + config.getActiveRepository()->getType()==Repository::RepositoryType::MINDFORGER + ); } void MainMenuPresenter::showFacetOrganizerList() { - view->showFacetOrganizerList(config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY); + view->showFacetOrganizerList( + config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY, + config.getActiveRepository()->getType()==Repository::RepositoryType::MINDFORGER + ); } void MainMenuPresenter::showFacetOrganizer() { - view->showFacetOrganizerView(config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY); + view->showFacetOrganizerView( + config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY, + config.getActiveRepository()->getType()==Repository::RepositoryType::MINDFORGER + ); } void MainMenuPresenter::showFacetNavigator() @@ -343,19 +370,36 @@ void MainMenuPresenter::showFacetNavigator() view->showFacetNavigator(); } +void MainMenuPresenter::showFacetOutlinesMap() +{ + view->showFacetOutlinesMap( + config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY, + config.getActiveRepository()->getType()==Repository::RepositoryType::MINDFORGER + ); +} + void MainMenuPresenter::showFacetOutlineList() { - view->showFacetOutlineList(config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY); + view->showFacetOutlineList( + config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY, + config.getActiveRepository()->getType()==Repository::RepositoryType::MINDFORGER + ); } void MainMenuPresenter::showFacetOutlineView() { - view->showFacetOutlineView(config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY); + view->showFacetOutlineView( + config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY, + config.getActiveRepository()->getType()==Repository::RepositoryType::MINDFORGER + ); } void MainMenuPresenter::showFacetNoteEdit() { - view->showFacetNoteEdit(config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY); + view->showFacetNoteEdit( + config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY, + config.getActiveRepository()->getType()==Repository::RepositoryType::MINDFORGER + ); } void MainMenuPresenter::showFacetMindThink() diff --git a/app/src/qt/main_menu_presenter.h b/app/src/qt/main_menu_presenter.h index 8a96c74d..7702b779 100644 --- a/app/src/qt/main_menu_presenter.h +++ b/app/src/qt/main_menu_presenter.h @@ -60,6 +60,7 @@ class MainMenuPresenter : public QObject void showFacetOrganizer(); void showFacetNavigator(); + void showFacetOutlinesMap(); void showFacetOutlineList(); void showFacetOutlineView(); void showFacetNoteEdit(); diff --git a/app/src/qt/main_menu_view.cpp b/app/src/qt/main_menu_view.cpp index 078a3ccc..cc0f7327 100644 --- a/app/src/qt/main_menu_view.cpp +++ b/app/src/qt/main_menu_view.cpp @@ -220,7 +220,7 @@ MainMenuView::MainMenuView(MainWindowView& mainWindowView) menuFind->addAction(actionFindOutlineByName); menuFind->addAction(actionFindNoteByName); menuFind->addAction(actionFindOutlineByTag); - menuFind->addAction(actionFindNoteByTag); + menuFind->addAction(actionFindNoteByTag); #ifdef MF_WIP menuFind->addAction(actionFindDocByName); #endif @@ -253,15 +253,15 @@ MainMenuView::MainMenuView(MainWindowView& mainWindowView) actionViewOutlines->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_O)); actionViewOutlines->setStatusTip(tr("Show list of Notebooks...")); -#ifdef MF_WIP actionViewOutlinesMap = new QAction(QIcon(":/menu-icons/dashboard.svg"), tr("Note&books Tree"), mainWindow); actionViewOutlinesMap->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_T)); actionViewOutlinesMap->setStatusTip(tr("Show tree of Notebooks...")); -#endif +#ifdef MF_WIP actionViewLibraryDocs = new QAction(QIcon(":/menu-icons/copy.svg"), tr("&Library Documents"), mainWindow); actionViewLibraryDocs->setStatusTip(tr("List Library documents...")); //actionViewLibraryDocs->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_)); +#endif actionViewTags = new QAction(QIcon(":/menu-icons/tag.svg"), tr("&Tags"), mainWindow); actionViewTags->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_G)); @@ -335,9 +335,9 @@ MainMenuView::MainMenuView(MainWindowView& mainWindowView) menuView->addAction(actionViewDecks); #endif menuView->addAction(actionViewOrganizers); + menuView->addAction(actionViewOutlinesMap); menuView->addAction(actionViewOutlines); #ifdef MF_WIP - menuView->addAction(actionViewOutlinesMap); menuView->addAction(actionViewLibraryDocs); #endif menuView->addAction(actionViewTags); @@ -537,7 +537,7 @@ MainMenuView::MainMenuView(MainWindowView& mainWindowView) actionOutlineStencil->setStatusTip(tr("Copy the current Notebook as to Stencil")); actionOutlineStencil->setEnabled(false); - actionOutlineClone = new QAction(QIcon(":/menu-icons/copy.svg"), tr("C&lone"), mainWindow); + actionOutlineClone = new QAction(QIcon(":/menu-icons/copy.svg"), tr("&Clone"), mainWindow); actionOutlineClone->setStatusTip(tr("Make copy of the current Notebook")); actionOutlineArtExamine= new QAction(QIcon(":/menu-icons/on.svg"), tr("E&xamine"), mainWindow); @@ -546,6 +546,29 @@ MainMenuView::MainMenuView(MainWindowView& mainWindowView) actionOutlineForget = new QAction(QIcon(":/menu-icons/delete.svg"), tr("&Forget"), mainWindow); actionOutlineForget->setStatusTip(tr("Forget Notebook and move it to Limbo")); + actionOutlinePromote = new QAction(QIcon(":/menu-icons/left.svg"), tr("&Promote"), mainWindow); + actionOutlinePromote->setStatusTip(tr("Promote Notebook")); + + actionOutlineDemote = new QAction(QIcon(":/menu-icons/right.svg"), tr("De&mote"), mainWindow); + actionOutlineDemote->setStatusTip(tr("Demote Notebook")); + + actionOutlineFirst = new QAction( + QIcon(":/menu-icons/top.svg"), tr("Move to &First"), + mainWindow); + actionOutlineFirst->setStatusTip(tr("Move the Notebook to be the first child of its parent")); + + actionOutlineUp = new QAction( + QIcon(":/menu-icons/up.svg"), tr("Move &Up"), mainWindow); + actionOutlineUp->setStatusTip(tr("Move the Notebook up")); + + actionOutlineDown = new QAction( + QIcon(":/menu-icons/down.svg"), tr("Move Do&wn"), mainWindow); + actionOutlineDown->setStatusTip(tr("Move the Notebook down")); + + actionOutlineLast = new QAction( + QIcon(":/menu-icons/bottom.svg"), tr("Move to &Last"), mainWindow); + actionOutlineLast->setStatusTip(tr("Move the Notebook to be the last child of its parent")); + submenuOutlineExport = menuOutline->addMenu(QIcon(":/menu-icons/export.svg"), "E&xport"); actionOutlineHtmlExport = new QAction(tr("&HTML"), mainWindow); actionOutlineHtmlExport->setStatusTip(tr("Export Notebook to a file in HTML format")); @@ -562,11 +585,19 @@ MainMenuView::MainMenuView(MainWindowView& mainWindowView) menuOutline->addAction(actionOutlineEdit); menuOutline->addAction(actionOutlineForget); menuOutline->addSeparator(); + menuOutline->addAction(actionOutlinePromote); + menuOutline->addAction(actionOutlineDemote); + menuOutline->addSeparator(); + menuOutline->addAction(actionOutlineFirst); + menuOutline->addAction(actionOutlineUp); + menuOutline->addAction(actionOutlineDown); + menuOutline->addAction(actionOutlineLast); + menuOutline->addSeparator(); menuOutline->addAction(actionOutlineHome); #ifdef MF_WIP menuOutline->addAction(actionOutlineStencil); #endif - menuOutline->addAction(actionOutlineClone); + menuOutline->addAction(actionOutlineClone); menuOutline->addSeparator(); #ifdef MF_WIP menuOutline->addAction(actionOutlineArtExamine); @@ -1031,6 +1062,7 @@ void MainMenuView::showAllMenuItems() { menuMind->setEnabled(true); // autolink: leave as is - it's not that simple as it's status, not just action + actionMindScope->setEnabled(true); actionExit->setEnabled(true); menuFind->setEnabled(true); @@ -1039,22 +1071,28 @@ void MainMenuView::showAllMenuItems() actionFindOutlineByTag->setEnabled(true); actionFindNoteByName->setEnabled(true); actionFindNoteByTag->setEnabled(true); +#ifdef MF_WIP + actionFindDocByName->setEnabled(true); +#endif menuView->setEnabled(true); actionViewDashboard->setEnabled(true); actionViewHome->setEnabled(true); actionViewOrganizers->setEnabled(true); + actionViewOutlinesMap->setEnabled(true); actionViewOutlines->setEnabled(true); actionViewTags->setEnabled(true); actionViewNavigator->setEnabled(true); +#ifdef MF_WIP + actionViewLibraryDocs->setEnabled(true); + actionViewDecks->setEnabled(true); +#endif actionViewLimbo->setEnabled(true); actionViewRecentNotes->setEnabled(true); -#ifdef MF_WIP menuLibrary->setEnabled(true); actionLibraryAdd->setEnabled(true); actionLibraryDeprecate->setEnabled(true); -#endif #ifdef MF_WIP menuFlashcards->setEnabled(true); @@ -1078,6 +1116,20 @@ void MainMenuView::showAllMenuItems() actionOutlineForget->setEnabled(true); menuOutline->setEnabled(true); + actionOutlineEdit->setEnabled(true); + actionOutlineClone->setEnabled(true); + actionOutlineHome->setEnabled(true); + actionOutlineForget->setEnabled(true); + actionOutlineUp->setEnabled(true); + actionOutlineDown->setEnabled(true); + actionOutlineFirst->setEnabled(true); + actionOutlineLast->setEnabled(true); + actionOutlinePromote->setEnabled(true); + actionOutlineDemote->setEnabled(true); + actionOutlineHome->setEnabled(true); +#ifdef MF_WIP + actionOutlineArtExamine->setEnabled(true); +#endif submenuOutlineExport->setEnabled(true); menuNote->setEnabled(true); @@ -1098,7 +1150,56 @@ void MainMenuView::showAllMenuItems() mainWindow->getToolBar()->setEnabled(true); } -void MainMenuView::showFacetOrganizerList(bool repositoryMode) +void MainMenuView::showModeAwareFacet(bool repositoryMode, bool mfMode) +{ + if(!repositoryMode) { + menuView->setEnabled(false); + menuLibrary->setEnabled(false); + menuOutline->setEnabled(false); + menuEdit->setEnabled(false); + menuFormat->setEnabled(false); + + actionMindScope->setEnabled(false); + + actionFindOutlineByName->setEnabled(false); + actionFindOutlineByTag->setEnabled(false); + } + if(!mfMode) { + menuLibrary->setEnabled(false); +#ifdef MF_WIP + menuFlashcards->setEnabled(false); +#endif + + actionMindScope->setEnabled(false); + + actionViewHome->setEnabled(false); + actionViewOrganizers->setEnabled(false); + actionViewOutlinesMap->setEnabled(false); +#ifdef MF_WIP + actionViewLibraryDocs->setEnabled(false); +#endif + actionViewTags->setEnabled(false); + actionViewLimbo->setEnabled(false); +#ifdef MF_WIP + actionViewDashboard->setEnabled(false); + actionViewDecks->setEnabled(false); +#endif + + actionFindOutlineByTag->setEnabled(false); + actionFindNoteByTag->setEnabled(false); +#ifdef MF_WIP + actionFindDocByName->setEnabled(false); +#endif + + actionOutlineHome->setEnabled(false); +#ifdef MF_WIP + actionOutlineArtExamine->setEnabled(false); +#endif + } +} + + +void MainMenuView::showFacetOrganizerList(bool repositoryMode, bool mfMode) { showAllMenuItems(); @@ -1111,25 +1212,17 @@ void MainMenuView::showFacetOrganizerList(bool repositoryMode) actionOrganizerMoveNext->setEnabled(false); menuNavigator->setEnabled(false); -#ifdef MF_WIP menuLibrary->setEnabled(false); -#endif menuOutline->setEnabled(false); menuNote->setEnabled(false); menuEdit->setEnabled(false); menuFormat->setEnabled(false); submenuOutlineExport->setEnabled(false); - if(!repositoryMode) { - menuView->setEnabled(false); - menuFormat->setEnabled(false); - - actionFindOutlineByName->setEnabled(false); - actionFindOutlineByTag->setEnabled(false); - } + showModeAwareFacet(repositoryMode, mfMode); } -void MainMenuView::showFacetOrganizerView(bool repositoryMode) +void MainMenuView::showFacetOrganizerView(bool repositoryMode, bool mfMode) { showAllMenuItems(); @@ -1143,23 +1236,37 @@ void MainMenuView::showFacetOrganizerView(bool repositoryMode) menuFormat->setEnabled(false); submenuOutlineExport->setEnabled(false); - if(!repositoryMode) { - menuView->setEnabled(false); - menuFormat->setEnabled(false); - - actionFindOutlineByName->setEnabled(false); - actionFindOutlineByTag->setEnabled(false); - } + showModeAwareFacet(repositoryMode, mfMode); } -void MainMenuView::showFacetOutlineList(bool repositoryMode) +void MainMenuView::showFacetOutlineList(bool repositoryMode, bool mfMode) { showAllMenuItems(); + menuNavigator->setEnabled(false); + menuOrganizer->setEnabled(false); + menuEdit->setEnabled(false); + menuFormat->setEnabled(false); + menuNote->setEnabled(false); + submenuOutlineExport->setEnabled(false); + actionOutlineEdit->setEnabled(false); actionOutlineClone->setEnabled(false); actionOutlineHome->setEnabled(false); actionOutlineForget->setEnabled(false); + actionOutlineUp->setEnabled(false); + actionOutlineDown->setEnabled(false); + actionOutlineFirst->setEnabled(false); + actionOutlineLast->setEnabled(false); + actionOutlinePromote->setEnabled(false); + actionOutlineDemote->setEnabled(false); + + showModeAwareFacet(repositoryMode, mfMode); +} + +void MainMenuView::showFacetOutlinesMap(bool repositoryMode, bool mfMode) +{ + showAllMenuItems(); menuNavigator->setEnabled(false); menuOrganizer->setEnabled(false); @@ -1168,18 +1275,10 @@ void MainMenuView::showFacetOutlineList(bool repositoryMode) menuNote->setEnabled(false); submenuOutlineExport->setEnabled(false); - if(!repositoryMode) { - menuView->setEnabled(false); - menuOutline->setEnabled(false); - menuEdit->setEnabled(false); - menuFormat->setEnabled(false); - - actionFindOutlineByName->setEnabled(false); - actionFindOutlineByTag->setEnabled(false); - } + showModeAwareFacet(repositoryMode, mfMode); } -void MainMenuView::showFacetOutlineView(bool repositoryMode) +void MainMenuView::showFacetOutlineView(bool repositoryMode, bool mfMode) { showAllMenuItems(); @@ -1191,18 +1290,17 @@ void MainMenuView::showFacetOutlineView(bool repositoryMode) menuEdit->setEnabled(false); menuFormat->setEnabled(false); - if(!repositoryMode) { - menuView->setEnabled(false); - menuOutline->setEnabled(false); - menuEdit->setEnabled(false); - menuFormat->setEnabled(false); + actionOutlineUp->setEnabled(false); + actionOutlineDown->setEnabled(false); + actionOutlineFirst->setEnabled(false); + actionOutlineLast->setEnabled(false); + actionOutlinePromote->setEnabled(false); + actionOutlineDemote->setEnabled(false); - actionFindOutlineByName->setEnabled(false); - actionFindOutlineByTag->setEnabled(false); - } + showModeAwareFacet(repositoryMode, mfMode); } -void MainMenuView::showFacetNoteEdit(bool repositoryMode) +void MainMenuView::showFacetNoteEdit(bool repositoryMode, bool mfMode) { showAllMenuItems(); @@ -1259,13 +1357,7 @@ void MainMenuView::showFacetNoteEdit(bool repositoryMode) mainWindow->getToolBar()->setEnabled(false); - if(!repositoryMode) { - menuView->setEnabled(false); - menuOutline->setEnabled(false); - - actionFindOutlineByName->setEnabled(false); - actionFindOutlineByTag->setEnabled(false); - } + showModeAwareFacet(repositoryMode, mfMode); } void MainMenuView::showFacetMindThink() diff --git a/app/src/qt/main_menu_view.h b/app/src/qt/main_menu_view.h index b0db240d..075e926b 100644 --- a/app/src/qt/main_menu_view.h +++ b/app/src/qt/main_menu_view.h @@ -111,10 +111,10 @@ class MainMenuView : public QObject QAction* actionViewDecks; QAction* actionViewOrganizers; QAction* actionViewOutlines; -#ifdef MF_WIP QAction* actionViewOutlinesMap; -#endif +#ifdef MF_WIP QAction* actionViewLibraryDocs; +#endif QAction* actionViewTags; QAction* actionViewNavigator; QAction* actionViewDwell; @@ -160,6 +160,12 @@ class MainMenuView : public QObject QAction* actionOutlineClone; QAction* actionOutlineArtExamine; QAction* actionOutlineForget; + QAction* actionOutlinePromote; + QAction* actionOutlineDemote; + QAction* actionOutlineFirst; + QAction* actionOutlineUp; + QAction* actionOutlineDown; + QAction* actionOutlineLast; QMenu* submenuOutlineExport; QAction* actionOutlineHtmlExport; QMenu* submenuOutlineImport; @@ -269,6 +275,8 @@ class MainMenuView : public QObject QAction* actionHelpAboutQt; QAction* actionHelpAbout; + void showModeAwareFacet(bool repositoryMode, bool mfMode); + public: MainMenuView(MainWindowView& mainWindow); MainMenuView(const MainMenuView&) = delete; @@ -277,11 +285,12 @@ class MainMenuView : public QObject MainMenuView &operator=(const MainMenuView&&) = delete; virtual ~MainMenuView(); - void showFacetOrganizerList(bool repositoryMode=true); - void showFacetOrganizerView(bool repositoryMode=true); - void showFacetOutlineList(bool repositoryMode=true); - void showFacetOutlineView(bool repositoryMode=true); - void showFacetNoteEdit(bool repositoryMode=true); + void showFacetOrganizerList(bool repositoryMode=true, bool mfMode=true); + void showFacetOrganizerView(bool repositoryMode=true, bool mfMode=true); + void showFacetOutlinesMap(bool repositoryMode=true, bool mfMode=true); + void showFacetOutlineList(bool repositoryMode=true, bool mfMode=true); + void showFacetOutlineView(bool repositoryMode=true, bool mfMode=true); + void showFacetNoteEdit(bool repositoryMode=true, bool mfMode=true); void showFacetMindThink(); void showFacetMindSleep(); diff --git a/app/src/qt/main_window_presenter.cpp b/app/src/qt/main_window_presenter.cpp index 80bc765d..3a51f8bc 100644 --- a/app/src/qt/main_window_presenter.cpp +++ b/app/src/qt/main_window_presenter.cpp @@ -171,7 +171,7 @@ MainWindowPresenter::MainWindowPresenter(MainWindowView& view) this, SLOT(doActionEditPasteImageData(QImage)) ); // wire LEFT toolbar signals - /* + /* QObject::connect( new QShortcut(QKeySequence("Alt+1"), view.getOrloj()), SIGNAL(activated()), this, SLOT(doActionArxivToolbar()) @@ -240,7 +240,7 @@ MainWindowPresenter::MainWindowPresenter(MainWindowView& view) new QShortcut(QKeySequence("Alt+9"), view.getOrloj()), SIGNAL(activated()), this, SLOT(doActionCppToolbar()) ); - */ + */ // wire TOP toolbar signals QObject::connect( view.getToolBar()->actionNewOutlineOrNote, SIGNAL(triggered()), @@ -355,6 +355,8 @@ void MainWindowPresenter::showInitialView() orloj->showFacetDashboard(); } else if(!string{START_TO_OUTLINES}.compare(config.getStartupView())) { orloj->showFacetOutlineList(mind->getOutlines()); + } else if(!string{START_TO_OUTLINES_TREE}.compare(config.getStartupView())) { + orloj->showFacetOutlinesMap(mind->outlinesMapGet()); } else if(!string{START_TO_TAGS}.compare(config.getStartupView())) { orloj->showFacetTagCloud(); } else if(!string{START_TO_RECENT}.compare(config.getStartupView())) { @@ -1010,7 +1012,7 @@ void MainWindowPresenter::doActionFindNoteByTag() void MainWindowPresenter::doTriggerFindNoteByTag(const Tag* tag) { findNoteByTagDialog->setWindowTitle(tr("Find Note by Tags")); - findNoteByTagDialog->clearScope(); + findNoteByTagDialog->clearScope(); vector allNotes{}; mind->getAllNotes(allNotes); vector tags{}; @@ -1356,16 +1358,13 @@ void MainWindowPresenter::doActionViewOutlines() } } - void MainWindowPresenter::doActionViewOutlinesMap() { if(config.getActiveRepository()->getType()==Repository::RepositoryType::MINDFORGER && config.getActiveRepository()->getMode()==Repository::RepositoryMode::REPOSITORY) { - orloj->showFacetOutlinesMap( - mind->outlinesMapGet() - ); + orloj->showFacetOutlinesMap(mind->outlinesMapGet()); } } @@ -2262,7 +2261,7 @@ void MainWindowPresenter::doActionOutlineOrNoteNew() orloj->isFacetActive(OrlojPresenterFacets::FACET_VIEW_NOTE) || orloj->isFacetActive(OrlojPresenterFacets::FACET_VIEW_OUTLINE)) - { + { doActionNoteNew(); } else { doActionOutlineNew(); @@ -2346,7 +2345,7 @@ bool MainWindowPresenter::withWriteableOutline(const std::string& outlineKey) } void MainWindowPresenter::handleNoteNew() -{ +{ int offset = orloj->getOutlineView()->getOutlineTree()->getCurrentRow(); if(offset == OutlineTreePresenter::NO_ROW) { @@ -2951,20 +2950,63 @@ void MainWindowPresenter::doActionNoteClone() } } +void MainWindowPresenter::doActionOutlineShow() +{ + orloj->showFacetOutline(orloj->getOutlineView()->getCurrentOutline()); +} + +void MainWindowPresenter::selectNoteInOutlineTree(Note* note, Outline::Patch& patch, bool onUp) +{ + QModelIndex idx; + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + QModelIndex idx; + if(onUp) { + idx = orloj->getOutlinesMap()->getModel()->index(patch.start, 0); + } else { + idx = orloj->getOutlinesMap()->getModel()->index(note->getOutline()->getNoteOffset(note), 0); + } + + orloj->getOutlinesMap()->getView()->setCurrentIndex(idx); + } else { + QModelIndex idx; + if(onUp) { + idx = orloj->getOutlineView()->getOutlineTree()->getView()->model()->index(patch.start, 0); + } else { + idx = orloj->getOutlineView()->getOutlineTree()->getView()->model()->index(note->getOutline()->getNoteOffset(note), 0); + } + orloj->getOutlineView()->getOutlineTree()->getView()->setCurrentIndex(idx); + } +} + void MainWindowPresenter::doActionNoteFirst() { - Note* note = orloj->getOutlineView()->getOutlineTree()->getCurrentNote(); + Note* note{}; + + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + note = orloj->getOutlinesMap()->getCurrentNote(); + } else { + note = orloj->getOutlineView()->getOutlineTree()->getCurrentNote(); + } + if(note && withWriteableOutline(note->getOutline()->getKey())) { // IMPROVE consider patch once in class (cross functions) Outline::Patch patch{Outline::Patch::Diff::NO,0,0}; // explicit initialization required by older GCC versions mind->noteFirst(note, &patch); if(patch.diff != Outline::Patch::Diff::NO) { - mind->remind().remember(note->getOutline()); - orloj->getOutlineView()->getOutlineTree()->refresh(note->getOutline(), &patch); + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + mind->outlinesMapRemember(); + } else { + mind->remind().remember(note->getOutline()); + } + + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + orloj->getOutlinesMap()->refresh(note->getOutline(), &patch); + } else { + orloj->getOutlineView()->getOutlineTree()->refresh(note->getOutline(), &patch); + } + // select Note in the tree - QModelIndex idx - = orloj->getOutlineView()->getOutlineTree()->getView()->model()->index(patch.start, 0); - orloj->getOutlineView()->getOutlineTree()->getView()->setCurrentIndex(idx); + this->selectNoteInOutlineTree(note, patch, true); statusBar->showInfo(QString(tr("Moved Note '%1' to be the first child")).arg(note->getName().c_str())); } } else { @@ -2974,18 +3016,33 @@ void MainWindowPresenter::doActionNoteFirst() void MainWindowPresenter::doActionNoteUp() { - Note* note = orloj->getOutlineView()->getOutlineTree()->getCurrentNote(); + Note* note{}; + + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + note = orloj->getOutlinesMap()->getCurrentNote(); + } else { + note = orloj->getOutlineView()->getOutlineTree()->getCurrentNote(); + } + if(note && withWriteableOutline(note->getOutline()->getKey())) { // IMPROVE consider patch once in class (cross functions) Outline::Patch patch{Outline::Patch::Diff::NO,0,0}; // explicit initialization required by older GCC versions mind->noteUp(note, &patch); if(patch.diff != Outline::Patch::Diff::NO) { - mind->remind().remember(note->getOutline()); - orloj->getOutlineView()->getOutlineTree()->refresh(note->getOutline(), &patch); + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + mind->outlinesMapRemember(); + } else { + mind->remind().remember(note->getOutline()); + } + + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + orloj->getOutlinesMap()->refresh(note->getOutline(), &patch); + } else { + orloj->getOutlineView()->getOutlineTree()->refresh(note->getOutline(), &patch); + } + // select Note in the tree - QModelIndex idx - = orloj->getOutlineView()->getOutlineTree()->getView()->model()->index(patch.start, 0); - orloj->getOutlineView()->getOutlineTree()->getView()->setCurrentIndex(idx); + this->selectNoteInOutlineTree(note, patch, true); statusBar->showInfo(QString(tr("Moved up Note '%1'")).arg(note->getName().c_str())); } } else { @@ -2995,18 +3052,33 @@ void MainWindowPresenter::doActionNoteUp() void MainWindowPresenter::doActionNoteDown() { - Note* note = orloj->getOutlineView()->getOutlineTree()->getCurrentNote(); + Note* note{}; + + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + note = orloj->getOutlinesMap()->getCurrentNote(); + } else { + note = orloj->getOutlineView()->getOutlineTree()->getCurrentNote(); + } + if(note && withWriteableOutline(note->getOutline()->getKey())) { // IMPROVE consider patch once in class (cross functions) Outline::Patch patch{Outline::Patch::Diff::NO,0,0}; // explicit initialization required by older GCC versions mind->noteDown(note, &patch); if(patch.diff != Outline::Patch::Diff::NO) { - mind->remind().remember(note->getOutline()); - orloj->getOutlineView()->getOutlineTree()->refresh(note->getOutline(), &patch); + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + mind->outlinesMapRemember(); + } else { + mind->remind().remember(note->getOutline()); + } + + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + orloj->getOutlinesMap()->refresh(note->getOutline(), &patch); + } else { + orloj->getOutlineView()->getOutlineTree()->refresh(note->getOutline(), &patch); + } + // select Note in the tree - QModelIndex idx - = orloj->getOutlineView()->getOutlineTree()->getView()->model()->index(note->getOutline()->getNoteOffset(note), 0); - orloj->getOutlineView()->getOutlineTree()->getView()->setCurrentIndex(idx); + this->selectNoteInOutlineTree(note, patch, false); statusBar->showInfo(QString(tr("Moved down Note '%1'").arg(note->getName().c_str()))); } } else { @@ -3016,18 +3088,33 @@ void MainWindowPresenter::doActionNoteDown() void MainWindowPresenter::doActionNoteLast() { - Note* note = orloj->getOutlineView()->getOutlineTree()->getCurrentNote(); + Note* note{}; + + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + note = orloj->getOutlinesMap()->getCurrentNote(); + } else { + note = orloj->getOutlineView()->getOutlineTree()->getCurrentNote(); + } + if(note && withWriteableOutline(note->getOutline()->getKey())) { // IMPROVE consider patch once in class (cross functions) Outline::Patch patch{Outline::Patch::Diff::NO,0,0}; // explicit initialization required by older GCC versions mind->noteLast(note, &patch); if(patch.diff != Outline::Patch::Diff::NO) { - mind->remind().remember(note->getOutline()); - orloj->getOutlineView()->getOutlineTree()->refresh(note->getOutline(), &patch); + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + mind->outlinesMapRemember(); + } else { + mind->remind().remember(note->getOutline()); + } + + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + orloj->getOutlinesMap()->refresh(note->getOutline(), &patch); + } else { + orloj->getOutlineView()->getOutlineTree()->refresh(note->getOutline(), &patch); + } + // select Note in the tree - QModelIndex idx - = orloj->getOutlineView()->getOutlineTree()->getView()->model()->index(note->getOutline()->getNoteOffset(note), 0); - orloj->getOutlineView()->getOutlineTree()->getView()->setCurrentIndex(idx); + this->selectNoteInOutlineTree(note, patch, false); statusBar->showInfo(QString(tr("Moved Note '%1' to be the last child")).arg(note->getName().c_str())); } } else { @@ -3035,21 +3122,33 @@ void MainWindowPresenter::doActionNoteLast() } } -void MainWindowPresenter::doActionOutlineShow() -{ - orloj->showFacetOutline(orloj->getOutlineView()->getCurrentOutline()); -} - void MainWindowPresenter::doActionNotePromote() { - Note* note = orloj->getOutlineView()->getOutlineTree()->getCurrentNote(); + Note* note{}; + + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + note = orloj->getOutlinesMap()->getCurrentNote(); + } else { + note = orloj->getOutlineView()->getOutlineTree()->getCurrentNote(); + } + if(note && withWriteableOutline(note->getOutline()->getKey())) { // IMPROVE consider patch once in class (cross functions) Outline::Patch patch{Outline::Patch::Diff::NO,0,0}; // explicit initialization required by older GCC versions mind->notePromote(note, &patch); if(patch.diff != Outline::Patch::Diff::NO) { - mind->remind().remember(note->getOutline()); - orloj->getOutlineView()->getOutlineTree()->refresh(note->getOutline(), &patch); + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + mind->outlinesMapRemember(); + } else { + mind->remind().remember(note->getOutline()); + } + + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + orloj->getOutlinesMap()->refresh(note->getOutline(), &patch); + } else { + orloj->getOutlineView()->getOutlineTree()->refresh(note->getOutline(), &patch); + } + statusBar->showInfo(QString(tr("Promoted Note '%1'")).arg(note->getName().c_str())); } } else { @@ -3059,14 +3158,31 @@ void MainWindowPresenter::doActionNotePromote() void MainWindowPresenter::doActionNoteDemote() { - Note* note = orloj->getOutlineView()->getOutlineTree()->getCurrentNote(); + Note* note{}; + + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + note = orloj->getOutlinesMap()->getCurrentNote(); + } else { + note = orloj->getOutlineView()->getOutlineTree()->getCurrentNote(); + } + if(note && withWriteableOutline(note->getOutline()->getKey())) { // IMPROVE consider patch once in class (cross functions) Outline::Patch patch{Outline::Patch::Diff::NO,0,0}; // explicit initialization required by older GCC versions mind->noteDemote(note, &patch); - mind->remind().remember(note->getOutline()); - orloj->getOutlineView()->getOutlineTree()->refresh(note->getOutline(), &patch); if(patch.diff != Outline::Patch::Diff::NO) { + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + mind->outlinesMapRemember(); + } else { + mind->remind().remember(note->getOutline()); + } + + if(orloj->isFacetActive(OrlojPresenterFacets::FACET_MAP_OUTLINES)) { + orloj->getOutlinesMap()->refresh(note->getOutline(), &patch); + } else { + orloj->getOutlineView()->getOutlineTree()->refresh(note->getOutline(), &patch); + } + statusBar->showInfo(QString(tr("Demoted Note '%1'")).arg(note->getName().c_str())); } } else { @@ -3431,7 +3547,7 @@ void MainWindowPresenter::handleCreateOrganizer() // add organizer & save configuration if(!newOrganizerDialog->getOrganizerToEdit()) { - config.getRepositoryConfiguration().addOrganizer(o); + config.getRepositoryConfiguration().addOrganizer(o); } sortAndSaveOrganizersConfig(); diff --git a/app/src/qt/main_window_presenter.h b/app/src/qt/main_window_presenter.h index 33932fd4..bfad20c9 100644 --- a/app/src/qt/main_window_presenter.h +++ b/app/src/qt/main_window_presenter.h @@ -348,6 +348,7 @@ public slots: void doActionOutlineShow(); void doActionNoteEdit(); void doActionNoteExternalEdit(); + void selectNoteInOutlineTree(Note* note, Outline::Patch& patch, bool onUp); void doActionNoteFirst(); void doActionNoteUp(); void doActionNotePromote(); diff --git a/app/src/qt/orloj_presenter.cpp b/app/src/qt/orloj_presenter.cpp index a41b5db4..80222fbc 100644 --- a/app/src/qt/orloj_presenter.cpp +++ b/app/src/qt/orloj_presenter.cpp @@ -74,6 +74,11 @@ OrlojPresenter::OrlojPresenter( SIGNAL(signalShowSelectedOutline()), this, SLOT(slotShowSelectedOutline())); + QObject::connect( + view->getOutlinesMapTable(), + SIGNAL(signalMapShowSelectedOutline()), + this, + SLOT(slotMapShowSelectedOutline())); QObject::connect( view->getOutlinesTable(), SIGNAL(signalFindOutlineByName()), @@ -404,8 +409,18 @@ void OrlojPresenter::showFacetOutlinesMap(Outline* outlinesMap) setFacet(OrlojPresenterFacets::FACET_MAP_OUTLINES); outlinesMapPresenter->refresh(outlinesMap); view->showFacetOutlinesMap(); - mainPresenter->getMainMenu()->showFacetOutlineList(); + mainPresenter->getMainMenu()->showFacetOutlinesMap(); mainPresenter->getStatusBar()->showMindStatistics(); + + // give focus to the component + auto componentView = view->getOutlinesMapTable(); + componentView->setFocus(); + // give focus to the first row in the view + if(componentView->model()->rowCount() > 0) { + componentView->setCurrentIndex( + componentView->model()->index(0, 0) + ); + } } void OrlojPresenter::slotShowOutlines() @@ -505,6 +520,40 @@ void OrlojPresenter::showFacetOutline(Outline* outline) mainPresenter->getStatusBar()->showInfo(QString("Notebook '%1' %2").arg(outline->getName().c_str()).arg(outline->getKey().c_str())); } +void OrlojPresenter::slotMapShowSelectedOutline() +{ + MF_DEBUG(" -> signal HANDLER @ OrlojPresenter: show O " << activeFacet << std::endl); + if(activeFacet == OrlojPresenterFacets::FACET_MAP_OUTLINES){ + int row = outlinesMapPresenter->getCurrentRow(); + MF_DEBUG(" current row: " << row << std::endl); + if(row != OutlinesTablePresenter::NO_ROW) { + QStandardItem* item = outlinesMapPresenter->getModel()->item(row); + MF_DEBUG(" Item: " << item << std::endl); + if(item) { + Note* noteForOutline = item->data(Qt::UserRole + 1).value(); + MF_DEBUG(" N for O: " << noteForOutline << endl); + if(noteForOutline + && noteForOutline->getLinks().size() > 0 + && noteForOutline->getLinks().at(0)->getUrl().size() > 0 + ) { + MF_DEBUG(" Getting O: " << noteForOutline->getLinks().at(0)->getUrl() << endl); + Outline* outline = mind->remind().getOutline(noteForOutline->getLinks().at(0)->getUrl()); + if(outline) { + showFacetOutline(outline); + return; + } else { + mainPresenter->getStatusBar()->showInfo(QString(tr("Selected Notebook not found!"))); + } + } + return; + } else { + mainPresenter->getStatusBar()->showInfo(QString(tr("Selected Notebook not found!"))); + } + } + mainPresenter->getStatusBar()->showInfo(QString(tr("No Notebook selected!"))); + } +} + void OrlojPresenter::slotShowSelectedOutline() { if(activeFacet!=OrlojPresenterFacets::FACET_ORGANIZER diff --git a/app/src/qt/orloj_presenter.h b/app/src/qt/orloj_presenter.h index fa091554..ee4974d7 100644 --- a/app/src/qt/orloj_presenter.h +++ b/app/src/qt/orloj_presenter.h @@ -228,6 +228,7 @@ public slots: void slotShowSelectedOrganizer(); void slotShowOutlines(); void slotShowSelectedOutline(); + void slotMapShowSelectedOutline(); void slotShowOutline(const QItemSelection& selected, const QItemSelection& deselected); void slotShowOutlineHeader(); void slotShowNote(const QItemSelection& selected, const QItemSelection& deselected); diff --git a/app/src/qt/orloj_view.h b/app/src/qt/orloj_view.h index 81b309f1..72c34230 100644 --- a/app/src/qt/orloj_view.h +++ b/app/src/qt/orloj_view.h @@ -93,6 +93,7 @@ class OrlojView : public QSplitter KanbanView* getKanban() const { return kanban; } TagsTableView* getTagCloud() const { return tagCloud; } OutlinesTableView* getOutlinesTable() const { return outlinesTable; } + OutlinesMapView* getOutlinesMapTable() const { return outlinesMap; } OutlinesMapView* getOutlinesMap() const { return outlinesMap; } RecentNotesTableView* getRecentNotesTable() const { return recentNotesTable; } OutlineViewSplitter* getOutlineView() const { return outlineView; } diff --git a/app/src/qt/outlines_map_presenter.cpp b/app/src/qt/outlines_map_presenter.cpp index 741cbe87..1c91dc20 100644 --- a/app/src/qt/outlines_map_presenter.cpp +++ b/app/src/qt/outlines_map_presenter.cpp @@ -43,10 +43,6 @@ OutlinesMapPresenter::OutlinesMapPresenter( view, SIGNAL(signalSelectPreviousRow()), this, SLOT(slotSelectPreviousRow())); - QObject::connect( - view, SIGNAL(signalOutlineShow()), - mwp, SLOT(doActionOutlineShow())); - QObject::connect( view, SIGNAL(signalChangePromote()), mwp, SLOT(doActionNotePromote())); @@ -66,6 +62,11 @@ OutlinesMapPresenter::OutlinesMapPresenter( view, SIGNAL(signalChangeLast()), mwp, SLOT(doActionNoteLast())); + // TODO signals to be re-written and re-wired + /* + QObject::connect( + view, SIGNAL(signalOutlineShow()), + mwp, SLOT(doActionOutlineShow())); QObject::connect( view, SIGNAL(signalOutlineOrNoteEdit()), mwp, SLOT(doActionOutlineOrNoteEdit())); @@ -78,6 +79,7 @@ OutlinesMapPresenter::OutlinesMapPresenter( QObject::connect( view, SIGNAL(signalForget()), mwp, SLOT(doActionNoteForget())); + */ } OutlinesMapPresenter::~OutlinesMapPresenter() diff --git a/app/src/qt/outlines_map_presenter.h b/app/src/qt/outlines_map_presenter.h index fd61261c..0633f275 100644 --- a/app/src/qt/outlines_map_presenter.h +++ b/app/src/qt/outlines_map_presenter.h @@ -39,30 +39,39 @@ class OrlojPresenter; * * Outlines map ~ tree of Outlines is in fact ~ mind map of Outlines */ +// +// MVP assembly: View / Model / Presenter: +// +// view <- new View +// presenter <- new Presenter(view) + new Model(view) +// model <- presenter.model +// +// Integration: +// +// orlojView <- new View() +// orlojPresenter <- presenter +// +// Materialization / view: +// +// menu ... MainMenuView::actionViewOutlinesMap +// -> @ MainMenuPresenter +// -> MainWindowPresenter::doActionViewOutlinesMap() +// ... generate virtual O from Os headers +// -> OrlojPresenter::showFacetOutlinesMap( virtualO ) +// +// Signals: +// +// - emit: OutlinesMapView +// ... OK ~ view is the source of signals +// - wire: OutlinesMapPresenter +// ... OK ~ this is where code belongs & it's presenter's role in MVP +// - slot: MainWindowPresenter +// ... OK ~ this is where are presenters are instantiated +// class OutlinesMapPresenter : public QObject { Q_OBJECT - // Assembly ... view / model / presenter: - // - // view <- new View - // presenter <- new Presenter(view) w/ new Model(view) - // model <- presenter.model - // - // Integration: - // - // orlojView <- new View() - // orlojPresenter <- presenter - // - // Materialization / view: - // - // menu ... MainMenuView::actionViewOutlinesMap - // -> @ MainMenuPresenter - // -> MainWindowPresenter::doActionViewOutlinesMap() - // ... generate virtual O from Os headers - // -> OrlojPresenter::showFacetOutlinesMap( virtualO ) - // - public: static const int NO_ROW = -1; diff --git a/app/src/qt/outlines_map_view.cpp b/app/src/qt/outlines_map_view.cpp index d285b0af..406866b7 100644 --- a/app/src/qt/outlines_map_view.cpp +++ b/app/src/qt/outlines_map_view.cpp @@ -153,7 +153,8 @@ void OutlinesMapView::keyPressEvent(QKeyEvent* event) } case Qt::Key_Return: case Qt::Key_Right: - emit signalEdit(); + MF_DEBUG(" OutlinesMapView: SIGNAL show O ->" << std::endl); + emit signalMapShowSelectedOutline(); break; #ifndef __APPLE__ case Qt::Key_Delete: @@ -161,6 +162,7 @@ void OutlinesMapView::keyPressEvent(QKeyEvent* event) break; #endif case Qt::Key_Left: + // TODO this can be signal that I already have for openning Os list signalFromOutlinesMapToOutlines(); break; } @@ -177,7 +179,7 @@ void OutlinesMapView::mouseDoubleClickEvent(QMouseEvent* event) Q_UNUSED(event); // double click to N opens it - emit signalEdit(); + emit signalMapShowSelectedOutline(); } void OutlinesMapView::resizeEvent(QResizeEvent* event) diff --git a/app/src/qt/outlines_map_view.h b/app/src/qt/outlines_map_view.h index 257bea8e..47997144 100644 --- a/app/src/qt/outlines_map_view.h +++ b/app/src/qt/outlines_map_view.h @@ -106,7 +106,7 @@ class OutlinesMapView : public QTableView void signalOutlineOrNoteEdit(); // O or N edit void signalOutlineOrNoteExternalEdit(); // O or N edit - void signalEdit(); // N edit + void signalMapShowSelectedOutline(); void signalForget(); }; diff --git a/build/Makefile b/build/Makefile index 49f87caf..5136aba5 100644 --- a/build/Makefile +++ b/build/Makefile @@ -127,11 +127,16 @@ build-ci: clean run: ../app/mindforger - cd ../app && pwd && ./mindforger + # cd ../app && pwd && ./mindforger + cd ../app && pwd && ./mindforger /home/dvorka/mf-devel/library-trainer + # cd ../app && pwd && ./mindforger /home/dvorka/mf-devel/computer-hw.md + # cd ../app && pwd && ./mindforger /home/dvorka/mf-devel/bug-copy-image run-dev: build-dev cd ../app && pwd && ./mindforger /home/dvorka/mf-devel/library-trainer + # cd ../app && pwd && ./mindforger /home/dvorka/mf-devel/computer-hw.md + # cd ../app && pwd && ./mindforger /home/dvorka/mf-devel/bug-copy-image # diff --git a/lib/src/config/configuration.h b/lib/src/config/configuration.h index 6500fad3..5f847f52 100644 --- a/lib/src/config/configuration.h +++ b/lib/src/config/configuration.h @@ -67,6 +67,7 @@ constexpr const auto UI_THEME_NATIVE = "native"; constexpr const auto UI_THEME_NATIVE_WITH_FIXED_FONT = "native with fixed font"; constexpr const auto START_TO_DASHBOARD = "dashboard"; +constexpr const auto START_TO_OUTLINES_TREE = "outlines tree"; constexpr const auto START_TO_OUTLINES = "outlines"; constexpr const auto START_TO_TAGS = "tags"; constexpr const auto START_TO_RECENT = "recent"; diff --git a/lib/src/mind/ai/llm/wingman.h b/lib/src/mind/ai/llm/wingman.h index 7dc23469..74ce4b18 100644 --- a/lib/src/mind/ai/llm/wingman.h +++ b/lib/src/mind/ai/llm/wingman.h @@ -90,20 +90,25 @@ class Wingman * - llama 7B * - llama-2-7b.Q4_0.gguf * - Zephir 7B - * - ... + * - ?.gguf * - Mistral 7B - * - ... + * - ?.gguf * * Plan: * * TODO: first implement unit tests for the wingman UCs as it is in the lib/ - * TODO: then integrate wingman to UI - * - if GPT not available in RUNTIME, then hide/disable menu items + * TODO: then integrate wingman to UI (if GPT not available in RUNTIME, then hide/disable menu items) + * */ class WingmanLlamaCpp: Wingman { public: }; +class WingmanOpenAiChatGpt: Wingman +{ +public: +}; + } #endif // M8R_WINGMAN_H diff --git a/lib/src/mind/mind.cpp b/lib/src/mind/mind.cpp index d5f077e9..fca6e025 100644 --- a/lib/src/mind/mind.cpp +++ b/lib/src/mind/mind.cpp @@ -996,12 +996,18 @@ Outline* Mind::outlinesMapNew(string outlineKey) Note* n = o->getOutlineDescriptorAsNote(); newOutlinesMap->addNote(n); - // relative key will be valid even if repository is moved to a different path - Link* link = new Link{ - LINK_NAME_ASSOCIATED_OUTLINE, - this->outlineMapKey2Relative(o->getKey()) - }; - n->addLink(link); + n->addLink( + new Link{ + LINK_NAME_OUTLINE_KEY, + o->getKey() + } + ); + n->addLink( + new Link{ + LINK_NAME_OUTLINE_PATH, + Mind::outlineMapKey2Relative(o->getKey()) + } + ); } newOutlinesMap->setName("Notebooks Map"); @@ -1013,9 +1019,6 @@ Outline* Mind::outlinesMapNew(string outlineKey) return newOutlinesMap; } -/** - * Synchronize Outlines map parameter with mind's Outlines. - */ void Mind::outlinesMapSynchronize(Outline* outlinesMap) { vector osToRemove{}; @@ -1026,10 +1029,9 @@ void Mind::outlinesMapSynchronize(Outline* outlinesMap) MF_DEBUG("Map O links validity check:"); vector mapOsKeys{}; for(Note* n:outlinesMap->getNotes()) { - if(n->getLinks().size() > 0 - && n->getLinks().at(0)->getUrl().size() > 0 - ) { - string oKey{n->getLinks().at(0)->getUrl()}; + Link* oLink = n->getLinkByName(LINK_NAME_OUTLINE_KEY); + if(oLink) { + string oKey{oLink->getUrl()}; if(findOutlineByKey(oKey)) { // valid O in MF & map MF_DEBUG( @@ -1064,7 +1066,16 @@ void Mind::outlinesMapSynchronize(Outline* outlinesMap) for(auto mindO: getOutlines()) { if(find(mapOsKeys.begin(), mapOsKeys.end(), mindO->getKey()) == mapOsKeys.end()) { MF_DEBUG(" " << mindO->getKey() << endl); - osToAdd.push_back(mindO); + + // TODO skip keys w/ "," ~ https://github.com/dvorka/mindforger/issues/1518 workaround + // TODO remove this code once #1518 is fixed + if(find(mindO->getKey().begin(), mindO->getKey().end(), ',') == mindO->getKey().end()) { + osToAdd.push_back(mindO); + } else { + MF_DEBUG(" SKIPPING key w/ ','" << endl); + continue; + } + } } MF_DEBUG("ADDING mind keys to map:" << endl); @@ -1072,6 +1083,21 @@ void Mind::outlinesMapSynchronize(Outline* outlinesMap) MF_DEBUG(" " << o->getKey() << endl); // clone O's descriptor to get N which might be deleted later Note* n = new Note(*o->getOutlineDescriptorAsNote()); + + n->clearLinks(); + n->addLink( + new Link{ + LINK_NAME_OUTLINE_KEY, + o->getKey() + } + ); + n->addLink( + new Link{ + LINK_NAME_OUTLINE_PATH, + Mind::outlineMapKey2Relative(o->getKey()) + } + ); + outlinesMap->addNote(n , 0); } } @@ -1087,23 +1113,29 @@ Outline* Mind::outlinesMapLearn(string outlineKey) MF_DEBUG("Setting map's Ns type O" << endl); for(auto n:outlinesMap->getNotes()) { MF_DEBUG( - " Setting " << n->getName() - << " with " << n->getLinks().size() << " link(s)" + " Setting '" << n->getName() + << "' with " << n->getLinks().size() << " link(s)" << " to O" << endl ); n->setType(&Outline::NOTE_4_OUTLINE_TYPE); - if(n->getLinks().size() > 0 - && n->getLinks().at(0)->getUrl().size() > 0 - ) { - // IMPROVE find link w/ name LINK_NAME_ASSOCIATED_OUTLINE (in case there would be >1 link) - string relativeLink{ - this->outlineMapKey2Absolute(n->getLinks().at(0)->getUrl()) - }; + Link* oMemPathLink = n->getLinkByName(LINK_NAME_OUTLINE_PATH); + if(oMemPathLink && oMemPathLink->getUrl().size() > 0) { + string oMemPath{oMemPathLink->getUrl()}; - // N key is generated based on O key > keep link in "Outline" link n->clearLinks(); - n->addLink(new Link(LINK_NAME_ASSOCIATED_OUTLINE, relativeLink)); + n->addLink( + new Link{ + LINK_NAME_OUTLINE_KEY, + Mind::outlineMapKey2Absolute(oMemPath) + } + ); + n->addLink( + new Link{ + LINK_NAME_OUTLINE_PATH, + oMemPath + } + ); } else { MF_DEBUG(" SKIPPING N w/o link: " << n->getName() << endl); osToRemove.push_back(n); @@ -1144,12 +1176,18 @@ Outline* Mind::outlinesMapGet() // create new Os map this->outlinesMap = outlinesMapNew(outlinesMapPath); - remind().getPersistence().save(this->outlinesMap); + outlinesMapRemember(); } return this->outlinesMap; } +Outline* Mind::outlinesMapRemember() +{ + if(this->outlinesMap) { + remind().getPersistence().save(this->outlinesMap); + } +} Note* Mind::noteNew( const std::string& outlineKey, diff --git a/lib/src/mind/mind.h b/lib/src/mind/mind.h index d7974356..f6970dcd 100644 --- a/lib/src/mind/mind.h +++ b/lib/src/mind/mind.h @@ -45,8 +45,12 @@ class KnowledgeGraph; class AutolinkingMind; constexpr auto NO_PARENT = 0xFFFF; -// const in constexpr ensures const value -constexpr const auto LINK_NAME_ASSOCIATED_OUTLINE = "TargetOutline"; + +// Outline key - resolved O path which may change if the repository is moved +constexpr const auto LINK_NAME_OUTLINE_KEY = "Outline key"; +// Outline path - relative O path which can be used to create valid absolute O path on map load +constexpr const auto LINK_NAME_OUTLINE_PATH = "Outline path"; +// ^ const in constexpr ensures const value enum class FtsSearch { EXACT, @@ -575,6 +579,10 @@ class Mind : public OntologyProvider * @brief Load or create Os map (tree). */ Outline* outlinesMapGet(); + /** + * @brief Save Os map (tree). + */ + Outline* outlinesMapRemember(); /* * NOTE MGMT diff --git a/lib/src/model/note.cpp b/lib/src/model/note.cpp index 0549b9bb..8a3fcc33 100644 --- a/lib/src/model/note.cpp +++ b/lib/src/model/note.cpp @@ -67,6 +67,12 @@ Note::Note(const Note& n) tags.insert(tags.end(), n.tags.begin(), n.tags.end()); } + if(n.links.size()) { + for(Link* l:n.links) { + links.push_back(new Link(l->getName(), l->getUrl())); + } + } + flags = n.flags; } @@ -456,6 +462,17 @@ void Note::addLink(Link* link) } } +Link* Note::getLinkByName(const string& name) const +{ + for(Link* l:this->links) { + if(l->getName() == name) { + return l; + } + } + + return nullptr; +} + void Note::demote() { depth++; diff --git a/lib/src/model/note.h b/lib/src/model/note.h index 31710a48..382324fe 100644 --- a/lib/src/model/note.h +++ b/lib/src/model/note.h @@ -160,11 +160,12 @@ class Note : public ThingInTime void addLink(Link* link); const std::vector& getLinks() const { return links; } + Link* getLinkByName(const std::string& name) const; + size_t getLinksCount() const { return links.size(); } void clearLinks() { for(auto l:links) { delete l; } links.clear(); } - size_t getLinksCount() const { return links.size(); } void promote(); void demote(); diff --git a/lib/test/src/markdown/markdown_test.cpp b/lib/test/src/markdown/markdown_test.cpp index 7e890a95..791381fe 100644 --- a/lib/test/src/markdown/markdown_test.cpp +++ b/lib/test/src/markdown/markdown_test.cpp @@ -953,6 +953,7 @@ TEST(MarkdownParserTestCase, Links) } // Repro for BUG: https://github.com/dvorka/mindforger/issues/1518 +// - metadata link with "," is not parsed TEST(MarkdownParserTestCase, DISABLED_LinksWithParenthesis) { string repositoryPath{"/tmp"}; @@ -961,15 +962,15 @@ TEST(MarkdownParserTestCase, DISABLED_LinksWithParenthesis) string filePath{repositoryPath+"/"+fileName}; content.assign( - "# Outline Name \n" - "O text.\n" - "\n" -// "## First Section \n" -// "N1 text.\n" - "\n" - "## Second Section\n" - "N2 text.\n" - "\n"); + "# Outline Name \n" + "O text.\n" + "\n" + "## First Section \n" + "N1 text.\n" + "\n" + "## Second Section\n" + "N2 text.\n" + "\n"); m8r::stringToFile(filePath, content); m8r::Repository* repository = m8r::RepositoryIndexer::getRepositoryForPath(repositoryPath);