- Get rid of setRenderHint for anti-aliasing, because we should respect user windows setting
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15699 a592a061-630c-0410-9148-cb99ea01b6c8
Use case: Two window share the same buffer. The first window is resize. This modify the inner Buffer structure because Paragraph has a notion of line break and thus line width. When switching to the other window which does not have the same size, LyX crashes because the line break is not adapted the this BufferView width.
This commit fix the crash by resizing the BufferView on a focusInEvent(). That is not a good fix but it is a fix nevertheless. The bad side effect is that when the two BufferView shows the same portion of the Buffer, the second BufferView will show the same line breaks as the first one even though those line breaks are not adapted to the second BufferView width... such is life!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15697 a592a061-630c-0410-9148-cb99ea01b6c8
- the cursor is still a widget, the width is 2-pixel on Windows and 1-pixel on other platforms. The full screen refresh on blinking cursor bug is now gone.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15695 a592a061-630c-0410-9148-cb99ea01b6c8
Qt doc for QMouseEvent::button():
Note that the returned value is always Qt::NoButton for mouse move events.
so we must use buttons() instead because later on
the code checks for the left button.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15693 a592a061-630c-0410-9148-cb99ea01b6c8
* GuiView::init(): switch to the first avalaible buffer if any.
* GuiWorkArea::focusInEvent(): update the LyXView tab bar there.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15685 a592a061-630c-0410-9148-cb99ea01b6c8
frontends/LyXView.h
- add tab update function
frontends/qt4/GuiView.h
- add tab update function
- add function for setting up the tabs
- add slot for the tab clicks
- add pimpl
frontends/qt4/GuiImplementation.C
- don't set the buffer as central widget
but initilize the tabs
frontends/qt4/GuiView.C
- use QTabBar for switching
- scan the bufferlist on updates
frontends/LyXView.C
- also update the tabs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15637 a592a061-630c-0410-9148-cb99ea01b6c8
revert first patch http://www.lyx.org/trac/changeset/15597
* frontends/qt4/GuiView.C:
don't 'break' the toolbar because it doesn't work if
the toolbar will be hidden
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15636 a592a061-630c-0410-9148-cb99ea01b6c8
* delete some comments
* use lyxerr instead of cout in PanelStack
* move PanelStack into lyx::frontend namespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15623 a592a061-630c-0410-9148-cb99ea01b6c8
- ctor and dtor moved to public:
- QLPainter(): takes a QPaintdevice instead of a QWidget.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15619 a592a061-630c-0410-9148-cb99ea01b6c8
* Painter: new ctor that sets drawing_enabled_ to true.
* setDrawingEnabled(), isDrawingEnabled(): new methods.
* QLPainter.C: only draw if drawing is enabled.
* nullpainter.h: deleted.
* rawpainter.C::paintPar(): only draw if we are inside the Paragraph.
* InsetTabular::draw(): use new Painter method instead of a NullPainter.
* InsetMathNest::drawSelection(): ditto.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15613 a592a061-630c-0410-9148-cb99ea01b6c8
* QLPainter::paintText(): use GuiFontMetrics::metrics(QString) to avoid an ucs4 to QString conversion.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15584 a592a061-630c-0410-9148-cb99ea01b6c8
* QLPainter::paintText(): use the font width cache instead of the painter metrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15580 a592a061-630c-0410-9148-cb99ea01b6c8
* src/encoding.h
(encoding_table): remove, this is no longer needed with unicode
(iconvName_): new member: name of the encoding in iconv syntax
* src/exporter.C
(Exporter::Export): Use return value of Buffer::makeLaTeXFile
* src/buffer.[Ch]
(Buffer::makeLaTeXFile): return whether the file has been created
successfully
* src/buffer.C
(Buffer::makeLaTeXFile): Use a docstream that converts to the correct
encoding
Display an error dialog is something went wrong
* src/bufferparams.C
(BufferParams::writeLaTeX): Undo the utf8 inputenc hack
* src/frontends/qt4/QDocumentDialog.C: Add some FIXMEs
* src/support/unicode.[Ch]
(eightbit_to_ucs4): New conversion function
(ucs4_to_eightbit): New conversion function
* src/support/docstream.[Ch]
(utf8_codecvt_facet_exception): Move to header and rename to
iconv_codecvt_facet_exception
(odocfstream): Take the encoding as argument
* src/support/docstream.C
(utf8_codecvt_facet): Generalize to other encodings than utf8 and
rename to iconv_codecvt_facet
* src/encoding.C: Remove obsolete tables
* src/output_latex.C
(TeXOnePar): Convert the paragraph to different encoding if needed
* lib/encodings: Remove obsolete tables
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15564 a592a061-630c-0410-9148-cb99ea01b6c8
1) crash in GuiWorkArea::paintEvent(), this one is solved by by encapsulating the file loading in LyXView by busy(true)/busy(false) and by disabling/enabling the work area update in GuiView::busy().
2) crash in the cursor blinking because the cursor is timed out at the moment you click on "Revert". So the blinking cursor is now disabled/enabled in GuiView::busy().
3) crash in BufferView::setBuffer() because the current buffer was already closed folling the "revert" command.
* BufferView::loadLyXFile(): set buffer_ to 0 in case of a reload (when document is reverted)
* LyXView:
- busy() is not const anymore (work_area_ is modified in GuiView)
- loadLyXFile(): encapsulate the file loading with busy(true)/busy(false)
- setBuffer(): encapsulate the buffer-switching with busy(true)/busy(false)
* GuiView::busy()
- disable/enable workarea updates.
- disable/enable blinking cursor.
* WorkArea: new startBlinkingCursor() and stopBlinkingCursor() methods.
* rowpainter.C:
- paintText(): make sure there is a Buffer from which to paint.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15556 a592a061-630c-0410-9148-cb99ea01b6c8
use position returned by BufferView
src/bufferview_funcs.C:
adjust cursor x-position by hand
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15555 a592a061-630c-0410-9148-cb99ea01b6c8
* qt4/Alert_pimpl.C: make sure the proper Qt attributes are set.
* GuiApplication::quitLyx(): add the "force" argument to the funcRequest.
* GuiImplementation:
- GuiImplementation(): remove the signal connection. This was triggered after the LastWindowClosed signal so was not useful.
- cleanupViews(): renamed to unregisterView() and handle the WorkAreas as well.
- closeAll(): new method (from LyXView).
* GuiView.C
- clean up the includes order.
- closeEvent(): make sure that theBufferList().quitWriteAll() is called if last window closed.
* lyx_main.C / LyX::quit():
- remove noAsk argument
- delete bufferList::quitWriteAll() call (this is handled in the frontend).
- delete Session stuff (ditto)
* LyXFunc::dispatch()
- LFUN_LYX_EXIT: close all window before exiting from user command (as opposed to last window closed).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15535 a592a061-630c-0410-9148-cb99ea01b6c8
* LyXFunc:
- dispatch(): transfer assertion on lyx_view_ to each LFUN on a case by case basis.
- dispatch(): new LFUN_WINDOW_CLOSE
- getStatus(): special treatment for LFUN_LYX_QUIT
* LyX:
- views_, addLyXView(): deleted
- quit(): call saveGeometry() on each LyXView before exiting.
* GuiApplication:
- is now a QObject.
- quitLyX(): new Qt slot for lastWindowClosed signal.
* Gui.h:
- destroyView(), destroyWorkArea(): deleted
- viewIds(): new method
* GuiImplementation:
- implement above changes.
- GuiImplementation is now a QObject
- cleanupViews(): new private slot.
- buildViewIds(): new helper method
- views_ and work_areas_ are now maps of raw pointers instead of schared_ptr.
* LyXView
- now stores its id.
- dispatch(): special treatment for LFUN_WINDOW_CLOSE.
- workAreaIds(): new method.
- close(): new pure virtual method.
- saveGeometry(): new pure virtual method.
* GuiView:
- implements above changes.
- GuiView(): set WA_DeleteOnClose and Qt::WA_QuitOnClose to let Qt manage the destruction on close().
- closeEvent(): session stuff transfered to saveGeometry()
* WorkArea
- now store its id.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15514 a592a061-630c-0410-9148-cb99ea01b6c8