Engauge Digitizer 2
Loading...
Searching...
No Matches
DlgSettingsPointMatch.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 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#ifndef DLG_SETTINGS_POINT_MATCH_H
8#define DLG_SETTINGS_POINT_MATCH_H
9
10#include "CoordsType.h"
12
13class ButtonWhatsThis;
15class QComboBox;
16class QGraphicsEllipseItem;
17class QGraphicsLineItem;
18class QGraphicsPixmapItem;
19class QGraphicsScene;
20class QGridLayout;
21class QSpinBox;
22class ViewPreview;
23
26{
27 Q_OBJECT;
28
29public:
32 virtual ~DlgSettingsPointMatch();
33
34 virtual void createOptionalSaveDefault (QHBoxLayout *layout);
35 virtual QWidget *createSubPanel ();
36 virtual void load (CmdMediator &cmdMediator);
37 virtual void setSmallDialogs (bool smallDialogs);
38
39private slots:
40 void slotAcceptedPointColor (const QString &);
41 void slotCandidatePointColor (const QString &);
42 void slotMaxPointSize (int);
43 void slotMouseMove (QPointF pos);
44 void slotRejectedPointColor (const QString &);
45 void slotWhatsThis();
46
47protected:
48 virtual void handleOk ();
49
50private:
51
52 QPointF boxPositionConstraint(const QPointF &posIn);
53 void createControls (QGridLayout *layout,
54 int &row);
55 void createPreview(QGridLayout *layout,
56 int &row);
57 void createTemplate();
58 void initializeBox();
59 double radiusAlongDiagonal () const;
60 void updateControls();
61 void updatePreview();
62
63 ButtonWhatsThis *m_btnWhatsThis;
64
65 QSpinBox *m_spinMinPointSeparation;
66 QSpinBox *m_spinPointSize;
67 QComboBox *m_cmbAcceptedPointColor;
68 QComboBox *m_cmbRejectedPointColor;
69 QComboBox *m_cmbCandidatePointColor;
70
71 QGraphicsScene *m_scenePreview;
72 ViewPreview *m_viewPreview;
73 QGraphicsEllipseItem *m_circle;
74
75 DocumentModelPointMatch *m_modelPointMatchBefore;
76 DocumentModelPointMatch *m_modelPointMatchAfter;
77};
78
79#endif // DLG_SETTINGS_POINT_MATCH_H
Unobtrusive button to trigger QWhatsThis since some operating systems (Linux Mint) do not show WhatsT...
Command queue stack.
Definition CmdMediator.h:24
DlgSettingsAbstractBase(const QString &title, const QString &dialogName, MainWindow &mainWindow)
Single constructor.
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.
MainWindow & mainWindow()
Get method for MainWindow.
virtual void load(CmdMediator &cmdMediator)
Load settings from Document.
virtual void setSmallDialogs(bool smallDialogs)
If false then dialogs have a minimum size so all controls are visible.
DlgSettingsPointMatch(MainWindow &mainWindow)
Single constructor.
virtual void handleOk()
Process slotOk.
virtual void createOptionalSaveDefault(QHBoxLayout *layout)
Let subclass define an optional Save As Default button.
virtual QWidget * createSubPanel()
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition MainWindow.h:95
Class that modifies QGraphicsView to automatically expand/shrink the view to fit the window,...
Definition ViewPreview.h:15