2007-01-20 18:11:42 +00:00
|
|
|
#ifndef EXPORTDIALOG_H
|
|
|
|
#define EXPORTDIALOG_H
|
|
|
|
#include <QtGui>
|
2007-01-29 00:41:12 +00:00
|
|
|
#include "diagram.h"
|
2007-01-20 18:11:42 +00:00
|
|
|
/**
|
|
|
|
Cette classe represente le dialogue permettant d'exporter un schema
|
|
|
|
sous forme d'image selon les desirs de l'utilisateur
|
|
|
|
*/
|
|
|
|
class ExportDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2007-02-01 01:07:26 +00:00
|
|
|
ExportDialog(Diagram *, QWidget * = 0);
|
2007-02-02 17:40:07 +00:00
|
|
|
~ExportDialog();
|
2007-01-20 18:11:42 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
// elements graphiques
|
|
|
|
QLineEdit *filename;
|
|
|
|
QPushButton *button_browse;
|
|
|
|
QComboBox *format;
|
|
|
|
QSpinBox *width;
|
|
|
|
QSpinBox *height;
|
|
|
|
QCheckBox *keep_aspect_ratio;
|
2007-02-02 17:40:07 +00:00
|
|
|
QCheckBox *draw_grid;
|
|
|
|
QCheckBox *draw_border;
|
|
|
|
QCheckBox *draw_inset;
|
|
|
|
QCheckBox *draw_columns;
|
2007-01-20 18:11:42 +00:00
|
|
|
QCheckBox *keep_colors;
|
2007-02-02 17:40:07 +00:00
|
|
|
QRadioButton *export_elements;
|
|
|
|
QRadioButton *export_border;
|
2007-01-20 18:11:42 +00:00
|
|
|
QDialogButtonBox *buttons;
|
2007-02-02 17:40:07 +00:00
|
|
|
QGraphicsScene *preview_scene;
|
|
|
|
QGraphicsView *preview_view;
|
2007-01-20 18:11:42 +00:00
|
|
|
|
|
|
|
// booleens pour ne pas avoir de boucle lors de l'edition des dimensions de l'image
|
|
|
|
bool dontchangewidth;
|
|
|
|
bool dontchangeheight;
|
|
|
|
|
|
|
|
// elements relatifs au traitement effectue par le dialogue
|
2007-01-29 00:41:12 +00:00
|
|
|
Diagram *diagram;
|
2007-01-28 00:53:17 +00:00
|
|
|
QSize diagram_size;
|
|
|
|
QString diagram_path;
|
|
|
|
qreal diagram_ratio;
|
2007-01-20 18:11:42 +00:00
|
|
|
|
2007-02-02 17:40:07 +00:00
|
|
|
QWidget *leftPart();
|
|
|
|
QWidget *rightPart();
|
2007-01-20 18:11:42 +00:00
|
|
|
QGroupBox *setupDimensionsGroupBox();
|
|
|
|
QGroupBox *setupOptionsGroupBox();
|
2007-02-02 17:40:07 +00:00
|
|
|
QImage generateImage();
|
2007-01-20 18:11:42 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void slot_correctWidth();
|
|
|
|
void slot_correctHeight();
|
|
|
|
void slot_chooseAFile();
|
|
|
|
void slot_check();
|
2007-02-02 17:40:07 +00:00
|
|
|
void slot_changeUseBorder();
|
|
|
|
void slot_refreshPreview();
|
2007-01-20 18:11:42 +00:00
|
|
|
};
|
|
|
|
#endif
|