1 #include "TableColumn.h" 13 TableColumn::TableColumn(QString text,
bool m_readOnlyStatus,
14 bool affectsNetStructure) {
17 m_title =
new QString(text);
19 m_readOnly = m_readOnlyStatus;
20 m_affectsNetworkStructure = affectsNetStructure;
21 m_ascendingSortOrder =
true;
25 TableColumn::TableColumn(
const TableColumn &other) {
28 m_title =
new QString(*other.m_title);
29 m_visible = other.m_visible;
30 m_readOnly = other.m_readOnly;
31 m_width = other.m_width;
35 TableColumn::~TableColumn() {
41 QString TableColumn::getTitle()
const {
46 void TableColumn::setTitle(QString text) {
51 TableColumn &TableColumn::operator=(TableColumn other) {
52 swap(*m_title, *other.m_title);
53 swap(m_visible, other.m_visible);
54 swap(m_readOnly, other.m_readOnly);
55 swap(m_width, other.m_width);
61 bool TableColumn::isVisible()
const {
66 void TableColumn::setVisible(
bool visibility) {
67 m_visible = visibility;
68 emit visibilityChanged();
72 int TableColumn::getWidth()
const {
77 void TableColumn::setWidth(
int newWidth) {
83 bool TableColumn::isReadOnly()
const {
88 bool TableColumn::hasNetworkStructureEffect()
const {
89 return m_affectsNetworkStructure;
93 bool TableColumn::sortAscending()
const {
94 return m_ascendingSortOrder;
98 void TableColumn::setSortAscending(
bool ascending) {
99 m_ascendingSortOrder = ascending;
104 void TableColumn::nullify() {
Namespace for ISIS/Bullet specific routines.