Engauge Digitizer  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CreateActions.cpp
Go to the documentation of this file.
1 /******************************************************************************************************
2  * (C) 2018 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #include "CreateActions.h"
8 #include "DigitAxis.xpm"
9 #include "DigitColorPicker.xpm"
10 #include "DigitCurve.xpm"
11 #include "DigitPointMatch.xpm"
12 #include "DigitScale.xpm"
13 #include "DigitSegment.xpm"
14 #include "DigitSelect.xpm"
15 #include "Logger.h"
16 #include "MainWindow.h"
17 #include <QAction>
18 #include <QIcon>
19 #include <QPixmap>
20 #include <QSignalMapper>
21 #include <QWhatsThis>
22 
24 {
25 }
26 
28 {
29  LOG4CPP_INFO_S ((*mainCat)) << "CreateActions::create";
30 
31  createFile (mw);
32  createEdit (mw);
33  createDigitize (mw);
34  createView (mw);
35  createSettings (mw);
36  createHelp (mw);
37 }
38 
39 void CreateActions::createDigitize (MainWindow &mw)
40 {
41  LOG4CPP_INFO_S ((*mainCat)) << "CreateActions::createDigitize";
42 
43  QPixmap pixmapAxis (DigitAxis_xpm);
44  QPixmap pixmapCurve (DigitCurve_xpm);
45  QPixmap pixmapColorPicker (DigitColorPicker_xpm);
46  QPixmap pixmapPointMatch (DigitPointMatch_xpm);
47  QPixmap pixmapScale (DigitScale_xpm);
48  QPixmap pixmapSegment (DigitSegment_xpm);
49  QPixmap pixmapSelect (DigitSelect_xpm);
50 
51  QIcon iconAxis (pixmapAxis);
52  QIcon iconCurve (pixmapCurve);
53  QIcon iconColorPicker (pixmapColorPicker);
54  QIcon iconPointMatch (pixmapPointMatch);
55  QIcon iconScale (pixmapScale);
56  QIcon iconSegment (pixmapSegment);
57  QIcon iconSelect (pixmapSelect);
58 
59  mw.m_actionDigitizeSelect = new QAction (iconSelect, tr ("Select Tool"), &mw);
60  mw.m_actionDigitizeSelect->setShortcut (QKeySequence (tr ("Shift+F2")));
61  mw.m_actionDigitizeSelect->setCheckable (true);
62  mw.m_actionDigitizeSelect->setStatusTip (tr ("Select points on screen."));
63  mw.m_actionDigitizeSelect->setWhatsThis (tr ("Select\n\n"
64  "Select points on the screen."));
65  connect (mw.m_actionDigitizeSelect, SIGNAL (triggered ()), &mw, SLOT (slotDigitizeSelect ()));
66 
67  mw.m_actionDigitizeAxis = new QAction (iconAxis, tr ("Axis Point Tool"), &mw);
68  mw.m_actionDigitizeAxis->setShortcut (QKeySequence (tr ("Shift+F3")));
69  mw.m_actionDigitizeAxis->setCheckable (true);
70  mw.m_actionDigitizeAxis->setStatusTip (tr ("Digitize axis points for a graph."));
71  mw.m_actionDigitizeAxis->setWhatsThis (tr ("Digitize Axis Point\n\n"
72  "Digitizes an axis point for a graph by placing a new point at the cursor "
73  "after a mouse click. The coordinates of the axis point are then "
74  "entered. After Import and Import (Advanced), three axis points with "
75  "(X1,Y1) (X2,Y2) (X3,Y3) coordinates can be digitized to define the graph coordinates. "
76  "Optionally, after Import (Advanced) four axis points with "
77  "(X1) (X2) (Y3) (Y4) coordinates can be digitized to define the graph coordinates.\n\n"
78  "This tool is disabled when a complete set of axis points has been defined, or "
79  "after Import (Advanced) if Scale Bar is selected."));
80  connect (mw.m_actionDigitizeAxis, SIGNAL (triggered ()), &mw, SLOT (slotDigitizeAxis ()));
81 
82  mw.m_actionDigitizeScale = new QAction (iconScale, tr ("Scale Bar Tool"), &mw);
83  mw.m_actionDigitizeScale->setShortcut (QKeySequence (tr ("Shift+F8")));
84  mw.m_actionDigitizeScale->setCheckable (true);
85  mw.m_actionDigitizeScale->setStatusTip (tr ("Digitize scale bar for a map. Requires Import (Advanced)."));
86  mw.m_actionDigitizeScale->setWhatsThis (tr ("Digitize Scale Bar\n\n"
87  "Digitize a scale bar for a map by clicking and dragging. The length of the "
88  "scale bar is then entered. In a map, the two endpoints of the scale "
89  "bar define the distances in graph coordinates.\n\n"
90  "This tool is enabled by selecting Scale Bar in Import (Advanced).\n\n"
91  "This tool is disabled when a scale bar has been defined, or "
92  "if axis points were selected during import."));
93  connect (mw.m_actionDigitizeScale, SIGNAL (triggered ()), &mw, SLOT (slotDigitizeScale ()));
94 
95  mw.m_actionDigitizeCurve = new QAction (iconCurve, tr ("Curve Point Tool"), &mw);
96  mw.m_actionDigitizeCurve->setShortcut (QKeySequence (tr ("Shift+F4")));
97  mw.m_actionDigitizeCurve->setCheckable (true);
98  mw.m_actionDigitizeCurve->setStatusTip (tr ("Digitize curve points."));
99  mw.m_actionDigitizeCurve->setWhatsThis (tr ("Digitize Curve Point\n\n"
100  "Digitizes a curve point by placing a new point at the cursor "
101  "after a mouse click. Use this mode to digitize points along curves "
102  "one by one.\n\n"
103  "New points will be assigned to the currently selected curve."));
104  connect (mw.m_actionDigitizeCurve, SIGNAL (triggered ()), &mw, SLOT (slotDigitizeCurve ()));
105 
106  mw.m_actionDigitizePointMatch = new QAction (iconPointMatch, tr ("Point Match Tool"), &mw);
107  mw.m_actionDigitizePointMatch->setShortcut (QKeySequence (tr ("Shift+F5")));
108  mw.m_actionDigitizePointMatch->setCheckable (true);
109  mw.m_actionDigitizePointMatch->setStatusTip (tr ("Digitize curve points in a point plot by matching a point."));
110  mw.m_actionDigitizePointMatch->setWhatsThis (tr ("Digitize Curve Points by Point Matching\n\n"
111  "Digitizes curve points in a point plot by finding points that match a sample point. The process "
112  "starts by selecting a representative sample point.\n\n"
113  "New points will be assigned to the currently selected curve."));
114  connect (mw.m_actionDigitizePointMatch, SIGNAL (triggered ()), &mw, SLOT (slotDigitizePointMatch ()));
115 
116  mw.m_actionDigitizeColorPicker = new QAction (iconColorPicker, tr ("Color Picker Tool"), &mw);
117  mw.m_actionDigitizeColorPicker->setShortcut (QKeySequence (tr ("Shift+F6")));
118  mw.m_actionDigitizeColorPicker->setCheckable (true);
119  mw.m_actionDigitizeColorPicker->setStatusTip (tr ("Select color settings for filtering in Segment Fill mode."));
120  mw.m_actionDigitizeColorPicker->setWhatsThis (tr ("Select color settings for Segment Fill filtering\n\n"
121  "Select a pixel along the currently selected curve. That pixel and its neighbors will "
122  "define the filter settings (color, brightness, and so on) of the currently selected curve "
123  "while in Segment Fill mode."));
124  connect (mw.m_actionDigitizeColorPicker, SIGNAL (triggered ()), &mw, SLOT (slotDigitizeColorPicker ()));
125 
126  mw.m_actionDigitizeSegment = new QAction (iconSegment, tr ("Segment Fill Tool"), &mw);
127  mw.m_actionDigitizeSegment->setShortcut (QKeySequence (tr ("Shift+F7")));
128  mw.m_actionDigitizeSegment->setCheckable (true);
129  mw.m_actionDigitizeSegment->setStatusTip (tr ("Digitize curve points along a segment of a curve."));
130  mw.m_actionDigitizeSegment->setWhatsThis (tr ("Digitize Curve Points With Segment Fill\n\n"
131  "Digitizes curve points by placing new points along the highlighted "
132  "segment under the cursor. Use this mode to quickly digitize multiple points along a "
133  "curve with a single click.\n\n"
134  "New points will be assigned to the currently selected curve."));
135  connect (mw.m_actionDigitizeSegment, SIGNAL (triggered ()), &mw, SLOT (slotDigitizeSegment ()));
136 
137  mw.m_groupDigitize = new QActionGroup (&mw);
138  mw.m_groupDigitize->addAction (mw.m_actionDigitizeSelect);
139  mw.m_groupDigitize->addAction (mw.m_actionDigitizeAxis);
140  mw.m_groupDigitize->addAction (mw.m_actionDigitizeScale);
141  mw.m_groupDigitize->addAction (mw.m_actionDigitizeCurve);
142  mw.m_groupDigitize->addAction (mw.m_actionDigitizePointMatch);
143  mw.m_groupDigitize->addAction (mw.m_actionDigitizeColorPicker);
144  mw.m_groupDigitize->addAction (mw.m_actionDigitizeSegment);
145 }
146 
147 void CreateActions::createEdit (MainWindow &mw)
148 {
149  LOG4CPP_INFO_S ((*mainCat)) << "CreateActions::createEdit";
150 
151  mw.m_actionEditUndo = new QAction(tr ("&Undo"), &mw);
152  mw.m_actionEditUndo->setShortcut (QKeySequence::Undo);
153  mw.m_actionEditUndo->setStatusTip (tr ("Undo the last operation."));
154  mw.m_actionEditUndo->setWhatsThis (tr ("Undo\n\n"
155  "Undo the last operation."));
156  // connect is applied when CmdMediator appears
157 
158  mw.m_actionEditRedo = new QAction(tr ("&Redo"), &mw);
159  mw.m_actionEditRedo->setShortcut (QKeySequence::Redo);
160  mw.m_actionEditRedo->setStatusTip (tr ("Redo the last operation."));
161  mw.m_actionEditRedo->setWhatsThis (tr ("Redo\n\n"
162  "Redo the last operation."));
163  // connect is applied when CmdMediator appears
164 
165  mw.m_actionEditCut = new QAction (tr ("Cut"), &mw);
166  mw.m_actionEditCut->setShortcut (QKeySequence::Cut);
167  mw.m_actionEditCut->setStatusTip (tr ("Cuts the selected points and copies them to the clipboard."));
168  mw.m_actionEditCut->setWhatsThis (tr ("Cut\n\n"
169  "Cuts the selected points and copies them to the clipboard."));
170  connect (mw.m_actionEditCut, SIGNAL (triggered ()), &mw, SLOT (slotEditCut ()));
171 
172  mw.m_actionEditCopy = new QAction (tr ("Copy"), &mw);
173  mw.m_actionEditCopy->setShortcut (QKeySequence::Copy);
174  mw.m_actionEditCopy->setStatusTip (tr ("Copies the selected points to the clipboard."));
175  mw.m_actionEditCopy->setWhatsThis (tr ("Copy\n\n"
176  "Copies the selected points to the clipboard."));
177  connect (mw.m_actionEditCopy, SIGNAL (triggered ()), &mw, SLOT (slotEditCopy ()));
178 
179  mw.m_actionEditPaste = new QAction (tr ("Paste"), &mw);
180  mw.m_actionEditPaste->setShortcut (QKeySequence::Paste);
181  mw.m_actionEditPaste->setStatusTip (tr ("Pastes the selected points from the clipboard."));
182  mw.m_actionEditPaste->setWhatsThis (tr ("Paste\n\n"
183  "Pastes the selected points from the clipboard. They will be assigned to the current curve."));
184  connect (mw.m_actionEditPaste, SIGNAL (triggered ()), &mw, SLOT (slotEditPaste ()));
185 
186  mw.m_actionEditDelete = new QAction (tr ("Delete"), &mw);
187  mw.m_actionEditDelete->setShortcut (QKeySequence::Delete);
188  mw.m_actionEditDelete->setStatusTip (tr ("Deletes the selected points, after copying them to the clipboard."));
189  mw.m_actionEditDelete->setWhatsThis (tr ("Delete\n\n"
190  "Deletes the selected points, after copying them to the clipboard."));
191  connect (mw.m_actionEditDelete, SIGNAL (triggered ()), &mw, SLOT (slotEditDelete ()));
192 
193  mw.m_actionEditPasteAsNew = new QAction (tr ("Paste As New"), &mw);
194  mw.m_actionEditPasteAsNew->setStatusTip (tr ("Pastes an image from the clipboard."));
195  mw.m_actionEditPasteAsNew->setWhatsThis (tr ("Paste as New\n\n"
196  "Creates a new document by pasting an image from the clipboard."));
197  connect (mw.m_actionEditPasteAsNew, SIGNAL (triggered ()), &mw, SLOT (slotEditPasteAsNew ()));
198 
199  mw.m_actionEditPasteAsNewAdvanced = new QAction (tr ("Paste As New (Advanced)..."), &mw);
200  mw.m_actionEditPasteAsNewAdvanced->setStatusTip (tr ("Pastes an image from the clipboard, in advanced mode."));
201  mw.m_actionEditPasteAsNewAdvanced->setWhatsThis (tr ("Paste as New (Advanced)\n\n"
202  "Creates a new document by pasting an image from the clipboard, in advanced mode."));
203  connect (mw.m_actionEditPasteAsNewAdvanced, SIGNAL (triggered ()), &mw, SLOT (slotEditPasteAsNewAdvanced ()));
204 }
205 
206 void CreateActions::createFile (MainWindow &mw)
207 {
208  LOG4CPP_INFO_S ((*mainCat)) << "CreateActions::createFile";
209 
210  mw.m_actionImport = new QAction(tr ("&Import..."), &mw);
211  mw.m_actionImport->setShortcut (tr ("Ctrl+I"));
212  mw.m_actionImport->setStatusTip (tr ("Creates a new document by importing a simple image."));
213  mw.m_actionImport->setWhatsThis (tr ("Import Image\n\n"
214  "Creates a new document by importing an image with a single coordinate system, "
215  "and axes both coordinates known.\n\n"
216  "For more complicated images with multiple coordinate systems, "
217  "and/or floating axes, Import (Advanced) is used instead."));
218  connect (mw.m_actionImport, SIGNAL (triggered ()), &mw, SLOT (slotFileImport ()));
219 
220  mw.m_actionImportAdvanced = new QAction(tr ("Import (Advanced)..."), &mw);
221  mw.m_actionImportAdvanced->setStatusTip (tr ("Creates a new document by importing an image with support for advanced feaures."));
222  mw.m_actionImportAdvanced->setWhatsThis (tr ("Import (Advanced)\n\n"
223  "Creates a new document by importing an image with support for advanced feaures. In "
224  "advanced mode, there can be multiple coordinate systems and/or floating axes."));
225  connect (mw.m_actionImportAdvanced, SIGNAL (triggered ()), &mw, SLOT (slotFileImportAdvanced ()));
226 
227  mw.m_actionImportImageReplace = new QAction (tr ("Import (Image Replace)..."), &mw);
228  mw.m_actionImportImageReplace->setStatusTip (tr ("Imports a new image into the current document, replacing the existing image."));
229  mw.m_actionImportImageReplace->setWhatsThis (tr ("Import (Image Replace)\n\n"
230  "Imports a new image into the current document. The existing image is replaced, "
231  "and all curves in the document are preserved. This operation is useful for applying "
232  "the axis points and other settings from an existing document to a different image."));
233  connect (mw.m_actionImportImageReplace, SIGNAL (triggered ()), &mw, SLOT (slotFileImportImageReplace ()));
234 
235  mw.m_actionOpen = new QAction(tr ("&Open..."), &mw);
236  mw.m_actionOpen->setShortcut (QKeySequence::Open);
237  mw.m_actionOpen->setStatusTip (tr ("Opens an existing document."));
238  mw.m_actionOpen->setWhatsThis (tr ("Open Document\n\n"
239  "Opens an existing document."));
240  connect (mw.m_actionOpen, SIGNAL (triggered ()), &mw, SLOT (slotFileOpen ()));
241 
242 #if !defined(OSX_DEBUG) && !defined(OSX_RELEASE)
243  for (unsigned int i = 0; i < MAX_RECENT_FILE_LIST_SIZE; i++) {
244  QAction *recentFileAction = new QAction (&mw);
245  recentFileAction->setVisible (true);
246  connect (recentFileAction, SIGNAL (triggered ()), &mw, SLOT (slotRecentFileAction ()));
247  mw.m_actionRecentFiles.append (recentFileAction);
248  }
249 #endif
250 
251  mw.m_actionClose = new QAction(tr ("&Close"), &mw);
252  mw.m_actionClose->setShortcut (QKeySequence::Close);
253  mw.m_actionClose->setStatusTip (tr ("Closes the open document."));
254  mw.m_actionClose->setWhatsThis (tr ("Close Document\n\n"
255  "Closes the open document."));
256  connect (mw.m_actionClose, SIGNAL (triggered ()), &mw, SLOT (slotFileClose ()));
257 
258  mw.m_actionSave = new QAction(tr ("&Save"), &mw);
259  mw.m_actionSave->setShortcut (QKeySequence::Save);
260  mw.m_actionSave->setStatusTip (tr ("Saves the current document."));
261  mw.m_actionSave->setWhatsThis (tr ("Save Document\n\n"
262  "Saves the current document."));
263  connect (mw.m_actionSave, SIGNAL (triggered ()), &mw, SLOT (slotFileSave ()));
264 
265  mw.m_actionSaveAs = new QAction(tr ("Save As..."), &mw);
266  mw.m_actionSaveAs->setShortcut (QKeySequence::SaveAs);
267  mw.m_actionSaveAs->setStatusTip (tr ("Saves the current document under a new filename."));
268  mw.m_actionSaveAs->setWhatsThis (tr ("Save Document As\n\n"
269  "Saves the current document under a new filename."));
270  connect (mw.m_actionSaveAs, SIGNAL (triggered ()), &mw, SLOT (slotFileSaveAs ()));
271 
272  mw.m_actionExport = new QAction (tr ("Export..."), &mw);
273  mw.m_actionExport->setShortcut (tr ("Ctrl+E"));
274  mw.m_actionExport->setStatusTip (tr ("Exports the current document into a text file."));
275  mw.m_actionExport->setWhatsThis (tr ("Export Document\n\n"
276  "Exports the current document into a text file."));
277  connect (mw.m_actionExport, SIGNAL (triggered ()), &mw, SLOT (slotFileExport ()));
278 
279  mw.m_actionPrint = new QAction (tr ("&Print..."), &mw);
280  mw.m_actionPrint->setShortcut (QKeySequence::Print);
281  mw.m_actionPrint->setStatusTip (tr ("Print the current document."));
282  mw.m_actionPrint->setWhatsThis (tr ("Print Document\n\n"
283  "Print the current document to a printer or file."));
284  connect (mw.m_actionPrint, SIGNAL (triggered ()), &mw, SLOT (slotFilePrint ()));
285 
286  mw.m_actionExit = new QAction(tr ("&Exit"), &mw);
287  mw.m_actionExit->setShortcut (QKeySequence::Quit);
288  mw.m_actionExit->setStatusTip (tr ("Quits the application."));
289  mw.m_actionExit->setWhatsThis (tr ("Exit\n\n"
290  "Quits the application."));
291  connect (mw.m_actionExit, SIGNAL (triggered ()), &mw, SLOT (close ()));
292 }
293 
294 void CreateActions::createHelp (MainWindow &mw)
295 {
296  LOG4CPP_INFO_S ((*mainCat)) << "CreateActions::createHelp";
297 
298  mw.m_actionHelpChecklistGuideWizard = new QAction (tr ("Checklist Guide Wizard"), &mw);
299  mw.m_actionHelpChecklistGuideWizard->setCheckable (true);
300  mw.m_actionHelpChecklistGuideWizard->setStatusTip (tr ("Open Checklist Guide Wizard during import to define digitizing steps"));
301  mw.m_actionHelpChecklistGuideWizard->setWhatsThis (tr ("Checklist Guide Wizard\n\n"
302  "Use Checklist Guide Wizard during import to generate a checklist of steps "
303  "for the imported document"));
304 
305  mw.m_actionHelpWhatsThis = QWhatsThis::createAction(&mw);
306  mw.m_actionHelpWhatsThis->setShortcut (QKeySequence::WhatsThis);
307 
308  mw.m_actionHelpTutorial = new QAction (tr ("Tutorial"), &mw);
309  mw.m_actionHelpTutorial->setStatusTip (tr ("Play tutorial showing steps for digitizing curves"));
310  mw.m_actionHelpTutorial->setWhatsThis (tr ("Tutorial\n\n"
311  "Play tutorial showing steps for digitizing points from curves drawn with lines "
312  "and/or point"));
313  connect (mw.m_actionHelpTutorial, SIGNAL (triggered ()), &mw, SLOT (slotHelpTutorial()));
314 
315 #if !defined(OSX_DEBUG) && !defined(OSX_RELEASE)
316  mw.m_actionHelpHelp = new QAction (tr ("Help"), &mw);
317  mw.m_actionHelpHelp->setShortcut (QKeySequence::HelpContents);
318  mw.m_actionHelpHelp->setStatusTip (tr ("Help documentation"));
319  mw.m_actionHelpHelp->setWhatsThis (tr ("Help Documentation\n\n"
320  "Searchable help documentation"));
321  // This action gets connected directly to the QDockWidget when that is created
322 #endif
323 
324  mw.m_actionHelpAbout = new QAction(tr ("About Engauge"), &mw);
325  mw.m_actionHelpAbout->setStatusTip (tr ("About the application."));
326  mw.m_actionHelpAbout->setWhatsThis (tr ("About Engauge\n\nAbout the application."));
327  connect (mw.m_actionHelpAbout, SIGNAL (triggered ()), &mw, SLOT (slotHelpAbout ()));
328 }
329 
330 void CreateActions::createSettings (MainWindow &mw)
331 {
332  LOG4CPP_INFO_S ((*mainCat)) << "CreateActions::createSettings";
333 
334  mw.m_actionSettingsCoords = new QAction (tr ("Coordinates..."), &mw);
335  mw.m_actionSettingsCoords->setStatusTip (tr ("Edit Coordinate settings."));
336  mw.m_actionSettingsCoords->setWhatsThis (tr ("Coordinate Settings\n\n"
337  "Coordinate settings determine how the graph coordinates are mapped to the pixels in the image"));
338  connect (mw.m_actionSettingsCoords, SIGNAL (triggered ()), &mw, SLOT (slotSettingsCoords ()));
339 
340  mw.m_actionSettingsCurveList = new QAction (tr ("Curve List..."), &mw);
341  mw.m_actionSettingsCurveList->setStatusTip (tr ("Edit Curve List settings."));
342  mw.m_actionSettingsCurveList->setWhatsThis (tr ("Curve List\n\n"
343  "Curve list settings add, rename and/or remove curves in the current document"));
344  connect (mw.m_actionSettingsCurveList, SIGNAL (triggered ()), &mw, SLOT (slotSettingsCurveList ()));
345 
346  mw.m_actionSettingsCurveProperties = new QAction (tr ("Curve Properties..."), &mw);
347  mw.m_actionSettingsCurveProperties->setStatusTip (tr ("Edit Curve Properties settings."));
348  mw.m_actionSettingsCurveProperties->setWhatsThis (tr ("Curve Properties Settings\n\n"
349  "Curves properties settings determine how each curve appears"));
350  connect (mw.m_actionSettingsCurveProperties, SIGNAL (triggered ()), &mw, SLOT (slotSettingsCurveProperties ()));
351 
352  mw.m_actionSettingsDigitizeCurve = new QAction (tr ("Digitize Curve..."), &mw);
353  mw.m_actionSettingsDigitizeCurve->setStatusTip (tr ("Edit Digitize Axis and Graph Curve settings."));
354  mw.m_actionSettingsDigitizeCurve->setWhatsThis (tr ("Digitize Axis and Graph Curve Settings\n\n"
355  "Digitize Curve settings determine how points are digitized in Digitize Axis Point and "
356  "Digitize Graph Point modes"));
357  connect (mw.m_actionSettingsDigitizeCurve, SIGNAL (triggered ()), &mw, SLOT (slotSettingsDigitizeCurve ()));
358 
359  mw.m_actionSettingsExport = new QAction (tr ("Export Format..."), &mw);
360  mw.m_actionSettingsExport->setStatusTip (tr ("Edit Export Format settings."));
361  mw.m_actionSettingsExport->setWhatsThis (tr ("Export Format Settings\n\n"
362  "Export format settings affect how exported files are formatted"));
363  connect (mw.m_actionSettingsExport, SIGNAL (triggered ()), &mw, SLOT (slotSettingsExportFormat ()));
364 
365  mw.m_actionSettingsColorFilter = new QAction (tr ("Color Filter..."), &mw);
366  mw.m_actionSettingsColorFilter->setStatusTip (tr ("Edit Color Filter settings."));
367  mw.m_actionSettingsColorFilter->setWhatsThis (tr ("Color Filter Settings\n\n"
368  "Color filtering simplifies the graphs for easier Point Matching and Segment Filling"));
369  connect (mw.m_actionSettingsColorFilter, SIGNAL (triggered ()), &mw, SLOT (slotSettingsColorFilter ()));
370 
371  mw.m_actionSettingsAxesChecker = new QAction (tr ("Axes Checker..."), &mw);
372  mw.m_actionSettingsAxesChecker->setStatusTip (tr ("Edit Axes Checker settings."));
373  mw.m_actionSettingsAxesChecker->setWhatsThis (tr ("Axes Checker Settings\n\n"
374  "Axes checker can reveal any axis point mistakes, which are otherwise hard to find."));
375  connect (mw.m_actionSettingsAxesChecker, SIGNAL (triggered ()), &mw, SLOT (slotSettingsAxesChecker ()));
376 
377  mw.m_actionSettingsGridDisplay = new QAction (tr ("Grid Line Display..."), &mw);
378  mw.m_actionSettingsGridDisplay->setStatusTip (tr ("Edit Grid Line Display settings."));
379  mw.m_actionSettingsGridDisplay->setWhatsThis (tr ("Grid Line Display Settings\n\n"
380  "Grid lines displayed on the graph can provide more accuracy than the Axis Checker, for distorted graphs. "
381  "In a distorted graph, the grid lines can be used to adjust the axis points for more accuracy in different regions."));
382  connect (mw.m_actionSettingsGridDisplay, SIGNAL (triggered ()), &mw, SLOT (slotSettingsGridDisplay ()));
383 
384  mw.m_actionSettingsGridRemoval = new QAction (tr ("Grid Line Removal..."), &mw);
385  mw.m_actionSettingsGridRemoval->setStatusTip (tr ("Edit Grid Line Removal settings."));
386  mw.m_actionSettingsGridRemoval->setWhatsThis (tr ("Grid Line Removal Settings\n\n"
387  "Grid line removal isolates curve lines for easier Point Matching and Segment Filling, when "
388  "Color Filtering is not able to separate grid lines from curve lines."));
389  connect (mw.m_actionSettingsGridRemoval, SIGNAL (triggered ()), &mw, SLOT (slotSettingsGridRemoval ()));
390 
391  mw.m_actionSettingsPointMatch = new QAction (tr ("Point Match..."), &mw);
392  mw.m_actionSettingsPointMatch->setStatusTip (tr ("Edit Point Match settings."));
393  mw.m_actionSettingsPointMatch->setWhatsThis (tr ("Point Match Settings\n\n"
394  "Point match settings determine how points are matched while in Point Match mode"));
395  connect (mw.m_actionSettingsPointMatch, SIGNAL (triggered ()), &mw, SLOT (slotSettingsPointMatch ()));
396 
397  mw.m_actionSettingsSegments = new QAction (tr ("Segment Fill..."), &mw);
398  mw.m_actionSettingsSegments->setStatusTip (tr ("Edit Segment Fill settings."));
399  mw.m_actionSettingsSegments->setWhatsThis (tr ("Segment Fill Settings\n\n"
400  "Segment fill settings determine how points are generated in the Segment Fill mode"));
401  connect (mw.m_actionSettingsSegments, SIGNAL (triggered ()), &mw, SLOT (slotSettingsSegments ()));
402 
403  mw.m_actionSettingsGeneral = new QAction (tr ("General..."), &mw);
404  mw.m_actionSettingsGeneral->setStatusTip (tr ("Edit General settings."));
405  mw.m_actionSettingsGeneral->setWhatsThis (tr ("General Settings\n\n"
406  "General settings are document-specific settings that affect multiple modes. For example, the cursor size setting affects "
407  "both Color Picker and Point Match modes"));
408  connect (mw.m_actionSettingsGeneral, SIGNAL (triggered ()), &mw, SLOT (slotSettingsGeneral ()));
409 
410  mw.m_actionSettingsMainWindow = new QAction (tr ("Main Window..."), &mw);
411  mw.m_actionSettingsMainWindow->setEnabled (true);
412  mw.m_actionSettingsMainWindow->setStatusTip (tr ("Edit Main Window settings."));
413  mw.m_actionSettingsMainWindow->setWhatsThis (tr ("Main Window Settings\n\n"
414  "Main window settings affect the user interface and are not specific to any document"));
415  connect (mw.m_actionSettingsMainWindow, SIGNAL (triggered ()), &mw, SLOT (slotSettingsMainWindow ()));
416 }
417 
418 void CreateActions::createView (MainWindow &mw)
419 {
420  LOG4CPP_INFO_S ((*mainCat)) << "CreateActions::createView";
421 
422  mw.m_actionViewBackground = new QAction (tr ("Background Toolbar"), &mw);
423  mw.m_actionViewBackground->setCheckable (true);
424  mw.m_actionViewBackground->setChecked (true);
425  mw.m_actionViewBackground->setStatusTip (tr ("Show or hide the background toolbar."));
426  mw.m_actionViewBackground->setWhatsThis (tr ("View Background ToolBar\n\n"
427  "Show or hide the background toolbar"));
428  connect (mw.m_actionViewBackground, SIGNAL (triggered ()), &mw, SLOT (slotViewToolBarBackground ()));
429 
430  mw.m_actionViewChecklistGuide = new QAction (tr ("Checklist Guide Toolbar"), &mw);
431  mw.m_actionViewChecklistGuide->setCheckable (true);
432  mw.m_actionViewChecklistGuide->setChecked (false);
433  mw.m_actionViewChecklistGuide->setStatusTip (tr ("Show or hide the checklist guide."));
434  mw.m_actionViewChecklistGuide->setWhatsThis (tr ("View Checklist Guide\n\n"
435  "Show or hide the checklist guide"));
436  connect (mw.m_actionViewChecklistGuide, SIGNAL (changed ()), &mw, SLOT (slotViewToolBarChecklistGuide()));
437 
438  mw.m_actionViewFittingWindow = new QAction (tr ("Curve Fitting Window"), &mw);
439  mw.m_actionViewFittingWindow->setCheckable (true);
440  mw.m_actionViewFittingWindow->setChecked (false);
441  mw.m_actionViewFittingWindow->setStatusTip (tr ("Show or hide the curve fitting window."));
442  mw.m_actionViewFittingWindow->setWhatsThis (tr ("View Curve Fitting Window\n\n"
443  "Show or hide the curve fitting window"));
444  connect (mw.m_actionViewFittingWindow, SIGNAL (changed ()), &mw, SLOT (slotViewToolBarFittingWindow()));
445 
446  mw.m_actionViewGeometryWindow = new QAction (tr ("Geometry Window"), &mw);
447  mw.m_actionViewGeometryWindow->setCheckable (true);
448  mw.m_actionViewGeometryWindow->setChecked (false);
449  mw.m_actionViewGeometryWindow->setStatusTip (tr ("Show or hide the geometry window."));
450  mw.m_actionViewGeometryWindow->setWhatsThis (tr ("View Geometry Window\n\n"
451  "Show or hide the geometry window"));
452  connect (mw.m_actionViewGeometryWindow, SIGNAL (changed ()), &mw, SLOT (slotViewToolBarGeometryWindow()));
453 
454  mw.m_actionViewDigitize = new QAction (tr ("Digitizing Tools Toolbar"), &mw);
455  mw.m_actionViewDigitize->setCheckable (true);
456  mw.m_actionViewDigitize->setChecked (true);
457  mw.m_actionViewDigitize->setStatusTip (tr ("Show or hide the digitizing tools toolbar."));
458  mw.m_actionViewDigitize->setWhatsThis (tr ("View Digitizing Tools ToolBar\n\n"
459  "Show or hide the digitizing tools toolbar"));
460  connect (mw.m_actionViewDigitize, SIGNAL (triggered ()), &mw, SLOT (slotViewToolBarDigitize()));
461 
462  mw.m_actionViewSettingsViews = new QAction (tr ("Settings Views Toolbar"), &mw);
463  mw.m_actionViewSettingsViews->setCheckable (true);
464  mw.m_actionViewSettingsViews->setChecked (true);
465  mw.m_actionViewSettingsViews->setStatusTip (tr ("Show or hide the settings views toolbar."));
466  mw.m_actionViewSettingsViews->setWhatsThis (tr ("View Settings Views ToolBar\n\n"
467  "Show or hide the settings views toolbar. These views graphically show the "
468  "most important settings."));
469  connect (mw.m_actionViewSettingsViews, SIGNAL (triggered ()), &mw, SLOT (slotViewToolBarSettingsViews()));
470 
471  mw.m_actionViewCoordSystem = new QAction (tr ("Coordinate System Toolbar"), &mw);
472  mw.m_actionViewCoordSystem->setCheckable (true);
473  mw.m_actionViewCoordSystem->setChecked (false);
474  mw.m_actionViewCoordSystem->setStatusTip (tr ("Show or hide the coordinate system toolbar."));
475  mw.m_actionViewCoordSystem->setWhatsThis (tr ("View Coordinate Systems ToolBar\n\n"
476  "Show or hide the coordinate system selection toolbar. This toolbar is used "
477  "to select the current coordinate system when the document has multiple "
478  "coordinate systems. This toolbar is also used to view and print all coordinate "
479  "systems.\n\n"
480  "This toolbar is disabled when there is only one coordinate system."));
481  connect (mw.m_actionViewCoordSystem, SIGNAL (triggered ()), &mw, SLOT (slotViewToolBarCoordSystem()));
482 
483  mw.m_actionViewToolTips = new QAction (tr ("Tool Tips"), &mw);
484  mw.m_actionViewToolTips->setCheckable (true);
485  mw.m_actionViewToolTips->setChecked (true);
486  mw.m_actionViewToolTips->setStatusTip (tr ("Show or hide the tool tips."));
487  mw.m_actionViewToolTips->setWhatsThis (tr ("View Tool Tips\n\n"
488  "Show or hide the tool tips"));
489  connect (mw.m_actionViewToolTips, SIGNAL (triggered ()), &mw, SLOT (slotViewToolTips()));
490 
491  mw.m_actionViewGridLines = new QAction (tr ("Grid Lines"), &mw);
492  mw.m_actionViewGridLines->setCheckable (true);
493  mw.m_actionViewGridLines->setChecked (false);
494  mw.m_actionViewGridLines->setStatusTip (tr ("Show or hide grid lines."));
495  mw.m_actionViewGridLines->setWhatsThis (tr ("View Grid Lines\n\n"
496  "Show or hide grid lines that are added for accurate adjustments of the axes points, "
497  "which can improve accuracy in distorted graphs"));
498  connect (mw.m_actionViewGridLines, SIGNAL (triggered ()), &mw, SLOT (slotViewGridLines()));
499 
500  mw.m_actionViewBackgroundNone = new QAction (tr ("No Background"), &mw);
501  mw.m_actionViewBackgroundNone->setCheckable (true);
502  mw.m_actionViewBackgroundNone->setStatusTip (tr ("Do not show the image underneath the points."));
503  mw.m_actionViewBackgroundNone->setWhatsThis (tr ("No Background\n\n"
504  "No image is shown so points are easier to see"));
505 
506  mw.m_actionViewBackgroundOriginal = new QAction (tr ("Show Original Image"), &mw);
507  mw.m_actionViewBackgroundOriginal->setCheckable (true);
508  mw.m_actionViewBackgroundOriginal->setStatusTip (tr ("Show the original image underneath the points."));
509  mw.m_actionViewBackgroundOriginal->setWhatsThis (tr ("Show Original Image\n\n"
510  "Show the original image underneath the points"));
511 
512  mw.m_actionViewBackgroundFiltered = new QAction (tr ("Show Filtered Image"), &mw);
513  mw.m_actionViewBackgroundFiltered->setCheckable (true);
514  mw.m_actionViewBackgroundFiltered->setChecked (true);
515  mw.m_actionViewBackgroundFiltered->setStatusTip (tr ("Show the filtered image underneath the points."));
516  mw.m_actionViewBackgroundFiltered->setWhatsThis (tr ("Show Filtered Image\n\n"
517  "Show the filtered image underneath the points.\n\n"
518  "The filtered image is created from the original image according to the "
519  "Filter preferences so unimportant information is hidden and important "
520  "information is emphasized"));
521 
522  mw.m_actionViewCurvesNone = new QAction (tr ("Hide All Curves"), &mw);
523  mw.m_actionViewCurvesNone->setCheckable (true);
524  mw.m_actionViewCurvesNone->setStatusTip (tr ("Hide all digitized curves."));
525  mw.m_actionViewCurvesNone->setWhatsThis (tr ("Hide All Curves\n\n"
526  "No axis points or digitized graph curves are shown so the image is easier to see."));
527 
528  mw.m_actionViewCurvesSelected = new QAction (tr ("Show Selected Curve"), &mw);
529  mw.m_actionViewCurvesSelected->setCheckable (true);
530  mw.m_actionViewCurvesSelected->setStatusTip (tr ("Show only the currently selected curve."));
531  mw.m_actionViewCurvesSelected->setWhatsThis (tr ("Show Selected Curve\n\n"
532  "Show only the digitized points and line that belong to the currently selected curve."));
533 
534  mw.m_actionViewCurvesAll = new QAction (tr ("Show All Curves"), &mw);
535  mw.m_actionViewCurvesAll->setCheckable (true);
536  mw.m_actionViewCurvesAll->setChecked (true);
537  mw.m_actionViewCurvesAll->setStatusTip (tr ("Show all curves."));
538  mw.m_actionViewCurvesAll->setWhatsThis (tr ("Show All Curves\n\n"
539  "Show all digitized axis points and graph curves"));
540 
541  mw.m_groupBackground = new QActionGroup(&mw);
542  mw.m_groupBackground->addAction (mw.m_actionViewBackgroundNone);
543  mw.m_groupBackground->addAction (mw.m_actionViewBackgroundOriginal);
544  mw.m_groupBackground->addAction (mw.m_actionViewBackgroundFiltered);
545  connect (mw.m_groupBackground, SIGNAL(triggered (QAction*)), &mw, SLOT (slotViewGroupBackground(QAction*)));
546 
547  mw.m_groupCurves = new QActionGroup(&mw);
548  mw.m_groupCurves->addAction (mw.m_actionViewCurvesNone);
549  mw.m_groupCurves->addAction (mw.m_actionViewCurvesSelected);
550  mw.m_groupCurves->addAction (mw.m_actionViewCurvesAll);
551  connect (mw.m_groupCurves, SIGNAL(triggered (QAction*)), &mw, SLOT (slotViewGroupCurves(QAction*)));
552 
553  mw.m_actionStatusNever = new QAction (tr ("Hide Always"), &mw);
554  mw.m_actionStatusNever->setCheckable(true);
555  mw.m_actionStatusNever->setStatusTip (tr ("Always hide the status bar."));
556  mw.m_actionStatusNever->setWhatsThis (tr ("Hide the status bar. No temporary status or feedback messages will appear."));
557 
558  mw.m_actionStatusTemporary = new QAction (tr ("Show Temporary Messages"), &mw);
559  mw.m_actionStatusTemporary->setCheckable(true);
560  mw.m_actionStatusTemporary->setStatusTip (tr ("Hide the status bar except when display temporary messages."));
561  mw.m_actionStatusTemporary->setWhatsThis (tr ("Hide the status bar, except when displaying temporary status and feedback messages."));
562 
563  mw.m_actionStatusAlways = new QAction (tr ("Show Always"), &mw);
564  mw.m_actionStatusAlways->setCheckable(true);
565  mw.m_actionStatusAlways->setStatusTip (tr ("Always show the status bar."));
566  mw.m_actionStatusAlways->setWhatsThis (tr ("Show the status bar. Besides displaying temporary status and feedback messages, "
567  "the status bar also displays information about the cursor position."));
568 
569  mw.m_groupStatus = new QActionGroup(&mw);
570  mw.m_groupStatus->addAction (mw.m_actionStatusNever);
571  mw.m_groupStatus->addAction (mw.m_actionStatusTemporary);
572  mw.m_groupStatus->addAction (mw.m_actionStatusAlways);
573  connect (mw.m_groupStatus, SIGNAL (triggered (QAction*)), &mw, SLOT (slotViewGroupStatus(QAction*)));
574 
575  mw.m_actionZoomOut = new QAction (tr ("Zoom Out"), &mw);
576  mw.m_actionZoomOut->setStatusTip (tr ("Zoom out"));
577  // setShortCut is called by updateSettingsCreateActions
578  connect (mw.m_actionZoomOut, SIGNAL (triggered ()), &mw, SLOT (slotViewZoomOut ()));
579 
580  mw.m_actionZoomIn = new QAction (tr ("Zoom In"), &mw);
581  mw.m_actionZoomIn->setStatusTip (tr ("Zoom in"));
582  // setShortCut is called by updateSettingsCreateActions
583  connect (mw.m_actionZoomIn, SIGNAL (triggered ()), &mw, SLOT (slotViewZoomIn ()));
584 
585  mw.m_mapperZoomFactor = new QSignalMapper (&mw);
586  connect (mw.m_mapperZoomFactor, SIGNAL (mapped (int)), &mw, SLOT (slotViewZoomFactorInt (int)));
587 
588  mw.m_actionZoom16To1 = new QAction (tr ("16:1 (1600%)"), &mw);
589  mw.m_actionZoom16To1->setCheckable (true);
590  mw.m_actionZoom16To1->setStatusTip (tr ("Zoom 16:1"));
591  connect (mw.m_actionZoom16To1, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
592  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom16To1, ZOOM_16_TO_1);
593 
594  mw.m_actionZoom16To1Farther = new QAction (tr ("16:1 farther (1270%)"), &mw);
595  mw.m_actionZoom16To1Farther->setCheckable (true);
596  mw.m_actionZoom16To1Farther->setStatusTip (tr ("Zoom 12.7:1"));
597  connect (mw.m_actionZoom16To1Farther, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
598  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom16To1Farther, ZOOM_16_TO_1_FARTHER);
599 
600  mw.m_actionZoom8To1Closer = new QAction (tr ("8:1 closer (1008%)"), &mw);
601  mw.m_actionZoom8To1Closer->setCheckable (true);
602  mw.m_actionZoom8To1Closer->setStatusTip (tr ("Zoom 10.08:1"));
603  connect (mw.m_actionZoom8To1Closer, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
604  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom8To1Closer, ZOOM_8_TO_1_CLOSER);
605 
606  mw.m_actionZoom8To1 = new QAction (tr ("8:1 (800%)"), &mw);
607  mw.m_actionZoom8To1->setCheckable (true);
608  mw.m_actionZoom8To1->setStatusTip (tr ("Zoom 8:1"));
609  connect (mw.m_actionZoom8To1, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
610  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom8To1, ZOOM_8_TO_1);
611 
612  mw.m_actionZoom8To1Farther = new QAction (tr ("8:1 farther (635%)"), &mw);
613  mw.m_actionZoom8To1Farther->setCheckable (true);
614  mw.m_actionZoom8To1Farther->setStatusTip (tr ("Zoom 6.35:1"));
615  connect (mw.m_actionZoom8To1Farther, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
616  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom8To1Farther, ZOOM_8_TO_1_FARTHER);
617 
618  mw.m_actionZoom4To1Closer = new QAction (tr ("4:1 closer (504%)"), &mw);
619  mw.m_actionZoom4To1Closer->setCheckable (true);
620  mw.m_actionZoom4To1Closer->setStatusTip (tr ("Zoom 5.04:1"));
621  connect (mw.m_actionZoom4To1Closer, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
622  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom4To1Closer, ZOOM_4_TO_1_CLOSER);
623 
624  mw.m_actionZoom4To1 = new QAction (tr ("4:1 (400%)"), &mw);
625  mw.m_actionZoom4To1->setCheckable (true);
626  mw.m_actionZoom4To1->setStatusTip (tr ("Zoom 4:1"));
627  connect (mw.m_actionZoom4To1, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
628  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom4To1, ZOOM_4_TO_1);
629 
630  mw.m_actionZoom4To1Farther = new QAction (tr ("4:1 farther (317%)"), &mw);
631  mw.m_actionZoom4To1Farther->setCheckable (true);
632  mw.m_actionZoom4To1Farther->setStatusTip (tr ("Zoom 3.17:1"));
633  connect (mw.m_actionZoom4To1Farther, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
634  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom4To1Farther, ZOOM_4_TO_1_FARTHER);
635 
636  mw.m_actionZoom2To1Closer = new QAction (tr ("2:1 closer (252%)"), &mw);
637  mw.m_actionZoom2To1Closer->setCheckable (true);
638  mw.m_actionZoom2To1Closer->setStatusTip (tr ("Zoom 2.52:1"));
639  connect (mw.m_actionZoom2To1Closer, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
640  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom2To1Closer, ZOOM_2_TO_1_CLOSER);
641 
642  mw.m_actionZoom2To1 = new QAction (tr ("2:1 (200%)"), &mw);
643  mw.m_actionZoom2To1->setCheckable (true);
644  mw.m_actionZoom2To1->setStatusTip (tr ("Zoom 2:1"));
645  connect (mw.m_actionZoom2To1, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
646  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom2To1, ZOOM_2_TO_1);
647 
648  mw.m_actionZoom2To1Farther = new QAction (tr ("2:1 farther (159%)"), &mw);
649  mw.m_actionZoom2To1Farther->setCheckable (true);
650  mw.m_actionZoom2To1Farther->setStatusTip (tr ("Zoom 1.59:1"));
651  connect (mw.m_actionZoom2To1Farther, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
652  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom2To1Farther, ZOOM_2_TO_1_FARTHER);
653 
654  mw.m_actionZoom1To1Closer = new QAction (tr ("1:1 closer (126%)"), &mw);
655  mw.m_actionZoom1To1Closer->setCheckable (true);
656  mw.m_actionZoom1To1Closer->setChecked (true);
657  mw.m_actionZoom1To1Closer->setStatusTip (tr ("Zoom 1.3:1"));
658  connect (mw.m_actionZoom1To1Closer, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
659  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To1Closer, ZOOM_1_TO_1_CLOSER);
660 
661  mw.m_actionZoom1To1 = new QAction (tr ("1:1 (100%)"), &mw);
662  mw.m_actionZoom1To1->setCheckable (true);
663  mw.m_actionZoom1To1->setChecked (true);
664  mw.m_actionZoom1To1->setStatusTip (tr ("Zoom 1:1"));
665  connect (mw.m_actionZoom1To1, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
666  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To1, ZOOM_1_TO_1);
667 
668  mw.m_actionZoom1To1Farther = new QAction (tr ("1:1 farther (79%)"), &mw);
669  mw.m_actionZoom1To1Farther->setCheckable (true);
670  mw.m_actionZoom1To1Farther->setChecked (true);
671  mw.m_actionZoom1To1Farther->setStatusTip (tr ("Zoom 0.8:1"));
672  connect (mw.m_actionZoom1To1Farther, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
673  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To1Farther, ZOOM_1_TO_1_FARTHER);
674 
675  mw.m_actionZoom1To2Closer = new QAction (tr ("1:2 closer (63%)"), &mw);
676  mw.m_actionZoom1To2Closer->setCheckable (true);
677  mw.m_actionZoom1To2Closer->setStatusTip (tr ("Zoom 1.3:2"));
678  connect (mw.m_actionZoom1To2Closer, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
679  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To2Closer, ZOOM_1_TO_2_CLOSER);
680 
681  mw.m_actionZoom1To2 = new QAction (tr ("1:2 (50%)"), &mw);
682  mw.m_actionZoom1To2->setCheckable (true);
683  mw.m_actionZoom1To2->setStatusTip (tr ("Zoom 1:2"));
684  connect (mw.m_actionZoom1To2, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
685  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To2, ZOOM_1_TO_2);
686 
687  mw.m_actionZoom1To2Farther = new QAction (tr ("1:2 farther (40%)"), &mw);
688  mw.m_actionZoom1To2Farther->setCheckable (true);
689  mw.m_actionZoom1To2Farther->setStatusTip (tr ("Zoom 0.8:2"));
690  connect (mw.m_actionZoom1To2Farther, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
691  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To2Farther, ZOOM_1_TO_2_FARTHER);
692 
693  mw.m_actionZoom1To4Closer = new QAction (tr ("1:4 closer (31%)"), &mw);
694  mw.m_actionZoom1To4Closer->setCheckable (true);
695  mw.m_actionZoom1To4Closer->setStatusTip (tr ("Zoom 1.3:4"));
696  connect (mw.m_actionZoom1To4Closer, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
697  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To4Closer, ZOOM_1_TO_4_CLOSER);
698 
699  mw.m_actionZoom1To4 = new QAction (tr ("1:4 (25%)"), &mw);
700  mw.m_actionZoom1To4->setCheckable (true);
701  mw.m_actionZoom1To4->setStatusTip (tr ("Zoom 1:4"));
702  connect (mw.m_actionZoom1To4, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
703  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To4, ZOOM_1_TO_4);
704 
705  mw.m_actionZoom1To4Farther = new QAction (tr ("1:4 farther (20%)"), &mw);
706  mw.m_actionZoom1To4Farther->setCheckable (true);
707  mw.m_actionZoom1To4Farther->setStatusTip (tr ("Zoom 0.8:4"));
708  connect (mw.m_actionZoom1To4Farther, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
709  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To4Farther, ZOOM_1_TO_4_FARTHER);
710 
711  mw.m_actionZoom1To8Closer = new QAction (tr ("1:8 closer (12.5%)"), &mw);
712  mw.m_actionZoom1To8Closer->setCheckable (true);
713  mw.m_actionZoom1To8Closer->setStatusTip (tr ("Zoom 1:8"));
714  connect (mw.m_actionZoom1To8Closer, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
715  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To8Closer, ZOOM_1_TO_8_CLOSER);
716 
717  mw.m_actionZoom1To8 = new QAction (tr ("1:8 (12.5%)"), &mw);
718  mw.m_actionZoom1To8->setCheckable (true);
719  mw.m_actionZoom1To8->setStatusTip (tr ("Zoom 1:8"));
720  connect (mw.m_actionZoom1To8, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
721  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To8, ZOOM_1_TO_8);
722 
723  mw.m_actionZoom1To8Farther = new QAction (tr ("1:8 farther (10%)"), &mw);
724  mw.m_actionZoom1To8Farther->setCheckable (true);
725  mw.m_actionZoom1To8Farther->setStatusTip (tr ("Zoom 0.8:8"));
726  connect (mw.m_actionZoom1To8Farther, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
727  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To8Farther, ZOOM_1_TO_8_FARTHER);
728 
729  mw.m_actionZoom1To16Closer = new QAction (tr ("1:16 closer (8%)"), &mw);
730  mw.m_actionZoom1To16Closer->setCheckable (true);
731  mw.m_actionZoom1To16Closer->setStatusTip (tr ("Zoom 1.3:16"));
732  connect (mw.m_actionZoom1To16Closer, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
733  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To16Closer, ZOOM_1_TO_16_CLOSER);
734 
735  mw.m_actionZoom1To16 = new QAction (tr ("1:16 (6.25%)"), &mw);
736  mw.m_actionZoom1To16->setCheckable (true);
737  mw.m_actionZoom1To16->setStatusTip (tr ("Zoom 1:16"));
738  connect (mw.m_actionZoom1To16, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
739  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoom1To16, ZOOM_1_TO_16);
740 
741  mw.m_actionZoomFill = new QAction (tr ("Fill"), &mw);
742  mw.m_actionZoomFill->setCheckable (true);
743  mw.m_actionZoomFill->setStatusTip (tr ("Zoom with stretching to fill window"));
744  connect (mw.m_actionZoomFill, SIGNAL (triggered ()), mw.m_mapperZoomFactor, SLOT (map ()));
745  mw.m_mapperZoomFactor->setMapping (mw.m_actionZoomFill, ZOOM_FILL);
746 
747  mw.m_groupZoom = new QActionGroup (&mw);
748  mw.m_groupZoom->addAction (mw.m_actionZoom16To1);
749  mw.m_groupZoom->addAction (mw.m_actionZoom16To1Farther);
750  mw.m_groupZoom->addAction (mw.m_actionZoom8To1Closer);
751  mw.m_groupZoom->addAction (mw.m_actionZoom8To1);
752  mw.m_groupZoom->addAction (mw.m_actionZoom8To1Farther);
753  mw.m_groupZoom->addAction (mw.m_actionZoom4To1Closer);
754  mw.m_groupZoom->addAction (mw.m_actionZoom4To1);
755  mw.m_groupZoom->addAction (mw.m_actionZoom4To1Farther);
756  mw.m_groupZoom->addAction (mw.m_actionZoom2To1Closer);
757  mw.m_groupZoom->addAction (mw.m_actionZoom2To1);
758  mw.m_groupZoom->addAction (mw.m_actionZoom2To1Farther);
759  mw.m_groupZoom->addAction (mw.m_actionZoom1To1Closer);
760  mw.m_groupZoom->addAction (mw.m_actionZoom1To1);
761  mw.m_groupZoom->addAction (mw.m_actionZoom1To1Farther);
762  mw.m_groupZoom->addAction (mw.m_actionZoom1To2Closer);
763  mw.m_groupZoom->addAction (mw.m_actionZoom1To2);
764  mw.m_groupZoom->addAction (mw.m_actionZoom1To2Farther);
765  mw.m_groupZoom->addAction (mw.m_actionZoom1To4Closer);
766  mw.m_groupZoom->addAction (mw.m_actionZoom1To4);
767  mw.m_groupZoom->addAction (mw.m_actionZoom1To4Farther);
768  mw.m_groupZoom->addAction (mw.m_actionZoom1To8Closer);
769  mw.m_groupZoom->addAction (mw.m_actionZoom1To8);
770  mw.m_groupZoom->addAction (mw.m_actionZoom1To8Farther);
771  mw.m_groupZoom->addAction (mw.m_actionZoom1To16Closer);
772  mw.m_groupZoom->addAction (mw.m_actionZoom1To16);
773  mw.m_groupZoom->addAction (mw.m_actionZoomFill);
774 }
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
CreateActions()
Single constructor.
void create(MainWindow &mw)
Create QAction actions.
log4cpp::Category * mainCat
Definition: Logger.cpp:14
const unsigned int MAX_RECENT_FILE_LIST_SIZE
Definition: MainWindow.cpp:130
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition: MainWindow.h:91