#include <qsecolumn.h>


Public Types | |
| enum | QseColumnRole { UnspecifiedRole = -1, NotUsedRole, DetectorRole, NormalizationRole, EnergyRole, SecondsRole } |
Public Member Functions | |
| QseColumn () | |
| ~QseColumn () | |
| QString | name () const |
| void | setName (QString n) |
| int | rowCount () const |
| void | setRowCount (int n) |
| void | clear () |
| const double * | data () const |
| double | data (int n) const |
| void | setData (int n, double v) |
| void | appendData (double v) |
| QseColumnRole | columnRole () const |
| void | setColumnRole (const QseColumnRole r) |
| void | setDefaultRoles () |
| void | addition (const QseColumn *col) |
| void | subtraction (const QseColumn *col) |
| void | multiplication (const QseColumn *col) |
| void | division (const QseColumn *col) |
| void | assignment (const QseColumn *col) |
| void | addition (const double val) |
| void | subtraction (const double val) |
| void | multiplication (const double val) |
| void | division (const double val) |
| void | assignment (const double val) |
Private Attributes | |
| QseColumnRole | m_Role |
| QString | m_Name |
| QVector< double > | m_Data |
Static Private Attributes | |
| static QMutex | m_Mutex |
Definition at line 11 of file qsecolumn.h.
Definition at line 19 of file qsecolumn.h.
00019 { 00020 UnspecifiedRole = -1, 00021 NotUsedRole, 00022 DetectorRole, 00023 NormalizationRole, 00024 EnergyRole, 00025 SecondsRole } QseColumnRole;
| QseColumn::QseColumn | ( | ) |
Definition at line 8 of file qsecolumn.cpp.
00009 : QObject(NULL), 00010 m_Role(UnspecifiedRole), 00011 m_Name("") 00012 {}
| QseColumn::~QseColumn | ( | ) |
| QString QseColumn::name | ( | ) | const |
Definition at line 24 of file qsecolumn.cpp.
References m_Mutex, and m_Name.
Referenced by QseAverager::addScans(), QseDataExport::applyPressed(), QseScan::column(), QseEXAFSOperator::matchesDetectorColumn(), QseAveragerRole::matchesDetectorColumn(), QseEXAFSOperator::matchesEnergyColumn(), QseAveragerRole::matchesEnergyColumn(), QseEXAFSOperator::matchesNormalizationColumn(), QseAveragerRole::matchesNormalizationColumn(), QseEXAFSOperator::matchesSecondsColumn(), QseAveragerRole::matchesSecondsColumn(), QseGraphController::selectScan(), QseAveragerRole::styledColumnItem(), SimpleGraphController::updateGraph(), QseGraphController::updateGraph(), QseScan::writeScan(), and QseController::writeSettings().
| void QseColumn::setName | ( | QString | n | ) |
Definition at line 17 of file qsecolumn.cpp.
References m_Mutex, and m_Name.
Referenced by QseScan::appendColumn(), and QseScan::setColumnNames().
| int QseColumn::rowCount | ( | ) | const |
Definition at line 47 of file qsecolumn.cpp.
References m_Data, and m_Mutex.
Referenced by addition(), QseAverager::addScans(), assignment(), data(), division(), QseScan::maxRowCount(), multiplication(), QseDataReference::size(), subtraction(), and SimpleGraphController::updateGraph().
| void QseColumn::setRowCount | ( | int | n | ) |
| void QseColumn::clear | ( | ) |
Definition at line 31 of file qsecolumn.cpp.
References m_Data, m_Mutex, m_Name, m_Role, and UnspecifiedRole.
00032 { 00033 QMutexLocker lock(&m_Mutex); 00034 00035 m_Name=""; 00036 m_Role=UnspecifiedRole; 00037 m_Data.clear(); 00038 }
| const double * QseColumn::data | ( | ) | const |
Definition at line 61 of file qsecolumn.cpp.
References m_Data, and m_Mutex.
Referenced by addition(), QseDataExport::applyPressed(), assignment(), division(), multiplication(), subtraction(), SimpleGraphController::updateGraph(), QseScan::writeScan(), QseDataReference::x(), and QseDataReference::y().
| double QseColumn::data | ( | int | n | ) | const |
Definition at line 68 of file qsecolumn.cpp.
References m_Data, m_Mutex, and rowCount().
00069 { 00070 if ((0 <= n) && (n < rowCount())) { 00071 QMutexLocker lock(&m_Mutex); 00072 return m_Data.at(n); 00073 } else { 00074 return FP_NAN; 00075 } 00076 }

| void QseColumn::setData | ( | int | n, | |
| double | v | |||
| ) |
Definition at line 78 of file qsecolumn.cpp.
References m_Data, and m_Mutex.
Referenced by SimpleGraphController::updateGraph().
| void QseColumn::appendData | ( | double | v | ) |
| QseColumn::QseColumnRole QseColumn::columnRole | ( | ) | const |
Definition at line 85 of file qsecolumn.cpp.
References m_Mutex, and m_Role.
Referenced by QseAveragerRole::matchesDetectorColumn(), QseAveragerRole::matchesEnergyColumn(), QseAveragerRole::matchesNormalizationColumn(), QseAveragerRole::matchesSecondsColumn(), and QseController::writeSettings().
| void QseColumn::setColumnRole | ( | const QseColumnRole | r | ) |
Definition at line 92 of file qsecolumn.cpp.
References m_Mutex, and m_Role.
Referenced by SimpleGraphController::columnsTableContextMenu(), setDefaultRoles(), and SummaryTableController::summaryTableContextMenu().
| void QseColumn::setDefaultRoles | ( | ) |
Definition at line 99 of file qsecolumn.cpp.
References setColumnRole(), and UnspecifiedRole.
Referenced by QseScan::setDefaultRoles().
00100 { 00101 setColumnRole(QseColumn::UnspecifiedRole); 00102 }

| void QseColumn::addition | ( | const QseColumn * | col | ) |
Definition at line 104 of file qsecolumn.cpp.
References data(), m_Data, m_Mutex, and rowCount().
00105 { 00106 if (col) { 00107 int nr0 = rowCount(), nr1 = col -> rowCount(); 00108 int nr = (nr0 < nr1 ? nr0 : nr1); 00109 00110 QMutexLocker lock(&m_Mutex); 00111 00112 for (int i = 0; i < nr; i++) { 00113 m_Data[i] += col -> data(i); 00114 } 00115 } 00116 }

| void QseColumn::subtraction | ( | const QseColumn * | col | ) |
Definition at line 118 of file qsecolumn.cpp.
References data(), m_Data, m_Mutex, and rowCount().
00119 { 00120 if (col) { 00121 int nr0 = rowCount(), nr1 = col -> rowCount(); 00122 int nr = (nr0 < nr1 ? nr0 : nr1); 00123 00124 QMutexLocker lock(&m_Mutex); 00125 00126 for (int i = 0; i < nr; i++) { 00127 m_Data[i] -= col -> data(i); 00128 } 00129 } 00130 }

| void QseColumn::multiplication | ( | const QseColumn * | col | ) |
Definition at line 132 of file qsecolumn.cpp.
References data(), m_Data, m_Mutex, and rowCount().
00133 { 00134 if (col) { 00135 int nr0 = rowCount(), nr1 = col -> rowCount(); 00136 int nr = (nr0 < nr1 ? nr0 : nr1); 00137 00138 QMutexLocker lock(&m_Mutex); 00139 00140 for (int i = 0; i < nr; i++) { 00141 m_Data[i] *= col -> data(i); 00142 } 00143 } 00144 }

| void QseColumn::division | ( | const QseColumn * | col | ) |
Definition at line 146 of file qsecolumn.cpp.
References data(), m_Data, m_Mutex, and rowCount().
Referenced by QseAverager::divideScan().
00147 { 00148 if (col) { 00149 int nr0 = rowCount(), nr1 = col -> rowCount(); 00150 int nr = (nr0 < nr1 ? nr0 : nr1); 00151 00152 QMutexLocker lock(&m_Mutex); 00153 00154 for (int i = 0; i < nr; i++) { 00155 m_Data[i] /= col -> data(i); 00156 } 00157 } 00158 }

| void QseColumn::assignment | ( | const QseColumn * | col | ) |
Definition at line 160 of file qsecolumn.cpp.
References data(), m_Data, m_Mutex, and rowCount().
00161 { 00162 if (col) { 00163 int nr0 = rowCount(), nr1 = col -> rowCount(); 00164 int nr = (nr0 < nr1 ? nr0 : nr1); 00165 00166 QMutexLocker lock(&m_Mutex); 00167 00168 for (int i = 0; i < nr; i++) { 00169 m_Data[i] = col -> data(i); 00170 } 00171 } 00172 }

| void QseColumn::addition | ( | const double | val | ) |
Definition at line 174 of file qsecolumn.cpp.
References m_Data, m_Mutex, and rowCount().
00175 { 00176 int nr = rowCount(); 00177 00178 QMutexLocker lock(&m_Mutex); 00179 00180 for (int i = 0; i < nr; i++) { 00181 m_Data[i] += val; 00182 } 00183 }

| void QseColumn::subtraction | ( | const double | val | ) |
Definition at line 185 of file qsecolumn.cpp.
References m_Data, m_Mutex, and rowCount().
00186 { 00187 int nr = rowCount(); 00188 00189 QMutexLocker lock(&m_Mutex); 00190 00191 for (int i = 0; i < nr; i++) { 00192 m_Data[i] -= val; 00193 } 00194 }

| void QseColumn::multiplication | ( | const double | val | ) |
Definition at line 196 of file qsecolumn.cpp.
References m_Data, m_Mutex, and rowCount().
00197 { 00198 int nr = rowCount(); 00199 00200 QMutexLocker lock(&m_Mutex); 00201 00202 for (int i = 0; i < nr; i++) { 00203 m_Data[i] *= val; 00204 } 00205 }

| void QseColumn::division | ( | const double | val | ) |
Definition at line 207 of file qsecolumn.cpp.
References m_Data, m_Mutex, and rowCount().
00208 { 00209 int nr = rowCount(); 00210 00211 QMutexLocker lock(&m_Mutex); 00212 00213 for (int i = 0; i < nr; i++) { 00214 m_Data[i] /= val; 00215 } 00216 }

| void QseColumn::assignment | ( | const double | val | ) |
Definition at line 218 of file qsecolumn.cpp.
References m_Data, m_Mutex, and rowCount().
00219 { 00220 int nr = rowCount(); 00221 00222 QMutexLocker lock(&m_Mutex); 00223 00224 for (int i = 0; i < nr; i++) { 00225 m_Data[i] = val; 00226 } 00227 }

QseColumnRole QseColumn::m_Role [private] |
Definition at line 57 of file qsecolumn.h.
Referenced by clear(), columnRole(), and setColumnRole().
QString QseColumn::m_Name [private] |
QVector<double> QseColumn::m_Data [private] |
Definition at line 59 of file qsecolumn.h.
Referenced by addition(), appendData(), assignment(), clear(), data(), division(), multiplication(), rowCount(), setData(), setRowCount(), and subtraction().
QMutex QseColumn::m_Mutex [static, private] |
Definition at line 60 of file qsecolumn.h.
Referenced by addition(), appendData(), assignment(), clear(), columnRole(), data(), division(), multiplication(), name(), rowCount(), setColumnRole(), setData(), setName(), setRowCount(), and subtraction().
1.5.5