MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / repositionColumns

Method repositionColumns

gui/ntableview.cpp:1155–1252  ·  view source on GitHub ↗

Change the order of the columns (used after restarting)

Source from the content-addressed store, hash-verified

1153
1154// Change the order of the columns (used after restarting)
1155void NTableView::repositionColumns() {
1156 int from = horizontalHeader()->visualIndex(NOTE_TABLE_AUTHOR_POSITION);
1157 int to = global.getColumnPosition("noteTableAuthorPosition");
1158 if (to>=0) horizontalHeader()->moveSection(from, to);
1159
1160 from = horizontalHeader()->visualIndex(NOTE_TABLE_ALTITUDE_POSITION);
1161 to = global.getColumnPosition("noteTableAltitudePosition");
1162 if (to>=0) horizontalHeader()->moveSection(from, to);
1163
1164 from = horizontalHeader()->visualIndex(NOTE_TABLE_DATE_CREATED_POSITION);
1165 to = global.getColumnPosition("noteTableDateCreatedPosition");
1166 if (to>=0) horizontalHeader()->moveSection(from, to);
1167
1168 from = horizontalHeader()->visualIndex(NOTE_TABLE_DATE_DELETED_POSITION);
1169 to = global.getColumnPosition("noteTableDateDeletedPosition");
1170 if (to>=0) horizontalHeader()->moveSection(from, to);
1171
1172 from = horizontalHeader()->visualIndex(NOTE_TABLE_DATE_SUBJECT_POSITION);
1173 to = global.getColumnPosition("noteTableDateSubjectPosition");
1174 if (to>=0) horizontalHeader()->moveSection(from, to);
1175
1176 from = horizontalHeader()->visualIndex(NOTE_TABLE_DATE_UPDATED_POSITION);
1177 to = global.getColumnPosition("noteTableDateUpdatedPosition");
1178 if (to>=0) horizontalHeader()->moveSection(from, to);
1179
1180 from = horizontalHeader()->visualIndex(NOTE_TABLE_HAS_ENCRYPTION_POSITION);
1181 to = global.getColumnPosition("noteTableHasEncryptionPosition");
1182 if (to>=0) horizontalHeader()->moveSection(from, to);
1183
1184 from = horizontalHeader()->visualIndex(NOTE_TABLE_HAS_TODO_POSITION);
1185 to = global.getColumnPosition("noteTableHasTodoPosition");
1186 if (to>=0) horizontalHeader()->moveSection(from, to);
1187
1188 from = horizontalHeader()->visualIndex(NOTE_TABLE_IS_DIRTY_POSITION);
1189 to = global.getColumnPosition("noteTableIsDirtyPosition");
1190 if (to>=0) horizontalHeader()->moveSection(from, to);
1191
1192 from = horizontalHeader()->visualIndex(NOTE_TABLE_LATITUDE_POSITION);
1193 to = global.getColumnPosition("noteTableLatitudePosition");
1194 if (to>=0) horizontalHeader()->moveSection(from, to);
1195
1196 from = horizontalHeader()->visualIndex(NOTE_TABLE_LID_POSITION);
1197 to = global.getColumnPosition("noteTableLidPosition");
1198 if (to>=0) horizontalHeader()->moveSection(from, to);
1199
1200 from = horizontalHeader()->visualIndex(NOTE_TABLE_LONGITUDE_POSITION);
1201 to = global.getColumnPosition("noteTableLongitudePosition");
1202 if (to>=0) horizontalHeader()->moveSection(from, to);
1203
1204 from = horizontalHeader()->visualIndex(NOTE_TABLE_NOTEBOOK_LID_POSITION);
1205 to = global.getColumnPosition("noteTableNotebookLidPosition");
1206 if (to>=0) horizontalHeader()->moveSection(from, to);
1207
1208 from = horizontalHeader()->visualIndex(NOTE_TABLE_NOTEBOOK_POSITION);
1209 to = global.getColumnPosition("noteTableNotebookPosition");
1210 if (to>=0) horizontalHeader()->moveSection(from, to);
1211
1212 from = horizontalHeader()->visualIndex(NOTE_TABLE_SIZE_POSITION);

Callers 2

viewNoteListWideMethod · 0.80
viewNoteListNarrowMethod · 0.80

Calls 1

getColumnPositionMethod · 0.80

Tested by

no test coverage detected