mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 14:32:04 +00:00
2ea1ce7851
* WorkArea::sheduleRedraw(): new pure virtual method. * GuiWorkArea::showCursor(): handle the scheduled redraw. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16708 a592a061-630c-0410-9148-cb99ea01b6c8 |
||
---|---|---|
.. | ||
ui | ||
Action.C | ||
Action.h | ||
Alert_pimpl.C | ||
BulletsModule.C | ||
BulletsModule.h | ||
ChangeLog | ||
checkedwidgets.C | ||
checkedwidgets.h | ||
ColorCache.C | ||
ColorCache.h | ||
Dialogs.C | ||
emptytable.C | ||
emptytable.h | ||
FileDialog_private.C | ||
FileDialog_private.h | ||
FileDialog.C | ||
FloatPlacement.C | ||
FloatPlacement.h | ||
GuiApplication.C | ||
GuiApplication.h | ||
GuiClipboard.C | ||
GuiClipboard.h | ||
GuiFontLoader.C | ||
GuiFontLoader.h | ||
GuiFontMetrics.C | ||
GuiFontMetrics.h | ||
GuiImplementation.C | ||
GuiImplementation.h | ||
GuiSelection.C | ||
GuiSelection.h | ||
GuiView.C | ||
GuiView.h | ||
GuiWorkArea.C | ||
GuiWorkArea.h | ||
iconpalette.C | ||
iconpalette.h | ||
InsertTableWidget.C | ||
InsertTableWidget.h | ||
lengthcombo.C | ||
lengthcombo.h | ||
LyXKeySymFactory.C | ||
Makefile.am | ||
Makefile.dialogs | ||
panelstack.C | ||
panelstack.h | ||
pch.h | ||
QAbout.C | ||
QAbout.h | ||
QAboutDialog.C | ||
QAboutDialog.h | ||
QBibitem.C | ||
QBibitem.h | ||
QBibitemDialog.C | ||
QBibitemDialog.h | ||
QBibtex.C | ||
QBibtex.h | ||
QBibtexDialog.C | ||
QBibtexDialog.h | ||
QBox.C | ||
QBox.h | ||
QBoxDialog.C | ||
QBoxDialog.h | ||
QBranch.C | ||
QBranch.h | ||
QBranchDialog.C | ||
QBranchDialog.h | ||
QBranches.C | ||
QBranches.h | ||
QChanges.C | ||
QChanges.h | ||
QChangesDialog.C | ||
QChangesDialog.h | ||
QCharacter.C | ||
QCharacter.h | ||
QCharacterDialog.C | ||
QCharacterDialog.h | ||
QCitation.C | ||
QCitation.h | ||
QCitationDialog.C | ||
QCitationDialog.h | ||
QCommandBuffer.C | ||
QCommandBuffer.h | ||
QCommandEdit.C | ||
QCommandEdit.h | ||
QDelimiterDialog.C | ||
QDelimiterDialog.h | ||
QDialogView.C | ||
QDialogView.h | ||
QDocument.C | ||
QDocument.h | ||
QDocumentDialog.C | ||
QDocumentDialog.h | ||
QErrorList.C | ||
QErrorList.h | ||
QErrorListDialog.C | ||
QErrorListDialog.h | ||
QERT.C | ||
QERT.h | ||
QERTDialog.C | ||
QERTDialog.h | ||
QExternal.C | ||
QExternal.h | ||
QExternalDialog.C | ||
QExternalDialog.h | ||
QFloat.C | ||
QFloat.h | ||
QFloatDialog.C | ||
QFloatDialog.h | ||
qfontexample.C | ||
qfontexample.h | ||
QGraphics.C | ||
QGraphics.h | ||
QGraphicsDialog.C | ||
QGraphicsDialog.h | ||
QGraphicsUi.h | ||
QInclude.C | ||
QInclude.h | ||
QIncludeDialog.C | ||
QIncludeDialog.h | ||
QIndex.C | ||
QIndex.h | ||
QIndexDialog.C | ||
QIndexDialog.h | ||
QLImage.C | ||
QLImage.h | ||
qlkey.h | ||
QLMenubar.C | ||
QLMenubar.h | ||
QLog.C | ||
QLog.h | ||
QLogDialog.C | ||
QLogDialog.h | ||
QLPainter.C | ||
QLPainter.h | ||
QLPopupMenu.C | ||
QLPopupMenu.h | ||
QLPrintDialog.C | ||
QLPrintDialog.h | ||
QLToolbar.C | ||
QLToolbar.h | ||
QLyXKeySym.C | ||
QLyXKeySym.h | ||
QMath.C | ||
QMath.h | ||
QMathDialog.C | ||
QMathDialog.h | ||
QMathMatrixDialog.C | ||
QMathMatrixDialog.h | ||
QNomencl.C | ||
QNomencl.h | ||
QNomenclDialog.C | ||
QNomenclDialog.h | ||
QNote.C | ||
QNote.h | ||
QNoteDialog.C | ||
QNoteDialog.h | ||
QParagraph.C | ||
QParagraph.h | ||
QParagraphDialog.C | ||
QParagraphDialog.h | ||
QPrefs.C | ||
QPrefs.h | ||
QPrefsDialog.C | ||
QPrefsDialog.h | ||
QPrint.C | ||
QPrint.h | ||
QRef.C | ||
QRef.h | ||
QRefDialog.C | ||
QRefDialog.h | ||
QSearch.C | ||
QSearch.h | ||
QSearchDialog.C | ||
QSearchDialog.h | ||
QSendto.C | ||
QSendto.h | ||
QSendtoDialog.C | ||
QSendtoDialog.h | ||
qsetborder.C | ||
qsetborder.h | ||
QShowFile.C | ||
QShowFile.h | ||
QShowFileDialog.C | ||
QShowFileDialog.h | ||
QSpellchecker.C | ||
QSpellchecker.h | ||
QSpellcheckerDialog.C | ||
QSpellcheckerDialog.h | ||
Qt2BC.C | ||
Qt2BC.h | ||
qt_helpers.C | ||
qt_helpers.h | ||
QTabular.C | ||
QTabular.h | ||
QTabularCreate.C | ||
QTabularCreate.h | ||
QTabularCreateDialog.C | ||
QTabularCreateDialog.h | ||
QTabularDialog.C | ||
QTabularDialog.h | ||
QTexinfo.C | ||
QTexinfo.h | ||
QTexinfoDialog.C | ||
QTexinfoDialog.h | ||
QThesaurus.C | ||
QThesaurus.h | ||
QThesaurusDialog.C | ||
QThesaurusDialog.h | ||
QToc.C | ||
QToc.h | ||
QTocDialog.C | ||
QTocDialog.h | ||
qtTimeout.C | ||
qtTimeout.h | ||
QURLDialog.C | ||
QURLDialog.h | ||
QViewSource.C | ||
QViewSource.h | ||
QViewSourceDialog.C | ||
QViewSourceDialog.h | ||
QVSpace.C | ||
QVSpace.h | ||
QVSpaceDialog.C | ||
QVSpaceDialog.h | ||
QWrap.C | ||
QWrap.h | ||
QWrapDialog.C | ||
QWrapDialog.h | ||
README | ||
socket_callback.C | ||
socket_callback.h | ||
TocModel.C | ||
TocModel.h | ||
UrlView.C | ||
UrlView.h | ||
validators.C | ||
validators.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 form_->changed(). If you are using a more complicated thing anyway, then remember to call form_->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 is incredibly stupid and sometimes you need 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. 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 form_->slotOK() etc. Refer to close/cancel as close in the source. Override update_contents() to update the dialog, not update(), and build_dialog(), not build(). 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.[Ch] The file that interacts with the controller QFooDialog.[Ch] The implementation of the dialog, derived from the generated files ui/QFooDialog.ui The designer file ui/QFooDialogBase.[Ch] Generated files from QFooDialog.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 LA - label ML - PB - push button (FIXME: complete this) Stuff to be aware of -------------------- The connect statement in Qt is a macro and its arguments does not follow the C++ standard as it should. Using the construct "Type const &" as argument will lead to runtime-errors, use "const Type &" instead. ex. --right-- connect(list, SIGNAL(selected(const QString &)), this, SLOT(complete_selected(const QString &))); --wrong-- connect(list, SIGNAL(selected(QString const &)), this, SLOT(complete_selected(QString const &))); Qt, Unicode, and LyX -------------------- LyX uses a different encoding (UCS4) than Qt (UTF16), therefore there are a number of conversion functions in qt_helpers.[Ch]. 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.