lyx_mirror/src/frontends/qt
2024-09-17 19:51:35 +02:00
..
ui Fix typo in UI file 2024-08-25 13:39:18 +02:00
.gitignore
Action.cpp Pass shared_ptr<> arguments by const reference 2024-09-13 14:54:43 +02:00
Action.h Pass shared_ptr<> arguments by const reference 2024-09-13 14:54:43 +02:00
BulletsModule.cpp
BulletsModule.h
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 Revert "Cmake build: Add Qt?Xml modules to build." 2024-07-22 20:53:29 +02:00
ColorCache.cpp Remove alpha component of system colors 2024-07-22 20:36:20 +02:00
ColorCache.h
CustomizedWidgets.cpp
CustomizedWidgets.h
Dialog.cpp Fix indentation 2024-06-16 15:54:50 +02:00
Dialog.h Fix wrong position of conversion windows of the input method #11723, #13054 2024-04-12 21:22:31 +09:00
DialogFactory.cpp Transform InsetNomenclature to a collapsible 2024-08-12 12:33:16 +02:00
DialogFactory.h
DialogView.cpp Prevent data loss when closing LyX while document dialog has unapplied changes (#12955) 2023-11-05 12:09:33 +01:00
DialogView.h Prevent data loss when closing LyX while document dialog has unapplied changes (#12955) 2023-11-05 12:09:33 +01:00
DockView.cpp Only fix simple search height if there are no other widgets in the dock area (#13005) 2024-01-13 11:58:35 +01:00
DockView.h Prevent data loss when closing LyX while document dialog has unapplied changes (#12955) 2023-11-05 12:09:33 +01:00
EmptyTable.cpp
EmptyTable.h
FancyLineEdit.cpp Remove Qt < 5.2 conditionals and special code 2023-08-18 09:04:12 +02:00
FancyLineEdit.h
FileDialog.cpp Fix assertion when canceling file dialog 2023-09-02 18:15:09 +02:00
FileDialog.h Allow multiple selections in the file open dialog 2023-01-09 15:52:33 +01:00
FindAndReplace.cpp Adv. F&R: strange dialog text 2024-06-03 08:13:28 +02:00
FindAndReplace.h
FloatPlacement.cpp
FloatPlacement.h
GuiAbout.cpp Add temporary directory to About LyX dialog 2024-06-25 11:32:36 -04:00
GuiAbout.h Add temporary directory to About LyX dialog 2024-06-25 11:32:36 -04:00
GuiAlert.cpp #12001 make message boxes modal on Mac 2023-08-02 18:00:02 +02:00
GuiApplication.cpp Pass SocketCallback object as const reference 2024-09-14 20:19:34 +02:00
GuiApplication.h Remove legacy code to compute geometry 2024-08-30 14:45:36 +02:00
GuiBibitem.cpp
GuiBibitem.h
GuiBibtex.cpp #12576 improved file name chooser implementation for GUI dialogs 2023-08-05 08:56:35 +02:00
GuiBibtex.h Header not needed anymore. 2024-08-19 21:47:16 +02:00
GuiBox.cpp Introduce default box frame color (#12921) 2023-09-30 09:56:27 +02:00
GuiBox.h Introduce default box frame color (#12921) 2023-09-30 09:56:27 +02:00
GuiBranch.cpp
GuiBranch.h
GuiBranches.cpp #10740 fix focus problems with color picker on Mac 2023-08-05 15:24:33 +02:00
GuiBranches.h
GuiChanges.cpp
GuiChanges.h
GuiCharacter.cpp
GuiCharacter.h
GuiCitation.cpp Pass a pair of docstring arguments by address 2024-09-11 17:25:03 +02:00
GuiCitation.h Header not needed anymore 2024-09-17 19:51:35 +02:00
GuiClickableLabel.cpp
GuiClickableLabel.h
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 Not needed anymore. 2024-08-23 21:35:53 +02:00
GuiCommandEdit.cpp Fixup 89394bcd: handle cursor keys from keypad 2023-05-03 11:25:06 +02:00
GuiCommandEdit.h
GuiCompare.cpp #12576 improved file name chooser implementation for GUI dialogs 2023-08-05 08:56:35 +02:00
GuiCompare.h #12576 improved file name chooser implementation for GUI dialogs 2023-08-05 08:56:35 +02:00
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
GuiCounter.h
GuiDelimiter.cpp Make string parameter a const reference 2024-09-13 10:27:24 +02:00
GuiDelimiter.h
GuiDialog.cpp Prevent data loss when closing LyX while document dialog has unapplied changes (#12955) 2023-11-05 12:09:33 +01:00
GuiDialog.h Prevent data loss when closing LyX while document dialog has unapplied changes (#12955) 2023-11-05 12:09:33 +01:00
GuiDocument.cpp Provide babel language options only for languages that have options 2024-08-24 04:51:45 +02:00
GuiDocument.h Add support for language options (#8034) 2024-08-23 15:52:34 +02:00
GuiErrorList.cpp Fix cursor navigation in error dialog (#12876) 2023-08-14 18:44:10 +02:00
GuiErrorList.h
GuiERT.cpp
GuiERT.h
GuiExternal.cpp #12576 improved file name chooser implementation for GUI dialogs 2023-08-05 08:56:35 +02:00
GuiExternal.h #12576 improved file name chooser implementation for GUI dialogs 2023-08-05 08:56:35 +02:00
GuiFontExample.cpp Fix alignment of screen font preview in prefs (remaining part of #13046) 2024-03-24 09:00:41 +01:00
GuiFontExample.h Fix alignment of screen font preview in prefs (remaining part of #13046) 2024-03-24 09:00:41 +01:00
GuiFontLoader.cpp Improve detection of our math fonts 2024-08-13 22:51:40 +02:00
GuiFontLoader.h Improve detection of our math fonts 2024-08-13 22:51:40 +02:00
GuiFontMetrics.cpp Improve detection of our math fonts 2024-08-13 22:51:40 +02:00
GuiFontMetrics.h Cache the value of FontMetrics::xHeight() 2023-07-15 23:32:59 +02:00
GuiGraphics.cpp #12576 improved file name chooser implementation for GUI dialogs 2023-08-05 08:56:35 +02:00
GuiGraphics.h #12576 improved file name chooser implementation for GUI dialogs 2023-08-05 08:56:35 +02:00
GuiHSpace.cpp
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
GuiImage.h
GuiInclude.cpp #12576 improved file name chooser implementation for GUI dialogs 2023-08-05 08:56:35 +02:00
GuiInclude.h #12576 improved file name chooser implementation for GUI dialogs 2023-08-05 08:56:35 +02:00
GuiIndex.cpp
GuiIndex.h
GuiIndices.cpp Add GUI support for nomencl options 2024-08-22 08:11:18 +02:00
GuiIndices.h Add GUI support for nomencl options 2024-08-22 08:11:18 +02:00
GuiInfo.cpp Do not include <QDate> in InsetInfo.h 2024-04-04 17:47:33 +02:00
GuiInfo.h
GuiKeySymbol.cpp Address Qt 6.7 deprecation warning 2024-05-20 09:49:10 +02:00
GuiKeySymbol.h
GuiLabel.cpp Fix bug #11497 2023-09-06 22:52:42 -04:00
GuiLabel.h Fix bug #11497 2023-09-06 22:52:42 -04:00
GuiLine.cpp
GuiLine.h
GuiListings.cpp Remove use of QRegExp 2023-03-03 10:49:32 +01:00
GuiListings.h
GuiLog.cpp fix potential null pointer (reported by coverity) 2024-09-07 12:36:23 +02:00
GuiLog.h GuiLog: show also log files of additional indices 2024-07-26 18:48:31 +02:00
GuiLyXFiles.cpp GuiLyXFiles: make sure language selector is disabled when dialog is reopened 2023-09-04 07:58:59 +02:00
GuiLyXFiles.h
GuiMathMatrix.cpp
GuiMathMatrix.h
GuiNote.cpp
GuiNote.h
GuiPainter.cpp Temporary fix for #11723. 2023-12-25 11:44:21 -05:00
GuiPainter.h When drawing macro names, enforce LtR direction 2023-09-22 12:41:44 +02:00
GuiParagraph.cpp Move Lexer to support/ directory (and lyx::support namespace) 2024-04-28 12:23:13 +02:00
GuiParagraph.h
GuiPhantom.cpp
GuiPhantom.h
GuiPrefs.cpp Typo 2024-07-22 16:21:37 -04:00
GuiPrefs.h Fix alignment of screen font preview in prefs (remaining part of #13046) 2024-03-24 09:00:41 +01:00
GuiPrintindex.cpp
GuiPrintindex.h
GuiPrintNomencl.cpp Transform InsetNomenclature to a collapsible 2024-08-12 12:33:16 +02:00
GuiPrintNomencl.h
GuiProgress.cpp Amend change 5c8e3a5f0d - correct include directives 2023-08-18 12:52:25 +02:00
GuiProgress.h
GuiProgressView.cpp
GuiProgressView.h
GuiRef.cpp New RefFormat tag for counters, and PrettyFormat for floats. 2023-07-28 17:37:13 -04:00
GuiRef.h Display equation/theorem numbers in insert cross reference dialog. 2023-07-26 13:35:42 -04:00
GuiSearch.cpp Only fix simple search height if there are no other widgets in the dock area (#13005) 2024-01-13 11:58:35 +01:00
GuiSearch.h Only fix simple search height if there are no other widgets in the dock area (#13005) 2024-01-13 11:58:35 +01:00
GuiSelection.cpp
GuiSelection.h
GuiSelectionManager.cpp Put new citation after selected item rather than at end of list. 2024-06-01 20:26:06 -04:00
GuiSelectionManager.h
GuiSendto.cpp
GuiSendto.h
GuiSetBorder.cpp
GuiSetBorder.h
GuiShowFile.cpp
GuiShowFile.h
GuiSpellchecker.cpp Factor out shared method 2024-03-31 12:40:27 +02:00
GuiSpellchecker.h Replace removed signal 2023-05-12 09:46:38 +02:00
GuiSymbols.cpp
GuiSymbols.h
GuiTabular.cpp Disable valign widget in tabularx tables 2024-08-14 16:28:15 +02: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 Rewrite statistics code 2024-07-24 18:07:04 +02:00
GuiView.h Fixup [152811a27d242/lyxgit] 2024-06-23 14:47:43 +02:00
GuiViewSource.cpp With Qt6 on linux, we need to catch StyleChange here 2023-09-05 12:01:17 +02:00
GuiViewSource.h
GuiVSpace.cpp
GuiVSpace.h
GuiWorkArea_Private.h Fix uninitialized variable 2024-09-13 11:21:19 +02:00
GuiWorkArea.cpp Fix uninitialized variable 2024-09-13 11:21:19 +02:00
GuiWorkArea.h GuiWorkArea: pass KeySymbol parameters as const references 2024-09-12 17:52:57 +02:00
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
InGuiThread.cpp
InGuiThread.h
InsertTableWidget.cpp Fix InsertTableWidget interference with tooltip geometry on Qt6 (#12776) 2023-08-10 16:43:06 +02:00
InsertTableWidget.h Fix InsertTableWidget interference with tooltip geometry on Qt6 (#12776) 2023-08-10 16:43:06 +02:00
InsetParamsDialog.cpp Assure OK/Apply button is initially disabled in InsetParamsDialogs (#8927) 2024-08-25 10:18:38 +02:00
InsetParamsDialog.h
InsetParamsWidget.cpp
InsetParamsWidget.h
LaTeXHighlighter.cpp Update highlighting colors in runtime (dark/light) mode change 2023-09-05 11:14:59 +02:00
LaTeXHighlighter.h Update highlighting colors in runtime (dark/light) mode change 2023-09-05 11:14:59 +02:00
LayoutBox.cpp Make code a bit easier to read 2023-08-16 18:52:04 -04: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 Add GUI support for nomencl options 2024-08-22 08:11:18 +02:00
Menus.cpp Avoid a couple of copies. 2024-09-12 18:33:45 +02:00
Menus.h Move Lexer to support/ directory (and lyx::support namespace) 2024-04-28 12:23:13 +02:00
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 Handle multiple files in file and localfile BibTeX field (#12896) 2023-09-08 14:02:23 +02:00
qt_helpers.h Improve CITATION_OPEN 2023-08-30 15:30:29 +02:00
qt_i18n.h
README
TocModel.cpp Pass shared_ptr<> arguments by const reference 2024-09-13 14:54:43 +02:00
TocModel.h Pass shared_ptr<> arguments by const reference 2024-09-13 14:54:43 +02:00
TocWidget.cpp Fixup LFUN_REFERENCE_TO_PARAGRAPH for captions in other buffers 2024-07-30 12:36:20 +02:00
TocWidget.h Amend ac275a66b5 2023-09-18 09:27:38 +02:00
Toolbars.cpp Move Lexer to support/ directory (and lyx::support namespace) 2024-04-28 12:23:13 +02:00
Toolbars.h Move Lexer to support/ directory (and lyx::support namespace) 2024-04-28 12:23:13 +02:00
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.