Align for field description of increment.

--HG--
branch : develop
This commit is contained in:
dismine 2013-10-21 12:36:24 +03:00
parent 70901ddb1b
commit 27b239fc84
2 changed files with 11 additions and 3 deletions

View File

@ -148,7 +148,7 @@ void DialogIncrements::FillIncrementTable(){
ui->tableWidgetIncrement->setItem(currentRow, 4, item); ui->tableWidgetIncrement->setItem(currentRow, 4, item);
item = new QTableWidgetItem(cell.getDescription()); item = new QTableWidgetItem(cell.getDescription());
item->setTextAlignment(Qt::AlignHCenter); item->setTextAlignment(Qt::AlignLeft);
ui->tableWidgetIncrement->setItem(currentRow, 5, item); ui->tableWidgetIncrement->setItem(currentRow, 5, item);
} }
if(ui->tableWidgetIncrement->rowCount()>0){ if(ui->tableWidgetIncrement->rowCount()>0){
@ -156,7 +156,6 @@ void DialogIncrements::FillIncrementTable(){
} }
ui->tableWidgetIncrement->resizeColumnsToContents(); ui->tableWidgetIncrement->resizeColumnsToContents();
ui->tableWidgetIncrement->resizeRowsToContents(); ui->tableWidgetIncrement->resizeRowsToContents();
ui->tableWidgetIncrement->verticalHeader()->setDefaultSectionSize(20);
ui->tableWidgetIncrement->setCurrentCell( row, column ); ui->tableWidgetIncrement->setCurrentCell( row, column );
} }
@ -466,6 +465,8 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column ){
VIncrementTableRow incr = data->GetIncrementTableRow(itemName->text()); VIncrementTableRow incr = data->GetIncrementTableRow(itemName->text());
incr.setDescription(item->text()); incr.setDescription(item->text());
data->UpdateIncrementTableRow(itemName->text(), incr); data->UpdateIncrementTableRow(itemName->text(), incr);
ui->tableWidgetIncrement->resizeColumnsToContents();
ui->tableWidgetIncrement->resizeRowsToContents();
ui->tableWidgetIncrement->setCurrentCell( row, 0 ); ui->tableWidgetIncrement->setCurrentCell( row, 0 );
emit haveLiteChange(); emit haveLiteChange();
} }
@ -491,6 +492,7 @@ void DialogIncrements::InitialIncrementTable(){
ui->tableWidgetIncrement->setHorizontalHeaderItem(3, new QTableWidgetItem(tr("In size"))); ui->tableWidgetIncrement->setHorizontalHeaderItem(3, new QTableWidgetItem(tr("In size")));
ui->tableWidgetIncrement->setHorizontalHeaderItem(4, new QTableWidgetItem(tr("In growth"))); ui->tableWidgetIncrement->setHorizontalHeaderItem(4, new QTableWidgetItem(tr("In growth")));
ui->tableWidgetIncrement->setHorizontalHeaderItem(5, new QTableWidgetItem(tr("Description"))); ui->tableWidgetIncrement->setHorizontalHeaderItem(5, new QTableWidgetItem(tr("Description")));
ui->tableWidgetIncrement->verticalHeader()->setDefaultSectionSize(20);
} }
void DialogIncrements::InitialLinesTable(){ void DialogIncrements::InitialLinesTable(){

View File

@ -27,7 +27,7 @@
<enum>QTabWidget::North</enum> <enum>QTabWidget::North</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="tabStandart"> <widget class="QWidget" name="tabStandart">
<attribute name="title"> <attribute name="title">
@ -149,9 +149,15 @@
<attribute name="verticalHeaderVisible"> <attribute name="verticalHeaderVisible">
<bool>false</bool> <bool>false</bool>
</attribute> </attribute>
<attribute name="verticalHeaderCascadingSectionResizes">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize"> <attribute name="verticalHeaderDefaultSectionSize">
<number>45</number> <number>45</number>
</attribute> </attribute>
<attribute name="verticalHeaderStretchLastSection">
<bool>false</bool>
</attribute>
<column> <column>
<property name="text"> <property name="text">
<string>Denotation</string> <string>Denotation</string>