lyx_mirror/src/frontends/qt4
Juergen Spitzmueller 6dc1884d05 Mark some intentional fall-throughs (in a way understandable to gcc)
This silences -Wimplicit-fallthrough warnings with gcc7.
2017-08-12 08:57:02 +02:00
..
ui Use the OK/Apply paradigm for all document settings 2017-08-10 01:32:23 +02:00
.gitignore
Action.cpp Action.cpp: replace a reference with a shared_ptr 2016-08-28 22:49:21 +01:00
Action.h Action.cpp: replace a reference with a shared_ptr 2016-08-28 22:49:21 +01:00
BulletsModule.cpp
BulletsModule.h
ButtonController.cpp Replace foreach with for 2016-06-12 19:17:33 +01:00
ButtonController.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
ButtonPolicy.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
ButtonPolicy.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
CategorizedCombo.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
CategorizedCombo.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
CMakeLists.txt Add Qt's Svg module to the list of used modules. This is required to allow the use of e.g. the QSvgRenderer class. 2015-05-19 22:46:26 +02:00
ColorCache.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
ColorCache.h
CustomizedWidgets.cpp ShortcutWidget: override shortcuts in the way they are meant to be (#10075) 2016-05-20 19:14:35 +01:00
CustomizedWidgets.h ShortcutWidget: override shortcuts in the way they are meant to be (#10075) 2016-05-20 19:14:35 +01:00
Dialog.cpp Clarify that the Dialog::lyxview_ pointer is in fact a reference 2016-09-29 12:37:19 +02:00
Dialog.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
DialogView.cpp Fix warning during runtime with qt4 2016-11-09 23:37:35 +01:00
DialogView.h Fix warning during runtime with qt4 2016-11-09 23:37:35 +01:00
DockView.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
DockView.h Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
EmptyTable.cpp sign. 2015-05-02 11:38:46 +02:00
EmptyTable.h sign. 2015-05-02 11:38:46 +02:00
FancyLineEdit.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
FancyLineEdit.h Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
FileDialog.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
FileDialog.h Forbid wrong compiler generated copy constructors 2015-09-20 19:43:06 +02:00
FindAndReplace.cpp Rationalise includes 2016-07-04 02:42:17 +02:00
FindAndReplace.h
FloatPlacement.cpp InsetFloat: allow float placement for rotated floats 2017-04-15 06:57:52 +02:00
FloatPlacement.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiAbout.cpp Always present Qt version info in LyX About dialog - not for developer version only 2016-06-19 11:53:20 +02:00
GuiAbout.h
GuiAlert.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiApplication.cpp Mark some intentional fall-throughs (in a way understandable to gcc) 2017-08-12 08:57:02 +02:00
GuiApplication.h Unhide buffers that are marked dirty as a result of external modifications 2017-06-11 19:51:17 +02:00
GuiBibitem.cpp Extend LATEXIFY command param handling and add literal param. 2017-01-30 07:44:55 +01:00
GuiBibitem.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiBibtex.cpp Support for multiple bibliographies 2017-02-04 12:02:00 +01:00
GuiBibtex.h Biblatex support 2017-01-08 09:39:46 +01:00
GuiBox.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiBox.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiBranch.cpp Introduce "inverted" branch insets: These are branches whose content 2016-07-11 23:56:32 -04:00
GuiBranch.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiBranches.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiBranches.h
GuiChanges.cpp GuiChanges: provide feedback when there are no more changes 2016-05-29 17:55:42 -04:00
GuiChanges.h GuiChanges: provide feedback when there are no more changes 2016-05-29 17:55:42 -04:00
GuiCharacter.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiCharacter.h Add support to cross out characters 2017-04-05 00:01:19 +02:00
GuiCitation.cpp Fix unitialized member 2017-07-06 14:45:21 +02:00
GuiCitation.h Correct restoration of citation style selection between engine switches 2017-06-10 14:29:07 +02:00
GuiClipboard.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiClipboard.h Remove using directives from headers 2016-06-26 18:22:59 +02:00
GuiCommandBuffer.cpp Make "devel mode" configurable at run time 2017-07-24 22:00:44 +02:00
GuiCommandBuffer.h Make "devel mode" configurable at run time 2017-07-24 22:00:44 +02:00
GuiCommandEdit.cpp Auto feature for minibuffer toolbar 2015-07-15 17:41:09 +02:00
GuiCommandEdit.h Auto feature for minibuffer toolbar 2015-07-15 17:41:09 +02:00
GuiCompare.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiCompare.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
GuiCompareHistory.cpp
GuiCompareHistory.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
GuiCompleter.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiCompleter.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
GuiDelimiter.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiDelimiter.h From c7899a30a0b5975bf599a69ecd11ab25e1cdf1a4 Mon Sep 17 00:00:00 2001 2016-12-28 16:34:44 +01:00
GuiDialog.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiDialog.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
GuiDocument.cpp Use the OK/Apply paradigm for all document settings 2017-08-10 01:32:23 +02:00
GuiDocument.h Use the OK/Apply paradigm for all document settings 2017-08-10 01:32:23 +02:00
GuiErrorList.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiErrorList.h Button for showing PDF if compilation error 2015-04-04 13:13:19 -04:00
GuiERT.cpp Implement checkWidgets in the remaining InsetParamsWidget derived dialogs. 2015-04-02 17:03:08 +02:00
GuiERT.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiExternal.cpp Sort external templates locale-aware 2017-08-09 16:09:50 +02:00
GuiExternal.h
GuiFontExample.cpp
GuiFontExample.h
GuiFontLoader.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiFontLoader.h
GuiFontMetrics.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiFontMetrics.h Use the same code for editable and non-editable buttons 2017-06-15 15:40:30 +02:00
GuiGraphics.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiGraphics.h Revert "Create new graphics from within LyX choosing a sample file to copy from." 2017-05-06 09:21:50 +02:00
GuiGraphicsUi.h
GuiHSpace.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiHSpace.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiHyperlink.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiHyperlink.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiIdListModel.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiIdListModel.h Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiImage.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiImage.h
GuiInclude.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiInclude.h
GuiIndex.cpp
GuiIndex.h
GuiIndices.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiIndices.h GuiIndices: Improve widget disabling and account for read only status 2015-06-03 16:54:54 +02:00
GuiInfo.cpp GuiInfo: implement checkWidgets. 2015-04-01 10:07:20 +02:00
GuiInfo.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiKeySymbol.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiKeySymbol.h Prioritize the shortcuts from the work areas 2016-07-14 20:50:10 +01:00
GuiLabel.cpp Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
GuiLabel.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiLine.cpp Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
GuiLine.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiListings.cpp Fix a small glitch 2017-06-07 15:31:13 +02:00
GuiListings.h
GuiLog.cpp {Over,under}full [hv]box warning is a warning. 2017-07-24 09:09:48 +02:00
GuiLog.h Amend fd4d23b4 2016-01-12 21:25:34 +00:00
GuiMathMatrix.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiMathMatrix.h
GuiNomenclature.cpp Extend LATEXIFY command param handling and add literal param. 2017-01-30 07:44:55 +01:00
GuiNomenclature.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiNote.cpp
GuiNote.h
GuiPainter.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiPainter.h Use the same code for editable and non-editable buttons 2017-06-15 15:40:30 +02:00
GuiParagraph.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiParagraph.h
GuiPhantom.cpp
GuiPhantom.h
GuiPrefs.cpp prefs/needauth: avoid show of warning dialog in corner cases (amending [8a4fcd3d/lyxgit]) 2017-07-27 20:00:41 +02:00
GuiPrefs.h prefs/needauth: added warning if user tries to disable authorization for needauth converters. 2017-07-27 00:05:45 +02:00
GuiPrintindex.cpp Extend LATEXIFY command param handling and add literal param. 2017-01-30 07:44:55 +01:00
GuiPrintindex.h
GuiPrintNomencl.cpp Fix enabling/disabling in InsetParams derived dialogs (#9541) 2015-05-11 11:35:02 +02:00
GuiPrintNomencl.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiProgress.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiProgress.h On Linux show in crash message box the backtrace 2014-06-14 11:25:25 +02:00
GuiProgressView.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiProgressView.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
GuiRef.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiRef.h Add ability to use refstyle's plural and capitalization features. 2017-01-02 22:32:36 -05:00
GuiSearch.cpp Move wrap check for simple search/replace to lyxfind 2016-09-14 10:23:39 +02:00
GuiSearch.h Move wrap check for simple search/replace to lyxfind 2016-09-14 10:23:39 +02:00
GuiSelection.cpp Use the cached value GuiSelection::selection_supported_ 2014-04-29 15:17:15 +02:00
GuiSelection.h
GuiSelectionManager.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiSelectionManager.h Fix 18 memory leaks 2017-02-26 22:16:10 +01:00
GuiSendto.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiSendto.h There is no need now to cache format information in the SendTo 2016-10-20 23:07:13 -04:00
GuiSetBorder.cpp Disable setting vertical lines when using a formal table 2015-11-02 15:58:40 +01:00
GuiSetBorder.h
GuiShowFile.cpp
GuiShowFile.h
GuiSpellchecker.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiSpellchecker.h
GuiSymbols.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiSymbols.h
GuiTabular.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiTabular.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiTabularCreate.cpp Use EmptyTable widget in TabularCreate dialog. 2015-05-01 18:11:57 +02:00
GuiTabularCreate.h
GuiTexinfo.cpp Show Biblatex files in the TeXInfo dialog 2017-01-01 11:34:35 +01:00
GuiTexinfo.h Show Biblatex files in the TeXInfo dialog 2017-01-01 11:34:35 +01:00
GuiThesaurus.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiThesaurus.h
GuiToc.cpp Remove a redundant deletion of a QObject 2016-12-31 15:16:15 +01:00
GuiToc.h Remove a redundant deletion of a QObject 2016-12-31 15:16:15 +01:00
GuiToolbar.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
GuiToolbar.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
GuiView.cpp Mark some intentional fall-throughs (in a way understandable to gcc) 2017-08-12 08:57:02 +02:00
GuiView.h The shell escape patch 2017-08-03 13:07:41 +02:00
GuiViewSource.cpp Make "devel mode" configurable at run time 2017-07-24 22:00:44 +02:00
GuiViewSource.h Fix warning during runtime with qt4 2016-11-09 23:37:35 +01:00
GuiVSpace.cpp HSpace/VSpace: use a _signed_ length validator in the dialogs. 2015-06-26 13:19:12 +02:00
GuiVSpace.h Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
GuiWorkArea_Private.h The shell escape patch 2017-08-03 13:07:41 +02:00
GuiWorkArea.cpp The shell escape patch 2017-08-03 13:07:41 +02:00
GuiWorkArea.h Clean up 2017-03-18 15:09:07 +01:00
GuiWrap.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
GuiWrap.h
IconPalette.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
IconPalette.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
InGuiThread.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
InGuiThread.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
InsertTableWidget.cpp Compilation fix for windows 2015-07-16 09:48:57 +02:00
InsertTableWidget.h
InsetParamsDialog.cpp Implement proper dialog titles in InsetParamsDialogs 2016-08-26 11:35:12 +02:00
InsetParamsDialog.h
InsetParamsWidget.cpp Fix warning 2015-03-31 17:08:04 +02:00
InsetParamsWidget.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
LaTeXHighlighter.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
LaTeXHighlighter.h Trivial clean-up 2016-08-28 02:34:54 +01:00
LayoutBox.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
LayoutBox.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
LengthCombo.cpp Remove relative units from bounding box 2015-07-18 16:41:52 +02:00
LengthCombo.h Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
LyXFileDialog.cpp Remove context help button hint from file dialogs 2016-10-10 01:25:07 +02:00
LyXFileDialog.h
Makefile.am Fix whitespace in some more files. 2017-07-03 14:46:27 -04:00
Menus.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
Menus.h Forbid wrong compiler generated copy constructors 2015-09-20 19:43:06 +02:00
PanelStack.cpp Fix minor whitespace error. 2017-07-17 22:23:17 +02:00
PanelStack.h
qt_helpers.cpp Sort external templates locale-aware 2017-08-09 16:09:50 +02:00
qt_helpers.h Sort external templates locale-aware 2017-08-09 16:09:50 +02:00
qt_i18n.h
README
TocModel.cpp Make the generation of children's tocs more robust 2017-01-14 23:13:14 +01:00
TocModel.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
TocWidget.cpp TocWidget: Remove possibly dangling BufferView pointer 2016-12-31 15:16:15 +01:00
TocWidget.h TocWidget: fix an erroneous collapse and optimise updates based on profiling 2016-05-31 00:14:13 +01:00
Toolbars.cpp Use a typedef for vector<Format const *>, which is what gets used 2016-10-20 23:07:13 -04:00
Toolbars.h Action.cpp: replace a reference with a shared_ptr 2016-08-28 22:49:21 +01:00
ToolTipFormatter.cpp Check the validity of an item before querying its tooltip 2016-12-03 23:35:15 +01:00
ToolTipFormatter.h Line breaks in tooltips 2016-07-03 17:28:45 +02:00
Validator.cpp Fix problems with immediate apply and length validators 2015-05-20 19:13:12 +02:00
Validator.h Fix problems with immediate apply and length validators 2015-05-20 19:13:12 +02:00

This file contains some do's and dont's for the Qt4 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.