lyx_mirror/src/frontends/qt4
André Pönitz 58296b3994 next one
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20764 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-05 22:27:04 +00:00
..
ui small cleanup 2007-10-05 11:58:34 +00:00
Action.cpp shuffle some code around 2007-10-03 18:56:37 +00:00
Action.h cosmetics 2007-09-28 23:14:33 +00:00
alert_pimpl.cpp shuffle stuff around; minor coding style issues 2007-09-15 15:42:22 +00:00
BulletsModule.cpp
BulletsModule.h Why would boost::array<Bullet, 4> be better than Bullet[4]? 2007-09-15 23:04:28 +00:00
ButtonController.cpp ButtonController.cpp: fix a bug introduced in r20018: don't enable all widgets in the dialog, see http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg128222.html 2007-09-27 21:03:26 +00:00
ButtonController.h extract code that sets color of widget from ButtonController and move to qt_helpers 2007-09-15 13:06:48 +00:00
ColorCache.cpp
ColorCache.h
Dialogs.cpp next one 2007-10-05 22:27:04 +00:00
DialogView.h put widget in layout 2007-09-28 12:34:35 +00:00
DockView.h more bug fixes... 2007-09-26 20:18:41 +00:00
EmptyTable.cpp
EmptyTable.h
FileDialog.cpp shuffle stuff around; minor coding style issues 2007-09-15 15:42:22 +00:00
FloatPlacement.cpp
FloatPlacement.h
GuiAbout.cpp
GuiAbout.h
GuiApplication.cpp * DialogView: Initial Window geometry session support. 2007-09-27 14:05:05 +00:00
GuiApplication.h consmetics 2007-09-15 22:56:09 +00:00
GuiBibitem.cpp This is the first part of a cleanup of how we handle the InsetCommand hierarchy. This part starts to disentangle the type of the inset from the command that a single instance of the inset represents. This involves two sorts of changes: 2007-09-27 18:24:18 +00:00
GuiBibitem.h
GuiBibtex.cpp
GuiBibtex.h
GuiBox.cpp GuiBox.cpp: fix update of height checkbox 2007-10-05 00:36:38 +00:00
GuiBox.h GuiBox.cpp: fix update of height checkbox 2007-10-05 00:36:38 +00:00
GuiBranch.cpp
GuiBranch.h
GuiBranches.cpp
GuiBranches.h
GuiChanges.cpp
GuiChanges.h
GuiCharacter.cpp Add session support to some more dialogs. 2007-09-27 14:59:51 +00:00
GuiCharacter.h
GuiCitation.cpp Add session support to some more dialogs. 2007-09-27 14:59:51 +00:00
GuiCitation.h Repair behavior of citation dialog after all the recent changes in src/frontends/. Previously, there had been a virtual initialiseParams() method in QCitation which overrode the corresponding method in ControlCitation. But now there is no "local" controller, and so intialiseParams() overrode nothing and so never got called. 2007-09-15 01:53:26 +00:00
GuiClipboard.cpp GuiClipboard.cpp: add missing ";" 2007-10-01 00:11:21 +00:00
GuiClipboard.h Fix slowness issue with Clipboard. Cache the Clipboard status when the data is changed. 2007-09-30 20:28:15 +00:00
GuiCommandBuffer.cpp
GuiCommandBuffer.h
GuiCommandEdit.cpp
GuiCommandEdit.h
GuiDelimiter.cpp remove uneeded code; 2007-10-04 17:35:27 +00:00
GuiDelimiter.h
GuiDialog.cpp start dissolving frontends/controllers. 40 steps to go. 2007-10-05 19:04:38 +00:00
GuiDialog.h start dissolving frontends/controllers. 40 steps to go. 2007-10-05 19:04:38 +00:00
GuiDocument.cpp cosmetics 2007-09-29 20:02:32 +00:00
GuiDocument.h Pavel Sanda's "PDFOptions" patch 2007-09-20 22:31:18 +00:00
GuiEmbeddedFiles.cpp Embedding: handle readOnly files correctly. 2007-09-13 15:09:56 +00:00
GuiEmbeddedFiles.h
GuiErrorList.cpp
GuiErrorList.h
GuiERT.cpp 37 or so 2007-10-05 21:06:08 +00:00
GuiERT.h 37 or so 2007-10-05 21:06:08 +00:00
GuiExternal.cpp
GuiExternal.h
GuiFloat.cpp next one 2007-10-05 22:08:56 +00:00
GuiFloat.h next one 2007-10-05 22:08:56 +00:00
GuiFontExample.cpp
GuiFontExample.h
GuiFontLoader.cpp consmetics 2007-09-15 22:56:09 +00:00
GuiFontLoader.h consmetics 2007-09-15 22:56:09 +00:00
GuiFontMetrics.cpp
GuiFontMetrics.h
GuiGraphics.cpp Add session support to some more dialogs. 2007-09-27 14:59:51 +00:00
GuiGraphics.h
GuiGraphicsUi.h
GuiImage.cpp Remove warnings reported with gcc 4.3: 2007-09-16 10:36:57 +00:00
GuiImage.h
GuiImplementation.cpp
GuiImplementation.h
GuiInclude.cpp
GuiInclude.h
GuiIndex.cpp This is the first part of a cleanup of how we handle the InsetCommand hierarchy. This part starts to disentangle the type of the inset from the command that a single instance of the inset represents. This involves two sorts of changes: 2007-09-27 18:24:18 +00:00
GuiIndex.h
GuiKeySymbol.cpp cosmetics 2007-10-02 21:51:54 +00:00
GuiKeySymbol.h cosmetics 2007-10-02 21:51:54 +00:00
GuiListings.cpp next one 2007-10-05 21:53:54 +00:00
GuiListings.h next one 2007-10-05 21:53:54 +00:00
GuiLog.cpp
GuiLog.h
GuiMathMatrix.cpp
GuiMathMatrix.h
GuiMenubar.cpp fix compilation on mac 2007-10-02 07:51:25 +00:00
GuiMenubar.h fix compilation on mac 2007-10-02 07:51:25 +00:00
GuiNomencl.cpp This is the first part of a cleanup of how we handle the InsetCommand hierarchy. This part starts to disentangle the type of the inset from the command that a single instance of the inset represents. This involves two sorts of changes: 2007-09-27 18:24:18 +00:00
GuiNomencl.h
GuiNote.cpp 38... 2007-10-05 20:43:26 +00:00
GuiNote.h 38... 2007-10-05 20:43:26 +00:00
GuiPainter.cpp consmetics 2007-09-15 22:56:09 +00:00
GuiPainter.h
GuiParagraph.cpp * GuiParagraph: uncheck "Immediate Apply" by default. 2007-09-28 23:30:19 +00:00
GuiParagraph.h * qt4/DialogView.h: new template class based on QDialog. 2007-09-27 11:27:52 +00:00
GuiPopupMenu.cpp cosmetics 2007-09-28 23:14:33 +00:00
GuiPopupMenu.h
GuiPrefs.cpp Silence a warning. 2007-09-20 04:27:16 +00:00
GuiPrefs.h * new file formats panel that includes copier 2007-09-15 17:09:57 +00:00
GuiPrint.cpp
GuiPrint.h
GuiRef.cpp 39 to go 2007-10-05 20:16:05 +00:00
GuiRef.h start dissolving frontends/controllers. 40 steps to go. 2007-10-05 19:04:38 +00:00
GuiSearch.cpp Add session support to spell-checking and search dialogs. 2007-09-27 14:37:36 +00:00
GuiSearch.h
GuiSelection.cpp Potentially fix slowness issue with Selection. Cache the Selection status when the data is changed. 2007-10-01 08:18:14 +00:00
GuiSelection.h Potentially fix slowness issue with Selection. Cache the Selection status when the data is changed. 2007-10-01 08:18:14 +00:00
GuiSelectionManager.cpp Repair behavior of citation dialog after all the recent changes in src/frontends/. Previously, there had been a virtual initialiseParams() method in QCitation which overrode the corresponding method in ControlCitation. But now there is no "local" controller, and so intialiseParams() overrode nothing and so never got called. 2007-09-15 01:53:26 +00:00
GuiSelectionManager.h Repair behavior of citation dialog after all the recent changes in src/frontends/. Previously, there had been a virtual initialiseParams() method in QCitation which overrode the corresponding method in ControlCitation. But now there is no "local" controller, and so intialiseParams() overrode nothing and so never got called. 2007-09-15 01:53:26 +00:00
GuiSendto.cpp
GuiSendto.h
GuiSetBorder.cpp
GuiSetBorder.h
GuiShowFile.cpp
GuiShowFile.h
GuiSpellchecker.cpp Add session support to spell-checking and search dialogs. 2007-09-27 14:37:36 +00:00
GuiSpellchecker.h
GuiTabular.cpp Add session support to some more dialogs. 2007-09-27 14:59:51 +00:00
GuiTabular.h
GuiTabularCreate.cpp
GuiTabularCreate.h
GuiTexinfo.cpp compile fix 2007-09-17 23:00:53 +00:00
GuiTexinfo.h
GuiThesaurus.cpp Add session support to some more dialogs. 2007-09-27 14:59:51 +00:00
GuiThesaurus.h
GuiToc.cpp
GuiToc.h
GuiToolbar.cpp shuffle stuff around 2007-10-03 22:28:53 +00:00
GuiToolbar.h Some fixes and cleanup to command buffer. 2007-10-02 06:59:02 +00:00
GuiToolbars.cpp Some fixes and cleanup to command buffer. 2007-10-02 06:59:02 +00:00
GuiToolbars.h Some fixes and cleanup to command buffer. 2007-10-02 06:59:02 +00:00
GuiURL.cpp This is the first part of a cleanup of how we handle the InsetCommand hierarchy. This part starts to disentangle the type of the inset from the command that a single instance of the inset represents. This involves two sorts of changes: 2007-09-27 18:24:18 +00:00
GuiURL.h
GuiView.cpp Transfer the setting of the current LyXView from workArea::focusInEvent() to GuiView activation event. 2007-10-04 15:46:58 +00:00
GuiView.h Move most of the Gui specific code in Toolbars to its new qt4 specialization GuiToolbars. 2007-10-01 20:45:50 +00:00
GuiViewSource.cpp
GuiViewSource.h
GuiVSpace.cpp next one 2007-10-05 22:27:04 +00:00
GuiVSpace.h next one 2007-10-05 22:27:04 +00:00
GuiWorkArea.cpp Transfer the setting of the current LyXView from workArea::focusInEvent() to GuiView activation event. 2007-10-04 15:46:58 +00:00
GuiWorkArea.h
GuiWrap.cpp 39 to go 2007-10-05 20:16:05 +00:00
GuiWrap.h 39 to go 2007-10-05 20:16:05 +00:00
IconPalette.cpp listen to andré 2007-10-01 17:40:42 +00:00
IconPalette.h cosmetics 2007-09-28 22:26:28 +00:00
InsertTableWidget.cpp
InsertTableWidget.h
LengthCombo.cpp
LengthCombo.h
LyXFileDialog.cpp
LyXFileDialog.h
Makefile.am configure chack for rcc 2007-10-04 16:57:16 +00:00
PanelStack.cpp
PanelStack.h
pch.h the delegate patch 2007-10-02 18:27:20 +00:00
qlkey.h shuffle stuff around; minor coding style issues 2007-09-15 15:42:22 +00:00
qt_helpers.cpp shuffle stuff around; minor coding style issues 2007-09-15 15:42:22 +00:00
qt_helpers.h shuffle stuff around; minor coding style issues 2007-09-15 15:42:22 +00:00
README
TocModel.cpp Remove warnings reported with gcc 4.3: 2007-09-16 10:36:57 +00:00
TocModel.h
TocWidget.cpp
TocWidget.h
Validator.cpp
Validator.h

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.