lyx_mirror/src/frontends/qt4
Edwin Leuven ee3e1bbba7 Replace Q3ListBox with QListWidget:
* QBibtexDialog.C
 * QBibtex.C
 * QBibtexUi.ui
 * QBibtexAddUi.ui
    


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13791 a592a061-630c-0410-9148-cb99ea01b6c8
2006-05-02 19:17:59 +00:00
..
moc
ui Replace Q3ListBox with QListWidget: 2006-05-02 19:17:59 +00:00
Alert_pimpl.C change string "qt2" to "qt4" 2006-04-24 13:25:50 +00:00
BiblioModuleBase.h
BulletsModule.C clean up the function renaming cleanup 2006-04-09 08:42:58 +00:00
BulletsModule.h Fix from Edwin Leuven: 2006-04-05 14:02:37 +00:00
ChangeLog set svn:eol-style to native in qt4 frontend 2006-03-21 19:56:57 +00:00
checkedwidgets.C change string "qt2" to "qt4" 2006-04-24 13:25:50 +00:00
checkedwidgets.h change string "qt2" to "qt4" 2006-04-24 13:25:50 +00:00
Dialogs.C change string "qt2" to "qt4" 2006-04-24 13:25:50 +00:00
emptytable.C clean up the function renaming cleanup 2006-04-09 08:42:58 +00:00
emptytable.h
FileDialog_private.C
FileDialog_private.h
FileDialog.C change string "qt2" to "qt4" 2006-04-24 13:25:50 +00:00
floatplacement.C
floatplacement.h
iconpalette.C Porting work from Edwin Leuven: 2006-04-05 15:10:34 +00:00
iconpalette.h
lcolorcache.C added "none" color special case. 2006-04-11 09:59:56 +00:00
lcolorcache.h Store colors as rgb values in branches. 2006-03-23 20:04:05 +00:00
lengthcombo.C
lengthcombo.h
lyx_gui.C change string "qt2" to "qt4" 2006-04-24 13:25:50 +00:00
LyXKeySymFactory.C change string "qt2" to "qt4" 2006-04-24 13:25:50 +00:00
LyXScreenFactory.C change string "qt2" to "qt4" 2006-04-24 13:25:50 +00:00
Makefile.am Initial Qt4 support for view-source feature (r13610), from Bo Peng (ben.bob@gmail.com) 2006-04-15 14:13:41 +00:00
Makefile.dialogs * ControlToc.[Ch] 2006-04-18 09:57:47 +00:00
panelstack.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
panelstack.h
pch.h
QAbout.C
QAbout.h
QAboutDialog.C
QAboutDialog.h
QBibitem.C
QBibitem.h
QBibitemDialog.C
QBibitemDialog.h
QBibtex.C Replace Q3ListBox with QListWidget: 2006-05-02 19:17:59 +00:00
QBibtex.h
QBibtexDialog.C Replace Q3ListBox with QListWidget: 2006-05-02 19:17:59 +00:00
QBibtexDialog.h
QBox.C
QBox.h
QBoxDialog.C
QBoxDialog.h
QBranch.C
QBranch.h
QBranchDialog.C
QBranchDialog.h
QBranches.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QBranches.h Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QBrowseBox.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QBrowseBox.h
QChanges.C
QChanges.h
QChangesDialog.C
QChangesDialog.h
QCharacter.C
QCharacter.h
QCharacterDialog.C
QCharacterDialog.h
QCitation.C I have continued a bit on my track to do a real model view separation for the Citation Dialog. In this new scheme, QCitation is the controller and the model at the same time, it inherits ControlCitation and it doesn't know about the view. QCitationDialog is the view, it is using QCitation to get its model and for communication with the core; it is inheriting Dialog::View directly. 2006-04-11 08:26:43 +00:00
QCitation.h I have continued a bit on my track to do a real model view separation for the Citation Dialog. In this new scheme, QCitation is the controller and the model at the same time, it inherits ControlCitation and it doesn't know about the view. QCitationDialog is the view, it is using QCitation to get its model and for communication with the core; it is inheriting Dialog::View directly. 2006-04-11 08:26:43 +00:00
QCitationDialog.C I have continued a bit on my track to do a real model view separation for the Citation Dialog. In this new scheme, QCitation is the controller and the model at the same time, it inherits ControlCitation and it doesn't know about the view. QCitationDialog is the view, it is using QCitation to get its model and for communication with the core; it is inheriting Dialog::View directly. 2006-04-11 08:26:43 +00:00
QCitationDialog.h I have continued a bit on my track to do a real model view separation for the Citation Dialog. In this new scheme, QCitation is the controller and the model at the same time, it inherits ControlCitation and it doesn't know about the view. QCitationDialog is the view, it is using QCitation to get its model and for communication with the core; it is inheriting Dialog::View directly. 2006-04-11 08:26:43 +00:00
qcoloritem.C
qcoloritem.h
QCommandBuffer.C clean up the function renaming cleanup 2006-04-09 08:42:58 +00:00
QCommandBuffer.h
QCommandEdit.C
QCommandEdit.h
QDelimiterDialog.C
QDelimiterDialog.h
QDialogView.C
QDialogView.h Changelog: 2006-03-22 18:59:17 +00:00
QDocument.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QDocument.h
QDocumentDialog.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QDocumentDialog.h Whitespace cleanup. 2006-04-05 23:56:29 +00:00
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
qfont_loader.C clean up the function renaming cleanup 2006-04-09 08:42:58 +00:00
qfont_loader.h Whitespace cleanup. 2006-04-05 23:56:29 +00:00
qfont_metrics.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
qfontexample.C
qfontexample.h
QGraphics.C clean up of the graphics dialog: 2006-04-06 21:04:27 +00:00
QGraphics.h
QGraphicsDialog.C clean up of the graphics dialog: 2006-04-06 21:04:27 +00:00
QGraphicsDialog.h clean up of the graphics dialog: 2006-04-06 21:04:27 +00:00
QGraphicsUi.h
QInclude.C
QInclude.h
QIncludeDialog.C
QIncludeDialog.h
QIndex.C
QIndex.h
QIndexDialog.C
QIndexDialog.h
QLAction.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QLAction.h
QLImage.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QLImage.h
qlkey.h
QLMenubar.C clean up dos style line ending. 2006-03-20 17:25:02 +00:00
QLMenubar.h change string "qt2" to "qt4" 2006-04-24 13:25:50 +00:00
QLog.C
QLog.h
QLogDialog.C
QLogDialog.h
QLPainter.C clean up dos style line ending. 2006-03-20 17:25:02 +00:00
QLPainter.h clean up dos style line ending. 2006-03-20 17:25:02 +00:00
QLPopupMenu.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QLPopupMenu.h Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QLPrintDialog.C
QLPrintDialog.h
QLToolbar.C change string "qt2" to "qt4" 2006-04-24 13:25:50 +00:00
QLToolbar.h Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QLyXKeySym.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QLyXKeySym.h
QMath.C
QMath.h
QMathDialog.C clean up the function renaming cleanup (libFileSearch instead of LibFileSearch) 2006-04-09 21:24:01 +00:00
QMathDialog.h Porting work from Edwin Leuven: 2006-04-05 15:10:34 +00:00
QMathMatrixDialog.C
QMathMatrixDialog.h
QNote.C
QNote.h
QNoteDialog.C
QNoteDialog.h
QParagraph.C
QParagraph.h
QParagraphDialog.C
QParagraphDialog.h
QPrefs.C 2006-04-06 Bo Peng <ben.bob@gmail.com> 2006-04-05 22:56:18 +00:00
QPrefs.h Changelog: 2006-03-22 18:59:17 +00:00
QPrefsDialog.C Add lyxrc.use_lastfilepos and load_session to the qt4 preference dialog. 2006-04-27 18:19:14 +00:00
QPrefsDialog.h compile fixes + update in pref dialog 2006-04-07 12:01:11 +00:00
QPrint.C
QPrint.h
QRef.C
QRef.h
QRefDialog.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QRefDialog.h
qscreen.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
qscreen.h clean up dos style line ending. 2006-03-20 17:25:02 +00:00
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 Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QSpellcheckerDialog.h
Qt2BC.C
Qt2BC.h
qt_helpers.C Remove qt2 support in the following files: 2006-03-17 19:02:43 +00:00
qt_helpers.h change string "qt2" to "qt4" 2006-04-24 13:25:50 +00:00
QTabular.C
QTabular.h
QTabularCreate.C
QTabularCreate.h
QTabularCreateDialog.C
QTabularCreateDialog.h
QTabularDialog.C
QTabularDialog.h
QTexinfo.C clean up the function renaming cleanup 2006-04-09 08:42:58 +00:00
QTexinfo.h
QTexinfoDialog.C
QTexinfoDialog.h
QThesaurus.C
QThesaurus.h
QThesaurusDialog.C
QThesaurusDialog.h
QtLyXView.h
QToc.C * QToc.[Ch], QTocDialog.[Ch]: adaptation to ControlToc changes in r13772 2006-04-28 09:16:48 +00:00
QToc.h * QToc.[Ch], QTocDialog.[Ch]: adaptation to ControlToc changes in r13772 2006-04-28 09:16:48 +00:00
QTocDialog.C * QToc.[Ch], QTocDialog.[Ch]: adaptation to ControlToc changes in r13772 2006-04-28 09:16:48 +00:00
QTocDialog.h * QToc.[Ch], QTocDialog.[Ch]: adaptation to ControlToc changes in r13772 2006-04-28 09:16:48 +00:00
qtTimeout.C
qtTimeout.h
QtView.C clean up the function renaming cleanup 2006-04-09 08:42:58 +00:00
QtView.h
QURL.C
QURL.h
QURLDialog.C
QURLDialog.h
QViewSource.C Initial Qt4 support for view-source feature (r13610), from Bo Peng (ben.bob@gmail.com) 2006-04-15 14:13:41 +00:00
QViewSource.h Initial Qt4 support for view-source feature (r13610), from Bo Peng (ben.bob@gmail.com) 2006-04-15 14:13:41 +00:00
QViewSourceDialog.C Initial Qt4 support for view-source feature (r13610), from Bo Peng (ben.bob@gmail.com) 2006-04-15 14:13:41 +00:00
QViewSourceDialog.h Initial Qt4 support for view-source feature (r13610), from Bo Peng (ben.bob@gmail.com) 2006-04-15 14:13:41 +00:00
QVSpace.C
QVSpace.h
QVSpaceDialog.C Fix enableCustom 2006-04-11 10:51:59 +00:00
QVSpaceDialog.h Fix enableCustom 2006-04-11 10:51:59 +00:00
QWorkArea.C use const_cast<QWorkArea*> instead of C-style cast 2006-04-13 20:44:38 +00:00
QWorkArea.h * frontends/WorkArea.h(workAreaResize, scrollDocView, workAreaKeyPress, 2006-04-13 18:58:48 +00:00
QWrap.C
QWrap.h
QWrapDialog.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
QWrapDialog.h
README
socket_callback.C
socket_callback.h Whitespace cleanup. 2006-04-05 23:56:29 +00:00
TocModel.C * QToc.[Ch], QTocDialog.[Ch]: adaptation to ControlToc changes in r13772 2006-04-28 09:16:48 +00:00
TocModel.h * QToc.[Ch], QTocDialog.[Ch]: adaptation to ControlToc changes in r13772 2006-04-28 09:16:48 +00:00
validators.C Whitespace cleanup. 2006-04-05 23:56:29 +00:00
validators.h
WorkAreaFactory.C change string "qt2" to "qt4" 2006-04-24 13:25:50 +00:00

This file contains some do's and dont's for the Qt2 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.

*DO NOT USE DESIGNER FROM Qt 3*. You must use a designer from Qt 2 to
maintain compatibility.

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_

Don't #undef emit - #include "QtLyXView.h" instead

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 isn't unicoded yet. But you should follow these simple rules :

o Use qt_() not _() in code
o Use fromqstr and toqstr NOT .latin1() / .c_str()

Using these functions (in qt_helpers.h) will make sure we use
the right locale for converting to Qt's QString, which is unicode.