mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
Added zoom-related menus.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1417 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -665,7 +665,7 @@ QString TitleBlockTemplate::name() const {
|
||||
*/
|
||||
int TitleBlockTemplate::rowDimension(int i) {
|
||||
int index = (i == -1) ? rows_heights_.count() - 1 : i;
|
||||
if (index >= 0 || index < rows_heights_.count()) {
|
||||
if (index >= 0 && index < rows_heights_.count()) {
|
||||
return(rows_heights_.at(index));
|
||||
}
|
||||
return(-1);
|
||||
@@ -689,7 +689,7 @@ void TitleBlockTemplate::setRowDimension(int i, const TitleBlockDimension &dimen
|
||||
*/
|
||||
TitleBlockDimension TitleBlockTemplate::columnDimension(int i) {
|
||||
int index = (i == -1) ? columns_width_.count() - 1 : i;
|
||||
if (index >= 0 || index < columns_width_.count()) {
|
||||
if (index >= 0 && index < columns_width_.count()) {
|
||||
return(columns_width_.at(index));
|
||||
}
|
||||
return(TitleBlockDimension(-1));
|
||||
@@ -764,6 +764,18 @@ QList<int> TitleBlockTemplate::rowsHeights() const {
|
||||
return(rows_heights_);
|
||||
}
|
||||
|
||||
/**
|
||||
@return the total effective width of this template
|
||||
@param total_width The total width initially planned for the rendering
|
||||
*/
|
||||
int TitleBlockTemplate::width(int total_width) {
|
||||
int width = 0;
|
||||
foreach (int col_width, columnsWidth(total_width)) {
|
||||
width += col_width;
|
||||
}
|
||||
return(width);
|
||||
}
|
||||
|
||||
/**
|
||||
@return the total height of this template
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user