lyx_mirror/src/frontends/qt4
Jean-Marc Lasgouttes cdb78de525 * MenuBackend.cpp (binding): remove forgui argument
* frontends/qt4/GuiPopupMenu.cpp (addBinding): remove (merge into
	getLabel and remove mac-specific code).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22412 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-07 10:53:04 +00:00
..
ui Embedding: add embedCB checkboxes to IncludeUi and ExternalUi 2008-01-07 06:46:32 +00:00
Action.cpp Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/. 2007-11-29 07:04:28 +00:00
Action.h
BulletsModule.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
BulletsModule.h
ButtonController.cpp Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/. 2007-11-29 07:04:28 +00:00
ButtonController.h Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/. 2007-11-29 07:04:28 +00:00
ButtonPolicy.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +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 getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
Dialog.h Add common session handling infrastructure for dialogs. 2007-12-10 13:05:00 +00:00
DialogView.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
DialogView.h Add common session handling infrastructure for dialogs. 2007-12-10 13:05:00 +00:00
DockView.h Add common session handling infrastructure for dialogs. 2007-12-10 13:05:00 +00:00
EmptyTable.cpp
EmptyTable.h
FileDialog.cpp * get rid of support::absolutePath() 2007-12-17 16:04:46 +00:00
FloatPlacement.cpp 'using namespace lyx::support' instead of 'using support::xxx' 2007-12-12 18:57:56 +00:00
FloatPlacement.h
GuiAbout.cpp Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/. 2007-11-29 07:04:28 +00:00
GuiAbout.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiAlert.cpp remove a few toutf8 conversion that are done by lyxerr nowadays 2007-12-12 20:35:55 +00:00
GuiApplication.cpp Transfer global mac menu bar initialization to GuiApplication ctor. 2007-12-26 09:54:48 +00:00
GuiApplication.h Simplify MenuBackend and menubar interactions. 2007-12-26 10:55:43 +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 Support for \nocite* from Berhard Reiter. Increments file format to 210. 2007-12-28 16:56:57 +00:00
GuiBibtex.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiBox.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
GuiBox.h framed.sty goes InsetBox: 2007-12-04 09:25:50 +00:00
GuiBranch.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +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 getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiCharacter.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiCitation.cpp Support for nocite, provided by Bernhard Reiter. 2007-12-20 15:46:14 +00:00
GuiCitation.h Support for nocite, provided by Bernhard Reiter. 2007-12-20 15:46:14 +00:00
GuiClipboard.cpp Fix multiple cell pasting on Windows and Mac (bug 4436): 2007-12-28 15:56:05 +00:00
GuiClipboard.h Fix multiple cell pasting on Windows and Mac (bug 4436): 2007-12-28 15:56:05 +00:00
GuiCommandBuffer.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +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 getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiDelimiter.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiDialog.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiDialog.h Factorize general code out of GuiDialog and into the base Dialog class. This is now possible thanks to the moving of Dialog.{cpp,h} to qt4/. Any dialog must inherit QWidget within Qt so it is safe to use Dialog::asQWidget() method (which is similar to dynamic casting). 2007-12-09 22:35:04 +00:00
GuiDocument.cpp Crash fix. 2008-01-06 16:52:00 +00:00
GuiDocument.h Implement checks for available modules both in BufferParams and in the gui. 2008-01-05 16:56:30 +00:00
GuiErrorList.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiErrorList.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiERT.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiERT.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiExternal.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiExternal.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiFloat.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +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 getting rid of superfluous lyx::support:: statements. 2007-12-12 19:57:42 +00:00
GuiFontLoader.h fix memory leaks 2007-12-02 18:39:05 +00:00
GuiFontMetrics.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
GuiFontMetrics.h
GuiGraphics.cpp Embedding: After another round of EmbeddedFiles changes, embedded figures should more or less work now. 2008-01-07 03:34:21 +00:00
GuiGraphics.h Embedding: proper embedCB actions in the GuiGraphics dialog 2008-01-05 04:48:47 +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 getting rid of superfluous lyx::support:: statements. 2007-12-12 19:57:42 +00:00
GuiImage.h cosmetics 2007-11-23 22:15:17 +00:00
GuiInclude.cpp 'using namespace lyx::support' instead of 'using support::xxx' 2007-12-12 18:57:56 +00:00
GuiInclude.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiIndex.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiIndex.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiKeySymbol.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
GuiKeySymbol.h
GuiListings.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiListings.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiLog.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiLog.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiMath.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiMath.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiMathMatrix.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
GuiMathMatrix.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiNomencl.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
GuiNomencl.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiNote.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
GuiNote.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiPainter.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiPainter.h merge frontend::Painter into GuiPainter 2007-11-23 21:39:51 +00:00
GuiParagraph.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
GuiParagraph.h Factorize general code out of GuiDialog and into the base Dialog class. This is now possible thanks to the moving of Dialog.{cpp,h} to qt4/. Any dialog must inherit QWidget within Qt so it is safe to use Dialog::asQWidget() method (which is similar to dynamic casting). 2007-12-09 22:35:04 +00:00
GuiPopupMenu.cpp * MenuBackend.cpp (binding): remove forgui argument 2008-01-07 10:53:04 +00:00
GuiPopupMenu.h * MenuBackend.cpp (binding): remove forgui argument 2008-01-07 10:53:04 +00:00
GuiPrefs.cpp Add an RC setting to disable/enable the tooltips in the work area. 2007-12-26 13:52:56 +00:00
GuiPrefs.h support to set the examples folder in the preferences 2007-11-25 18:26:58 +00:00
GuiPrint.cpp getting rid of superfluous lyx::support:: statements. 2007-12-12 19:57:42 +00:00
GuiPrint.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiRef.cpp * get rid of support::absolutePath() 2007-12-17 16:04:46 +00:00
GuiRef.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiSearch.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
GuiSearch.h Factorize general code out of GuiDialog and into the base Dialog class. This is now possible thanks to the moving of Dialog.{cpp,h} to qt4/. Any dialog must inherit QWidget within Qt so it is safe to use Dialog::asQWidget() method (which is similar to dynamic casting). 2007-12-09 22:35:04 +00:00
GuiSelection.cpp use QClipboard::selectionChanged() signal instead of QClipboard::dataChanged(). 2007-12-12 18:46:16 +00:00
GuiSelection.h remove #includes; cosmetics 2007-11-13 23:00:36 +00:00
GuiSelectionManager.cpp
GuiSelectionManager.h
GuiSendto.cpp * src/frontends/qt4/GuiSendto.cpp: 2008-01-03 09:22:36 +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 getting rid of superfluous lyx::support:: statements. 2007-12-12 19:57:42 +00:00
GuiShowFile.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiSpellchecker.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiSpellchecker.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiTabular.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
GuiTabular.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiTabularCreate.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
GuiTabularCreate.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiTexinfo.cpp getting rid of superfluous lyx::support:: statements. 2007-12-12 19:57:42 +00:00
GuiTexinfo.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiThesaurus.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiThesaurus.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiToc.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
GuiToc.h fix memory leaks 2007-12-02 18:39:05 +00:00
GuiToolbar.cpp Fix graphics file name. It is textrm_O.png, not textrm_Oe.png 2007-12-25 09:14:00 +00:00
GuiToolbar.h - Cleanup and simplify the layout list GUI handling. 2007-11-20 22:03:56 +00:00
GuiToolbars.cpp * cosmetic 2007-12-23 00:48:41 +00:00
GuiToolbars.h * cosmetic 2007-12-23 00:48:41 +00:00
GuiView.cpp header cleanup. 2007-12-26 14:21:50 +00:00
GuiView.h Split LyXFunc::menuNew() into LyXView::newDocument() and buffer_funcs::newUnnamedFile(). 2007-12-07 11:57:13 +00:00
GuiViewSource.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
GuiViewSource.h use structure with named members instead of pair<int, int>... 2007-11-29 22:12:19 +00:00
GuiVSpace.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
GuiVSpace.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
GuiWorkArea.cpp enable context menu for the vertical scrollbar. 2007-12-26 15:04:20 +00:00
GuiWorkArea.h Prepare the code for context menu support. 2007-12-25 20:12:07 +00:00
GuiWrap.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +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 Please JMarc: Make sure we always pass through LyXFunc::dispatch() even if this is a waste of CPU. 2007-11-26 22:45:17 +00:00
InsertTableWidget.h Transfer some more dialog related code from core to frontend: 2007-11-23 09:44:02 +00:00
LaTeXHighlighter.cpp Use a less verbose form for warnings in the view source window 2007-12-30 21:28:38 +00:00
LaTeXHighlighter.h * src/Buffer.cpp: 2007-12-24 13:55:01 +00:00
LengthCombo.cpp
LengthCombo.h
LyXFileDialog.cpp 'using namespace lyx::support' instead of 'using support::xxx' 2007-12-12 18:57:56 +00:00
LyXFileDialog.h
Makefile.am Simplify MenuBackend and menubar interactions. 2007-12-26 10:55:43 +00:00
Menus.cpp remove extra menu expansion which causes multiple warnings about shortcuts 2008-01-04 16:54:56 +00:00
Menus.h * compile fix 2007-12-26 13:29:45 +00:00
PanelStack.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
PanelStack.h
pch.h
qlkey.h
qt_helpers.cpp getting rid of superfluous lyx::support:: statements. 2007-12-12 19:57:42 +00:00
qt_helpers.h
README
TocModel.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +00:00
TocModel.h cosmetics 2007-11-14 00:21:31 +00:00
TocWidget.cpp getting rid of superfluous std:: statements. 2007-12-12 19:28:07 +00:00
TocWidget.h
Validator.cpp 'using namespace std' instead of 'using std::xxx' 2007-12-12 10:16:00 +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.