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

Method NTableViewHeader

gui/ntableviewheader.cpp:29–175  ·  view source on GitHub ↗

This overrides QHeaderView and is used so we can have things like custom context menus

Source from the content-addressed store, hash-verified

27//* things like custom context menus
28//************************************************************
29NTableViewHeader::NTableViewHeader(Qt::Orientation orientation, QWidget *parent) :
30 QHeaderView(orientation, parent)
31{
32
33#if QT_VERSION < 0x050000
34 setClickable(true);
35#else
36 setSectionsClickable(true);
37#endif
38 setSortIndicatorShown(true);
39 setContextMenuPolicy(Qt::ActionsContextMenu);
40
41 createdDateAction = new QAction(this);
42 createdDateAction->setText(tr("Date Created"));
43 createdDateAction->setCheckable(true);
44 addAction(createdDateAction);
45
46 changedDateAction = new QAction(this);
47 changedDateAction->setText(tr("Date Updated"));
48 changedDateAction->setCheckable(true);
49 addAction(changedDateAction);
50
51 titleAction = new QAction(this);
52 titleAction->setText(tr("Title"));
53 titleAction->setCheckable(true);
54 addAction(titleAction);
55
56 notebookAction = new QAction(this);
57 notebookAction->setText(tr("Notebook"));
58 notebookAction->setCheckable(true);
59 addAction(notebookAction);
60
61 tagsAction = new QAction(this);
62 tagsAction->setText(tr("Tags"));
63 tagsAction->setCheckable(true);
64 addAction(tagsAction);
65
66 authorAction = new QAction(this);
67 authorAction->setText(tr("Author"));
68 authorAction->setCheckable(true);
69 addAction(authorAction);
70
71 subjectDateAction = new QAction(this);
72 subjectDateAction->setText(tr("Subject Date"));
73 subjectDateAction->setCheckable(true);
74 addAction(subjectDateAction);
75
76 sourceAction = new QAction(this);
77 sourceAction->setText(tr("Source"));
78 sourceAction->setCheckable(true);
79 addAction(sourceAction);
80
81 urlAction = new QAction(this);
82 urlAction->setText(tr("Source URL"));
83 urlAction->setCheckable(true);
84 addAction(urlAction);
85
86 latitudeAction = new QAction(this);

Callers

nothing calls this directly

Calls 2

getGuiFontMethod · 0.80
setTextMethod · 0.45

Tested by

no test coverage detected