Commit Graph

21 Commits

Author SHA1 Message Date
Abdelrazak Younes
e918c00190 small cleanup while looking for a bug.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15622 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 14:15:05 +00:00
Abdelrazak Younes
992fe1dba6 * QLPainter:
- 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
2006-10-30 13:16:18 +00:00
Abdelrazak Younes
662974406a Forgot that also!
* QLPainter::~QLPainter: add virtual

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15616 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 11:04:37 +00:00
Abdelrazak Younes
54bdecdb48 remove paperHeight() and paperWidth() in Painter and inherited classes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15589 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-28 09:36:22 +00:00
Abdelrazak Younes
56be946751 delete unused code and comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15588 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-28 09:19:37 +00:00
André Pönitz
1852693005 do not draw to intermediate pixmap
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15501 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 08:46:09 +00:00
André Pönitz
6c300f72a2 move everything into namespace lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15422 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-21 00:16:43 +00:00
Abdelrazak Younes
4add252628 * frontends/Painter:
- text(): now returns drawn text width()

* rowpainter:
 - paintChars(): use the returned width from Painter::text() instead of recalculating it.

All other files: implement the API change. qt3 and gtk not 100% guaranted to compile nor work.






git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15294 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-10 13:24:08 +00:00
Abdelrazak Younes
742cd190cb revert to revision 15266
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15280 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-08 14:24:12 +00:00
Abdelrazak Younes
c8e5745e20 * ControlChanges:
- getChangeAuthor() and getChangeDate(): converted to unicode.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15279 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-08 10:32:33 +00:00
Abdelrazak Younes
00edcc582f This commit is a big rework of the FontLoader/FontMetrics interaction. Only Qt4 for now, I would be grateful is somebody steps up for qt3 and gtk.
Basically, I replaced all methods in the font_metrics namespace by a proper virtual interface FontMetrics. The FontLoader is _the_ container for FontMetrics.

This patch should also bring some optimizations in a number of place in the code. This is because we do not need any more to search for the LyXFont at each font_metrics call. In effect, the speed advantage is not as sensible and this is a bit deceiving considering that this was my primary motivation behind the patch. But I like the patch anyway as it cleans up the relation and interfacing between fonts, metrics and frontends.

* frontends/FontMetrics.h: new virtual interface. Renamed from font_metrics.h

* qt4/GuiFontMetrics: corresponding qt4 implememtation. Renamed from qfont_metrics.C. The smallCaps particular case treatment has been transfered here as well as the width cache for MacOSX and Windows.

* qt4/QLPainter.C: the smallCapsText has been reworked to return the width of the drawn text.C

all other files: replace font_metric helper function call with corresponding FontMetrics method calls.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15265 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-07 16:15:06 +00:00
Lars Gullik Bjønnes
c46b7d8955 Merge the unicode branch into trunk.
- src/support/unicode.[Ch]: new files with functions for converting
  to and fro ucs4, ucs2 and utf8.
- src/support/docstring.h: specialization of basic_string that
  holds a uint32_t internally.
- Several functions changed to use char_type instead of char or unsigned char.
- Qt3 and Qt4 sends ucs2 on to core
- Gtk sends ucs4 on to core
- Read and write utf-8 .lyx files.
- font_metrics and painter updated to handle ucs4 chars as input.
- Quite a bit of ugly compability code, conversion string->docstring, etc.
- Have fun...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14661 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-13 22:54:59 +00:00
Abdelrazak Younes
a1b60fb963 delete Painter::fillPolygon() and associated frontend implementations
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14410 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-10 15:14:29 +00:00
Edwin Leuven
641fae7ed5 * reset color/linestyle/linewidth cache to QPen defaults on QPainter creation
* get rid of QPainter arg in setQPainterPen(..)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14201 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-25 11:18:56 +00:00
Abdelrazak Younes
2335670309 * qp_ member is now used for painting
* QLPainter::start() now re-initialize qp_
* QLPainter::end() now end qp_


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14184 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-23 14:12:17 +00:00
Abdelrazak Younes
d8ae51dbe1 This is the merging of the GUI API cleanup branch that was developed in svn+ssh://svn.lyx.org/lyx/lyx-devel/branches/personal/younes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14152 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-20 08:39:16 +00:00
Peter Kümmel
c02f6409ec Fix Qt4 resize bug.
Don't use  multiple QPainter::begin on the same QPaintDevice.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14101 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-14 14:23:25 +00:00
Abdelrazak Younes
5c4d89d816 Simple optimisation: reuse current QPainter if no there's no change in settings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14078 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-11 21:22:36 +00:00
Abdelrazak Younes
4213d1851a clean up dos style line ending.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13442 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-20 17:25:02 +00:00
Abdelrazak Younes
4a5053d34e * qscreen.[Ch]:
- Cursor handing is done on the server -> *cursor are
    QPixmap
  - Use new drawScreen and copyScreen methods.
* QWorkArea.[Ch]:
  - Pixel manipulation is done on the client -> paint_device_ is a
    QImage
  - an intermediate Screen device is updated whenever expose is called
    -> sreen_device_ is a QPixmap. This screen_device is the one that is
    painted on screen in QWorkArea::repaintEvent().
  - new update, drawScreen and copyScreen methods. 
* QLPainter.C: use the new paintDevice interface.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13428 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-20 10:43:21 +00:00
Lars Gullik Bjønnes
12e5a52b92 Added initial qt4 work by Abdelrazak Younes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13294 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-05 17:24:44 +00:00