lyx_mirror/src/frontends/qt4
André Pönitz e5fe3a68c7 forgot those
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21708 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-22 00:04:19 +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 Rename GuiViewBase to GuiView. 2007-11-05 13:52:37 +00:00
BulletsModule.cpp use "real" resources 2007-10-17 18:28:45 +00:00
BulletsModule.h Why would boost::array<Bullet, 4> be better than Bullet[4]? 2007-09-15 23:04:28 +00:00
ButtonController.cpp reduce line noise 2007-11-15 20:04:51 +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 introduce a header to forward declare std::string. 2007-10-31 22:40:34 +00:00
ColorCache.h Move Color::color enum to ColorCode.h 2007-10-25 12:41:02 +00:00
CustomizedWidgets.cpp PrefShortcuts: use KeySequence::ForGui to display shortcuts 2007-10-31 17:15:10 +00:00
CustomizedWidgets.h - add label and remove subclassed SearchLineEdit 2007-10-29 08:56:30 +00:00
DialogView.h Bump the Qt requirement to version 4.0.0 2007-11-14 14:24:59 +00:00
DockView.h Rename GuiViewBase to GuiView. 2007-11-05 13:52:37 +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 move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiAbout.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +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 Introducing Application::resetGui() that will reset all dialogs in all lyx windows (including toolbars and menubars). 2007-11-21 15:12:47 +00:00
GuiApplication.h Introducing Application::resetGui() that will reset all dialogs in all lyx windows (including toolbars and menubars). 2007-11-21 15:12:47 +00:00
GuiBibitem.cpp some refactoring 2007-10-07 14:44:41 +00:00
GuiBibitem.h move stuff around. probably not the final destination... 2007-10-07 21:14:24 +00:00
GuiBibtex.cpp merge helper files; 2007-11-05 22:20:23 +00:00
GuiBibtex.h one more 2007-10-07 18:40:01 +00:00
GuiBox.cpp cosmetics... less than intented 2007-10-24 22:55:02 +00:00
GuiBox.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiBranch.cpp move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiBranch.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiBranches.cpp next one 2007-10-06 22:43:21 +00:00
GuiBranches.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiChanges.cpp move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiChanges.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiCharacter.cpp Splitup Font in saner bits: 2007-10-28 18:51:54 +00:00
GuiCharacter.h merge helper files; 2007-11-05 22:20:23 +00:00
GuiCitation.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiCitation.h one more 2007-10-07 18:40:01 +00:00
GuiClipboard.cpp reduce line noise 2007-11-15 20:04:51 +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 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 move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCommandEdit.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiDelimiter.cpp Splitup Font in saner bits: 2007-10-28 18:51:54 +00:00
GuiDelimiter.h math stuff 2007-10-07 20:34:09 +00:00
GuiDialog.cpp Bump the Qt requirement to version 4.0.0 2007-11-14 14:24:59 +00:00
GuiDialog.h Make GuiRef and GuiInclude subclasses of GuiCommand. 2007-10-29 16:51:07 +00:00
GuiDocument.cpp Push latest Andre's changes toward their true direction: 2007-11-13 09:52:28 +00:00
GuiDocument.h Document->settings: update embedded file list properly 2007-10-30 15:20:59 +00:00
GuiErrorList.cpp Push latest Andre's changes toward their true direction: 2007-11-13 09:52:28 +00:00
GuiErrorList.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiERT.cpp move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiERT.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiExternal.cpp merge helper files; 2007-11-05 22:20:23 +00:00
GuiExternal.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiFloat.cpp GuiFloat.cpp: fix the regression that float placement dialog has no title 2007-11-08 23:05:48 +00:00
GuiFloat.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiFontExample.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiFontExample.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiFontLoader.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiFontLoader.h add some assertion for C-style table access. 2007-11-02 16:43:24 +00:00
GuiFontMetrics.cpp remove #includes; cosmetics 2007-11-13 23:00:36 +00:00
GuiFontMetrics.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiGraphics.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiGraphics.h move stuff 2007-10-28 16:42:18 +00:00
GuiGraphicsUi.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiHyperlink.cpp GuiHyperlink.cpp /HyperlinkUi.ui: follow the LyX naming conventions 2007-11-01 17:49:17 +00:00
GuiHyperlink.h The huge URL patch: 2007-10-13 19:06:09 +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 merge helper files; 2007-11-05 22:20:23 +00:00
GuiInclude.h Make GuiRef and GuiInclude subclasses of GuiCommand. 2007-10-29 16:51:07 +00:00
GuiIndex.cpp some refactoring 2007-10-07 14:59:01 +00:00
GuiIndex.h some refactoring 2007-10-07 14:59:01 +00:00
GuiKeySymbol.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiKeySymbol.h cosmetics 2007-10-02 21:51:54 +00:00
GuiListings.cpp Add Erlang support for listings (bug 4263) 2007-10-13 20:56:28 +00:00
GuiListings.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiLog.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
GuiLog.h add "copy to clipboard" button to log dialog 2007-10-11 18:15:30 +00:00
GuiMath.cpp Splitup Font in saner bits: 2007-10-28 18:51:54 +00:00
GuiMath.h Splitup Font in saner bits: 2007-10-28 18:51:54 +00:00
GuiMathMatrix.cpp move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiMathMatrix.h math stuff 2007-10-07 20:34:09 +00:00
GuiMenubar.cpp Introducing GuiMenubar::init() to avoid destructing the object in order to re-initialize it. 2007-11-21 21:14:34 +00:00
GuiMenubar.h Introducing GuiMenubar::init() to avoid destructing the object in order to re-initialize it. 2007-11-21 21:14:34 +00:00
GuiNomencl.cpp next ones 2007-10-07 14:41:49 +00:00
GuiNomencl.h next ones 2007-10-07 14:41:49 +00:00
GuiNote.cpp move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiNote.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiPainter.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiPainter.h * src/LyXRC.{cpp,h}: 2007-11-02 14:43:09 +00:00
GuiParagraph.cpp * Bufferview::updateMetrics(): Separate out the SinglePar optimization. 2007-11-06 08:32:25 +00:00
GuiParagraph.h less string conversions 2007-11-18 10:14:43 +00:00
GuiPopupMenu.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiPopupMenu.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiPrefs.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
GuiPrefs.h 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
GuiPrint.cpp merge helper files; 2007-11-05 22:20:23 +00:00
GuiPrint.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiRef.cpp Make GuiRef and GuiInclude subclasses of GuiCommand. 2007-10-29 16:51:07 +00:00
GuiRef.h Make GuiRef and GuiInclude subclasses of GuiCommand. 2007-10-29 16:51:07 +00:00
GuiSearch.cpp * src/frontends/qt4/GuiSearch.cpp: 2007-10-30 13:16:45 +00:00
GuiSearch.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +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 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 move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiSendto.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiSetBorder.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiSetBorder.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiShowFile.cpp cosmetics 2007-10-20 17:35:27 +00:00
GuiShowFile.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiSpellchecker.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiSpellchecker.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiTabular.cpp Move Inset::Code to InsetCode.h 2007-10-13 09:04:52 +00:00
GuiTabular.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiTabularCreate.cpp move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiTabularCreate.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiTexinfo.cpp cosmetics 2007-10-20 17:35:27 +00:00
GuiTexinfo.h merge helper files; 2007-11-05 22:20:23 +00:00
GuiThesaurus.cpp move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiThesaurus.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiToc.cpp reduce line noise 2007-11-15 20:04:51 +00:00
GuiToc.h Rename GuiViewBase to GuiView. 2007-11-05 13:52:37 +00:00
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 Introducing GuiMenubar::init() to avoid destructing the object in order to re-initialize it. 2007-11-21 21:14:34 +00:00
GuiView.h Some more cleanup of LyXView: 2007-11-21 22:48:13 +00:00
GuiViewSource.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
GuiViewSource.h Rename GuiViewBase to GuiView. 2007-11-05 13:52:37 +00:00
GuiVSpace.cpp finally merge Dialog and Controller 2007-10-09 21:21:01 +00:00
GuiVSpace.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +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 move Controller inheritance further up the tree 2007-10-09 19:34:27 +00:00
GuiWrap.h move Controller inheritance further up the tree 2007-10-09 19:34:27 +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 Some cosmetics and a gcc compile fix. 2007-11-13 13:23:44 +00:00
LaTeXHighlighter.cpp set eol-style. 2007-10-09 06:39:53 +00:00
LaTeXHighlighter.h move LaTeXHighlighte 2007-10-06 19:03:41 +00:00
LengthCombo.cpp cosmetics... less than intented 2007-10-24 22:55:02 +00:00
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 start some work on file dialogs 2007-10-28 16:32:20 +00:00
Makefile.am merge GuiView/Dialogs 2007-11-18 00:01:14 +00:00
PanelStack.cpp reduce line noise 2007-11-15 20:04:51 +00:00
PanelStack.h
pch.h cosmetics 2007-11-02 21:04:52 +00:00
qlkey.h Cosmetic changes to how shortcuts are printed: S-C-S => C-S-s because S-S can be confusion, and Ctrl-Shift is more natural than Shift-Ctrl 2007-10-30 16:34:35 +00:00
qt_helpers.cpp Fix bug 2738: Wrong sorting of languages in Document dialog 2007-11-14 02:01:50 +00:00
qt_helpers.h merge helper files; 2007-11-05 22:20:23 +00:00
README the fun begins.... 2007-09-05 20:33:29 +00:00
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 next one 2007-10-06 20:54:31 +00:00
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.