@@ -53,7 +53,15 @@ class MainWindow : public QMainWindow, public Ui_MainWindow
53
53
Database db;
54
54
/* * The list of menu items for opening the most recently opened database files. */
55
55
QList<QAction*> openRecentActions;
56
- /* * The context menu for the UI tables. */
56
+
57
+ /* * The context menu for the column header area of all UI tables. */
58
+ QMenu columnContextMenu;
59
+ /* * The column context menu entry for hiding the selected column. */
60
+ QAction* columnContextMenuHideColumnAction;
61
+ /* * The column context submenu for unhiding any previously hidden column. */
62
+ QMenu* columnContextMenuRestoreColumnMenu;
63
+
64
+ /* * The context menu for the cell are of all UI tables. */
57
65
QMenu tableContextMenu;
58
66
/* * The context menu entry for opening the selected item. */
59
67
QAction* tableContextMenuOpenAction;
@@ -63,8 +71,10 @@ class MainWindow : public QMainWindow, public Ui_MainWindow
63
71
QAction* tableContextMenuDuplicateAction;
64
72
/* * The context menu entry for deleting the selected items. */
65
73
QAction* tableContextMenuDeleteAction;
74
+
66
75
/* * List of keyboard shortcuts. */
67
76
QList<QShortcut*> shortcuts;
77
+
68
78
/* * The status bar label for the current table size. */
69
79
QLabel* statusBarTableSizeLabel;
70
80
/* * The status bar label for the current filter settings. */
@@ -94,9 +104,11 @@ class MainWindow : public QMainWindow, public Ui_MainWindow
94
104
void setupDebugTableViews ();
95
105
void restoreColumnWidths (const ItemTypeMapper* const mapper);
96
106
void restoreColumnOrder (const ItemTypeMapper* const mapper);
107
+ void restoreColumnHiddenStatus (const ItemTypeMapper* const mapper);
97
108
void setSorting (const ItemTypeMapper* const mapper);
109
+ void initColumnContextMenu ();
98
110
void initTableContextMenuAndShortcuts ();
99
- void updateContextMenuEditIcon ();
111
+ void updateTableContextMenuIcons ();
100
112
101
113
// Project setup (on load)
102
114
void attemptToOpenFile (const QString& filepath);
@@ -124,9 +136,13 @@ class MainWindow : public QMainWindow, public Ui_MainWindow
124
136
private slots:
125
137
// UI event handlers
126
138
void handle_tabChanged ();
127
- void handle_rightClick (QPoint pos);
139
+ void handle_rightClickOnColumnHeader (QPoint pos);
140
+ void handle_rightClickInTable (QPoint pos);
128
141
129
- // Context menu action handlers
142
+ // Column context menu action handlers
143
+ void handle_hideColumn ();
144
+ void handle_unhideColumn ();
145
+ // Table context menu action handlers
130
146
void handle_viewSelectedItem ();
131
147
void handle_editSelectedItem ();
132
148
void handle_duplicateAndEditSelectedItem ();
@@ -145,6 +161,7 @@ private slots:
145
161
void handle_showFiltersChanged ();
146
162
void handle_autoResizeColumns ();
147
163
void handle_resetColumnOrder ();
164
+ void handle_restoreHiddenColumns ();
148
165
// Tools menu action handlers
149
166
void handle_relocatePhotos ();
150
167
void handle_exportData ();
@@ -156,8 +173,7 @@ private slots:
156
173
void closeEvent (QCloseEvent* event) override ;
157
174
void saveProjectImplicitSettings ();
158
175
void saveGlobalImplicitSettings ();
159
- void saveColumnWidths (const ItemTypeMapper* const mapper);
160
- void saveColumnOrder (const ItemTypeMapper* const mapper);
176
+ void saveImplicitColumnSettings (const ItemTypeMapper* const mapper);
161
177
void saveSorting (const ItemTypeMapper* const mapper);
162
178
// Layout changes
163
179
virtual void resizeEvent (QResizeEvent* event) override ;
0 commit comments