lyx_mirror/src/frontends/qt
Juergen Spitzmueller 293b8dbe67 Do not unnecessarily reset the outliner to TOC on internal model changes
The activated() signal is only issued on user changes, what we want here,
not internal model changes (as with currentIndexChanged())
2022-11-02 12:33:20 +01:00
..
ui Merge branch 'master' into features/indexmacros 2022-10-29 11:42:14 +02:00
.gitignore Get rid of Qt resources 2020-06-07 01:15:28 +02:00
Action.cpp Sync with master 2022-10-26 10:52:21 +02:00
Action.h Reimplement properly bidi icons 2020-04-14 22:47:56 +02:00
BulletsModule.cpp Display manually set itemize symbols 2022-02-06 17:58:50 +01:00
BulletsModule.h Display manually set itemize symbols 2022-02-06 17:58:50 +01:00
ButtonController.cpp Loop refactoring 2020-10-09 09:04:20 +03:00
ButtonController.h
ButtonPolicy.cpp
ButtonPolicy.h Run codespell on src/frontends 2020-06-26 00:21:47 +02:00
CategorizedCombo.cpp Allow compiling with Qt6 2021-03-15 17:09:09 +01:00
CategorizedCombo.h Amend efc0877f 2020-10-05 09:37:15 +02:00
CMakeLists.txt Amend 771f30e9 for cmake 2021-10-17 19:17:01 +02:00
ColorCache.cpp Remove useless casts reported by GCC with -Wuseless-cast option 2021-09-30 10:37:24 +03:00
ColorCache.h Add dark theme colors to semantic colors (#8325) 2020-12-12 10:56:05 +01:00
CustomizedWidgets.cpp
CustomizedWidgets.h Amend efc0877f 2020-10-05 09:37:15 +02:00
Dialog.cpp Fix bug #11351. 2021-02-02 17:34:25 -05:00
Dialog.h Fix bug #11030. 2021-01-09 20:33:23 -05:00
DialogFactory.cpp Move implementation details to constructors. Amend 78f457796c 2020-12-06 20:51:11 +02:00
DialogFactory.h Implement proper Dialog factory instead of implicit link-time dependencies 2020-12-06 17:37:39 +02:00
DialogView.cpp <QCloseEvent> DialogView.h -> DialogView.cpp 2020-10-14 13:57:30 +02:00
DialogView.h Remove redundant semicolons reported by GCC with -Wextra-semi option 2021-09-28 11:28:43 +03:00
DockView.cpp Make Dock Widgets SubWindows in general (#12170) 2021-05-06 17:56:53 +02:00
DockView.h Address some deprecation warnings 2021-02-13 15:23:45 +01:00
EmptyTable.cpp Fix Qt6 deprecation warning (QMouseEvent::x() ::y()) 2021-03-21 12:38:05 +01:00
EmptyTable.h Fix setting of math matrix size with mouse 2021-02-19 18:06:04 +02:00
FancyLineEdit.cpp HiDPI support for search indicators (#12162) 2021-02-28 12:35:29 +01:00
FancyLineEdit.h FancyLineEdit: use QLineEdit's own clear button with Qt >= 5.2 2021-02-23 16:53:15 +01:00
FileDialog.cpp Fix obsoleted Qt values 2020-10-25 09:28:46 +02:00
FileDialog.h
FindAndReplace.cpp Sync with master 2022-10-26 10:52:21 +02:00
FindAndReplace.h Sync with master 2022-10-26 10:52:21 +02:00
FloatPlacement.cpp Replace obsoleted signal 2021-03-21 12:51:38 +01:00
FloatPlacement.h Replace obsoleted signal 2021-03-21 12:51:38 +01:00
GuiAbout.cpp Allow compiling with Qt6 2021-03-15 17:09:09 +01:00
GuiAbout.h Fix memory leak 2020-11-25 02:43:26 +02:00
GuiAlert.cpp Remove redundant const & for primitive types 2020-10-19 12:50:07 +03:00
GuiApplication.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiApplication.h #12451 Adjust color cache on change of dark/light mode 2022-01-05 08:26:45 +01:00
GuiBibitem.cpp
GuiBibitem.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiBibtex.cpp child documents: allow inheritance of bibliography file list (#4427) 2022-02-19 14:09:59 +01:00
GuiBibtex.h child documents: allow inheritance of bibliography file list (#4427) 2022-02-19 14:09:59 +01:00
GuiBox.cpp Fix signal (#12506) 2022-03-13 10:26:26 +01:00
GuiBox.h Refactor OutputParams 2020-11-30 13:05:03 +02:00
GuiBranch.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiBranch.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiBranches.cpp Allow semantic colors in branches and use semantic background color by default 2021-01-18 09:56:53 +01:00
GuiBranches.h Allow semantic colors in branches and use semantic background color by default 2021-01-18 09:56:53 +01:00
GuiChanges.cpp Fix deprecation warning (from|toTime_t) 2021-03-12 10:32:03 +01:00
GuiChanges.h Cleanup headers 2020-11-25 02:43:16 +02:00
GuiCharacter.cpp Implement proper Dialog factory instead of implicit link-time dependencies 2020-12-06 17:37:39 +02:00
GuiCharacter.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiCitation.cpp FancyLineEdit: use QLineEdit's own clear button with Qt >= 5.2 2021-02-23 16:53:15 +01:00
GuiCitation.h Fix bug #3964. 2021-01-06 03:50:47 -05:00
GuiClickableLabel.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiClickableLabel.h Sync with master 2022-10-26 10:52:21 +02:00
GuiClipboard.cpp Allow compiling with Qt6 2021-03-15 17:09:09 +01:00
GuiClipboard.h #8055 add support for system-wide find buffer on Mac 2021-02-14 18:56:25 +01:00
GuiCommandBuffer.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiCommandBuffer.h Sync with master 2022-10-26 10:52:21 +02:00
GuiCommandEdit.cpp
GuiCommandEdit.h Amend efc0877f 2020-10-05 09:37:15 +02:00
GuiCompare.cpp Fix #4658: showing diff between original and emergency files. 2021-04-03 13:19:53 +02:00
GuiCompare.h Fix issue in running compare from the command line 2020-11-15 10:35:28 +01:00
GuiCompareHistory.cpp Implement proper Dialog factory instead of implicit link-time dependencies 2020-12-06 17:37:39 +02:00
GuiCompareHistory.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiCompleter.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiCompleter.h Remove unused forward declarations 2020-10-13 09:57:36 +03:00
GuiCounter.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiCounter.h Cleanup headers 2020-11-25 02:43:16 +02:00
GuiDelimiter.cpp Fix bug #12447 2022-01-02 18:49:44 +01:00
GuiDelimiter.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiDialog.cpp Fix #10328. 2020-08-09 13:00:41 -04:00
GuiDialog.h Amend efc0877f 2020-10-03 21:17:17 +02:00
GuiDocument.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiDocument.h Change name in source files 2020-12-05 17:17:02 -05:00
GuiErrorList.cpp Implement proper Dialog factory instead of implicit link-time dependencies 2020-12-06 17:37:39 +02:00
GuiErrorList.h Remove unused forward declarations 2020-10-13 09:57:36 +03:00
GuiERT.cpp
GuiERT.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiExternal.cpp Remove useless casts reported by GCC with -Wuseless-cast option 2021-09-30 10:37:24 +03:00
GuiExternal.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiFontExample.cpp Replace QFontMetrics::width() by horizontalAdvance() in Qt>=5.11 2020-10-24 19:52:18 +02:00
GuiFontExample.h Add more override specifiers 2020-11-21 00:32:40 +02:00
GuiFontLoader.cpp Allow compiling with Qt6 2021-03-15 17:09:09 +01:00
GuiFontLoader.h
GuiFontMetrics.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiFontMetrics.h Fix crash with countExpanders in Qt6 2022-04-08 12:14:41 +02:00
GuiGraphics.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiGraphics.h GuiGraphics: check more carefully whether we have a changed BB 2021-12-31 14:32:13 +01:00
GuiHSpace.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiHSpace.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiHyperlink.cpp
GuiHyperlink.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiIdListModel.cpp Change name in source files 2020-12-05 17:17:02 -05:00
GuiIdListModel.h Change name in source files 2020-12-05 17:17:02 -05:00
GuiImage.cpp Ditch deprecation warning 2020-12-12 14:16:34 +01:00
GuiImage.h Add more override specifiers 2020-11-21 00:32:40 +02:00
GuiInclude.cpp Re-enable input of non-LyX files (e.g., tex, pgf) (#12056) 2020-12-28 09:58:30 +01:00
GuiInclude.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiIndex.cpp Introduce InsetIndexMacros 2022-04-19 11:46:08 +02:00
GuiIndex.h Introduce InsetIndexMacros 2022-04-19 11:46:08 +02:00
GuiIndices.cpp
GuiIndices.h
GuiInfo.cpp
GuiInfo.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiKeySymbol.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiKeySymbol.h Move include of own header to the top. Fix dependencies 2020-10-25 19:58:57 +02:00
GuiLabel.cpp
GuiLabel.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiLine.cpp
GuiLine.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiListings.cpp Allow compiling with Qt6 2021-03-15 17:09:09 +01:00
GuiListings.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiLog.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiLog.h Allow compiling with Qt6 2021-03-15 17:09:09 +01:00
GuiLyXFiles.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiLyXFiles.h Remove unused forward declarations 2020-10-13 09:57:36 +03:00
GuiMathMatrix.cpp Remove useless casts reported by GCC with -Wuseless-cast option 2021-09-30 10:37:24 +03:00
GuiMathMatrix.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiNomenclature.cpp
GuiNomenclature.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiNote.cpp Implement proper Dialog factory instead of implicit link-time dependencies 2020-12-06 17:37:39 +02:00
GuiNote.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiPainter.cpp Fix crash with countExpanders in Qt6 2022-04-08 12:14:41 +02:00
GuiPainter.h Make rectangles have pointy corners 2021-09-27 17:47:41 +02:00
GuiParagraph.cpp GuiParagraph: apply pending changes when setting "immediate apply" (#11592) 2021-01-07 13:06:15 +01:00
GuiParagraph.h GuiParagraph: apply pending changes when setting "immediate apply" (#11592) 2021-01-07 13:06:15 +01:00
GuiPhantom.cpp Implement proper Dialog factory instead of implicit link-time dependencies 2020-12-06 17:37:39 +02:00
GuiPhantom.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiPrefs.cpp Minor improvements to the screen width UI 2022-10-29 11:17:22 +02:00
GuiPrefs.h adjust text display width in windowed mode 2022-10-27 17:49:43 +02:00
GuiPrintindex.cpp Implement proper Dialog factory instead of implicit link-time dependencies 2020-12-06 17:37:39 +02:00
GuiPrintindex.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiPrintNomencl.cpp
GuiPrintNomencl.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiProgress.cpp
GuiProgress.h Amend efc0877f 2020-10-05 09:37:15 +02:00
GuiProgressView.cpp Amend d8f540f51 2022-04-24 16:51:16 +02:00
GuiProgressView.h Address some deprecation warnings 2021-02-13 15:23:45 +01:00
GuiRef.cpp Properly show labels from broken references in Cross-references dialog 2022-02-19 18:14:47 +01:00
GuiRef.h Properly show labels from broken references in Cross-references dialog 2022-02-19 18:14:47 +01:00
GuiSearch.cpp #12423 fix a focus change problem 2022-01-09 22:33:43 +01:00
GuiSearch.h Update toolbar and properly reset focus when find widget is closed (#12396) 2021-11-01 14:21:34 +01:00
GuiSelection.cpp Revert "Revert "Only set dummy X11 selection if we do not own it"" 2021-05-04 12:34:35 -04:00
GuiSelection.h Make primary-selection unknown when not supported 2021-11-22 10:30:43 +01:00
GuiSelectionManager.cpp Change name in source files 2020-12-05 17:17:02 -05:00
GuiSelectionManager.h Change name in source files 2020-12-05 17:17:02 -05:00
GuiSendto.cpp Remove useless casts reported by GCC with -Wuseless-cast option 2021-09-30 10:37:24 +03:00
GuiSendto.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiSetBorder.cpp Fix Qt6 deprecation warning (QMouseEvent::x() ::y()) 2021-03-21 12:38:05 +01:00
GuiSetBorder.h Address some deprecation warnings 2021-02-13 15:23:45 +01:00
GuiShowFile.cpp Implement proper Dialog factory instead of implicit link-time dependencies 2020-12-06 17:37:39 +02:00
GuiShowFile.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiSpellchecker.cpp Fix debug output 2021-08-21 15:19:30 +02:00
GuiSpellchecker.h Meet per-document spelling dictionaries (fixes #86 [sic!]) 2021-03-06 16:53:33 +01:00
GuiSymbols.cpp Replace deprecated slot 2021-04-17 15:13:02 +02:00
GuiSymbols.h Replace deprecated slot 2021-04-17 15:13:02 +02:00
GuiTabular.cpp Check changed status after decimal sep has been edited 2021-10-06 18:06:09 +02:00
GuiTabular.h GuiTabular: only apply changed features (#10450) 2021-01-25 11:00:06 +01:00
GuiTabularCreate.cpp Implement proper Dialog factory instead of implicit link-time dependencies 2020-12-06 17:37:39 +02:00
GuiTabularCreate.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiTexinfo.cpp Implement proper Dialog factory instead of implicit link-time dependencies 2020-12-06 17:37:39 +02:00
GuiTexinfo.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiThesaurus.cpp Allow compiling with Qt6 2021-03-15 17:09:09 +01:00
GuiThesaurus.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiToc.cpp Implement proper Dialog factory instead of implicit link-time dependencies 2020-12-06 17:37:39 +02:00
GuiToc.h Use a proper filter bar in the outliner 2021-02-28 13:57:24 +01:00
GuiToolbar.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiToolbar.h Sync with master 2022-10-26 10:52:21 +02:00
GuiView.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiView.h Sync with master 2022-10-26 10:52:21 +02:00
GuiViewSource.cpp Rename LATEX debug level to OUTFILE and use it for DocBook, HTML, and XML messages. 2022-03-01 16:05:42 +01:00
GuiViewSource.h Address some deprecation warnings 2021-02-13 15:23:45 +01:00
GuiVSpace.cpp Prevent permanent disabling of comboboxes in Vertical/Horizontal space dialogs 2020-08-28 07:07:44 +02:00
GuiVSpace.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
GuiWorkArea_Private.h Simplify GuiWorkarea::Private constructor 2020-12-01 11:26:01 +01:00
GuiWorkArea.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiWorkArea.h Use const references 2020-11-01 22:23:26 +02:00
GuiWrap.cpp Implement proper Dialog factory instead of implicit link-time dependencies 2020-12-06 17:37:39 +02:00
GuiWrap.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
IconPalette.cpp Fix an overloaded-virtual warning for type mismatch of event parameter (Qt6) 2021-12-09 21:59:23 +01:00
IconPalette.h Fix an overloaded-virtual warning for type mismatch of event parameter (Qt6) 2021-12-09 21:59:23 +01:00
InGuiThread.cpp
InGuiThread.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
InsertTableWidget.cpp InsertTableWidget support for dark mode and improved resizing 2021-11-26 09:51:21 +01:00
InsertTableWidget.h InsertTableWidget support for dark mode and improved resizing 2021-11-26 09:51:21 +01:00
InsetParamsDialog.cpp Properly disable Apply/OK in InsetParamsDialog (#11440) 2021-01-07 13:28:10 +01:00
InsetParamsDialog.h Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
InsetParamsWidget.cpp Move Inset.h include from .h to .cpp 2020-11-30 13:05:08 +02:00
InsetParamsWidget.h Move Inset.h include from .h to .cpp 2020-11-30 13:05:08 +02:00
LaTeXHighlighter.cpp Add basic support for \DeclareMetadata 2022-02-12 17:10:34 +01:00
LaTeXHighlighter.h Add basic support for \DeclareMetadata 2022-02-12 17:10:34 +01:00
LayoutBox.cpp Allow compiling with Qt6 2021-03-15 17:09:09 +01:00
LayoutBox.h Remove unused forward declarations 2020-10-13 09:57:36 +03:00
LengthCombo.cpp Move include of own header to the top. Fix dependencies 2020-10-25 19:58:57 +02:00
LengthCombo.h #9376 prepare use of Length in lyxrc - move the class Length to support 2020-08-07 09:24:31 +02:00
LyXFileDialog.cpp
LyXFileDialog.h Remove unused forward declarations 2020-10-13 09:57:36 +03:00
Makefile.am Dialog.h and DialogFactory.h are not moc-able 2020-12-15 11:53:06 +01:00
Menus.cpp Sync with master 2022-10-26 10:52:21 +02:00
Menus.h Reduce includes in header files (2) 2020-10-19 18:01:17 +03:00
PanelStack.cpp FancyLineEdit: use QLineEdit's own clear button with Qt >= 5.2 2021-02-23 16:53:15 +01:00
PanelStack.h Reduce includes in header files (2) 2020-10-19 18:01:17 +03:00
qt_helpers.cpp Sync with master 2022-10-26 10:52:21 +02:00
qt_helpers.h Mode [un]locLengthString() methods to support/qstring_helpers 2022-08-09 17:27:53 +02:00
qt_i18n.h Change name in source files 2020-12-05 17:17:02 -05:00
README
TocModel.cpp Prevent Outliner crash due to emptied toc value 2021-12-04 17:53:03 +01:00
TocModel.h Prevent Outliner crash due to emptied toc value 2021-12-04 17:53:03 +01:00
TocWidget.cpp Do not unnecessarily reset the outliner to TOC on internal model changes 2022-11-02 12:33:20 +01:00
TocWidget.h Do not unnecessarily reset the outliner to TOC on internal model changes 2022-11-02 12:33:20 +01:00
Toolbars.cpp Implement sane UI for switching tristate toolbars (#6364) 2020-12-17 10:15:18 +01:00
Toolbars.h Implement sane UI for switching tristate toolbars (#6364) 2020-12-17 10:15:18 +01:00
ToolTipFormatter.cpp
ToolTipFormatter.h Amend efc0877f 2020-10-05 09:37:15 +02:00
Validator.cpp Sync with master 2022-10-26 10:52:21 +02:00
Validator.h LengthValidator: initialize properly positive_ 2021-01-29 18:17:16 +01:00

This file contains some do's and dont's for the Qt frontend.

General rules
-------------

Every editable field that affects the state of the dialog contents
from LyX's point of view should connect its xxxChanged() signal to
a the dialog's changed_adaptor() slot, which in turn should call
changed(). If you are using a more complicated thing anyway,
then remember to call changed() at the end (if it has changed!)

Every non-trivial widget should have a tooltip. If you don't know
what to write, write "FIXME", and it can fixed later. Don't be afraid
to use QWhatsThis too, but this must be done in the derived class's
constructor, and use _("..."). Non-trivial means that things like "OK"
/must not/ have a tooltip.

moc needs a fully qualified "std::string" for .connect() statements
to work. Be very, very careful.

Remember to check tab order on a dialog (third icon, with blue bars in
designer).

Remember to check sensible resizing behaviour on a dialog. This is
usually done by adding a top-level layout to the dialog in Designer.

Remember to use Edit->Check Accelerators

If necessary, you should override Qt2Base::isValid() for determining the
validity of the current dialog's contents.

OK/Apply/Restore/Close should be connected in the derived class's
constructor to call slotOK() etc. Refer to close/cancel as close in the
source.

Override update_contents() to update the dialog, not update().  Only
these functions may change dialog widgets that may emit changed() during
initialisation, to prevent the button controller from changing its
state.

Never call buttoncontroller functions directly from dialogs. In general,
you should use Qt2Base::changed() in all circumstances. However, if you
must call the buttoncontroller, make sure to respect Qt2Base::updating_

Naming conventions
------------------

QFoo.{cpp,h}     The file that interacts with the controller _and_
the implementation of the dialog, derived from the generated files
ui/FooDialog.ui  The designer file
ui_FooDialog.h   Generated files from FooDialog.ui

slots should be named e.g. slotFooClicked(), slotFooSelected(), where
foo is the name of the widget.

Widgets should be named like "fooXX", where XX is one of the following
widget types :

CB - check box
CO - combo box
ED - line edit
GB - group box
LA - label
LC - LengthCombo
LV - QListView
ML - QTextBrowser
PB - push button
RB - radio button
SB - spin box
SL - slider
TE - text edit
TW - tree widget (FIXME: also TV in some files)


Qt, Unicode, and LyX
--------------------

LyX uses a different encoding (UCS4) than Qt (UTF16), therefore there are a
number of conversion functions in qt_helpers.{cpp,h}. Read the doxygen
documentation for details when to use which function.

Additionally, you should follow these simple rules :

o Use qt_() not _() in code
o Use the conversion functions of qt_helpers.h, NOT .latin1() / .c_str() etc.