00001
00002
00003
00004
00005
00006
00007 #ifndef DLG_IMPORT_CROPPING_NON_PDF_H
00008 #define DLG_IMPORT_CROPPING_NON_PDF_H
00009
00010 #include <QDialog>
00011 #include <QImage>
00012 #include <QObject>
00013
00014 class NonPdfCropping;
00015 class QGraphicsPixmapItem;
00016 class QGridLayout;
00017 class QGraphicsScene;
00018 class QRectF;
00019 class QSpinBox;
00020 class QString;
00021 class ViewPreview;
00022
00024 class DlgImportCroppingNonPdf : public QDialog
00025 {
00026 Q_OBJECT;
00027
00028 public:
00030 DlgImportCroppingNonPdf (const QString &fileName);
00031 virtual ~DlgImportCroppingNonPdf ();
00032
00034 QImage image () const;
00035
00037 virtual void showEvent (QShowEvent *event);
00038
00039 private slots:
00040
00042 void slotCancel();
00043
00045 void slotOk ();
00046
00047 private:
00048 DlgImportCroppingNonPdf ();
00049
00050 void createNonPdfCropping();
00051 void createPreview (QGridLayout *layout,
00052 int &row);
00053 void finishPanel (QWidget *subPanel);
00054 void initializeFrameGeometryAndPixmap ();
00055 QImage loadImage () const;
00056
00058 static int MINIMUM_DIALOG_WIDTH;
00059
00061 static int MINIMUM_PREVIEW_HEIGHT;
00062
00063 void saveGeometryToSettings ();
00064 void updatePreview ();
00065
00066 QPushButton *m_btnCancel;
00067 QPushButton *m_btnOk;
00068
00069 const QString &m_fileName;
00070 QImage m_image;
00071 QGraphicsPixmapItem *m_pixmap;
00072
00073 QGraphicsScene *m_scenePreview;
00074 ViewPreview *m_viewPreview;
00075
00076 NonPdfCropping *m_nonPdfCropping;
00077 };
00078
00079 #endif // DLG_IMPORT_CROPPING_NON_PDF_H