[DEVELOPMENT ENVIRONMENT]

* NEW: In the report border chooser dialog, round borders can be 
  synchonized like normal borders. This is not taken into account by the
  implementation at the moment.

[GB.QT4]
* NEW: Paint.Reset() works like gb.gtk.
* BUG: Printer.PaperWidth and Printer.PaperHeight values are rounded now.


git-svn-id: svn://localhost/gambas/trunk@4320 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2011-12-23 00:35:46 +00:00
parent 4cd4b4a766
commit 2819ca8122
6 changed files with 38 additions and 13 deletions

View file

@ -295,9 +295,27 @@ Public Sub chkSynchro_Click()
Dim hCtrl As Control
For Each hCtrl In [crdBottom, crdLeft, crdRight, btnBottom, btnLeft, btnRight]
hCtrl.Enabled = chkSynchro.Value = False
For Each hCtrl In panBorder.Children
If hCtrl Is CoordBox Or If hCtrl Is Button Then
If InStr(hCtrl.Name, "Top") Then Continue
hCtrl.Enabled = chkSynchro.Value = False
Endif
Next
For Each hCtrl In panCorner.Children
If hCtrl Is CoordBox Or If hCtrl Is CheckBox Then
If InStr(hCtrl.Name, "TopLeft") Then Continue
hCtrl.Enabled = chkSynchro.Value = False
Endif
Next
If chkSynchro.Value = False Then
crdTopLeft2.Enabled = chkTopLeft.Value = False
crdTopRight2.Enabled = chkTopRight.Value = False
crdBottomLeft2.Enabled = chkBottomLeft.Value = False
crdBottomRight2.Enabled = chkBottomRight.Value = False
Endif
dwgBorder.Refresh
End

View file

@ -5,12 +5,12 @@
Text = ("Configure border")
Resizable = False
{ btnCancel Button
MoveScaled(60,27,16,4)
MoveScaled(62,27,16,4)
Text = ("Cancel")
Cancel = True
}
{ btnOK Button
MoveScaled(43,27,16,4)
MoveScaled(45,27,16,4)
Text = ("OK")
Default = True
}
@ -29,8 +29,8 @@
Count = 2
Index = 0
Text = ("Border")
{ Panel1 Panel
MoveScaled(1,1,34,20)
{ panBorder Panel
MoveScaled(1,1,34,19)
{ crdBottom CoordBox crdBrush
Name = "crdBottom"
MoveScaled(9,15,18,4)
@ -90,8 +90,8 @@
}
Index = 1
Text = ("Corner")
{ Panel2 Panel
MoveScaled(1,1,48,20)
{ panCorner Panel
MoveScaled(1,1,47,19)
{ Label2 Label
MoveScaled(0,5,9,4)
Text = ("TopRight")

View file

@ -1,7 +1,7 @@
# Gambas Project File 3.0
# Compiled with Gambas 2.99.6
Title=Report designer
Startup=myReport2
Startup=myReport1
Icon=printer1.png
Version=2.99.6
VersionProgram=gbx3 -V
@ -11,7 +11,7 @@ Component=gb.form
Component=gb.db
Description="Report engine for gambas"
Authors="Fabien Bodard"
Environment="GB_GUI=gb.gtk"
Environment="GB_GUI=gb.qt4"
TabSize=2
Translate=1
Language=fr

View file

@ -92,6 +92,10 @@ static bool init_painting(GB_PAINT *d, QPaintDevice *device)
EXTRA(d)->path = 0;
EXTRA(d)->clip = 0;
EXTRA(d)->init = new QTransform();
*(EXTRA(d)->init) = PAINTER(d)->worldTransform();
PAINTER(d)->setRenderHints(QPainter::Antialiasing, true);
PAINTER(d)->setRenderHints(QPainter::TextAntialiasing, true);
PAINTER(d)->setRenderHints(QPainter::SmoothPixmapTransform, true);
@ -224,6 +228,7 @@ static void End(GB_PAINT *d)
delete dx->clipStack;
}
delete dx->init;
delete dx->path;
delete dx->clip;
delete dx->painter;
@ -793,7 +798,7 @@ static void Matrix(GB_PAINT *d, int set, GB_TRANSFORM matrix)
if (t)
PAINTER(d)->setWorldTransform(*t);
else
PAINTER(d)->resetTransform();
PAINTER(d)->setWorldTransform(*EXTRA(d)->init);
}
else
*t = PAINTER(d)->worldTransform();

View file

@ -295,7 +295,7 @@ BEGIN_PROPERTY(Printer_PaperWidth)
QSizeF size = PRINTER->paperSize(QPrinter::Millimeter);
if (READ_PROPERTY)
GB.ReturnFloat(size.width());
GB.ReturnFloat(floor((double)size.width() * 1E6) / 1E6);
else
{
size.setWidth((qreal)VPROP(GB_FLOAT));
@ -309,7 +309,7 @@ BEGIN_PROPERTY(Printer_PaperHeight)
QSizeF size = PRINTER->paperSize(QPrinter::Millimeter);
if (READ_PROPERTY)
GB.ReturnFloat(size.height());
GB.ReturnFloat(floor((double)size.height() * 1E6) / 1E6);
else
{
size.setHeight((qreal)VPROP(GB_FLOAT));

View file

@ -40,6 +40,7 @@
#include <QPainterPath>
#include <QBrush>
#include <QPen>
#include <QTransform>
#define QT_INTERFACE_VERSION 1
@ -109,6 +110,7 @@ typedef
QPainterPath *clip;
int fillRule;
QList<QPainterPath *> *clipStack;
QTransform *init;
}
QT_PAINT_EXTRA;