lyx_mirror/src/frontends/qt
2023-04-27 21:24:49 +02:00
..
ui Improve tooltip. 2023-03-09 10:23:46 +01:00
.gitignore
Action.cpp Sync with master 2022-10-26 10:52:21 +02:00
Action.h
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 Two more icon scale fixes 2023-03-11 16:10:52 +01:00
ButtonController.h Inform user if panel or tab has invalid content (#10827) 2022-12-22 15:01:58 +01:00
ButtonPolicy.cpp
ButtonPolicy.h
CategorizedCombo.cpp revert/fixup 309f8f4b: setFilterRegularExpression was introduced in Qt 5.12. 2023-03-12 13:05:58 +01:00
CategorizedCombo.h Silence warning when unappropriate 2023-02-12 14:33:27 +01:00
CMakeLists.txt Amend(2) 580dea63: get rid of Qt4 code also in cmake build 2022-11-21 09:31:48 +01:00
ColorCache.cpp Remove useless casts reported by GCC with -Wuseless-cast option 2021-09-30 10:37:24 +03:00
ColorCache.h
CustomizedWidgets.cpp
CustomizedWidgets.h
Dialog.cpp
Dialog.h
DialogFactory.cpp
DialogFactory.h
DialogView.cpp
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
EmptyTable.cpp Fix Qt6 deprecation warning (QMouseEvent::x() ::y()) 2021-03-21 12:38:05 +01:00
EmptyTable.h
FancyLineEdit.cpp Remove workaround for Qt version which is no longer supported 2023-03-11 16:43:08 +01:00
FancyLineEdit.h
FileDialog.cpp Allow multiple selections in the file open dialog 2023-01-09 15:52:33 +01:00
FileDialog.h Allow multiple selections in the file open dialog 2023-01-09 15:52:33 +01:00
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 Remove use of QRegExp 2023-03-03 10:49:32 +01:00
GuiAbout.h
GuiAlert.cpp
GuiApplication.cpp Two more icon scale fixes 2023-03-11 16:10:52 +01:00
GuiApplication.h Properly scale some icons for HiDPI (#12695) 2023-03-11 14:49:07 +01:00
GuiBibitem.cpp
GuiBibitem.h
GuiBibtex.cpp Get rid of Qt4 code in src/ 2022-11-18 17:19:50 +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
GuiBranch.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiBranch.h
GuiBranches.cpp
GuiBranches.h
GuiChanges.cpp Fix deprecation warning (from|toTime_t) 2021-03-12 10:32:03 +01:00
GuiChanges.h
GuiCharacter.cpp
GuiCharacter.h
GuiCitation.cpp Get rid of Qt4 code in src/ 2022-11-18 17:19:50 +01:00
GuiCitation.h
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 Address deprecation 2023-03-03 11:37:39 +01:00
GuiClipboard.h
GuiCommandBuffer.cpp QWidget::setContentsMargins is supported in Qt5 2023-03-05 21:37:01 +01:00
GuiCommandBuffer.h Sync with master 2022-10-26 10:52:21 +02:00
GuiCommandEdit.cpp Show suggestions containing the input in the command buffer 2022-11-04 22:27:31 +01:00
GuiCommandEdit.h
GuiCompare.cpp Fix bug #11781. Patch from Daniel. 2022-11-27 13:20:17 -05:00
GuiCompare.h
GuiCompareHistory.cpp
GuiCompareHistory.h
GuiCompleter.cpp Fix completion in math when inline completion was not yet shown (take 2) 2023-03-16 11:58:49 +01:00
GuiCompleter.h
GuiCounter.cpp Sync with master 2022-10-26 10:52:21 +02:00
GuiCounter.h
GuiDelimiter.cpp Fix bug #12447 2022-01-02 18:49:44 +01:00
GuiDelimiter.h
GuiDialog.cpp Partially fix bug #10827. Patch from Daniel, slightly modified by me. 2022-12-03 22:44:05 -05:00
GuiDialog.h Partially fix bug #10827. Patch from Daniel, slightly modified by me. 2022-12-03 22:44:05 -05:00
GuiDocument.cpp Sync doc CT settings with dialog-external change of status (#12703) 2023-03-21 10:24:34 +01:00
GuiDocument.h Sync doc CT settings with dialog-external change of status (#12703) 2023-03-21 10:24:34 +01:00
GuiErrorList.cpp
GuiErrorList.h
GuiERT.cpp
GuiERT.h
GuiExternal.cpp Fix signals 2023-03-11 16:25:25 +01:00
GuiExternal.h Fix signals 2023-03-11 16:25:25 +01:00
GuiFontExample.cpp
GuiFontExample.h
GuiFontLoader.cpp Line width 2022-12-02 19:29:04 -05:00
GuiFontLoader.h
GuiFontMetrics.cpp Comment 2022-12-02 19:34:36 -05:00
GuiFontMetrics.h Remove workaround that was needed only by Qt4 2022-11-19 14:58:50 +01:00
GuiGraphics.cpp Inform user if panel or tab has invalid content (#10827) 2022-12-22 15:01:58 +01: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
GuiHyperlink.cpp Allow an 'other' type for hyperlinks. Format change. 2022-12-25 12:45:48 -05:00
GuiHyperlink.h
GuiIdListModel.cpp
GuiIdListModel.h
GuiImage.cpp Get rid of Qt4 code in src/ 2022-11-18 17:19:50 +01:00
GuiImage.h
GuiInclude.cpp Inform user if panel or tab has invalid content (#10827) 2022-12-22 15:01:58 +01:00
GuiInclude.h
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 Infoinset - better specification of few strings 2023-02-25 18:52:31 +01:00
GuiInfo.h
GuiKeySymbol.cpp Remove dead code which is deprecated in Qt6 2023-03-03 10:48:51 +01:00
GuiKeySymbol.h
GuiLabel.cpp
GuiLabel.h
GuiLine.cpp
GuiLine.h
GuiListings.cpp Remove use of QRegExp 2023-03-03 10:49:32 +01:00
GuiListings.h
GuiLog.cpp Remove use of QRegExp 2023-03-03 10:49:32 +01:00
GuiLog.h Remove use of QRegExp 2023-03-03 10:49:32 +01:00
GuiLyXFiles.cpp Remobe static icon sizing which seems to play bad with HiDpi 2023-03-11 18:30:44 +01:00
GuiLyXFiles.h
GuiMathMatrix.cpp Remove useless casts reported by GCC with -Wuseless-cast option 2021-09-30 10:37:24 +03:00
GuiMathMatrix.h
GuiNomenclature.cpp
GuiNomenclature.h
GuiNote.cpp
GuiNote.h
GuiPainter.cpp Get rid of Qt4 code in src/ 2022-11-18 17:19:50 +01:00
GuiPainter.h Make rectangles have pointy corners 2021-09-27 17:47:41 +02:00
GuiParagraph.cpp
GuiParagraph.h
GuiPhantom.cpp
GuiPhantom.h
GuiPrefs.cpp typo 2023-04-14 10:53:37 +02:00
GuiPrefs.h adjust text display width in windowed mode 2022-10-27 17:49:43 +02:00
GuiPrintindex.cpp
GuiPrintindex.h
GuiPrintNomencl.cpp
GuiPrintNomencl.h
GuiProgress.cpp
GuiProgress.h
GuiProgressView.cpp Amend d8f540f51 2022-04-24 16:51:16 +02:00
GuiProgressView.h
GuiRef.cpp C++11 compilation fix 2022-12-06 17:12:45 +01:00
GuiRef.h Properly show labels from broken references in Cross-references dialog 2022-02-19 18:14:47 +01:00
GuiSearch.cpp Disable "search in selection only" with instant search 2023-02-07 14:48:09 +01:00
GuiSearch.h Disable "search in selection only" with instant search 2023-02-07 14:48:09 +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
GuiSelectionManager.h
GuiSendto.cpp Remove useless casts reported by GCC with -Wuseless-cast option 2021-09-30 10:37:24 +03:00
GuiSendto.h
GuiSetBorder.cpp Fix Qt6 deprecation warning (QMouseEvent::x() ::y()) 2021-03-21 12:38:05 +01:00
GuiSetBorder.h
GuiShowFile.cpp
GuiShowFile.h
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 Remove use of QRegExp 2023-03-03 10:49:32 +01:00
GuiTabular.h
GuiTabularCreate.cpp
GuiTabularCreate.h
GuiTexinfo.cpp
GuiTexinfo.h
GuiThesaurus.cpp Remove use of QRegExp 2023-03-03 10:49:32 +01:00
GuiThesaurus.h
GuiToc.cpp
GuiToc.h
GuiToolbar.cpp Add toolbar option to reset font + language settings (#12199) 2022-12-18 16:36:30 +01:00
GuiToolbar.h Restrict toolbar menu to toolbar 2022-12-10 20:30:58 +01:00
GuiView.cpp Increase hint verbosity, otherwise difficult to understand. 2023-04-27 21:24:49 +02:00
GuiView.h Sync doc CT settings with dialog-external change of status (#12703) 2023-03-21 10:24:34 +01: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
GuiVSpace.cpp
GuiVSpace.h
GuiWorkArea_Private.h
GuiWorkArea.cpp Fix text color of "file changed on disk" notification 2023-03-09 16:13:00 +01:00
GuiWorkArea.h
GuiWrap.cpp
GuiWrap.h
IconPalette.cpp QDesktopWidget is not required in Qt5, the Qt6 code works 2023-03-05 21:54:08 +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
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
InsetParamsDialog.h
InsetParamsWidget.cpp
InsetParamsWidget.h
LaTeXHighlighter.cpp Remove use of QRegExp 2023-03-03 10:49:32 +01:00
LaTeXHighlighter.h Add basic support for \DeclareMetadata 2022-02-12 17:10:34 +01:00
LayoutBox.cpp revert/fixup 309f8f4b: setFilterRegularExpression was introduced in Qt 5.12. 2023-03-12 13:05:58 +01:00
LayoutBox.h Properly reset on ESC key on LayoutBox/CategorizedCombo 2022-12-04 13:45:49 +01:00
LengthCombo.cpp
LengthCombo.h
LyXFileDialog.cpp
LyXFileDialog.h
Makefile.am Revert "Extended comment and indentation for source code" 2023-02-01 00:12:14 +01:00
Menus.cpp Get rid of Qt4 code in src/ 2022-11-18 17:19:50 +01:00
Menus.h
PanelStack.cpp Properly scale some icons for HiDPI (#12695) 2023-03-11 14:49:07 +01:00
PanelStack.h Inform user if panel or tab has invalid content (#10827) 2022-12-22 15:01:58 +01:00
qt_helpers.cpp Fix text color of "file changed on disk" notification 2023-03-09 16:13:00 +01:00
qt_helpers.h Get rid of setSectionResizeMode helper functions. 2022-11-19 15:04:38 +01:00
qt_i18n.h
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 Properly reset tree depth in outliner with keep when outliner is re-filled 2023-02-22 15:24:15 +01:00
TocWidget.h Do not change outliner tree depth when not appropriate 2023-02-22 14:23:04 +01:00
Toolbars.cpp
Toolbars.h
ToolTipFormatter.cpp
ToolTipFormatter.h
Validator.cpp Remove use of QRegExp 2023-03-03 10:49:32 +01:00
Validator.h Inform user if panel or tab has invalid content (#10827) 2022-12-22 15:01:58 +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.