38 VaporTable(QTableWidget *table,
bool lastRowIsCheckboxes =
false,
bool lastColIsCheckboxes =
false);
40 void Update(
int rows,
int columns, std::vector<int> values, std::vector<std::string> rowHeaders = std::vector<std::string>(), std::vector<std::string> colHeaders = std::vector<std::string>());
41 void Update(
int rows,
int columns, std::vector<double> values, std::vector<std::string> rowHeaders = std::vector<std::string>(), std::vector<std::string> colHeaders = std::vector<std::string>());
42 void Update(
int rows,
int columns, std::vector<std::string> values, std::vector<std::string> rowHeaders = std::vector<std::string>(),
43 std::vector<std::string> colHeaders = std::vector<std::string>());
65 int RowCount()
const {
return _table->rowCount(); }
67 QWidget *
CellWidget(
int row,
int col) {
return _table->cellWidget(row, col); }
95 std::vector<std::string> convertToString(std::vector<int> values);
97 std::vector<std::string> convertToString(std::vector<double> values);
99 void setHorizontalHeader(std::vector<std::string> header);
101 void setVerticalHeader(std::vector<std::string> header);
103 void setValidator(QLineEdit *edit);
105 void setTableCells(std::vector<std::string> values);
107 void addCheckboxes(std::vector<std::string> values);
109 void addCheckbox(
int row,
int column,
bool checked =
false);
111 bool isValueChecked(std::vector<std::string> values,
int index);
113 void highlightActiveRow(
int row);
115 void resizeTableHeight();
117 void _correctImmutableCellText();
122 bool _lastRowIsCheckboxes;
123 bool _lastColIsCheckboxes;
124 bool _checkboxesEnabled;
125 bool _autoResizeHeight;
127 QTableWidget *_table;
141 template<
typename T>
operator T() const
143 std::stringstream ss(
_value);
145 if (ss >> convertedValue)
146 return convertedValue;
148 throw std::runtime_error(
"conversion failed");
void emitCellClicked(int, int)
void Update(int rows, int columns, std::vector< int > values, std::vector< std::string > rowHeaders=std::vector< std::string >(), std::vector< std::string > colHeaders=std::vector< std::string >())
Value GetValue(int row, int col)
void EnableDisableCheckboxes(bool enabled)
void SetCellMutability(int row, int col)
void Update(int rows, int columns, std::vector< std::string > values, std::vector< std::string > rowHeaders=std::vector< std::string >(), std::vector< std::string > colHeaders=std::vector< std::string >())
std::string GetHorizontalHeaderItem(int index)
bool GetAutoResizeHeight() const
void StretchToColumn(int column)
QWidget * CellWidget(int row, int col)
void ShowToolTips(bool showOrHide)
void valueChanged(int row, int col)
void Update(int rows, int columns, std::vector< double > values, std::vector< std::string > rowHeaders=std::vector< std::string >(), std::vector< std::string > colHeaders=std::vector< std::string >())
void HideColumn(int column)
void SetActiveRow(int row)
void SetAutoResizeHeight(bool val)
void GetValues(std::vector< std::string > &vec)
void GetValues(std::vector< int > &vec)
std::string GetStringValue(int row, int col)
void SetVerticalHeaderWidth(int width)
bool GetShowToolTips() const
void SetCheckboxesInFinalRow(bool enabled)
void cellClicked(int row, int col)
void emitValueChanged(int row=0, int col=0)
std::string GetVerticalHeaderItem(int index)
void SetCheckboxesInFinalColumn(bool enabled)
void Reinit(ValidatorFlags vFlags, MutabilityFlags mFlags, HighlightFlags hFlags)
void GetValues(std::vector< double > &vec)
VaporTable(QTableWidget *table, bool lastRowIsCheckboxes=false, bool lastColIsCheckboxes=false)