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