Class: Qt::TableWidget

Inherits:
Object show all
Defined in:
lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb,
lib/cosmos/gui/qt.rb

Overview

For the CTS we display all the tables as full size Thus we don’t want the table to absorb the scroll wheel events but instead pass them up to the container so the entire window will scroll.

Instance Method Summary collapse

Instance Method Details

#displayFullSizeObject

Resizes the table, turns off scroll bars, and sets the minimum and maximum sizes to the full size of the table with all the elements in view



304
305
306
307
308
309
310
311
# File 'lib/cosmos/gui/qt.rb', line 304

def displayFullSize
  resizeColumnsToContents()
  resizeRowsToContents()
  setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff)
  setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff)
  setMinimumSize(fullWidth, fullHeight)
  setMaximumSize(fullWidth, fullHeight)
end

#fullHeightObject



317
318
319
# File 'lib/cosmos/gui/qt.rb', line 317

def fullHeight
  2*frameWidth() + verticalHeader.length + horizontalHeader.height
end

#fullWidthObject



313
314
315
# File 'lib/cosmos/gui/qt.rb', line 313

def fullWidth
  2*frameWidth() + horizontalHeader.length + verticalHeader.width
end

#wheelEvent(event) ⇒ Object



41
42
43
# File 'lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb', line 41

def wheelEvent(event)
  event.ignore()
end