lyx_mirror/src/frontends/qt4
Guillaume Munch bb344452c8 Consistency of ellipses across the UI
Use the function support:truncateWithEllipsis() to shorten a docstring with
... at the end. Actually we use U+2026 HORIZONTAL ELLIPSIS instead of "..." when
automatically shortening strings. This is to be consistent with Qt's own
truncation and is much nicer on the screen.

This includes the bugs #9575 and #9572 regarding broken text elision in the
outliner.

Known issues (non-regressions):

* TocBackend::updateItem() should be rewritten to update all TOCs. (#8386)

* "..." should be replaced with … everywhere else on the interface (including
  translation strings).

* We should prefer to rely on QFontMetrics::elidedText() to truncate strings
  with an ellipsis whenever possible, or an equivalent for the buffer view
  dependent on the font metrics. See the warning in src/support/lstrings.h.
2015-10-05 21:16:16 +01:00
..
ui Decrease height of citation dialog by using a QToolBox 2015-07-30 10:09:21 +02:00
.gitignore
Action.cpp Compilation fix for windows 2015-07-16 09:48:57 +02:00
Action.h Even more llvm/clang warnings 2013-05-02 19:22:10 +02:00
BulletsModule.cpp
BulletsModule.h
ButtonController.cpp
ButtonController.h
ButtonPolicy.cpp
ButtonPolicy.h
CategorizedCombo.cpp Squash warnings reported by gcc 4.9 2015-01-14 11:52:14 +01:00
CategorizedCombo.h Rescue monolithic build after 32fde61c8f. 2012-11-24 17:48:47 +01: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
ColorCache.h
CustomizedWidgets.cpp Do not pass objects by value 2015-09-12 19:22:51 +02:00
CustomizedWidgets.h Do not pass objects by value 2015-09-12 19:22:51 +02:00
Dialog.cpp If there is an inset at cursor, connect the dialog with that, not the containing one 2015-05-26 19:33:07 +02:00
Dialog.h Remove some header leftovers based on Scott's script hints. 2013-05-02 00:30:16 -07:00
DialogView.h
DockView.h
EmptyTable.cpp sign. 2015-05-02 11:38:46 +02:00
EmptyTable.h sign. 2015-05-02 11:38:46 +02:00
FancyLineEdit.cpp Prepare LyX code to compile and link with Qt5: 2013-02-03 19:26:21 +01:00
FancyLineEdit.h Prepare LyX code to compile and link with Qt5: 2013-02-03 19:26:21 +01:00
FileDialog.cpp #9245 replace Q_WS_MACX with Q_OS_MAC - the Q_OS_MAC macro is usable with Qt4 and Qt5. 2014-08-25 20:08:59 +02:00
FileDialog.h Forbid wrong compiler generated copy constructors 2015-09-20 19:43:06 +02:00
FindAndReplace.cpp Create proper undo groups for advanced find and replace 2015-05-22 16:42:10 +02:00
FindAndReplace.h Header cleanup cont. 2013-05-19 18:07:53 -07:00
FloatPlacement.cpp Add more Float tags to allow to disable wide and sideways feature 2015-05-22 18:59:17 +02:00
FloatPlacement.h Add more Float tags to allow to disable wide and sideways feature 2015-05-22 18:59:17 +02:00
GuiAbout.cpp GuiAbout: Detect and provide links to trac 2015-05-24 14:51:47 +02:00
GuiAbout.h
GuiAlert.cpp Add missing breaks 2015-09-12 19:58:15 +02:00
GuiApplication.cpp Add comment regarding fall through. 2015-09-20 12:34:49 -04:00
GuiApplication.h Fix compilation with qt5 and c++11 combined. 2015-08-24 21:05:48 +02:00
GuiBibitem.cpp Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
GuiBibitem.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiBibtex.cpp
GuiBibtex.h
GuiBox.cpp Complilation fix. 2015-05-19 12:56:31 +02:00
GuiBox.h Fix up GuiBox (use proper data/view separation and clean up) 2015-05-16 11:27:13 +02:00
GuiBranch.cpp Implement checkWidgets in the remaining InsetParamsWidget derived dialogs. 2015-04-02 17:03:08 +02:00
GuiBranch.h Implement checkWidgets in the remaining InsetParamsWidget derived dialogs. 2015-04-02 17:03:08 +02:00
GuiBranches.cpp Fix cppcheck variable scope warnings 2015-09-20 10:42:35 +02:00
GuiBranches.h
GuiChanges.cpp
GuiChanges.h
GuiCharacter.cpp Complilation fix. 2015-05-19 12:56:31 +02:00
GuiCharacter.h Use view/data separation for GuiCharacter colors, which makes it possible to sort the colors 2015-05-17 17:15:01 +02:00
GuiCitation.cpp Decrease height of citation dialog by using a QToolBox 2015-07-30 10:09:21 +02:00
GuiCitation.h Decrease height of citation dialog by using a QToolBox 2015-07-30 10:09:21 +02:00
GuiClipboard.cpp Small clean-up to debug support 2015-07-08 11:03:42 +02:00
GuiClipboard.h GuiLog: Use GuiClipboard to put the log on the clipboard 2014-04-29 15:38:35 +02:00
GuiCommandBuffer.cpp Auto feature for minibuffer toolbar 2015-07-15 17:41:09 +02:00
GuiCommandBuffer.h Auto feature for minibuffer toolbar 2015-07-15 17:41:09 +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
GuiCompare.h
GuiCompareHistory.cpp Add very simple revision comparison for git. 2013-02-09 19:35:22 -08:00
GuiCompareHistory.h Header cleanup cont. 2013-05-19 18:07:53 -07:00
GuiCompleter.cpp Consistency of ellipses across the UI 2015-10-05 21:16:16 +01:00
GuiCompleter.h Header cleanup cont. 2013-05-19 18:07:53 -07:00
GuiDelimiter.cpp Extend the fix for #5760 to the cygwin xcb backend. 2015-05-30 17:25:36 +02:00
GuiDelimiter.h
GuiDialog.cpp
GuiDialog.h
GuiDocument.cpp Fix cppcheck variable scope warnings 2015-09-20 10:42:35 +02:00
GuiDocument.h Fix bug #4812 (Layout in local directory lost on Save As, Copying) 2015-05-13 22:02:13 +02:00
GuiErrorList.cpp Show Anyway button needs to be enabled/disabled in paramsToDialog. 2015-04-05 10:50:30 +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 checkWidgets in the remaining InsetParamsWidget derived dialogs. 2015-04-02 17:03:08 +02:00
GuiExternal.cpp Remove relative units from bounding box 2015-07-18 16:41:52 +02:00
GuiExternal.h
GuiFontExample.cpp
GuiFontExample.h
GuiFontLoader.cpp Solve the "soft-hyphen" (0x00ad) symbol problem. 2015-01-21 14:12:42 +01:00
GuiFontLoader.h
GuiFontMetrics.cpp Use QFontMetrics information for underlines (and friends) width and position 2015-09-08 10:44:03 +02:00
GuiFontMetrics.h Use QFontMetrics information for underlines (and friends) width and position 2015-09-08 10:44:03 +02:00
GuiGraphics.cpp Store InsetGraphics bounding box in parsed form 2015-07-18 17:02:54 +02:00
GuiGraphics.h Fix aspectratio UI 2015-01-04 10:05:42 +01:00
GuiGraphicsUi.h
GuiHSpace.cpp HSpace/VSpace: use a _signed_ length validator in the dialogs. 2015-06-26 13:19:12 +02:00
GuiHSpace.h Fix enabling/disabling in InsetParams derived dialogs (#9541) 2015-05-11 11:35:02 +02:00
GuiHyperlink.cpp Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
GuiHyperlink.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiIdListModel.cpp Audit all the LASSERT calls, and try to do something sensible at 2013-04-25 17:27:10 -04:00
GuiIdListModel.h
GuiImage.cpp Support units in external inset bbox 2015-07-16 22:06:35 +02:00
GuiImage.h
GuiInclude.cpp Remove unused variables found by cppcheck 2015-09-20 21:39:59 +02:00
GuiInclude.h
GuiIndex.cpp
GuiIndex.h
GuiIndices.cpp Fix cppcheck variable scope warnings 2015-09-20 10:42:35 +02: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 No need for default argument 2015-04-02 16:32:04 +02:00
GuiKeySymbol.cpp Fix key code 2014-10-08 10:57:58 +02:00
GuiKeySymbol.h Header cleanup cont. 2013-05-20 18:47:16 -07:00
GuiLabel.cpp Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
GuiLabel.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiLine.cpp Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
GuiLine.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiListings.cpp This is the result of an audit of all static variables, looking 2014-04-21 11:51:57 -04:00
GuiListings.h
GuiLog.cpp Report missing characters on conversion with XeTeX or LuaTeX (bug #9610) 2015-06-11 11:32:17 +02:00
GuiLog.h
GuiMathMatrix.cpp Fix bug #9153 (Using mathpanel to insert matrix creates extra space on top) 2014-06-06 16:14:24 +02:00
GuiMathMatrix.h
GuiNomenclature.cpp Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
GuiNomenclature.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiNote.cpp
GuiNote.h
GuiPainter.cpp Use QFontMetrics information for underlines (and friends) width and position 2015-09-08 10:44:03 +02:00
GuiPainter.h Use QFontMetrics information for underlines (and friends) width and position 2015-09-08 10:44:03 +02:00
GuiParagraph.cpp GuiParagraph: Fix remaining glitch when entering custom line spread 2015-06-13 12:31:03 +02:00
GuiParagraph.h Header cleanup cont. 2013-05-20 18:47:16 -07:00
GuiPhantom.cpp
GuiPhantom.h
GuiPrefs.cpp Initialize pointer members 2015-09-12 22:39:50 +02:00
GuiPrefs.h Remove printing support from LyX. 2015-05-27 18:13:08 -04:00
GuiPrintindex.cpp
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 On Linux show in crash message box the backtrace 2014-06-14 11:25:25 +02:00
GuiProgress.h On Linux show in crash message box the backtrace 2014-06-14 11:25:25 +02:00
GuiProgressView.cpp Fix cppcheck variable scope warnings 2015-09-20 10:42:35 +02:00
GuiProgressView.h Header cleanup cont. 2013-05-20 18:47:16 -07:00
GuiRef.cpp Fix indentation 2015-05-17 17:27:27 +02:00
GuiRef.h
GuiSearch.cpp Style 2014-02-04 10:37:29 +01:00
GuiSearch.h Adding wrap-around pop-up question to simple find and replace dialog (fixing enhancement request #1262). 2013-07-21 17:51:53 +01:00
GuiSelection.cpp Use the cached value GuiSelection::selection_supported_ 2014-04-29 15:17:15 +02:00
GuiSelection.h
GuiSelectionManager.cpp
GuiSelectionManager.h Remove ; from end of function definitions 2013-05-12 13:04:18 +02:00
GuiSendto.cpp Do not sort formats in BufferParams::exportableFormats 2013-03-24 18:06:32 +01:00
GuiSendto.h
GuiSetBorder.cpp qt5: Use Qt::WindowFlags instead of Qt::WFlags 2012-12-15 11:07:35 +01:00
GuiSetBorder.h qt5: Use Qt::WindowFlags instead of Qt::WFlags 2012-12-15 11:07:35 +01:00
GuiShowFile.cpp
GuiShowFile.h
GuiSpellchecker.cpp #9245 replace Q_WS_MACX with Q_OS_MAC - the Q_OS_MAC macro is usable with Qt4 and Qt5. 2014-08-25 20:08:59 +02:00
GuiSpellchecker.h
GuiSymbols.cpp Fix cppcheck variable scope warnings 2015-09-20 10:42:35 +02:00
GuiSymbols.h
GuiTabular.cpp Fix problems with immediate apply and length validators 2015-05-20 19:13:12 +02:00
GuiTabular.h Fix enabling/disabling in InsetParams derived dialogs (#9541) 2015-05-11 11:35:02 +02:00
GuiTabularCreate.cpp Use EmptyTable widget in TabularCreate dialog. 2015-05-01 18:11:57 +02:00
GuiTabularCreate.h
GuiTexinfo.cpp
GuiTexinfo.h Header cleanup cont. 2013-05-22 19:58:58 -07:00
GuiThesaurus.cpp
GuiThesaurus.h Header cleanup cont. 2013-05-22 19:58:58 -07:00
GuiToc.cpp Fix bug #9754 2015-09-13 00:45:22 +01:00
GuiToc.h Header cleanup cont. 2013-05-22 19:58:58 -07:00
GuiToolbar.cpp Auto feature for minibuffer toolbar 2015-07-15 17:41:09 +02:00
GuiToolbar.h Simplify the code for "auto" toolbars handling 2015-06-18 15:51:53 +02:00
GuiView.cpp Improvements to cursor highlighting in the source panel 2015-10-01 21:51:08 +01:00
GuiView.h Forbid wrong compiler generated copy constructors 2015-09-20 19:43:06 +02:00
GuiViewSource.cpp Improvements to cursor highlighting in the source panel 2015-10-01 21:51:08 +01:00
GuiViewSource.h Improvements to the display of the source. 2015-09-13 00:45:52 +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 checkWidgets in the remaining InsetParamsWidget derived dialogs. 2015-04-02 17:03:08 +02:00
GuiWorkArea_Private.h Squash warnings reported by gcc 4.9 2015-01-14 11:52:14 +01:00
GuiWorkArea.cpp Consistency of ellipses across the UI 2015-10-05 21:16:16 +01:00
GuiWorkArea.h Implement and bind buffer-move-{next,previous} 2015-04-08 14:12:52 -04:00
GuiWrap.cpp
GuiWrap.h
IconPalette.cpp
IconPalette.h
InGuiThread.cpp
InGuiThread.h
InsertTableWidget.cpp Compilation fix for windows 2015-07-16 09:48:57 +02:00
InsertTableWidget.h More llvm/clang warnings 2013-05-02 18:27:32 +02:00
InsetParamsDialog.cpp Fix problems with immediate apply and length validators 2015-05-20 19:13:12 +02:00
InsetParamsDialog.h Header cleanup cont. 2013-05-22 19:58:58 -07:00
InsetParamsWidget.cpp Fix warning 2015-03-31 17:08:04 +02:00
InsetParamsWidget.h Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
LaTeXHighlighter.cpp
LaTeXHighlighter.h
LayoutBox.cpp Forbid wrong compiler generated copy constructors 2015-09-20 19:43:06 +02:00
LayoutBox.h Forbid wrong compiler generated copy constructors 2015-09-20 19:43:06 +02:00
LengthCombo.cpp Remove relative units from bounding box 2015-07-18 16:41:52 +02:00
LengthCombo.h Remove relative units from bounding box 2015-07-18 16:41:52 +02:00
LyXFileDialog.cpp Fix file dialogs with Qt 5.2.0 and later. 2013-12-24 17:21:56 +01:00
LyXFileDialog.h
Makefile.am Remove support for precompiled headers for autotools 2015-09-25 12:05:40 +02:00
Menus.cpp Consistency of ellipses across the UI 2015-10-05 21:16:16 +01:00
Menus.h Forbid wrong compiler generated copy constructors 2015-09-20 19:43:06 +02:00
PanelStack.cpp Prefer svg icons. 2015-03-13 00:47:21 +01:00
PanelStack.h
qt_helpers.cpp Enhancements and bugfixes to the TOCs 2015-10-01 21:44:22 +01:00
qt_helpers.h Fix LaTeX length export of big numbers, part 2 (bug #9416) 2015-05-20 09:35:57 +02:00
qt_i18n.h
README
TocModel.cpp Fix compilation with MSVC in c++98 mode 2015-10-01 21:51:08 +01:00
TocModel.h Forbid wrong compiler generated copy constructors 2015-09-20 19:43:06 +02:00
TocWidget.cpp Enhancements and bugfixes to the TOCs 2015-10-01 21:44:22 +01:00
TocWidget.h
Toolbars.cpp Auto feature for minibuffer toolbar 2015-07-15 17:41:09 +02:00
Toolbars.h Auto feature for minibuffer toolbar 2015-07-15 17:41:09 +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.