mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
folio list: scaling as per sheet size added
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2844 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -29,21 +29,9 @@ qreal DiagramFolioList::colWidths[4] = {0.1, 0.55, 0.2, 0.15};
|
||||
*/
|
||||
DiagramFolioList::DiagramFolioList(QObject *parent) : Diagram(parent) {
|
||||
|
||||
list_lines_.clear();
|
||||
list_rectangles_.clear();
|
||||
|
||||
id = folioList_quantity;
|
||||
folioList_quantity++;
|
||||
|
||||
qreal width = border_and_titleblock.columnsTotalWidth();
|
||||
qreal height = border_and_titleblock.rowsTotalHeight();
|
||||
|
||||
//top left corner of drawable area
|
||||
qreal x0 = border_and_titleblock.rowsHeaderWidth();
|
||||
qreal y0 = border_and_titleblock.columnsHeaderHeight();
|
||||
QRectF row_RectF(x0, y0, width, height);
|
||||
|
||||
buildGrid(row_RectF,30,2,colWidths);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,10 +63,25 @@ void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r)
|
||||
p -> setPen(Qt::NoPen);
|
||||
p -> setBrush(Diagram::background_color);
|
||||
p -> drawRect(r);
|
||||
p -> setPen(Qt::black);
|
||||
p -> setPen(Qt::black);
|
||||
|
||||
qreal x0 = list_rectangles_[0] -> topLeft().x();
|
||||
qreal y0 = list_rectangles_[0] -> topLeft().y();
|
||||
clear();
|
||||
|
||||
list_lines_.clear();
|
||||
list_rectangles_.clear();
|
||||
|
||||
qreal width = border_and_titleblock.columnsTotalWidth();
|
||||
qreal height = border_and_titleblock.rowsTotalHeight();
|
||||
|
||||
//top left corner of drawable area
|
||||
qreal x0 = border_and_titleblock.rowsHeaderWidth();
|
||||
qreal y0 = border_and_titleblock.columnsHeaderHeight();
|
||||
QRectF row_RectBorder(x0, y0, width, height);
|
||||
|
||||
buildGrid(row_RectBorder,30,2,colWidths);
|
||||
|
||||
x0 = list_rectangles_[0] -> topLeft().x();
|
||||
y0 = list_rectangles_[0] -> topLeft().y();
|
||||
qreal rowHeight = (list_rectangles_[0] -> height())/30;
|
||||
QRectF row_RectF(x0, y0, list_rectangles_[0] -> width(), rowHeight);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user