本文整理汇总了C++中Global::getColumnPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ Global::getColumnPosition方法的具体用法?C++ Global::getColumnPosition怎么用?C++ Global::getColumnPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Global
的用法示例。
在下文中一共展示了Global::getColumnPosition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: repositionColumns
// Change the order of the columns (used after restarting)
void NTableView::repositionColumns() {
int from = horizontalHeader()->visualIndex(NOTE_TABLE_AUTHOR_POSITION);
int to = global.getColumnPosition("noteTableAuthorPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_ALTITUDE_POSITION);
to = global.getColumnPosition("noteTableAltitudePosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_DATE_CREATED_POSITION);
to = global.getColumnPosition("noteTableDateCreatedPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_DATE_DELETED_POSITION);
to = global.getColumnPosition("noteTableDateDeletedPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_DATE_SUBJECT_POSITION);
to = global.getColumnPosition("noteTableDateSubjectPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_DATE_UPDATED_POSITION);
to = global.getColumnPosition("noteTableDateUpdatedPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_HAS_ENCRYPTION_POSITION);
to = global.getColumnPosition("noteTableHasEncryptionPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_HAS_TODO_POSITION);
to = global.getColumnPosition("noteTableHasTodoPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_IS_DIRTY_POSITION);
to = global.getColumnPosition("noteTableIsDirtyPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_LATITUDE_POSITION);
to = global.getColumnPosition("noteTableLatitudePosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_LID_POSITION);
to = global.getColumnPosition("noteTableLidPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_LONGITUDE_POSITION);
to = global.getColumnPosition("noteTableLongitudePosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_NOTEBOOK_LID_POSITION);
to = global.getColumnPosition("noteTableNotebookLidPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_NOTEBOOK_POSITION);
to = global.getColumnPosition("noteTableNotebookPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_SIZE_POSITION);
to = global.getColumnPosition("noteTableSizePosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_THUMBNAIL_POSITION);
to = global.getColumnPosition("noteTableThumbnailPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_SOURCE_APPLICATION_POSITION);
to = global.getColumnPosition("noteTableSourceApplicationPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_SOURCE_POSITION);
to = global.getColumnPosition("noteTableSourcePosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_SOURCE_URL_POSITION);
to = global.getColumnPosition("noteTableSourceUrlPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_TAGS_POSITION);
to = global.getColumnPosition("noteTableTagsPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_TITLE_POSITION);
to = global.getColumnPosition("noteTableTitlePosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_REMINDER_TIME_POSITION);
to = global.getColumnPosition("noteTableReminderTimePosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_REMINDER_TIME_DONE_POSITION);
to = global.getColumnPosition("noteTableReminderTimeDonePosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
from = horizontalHeader()->visualIndex(NOTE_TABLE_REMINDER_ORDER_POSITION);
to = global.getColumnPosition("noteTableReminderOrderPosition");
if (to>=0) horizontalHeader()->moveSection(from, to);
}