Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
Dlg
DlgImportCroppingNonPdf.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_IMPORT_CROPPING_NON_PDF_H
8
#define DLG_IMPORT_CROPPING_NON_PDF_H
9
10
#include <QDialog>
11
#include <QImage>
12
#include <QObject>
13
14
class
NonPdfCropping
;
15
class
QGraphicsPixmapItem;
16
class
QGridLayout;
17
class
QGraphicsScene;
18
class
QRectF;
19
class
QSpinBox;
20
class
QString;
21
class
ViewPreview
;
22
24
class
DlgImportCroppingNonPdf
:
public
QDialog
25
{
26
Q_OBJECT;
27
28
public
:
30
DlgImportCroppingNonPdf
(
const
QString &fileName);
31
virtual
~DlgImportCroppingNonPdf
();
32
34
QImage
image
()
const
;
35
37
virtual
void
showEvent
(QShowEvent *event);
38
39
private
slots:
40
42
void
slotCancel();
43
45
void
slotOk ();
46
47
private
:
48
DlgImportCroppingNonPdf
();
49
50
void
createNonPdfCropping();
51
void
createPreview (QGridLayout *layout,
52
int
&row);
53
void
finishPanel (QWidget *subPanel);
54
void
initializeFrameGeometryAndPixmap ();
55
QImage loadImage ()
const
;
56
58
static
int
MINIMUM_DIALOG_WIDTH;
59
61
static
int
MINIMUM_PREVIEW_HEIGHT;
62
63
void
saveGeometryToSettings ();
64
void
updatePreview ();
65
66
QPushButton *m_btnCancel;
67
QPushButton *m_btnOk;
68
69
const
QString &m_fileName;
70
QImage m_image;
// Needed so it can be passed to external code when this dialog has finished successfully
71
QGraphicsPixmapItem *m_pixmap;
// Needed so old image can be removed just before new one gets added
72
73
QGraphicsScene *m_scenePreview;
74
ViewPreview
*m_viewPreview;
75
76
NonPdfCropping
*m_nonPdfCropping;
77
};
78
79
#endif
// DLG_IMPORT_CROPPING_NON_PDF_H
DlgImportCroppingNonPdf::showEvent
virtual void showEvent(QShowEvent *event)
Do preparation before dialog is displayed.
Definition
DlgImportCroppingNonPdf.cpp:170
DlgImportCroppingNonPdf::image
QImage image() const
Image that was selected. Value is null if loading failed.
Definition
DlgImportCroppingNonPdf.cpp:133
DlgImportCroppingNonPdf::~DlgImportCroppingNonPdf
virtual ~DlgImportCroppingNonPdf()
Definition
DlgImportCroppingNonPdf.cpp:55
DlgImportCroppingNonPdf::DlgImportCroppingNonPdf
DlgImportCroppingNonPdf(const QString &fileName)
Single constructor.
Definition
DlgImportCroppingNonPdf.cpp:28
NonPdfCropping
This class shows a frame around the selected portion of the import preview window.
Definition
NonPdfCropping.h:23
ViewPreview
Class that modifies QGraphicsView to automatically expand/shrink the view to fit the window,...
Definition
ViewPreview.h:15
Generated on
for Engauge Digitizer by
1.17.0