lyx_mirror/src/frontends/qt4
Abdelrazak Younes f745a9c3c5 Take care of cursor update flags correctly and redraw if needed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21739 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-23 11:45:20 +00:00
..
ui Use QSettings for session management of windows geometry. This commit also removes the possibility to fix the window dimensions in the RC file. Instead we have now a single check box for enabling/disabling geometry session management. 2007-11-15 12:58:44 +00:00
Action.cpp reduce line noise 2007-11-15 20:04:51 +00:00
Action.h
BulletsModule.cpp
BulletsModule.h
ButtonController.cpp reduce line noise 2007-11-15 20:04:51 +00:00
ButtonController.h Remove unused code. 2007-11-22 22:20:51 +00:00
ButtonPolicy.cpp Move Dialog.{h,cpp} and ButtonPolicy.{h,cpp} to frontends/qt4/ 2007-11-22 08:01:09 +00:00
ButtonPolicy.h Move Dialog.{h,cpp} and ButtonPolicy.{h,cpp} to frontends/qt4/ 2007-11-22 08:01:09 +00:00
ColorCache.cpp
ColorCache.h
CustomizedWidgets.cpp
CustomizedWidgets.h
Dialog.cpp Simplify Dialog::name() handling. 2007-11-23 10:45:14 +00:00
Dialog.h Simplify Dialog::name() handling. 2007-11-23 10:45:14 +00:00
DialogView.h Simplify Dialog::name() handling. 2007-11-23 10:45:14 +00:00
DockView.h Simplify Dialog::name() handling. 2007-11-23 10:45:14 +00:00
EmptyTable.cpp
EmptyTable.h
FileDialog.cpp reduce line noise 2007-11-15 20:04:51 +00:00
FloatPlacement.cpp
FloatPlacement.h
GuiAbout.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiAbout.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiAlert.cpp Spoiling some fun from Andre': put Application on a diet and remove unnecessary string conversions and method indirections. 2007-11-18 20:36:52 +00:00
GuiApplication.cpp simplify window creation. 2007-11-23 09:56:33 +00:00
GuiApplication.h simplify window creation. 2007-11-23 09:56:33 +00:00
GuiBibitem.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiBibitem.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiBibtex.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiBibtex.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiBox.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiBox.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiBranch.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiBranch.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiBranches.cpp
GuiBranches.h
GuiChanges.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiChanges.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiCharacter.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiCharacter.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiCitation.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiCitation.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiClipboard.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiClipboard.h
GuiCommandBuffer.cpp Fix the disappearing minibuffer by don't pretending we are flexible. 2007-11-14 11:14:06 +00:00
GuiCommandBuffer.h Some more cosmetics and removal of unused methods in GuiView. 2007-11-13 14:04:32 +00:00
GuiCommandEdit.cpp
GuiCommandEdit.h
GuiDelimiter.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiDelimiter.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiDialog.cpp Simplify Dialog::name() handling. 2007-11-23 10:45:14 +00:00
GuiDialog.h Simplify Dialog::name() handling. 2007-11-23 10:45:14 +00:00
GuiDocument.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiDocument.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiErrorList.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiErrorList.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiERT.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiERT.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiExternal.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiExternal.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiFloat.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiFloat.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiFontExample.cpp
GuiFontExample.h
GuiFontLoader.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiFontLoader.h
GuiFontMetrics.cpp remove #includes; cosmetics 2007-11-13 23:00:36 +00:00
GuiFontMetrics.h
GuiGraphics.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiGraphics.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiGraphicsUi.h
GuiHyperlink.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiHyperlink.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiImage.cpp forgot those 2007-11-22 00:04:19 +00:00
GuiImage.h forgot those 2007-11-22 00:04:19 +00:00
GuiInclude.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiInclude.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiIndex.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiIndex.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiKeySymbol.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiKeySymbol.h
GuiListings.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiListings.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiLog.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiLog.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiMath.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiMath.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiMathMatrix.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiMathMatrix.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiMenubar.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiMenubar.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiNomencl.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiNomencl.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiNote.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiNote.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiPainter.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiPainter.h
GuiParagraph.cpp Simplify Dialog::name() handling. 2007-11-23 10:45:14 +00:00
GuiParagraph.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiPopupMenu.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiPopupMenu.h
GuiPrefs.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiPrefs.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiPrint.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiPrint.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiRef.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiRef.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiSearch.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiSearch.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiSelection.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiSelection.h remove #includes; cosmetics 2007-11-13 23:00:36 +00:00
GuiSelectionManager.cpp
GuiSelectionManager.h
GuiSendto.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiSendto.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiSetBorder.cpp
GuiSetBorder.h
GuiShowFile.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiShowFile.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiSpellchecker.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiSpellchecker.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiTabular.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiTabular.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiTabularCreate.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiTabularCreate.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiTexinfo.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiTexinfo.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiThesaurus.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiThesaurus.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiToc.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiToc.h
GuiToolbar.cpp Fix initial disabling of the layout combo. 2007-11-20 22:29:17 +00:00
GuiToolbar.h - Cleanup and simplify the layout list GUI handling. 2007-11-20 22:03:56 +00:00
GuiToolbars.cpp Introducing Application::resetGui() that will reset all dialogs in all lyx windows (including toolbars and menubars). 2007-11-21 15:12:47 +00:00
GuiToolbars.h - Cleanup and simplify the layout list GUI handling. 2007-11-20 22:03:56 +00:00
GuiView.cpp Take care of cursor update flags correctly and redraw if needed. 2007-11-23 11:45:20 +00:00
GuiView.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiViewSource.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiViewSource.h
GuiVSpace.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiVSpace.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiWorkArea.cpp get rid of a boost::signals::connection 2007-11-21 21:15:23 +00:00
GuiWorkArea.h get rid of a boost::signals::connection 2007-11-21 21:15:23 +00:00
GuiWrap.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiWrap.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
IconPalette.cpp
IconPalette.h
InsertTableWidget.cpp Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
InsertTableWidget.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
LaTeXHighlighter.cpp
LaTeXHighlighter.h
LengthCombo.cpp
LengthCombo.h
LyXFileDialog.cpp Spoiling some fun from Andre': put Application on a diet and remove unnecessary string conversions and method indirections. 2007-11-18 20:36:52 +00:00
LyXFileDialog.h
Makefile.am Move Dialog.{h,cpp} and ButtonPolicy.{h,cpp} to frontends/qt4/ 2007-11-22 08:01:09 +00:00
PanelStack.cpp reduce line noise 2007-11-15 20:04:51 +00:00
PanelStack.h
pch.h
qlkey.h
qt_helpers.cpp Fix bug 2738: Wrong sorting of languages in Document dialog 2007-11-14 02:01:50 +00:00
qt_helpers.h
README
TocModel.cpp reduce line noise 2007-11-15 20:04:51 +00:00
TocModel.h cosmetics 2007-11-14 00:21:31 +00:00
TocWidget.cpp reduce line noise 2007-11-15 20:04:51 +00:00
TocWidget.h
Validator.cpp cosmetics 2007-11-14 00:21:31 +00:00
Validator.h cosmetics 2007-11-14 00:21:31 +00: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.