35      QString pathForSettings,
 
   40    setObjectName(objName);
 
   45    connect(
m_model, SIGNAL(filterCountsChanged(
int, 
int)),
 
   46        this, SIGNAL(filterCountsChanged(
int, 
int)));
 
   47    connect(
m_model, SIGNAL(userWarning(AbstractTableModel::Warning)),
 
   57    for (
int i = 0; i < 
m_columns->size(); i++) {
 
   59      QString colTitle = col->getTitle();
 
   60      int defaultWidth = QFontMetrics(font()).horizontalAdvance(colTitle) + 40;
 
   61      if (colTitle.size()) {
 
   62        key = objectName() + 
" " + colTitle + 
" width";
 
   63        key.replace(
" ", 
"_");
 
   64        col->setWidth(settings.value(key, defaultWidth).toInt());
 
   66        key = objectName() + 
" " + colTitle + 
" ascending";
 
   67        key.replace(
" ", 
"_");
 
   68        col->setSortAscending(settings.value(key, 
true).toBool());
 
   71        col->setWidth(defaultWidth);
 
   77    key = objectName() + 
" sorting order";
 
   78    key.replace(
" ", 
"_");
 
   87    connect(
m_header, SIGNAL(requestedGlobalSelection(
bool)),
 
   89    connect(
m_header, SIGNAL(requestedGlobalSelection(
bool)),
 
   90        this, SIGNAL(selectionChanged()));
 
   93    connect(
m_content, SIGNAL(tableSelectionChanged()),
 
   94        this, SIGNAL(selectionChanged()));
 
   96        SIGNAL(rebuildModels(QList< AbstractTreeItem * >)),
 
   98        SIGNAL(rebuildModels(QList< AbstractTreeItem * >)));
 
   99    connect(
m_content, SIGNAL(horizontalScrollBarValueChanged(
int)),
 
  100        m_header, SLOT(updateHeaderOffset(
int)));
 
  101    connect(
m_content, SIGNAL(modelDataChanged()),
 
  102        this, SIGNAL(modelDataChanged()));
 
  103    connect(
m_content, SIGNAL(tableSelectionChanged(QList<AbstractTreeItem *>)),
 
  104        this, SIGNAL(tableSelectionChanged(QList<AbstractTreeItem *>)));
 
  106            this, SIGNAL(editControlPoint(
ControlPoint *, QString)));
 
  108    connect(
m_header, SIGNAL(columnResized(
bool)),
 
  109        m_content, SLOT(updateHorizontalScrollBar(
bool)));
 
  111    QVBoxLayout *layout = 
new QVBoxLayout;
 
  115    layout->setContentsMargins(0, 0, 0, 0);
 
  116    layout->setSpacing(0);
 
 
  130      for (
int i = 0; i < 
m_columns->size(); i++) {
 
  132        QString colTitle = col->getTitle();
 
  133        if (colTitle.size()) {
 
  134          key = objectName() + 
" " + colTitle + 
" width";
 
  135          key.replace(
" ", 
"_");
 
  136          settings.setValue(key, col->getWidth());
 
  138          key = objectName() + 
" " + colTitle + 
" ascending";
 
  139          key.replace(
" ", 
"_");
 
  140          settings.setValue(key, col->sortAscending());
 
  144      key = objectName() + 
" sorting order";
 
  145      key.replace(
" ", 
"_");
 
  146      settings.setValue(key, 
m_columns->getSortingOrderAsStrings());
 
 
AbstractTableModel * getModel()
Returns the model.
void refresh()
Refreshes the table and viewport.
void scrollTo(QList< AbstractTreeItem * >)
Scrolls to the selected items.