void PortCheckboxTable
::createWidget(QWidget* parent
) {
HxPort::createWidget(parent);
table = new QTable(1, 1, baseWidget);
table->setEnabled(sensitivity);
table->verticalHeader()->hide();
table->setLeftMargin(0);
table->setSorting(false);
table->setDragEnabled(false);
table->setSelectionMode(QTable::NoSelection);
table->setHScrollBarMode(QScrollView::AlwaysOff);
table->horizontalHeader()->hide();
table->setTopMargin(0);
table->setColumnStretchable(0, true);
initTable();
//for(int i = 0; i < 3; i++ )
// table->setItem( i, 0, new QCheckTableItem( table, "Check me" ) );
layout->addWidget(table);
layout->activate();
baseWidget->adjustSize();
}
void PortCheckboxTable::insertName(const char* name)
{
if( tableWithMessage ){
//table->clearCellWidget(0, 0);
//table->setItem(0, 0, new QCheckTableItem(table, name));
table->numRows();
tableWithMessage = 0;
}
else
{
int newNumRows = table->numRows() + 1;
table->setNumRows(newNumRows);
table
->setItem
( newNumRows
- 1,
0,
new QCheckTableItem
(table,
QString(name
)));
}
}
void PortCheckboxTable::createWidget(QWidget* parent)
{
HxPort::createWidget(parent);
table = new QTable(1, 1, baseWidget);
table->setEnabled(sensitivity);
table->verticalHeader()->hide();
table->setLeftMargin(0);
table->setSorting(false);
table->setDragEnabled(false);
table->setSelectionMode(QTable::NoSelection);
table->setHScrollBarMode(QScrollView::AlwaysOff);
table->horizontalHeader()->hide();
table->setTopMargin(0);
table->setColumnStretchable(0, true);
initTable();
//for(int i = 0; i < 3; i++ )
// table->setItem( i, 0, new QCheckTableItem( table, "Check me" ) );
layout->addWidget(table);
layout->activate();
baseWidget->adjustSize();
}
void PortCheckboxTable::insertName(const char* name)
{
if( tableWithMessage ){
//table->clearCellWidget(0, 0);
//table->setItem(0, 0, new QCheckTableItem(table, name));
table->numRows();
tableWithMessage = 0;
}
else
{
int newNumRows = table->numRows() + 1;
table->setNumRows(newNumRows);
table->setItem( newNumRows - 1, 0, new QCheckTableItem(table, QString(name)));
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks