timing code (796 ms with grid layout, 1394 ms with table layout)

This commit is contained in:
Damjan Adamic
2015-12-07 18:03:36 +01:00
parent 191e37f29c
commit e37dcabd95
8 changed files with 82 additions and 12 deletions
+6
View File
@@ -76,6 +76,8 @@ void LimitsGroup::updateMinMax(int max)
Channels::Channels(QWidget * parent, ModelData & model, GeneralSettings & generalSettings, Firmware * firmware):
ModelPanel(parent, model, generalSettings, firmware)
{
Stopwatch s1("Channels");
int channelNameMaxLen = firmware->getCapability(ChannelsName);
QStringList headerLabels;
@@ -92,6 +94,8 @@ Channels::Channels(QWidget * parent, ModelData & model, GeneralSettings & genera
headerLabels << tr("Linear Subtrim");
TableLayout * tableLayout = new TableLayout(this, firmware->getCapability(LogicalSwitches), headerLabels);
s1.report("header");
for (int i=0; i<firmware->getCapability(Outputs); i++) {
int col = 0;
@@ -167,10 +171,12 @@ Channels::Channels(QWidget * parent, ModelData & model, GeneralSettings & genera
tableLayout->addWidget(i, col++, symlimits);
}
}
s1.report("add elements");
disableMouseScrolling();
tableLayout->resizeColumnsToContents();
tableLayout->pushRowsUp(firmware->getCapability(Outputs)+1);
s1.report("end");
}
Channels::~Channels()